[OpenBIOS] [PATCH] ppc: SDR1 fixes for ppc64

Segher Boessenkool segher at kernel.crashing.org
Mon Nov 15 23:32:13 CET 2010


> @@ -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;
>  }

Shouldn't this actually be something like
  0x10000UL << (sdr1 & 0x1f)
?


Segher




More information about the OpenBIOS mailing list