summaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel
AgeCommit message (Collapse)Author
2008-04-10[SPARC]: Fix several regset and ptrace bugs.David S. Miller
1) ptrace should pass 'current' to task_user_regset_view() 2) When fetching general registers using a 64-bit view, and the target is 32-bit, we have to convert. 3) Skip the whole register window get/set code block if the user isn't asking to access anything in there. Otherwise we have problems if the user doesn't have an address space setup. Fetching ptrace register is still valid at such a time, and ptrace does not try to access the register window area of the regset. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-03[SPARC64]: Fix user accesses in regset code.David S. Miller
If target is not current we need to use access_process_vm(). Noticed by Roland McGrath. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-03[SPARC64]: Fix FPU saving in 64-bit signal handling.David S. Miller
The calculation of the FPU reg save area pointer was wrong. Based upon an OOPS report from Tom Callaway. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-28sparc64: remove unused calc_npages() in iommu_common.hFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-28sparc64: add the segment boundary checking to IOMMUs while merging SG entriesFUJITA Tomonori
Some IOMMUs allocate memory areas spanning LLD's segment boundary limit. It forces low level drivers to have a workaround to adjust scatter lists that the IOMMU builds. We are in the process of making all the IOMMUs respect the segment boundary limits to remove such work around in LLDs. SPARC64 IOMMUs were rewritten to use the IOMMU helper functions and the commit 89c94f2f70d093f59b55d3ea8042d13889169346 made the IOMMUs not allocate memory areas spanning the segment boundary limit. However, SPARC64 IOMMUs allocate memory areas first then try to merge them (while some IOMMUs walk through all the sg entries to see how they can be merged first and allocate memory areas). So SPARC64 IOMMUs also need the boundary limit checking when they try to merge sg entries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Define TASK_SIZE_OF() [SPARC64]: flush_ptrace_access() needs preemption disable. [SPARC64]: Update defconfig. [SPARC64]: Fix allnoconfig build, ptrace.c missing CONFIG_COMPAT checks. [SPARC64]: Fix __get_cpu_var in preemption-enabled area. [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/signal.c [SPARC64]: Fix most sparse warnings in arch/sparc64/kernel/sys_sparc.c [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/time.c [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/ptrace.c [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/irq.c [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/iommu.c [SPARC64]: Fix sparse errors in arch/sparc64/kernel/traps.c [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/{cpu,setup}.c [SPARC64]: Adjust {TLBTEMP,TSBMAP}_BASE. [SPARC64]: Make save_stack_trace() more efficient.
2008-03-26[SPARC64]: flush_ptrace_access() needs preemption disable.David S. Miller
Based upon a report by Mariusz Kozlowski. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix allnoconfig build, ptrace.c missing CONFIG_COMPAT checks.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/signal.cDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix most sparse warnings in arch/sparc64/kernel/sys_sparc.cDavid S. Miller
Sparse still doesn't like the funny cast we make from a scalar to a "union semun" (which is correct by the C language and in particular works with the sparc64 calling conventions, but sparse doesn't grok that yet). Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/time.cDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/ptrace.cDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/irq.cDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/iommu.cDavid S. Miller
Fix local variable shadowing in dma_4u_map_sg(). Mark sun4u_dma_ops static. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse errors in arch/sparc64/kernel/traps.cDavid S. Miller
Add 'UL' markers to DCU_* macros. Declare C functions called from assembler in entry.h Declare C functions called from within the sparc64 arch code in include/asm-sparc64/*.h headers as appropriate. Remove unused routines in traps.c Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-26[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/{cpu,setup}.cDavid S. Miller
We create a local header file entry.h, under arch/sparc64/kernel/, that we can use to declare routines either defined in assembler or only invoked from assembler. As well as other data objects which are private to the inner sparc64 kernel arch code. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-25[SPARC64]: Make save_stack_trace() more efficient.David S. Miller
Doing a 'flushw' every stack trace capture creates so much overhead that it makes lockdep next to unusable. We only care about the frame pointer chain and the function caller program counters, so flush those by hand to the stack frame. This is significantly more efficient than a 'flushw' because: 1) We only save 16 bytes per active register window to the stack. 2) This doesn't push the entire register window context of the current call chain out of the cpu, forcing register window fill traps as we return back down. Note that we can't use 'restore' and 'save' instructions to move around the register windows because that wouldn't work on Niagara processors. They optimize 'save' into a new register window by simply clearing out the registers instead of pulling them in from the on-chip register window backing store. Based upon a report by Tom Callaway. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: exec PT_DTRACE [SPARC64]: Use shorter list_splice_init() for brevity. [SPARC64]: Remove most limitations to kernel image size.
2008-03-24[SPARC64]: exec PT_DTRACERoland McGrath
The PT_DTRACE flag is meaningless and obsolete. Don't touch it. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-24[SPARC64]: Use shorter list_splice_init() for brevity.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-22[SPARC64]: Remove most limitations to kernel image size.David S. Miller
Currently kernel images are limited to 8MB in size, and this causes problems especially when enabling features that take up a lot of kernel image space such as lockdep. The code now will align the kernel image size up to 4MB and map that many locked TLB entries. So, the only practical limitation is the number of available locked TLB entries which is 16 on Cheetah and 64 on pre-Cheetah sparc64 cpus. Niagara cpus don't actually have hw locked TLB entry support. Rather, the hypervisor transparently provides support for "locked" TLB entries since it runs with physical addressing and does the initial TLB miss processing. Fully utilizing this change requires some help from SILO, a patch for which will be submitted to the maintainer. Essentially, SILO will only currently map up to 8MB for the kernel image and that needs to be increased. Note that neither this patch nor the SILO bits will help with network booting. The openfirmware code will only map up to a certain amount of kernel image during a network boot and there isn't much we can to about that other than to implemented a layered network booting facility. Solaris has this, and calls it "wanboot" and we may implement something similar at some point. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-18Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2008-03-18[NET] endianness noise: INADDR_ANYAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-29[SPARC]: Add reboot_command[] extern decl to asm/system.hDavid S. Miller
Kill off some sparse warnings. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-29[SPARC]: Mark linux_sparc_{fpu,chips} static.David S. Miller
Caught by sparse. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-25[SPARC64]: Fix section mismatchs from dr_cpu_dataSam Ravnborg
Fix following warnings: WARNING: vmlinux.o(.text+0x4b258): Section mismatch in reference from the function dr_cpu_data() to the function .devinit.text:mdesc_fill_in_cpu_data() WARNING: vmlinux.o(.text+0x4b290): Section mismatch in reference from the function dr_cpu_data() to the function .cpuinit.text:cpu_up() mdesc_fill_in_cpu_data() is only used during early init and for cpu hotplug so the __cpuinit annotation is the correct choice. We have the call chain: dr_cpu_data() => dr_cpu_configure() => mdesc_fill_in_cpu_data() dr_cpu_data() is used only during early init and for cpu hotplug. So annotating them all __cpuinit solves the section mismatch and should be correct. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-21[SPARC64]: make IOMMU code respect the segment boundary limitsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-21[SPARC64]: Fix cpu trampoline et al. mismatch warnings.Sam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20[SPARC64]: More sparse warning fixes in process.cDavid S. Miller
arch/sparc64/kernel/process.c:504:17: warning: symbol 'sparc_do_fork' was not declared. Should it be static? arch/sparc64/kernel/process.c:655:5: warning: symbol 'dump_fpu' was not declared. Should it be static? arch/sparc64/kernel/process.c:708:16: warning: symbol 'sparc_execve' was not declared. Should it be static? Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20[SPARC64]: Kill show_regs32().David S. Miller
Unused, noticed via sparse. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20[SPARC64]: Fix sparse warnings wrt. __show_regs().David S. Miller
arch/sparc64/kernel/process.c:219:6: warning: symbol '__show_regs' was not declared. Should it be static? Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20[SPARC64]: Kill show_stackframe{,32}().David S. Miller
Noticed via sparse: arch/sparc64/kernel/process.c:215:6: warning: symbol 'show_stackframe' was not declared. Should it be static? arch/sparc64/kernel/process.c:243:6: warning: symbol 'show_stackframe32' was not declared. Should it be static? It is totally unused. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20[SPARC64]: Fix sparse warnings wrt. machine_alt_power_off().David S. Miller
arch/sparc64/kernel/process.c:123:6: warning: symbol 'machine_alt_power_off' was not declared. Should it be static? Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-19[SPARC64]: Kill pcic_present().David S. Miller
And also it's helper function pci_is_controller(). Both are unused. I can't remove the equivalent from sparc32 yet as some ancient bus probing code still uses that platform's version. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18[SPARC]: Kill 'prom_palette'.David S. Miller
The idea of this thing is we could save/restore the firmware's palette when breaking in and out of the firmware prompt. Only one driver implemented this (atyfb) and it's value is questionable. If you're just debugging you don't really care that the characters end up being purple or whatever. And we can provide better debugging and firmware command facilities with minimal in-kernel console I/O drivers. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18[SPARC64]: Kill 'prom_keyboard'.David S. Miller
Nothing ever sets it, so it just takes up space. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18[SPARC]: Kill extern decl of 'panic_setup'.David S. Miller
This was made static in kernel/panic.c a long time ago. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18[SPARC64]: Delete 'boot_flags'.David S. Miller
It is write-only, nothing tests it's value. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18[SPARC64]: Kill unused function 'kernel_enter_debugger'.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18[SPARC64] arch/sparc64/kernel/unaligned.c: Use time_* macrosS.Çağlar Onur
The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. So following patch implements usage of the time_after() macro, defined at linux/jiffies.h, which deals with wrapping correctly Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18[SPARC64]: Always register a PROM based early console.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-13[SPARC64]: Use shorter "get_zeroed_page" call.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC]: Remove of_platform_device_createStephen Rothwell
There are no callers of this on the Sparc platforms. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC64]: Add kretprobe support.David S. Miller
Passes the smoke tests at least, powerpc implementation was used as a guide. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC64]: Add SG merging support back into IOMMU code.David S. Miller
Mimicks almost perfectly the powerpc IOMMU code, except that it doesn't have the IOMMU_PAGE_SIZE != PAGE_SIZE handling, and it also lacks the device dma mask support bits. I'll add that later as time permits, but this gets us at least back to where we were beforehand. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC64]: IOMMU allocations using iommu-helper layer.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC64]: iommu_common.h tidy ups...David S. Miller
Add missing multiple-include guards and update copyright. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09[SPARC64]: Remove unused declarations from iommu_common.hDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Make use of the new fs/compat_binfmt_elf.c [SPARC64]: Make use of compat_sys_ptrace() Manually fixed trivial delete/modift conflict in arch/sparc64/kernel/binfmt_elf32.c
2008-02-08misc: removal of final callers using fastcallHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>