Adjust shifts and masks to 64-bit SDR1.
Cc: Alexander Graf agraf@suse.de Signed-off-by: Andreas Färber andreas.faerber@web.de --- arch/ppc/qemu/ofmem.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/ppc/qemu/ofmem.c b/arch/ppc/qemu/ofmem.c index fd417c2..9c60841 100644 --- a/arch/ppc/qemu/ofmem.c +++ b/arch/ppc/qemu/ofmem.c @@ -61,7 +61,7 @@ get_hash_base( void )
asm volatile("mfsdr1 %0" : "=r" (sdr1) );
- return (sdr1 & 0xffff0000); + return (sdr1 & ~0xffffUL); }
static inline unsigned long @@ -71,7 +71,7 @@ get_hash_size( void )
asm volatile("mfsdr1 %0" : "=r" (sdr1) );
- return ((sdr1 << 16) | 0x0000ffff) + 1; + return (((sdr1 & 0x1f) << 16) | 0x0000ffff) + 1; }
static inline unsigned long