summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/head_32.S
Commit message (Collapse)AuthorAgeFilesLines
* sparc32: drop swapper_pg_dirSam Ravnborg2012-07-261-2/+0
| | | | | | | | | | | | | We save one page of RAM dropping swapper_pg_dir. It was only used for an assignment in init-mm.c and we redid this later in srmmu.c anyway. This is likely a left-over from the sun4c removal. To avoid a dummy variable we use a simple #define swapper_pg_dir NULL Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: remove unused variable in head_32.SSam Ravnborg2012-05-291-8/+0
| | | | | | | It was assigned, but never referenced later. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32,leon: fix leon bootupSam Ravnborg2012-05-291-32/+41
| | | | | | | | | | | | | head_32.S failed to set cputypval for leon, causing boot to fail. The boot failed because we failed to recognize this was a LEON cpu so we did not preoperly run-time patch the the kernel. This resulted in an early crash. Reported-by: Daniel Hellstrom <daniel@gaisler.com> Tested-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Konrad Eisele <konrad@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32,leon: always include leon_smp + leon_mm in buildSam Ravnborg2012-05-271-3/+0
| | | | | | | | Fix-up leon specific assembler to use ASI_LEON_MMUREGS 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-8/+2
| | | | | | This gives us a C hook before we call start_kernel() Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* sparc32: implement proper LEON support in head_32 (after highmem)Sam Ravnborg2012-05-271-25/+33
| | | | | | | | | | | | | We use the compatibility property to determine the sun models. For leon we use psr.impl and ignore the result of the getprops call. Include a hack to allow build as the support code is not yet converted. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Konrad Eisele <konrad@gaisler.com>
* sparc32: implement proper LEON support in head_32 (before highmem)Sam Ravnborg2012-05-271-11/+47
| | | | | | | | | | | Use PSR to check if the CPU is LEON and jump to LEON specific code in this case. Added a few constants to psr.h to increase readability. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Konrad Eisele <konrad@gaisler.com>
* sparc32: string and whitespace cleanup in head_32.SSam Ravnborg2012-05-271-15/+15
| | | | | | | | | A few strings have been adopted to show more relevant info. Julian Calaby <julian.calaby@gmail.com> pointed out one that I would otherwise have missed. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* sparc32: move trap table to a separate fileSam Ravnborg2012-05-191-324/+2
| | | | | 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-4/+1
| | | | | | It is written, but never actually read. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Kill off software 32-bit multiply/divide routines.David S. Miller2012-05-151-45/+0
| | | | | | | | | | | | | For the explicit calls to .udiv/.umul in assembler, I made a mechanical (read as: safe) transformation. I didn't attempt to make any simplifications. In particular, __ndelay and __udelay can be simplified significantly. Some of the %y reads are unnecessary and these routines have no need any longer for allocating a register window, they can be leaf functions. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Remove cypress cpu support.David S. Miller2012-05-151-15/+0
| | | | | | | | | It's the one aberration in v8, the only cpu that didn't actually have hardware multiply and divide instructions. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org>
* sparc32: simpler cputype check in head_32.SSam Ravnborg2012-05-121-25/+9
| | | | | | | | We know this is not a sun4/sun4c - as we checked earlier. So no need to repeat the check. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: drop extra getprop call during bootSam Ravnborg2012-05-121-41/+9
| | | | | | | | | It was present only to support the sun4, sun4c boxes which do not have the "compatible" property in the root-node of the device tree. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: drop prom version check in head_32.SSam Ravnborg2012-05-121-13/+0
| | | | | | | | | We already sorted out if we are a sun4/sun4c and halted. So no need to check the prom version as we know this is a v2 or v3 as sun4m, sun4d etc. does not use a v1 prom. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: remove sun4c specific variables from head_32.SSam Ravnborg2012-05-121-10/+1
| | | | | | | This gives us back 7 pages... Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Add back early sun4/sun4c detection so we can warn properly.David S. Miller2012-05-121-0/+23
| | | | | | | We need to do the check before we try to remap the kernel using SRMMU operations. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Restore SMP build and rectify sun4m NMI when non-SMP.David S. Miller2012-05-111-1/+1
| | | | | | | | | The non-SMP sun4m NMI handler was still accessing SUN4C registers. Fix that and share the sun4m NMI trap code between SMP and non-SMP cases. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: drop sun4c bits from head_32.SSam Ravnborg2012-05-111-129/+19
| | | | | | | | | | As we no longer support sun4c we can remove all the code to support remapping the kernel in head_32.S. We also try to tell the user that the machine is not support, in case someone try to boot the kernel on a sun4c one day Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: remove sun4c trapsSam Ravnborg2012-05-111-3/+3
| | | | | | | | | | | | | 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>
* sparc32: drop sun4c supportSam Ravnborg2012-05-111-5/+2
| | | | | | | | | | | | | | | Machines with sun4c support are very rare these days, and noone is using them for any practical purposes. The sun4c support has been know broken for quite some time too. So rather than trying to keep it up-to-date, lets get rid of it. This allows us to do some very welcome cleanup of sparc32 support. Updated the former sun4c specifc nmi (which was also used for sun4m UP) to be a generic UP NMI. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32,leon: operate on boot-cpu IRQ controller registersDaniel Hellstrom2011-04-211-15/+12
| | | | | | | | | | | | | * proper initialization of boot_cpu_id (no hardcoding to 0) * use boot_cpu_id index to address into the IRQ controller where appropriate Each CPU has a separate set of IRQ controller registers, this patch makes sure that the boot-cpu registers are used instead of CPU0's. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: always define boot_cpu_idDaniel Hellstrom2011-04-211-9/+17
| | | | | | | | | | | | | | | | | | 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>
* sparc: use _start for the start entry (like 64 bit does)Sam Ravnborg2011-01-041-2/+1
| | | | | | | | We use "_start" in 64 bit - do the same in 32 bit. It is always good to be consistent. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,leon: Sparc-Leon SMP supportKonrad Eisele2009-11-021-0/+22
| | | | | | | | Support SMP for a Sparc-Leon multiprocessor system. Add Leon specific SMP code to arch/sparc/kernel/leon_smp.c. Signed-off-by: Konrad Eisele <konrad@gaisler.com> 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: cleanup references to deprecated .text.init* sections.Tim Abbott2009-04-271-1/+1
| | | | | | | | | | | | | | The section .text.init.refok is deprecated and __REF (.ref.text) should be used in assembly files instead. This patch cleans up a few uses of .text.init.refok in the sparc architecture. Also fix a reference to .text.init in a comment that wasn't updated to .init.text. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sparc: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-261-1/+1
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sparc: unify sections.hSam Ravnborg2008-12-271-1/+1
| | | | | | | | | | | | While doing this use standard names for start/end so we could use definitions straight from asm-generic for all the typical symbols. This also allowed us to drop the use of PROVIDE in the linker script so sprc is less non-standard on this area. 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/+1295
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