summaryrefslogtreecommitdiffstats
path: root/Documentation/vgaarbiter.txt
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-01-08 15:30:08 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2015-01-12 16:40:02 +1100
commita87e810f61b49f19bd29ea564b7cd1e92e43d989 (patch)
treef6ff82304f0c2b8d2c1e91ba39096f72559d4dfe /Documentation/vgaarbiter.txt
parent0712dc7e73e59d79bcead5d5520acf4e9e917e87 (diff)
downloadlinux-a87e810f61b49f19bd29ea564b7cd1e92e43d989.tar.gz
linux-a87e810f61b49f19bd29ea564b7cd1e92e43d989.tar.bz2
linux-a87e810f61b49f19bd29ea564b7cd1e92e43d989.zip
powerpc: Work around gcc bug in current_thread_info()
In commit a3e5b356b3ab "powerpc: Don't use local named register variable in current_thread_info" Anton changed the way we did current_thread_info() to accommodate LLVM, and it was not meant to have any effect elsewhere. Unfortunately it has exposed a gcc bug, where r1 gets copied into another register and then gcc uses that register to restore the toc after a function call, even when that register is volatile and has been clobbered by the function call. We could revert Anton's patch, but it's not clear the original code is safe either, we may just have been lucky. The cleanest solution is to just use the existing CURRENT_THREAD_INFO() asm macro, and call it using inline asm. Segher points out we don't need volatile on the asm, if the result of the shift is unused it's fine for the compiler to elide it. Fixes: a3e5b356b3ab ("powerpc: Don't use local named register variable in current_thread_info") Reported-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'Documentation/vgaarbiter.txt')
0 files changed, 0 insertions, 0 deletions