G5 pci probing regression

Segher Boessenkool segher at kernel.crashing.org
Sun Sep 25 00:58:01 EST 2005


>  	if (addr0 & 0x02000000) {
> -		flags |= IORESOURCE_MEM;
> +		flags = IORESOURCE_MEM | PCI_BASE_ADDRESS_SPACE_MEMORY;
> +		flags |= (addr0 >> 22) & PCI_BASE_ADDRESS_MEM_TYPE_64;
> +		flags |= (addr0 >> 28) & PCI_BASE_ADDRESS_MEM_TYPE_1M;
>

Could you please write those last two lines as

	if (addr0 & 0x01000000)
		flags |= PCI_BASE_ADDRESS_MEM_TYPE_64;
	if (addr0 & 0x20000000)
		flags |= PCI_BASE_ADDRESS_MEM_TYPE_1M;

because it took me a moment to figure out what is
going on here (I almost thought _I_ wrote that code!)


Segher




More information about the Linuxppc64-dev mailing list