diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/vdso.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso64/gettimeofday.S | 4 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_driver.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/pci_dlpar.c | 36 |
6 files changed, 40 insertions, 22 deletions
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index f0c47dab0903..04f7df39ffbb 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -182,8 +182,8 @@ static struct page * vdso_vma_nopage(struct vm_area_struct * vma, | |||
182 | unsigned long offset = address - vma->vm_start; | 182 | unsigned long offset = address - vma->vm_start; |
183 | struct page *pg; | 183 | struct page *pg; |
184 | #ifdef CONFIG_PPC64 | 184 | #ifdef CONFIG_PPC64 |
185 | void *vbase = test_thread_flag(TIF_32BIT) ? | 185 | void *vbase = (vma->vm_mm->task_size > TASK_SIZE_USER32) ? |
186 | vdso32_kbase : vdso64_kbase; | 186 | vdso64_kbase : vdso32_kbase; |
187 | #else | 187 | #else |
188 | void *vbase = vdso32_kbase; | 188 | void *vbase = vdso32_kbase; |
189 | #endif | 189 | #endif |
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S index ccaeda5136d1..4ee871f1cadb 100644 --- a/arch/powerpc/kernel/vdso64/gettimeofday.S +++ b/arch/powerpc/kernel/vdso64/gettimeofday.S | |||
@@ -225,9 +225,9 @@ V_FUNCTION_BEGIN(__do_get_xsec) | |||
225 | .cfi_startproc | 225 | .cfi_startproc |
226 | /* check for update count & load values */ | 226 | /* check for update count & load values */ |
227 | 1: ld r8,CFG_TB_UPDATE_COUNT(r3) | 227 | 1: ld r8,CFG_TB_UPDATE_COUNT(r3) |
228 | andi. r0,r4,1 /* pending update ? loop */ | 228 | andi. r0,r8,1 /* pending update ? loop */ |
229 | bne- 1b | 229 | bne- 1b |
230 | xor r0,r4,r4 /* create dependency */ | 230 | xor r0,r8,r8 /* create dependency */ |
231 | add r3,r3,r0 | 231 | add r3,r3,r0 |
232 | 232 | ||
233 | /* Get TB & offset it */ | 233 | /* Get TB & offset it */ |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index b1f614c612dd..e9d589eefc14 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -169,7 +169,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
169 | #ifdef CONFIG_PPC_ISERIES | 169 | #ifdef CONFIG_PPC_ISERIES |
170 | if (_machine == PLATFORM_ISERIES_LPAR) | 170 | if (_machine == PLATFORM_ISERIES_LPAR) |
171 | ret = iSeries_hpte_insert(hpteg, va, | 171 | ret = iSeries_hpte_insert(hpteg, va, |
172 | virt_to_abs(paddr), | 172 | __pa(vaddr), |
173 | tmp_mode, | 173 | tmp_mode, |
174 | HPTE_V_BOLTED, | 174 | HPTE_V_BOLTED, |
175 | psize); | 175 | psize); |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 83578313ee7e..2ab9dcdfb415 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -893,6 +893,20 @@ void eeh_add_device_tree_early(struct device_node *dn) | |||
893 | } | 893 | } |
894 | EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); | 894 | EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); |
895 | 895 | ||
896 | void eeh_add_device_tree_late(struct pci_bus *bus) | ||
897 | { | ||
898 | struct pci_dev *dev; | ||
899 | |||
900 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
901 | eeh_add_device_late(dev); | ||
902 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { | ||
903 | struct pci_bus *subbus = dev->subordinate; | ||
904 | if (subbus) | ||
905 | eeh_add_device_tree_late(subbus); | ||
906 | } | ||
907 | } | ||
908 | } | ||
909 | |||
896 | /** | 910 | /** |
897 | * eeh_add_device_late - perform EEH initialization for the indicated pci device | 911 | * eeh_add_device_late - perform EEH initialization for the indicated pci device |
898 | * @dev: pci device for which to set up EEH | 912 | * @dev: pci device for which to set up EEH |
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index e3cbba49fd6e..b811d5ff92fe 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | static inline const char * pcid_name (struct pci_dev *pdev) | 38 | static inline const char * pcid_name (struct pci_dev *pdev) |
39 | { | 39 | { |
40 | if (pdev->dev.driver) | 40 | if (pdev && pdev->dev.driver) |
41 | return pdev->dev.driver->name; | 41 | return pdev->dev.driver->name; |
42 | return ""; | 42 | return ""; |
43 | } | 43 | } |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index bdaa8aabdaa6..f3bad900bbcf 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -106,6 +106,8 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus) | |||
106 | } | 106 | } |
107 | } | 107 | } |
108 | } | 108 | } |
109 | |||
110 | eeh_add_device_tree_late(bus); | ||
109 | } | 111 | } |
110 | EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices); | 112 | EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices); |
111 | 113 | ||
@@ -114,7 +116,6 @@ pcibios_pci_config_bridge(struct pci_dev *dev) | |||
114 | { | 116 | { |
115 | u8 sec_busno; | 117 | u8 sec_busno; |
116 | struct pci_bus *child_bus; | 118 | struct pci_bus *child_bus; |
117 | struct pci_dev *child_dev; | ||
118 | 119 | ||
119 | /* Get busno of downstream bus */ | 120 | /* Get busno of downstream bus */ |
120 | pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno); | 121 | pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno); |
@@ -129,10 +130,6 @@ pcibios_pci_config_bridge(struct pci_dev *dev) | |||
129 | 130 | ||
130 | pci_scan_child_bus(child_bus); | 131 | pci_scan_child_bus(child_bus); |
131 | 132 | ||
132 | list_for_each_entry(child_dev, &child_bus->devices, bus_list) { | ||
133 | eeh_add_device_late(child_dev); | ||
134 | } | ||
135 | |||
136 | /* Fixup new pci devices without touching bus struct */ | 133 | /* Fixup new pci devices without touching bus struct */ |
137 | pcibios_fixup_new_pci_devices(child_bus, 0); | 134 | pcibios_fixup_new_pci_devices(child_bus, 0); |
138 | 135 | ||
@@ -160,18 +157,25 @@ pcibios_add_pci_devices(struct pci_bus * bus) | |||
160 | 157 | ||
161 | eeh_add_device_tree_early(dn); | 158 | eeh_add_device_tree_early(dn); |
162 | 159 | ||
163 | /* pci_scan_slot should find all children */ | 160 | if (_machine == PLATFORM_PSERIES_LPAR) { |
164 | slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); | 161 | /* use ofdt-based probe */ |
165 | num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); | 162 | of_scan_bus(dn, bus); |
166 | if (num) { | 163 | if (!list_empty(&bus->devices)) { |
167 | pcibios_fixup_new_pci_devices(bus, 1); | 164 | pcibios_fixup_new_pci_devices(bus, 0); |
168 | pci_bus_add_devices(bus); | 165 | pci_bus_add_devices(bus); |
169 | } | 166 | } |
167 | } else { | ||
168 | /* use legacy probe */ | ||
169 | slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); | ||
170 | num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); | ||
171 | if (num) { | ||
172 | pcibios_fixup_new_pci_devices(bus, 1); | ||
173 | pci_bus_add_devices(bus); | ||
174 | } | ||
170 | 175 | ||
171 | list_for_each_entry(dev, &bus->devices, bus_list) { | 176 | list_for_each_entry(dev, &bus->devices, bus_list) |
172 | eeh_add_device_late (dev); | 177 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) |
173 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) | 178 | pcibios_pci_config_bridge(dev); |
174 | pcibios_pci_config_bridge(dev); | ||
175 | } | 179 | } |
176 | } | 180 | } |
177 | EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); | 181 | EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); |