1
0
Fork 0
alistair23-linux/arch/parisc
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
..
configs parisc: enable DEVTMPFS, DEVTMPFS_MOUNT and BLK_DEV_INITRD in defconfigs 2013-10-19 21:37:52 +02:00
hpux [readdir] constify ->actor 2013-06-29 12:57:05 +04:00
include parisc: mark parisc_terminate() noreturn and cold. 2013-10-13 17:44:49 +02:00
kernel parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM 2013-10-27 15:58:44 +01:00
lib parisc: let probe_kernel_read() capture access to page zero 2013-10-13 17:46:31 +02:00
math-emu parisc: avoid undefined shift in cnv_float.h 2013-01-07 23:06:22 +01:00
mm parisc: optimize variable initialization in do_page_fault 2013-10-13 17:45:40 +02:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
Kconfig Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
nm Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00