diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-11-11 21:36:06 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-14 01:24:23 -0500 |
commit | 5ef73567813cddabe5fd1105e915be0851820f4f (patch) | |
tree | eb0b5131b225aa11aab94b306be194b86a54a3db | |
parent | 9e9e8935215d164cea2f49a7679cc0663c2253b6 (diff) |
powerpc/powernv: Rename alloc_m64_pe() to reserve_m64_pe()
The patch renames alloc_m64_pe() to reserve_m64_pe() to reflect
its real usage: We reserve PE numbers for M64 segments in advance
and then pick up the reserved PE numbers when building the mapping
between PE numbers and M64 segments.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/pci.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 7aa040441c08..cf90cce3dc9f 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -172,7 +172,7 @@ fail: | |||
172 | return -EIO; | 172 | return -EIO; |
173 | } | 173 | } |
174 | 174 | ||
175 | static void pnv_ioda2_alloc_m64_pe(struct pnv_phb *phb) | 175 | static void pnv_ioda2_reserve_m64_pe(struct pnv_phb *phb) |
176 | { | 176 | { |
177 | resource_size_t sgsz = phb->ioda.m64_segsize; | 177 | resource_size_t sgsz = phb->ioda.m64_segsize; |
178 | struct pci_dev *pdev; | 178 | struct pci_dev *pdev; |
@@ -345,7 +345,7 @@ static void __init pnv_ioda_parse_m64_window(struct pnv_phb *phb) | |||
345 | /* Use last M64 BAR to cover M64 window */ | 345 | /* Use last M64 BAR to cover M64 window */ |
346 | phb->ioda.m64_bar_idx = 15; | 346 | phb->ioda.m64_bar_idx = 15; |
347 | phb->init_m64 = pnv_ioda2_init_m64; | 347 | phb->init_m64 = pnv_ioda2_init_m64; |
348 | phb->alloc_m64_pe = pnv_ioda2_alloc_m64_pe; | 348 | phb->reserve_m64_pe = pnv_ioda2_reserve_m64_pe; |
349 | phb->pick_m64_pe = pnv_ioda2_pick_m64_pe; | 349 | phb->pick_m64_pe = pnv_ioda2_pick_m64_pe; |
350 | } | 350 | } |
351 | 351 | ||
@@ -837,8 +837,8 @@ static void pnv_pci_ioda_setup_PEs(void) | |||
837 | phb = hose->private_data; | 837 | phb = hose->private_data; |
838 | 838 | ||
839 | /* M64 layout might affect PE allocation */ | 839 | /* M64 layout might affect PE allocation */ |
840 | if (phb->alloc_m64_pe) | 840 | if (phb->reserve_m64_pe) |
841 | phb->alloc_m64_pe(phb); | 841 | phb->reserve_m64_pe(phb); |
842 | 842 | ||
843 | pnv_ioda_setup_PEs(hose->bus); | 843 | pnv_ioda_setup_PEs(hose->bus); |
844 | } | 844 | } |
diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h index 34d29eb2a4de..6c02ff8dd69f 100644 --- a/arch/powerpc/platforms/powernv/pci.h +++ b/arch/powerpc/platforms/powernv/pci.h | |||
@@ -130,7 +130,7 @@ struct pnv_phb { | |||
130 | u32 (*bdfn_to_pe)(struct pnv_phb *phb, struct pci_bus *bus, u32 devfn); | 130 | u32 (*bdfn_to_pe)(struct pnv_phb *phb, struct pci_bus *bus, u32 devfn); |
131 | void (*shutdown)(struct pnv_phb *phb); | 131 | void (*shutdown)(struct pnv_phb *phb); |
132 | int (*init_m64)(struct pnv_phb *phb); | 132 | int (*init_m64)(struct pnv_phb *phb); |
133 | void (*alloc_m64_pe)(struct pnv_phb *phb); | 133 | void (*reserve_m64_pe)(struct pnv_phb *phb); |
134 | int (*pick_m64_pe)(struct pnv_phb *phb, struct pci_bus *bus, int all); | 134 | int (*pick_m64_pe)(struct pnv_phb *phb, struct pci_bus *bus, int all); |
135 | int (*get_pe_state)(struct pnv_phb *phb, int pe_no); | 135 | int (*get_pe_state)(struct pnv_phb *phb, int pe_no); |
136 | void (*freeze_pe)(struct pnv_phb *phb, int pe_no); | 136 | void (*freeze_pe)(struct pnv_phb *phb, int pe_no); |