linux-stable/arch/parisc/kernel
Helge Deller 54e181e073 parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM
Since the beginning of the parisc-linux port, sometimes 64bit SMP kernels were
not able to bring up other CPUs than the monarch CPU and instead crashed the
kernel.  The reason was unclear, esp. since it involved various machines (e.g.
J5600, J6750 and SuperDome). Testing showed, that those crashes didn't happened
when less than 4GB were installed, or if a 32bit Linux kernel was booted.

In the end, the fix for those SMP problems is trivial:
During the early phase of the initialization of the CPUs, including the monarch
CPU, the PDC_PSW firmware function to enable WIDE (=64bit) mode is called.
It's documented that this firmware function may clobber various registers, and
one one of those possibly clobbered registers is %cr30 which holds the task
thread info pointer.

Now, if %cr30 would always have been clobbered, then this bug would have been
detected much earlier. But lots of testing finally showed, that - at least for
%cr30 - on some machines only the upper 32bits of the 64bit register suddenly
turned zero after the firmware call.

So, after finding the root cause, the explanation for the various crashes
became clear:
- On 32bit SMP Linux kernels all upper 32bit were zero, so we didn't faced this
  problem.
- Monarch CPUs in 64bit mode always booted sucessfully, because the inital task
  thread info pointer was below 4GB.
- Secondary CPUs booted sucessfully on machines with less than 4GB RAM because
  the upper 32bit were zero anyay.
- Secondary CPus failed to boot if we had more than 4GB RAM and the task thread
  info pointer was located above the 4GB boundary.

Finally, the patch to fix this problem is trivial by saving the %cr30 register
before the firmware call and restoring it afterwards.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: <stable@vger.kernel.org> # 2.6.12+
Signed-off-by: Helge Deller <deller@gmx.de>
2013-10-27 15:58:44 +01:00
..
.gitignore
asm-offsets.c
binfmt_elf32.c parisc: fix redefinition of SET_PERSONALITY 2013-03-02 20:15:28 +01:00
cache.c Revert "parisc: Export flush_cache_page() (needed by lustre)" 2013-10-19 21:37:40 +02:00
drivers.c parisc: memory overflow, 'name' length is too short for using 2013-06-01 14:27:56 +02:00
entry.S parisc: make interrupt and interruption stack allocation reentrant 2013-05-24 22:35:36 +02:00
firmware.c parisc: delete __cpuinit usage from all users 2013-07-14 19:36:51 -04:00
ftrace.c sched_clock: Add local_clock() API and improve documentation 2010-06-09 10:34:49 +02:00
hardware.c parisc: delete __cpuinit usage from all users 2013-07-14 19:36:51 -04:00
head.S parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM 2013-10-27 15:58:44 +01:00
hpmc.S parisc: fix partly 16/64k PAGE_SIZE boot 2013-05-06 23:08:32 +02:00
inventory.c parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
irq.c parisc: fix irq stack on UP and SMP 2013-05-24 23:29:01 +02:00
Makefile parisc: Fix init_task fallout 2012-05-07 11:38:46 +02:00
module.c modules: don't hand 0 to vmalloc. 2012-12-14 13:06:43 +10:30
pa7300lc.c
pacache.S parisc: Use unshadowed index register for flush instructions in flush_dcache_page_asm and flush_icache_page_asm 2013-06-18 20:29:10 +02:00
parisc_ksyms.c parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. 2013-04-25 22:36:15 +02:00
pci-dma.c parisc: Add export.h to files needing EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:00 -04:00
pci.c parisc: provide pci_mmap_page_range() for parisc 2013-06-18 20:29:08 +02:00
pdc_chassis.c parisc: single_open() leaks 2013-05-05 00:10:41 -04:00
pdc_cons.c TTY: switch tty_flip_buffer_push 2013-01-15 22:30:15 -08:00
perf.c parisc: remove big kernel lock 2010-10-16 22:43:08 +02:00
perf_asm.S
perf_images.h
process.c parisc: Use generic idle loop 2013-04-08 17:39:27 +02:00
processor.c parisc: delete __cpuinit usage from all users 2013-07-14 19:36:51 -04:00
ptrace.c parisc: improve ptrace support for gdb single-step 2013-01-07 23:06:27 +01:00
real2.S
setup.c Merge 3.10-rc5 into tty-next 2013-06-08 21:23:33 -07:00
signal.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-09-06 09:36:28 -07:00
signal32.c parisc: Remove arch/parisc/kernel/sys32.h header 2013-07-31 23:42:21 +02:00
signal32.h parisc: switch to generic compat rt_sigaction() 2013-02-03 18:16:07 -05:00
smp.c parisc: kill SMP single function call interrupt 2013-10-13 17:44:29 +02:00
stacktrace.c
sys_parisc.c mm: use vm_unmapped_area() on parisc architecture 2013-02-27 19:10:09 -08:00
sys_parisc32.c parisc: Remove arch/parisc/kernel/sys32.h header 2013-07-31 23:42:21 +02:00
syscall.S parisc: document the parisc gateway page 2013-05-06 23:09:10 +02:00
syscall_table.S get rid of union semop in sys_semctl(2) arguments 2013-03-05 15:14:16 -05:00
time.c parisc: move definition of PAGE0 to asm/page.h 2012-05-10 15:12:08 -07:00
topology.c
traps.c parisc: fix interruption handler to respect pagefault_disable() 2013-10-13 17:45:20 +02:00
unaligned.c parisc: show number of FPE and unaligned access handler calls in /proc/interrupts 2013-05-24 22:35:26 +02:00
unwind.c parisc: unwind - optimise linked-list searches for modules 2010-10-21 21:12:19 -04:00
vmlinux.lds.S parisc: add kernel stack overflow check 2013-05-07 21:34:07 +02:00