powerpc/pci: clean up direct access to sysdata
cover powerpc/pci: clean up direct access to sysdata
We shouldn't be accessing sysdata directly. In the future we might have sysdata be a device_node on ppc32 to match ppc64. Direct access would make that a bit difficult.
If someone can look at the iseries code I would appreciate that:
arch/powerpc/platforms/iseries/pci.c: iomm_table[current_iomm_table_entry] = dev->sysdata;arch/powerpc/platforms/iseries/pci.c: iseries_ds_addr(dev->sysdata) | (bar_num << 24);arch/powerpc/platforms/iseries/pci.c: pdev->sysdata = node;
- k
Quoted 9 lines · Kumar Gala
We shouldn't be accessing sysdata directly. In the future we might have sysdata be a
device_nodeon ppc32 to match ppc64. Direct access would make that a bit difficult.If someone can look at the iseries code I would appreciate that:
arch/powerpc/platforms/iseries/pci.c: iomm_table[current_iomm_table_entry] =dev->sysdata;arch/powerpc/platforms/iseries/pci.c:iseries_ds_addr(dev->sysdata)| (bar_num<< 24);arch/powerpc/platforms/iseries/pci.c:pdev->sysdata= node;
It looks like it's basically doing the same logic as pci_device_to_OF_node(), and fetch_dev_dn(), but there's probably some reason why it's not using those.
Given how much new iseries hardware there is, I think we'd probably rather leave the code as is. It's a device node anyway, so it doesn't block your plans RE ppc32.
cheers
Quoted 15 lines · Michael Ellerman
Quoted 9 lines · Kumar Gala
We shouldn't be accessing sysdata directly. In the future we might have sysdata be a
device_nodeon ppc32 to match ppc64. Direct access would make that a bit difficult.If someone can look at the iseries code I would appreciate that:
arch/powerpc/platforms/iseries/pci.c: iomm_table[current_iomm_table_entry] =dev->sysdata;arch/powerpc/platforms/iseries/pci.c:iseries_ds_addr(dev->sysdata)| (bar_num<< 24);arch/powerpc/platforms/iseries/pci.c:pdev->sysdata= node;It looks like it's basically doing the same logic as
pci_device_to_OF_node(), andfetch_dev_dn(), but there's probably some reason why it's not using those.
Quoted 5 lines
Given how much new iseries hardware there is, I think we'd probably rather leave the code as is. It's a device node anyway, so it doesn't block your plans RE ppc32.
cheers
I was already thinking along those lines, but figured I see if anyone is really "maintaining" iseries code :)
- k
Quoted 21 lines · Kumar Gala
Quoted 19 lines · Michael Ellerman
Quoted 6 lines · Kumar Gala
We shouldn't be accessing sysdata directly. In the future we might have
sysdata be adevice_nodeon ppc32 to match ppc64. Direct access would make that
a bit difficult.Quoted 7 lines
If someone can look at the iseries code I would appreciate that:
arch/powerpc/platforms/iseries/pci.c:
iomm_table[current_iomm_table_entry] =dev->sysdata;arch/powerpc/platforms/iseries/pci.c:iseries_ds_addr(dev->sysdata)| (bar_num<< 24);arch/powerpc/platforms/iseries/pci.c:pdev->sysdata= node;It looks like it's basically doing the same logic as
pci_device_to_OF_node(), andfetch_dev_dn(), but there's probably some reason why it's not using those.
Quoted 8 lines
Quoted 5 lines
Given how much new iseries hardware there is, I think we'd probably rather leave the code as is. It's a device node anyway, so it doesn't block your plans RE ppc32.
cheers
I was already thinking along those lines, but figured I see if anyone is really "maintaining" iseries code :)
Not that much, it would be sfr if anyone, but I think he's a bit busy :)
cheers
Quoted 26 lines · Michael Ellerman
Quoted 25 lines · Kumar Gala
Quoted 23 lines · Michael Ellerman
Quoted 6 lines · Kumar Gala
We shouldn't be accessing sysdata directly. In the future we might have
sysdata be adevice_nodeon ppc32 to match ppc64. Direct access would make that
a bit difficult.Quoted 7 lines
If someone can look at the iseries code I would appreciate that:
arch/powerpc/platforms/iseries/pci.c:
iomm_table[current_iomm_table_entry] =dev->sysdata;arch/powerpc/platforms/iseries/pci.c:iseries_ds_addr(dev->sysdata)| (bar_num<< 24);arch/powerpc/platforms/iseries/pci.c:pdev->sysdata= node;It looks like it's basically doing the same logic as
pci_device_to_OF_node(), andfetch_dev_dn(), but there's probably some reason why it's not using those.Given how much new iseries hardware there is, I think we'd probably rather leave the code as is. It's a device node anyway, so it doesn't block your plans RE ppc32.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
cheers
I was already thinking along those lines, but figured I see if anyone is really "maintaining" iseries code :)
Not that much, it would be sfr if anyone, but I think he's a bit busy :)
cheers
I was thinking about this a bit more and would like to clean up iseries as well. Either iseries is maintained by someone or its not.
- k