[PATCH] PPC64: close firmware stdin
We recently found a problem that was causing memory corruption during boot on IBM POWER5 machines. The problem was that the if you have a USB keyboard and it is set to the input device for the firmware, it will still be active when the kernel is started. That means that the OHCI controller has pointers to various memory areas that it polls for transfers to do. When we start using that same memory in the kernel, bad things can happen. (This isn't a problem on powermacs because the Apple OF implements a "quiesce" call which turns off all the devices it is using.) This patch fixes the problem by calling the Open Firmware "close" method for the input device. Stephen Rothwell and I have verified that doing this fixes the problem on the POWER5 machine where we observed it. I verified that this patch doesn't cause any problems on powermacs. I think this patch should go into 2.6.10 since it fixes a nasty memory corruption bug that can cause rather subtle and hard-to-diagnose problems during boot. (The symptom on the POWER5 machine with the particular kernel that we were using was that reading /proc/net/tcp would oops, due to one of the pointers in tcp_ehash being corrupted.) Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment