pci: Arch hook to determine config space size
Matthew Wilcox
matthew at wil.cx
Tue Feb 1 23:32:49 EST 2005
On Mon, Jan 31, 2005 at 10:52:29PM -0600, Brian King wrote:
> @@ -62,8 +72,11 @@ static int rtas_read_config(struct devic
> return PCIBIOS_DEVICE_NOT_FOUND;
> if (where & (size - 1))
> return PCIBIOS_BAD_REGISTER_NUMBER;
You should probably delete this redundant test at the same time ...
> + if (!config_access_valid(dn, where))
> + return PCIBIOS_BAD_REGISTER_NUMBER;
>
> - addr = (dn->busno << 16) | (dn->devfn << 8) | where;
> + addr = ((where & 0xf00) << 20) | (dn->busno << 16) |
> + (dn->devfn << 8) | (where & 0xff);
> buid = dn->phb->buid;
> if (buid) {
> ret = rtas_call(ibm_read_pci_config, 4, 2, &returnval,
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
More information about the Linuxppc64-dev
mailing list