aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/masters
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-11-30 06:49:45 -0500
committerPaul Mackerras <paulus@samba.org>2008-11-30 17:40:19 -0500
commitab598b6680f1e74c267d1547ee352f3e1e530f89 (patch)
tree3b90956dfdb03c19c8fb7eed1072600c7bc3c05b /drivers/w1/masters
parent960cedb4e3eedec6394f224fc832c7a23f35a799 (diff)
powerpc: Fix system calls on Cell entered with XER.SO=1
It turns out that on Cell, on a kernel with CONFIG_VIRT_CPU_ACCOUNTING = y, if a program sets the SO (summary overflow) bit in the XER and then does a system call, the SO bit in CR0 will be set on return regardless of whether the system call detected an error. Since CR0.SO is used as the error indication from the system call, this means that all system calls appear to fail. The reason is that the workaround for the timebase bug on Cell uses a compare instruction. With CONFIG_VIRT_CPU_ACCOUNTING = y, the ACCOUNT_CPU_USER_ENTRY macro reads the timebase, so we end up doing a compare instruction, which copies XER.SO to CR0.SO. Since we were doing this in the system call entry patch after clearing CR0.SO but before saving the CR, this meant that the saved CR image had CR0.SO set if XER.SO was set on entry. This fixes it by moving the clearing of CR0.SO to after the ACCOUNT_CPU_USER_ENTRY call in the system call entry path. Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/w1/masters')
0 files changed, 0 insertions, 0 deletions