aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc
AgeCommit message (Collapse)AuthorFilesLines
2010-10-12of/promtree: add of_pdt namespace to pdt codeAndres Salomon1-1/+1
For symbols still lacking namespace qualifiers, add an of_pdt_ prefix. Signed-off-by: Andres Salomon <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-10-12of/promtree: no longer call prom_ functions directly; use an ops structureAndres Salomon1-1/+35
Rather than assuming an architecture defines prom_getchild and friends, define an ops struct with hooks for the various prom functions that pdt.c needs. This ops struct is filled in by the arch-(and sometimes firmware-)specific code, and passed to of_pdt_build_devicetree. Update sparc code to define the ops struct as well. Signed-off-by: Andres Salomon <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-10-12memblock, bootmem: Round pfn properly for memory and reserved regionsYinghai Lu1-2/+2
We need to round memory regions correctly -- specifically, we need to round reserved region in the more expansive direction (lower limit down, upper limit up) whereas usable memory regions need to be rounded in the more restrictive direction (lower limit up, upper limit down). This introduces two set of inlines: memblock_region_memory_base_pfn() memblock_region_memory_end_pfn() memblock_region_reserved_base_pfn() memblock_region_reserved_end_pfn() Although they are antisymmetric (and therefore are technically duplicates) the use of the different inlines explicitly documents the programmer's intention. The lack of proper rounding caused a bug on ARM, which was then found to also affect other architectures. Reported-by: Russell King <[email protected]> Signed-off-by: Yinghai Lu <[email protected]> LKML-Reference: <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2010-10-12pci: Convert msi to new irq_chip functionsThomas Gleixner1-4/+4
Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Acked-by: Jesse Barnes <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Tony Luck <[email protected]> Cc: Russell King <[email protected]>
2010-10-12Merge branch 'kbuild/rc-fixes' into kbuild/kconfigMichal Marek52-3264/+232
We need to revert the temporary hack in 71ebc01, hence the merge.
2010-10-10of/promtree: make drivers/of/pdt.c no longer sparc-onlyAndres Salomon4-9/+13
Clean up pdt.c: - make build dependent upon config OF_PROMTREE - #ifdef out the sparc-specific stuff - create pdt-specific header Signed-off-by: Andres Salomon <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-10-09sparc: break out some PROM device-tree building code out into drivers/ofAndres Salomon1-189/+1
Transitioning into making this useful for architectures other than sparc. This is a verbatim copy of all functions/variables that've been moved. Signed-off-by: Andres Salomon <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-10-09of/sparc: convert various prom_* functions to use phandleAndres Salomon21-142/+154
Rather than passing around ints everywhere, use the phandle type where appropriate for the various functions that talk to the PROM. Signed-off-by: Andres Salomon <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-10-08sparc: stop exporting openprom.h headerAndres Salomon1-1/+0
It's unknown why openprom.h was being exported; there doesn't seem to be any reason for it currently, and it creates headaches with userspace being able to potentially use the structures in there. So, don't export it anymore. Signed-off-by: Andres Salomon <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-10-08Merge commit 'v2.6.36-rc7' into core/memblockIngo Molnar8-111/+173
Merge reason: Update from -rc3 to -rc7. Signed-off-by: Ingo Molnar <[email protected]>
2010-10-07Fix IRQ flag handling namingDavid Howells4-42/+37
Fix the IRQ flag handling naming. In linux/irqflags.h under one configuration, it maps: local_irq_enable() -> raw_local_irq_enable() local_irq_disable() -> raw_local_irq_disable() local_irq_save() -> raw_local_irq_save() ... and under the other configuration, it maps: raw_local_irq_enable() -> local_irq_enable() raw_local_irq_disable() -> local_irq_disable() raw_local_irq_save() -> local_irq_save() ... This is quite confusing. There should be one set of names expected of the arch, and this should be wrapped to give another set of names that are expected by users of this facility. Change this to have the arch provide: flags = arch_local_save_flags() flags = arch_local_irq_save() arch_local_irq_restore(flags) arch_local_irq_disable() arch_local_irq_enable() arch_irqs_disabled_flags(flags) arch_irqs_disabled() arch_safe_halt() Then linux/irqflags.h wraps these to provide: raw_local_save_flags(flags) raw_local_irq_save(flags) raw_local_irq_restore(flags) raw_local_irq_disable() raw_local_irq_enable() raw_irqs_disabled_flags(flags) raw_irqs_disabled() raw_safe_halt() with type checking on the flags 'arguments', and then wraps those to provide: local_save_flags(flags) local_irq_save(flags) local_irq_restore(flags) local_irq_disable() local_irq_enable() irqs_disabled_flags(flags) irqs_disabled() safe_halt() with tracing included if enabled. The arch functions can now all be inline functions rather than some of them having to be macros. Signed-off-by: David Howells <[email protected]> [X86, FRV, MN10300] Signed-off-by: Chris Metcalf <[email protected]> [Tile] Signed-off-by: Michal Simek <[email protected]> [Microblaze] Tested-by: Catalin Marinas <[email protected]> [ARM] Acked-by: Thomas Gleixner <[email protected]> Acked-by: Haavard Skinnemoen <[email protected]> [AVR] Acked-by: Tony Luck <[email protected]> [IA-64] Acked-by: Hirokazu Takata <[email protected]> [M32R] Acked-by: Greg Ungerer <[email protected]> [M68K/M68KNOMMU] Acked-by: Ralf Baechle <[email protected]> [MIPS] Acked-by: Kyle McMartin <[email protected]> [PA-RISC] Acked-by: Paul Mackerras <[email protected]> [PowerPC] Acked-by: Martin Schwidefsky <[email protected]> [S390] Acked-by: Chen Liqin <[email protected]> [Score] Acked-by: Matt Fleming <[email protected]> [SH] Acked-by: David S. Miller <[email protected]> [Sparc] Acked-by: Chris Zankel <[email protected]> [Xtensa] Reviewed-by: Richard Henderson <[email protected]> [Alpha] Reviewed-by: Yoshinori Sato <[email protected]> [H8300] Cc: [email protected] [CRIS] Cc: [email protected] [CRIS] Cc: [email protected]
2010-09-24Merge branch 'tip/perf/core' of ↵Ingo Molnar5-0/+88
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
2010-09-23Merge branch 'linus' into perf/coreIngo Molnar4-104/+172
Conflicts: arch/sparc/kernel/perf_event.c Merge reason: Resolve the conflict. Signed-off-by: Ingo Molnar <[email protected]>
2010-09-22jump label/x86/sparc64: Remove !CC_OPTIMIZE_FOR_SIZE config conditionsSteven Rostedt1-1/+1
The !CC_OPTIMIZE_FOR_SIZE was added to enable the jump label functionality because Jason noticed that the gcc option would not optimize the labels and may even hurt performance. But this is a gcc problem not a kernel one. Removing this condition should add motivation to the gcc developers to actually fix it. Cc: Jason Baron <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-09-22jump label: Add sparc64 supportDavid S. Miller5-0/+88
Add jump label support for sparc64. Signed-off-by: David S. Miller <[email protected]> LKML-Reference: <3b5b071fcdb2afb7f67cacecfa78b14c740278a7.1284733808.git.jbaron@redhat.com> Signed-off-by: Jason Baron <[email protected]> [ cleaned up some formatting ] Signed-off-by: Steven Rostedt <[email protected]>
2010-09-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds4-104/+171
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc: Prevent no-handler signal syscall restart recursion. sparc: Don't mask signal when we can't setup signal frame. sparc64: Fix race in signal instruction flushing. sparc64: Support RAW perf events.
2010-09-21sparc: Prevent no-handler signal syscall restart recursion.David S. Miller3-1/+7
Explicitly clear the "in-syscall" bit when we have no signal handler and back up the program counters to back up the system call. Reported-by: Al Viro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-09-21sparc: Don't mask signal when we can't setup signal frame.David S. Miller3-58/+93
Don't invoke the signal handler tracehook in that situation either. Reported-by: Al Viro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-09-21Merge commit 'v2.6.36-rc5' into perf/coreIngo Molnar1-1/+1
Merge reason: Pick up the latest fixes in -rc5. Signed-off-by: Ingo Molnar <[email protected]>
2010-09-20sparc64: Fix race in signal instruction flushing.David S. Miller1-42/+60
If another cpu does a very wide munmap() on the signal frame area, it can tear down the page table hierarchy from underneath us. Borrow an idea from the 64-bit fault path's get_user_insn(), and disable cross call interrupts during the page table traversal to lock them in place while we operate. Reported-by: Al Viro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-09-19kbuild: migrate all arch to the kconfig mainmenu upgradeArnaud Lacombe1-6/+0
Signed-off-by: Arnaud Lacombe <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Michal Marek <[email protected]>
2010-09-15Merge branch 'tip/perf/core' of ↵Ingo Molnar4-7/+2
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
2010-09-14compat: Make compat_alloc_user_space() incorporate the access_ok()H. Peter Anvin1-1/+1
compat_alloc_user_space() expects the caller to independently call access_ok() to verify the returned area. A missing call could introduce problems on some architectures. This patch incorporates the access_ok() check into compat_alloc_user_space() and also adds a sanity check on the length. The existing compat_alloc_user_space() implementations are renamed arch_compat_alloc_user_space() and are used as part of the implementation of the new global function. This patch assumes NULL will cause __get_user()/__put_user() to either fail or access userspace on all architectures. This should be followed by checking the return value of compat_access_user_space() for NULL in the callers, at which time the access_ok() in the callers can also be removed. Reported-by: Ben Hawkes <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Chris Metcalf <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Ingo Molnar <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Tony Luck <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Helge Deller <[email protected]> Cc: James Bottomley <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: <[email protected]>
2010-09-12sparc64: Support RAW perf events.David S. Miller1-3/+11
Encoding is "(encoding << 16) | pic_mask" Signed-off-by: David S. Miller <[email protected]>
2010-09-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds3-6/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc: Kill all BKL usage.
2010-09-09perf: Remove the sysfs bitsPeter Zijlstra1-6/+3
Neither the overcommit nor the reservation sysfs parameter were actually working, remove them as they'll only get in the way. Signed-off-by: Peter Zijlstra <[email protected]> Cc: paulus <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2010-09-09perf: Rework the PMU methodsPeter Zijlstra1-42/+67
Replace pmu::{enable,disable,start,stop,unthrottle} with pmu::{add,del,start,stop}, all of which take a flags argument. The new interface extends the capability to stop a counter while keeping it scheduled on the PMU. We replace the throttled state with the generic stopped state. This also allows us to efficiently stop/start counters over certain code paths (like IRQ handlers). It also allows scheduling a counter without it starting, allowing for a generic frozen state (useful for rotating stopped counters). The stopped state is implemented in two different ways, depending on how the architecture implemented the throttled state: 1) We disable the counter: a) the pmu has per-counter enable bits, we flip that b) we program a NOP event, preserving the counter state 2) We store the counter state and ignore all read/overflow events Signed-off-by: Peter Zijlstra <[email protected]> Cc: paulus <[email protected]> Cc: stephane eranian <[email protected]> Cc: Robert Richter <[email protected]> Cc: Will Deacon <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Lin Ming <[email protected]> Cc: Yanmin <[email protected]> Cc: Deng-Cheng Zhu <[email protected]> Cc: David Miller <[email protected]> Cc: Michael Cree <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2010-09-09perf: Per PMU disablePeter Zijlstra1-9/+11
Changes perf_disable() into perf_pmu_disable(). Signed-off-by: Peter Zijlstra <[email protected]> Cc: paulus <[email protected]> Cc: stephane eranian <[email protected]> Cc: Robert Richter <[email protected]> Cc: Will Deacon <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Lin Ming <[email protected]> Cc: Yanmin <[email protected]> Cc: Deng-Cheng Zhu <[email protected]> Cc: David Miller <[email protected]> Cc: Michael Cree <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2010-09-09perf: Reduce perf_disable() usagePeter Zijlstra1-0/+3
Since the current perf_disable() usage is only an optimization, remove it for now. This eases the removal of the __weak hw_perf_enable() interface. Signed-off-by: Peter Zijlstra <[email protected]> Cc: paulus <[email protected]> Cc: stephane eranian <[email protected]> Cc: Robert Richter <[email protected]> Cc: Will Deacon <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Lin Ming <[email protected]> Cc: Yanmin <[email protected]> Cc: Deng-Cheng Zhu <[email protected]> Cc: David Miller <[email protected]> Cc: Michael Cree <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2010-09-09perf: Register PMU implementationsPeter Zijlstra1-13/+16
Simple registration interface for struct pmu, this provides the infrastructure for removing all the weak functions. Signed-off-by: Peter Zijlstra <[email protected]> Cc: paulus <[email protected]> Cc: stephane eranian <[email protected]> Cc: Robert Richter <[email protected]> Cc: Will Deacon <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Lin Ming <[email protected]> Cc: Yanmin <[email protected]> Cc: Deng-Cheng Zhu <[email protected]> Cc: David Miller <[email protected]> Cc: Michael Cree <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2010-09-09perf: Deconstify struct pmuPeter Zijlstra1-5/+5
sed -ie 's/const struct pmu\>/struct pmu/g' `git grep -l "const struct pmu\>"` Signed-off-by: Peter Zijlstra <[email protected]> Cc: paulus <[email protected]> Cc: stephane eranian <[email protected]> Cc: Robert Richter <[email protected]> Cc: Will Deacon <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Lin Ming <[email protected]> Cc: Yanmin <[email protected]> Cc: Deng-Cheng Zhu <[email protected]> Cc: David Miller <[email protected]> Cc: Michael Cree <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2010-09-08sparc: Kill all BKL usage.David S. Miller3-6/+1
They were all bogus artifacts and completely unnecessary. Signed-off-by: David S. Miller <[email protected]>
2010-08-31Merge commit 'v2.6.36-rc3' into x86/memblockIngo Molnar77-3799/+864
Conflicts: arch/x86/kernel/trampoline.c mm/memblock.c Merge reason: Resolve the conflicts, update to latest upstream. Signed-off-by: Ingo Molnar <[email protected]>
2010-08-28Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: pxa27x_keypad - remove input_free_device() in pxa27x_keypad_remove() Input: mousedev - fix regression of inverting axes Input: uinput - add devname alias to allow module on-demand load Input: hil_kbd - fix compile error USB: drop tty argument from usb_serial_handle_sysrq_char() Input: sysrq - drop tty argument form handle_sysrq() Input: sysrq - drop tty argument from sysrq ops handlers
2010-08-25Merge branch 'linus' into perf/coreIngo Molnar25-534/+631
Merge reason: pick up perf fixes Signed-off-by: Ingo Molnar <[email protected]>
2010-08-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds16-523/+595
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Get rid of indirect p1275 PROM call buffer. sparc64: Fill a missing delay slot. sparc64: Make lock backoff really a NOP on UP builds. sparc64: simple microoptimizations for atomic functions sparc64: Make rwsems 64-bit. sparc64: Really fix atomic64_t interface types.
2010-08-23sparc64: Get rid of indirect p1275 PROM call buffer.David S. Miller7-297/+456
This is based upon a report by Meelis Roos showing that it's possible that we'll try to fetch a property that is 32K in size with some devices. With the current fixed 3K buffer we use for moving data in and out of the firmware during PROM calls, that simply won't work. In fact, it will scramble random kernel data during bootup. The reasoning behind the temporary buffer is entirely historical. It used to be the case that we had problems referencing dynamic kernel memory (including the stack) early in the boot process before we explicitly told the firwmare to switch us over to the kernel trap table. So what we did was always give the firmware buffers that were locked into the main kernel image. But we no longer have problems like that, so get rid of all of this indirect bounce buffering. Besides fixing Meelis's bug, this also makes the kernel data about 3K smaller. It was also discovered during these conversions that the implementation of prom_retain() was completely wrong, so that was fixed here as well. Currently that interface is not in use. Reported-by: Meelis Roos <[email protected]> Tested-by: Meelis Roos <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-08-19Input: sysrq - drop tty argument from sysrq ops handlersDmitry Torokhov1-1/+1
Noone is using tty argument so let's get rid of it. Acked-by: Alan Cox <[email protected]> Acked-by: Jason Wessel <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-08-19sparc64: Fill a missing delay slot.Mikulas Patocka1-0/+1
If the code were already aligned to 64 bytes, wr instruction would be executed twice --- once in delay slot and once in the jump target. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-08-19Merge branch 'tip/perf/urgent' of ↵Ingo Molnar50-3257/+215
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
2010-08-18sparc64: Make lock backoff really a NOP on UP builds.David S. Miller3-17/+22
As noticed by Mikulas Patocka, the backoff macros don't completely nop out for UP builds, we still get a branch always and a delay slot nop. Fix this by making the branch to the backoff spin loop selective, then we can nop out the spin loop completely. Signed-off-by: David S. Miller <[email protected]>
2010-08-18sparc64: simple microoptimizations for atomic functionsMikulas Patocka1-12/+8
Simple microoptimizations for sparc64 atomic functions: Save one instruction by using a delay slot. Use %g1 instead of %g7, because %g1 is written earlier. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-08-19perf: Factorize callchain context handlingFrederic Weisbecker1-3/+0
Store the kernel and user contexts from the generic layer instead of archs, this gathers some repetitive code. Signed-off-by: Frederic Weisbecker <[email protected]> Acked-by: Paul Mackerras <[email protected]> Tested-by: Will Deacon <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: David Miller <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Borislav Petkov <[email protected]>
2010-08-19perf: Generalize some arch callchain codeFrederic Weisbecker1-31/+15
- Most archs use one callchain buffer per cpu, except x86 that needs to deal with NMIs. Provide a default perf_callchain_buffer() implementation that x86 overrides. - Centralize all the kernel/user regs handling and invoke new arch handlers from there: perf_callchain_user() / perf_callchain_kernel() That avoid all the user_mode(), current->mm checks and so... - Invert some parameters in perf_callchain_*() helpers: entry to the left, regs to the right, following the traditional (dst, src). Signed-off-by: Frederic Weisbecker <[email protected]> Acked-by: Paul Mackerras <[email protected]> Tested-by: Will Deacon <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: David Miller <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Borislav Petkov <[email protected]>
2010-08-19perf: Generalize callchain_store()Frederic Weisbecker1-16/+10
callchain_store() is the same on every archs, inline it in perf_event.h and rename it to perf_callchain_store() to avoid any collision. This removes repetitive code. Signed-off-by: Frederic Weisbecker <[email protected]> Acked-by: Paul Mackerras <[email protected]> Tested-by: Will Deacon <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: David Miller <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Borislav Petkov <[email protected]>
2010-08-17sparc64: Make rwsems 64-bit.David S. Miller4-193/+104
Basically tip-off the powerpc code, use a 64-bit type and atomic64_t interfaces for the implementation. This gets us off of the by-hand asm code I wrote, which frankly I think probably ruins I-cache hit rates. The idea was the keep the call chains less deep, but anything taking the rw-semaphores probably is also calling other stuff and therefore already has allocated a stack-frame. So no real stack frame savings ever. Ben H. has posted patches to make powerpc use 64-bit too and with some abstractions we can probably use a shared header file somewhere. With suggestions from Sam Ravnborg. Signed-off-by: David S. Miller <[email protected]>
2010-08-17sparc64: Really fix atomic64_t interface types.David S. Miller1-4/+4
Linus noticed that some of the interface arguments didn't get "int" --> "long" conversion, as needed. Signed-off-by: David S. Miller <[email protected]>
2010-08-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds7-8/+27
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Fix atomic64_t routine return values. sparc64: Fix rwsem constant bug leading to hangs. sparc: Hook up new fanotify and prlimit64 syscalls. sparc: Really fix "console=" for serial consoles.
2010-08-17Make do_execve() take a const filename pointerDavid Howells4-6/+12
Make do_execve() take a const filename pointer so that kernel_execve() compiles correctly on ARM: arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type This also requires the argv and envp arguments to be consted twice, once for the pointer array and once for the strings the array points to. This is because do_execve() passes a pointer to the filename (now const) to copy_strings_kernel(). A simpler alternative would be to cast the filename pointer in do_execve() when it's passed to copy_strings_kernel(). do_execve() may not change any of the strings it is passed as part of the argv or envp lists as they are some of them in .rodata, so marking these strings as const should be fine. Further kernel_execve() and sys_execve() need to be changed to match. This has been test built on x86_64, frv, arm and mips. Signed-off-by: David Howells <[email protected]> Tested-by: Ralf Baechle <[email protected]> Acked-by: Russell King <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-17sparc64: Fix atomic64_t routine return values.David S. Miller1-3/+3
Should return 'long' instead of 'int'. Thanks to Dimitris Michailidis and Tony Luck. Signed-off-by: David S. Miller <[email protected]>