aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc
AgeCommit message (Collapse)AuthorFilesLines
2011-01-04sparc: additional comments to piggyback_32.cSam Ravnborg1-2/+21
While reverse engineering the functionality of piggyback I missed that the code was actually commented. So I added a few comments. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04sparc: use _start for the start entry (like 64 bit does)Sam Ravnborg3-10/+7
We use "_start" in 64 bit - do the same in 32 bit. It is always good to be consistent. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04sparc: use trapbase in setup_archSam Ravnborg1-2/+1
start and trapbase point to the same address. But using start to assing to sparc_ttable looked confusing. Replace this with the use of trapbase. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04sparc: refactor piggy_32.cSam Ravnborg1-40/+102
Refactoring to increase readability (a little). - sort includes - spaces around operators - small helpers introduced - added a few comments Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04SPARC/LEON: avoid AMBAPP name duplicates in openprom fs when REG is missingDaniel Hellstrom1-8/+19
When the REG property is not available the NODE-ID is used as an unique identifier in order to avoid filesystem name duplicates in /proc/openprom filesystem Signed-off-by: Daniel Hellstrom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04SPARC/LEON: added support for selecting Timer Core and Timer within coreDaniel Hellstrom1-26/+54
The ability to select Timer Core and Timer instance for system clock makes it possible for multiple AMP systems to coexist. Signed-off-by: Daniel Hellstrom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04LEON: added raw AMBA vendor/device number to find TIMER, IRQCTRLDaniel Hellstrom1-4/+10
Signed-off-by: Daniel Hellstrom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04SPARC/LEON: added support for IRQAMP IRQ ControllerDaniel Hellstrom3-3/+29
Needed for LEON AMP systems where different CPUs are routed to different IRQ controllers. This patch selects the IRQ Controller which has been routed to the boot CPU, it is up to the boot loader to configure the IRQ controller. Signed-off-by: Daniel Hellstrom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-04SPARC/LEON: find IRQCTRL and Timer via OF-Tree, instead of hardcoded.Daniel Hellstrom1-6/+38
Signed-off-by: Daniel Hellstrom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-03sparc: explicitly cast negative phandle checks to s32Andres Salomon6-23/+24
When we switched sparc from using 'int's to 'phandle's (which is a u32), we neglected to do anything with the various checks for -1. For those tests, explicitly cast the phandles to s32. Signed-off-by: Andres Salomon <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-01-03sparc: fix sparse warnings in arch/sparc/prom for 32 bit buildSam Ravnborg5-8/+15
Fix following sparse warnings: arch/sparc/prom/bootstr_32.c:32:35: warning: Using plain integer as NULL pointer arch/sparc/prom/memory.c:61:13: warning: symbol 'prom_meminit' was not declared. Should it be static? arch/sparc/prom/misc_32.c:74:1: error: symbol 'prom_halt' redeclared with different type (originally declared at arch/sparc/include/asm/oplib_32.h:67) - different modifiers arch/sparc/prom/ranges.c:16:26: warning: symbol 'promlib_obio_ranges' was not declared. Should it be static? arch/sparc/prom/ranges.c:17:5: warning: symbol 'num_obio_ranges' was not declared. Should it be static? arch/sparc/prom/ranges.c:39:1: warning: symbol 'prom_adjust_ranges' was not declared. Should it be static? arch/sparc/prom/ranges.c:69:13: warning: symbol 'prom_ranges_init' was not declared. Should it be static? arch/sparc/prom/tree_32.c:286:22: warning: Using plain integer as NULL pointer arch/sparc/prom/tree_32.c:286:38: warning: Using plain integer as NULL pointer None of the warnings indicated any serious issues. We are now sparse clean for 32 bit build in arch/sparc/prom. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-02sparc: remove unused prom tree functionsSam Ravnborg2-52/+3
Remove the following unused funtions: prom_nodematch() prom_firstprop() prom_node_has_property() Also declare a few local functions static. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-02sparc: remove unused prom cpu functionsSam Ravnborg2-87/+0
Remove the following unused funtions: prom_stopcpu() prom_idlecpu() prom_restartcpu() Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-02sparc: drop prom/palloc.cSam Ravnborg3-54/+0
None of the functions was used. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-02sparc: drop prom/devmap.cSam Ravnborg3-66/+0
None of the functions was used. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-12-22Merge branch 'master' into for-nextJiri Kosina18-414/+64
Conflicts: MAINTAINERS arch/arm/mach-omap2/pm24xx.c drivers/scsi/bfa/bfa_fcpim.c Needed to update to apply fixes for which the old branch was too outdated.
2010-12-22Merge commit 'v2.6.37-rc7' into perf/coreIngo Molnar13-409/+64
Merge reason: Pick up the latest -rc. Signed-off-by: Ingo Molnar <[email protected]>
2010-12-16TTY: Add tty ioctl to figure device node of the system console.Werner Fink1-0/+1
This has been in the SuSE kernels for a very long time. Signed-off-by: Werner Fink <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-12-16perf: Dynamic pmu typesPeter Zijlstra1-1/+1
Extend the perf_pmu_register() interface to allow for named and dynamic pmu types. Because we need to support the existing static types we cannot use dynamic types for everything, hence provide a type argument. If we want to enumerate the PMUs they need a name, provide one. Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-12-14Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds13-409/+64
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc: Write to prom console using indirect buffer. sparc: Delete prom_*getchar(). sparc: Pass buffer pointer all the way down to prom_{get,put}char(). sparc: Do not export prom_nb{get,put}char(). sparc64: Delete prom_setcallback(). sparc64: Unexport prom_service_exists(). sparc: Kill prom devops_{32,64}.c sparc: Remove prom_pathtoinode() sparc64: Delete prom_puts() unused. SPARC/LEON: removed constant timer initialization as if HZ=100, now it reflects the value of HZ
2010-12-12sparc: Eliminate prom_stdin.David S. Miller3-6/+3
Completely unused. Based upon a patch by Julian Calaby. Signed-off-by: David S. Miller <[email protected]>
2010-12-12sparc: prom: Sanitize return value from prom_nbputchar()Julian Calaby1-3/+4
Signed-off-by: Julian Calaby <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-12-10Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6David S. Miller13-409/+64
2010-12-10perf, sparc: Fix CONFIG_PERF_EVENTS=y build errorIngo Molnar1-1/+1
Fix a typo in: 004417a6d468: perf, arch: Cleanup perf-pmu init vs lockup-detector Which caused a build failure on Sparc, reported by Stephen Rothwell. Reported-by: Stephen Rothwell <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-11-30sparc: Write to prom console using indirect buffer.David S. Miller5-29/+52
sparc64 systems have a restriction in that passing in buffer addressses above 4GB to prom calls is not reliable. We end up violating this when we do prom console writes, because we use an on-stack buffer to translate '\n' into '\r\n'. So instead, do this translation into an intermediate buffer, which is in the kernel image and thus below 4GB, then pass that to the PROM console write calls. On the 32-bit side we don't have to deal with any of these issues, so the new prom_console_write_buf() uses the existing prom_nbputchar() implementation. However we can now mark those routines static. Since the 64-bit side completely uses new code we can delete the putchar bits as they are now completely unused. Signed-off-by: David S. Miller <[email protected]>
2010-11-30sparc: Delete prom_*getchar().David S. Miller4-83/+0
Completely unused. Signed-off-by: David S. Miller <[email protected]>
2010-11-30sparc: Pass buffer pointer all the way down to prom_{get,put}char().David S. Miller6-54/+55
This gets us closer to being able to eliminate the use of dynamic and stack based buffers, so that we can adhere to the "no buffer addresses above 4GB" rule for PROM calls. Signed-off-by: David S. Miller <[email protected]>
2010-11-26perf, arch: Cleanup perf-pmu init vs lockup-detectorPeter Zijlstra3-8/+5
The perf hardware pmu got initialized at various points in the boot, some before early_initcall() some after (notably arch_initcall). The problem is that the NMI lockup detector is ran from early_initcall() and expects the hardware pmu to be present. Sanitize this by moving all architecture hardware pmu implementations to initialize at early_initcall() and move the lockup detector to an explicit initcall right after that. Cc: paulus <[email protected]> Cc: davem <[email protected]> Cc: Michael Cree <[email protected]> Cc: Deng-Cheng Zhu <[email protected]> Acked-by: Paul Mundt <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <1290707759.2145.119.camel@laptop> Signed-off-by: Ingo Molnar <[email protected]>
2010-11-17sparc: Do not export prom_nb{get,put}char().David S. Miller4-20/+4
Never used outside of console_{32,64}.c Signed-off-by: David S. Miller <[email protected]>
2010-11-17BKL: remove extraneous #include <smp_lock.h>Arnd Bergmann5-5/+0
The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-16sparc64: Delete prom_setcallback().David S. Miller2-22/+0
Unused. Signed-off-by: David S. Miller <[email protected]>
2010-11-16sparc64: Unexport prom_service_exists().David S. Miller2-2/+1
Only used by functions in misc_64.c so make it private to that file. Signed-off-by: David S. Miller <[email protected]>
2010-11-16sparc: Kill prom devops_{32,64}.cDavid S. Miller5-195/+0
Completely unused. Signed-off-by: David S. Miller <[email protected]>
2010-11-16sparc: Remove prom_pathtoinode()David S. Miller4-36/+0
Unused. Signed-off-by: David S. Miller <[email protected]>
2010-11-16sparc64: Delete prom_puts() unused.David S. Miller1-16/+0
Signed-off-by: David S. Miller <[email protected]>
2010-11-01tree-wide: fix comment/printk typosUwe Kleine-König1-1/+1
"gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2010-10-30Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: jump label: Add work around to i386 gcc asm goto bug x86, ftrace: Use safe noops, drop trap test jump_label: Fix unaligned traps on sparc. jump label: Make arch_jump_label_text_poke_early() optional jump label: Fix error with preempt disable holding mutex oprofile: Remove deprecated use of flush_scheduled_work() oprofile: Fix the hang while taking the cpu offline jump label: Fix deadlock b/w jump_label_mutex vs. text_mutex jump label: Fix module __init section race * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Check irq_remapped instead of remapping_enabled in destroy_irq()
2010-10-29SPARC/LEON: removed constant timer initialization as if HZ=100, now it ↵Daniel Hellstrom1-2/+2
reflects the value of HZ Signed-off-by: Daniel Hellstrom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-10-29jump_label: Fix unaligned traps on sparc.David Miller1-0/+1
The vmlinux.lds.h knobs to emit the __jump_table section in the main kernel image takes care to align the section, but this doesn't help for the __jump_table section that gets emitted into modules. Fix the resulting lack of section alignment by explicitly specifying it in the assembler. Signed-off-by: David S. Miller <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-10-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds7-44/+22
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: kbuild: add ARCH=sparc32 target sparc32: fix build failure on CONFIG_SPARC_LEON sparc: Fixed random SPARC/LEON SMP CPU Stuck problem. sparc32: remove CONFIG_HAVE_PERF_EVENTS option sparc: don't #include asm/system.h in asm/jump_label.h sparc32: Fix unaligned stack handling on trap return. sparc: keep calling do_signal() as long as pending signals remain
2010-10-28Merge branch 'kconfig' of ↵Linus Torvalds1-6/+0
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (38 commits) kbuild: convert `arch/tile' to the kconfig mainmenu upgrade README: cite nconfig Revert "kconfig: Temporarily disable dependency warnings" kconfig: Use PATH_MAX instead of 128 for path buffer sizes. kconfig: Fix realloc usage() kconfig: Propagate const kconfig: Don't go out from read config loop when you read new symbol kconfig: fix menuconfig on debian lenny kbuild: migrate all arch to the kconfig mainmenu upgrade kconfig: expand file names kconfig: use the file's name of sourced file kconfig: constify file name kconfig: don't emit warning upon rootmenu's prompt redefinition kconfig: replace KERNELVERSION usage by the mainmenu's prompt kconfig: delay gconf window initialization kconfig: expand by default the rootmenu's prompt kconfig: add a symbol string expansion helper kconfig: regen parser kconfig: implement the `mainmenu' directive kconfig: allow PACKAGE to be defined on the compiler's command-line ... Fix up trivial conflict in arch/mn10300/Kconfig
2010-10-27sparc: remove dma64_addr_t usageFUJITA Tomonori1-1/+1
dma64_addr_t looks pointless (at least there is no point that an architecture has the own dma64_addr_t typedef). dma_addr_t is set to 32 or 64 bits appropriately. You can use u64 at places where you know that 64 bit address is always necessary. Let's use u64 instead for sparc32. Looks like PCI654_REQUIRED_MASK or PCI64_ADR_BASE isn't used. They can be removed? Signed-off-by: FUJITA Tomonori <[email protected]> Acked-by: David Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-27ptrace: cleanup arch_ptrace() on sparcNamhyung Kim2-38/+24
Factor out struct fps and remove redundant castings. Signed-off-by: Namhyung Kim <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-27ptrace: change signature of arch_ptrace()Namhyung Kim2-4/+6
Fix up the arguments to arch_ptrace() to take account of the fact that @addr and @data are now unsigned long rather than long as of a preceding patch in this series. Signed-off-by: Namhyung Kim <[email protected]> Cc: <[email protected]> Acked-by: Roland McGrath <[email protected]> Acked-by: David Howells <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-27fbmem: fix fb_read, fb_write unaligned accessesJames Hogan2-0/+62
fb_{read,write} access the framebuffer using lots of fb_{read,write}l's but don't check that the file position is aligned which can cause problems on some architectures which do not support unaligned accesses. Since the operations are essentially memcpy_{from,to}io, new fb_memcpy_{from,to}fb macros have been defined and these are used instead. For Sparc, fb_{read,write} macros use sbus_{read,write}, so this defines new sbus_memcpy_{from,to}io functions the same as memcpy_{from,to}io but using sbus_{read,write}b instead of {read,write}b. Signed-off-by: James Hogan <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Florian Tobias Schandinat <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-27mm: fix race in kunmap_atomic()Peter Zijlstra1-1/+3
Christoph reported a nice splat which illustrated a race in the new stack based kmap_atomic implementation. The problem is that we pop our stack slot before we're completely done resetting its state -- in particular clearing the PTE (sometimes that's CONFIG_DEBUG_HIGHMEM). If an interrupt happens before we actually clear the PTE used for the last slot, that interrupt can reuse the slot in a dirty state, which triggers a BUG in kmap_atomic(). Fix this by introducing kmap_atomic_idx() which reports the current slot index without actually releasing it and use that to find the PTE and delay the _pop() until after we're completely done. Signed-off-by: Peter Zijlstra <[email protected]> Reported-by: Christoph Hellwig <[email protected]> Acked-by: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-26mm: remove pte_*map_nested()Peter Zijlstra2-5/+0
Since we no longer need to provide KM_type, the whole pte_*map_nested() API is now redundant, remove it. Signed-off-by: Peter Zijlstra <[email protected]> Acked-by: Chris Metcalf <[email protected]> Cc: David Howells <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Russell King <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: David Miller <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-26mm: stack based kmap_atomic()Peter Zijlstra2-23/+29
Keep the current interface but ignore the KM_type and use a stack based approach. The advantage is that we get rid of crappy code like: #define __KM_PTE \ (in_nmi() ? KM_NMI_PTE : \ in_irq() ? KM_IRQ_PTE : \ KM_PTE0) and in general can stop worrying about what context we're in and what kmap slots might be appropriate for that. The downside is that FRV kmap_atomic() gets more expensive. For now we use a CPP trick suggested by Andrew: #define kmap_atomic(page, args...) __kmap_atomic(page) to avoid having to touch all kmap_atomic() users in a single patch. [ not compiled on: - mn10300: the arch doesn't actually build with highmem to begin with ] [[email protected]: coding-style fixes] [[email protected]: fix up drivers/gpu/drm/i915/intel_overlay.c] Acked-by: Rik van Riel <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Acked-by: Chris Metcalf <[email protected]> Cc: David Howells <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Russell King <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: David Miller <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Li Zefan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-26sparc32: fix build failure on CONFIG_SPARC_LEONNamhyung Kim1-2/+2
CC arch/sparc/kernel/irq_32.o arch/sparc/kernel/irq_32.c: In function 'request_fast_irq': arch/sparc/kernel/irq_32.c:370:25: error: conflicting types for 'trapbase_cpu1' arch/sparc/include/asm/leon.h:366:22: note: previous declaration of 'trapbase_cpu1' was here arch/sparc/kernel/irq_32.c:370:40: error: conflicting types for 'trapbase_cpu2' arch/sparc/include/asm/leon.h:367:22: note: previous declaration of 'trapbase_cpu2' was here arch/sparc/kernel/irq_32.c:370:55: error: conflicting types for 'trapbase_cpu3' arch/sparc/include/asm/leon.h:368:22: note: previous declaration of 'trapbase_cpu3' was here make[3]: *** [arch/sparc/kernel/irq_32.o] Error 1 make[2]: *** [arch/sparc/kernel] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-10-26sparc: Fixed random SPARC/LEON SMP CPU Stuck problem.Daniel Hellstrom1-2/+2
Signed-off-by: Daniel Hellstrom <[email protected]> Signed-off-by: David S. Miller <[email protected]>