aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel
AgeCommit message (Collapse)Author
2011-04-21sparc32: fix sparcstation 5 bootSam Ravnborg
The sparcstation 5 I have available has no MID property for the CPU. This resulted in a panic when booting a SMP kernel on this box. The assigned field in cpu_data is never used, so if we fail to read the MID property then inform user and continue booting. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-21sparc32: fix section mismatch warnings in apc, pmc and time_32Sam Ravnborg
In all cases there were a struct of_device_id variable defined __initdata. But it was referenced from struct platform_driver.of_match_table which is not guaranteed to be used during init only. So drop the __initdata annotation. This fixes following warnings: WARNING: arch/sparc/kernel/built-in.o(.data+0x810): Section mismatch in reference from the variable clock_driver to the variable .init.data:clock_match The variable clock_driver references the variable __initdata clock_match If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/sparc/kernel/built-in.o(.data+0xcec): Section mismatch in reference from the variable apc_driver to the variable .init.data:apc_match The variable apc_driver references the variable __initdata apc_match If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/sparc/kernel/built-in.o(.data+0xd60): Section mismatch in reference from the variable pmc_driver to the variable .init.data:pmc_match The variable pmc_driver references the variable __initdata pmc_match If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6: Fix common misspellings
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31sparc32: Pass task_struct to schedule_tail() in ret_from_forkTkhai Kirill
We have to pass task_struct of previous process to function schedule_tail(). Currently in ret_from_fork previous thread_info is passed: switch_to: mov %g6, %g3 /* previous thread_info in g6 */ ret_from_fork: call schedule_tail mov %g3, %o0 /* previous thread_info is passed */ void schedule_tail(struct task_struct *prev); Signed-off-by: Tkhai Kirill <tkhai@yandex.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-30sparc64: Fix section mis-match errors.David S. Miller
Fix all of the problems spotted by CONFIG_DEBUG_SECTION_MISMATCH under arch/sparc during a 64-bit defconfig build. They fall into two categorites: 1) of_device_id is marked as __initdata, and we can never do this since these objects sit in the device core data structures way past boot. So even if a driver will never be reloaded, we have to keep the device ID table around. Mark such cases const instead. 2) The bootmem alloc/free handling code in mdesc.c was not fully marked __init as it should be, thus generating a reference to free_bootmem_late() (which is __init) from non-__init code. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-29sparc: Hook up syncfs system call.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-29sparc: Use generic show_interrupts()Thomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: sparclinux@vger.kernel.org
2011-03-29sparc: Convert to new irq function namesThomas Gleixner
Scripted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: sparclinux@vger.kernel.org
2011-03-29sparc: Cleanup direct irq_desc accessThomas Gleixner
Use the proper wrapper functions. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: sparclinux@vger.kernel.org
2011-03-29sparc: Use the new genirq functionalityThomas Gleixner
Make use of the new features in genirq: 1) Set the chip flag IRCHIP_EOI_IF_HANDLED, which ensures in the core code that irq_eoi() is only called when the interrupt was handled. That removes the extra status check in the callback. 2) Use the preflow handler, which is called from the fasteoi core code before the device handler. That avoids another status check and the open coded handler redirection. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: sparclinux@vger.kernel.org
2011-03-24sparc32: Fix multiple RTC detections on SUN4DKjetil Oftedal
During the preparation for testing the recent changes made to the SUN4D specific code in the kernel by Sam Ravnborg the following was discovered: Since the removal of of_platform_bus_type (commit: eca3930163ba8884060ce9d9ff5ef0d9b7c7b00f ) multiboard SUN4Ds have not been able to boot. The kernel crashes due to a zero-pointer error encountered when registering multiple M48T59 RTCs (There is one on each board). A patch for the was previously submitted, but the problem was not a serious at that time, as it would only generate warnings. Now the kernel will crash and stop executing before the serial console has been started. (Crash output can be viewed by using the -p boot flag) Signed-off-by: Kjetil Oftedal <oftedal@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-18sparc: Add {open_by,name_to}_handle_at and clock_adjtime syscalls.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-18sparc: Implement of_iomap().David S. Miller
Grab the pre-computed resource and map using of_ioremap(). Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-18sparc: Implement of_address_to_resource().David S. Miller
Similarly to irq_of_parse_and_map(), find the platform_device object and return the pre-computed resource. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc: Fix .size directive for do_int_loadBen Hutchings
gas used to accept (and ignore?) .size directives which referred to undefined symbols, as this does. In binutils 2.21 these are treated as errors. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: Fix build errors with gcc-4.6.0David S. Miller
Most of the warnings emitted (we fail arch/sparc file builds with -Werror) were legitimate but harmless, however one case (n2_pcr_write) was a genuine bug. Based almost entirely upon a patch by Sam Ravnborg. Reported-by: Dennis Gilmore <dennis@ausil.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32,sun4m: percpu and global register definitions moved to irq.hSam Ravnborg
entry.S access percpu + global data defined in sun4m_irq.c - so move the types to irq.h. This makes sparse happy and allow us to utilize asm-offsets later. Also updated a few comments in the sun4m_irq.c file. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32: introduce build_device_irqSam Ravnborg
build_device_irq() is used to encapsulate the plaform specific details when we build an irq. For now the default is a simple 1:1 but sun4d differs. This patch refactors functionality - but does not change the existing functionality. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32: introduce sparc_irq_configSam Ravnborg
sparc_irq_config is used to hold the platform specific irq setup. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32: fix build with leon or floppy enabledSam Ravnborg
Add a few includes back required to build with floppy enabled Fix declaration of trapbase_cpu* so it is now consistent Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc: convert to clocksource_register_hz/khzJohn Stultz
This converts the sparc clocksources to use clocksource_register_hz/khz Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: Sharpen address space randomization calculations.David S. Miller
A recent patch to the x86 randomization code caused me to take a quick look at what we do on sparc64, and in doing so I noticed that we sometimes calculate a non-page-aligned randomization value and stick it into mmap_base. I also noticed that since I copied the logic over from PowerPC, the powerpc code has tweaked the randomization ranges in ways that would benefit us as well. For one thing, we should allow up to at least 8MB of randomization otherwise huge-page regions when HPAGE_SIZE is 4MB never randomize at all. And on the 64-bit side we were using up to 4GB. Tone it down to 1GB as 4GB can result in a lot of address space wastage. Finally, make sure all computations are unsigned. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32: irq_32.c cleanupSam Ravnborg
- drop filename in file header - drop unused includes - add KERN_* to printk - fix spaces => tabs - add spaces after reserved words - drop all externs, they are now in header files Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32, sun4d: add comment in empty statement in sun4d_request_irq()Sam Ravnborg
This looked like a bug to me. Add a comment so next reader is hopefully less confused. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32,sun4d: drop unused code in sun4d_distribute_irqs()Sam Ravnborg
The preprocessor symbol was not defined and the code was therefore not in use. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32,sun4d: irq, smp files cleanupSam Ravnborg
- drop filename in file header - drop unused includes - add description of sun4d interrupts (from davem) - add KERN_* to printk - fix spaces => tabs - add spaces after reserved words - fix indent of a whole code block in smp4d_boot_one_cpu() Note: two printk() was updated from debug to KERN_INFO in this code block - drop all externs, they are now in header files This is partly based on a patch from: David Miller <davem@davemloft.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32,sun4m: irq, smp files cleanupSam Ravnborg
- drop filename in file header - drop unused includes - add description of sun4m interrupts (from davem) - add KERN_* to printk - fix spaces => tabs - add spaces after reserved words - drop all externs, they are now in header files This is partly based on a patch from: David Miller <davem@davemloft.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32,sun4c: irq file cleanupSam Ravnborg
- drop filename in header - drop unused includes - add description of sun4c interrupts (from davem) - add spaces after reserved words This is partly based on a patch from: David Miller <davem@davemloft.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32: add irq + smp declarations to headersSam Ravnborg
In preparation for cleaning up a number of files add declarations for irq and smp related data/functions to the relevant headers. This showed that the extern declaration of cputypval differed in the two files where it was used. As cputypval is defined like this: cputypval: .asciz "sun4c" the correct representation is a char array. Fix users to use the new declaration. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32: remove tick14.cSam Ravnborg
The two methods included in tick14.c was nop because the static variable linux_lvl14 was always NULL. So remove the file and callers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc32/leon: FPU-FSR only available when FPU presentDaniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16SPARC/LEON: power down instruction different of different LEONsDaniel Hellstrom
The way a LEON is powered down is implemented differently depending on CHIP type. The AMBA Plug&Play system ID tells revision of GRLIB and CHIP. This is for example needed by the GR-LEON4-ITX board and the UT699. Previously the power down support for LEON was limited to SMP, now both SMP and UP systems use the instruction. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: rename virt_irq => irq - IISam Ravnborg
The generic irq support uses the term 'irq' for the allocated irq number. Fix it so sparc64 use the same term for an irq as the generic irq support does. For a naive reader this is less confusing. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: rename virt_irq => irq - ISam Ravnborg
The generic irq support uses the term 'irq' for the allocated irq number. Fix it so sparc64 use the same term for an irq as the generic irq support does. For a naive reader this is less confusing. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: use up-to-data genirq functionsSam Ravnborg
Drop all uses of deprecated genirq features. The irq_set_affinity() call got a third paramter 'force' which is unused. For now genirq does not use this paramter and it is ignored by sparc. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Josip Rodin <joy@entuzijast.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: use {get,set}_irq_data for handler_dataSam Ravnborg
{get,set}_irq_data uses the member "handler_data" in irq_data which fits the naem of the datatype. The change has no functional impact Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: all pointers to irq_handler_data renamed to handler_dataSam Ravnborg
In preparation of moving to use irq_data.handler_data rename all pointers to irq_handler_data "handler_data". This will also prevent name clash when we introduce the new irq methods. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc: in handler_irq() rename irq parameter to pilSam Ravnborg
The generic irq support uses "irq" to identify the virtual irq number. To avoid confusion rename the argument to handler_irq() to pil to match the name of the parameter in the PCR register. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc64: fix direct access to irq_descSam Ravnborg
GENERIC_HARDIRQS_NO_DEPRECATED require us to access data via irq_data. No functional changes as data has same layout due to use of union Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc: Fix sbus_alloc_coherent error handling.Kristoffer Glembo
Order of kfree and free_pages were swapped in the error handling. Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc: Make mmu_inval_dma_area take void * instead of unsigned long to ↵Kristoffer Glembo
minimize casts. Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc/leon: Make mmu_inval_dma_area flush dcache for LEONs without snooping ↵Kristoffer Glembo
enabled. Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc/leon: Add LEON dma_ops.Kristoffer Glembo
This patch sets the dma_ops structure for LEON. It reuses the pci32_dma_ops. Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc: Add pci32_unmap_page.Kristoffer Glembo
Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16sparc: Replace open coded page alignment with PAGE_ALIGN macro.Kristoffer Glembo
Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-16Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits) tty: serial: altera_jtaguart: Add device tree support tty: serial: altera_uart: Add devicetree support dt: eliminate of_platform_driver shim code dt: Eliminate of_platform_{,un}register_driver dt/serial: Eliminate users of of_platform_{,un}register_driver dt/usb: Eliminate users of of_platform_{,un}register_driver dt/video: Eliminate users of of_platform_{,un}register_driver dt/net: Eliminate users of of_platform_{,un}register_driver dt/sound: Eliminate users of of_platform_{,un}register_driver dt/spi: Eliminate users of of_platform_{,un}register_driver dt: uartlite: merge platform and of_platform driver bindings dt: xilinx_hwicap: merge platform and of_platform driver bindings ipmi: convert OF driver to platform driver leds/leds-gpio: merge platform_driver with of_platform_driver dt/sparc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: move of_bus_type infrastructure to ibmebus drivercore/dt: add a match table pointer to struct device dt: Typo fix. altera_ps2: Add devicetree support ...
2011-03-16Merge branch 'for-2.6.39' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu, x86: Add arch-specific this_cpu_cmpxchg_double() support percpu: Generic support for this_cpu_cmpxchg_double() alpha: use L1_CACHE_BYTES for cacheline size in the linker script percpu: align percpu readmostly subsection to cacheline Fix up trivial conflict in arch/x86/kernel/vmlinux.lds.S due to the percpu alignment having changed ("x86: Reduce back the alignment of the per-CPU data section")
2011-03-15Merge branch 'timers-core-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (62 commits) posix-clocks: Check write permissions in posix syscalls hrtimer: Remove empty hrtimer_init_hres_timer() hrtimer: Update hrtimer->state documentation hrtimer: Update base[CLOCK_BOOTTIME].offset correctly timers: Export CLOCK_BOOTTIME via the posix timers interface timers: Add CLOCK_BOOTTIME hrtimer base time: Extend get_xtime_and_monotonic_offset() to also return sleep time: Introduce get_monotonic_boottime and ktime_get_boottime hrtimers: extend hrtimer base code to handle more then 2 clockids ntp: Remove redundant and incorrect parameter check mn10300: Switch do_timer() to xtimer_update() posix clocks: Introduce dynamic clocks posix-timers: Cleanup namespace posix-timers: Add support for fd based clocks x86: Add clock_adjtime for x86 posix-timers: Introduce a syscall for clock tuning. time: Splitout compat timex accessors ntp: Add ADJ_SETOFFSET mode bit time: Introduce timekeeping_inject_offset posix-timer: Update comment ... Fix up new system-call-related conflicts in arch/x86/ia32/ia32entry.S arch/x86/include/asm/unistd_32.h arch/x86/include/asm/unistd_64.h arch/x86/kernel/syscall_table_32.S (name_to_handle_at()/open_by_handle_at() vs clock_adjtime()), and some due to movement of get_jiffies_64() in: kernel/time.c
2011-02-28dt/sparc: Eliminate users of of_platform_{,un}register_driverGrant Likely
Get rid of old users of of_platform_driver in arch/sparc. Most of_platform_driver users can be converted to use the platform_bus directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>