]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: gp_in_global needs register keyword
authorPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 21 May 2020 20:28:26 +0000 (13:28 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 21 May 2020 20:28:26 +0000 (13:28 -0700)
commit5a569be842cdeadf13d8f7fc4ae271805d0365c7
tree5e9c8d5dadda3f09cc9803b86a6f24dd98218459
parent04da10ad7d22f1251c6ebabc8bef651cb16ba9b4
RISC-V: gp_in_global needs register keyword

The Intel kernel build robot recently pointed out that I missed the
register keyword on this one when I refactored the code to remove local
register variables (which aren't supported by LLVM).  GCC's manual
indicates that global register variables must have the register keyword,
As far as I can tell lacking the register keyword causes GCC to ignore
the __asm__ and treat this as a regular variable, but I'm not sure how
that didn't show up as some sort of failure.

Fixes: 9b96ed52f511 ("RISC-V: Stop relying on GCC's register allocator's hueristics")
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/process.c