summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/setup_32.c
Commit message (Collapse)AuthorAgeFilesLines
* sparc32: centralize all mmu context handling in srmmu.cSam Ravnborg2012-07-261-1/+0
| | | | | Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: add support for run-time patching of leon/sun single instructionsSam Ravnborg2012-05-271-16/+42
| | | | | | | | | This will be used to handle that MMUREGS has different ASI for SUN and LEON. This is the infrastructure only - users will come later. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Konrad Eisele <konrad@gaisler.com>
* sparc32: introduce sparc32_start_kernel called from head_32.SSam Ravnborg2012-05-271-0/+10
| | | | | | This gives us a C hook before we call start_kernel() Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* sparc32: use flushi when run-time patching in per_cpu_patchSam Ravnborg2012-05-201-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Davis S. Miller wrote: " The way we do that now is overkill. We only needed to use the MMU cache ops when we had sun4c around because sun4c lacked support for the "flush" instruction. But all sun4m and later chips have it so we can use it unconditionally. So in the per_cpu_patch() code, get rid of the cache ops invocation, and instead execute a "flush %reg" after each of the instruction patch assignments, where %reg is set to the address of the instruction that was stored into. Perhaps take the flushi() definition from asm/cacheflush_64.h and place it into asm/cacheflush.h, then you can simply use that. " Implemented as per suggestion. Moved run-time patching before we call paging_init(), so helper methods in paging_init() may utilise run-time patching too. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: fix cpuid_patch run-time patchingSam Ravnborg2012-05-201-0/+2
| | | | | | | | We hang forever when trying to do run-time patching of instructions identified by the cpuid_patch section Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Kill boot_cpu_id4David S. Miller2012-05-191-1/+0
| | | | | | It is written, but never actually read. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Implement hard_smp_processor_id() via instruction patching.David S. Miller2012-05-141-0/+51
| | | | | | | | | | | This is the last non-trivial user of btfixup. Like sparc64, use a special patch section to resolve the various implementations of how to read the current CPU's ID when we don't have current_thread_info()->cpu necessarily available. Signed-off-by: David S. Miller <davem@davemloft.net> Tested-by: Sam Ravnborg <sam@ravnborg.org>
* sparc32: Remove sun4 and sun4c from enum sparc_cpu.David S. Miller2012-05-121-10/+0
| | | | | | | | | All the remaining references are trivially removed since we've just eliminated the final reference to sparc_cpu_model from assembler code in commit b7d96ce189564e661909fbf8df39d7358149885b ("sparc32: Remove sparc_cpu_model read from floppy interrupt handler.") Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Clear out unused asm/machines.h values.David S. Miller2012-05-111-1/+0
| | | | | | | | | | | | Remove sun4 and sun4c machine ID values from asm/machines.h Also kill NUM_SUN_MACHINES, use ARRAY_SIZE instead. Kill asm/machines.h include and sun4c checks from asm/floppy_32.h Remove asm/machines.h include from setup_32.c and time_32.c, unused. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: remove sun4c trapsSam Ravnborg2012-05-111-9/+0
| | | | | | | | | | | | | We used to runtime patch the trap table for srmmu. With the removal of sun4c support this is no longer required. With the sun4c trap removed we can remove all the referenced trap handling which is sun4c specific. This also allows us to get rid of the nosun4c.c file that contained only dummy functions/data. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Disintegrate asm/system.h for SparcDavid Howells2012-03-281-1/+1
| | | | | | | Disintegrate asm/system.h for Sparc. Signed-off-by: David Howells <dhowells@redhat.com> cc: sparclinux@vger.kernel.org
* sparc: Make SPARC use the new is_idle_task() APIPaul E. McKenney2011-12-111-1/+1
| | | | | | | | | Change from direct comparison of ->pid with zero to is_idle_task(). Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: David S. Miller <davem@davemloft.net> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
* sparc: add export.h to arch/sparc files as requiredPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | These files are only exporting symbols, so they don't need the full module.h header file. Previously they were getting access to EXPORT_SYMBOL implicitly via overuse of module.h from within other .h files, but that is being cleaned up. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* sparc: Make '-p' boot option meaningful again.David S. Miller2011-09-211-1/+1
| | | | | | | | | | | | | | If "-p" is given on the command line, clear the CON_BOOT flag for the initial early boot PROM console. This is necessary to try and see crash messages that occur between the registry of the VT console and the probing of the first framebuffer or serial console. During this time no console messages are emitted because the VT console registry (even if no backend is registered to it) removes the early console if CON_BOOT is set. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Remove unnecessary semicolonsJoe Perches2011-06-071-1/+1
| | | | | | | | Semicolons are not necessary after switch/while/for/if braces so remove them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* arch, mm: filter disallowed nodes from arch specific show_mem functionsDavid Rientjes2011-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Architectures that implement their own show_mem() function did not pass the filter argument to show_free_areas() to appropriately avoid emitting the state of nodes that are disallowed in the current context. This patch now passes the filter argument to show_free_areas() so those nodes are now avoided. This patch also removes the show_free_areas() wrapper around __show_free_areas() and converts existing callers to pass an empty filter. ia64 emits additional information for each node, so skip_free_areas_zone() must be made global to filter disallowed nodes and it is converted to use a nid argument rather than a zone for this use case. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: James Bottomley <jejb@parisc-linux.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sparc32: always define boot_cpu_idDaniel Hellstrom2011-04-211-0/+4
| | | | | | | | | | | | | | | | | | Define boot_cpu_id in single-processor kernels as well. This is to support architectures which can boot on other than CPU0. Sam Ravnborg has written the cleanup parts by extracting boot_cpu_id from smp_32.c into setup_32.c and cleaned up sun4d_irq.c. boot_cpu_id was initialized before BSS was cleared in sun4c_continue_boot, instead boot_cpu_id is set to 0xff to avoid BSS. If boot_cpu_id is untouched (0xff) by bootup code it will be overwritten to 0. boot_cpu_id4 is automatically calculated in common code. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: always register a PROM based early consoleSam Ravnborg2011-04-211-6/+8
| | | | | | | | | | | | Do not require user to add "-p" to boot arguments to see early info printed to prom console. This is similar to the sparc64 functionality - which was added with: 3c62a2d3477ff7725210db57aec3d2806fa10c20 ("[SPARC64]: Always register a PROM based early console.") Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: consolidate show_cpuinfo in cpu.cSam Ravnborg2011-04-211-69/+0
| | | | | | | | We have all the cpu related info in cpu.c - so move the remaining functions to support /proc/cpuinfo to this file. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: add irq + smp declarations to headersSam Ravnborg2011-03-161-10/+9
| | | | | | | | | | | | | | | | | | | 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>
* sparc: use trapbase in setup_archSam Ravnborg2011-01-041-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: remove redundant return statementsJan Engelhardt2010-02-101-2/+0
| | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill PROM console driver.David S. Miller2009-09-151-2/+0
| | | | | | | | | | | | | | | | Many years ago when this driver was written, it had a use, but these days it's nothing but trouble and distributions should not enable it in any situation. Pretty much every console device a sparc machine could see has a bonafide real driver, making the PROM console hack unnecessary. If any new device shows up, we should write a driver instead of depending upon this crutch to save us. We've been able to take care of this even when no chip documentation exists (sunxvr500, sunxvr2500) so there are no excuses. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,leon: Introduce the sparc-leon CPU type.Konrad Eisele2009-08-171-0/+5
| | | | | | | | | | | Add sparc_leon enum, M_LEON|M_LEON3_SOC machine. Add compilation of leon.c in mm and kernel if CONFIG_SPARC_LEON is defined. Add sparc_leon dependent initialization to switch statements + head.S. Signed-off-by: Konrad Eisele <konrad@gaisler.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: move EXPORT_SYMBOL to the symbols definitionSam Ravnborg2009-01-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Move all applicable EXPORT_SYMBOL()s to the file where the respective symbol is defined. Removed all the includes that are no longer needed in sparc_ksyms_32.c Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_32.c Two symbols are shared with sparc64 thus the exports were removed from the sparc_ksyms_64.c too, along with the include their ommission made redundant. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Additions by Julian Calaby: * Moved EXPORT_SYMBOL()s for prom functions to their rightful places. * Made some minor cleanups to the includes and comments of sparc_ksyms_32.c * Made another subtraction from sparc_ksyms_64.c * Updated and tidied commit message. * Rebased patch over sparc-2.6.git HEAD. * Ensured that all modified files have the correct includes. Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: fix sparse warnings in cpu_*.cSam Ravnborg2008-12-071-3/+2
| | | | | | | | | | o declare variables from cpu_*.c o declare function from cpu_32.c To do this introduce a new header "kernel.h" which is local to kernel/ Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: report "Unknown CPU/FPU" for unknown cpu/fpuSam Ravnborg2008-12-051-2/+2
| | | | | | | | | | If we cannot determine the CPU or FPU report "Unknown CPU" or "Unknown FPU" like sparc64 does. And report with KERN_ERR that we cannot determine the CPU. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: prepare kernel/ for unificationSam Ravnborg2008-12-041-0/+423
o sparc32 files with identical names to sparc64 renamed to <name>_32.S o introduced a few Kconfig helpers to simplify Makefile logic o refactored Makefile to prepare for unification - use obj-$(CONFIG_SPARC32) for sparc32 specific files - use <name>_$(BITS) for files where sparc64 has a _64 variant - sparc64 directly include a few files where sparc32 builds them, refer to these files directly (no BITS) - sneaked in -Werror as used by sparc64 o modified sparc/Makefile to use the new names for head/init_task Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud