powerpc: Get iseries to compile with ARCH=powerpc
This moves the Device_List member from struct device_node to struct pci_dn, which cleans up the device_node and makes the code a little simpler. Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <asm/ppc_asm.h>
|
#include <asm/ppc_asm.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
|
#include <asm/ptrace.h> /* XXX for STACK_FRAME_OVERHEAD */
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
|
@@ -89,11 +89,10 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages)
|
|||||||
*/
|
*/
|
||||||
static struct iommu_table *iommu_table_find(struct iommu_table * tbl)
|
static struct iommu_table *iommu_table_find(struct iommu_table * tbl)
|
||||||
{
|
{
|
||||||
struct device_node *dp;
|
struct pci_dn *pdn;
|
||||||
|
|
||||||
list_for_each_entry(dp, &iSeries_Global_Device_List, Device_List) {
|
|
||||||
struct iommu_table *it = PCI_DN(dp)->iommu_table;
|
|
||||||
|
|
||||||
|
list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) {
|
||||||
|
struct iommu_table *it = pdn->iommu_table;
|
||||||
if ((it != NULL) &&
|
if ((it != NULL) &&
|
||||||
(it->it_type == TCE_PCI) &&
|
(it->it_type == TCE_PCI) &&
|
||||||
(it->it_offset == tbl->it_offset) &&
|
(it->it_offset == tbl->it_offset) &&
|
||||||
|
@@ -220,7 +220,7 @@ static struct device_node *build_device_node(HvBusNumber Bus,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
node->data = pdn;
|
node->data = pdn;
|
||||||
list_add_tail(&node->Device_List, &iSeries_Global_Device_List);
|
list_add_tail(&pdn->Device_List, &iSeries_Global_Device_List);
|
||||||
#if 0
|
#if 0
|
||||||
pdn->DsaAddr = ((u64)Bus << 48) + ((u64)SubBus << 40) + ((u64)0x10 << 32);
|
pdn->DsaAddr = ((u64)Bus << 48) + ((u64)SubBus << 40) + ((u64)0x10 << 32);
|
||||||
#endif
|
#endif
|
||||||
@@ -549,15 +549,12 @@ EXPORT_SYMBOL(iSeries_memcpy_fromio);
|
|||||||
*/
|
*/
|
||||||
static struct device_node *find_Device_Node(int bus, int devfn)
|
static struct device_node *find_Device_Node(int bus, int devfn)
|
||||||
{
|
{
|
||||||
struct list_head *pos;
|
struct pci_dn *pdn;
|
||||||
|
|
||||||
list_for_each(pos, &iSeries_Global_Device_List) {
|
list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) {
|
||||||
struct device_node *node =
|
if ((bus == pdn->DsaAddr.Dsa.busNumber) &&
|
||||||
list_entry(pos, struct device_node, Device_List);
|
(devfn == pdn->devfn))
|
||||||
|
return pdn->node;
|
||||||
if ((bus == ISERIES_BUS(node)) &&
|
|
||||||
(devfn == PCI_DN(node)->devfn))
|
|
||||||
return node;
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#define _ASM_PCI_BRIDGE_H
|
#define _ASM_PCI_BRIDGE_H
|
||||||
|
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
#include <linux/list.h>
|
||||||
|
|
||||||
#include <asm/iSeries/HvCallPci.h>
|
#include <asm/iSeries/HvCallPci.h>
|
||||||
|
|
||||||
@@ -74,6 +75,7 @@ struct pci_dn {
|
|||||||
struct pci_dev *pcidev; /* back-pointer to the pci device */
|
struct pci_dev *pcidev; /* back-pointer to the pci device */
|
||||||
struct device_node *node; /* back-pointer to the device_node */
|
struct device_node *node; /* back-pointer to the device_node */
|
||||||
#ifdef CONFIG_PPC_ISERIES
|
#ifdef CONFIG_PPC_ISERIES
|
||||||
|
struct list_head Device_List;
|
||||||
union HvDsaMap DsaAddr; /* Direct Select Address */
|
union HvDsaMap DsaAddr; /* Direct Select Address */
|
||||||
/* busNumber, subBusNumber, */
|
/* busNumber, subBusNumber, */
|
||||||
/* deviceId, barNumber */
|
/* deviceId, barNumber */
|
||||||
|
Reference in New Issue
Block a user