diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-13 02:56:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-13 02:56:12 -0400 |
commit | 615c9136b385d5225d3ece20aa30b28a90c438d6 (patch) | |
tree | db11f7e02eacac06f5fcb7378f2394a966880673 /arch/sparc64/kernel/chmc.c | |
parent | 82960b8543cca5797a5e2841a9c43b8c5c669e65 (diff) |
chmc: Mark %ver register inline asm with __volatile__
Otherwise GCC can try to do the register read before the guarding test
on us3mc_platform() being true.
If that happens we can take an exception, because %ver register reads
are not allowed in privileged more on hypervisor platforms.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/chmc.c')
-rw-r--r-- | arch/sparc64/kernel/chmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 967b04886822..3b9f4d6e14a9 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c | |||
@@ -831,7 +831,7 @@ static int __init us3mc_init(void) | |||
831 | if (!us3mc_platform()) | 831 | if (!us3mc_platform()) |
832 | return -ENODEV; | 832 | return -ENODEV; |
833 | 833 | ||
834 | __asm__ ("rdpr %%ver, %0" : "=r" (ver)); | 834 | __asm__ __volatile__("rdpr %%ver, %0" : "=r" (ver)); |
835 | if ((ver >> 32UL) == __JALAPENO_ID || | 835 | if ((ver >> 32UL) == __JALAPENO_ID || |
836 | (ver >> 32UL) == __SERRANO_ID) { | 836 | (ver >> 32UL) == __SERRANO_ID) { |
837 | mc_type = MC_TYPE_JBUS; | 837 | mc_type = MC_TYPE_JBUS; |