aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/configs/85xx/ge_imp3a_defconfig1
-rw-r--r--arch/powerpc/configs/86xx/gef_ppc9a_defconfig1
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc310_defconfig1
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc610_defconfig1
-rw-r--r--arch/powerpc/configs/86xx/sbc8641d_defconfig1
-rw-r--r--arch/powerpc/configs/c2k_defconfig1
-rw-r--r--arch/powerpc/configs/ppc64_defconfig1
-rw-r--r--arch/powerpc/configs/ppc64e_defconfig1
-rw-r--r--arch/powerpc/configs/ppc6xx_defconfig1
-rw-r--r--arch/powerpc/configs/pseries_defconfig1
-rw-r--r--arch/powerpc/configs/pseries_le_defconfig1
-rw-r--r--arch/powerpc/include/asm/Kbuild1
-rw-r--r--arch/powerpc/include/asm/io.h12
-rw-r--r--arch/powerpc/include/asm/iommu.h17
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h2
-rw-r--r--arch/powerpc/include/asm/pgalloc.h3
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc64.h1
-rw-r--r--arch/powerpc/include/asm/ppc-opcode.h1
-rw-r--r--arch/powerpc/include/asm/tlb.h1
-rw-r--r--arch/powerpc/include/uapi/asm/socket.h5
-rw-r--r--arch/powerpc/kernel/dma-iommu.c8
-rw-r--r--arch/powerpc/kernel/eeh_sysfs.c2
-rw-r--r--arch/powerpc/kernel/ftrace.c2
-rw-r--r--arch/powerpc/kernel/iommu.c16
-rw-r--r--arch/powerpc/kernel/pci_64.c10
-rw-r--r--arch/powerpc/kernel/vdso32/getcpu.S4
-rw-r--r--arch/powerpc/mm/hugetlbpage.c2
-rw-r--r--arch/powerpc/mm/numa.c3
-rw-r--r--arch/powerpc/net/bpf_jit.h7
-rw-r--r--arch/powerpc/net/bpf_jit_comp.c49
-rw-r--r--arch/powerpc/oprofile/cell/spu_task_sync.c10
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c8
-rw-r--r--arch/powerpc/platforms/cell/iommu.c9
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c6
-rw-r--r--arch/powerpc/platforms/powernv/opal-hmi.c2
-rw-r--r--arch/powerpc/platforms/powernv/opal-sensor.c20
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c5
-rw-r--r--arch/powerpc/platforms/powernv/pci.c5
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c7
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c15
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c5
-rw-r--r--arch/powerpc/platforms/pseries/msi.c4
-rw-r--r--arch/powerpc/platforms/pseries/setup.c5
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c8
-rw-r--r--arch/powerpc/sysdev/mpic_pasemi_msi.c6
-rw-r--r--arch/powerpc/sysdev/mpic_u3msi.c6
-rw-r--r--arch/powerpc/sysdev/ppc4xx_hsta_msi.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_msi.c2
-rw-r--r--arch/powerpc/sysdev/xics/ics-opal.c2
-rw-r--r--arch/powerpc/sysdev/xics/ics-rtas.c2
-rw-r--r--arch/powerpc/xmon/xmon.c6
51 files changed, 155 insertions, 137 deletions
diff --git a/arch/powerpc/configs/85xx/ge_imp3a_defconfig b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
index dc939de9b5b0..b4c4b469e320 100644
--- a/arch/powerpc/configs/85xx/ge_imp3a_defconfig
+++ b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
@@ -100,7 +100,6 @@ CONFIG_NETDEVICES=y
100CONFIG_BONDING=m 100CONFIG_BONDING=m
101CONFIG_DUMMY=m 101CONFIG_DUMMY=m
102CONFIG_NETCONSOLE=y 102CONFIG_NETCONSOLE=y
103CONFIG_NETPOLL_TRAP=y
104CONFIG_TUN=m 103CONFIG_TUN=m
105# CONFIG_NET_VENDOR_3COM is not set 104# CONFIG_NET_VENDOR_3COM is not set
106CONFIG_FS_ENET=y 105CONFIG_FS_ENET=y
diff --git a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
index e5a648115ada..7cb9719abf3d 100644
--- a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
+++ b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
@@ -113,7 +113,6 @@ CONFIG_SLIP_COMPRESSED=y
113CONFIG_SLIP_SMART=y 113CONFIG_SLIP_SMART=y
114CONFIG_SLIP_MODE_SLIP6=y 114CONFIG_SLIP_MODE_SLIP6=y
115CONFIG_NETCONSOLE=y 115CONFIG_NETCONSOLE=y
116CONFIG_NETPOLL_TRAP=y
117# CONFIG_INPUT_KEYBOARD is not set 116# CONFIG_INPUT_KEYBOARD is not set
118# CONFIG_INPUT_MOUSE is not set 117# CONFIG_INPUT_MOUSE is not set
119# CONFIG_SERIO is not set 118# CONFIG_SERIO is not set
diff --git a/arch/powerpc/configs/86xx/gef_sbc310_defconfig b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
index 8317b6010ba6..ecabf625d249 100644
--- a/arch/powerpc/configs/86xx/gef_sbc310_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
@@ -114,7 +114,6 @@ CONFIG_SLIP_COMPRESSED=y
114CONFIG_SLIP_SMART=y 114CONFIG_SLIP_SMART=y
115CONFIG_SLIP_MODE_SLIP6=y 115CONFIG_SLIP_MODE_SLIP6=y
116CONFIG_NETCONSOLE=y 116CONFIG_NETCONSOLE=y
117CONFIG_NETPOLL_TRAP=y
118# CONFIG_INPUT_KEYBOARD is not set 117# CONFIG_INPUT_KEYBOARD is not set
119# CONFIG_INPUT_MOUSE is not set 118# CONFIG_INPUT_MOUSE is not set
120# CONFIG_SERIO is not set 119# CONFIG_SERIO is not set
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
index 124d66f0282c..4a4a86fb0d3d 100644
--- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
@@ -165,7 +165,6 @@ CONFIG_SLIP_COMPRESSED=y
165CONFIG_SLIP_SMART=y 165CONFIG_SLIP_SMART=y
166CONFIG_SLIP_MODE_SLIP6=y 166CONFIG_SLIP_MODE_SLIP6=y
167CONFIG_NETCONSOLE=y 167CONFIG_NETCONSOLE=y
168CONFIG_NETPOLL_TRAP=y
169CONFIG_INPUT_FF_MEMLESS=m 168CONFIG_INPUT_FF_MEMLESS=m
170# CONFIG_INPUT_KEYBOARD is not set 169# CONFIG_INPUT_KEYBOARD is not set
171# CONFIG_INPUT_MOUSE is not set 170# CONFIG_INPUT_MOUSE is not set
diff --git a/arch/powerpc/configs/86xx/sbc8641d_defconfig b/arch/powerpc/configs/86xx/sbc8641d_defconfig
index 1e151594c691..99ea8746bbaf 100644
--- a/arch/powerpc/configs/86xx/sbc8641d_defconfig
+++ b/arch/powerpc/configs/86xx/sbc8641d_defconfig
@@ -167,7 +167,6 @@ CONFIG_SLIP_COMPRESSED=y
167CONFIG_SLIP_SMART=y 167CONFIG_SLIP_SMART=y
168CONFIG_SLIP_MODE_SLIP6=y 168CONFIG_SLIP_MODE_SLIP6=y
169CONFIG_NETCONSOLE=y 169CONFIG_NETCONSOLE=y
170CONFIG_NETPOLL_TRAP=y
171# CONFIG_INPUT_KEYBOARD is not set 170# CONFIG_INPUT_KEYBOARD is not set
172# CONFIG_INPUT_MOUSE is not set 171# CONFIG_INPUT_MOUSE is not set
173# CONFIG_SERIO is not set 172# CONFIG_SERIO is not set
diff --git a/arch/powerpc/configs/c2k_defconfig b/arch/powerpc/configs/c2k_defconfig
index 59734916986a..8a08d6dcb0b4 100644
--- a/arch/powerpc/configs/c2k_defconfig
+++ b/arch/powerpc/configs/c2k_defconfig
@@ -211,7 +211,6 @@ CONFIG_MV643XX_ETH=y
211# CONFIG_NETDEV_10000 is not set 211# CONFIG_NETDEV_10000 is not set
212# CONFIG_ATM_DRIVERS is not set 212# CONFIG_ATM_DRIVERS is not set
213CONFIG_NETCONSOLE=m 213CONFIG_NETCONSOLE=m
214CONFIG_NETPOLL_TRAP=y
215# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 214# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
216CONFIG_INPUT_EVDEV=y 215CONFIG_INPUT_EVDEV=y
217# CONFIG_INPUT_KEYBOARD is not set 216# CONFIG_INPUT_KEYBOARD is not set
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 20bc5e2d368d..5830d735c5c3 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -154,7 +154,6 @@ CONFIG_WINDFARM_PM121=y
154CONFIG_BONDING=m 154CONFIG_BONDING=m
155CONFIG_DUMMY=m 155CONFIG_DUMMY=m
156CONFIG_NETCONSOLE=y 156CONFIG_NETCONSOLE=y
157CONFIG_NETPOLL_TRAP=y
158CONFIG_TUN=m 157CONFIG_TUN=m
159CONFIG_VIRTIO_NET=m 158CONFIG_VIRTIO_NET=m
160CONFIG_VHOST_NET=m 159CONFIG_VHOST_NET=m
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig
index c3a3269b0865..67885b2d70aa 100644
--- a/arch/powerpc/configs/ppc64e_defconfig
+++ b/arch/powerpc/configs/ppc64e_defconfig
@@ -103,7 +103,6 @@ CONFIG_NETDEVICES=y
103CONFIG_BONDING=m 103CONFIG_BONDING=m
104CONFIG_DUMMY=m 104CONFIG_DUMMY=m
105CONFIG_NETCONSOLE=y 105CONFIG_NETCONSOLE=y
106CONFIG_NETPOLL_TRAP=y
107CONFIG_TUN=m 106CONFIG_TUN=m
108CONFIG_VORTEX=y 107CONFIG_VORTEX=y
109CONFIG_ACENIC=y 108CONFIG_ACENIC=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index fec5870f1818..ad6d6b5af7d7 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -629,7 +629,6 @@ CONFIG_SLIP_SMART=y
629CONFIG_NET_FC=y 629CONFIG_NET_FC=y
630CONFIG_NETCONSOLE=m 630CONFIG_NETCONSOLE=m
631CONFIG_NETCONSOLE_DYNAMIC=y 631CONFIG_NETCONSOLE_DYNAMIC=y
632CONFIG_NETPOLL_TRAP=y
633CONFIG_VIRTIO_NET=m 632CONFIG_VIRTIO_NET=m
634# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 633# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
635CONFIG_INPUT_JOYDEV=m 634CONFIG_INPUT_JOYDEV=m
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index dd2a9cab4b50..1f97364017c7 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -133,7 +133,6 @@ CONFIG_DM_UEVENT=y
133CONFIG_BONDING=m 133CONFIG_BONDING=m
134CONFIG_DUMMY=m 134CONFIG_DUMMY=m
135CONFIG_NETCONSOLE=y 135CONFIG_NETCONSOLE=y
136CONFIG_NETPOLL_TRAP=y
137CONFIG_TUN=m 136CONFIG_TUN=m
138CONFIG_VIRTIO_NET=m 137CONFIG_VIRTIO_NET=m
139CONFIG_VHOST_NET=m 138CONFIG_VHOST_NET=m
diff --git a/arch/powerpc/configs/pseries_le_defconfig b/arch/powerpc/configs/pseries_le_defconfig
index d2008887eb8c..ac7ca5852827 100644
--- a/arch/powerpc/configs/pseries_le_defconfig
+++ b/arch/powerpc/configs/pseries_le_defconfig
@@ -134,7 +134,6 @@ CONFIG_DM_UEVENT=y
134CONFIG_BONDING=m 134CONFIG_BONDING=m
135CONFIG_DUMMY=m 135CONFIG_DUMMY=m
136CONFIG_NETCONSOLE=y 136CONFIG_NETCONSOLE=y
137CONFIG_NETPOLL_TRAP=y
138CONFIG_TUN=m 137CONFIG_TUN=m
139CONFIG_VIRTIO_NET=m 138CONFIG_VIRTIO_NET=m
140CONFIG_VHOST_NET=m 139CONFIG_VHOST_NET=m
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
index 31e8f59aff38..382b28e364dc 100644
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@ -1,6 +1,5 @@
1 1
2generic-y += clkdev.h 2generic-y += clkdev.h
3generic-y += hash.h
4generic-y += irq_work.h 3generic-y += irq_work.h
5generic-y += mcs_spinlock.h 4generic-y += mcs_spinlock.h
6generic-y += preempt.h 5generic-y += preempt.h
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 5f0ad8904f65..a8d2ef30d473 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -617,10 +617,14 @@ static inline void name at \
617/* 617/*
618 * We don't do relaxed operations yet, at least not with this semantic 618 * We don't do relaxed operations yet, at least not with this semantic
619 */ 619 */
620#define readb_relaxed(addr) readb(addr) 620#define readb_relaxed(addr) readb(addr)
621#define readw_relaxed(addr) readw(addr) 621#define readw_relaxed(addr) readw(addr)
622#define readl_relaxed(addr) readl(addr) 622#define readl_relaxed(addr) readl(addr)
623#define readq_relaxed(addr) readq(addr) 623#define readq_relaxed(addr) readq(addr)
624#define writeb_relaxed(v, addr) writeb(v, addr)
625#define writew_relaxed(v, addr) writew(v, addr)
626#define writel_relaxed(v, addr) writel(v, addr)
627#define writeq_relaxed(v, addr) writeq(v, addr)
624 628
625#ifdef CONFIG_PPC32 629#ifdef CONFIG_PPC32
626#define mmiowb() 630#define mmiowb()
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 42632c7a2a4e..9cfa3706a1b8 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -137,13 +137,16 @@ static inline void set_iommu_table_base_and_group(struct device *dev,
137 iommu_add_device(dev); 137 iommu_add_device(dev);
138} 138}
139 139
140extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, 140extern int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl,
141 struct scatterlist *sglist, int nelems, 141 struct scatterlist *sglist, int nelems,
142 unsigned long mask, enum dma_data_direction direction, 142 unsigned long mask,
143 struct dma_attrs *attrs); 143 enum dma_data_direction direction,
144extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, 144 struct dma_attrs *attrs);
145 int nelems, enum dma_data_direction direction, 145extern void ppc_iommu_unmap_sg(struct iommu_table *tbl,
146 struct dma_attrs *attrs); 146 struct scatterlist *sglist,
147 int nelems,
148 enum dma_data_direction direction,
149 struct dma_attrs *attrs);
147 150
148extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl, 151extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
149 size_t size, dma_addr_t *dma_handle, 152 size_t size, dma_addr_t *dma_handle,
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 4ca90a39d6d0..725247beebec 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -159,8 +159,6 @@ struct pci_dn {
159 159
160 int pci_ext_config_space; /* for pci devices */ 160 int pci_ext_config_space; /* for pci devices */
161 161
162 bool force_32bit_msi;
163
164 struct pci_dev *pcidev; /* back-pointer to the pci device */ 162 struct pci_dev *pcidev; /* back-pointer to the pci device */
165#ifdef CONFIG_EEH 163#ifdef CONFIG_EEH
166 struct eeh_dev *edev; /* eeh device */ 164 struct eeh_dev *edev; /* eeh device */
diff --git a/arch/powerpc/include/asm/pgalloc.h b/arch/powerpc/include/asm/pgalloc.h
index e9a9f60e596d..fc3ee06eab87 100644
--- a/arch/powerpc/include/asm/pgalloc.h
+++ b/arch/powerpc/include/asm/pgalloc.h
@@ -3,7 +3,6 @@
3#ifdef __KERNEL__ 3#ifdef __KERNEL__
4 4
5#include <linux/mm.h> 5#include <linux/mm.h>
6#include <asm-generic/tlb.h>
7 6
8#ifdef CONFIG_PPC_BOOK3E 7#ifdef CONFIG_PPC_BOOK3E
9extern void tlb_flush_pgtable(struct mmu_gather *tlb, unsigned long address); 8extern void tlb_flush_pgtable(struct mmu_gather *tlb, unsigned long address);
@@ -14,6 +13,8 @@ static inline void tlb_flush_pgtable(struct mmu_gather *tlb,
14} 13}
15#endif /* !CONFIG_PPC_BOOK3E */ 14#endif /* !CONFIG_PPC_BOOK3E */
16 15
16extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
17
17#ifdef CONFIG_PPC64 18#ifdef CONFIG_PPC64
18#include <asm/pgalloc-64.h> 19#include <asm/pgalloc-64.h>
19#else 20#else
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index 5600e434332f..b9dcc936e2d1 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -492,6 +492,7 @@ static inline pte_t *pmdp_ptep(pmd_t *pmd)
492} 492}
493 493
494#define pmd_pfn(pmd) pte_pfn(pmd_pte(pmd)) 494#define pmd_pfn(pmd) pte_pfn(pmd_pte(pmd))
495#define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd))
495#define pmd_young(pmd) pte_young(pmd_pte(pmd)) 496#define pmd_young(pmd) pte_young(pmd_pte(pmd))
496#define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) 497#define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd)))
497#define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) 498#define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd)))
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index 6f8536208049..1a5287759fc8 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -204,6 +204,7 @@
204#define PPC_INST_ERATSX_DOT 0x7c000127 204#define PPC_INST_ERATSX_DOT 0x7c000127
205 205
206/* Misc instructions for BPF compiler */ 206/* Misc instructions for BPF compiler */
207#define PPC_INST_LBZ 0x88000000
207#define PPC_INST_LD 0xe8000000 208#define PPC_INST_LD 0xe8000000
208#define PPC_INST_LHZ 0xa0000000 209#define PPC_INST_LHZ 0xa0000000
209#define PPC_INST_LHBRX 0x7c00062c 210#define PPC_INST_LHBRX 0x7c00062c
diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h
index e2b428b0f7ba..20733fa518ae 100644
--- a/arch/powerpc/include/asm/tlb.h
+++ b/arch/powerpc/include/asm/tlb.h
@@ -27,6 +27,7 @@
27 27
28#define tlb_start_vma(tlb, vma) do { } while (0) 28#define tlb_start_vma(tlb, vma) do { } while (0)
29#define tlb_end_vma(tlb, vma) do { } while (0) 29#define tlb_end_vma(tlb, vma) do { } while (0)
30#define __tlb_remove_tlb_entry __tlb_remove_tlb_entry
30 31
31extern void tlb_flush(struct mmu_gather *tlb); 32extern void tlb_flush(struct mmu_gather *tlb);
32 33
diff --git a/arch/powerpc/include/uapi/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h
index a9c3e2e18c05..c046666038f8 100644
--- a/arch/powerpc/include/uapi/asm/socket.h
+++ b/arch/powerpc/include/uapi/asm/socket.h
@@ -87,4 +87,9 @@
87 87
88#define SO_BPF_EXTENSIONS 48 88#define SO_BPF_EXTENSIONS 48
89 89
90#define SO_INCOMING_CPU 49
91
92#define SO_ATTACH_BPF 50
93#define SO_DETACH_BPF SO_DETACH_FILTER
94
90#endif /* _ASM_POWERPC_SOCKET_H */ 95#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index 54d0116256f7..4c68bfe4108a 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -60,16 +60,16 @@ static int dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist,
60 int nelems, enum dma_data_direction direction, 60 int nelems, enum dma_data_direction direction,
61 struct dma_attrs *attrs) 61 struct dma_attrs *attrs)
62{ 62{
63 return iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems, 63 return ppc_iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems,
64 device_to_mask(dev), direction, attrs); 64 device_to_mask(dev), direction, attrs);
65} 65}
66 66
67static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist, 67static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist,
68 int nelems, enum dma_data_direction direction, 68 int nelems, enum dma_data_direction direction,
69 struct dma_attrs *attrs) 69 struct dma_attrs *attrs)
70{ 70{
71 iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems, direction, 71 ppc_iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems,
72 attrs); 72 direction, attrs);
73} 73}
74 74
75/* We support DMA to/from any memory page via the iommu */ 75/* We support DMA to/from any memory page via the iommu */
diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sysfs.c
index f19b1e5cb060..1ceecdda810b 100644
--- a/arch/powerpc/kernel/eeh_sysfs.c
+++ b/arch/powerpc/kernel/eeh_sysfs.c
@@ -65,7 +65,7 @@ static ssize_t eeh_pe_state_show(struct device *dev,
65 return -ENODEV; 65 return -ENODEV;
66 66
67 state = eeh_ops->get_state(edev->pe, NULL); 67 state = eeh_ops->get_state(edev->pe, NULL);
68 return sprintf(buf, "%0x08x %0x08x\n", 68 return sprintf(buf, "0x%08x 0x%08x\n",
69 state, edev->pe->state); 69 state, edev->pe->state);
70} 70}
71 71
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index d7950317d3a1..44d4d8eb3c85 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -449,7 +449,7 @@ void ftrace_replace_code(int enable)
449 rec = ftrace_rec_iter_record(iter); 449 rec = ftrace_rec_iter_record(iter);
450 ret = __ftrace_replace_code(rec, enable); 450 ret = __ftrace_replace_code(rec, enable);
451 if (ret) { 451 if (ret) {
452 ftrace_bug(ret, rec->ip); 452 ftrace_bug(ret, rec);
453 return; 453 return;
454 } 454 }
455 } 455 }
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 71e60bfb89e2..5d3968c4d799 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -428,10 +428,10 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
428 ppc_md.tce_flush(tbl); 428 ppc_md.tce_flush(tbl);
429} 429}
430 430
431int iommu_map_sg(struct device *dev, struct iommu_table *tbl, 431int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl,
432 struct scatterlist *sglist, int nelems, 432 struct scatterlist *sglist, int nelems,
433 unsigned long mask, enum dma_data_direction direction, 433 unsigned long mask, enum dma_data_direction direction,
434 struct dma_attrs *attrs) 434 struct dma_attrs *attrs)
435{ 435{
436 dma_addr_t dma_next = 0, dma_addr; 436 dma_addr_t dma_next = 0, dma_addr;
437 struct scatterlist *s, *outs, *segstart; 437 struct scatterlist *s, *outs, *segstart;
@@ -539,7 +539,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
539 539
540 DBG("mapped %d elements:\n", outcount); 540 DBG("mapped %d elements:\n", outcount);
541 541
542 /* For the sake of iommu_unmap_sg, we clear out the length in the 542 /* For the sake of ppc_iommu_unmap_sg, we clear out the length in the
543 * next entry of the sglist if we didn't fill the list completely 543 * next entry of the sglist if we didn't fill the list completely
544 */ 544 */
545 if (outcount < incount) { 545 if (outcount < incount) {
@@ -572,9 +572,9 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
572} 572}
573 573
574 574
575void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, 575void ppc_iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
576 int nelems, enum dma_data_direction direction, 576 int nelems, enum dma_data_direction direction,
577 struct dma_attrs *attrs) 577 struct dma_attrs *attrs)
578{ 578{
579 struct scatterlist *sg; 579 struct scatterlist *sg;
580 580
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index ba0f2d6fc27f..60bb187cb46a 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -265,13 +265,3 @@ int pcibus_to_node(struct pci_bus *bus)
265} 265}
266EXPORT_SYMBOL(pcibus_to_node); 266EXPORT_SYMBOL(pcibus_to_node);
267#endif 267#endif
268
269static void quirk_radeon_32bit_msi(struct pci_dev *dev)
270{
271 struct pci_dn *pdn = pci_get_pdn(dev);
272
273 if (pdn)
274 pdn->force_32bit_msi = true;
275}
276DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
277DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
diff --git a/arch/powerpc/kernel/vdso32/getcpu.S b/arch/powerpc/kernel/vdso32/getcpu.S
index 23eb9a9441bd..c62be60c7274 100644
--- a/arch/powerpc/kernel/vdso32/getcpu.S
+++ b/arch/powerpc/kernel/vdso32/getcpu.S
@@ -30,8 +30,8 @@
30V_FUNCTION_BEGIN(__kernel_getcpu) 30V_FUNCTION_BEGIN(__kernel_getcpu)
31 .cfi_startproc 31 .cfi_startproc
32 mfspr r5,SPRN_SPRG_VDSO_READ 32 mfspr r5,SPRN_SPRG_VDSO_READ
33 cmpdi cr0,r3,0 33 cmpwi cr0,r3,0
34 cmpdi cr1,r4,0 34 cmpwi cr1,r4,0
35 clrlwi r6,r5,16 35 clrlwi r6,r5,16
36 rlwinm r7,r5,16,31-15,31-0 36 rlwinm r7,r5,16,31-15,31-0
37 beq cr0,1f 37 beq cr0,1f
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 868ab0fc5fbf..5ff4e07d920a 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -527,8 +527,6 @@ static void free_hugepd_range(struct mmu_gather *tlb, hugepd_t *hpdp, int pdshif
527 for (i = 0; i < num_hugepd; i++, hpdp++) 527 for (i = 0; i < num_hugepd; i++, hpdp++)
528 hpdp->pd = 0; 528 hpdp->pd = 0;
529 529
530 tlb->need_flush = 1;
531
532#ifdef CONFIG_PPC_FSL_BOOK3E 530#ifdef CONFIG_PPC_FSL_BOOK3E
533 hugepd_free(tlb, hugepte); 531 hugepd_free(tlb, hugepte);
534#else 532#else
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 417b0a523a47..0257a7d659ef 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1557,12 +1557,11 @@ static void stage_topology_update(int core_id)
1557static int dt_update_callback(struct notifier_block *nb, 1557static int dt_update_callback(struct notifier_block *nb,
1558 unsigned long action, void *data) 1558 unsigned long action, void *data)
1559{ 1559{
1560 struct of_prop_reconfig *update; 1560 struct of_reconfig_data *update = data;
1561 int rc = NOTIFY_DONE; 1561 int rc = NOTIFY_DONE;
1562 1562
1563 switch (action) { 1563 switch (action) {
1564 case OF_RECONFIG_UPDATE_PROPERTY: 1564 case OF_RECONFIG_UPDATE_PROPERTY:
1565 update = (struct of_prop_reconfig *)data;
1566 if (!of_prop_cmp(update->dn->type, "cpu") && 1565 if (!of_prop_cmp(update->dn->type, "cpu") &&
1567 !of_prop_cmp(update->prop->name, "ibm,associativity")) { 1566 !of_prop_cmp(update->prop->name, "ibm,associativity")) {
1568 u32 core_id; 1567 u32 core_id;
diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h
index 9aee27c582dc..c406aa95b2bc 100644
--- a/arch/powerpc/net/bpf_jit.h
+++ b/arch/powerpc/net/bpf_jit.h
@@ -87,6 +87,9 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
87#define PPC_STD(r, base, i) EMIT(PPC_INST_STD | ___PPC_RS(r) | \ 87#define PPC_STD(r, base, i) EMIT(PPC_INST_STD | ___PPC_RS(r) | \
88 ___PPC_RA(base) | ((i) & 0xfffc)) 88 ___PPC_RA(base) | ((i) & 0xfffc))
89 89
90
91#define PPC_LBZ(r, base, i) EMIT(PPC_INST_LBZ | ___PPC_RT(r) | \
92 ___PPC_RA(base) | IMM_L(i))
90#define PPC_LD(r, base, i) EMIT(PPC_INST_LD | ___PPC_RT(r) | \ 93#define PPC_LD(r, base, i) EMIT(PPC_INST_LD | ___PPC_RT(r) | \
91 ___PPC_RA(base) | IMM_L(i)) 94 ___PPC_RA(base) | IMM_L(i))
92#define PPC_LWZ(r, base, i) EMIT(PPC_INST_LWZ | ___PPC_RT(r) | \ 95#define PPC_LWZ(r, base, i) EMIT(PPC_INST_LWZ | ___PPC_RT(r) | \
@@ -96,6 +99,10 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
96#define PPC_LHBRX(r, base, b) EMIT(PPC_INST_LHBRX | ___PPC_RT(r) | \ 99#define PPC_LHBRX(r, base, b) EMIT(PPC_INST_LHBRX | ___PPC_RT(r) | \
97 ___PPC_RA(base) | ___PPC_RB(b)) 100 ___PPC_RA(base) | ___PPC_RB(b))
98/* Convenience helpers for the above with 'far' offsets: */ 101/* Convenience helpers for the above with 'far' offsets: */
102#define PPC_LBZ_OFFS(r, base, i) do { if ((i) < 32768) PPC_LBZ(r, base, i); \
103 else { PPC_ADDIS(r, base, IMM_HA(i)); \
104 PPC_LBZ(r, r, IMM_L(i)); } } while(0)
105
99#define PPC_LD_OFFS(r, base, i) do { if ((i) < 32768) PPC_LD(r, base, i); \ 106#define PPC_LD_OFFS(r, base, i) do { if ((i) < 32768) PPC_LD(r, base, i); \
100 else { PPC_ADDIS(r, base, IMM_HA(i)); \ 107 else { PPC_ADDIS(r, base, IMM_HA(i)); \
101 PPC_LD(r, r, IMM_L(i)); } } while(0) 108 PPC_LD(r, r, IMM_L(i)); } } while(0)
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
index cbae2dfd053c..1ca125b9c226 100644
--- a/arch/powerpc/net/bpf_jit_comp.c
+++ b/arch/powerpc/net/bpf_jit_comp.c
@@ -181,6 +181,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
181 } 181 }
182 break; 182 break;
183 case BPF_ALU | BPF_MOD | BPF_X: /* A %= X; */ 183 case BPF_ALU | BPF_MOD | BPF_X: /* A %= X; */
184 case BPF_ALU | BPF_DIV | BPF_X: /* A /= X; */
184 ctx->seen |= SEEN_XREG; 185 ctx->seen |= SEEN_XREG;
185 PPC_CMPWI(r_X, 0); 186 PPC_CMPWI(r_X, 0);
186 if (ctx->pc_ret0 != -1) { 187 if (ctx->pc_ret0 != -1) {
@@ -190,9 +191,13 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
190 PPC_LI(r_ret, 0); 191 PPC_LI(r_ret, 0);
191 PPC_JMP(exit_addr); 192 PPC_JMP(exit_addr);
192 } 193 }
193 PPC_DIVWU(r_scratch1, r_A, r_X); 194 if (code == (BPF_ALU | BPF_MOD | BPF_X)) {
194 PPC_MUL(r_scratch1, r_X, r_scratch1); 195 PPC_DIVWU(r_scratch1, r_A, r_X);
195 PPC_SUB(r_A, r_A, r_scratch1); 196 PPC_MUL(r_scratch1, r_X, r_scratch1);
197 PPC_SUB(r_A, r_A, r_scratch1);
198 } else {
199 PPC_DIVWU(r_A, r_A, r_X);
200 }
196 break; 201 break;
197 case BPF_ALU | BPF_MOD | BPF_K: /* A %= K; */ 202 case BPF_ALU | BPF_MOD | BPF_K: /* A %= K; */
198 PPC_LI32(r_scratch2, K); 203 PPC_LI32(r_scratch2, K);
@@ -200,22 +205,6 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
200 PPC_MUL(r_scratch1, r_scratch2, r_scratch1); 205 PPC_MUL(r_scratch1, r_scratch2, r_scratch1);
201 PPC_SUB(r_A, r_A, r_scratch1); 206 PPC_SUB(r_A, r_A, r_scratch1);
202 break; 207 break;
203 case BPF_ALU | BPF_DIV | BPF_X: /* A /= X; */
204 ctx->seen |= SEEN_XREG;
205 PPC_CMPWI(r_X, 0);
206 if (ctx->pc_ret0 != -1) {
207 PPC_BCC(COND_EQ, addrs[ctx->pc_ret0]);
208 } else {
209 /*
210 * Exit, returning 0; first pass hits here
211 * (longer worst-case code size).
212 */
213 PPC_BCC_SHORT(COND_NE, (ctx->idx*4)+12);
214 PPC_LI(r_ret, 0);
215 PPC_JMP(exit_addr);
216 }
217 PPC_DIVWU(r_A, r_A, r_X);
218 break;
219 case BPF_ALU | BPF_DIV | BPF_K: /* A /= K */ 208 case BPF_ALU | BPF_DIV | BPF_K: /* A /= K */
220 if (K == 1) 209 if (K == 1)
221 break; 210 break;
@@ -361,6 +350,11 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
361 protocol)); 350 protocol));
362 break; 351 break;
363 case BPF_ANC | SKF_AD_IFINDEX: 352 case BPF_ANC | SKF_AD_IFINDEX:
353 case BPF_ANC | SKF_AD_HATYPE:
354 BUILD_BUG_ON(FIELD_SIZEOF(struct net_device,
355 ifindex) != 4);
356 BUILD_BUG_ON(FIELD_SIZEOF(struct net_device,
357 type) != 2);
364 PPC_LD_OFFS(r_scratch1, r_skb, offsetof(struct sk_buff, 358 PPC_LD_OFFS(r_scratch1, r_skb, offsetof(struct sk_buff,
365 dev)); 359 dev));
366 PPC_CMPDI(r_scratch1, 0); 360 PPC_CMPDI(r_scratch1, 0);
@@ -368,14 +362,18 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
368 PPC_BCC(COND_EQ, addrs[ctx->pc_ret0]); 362 PPC_BCC(COND_EQ, addrs[ctx->pc_ret0]);
369 } else { 363 } else {
370 /* Exit, returning 0; first pass hits here. */ 364 /* Exit, returning 0; first pass hits here. */
371 PPC_BCC_SHORT(COND_NE, (ctx->idx*4)+12); 365 PPC_BCC_SHORT(COND_NE, ctx->idx * 4 + 12);
372 PPC_LI(r_ret, 0); 366 PPC_LI(r_ret, 0);
373 PPC_JMP(exit_addr); 367 PPC_JMP(exit_addr);
374 } 368 }
375 BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, 369 if (code == (BPF_ANC | SKF_AD_IFINDEX)) {
376 ifindex) != 4); 370 PPC_LWZ_OFFS(r_A, r_scratch1,
377 PPC_LWZ_OFFS(r_A, r_scratch1,
378 offsetof(struct net_device, ifindex)); 371 offsetof(struct net_device, ifindex));
372 } else {
373 PPC_LHZ_OFFS(r_A, r_scratch1,
374 offsetof(struct net_device, type));
375 }
376
379 break; 377 break;
380 case BPF_ANC | SKF_AD_MARK: 378 case BPF_ANC | SKF_AD_MARK:
381 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4); 379 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4);
@@ -407,6 +405,11 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
407 PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, 405 PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
408 queue_mapping)); 406 queue_mapping));
409 break; 407 break;
408 case BPF_ANC | SKF_AD_PKTTYPE:
409 PPC_LBZ_OFFS(r_A, r_skb, PKT_TYPE_OFFSET());
410 PPC_ANDI(r_A, r_A, PKT_TYPE_MAX);
411 PPC_SRWI(r_A, r_A, 5);
412 break;
410 case BPF_ANC | SKF_AD_CPU: 413 case BPF_ANC | SKF_AD_CPU:
411#ifdef CONFIG_SMP 414#ifdef CONFIG_SMP
412 /* 415 /*
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
index 28f1af2db1f5..1c27831df1ac 100644
--- a/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -331,8 +331,7 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp,
331 331
332 if (mm->exe_file) { 332 if (mm->exe_file) {
333 app_cookie = fast_get_dcookie(&mm->exe_file->f_path); 333 app_cookie = fast_get_dcookie(&mm->exe_file->f_path);
334 pr_debug("got dcookie for %s\n", 334 pr_debug("got dcookie for %pD\n", mm->exe_file);
335 mm->exe_file->f_dentry->d_name.name);
336 } 335 }
337 336
338 for (vma = mm->mmap; vma; vma = vma->vm_next) { 337 for (vma = mm->mmap; vma; vma = vma->vm_next) {
@@ -342,15 +341,14 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp,
342 if (!vma->vm_file) 341 if (!vma->vm_file)
343 goto fail_no_image_cookie; 342 goto fail_no_image_cookie;
344 343
345 pr_debug("Found spu ELF at %X(object-id:%lx) for file %s\n", 344 pr_debug("Found spu ELF at %X(object-id:%lx) for file %pD\n",
346 my_offset, spu_ref, 345 my_offset, spu_ref, vma->vm_file);
347 vma->vm_file->f_dentry->d_name.name);
348 *offsetp = my_offset; 346 *offsetp = my_offset;
349 break; 347 break;
350 } 348 }
351 349
352 *spu_bin_dcookie = fast_get_dcookie(&vma->vm_file->f_path); 350 *spu_bin_dcookie = fast_get_dcookie(&vma->vm_file->f_path);
353 pr_debug("got dcookie for %s\n", vma->vm_file->f_dentry->d_name.name); 351 pr_debug("got dcookie for %pD\n", vma->vm_file);
354 352
355 up_read(&mm->mmap_sem); 353 up_read(&mm->mmap_sem);
356 354
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 862b32702d29..0883994df384 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -279,7 +279,7 @@ static int axon_msi_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
279 279
280 irq_set_msi_desc(virq, entry); 280 irq_set_msi_desc(virq, entry);
281 msg.data = virq; 281 msg.data = virq;
282 write_msi_msg(virq, &msg); 282 pci_write_msi_msg(virq, &msg);
283 } 283 }
284 284
285 return 0; 285 return 0;
@@ -301,9 +301,9 @@ static void axon_msi_teardown_msi_irqs(struct pci_dev *dev)
301} 301}
302 302
303static struct irq_chip msic_irq_chip = { 303static struct irq_chip msic_irq_chip = {
304 .irq_mask = mask_msi_irq, 304 .irq_mask = pci_msi_mask_irq,
305 .irq_unmask = unmask_msi_irq, 305 .irq_unmask = pci_msi_unmask_irq,
306 .irq_shutdown = mask_msi_irq, 306 .irq_shutdown = pci_msi_mask_irq,
307 .name = "AXON-MSI", 307 .name = "AXON-MSI",
308}; 308};
309 309
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 2b90ff8a93be..c7c8720aa39f 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -621,8 +621,9 @@ static int dma_fixed_map_sg(struct device *dev, struct scatterlist *sg,
621 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)) 621 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
622 return dma_direct_ops.map_sg(dev, sg, nents, direction, attrs); 622 return dma_direct_ops.map_sg(dev, sg, nents, direction, attrs);
623 else 623 else
624 return iommu_map_sg(dev, cell_get_iommu_table(dev), sg, nents, 624 return ppc_iommu_map_sg(dev, cell_get_iommu_table(dev), sg,
625 device_to_mask(dev), direction, attrs); 625 nents, device_to_mask(dev),
626 direction, attrs);
626} 627}
627 628
628static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg, 629static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
@@ -632,8 +633,8 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
632 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)) 633 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
633 dma_direct_ops.unmap_sg(dev, sg, nents, direction, attrs); 634 dma_direct_ops.unmap_sg(dev, sg, nents, direction, attrs);
634 else 635 else
635 iommu_unmap_sg(cell_get_iommu_table(dev), sg, nents, direction, 636 ppc_iommu_unmap_sg(cell_get_iommu_table(dev), sg, nents,
636 attrs); 637 direction, attrs);
637} 638}
638 639
639static int dma_fixed_dma_supported(struct device *dev, u64 mask) 640static int dma_fixed_dma_supported(struct device *dev, u64 mask)
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 87ba7cf99cd7..1a3429e1ccb5 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -164,7 +164,7 @@ static void spufs_prune_dir(struct dentry *dir)
164 struct dentry *dentry, *tmp; 164 struct dentry *dentry, *tmp;
165 165
166 mutex_lock(&dir->d_inode->i_mutex); 166 mutex_lock(&dir->d_inode->i_mutex);
167 list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_u.d_child) { 167 list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) {
168 spin_lock(&dentry->d_lock); 168 spin_lock(&dentry->d_lock);
169 if (!(d_unhashed(dentry)) && dentry->d_inode) { 169 if (!(d_unhashed(dentry)) && dentry->d_inode) {
170 dget_dlock(dentry); 170 dget_dlock(dentry);
@@ -301,7 +301,7 @@ static int spufs_context_open(struct path *path)
301 int ret; 301 int ret;
302 struct file *filp; 302 struct file *filp;
303 303
304 ret = get_unused_fd(); 304 ret = get_unused_fd_flags(0);
305 if (ret < 0) 305 if (ret < 0)
306 return ret; 306 return ret;
307 307
@@ -518,7 +518,7 @@ static int spufs_gang_open(struct path *path)
518 int ret; 518 int ret;
519 struct file *filp; 519 struct file *filp;
520 520
521 ret = get_unused_fd(); 521 ret = get_unused_fd_flags(0);
522 if (ret < 0) 522 if (ret < 0)
523 return ret; 523 return ret;
524 524
diff --git a/arch/powerpc/platforms/powernv/opal-hmi.c b/arch/powerpc/platforms/powernv/opal-hmi.c
index 5e1ed1575aab..b322bfb51343 100644
--- a/arch/powerpc/platforms/powernv/opal-hmi.c
+++ b/arch/powerpc/platforms/powernv/opal-hmi.c
@@ -57,7 +57,7 @@ static void print_hmi_event_info(struct OpalHMIEvent *hmi_evt)
57 }; 57 };
58 58
59 /* Print things out */ 59 /* Print things out */
60 if (hmi_evt->version != OpalHMIEvt_V1) { 60 if (hmi_evt->version < OpalHMIEvt_V1) {
61 pr_err("HMI Interrupt, Unknown event version %d !\n", 61 pr_err("HMI Interrupt, Unknown event version %d !\n",
62 hmi_evt->version); 62 hmi_evt->version);
63 return; 63 return;
diff --git a/arch/powerpc/platforms/powernv/opal-sensor.c b/arch/powerpc/platforms/powernv/opal-sensor.c
index 10271ad1fac4..4ab67ef7abc9 100644
--- a/arch/powerpc/platforms/powernv/opal-sensor.c
+++ b/arch/powerpc/platforms/powernv/opal-sensor.c
@@ -20,7 +20,9 @@
20 20
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/mutex.h> 22#include <linux/mutex.h>
23#include <linux/of_platform.h>
23#include <asm/opal.h> 24#include <asm/opal.h>
25#include <asm/machdep.h>
24 26
25static DEFINE_MUTEX(opal_sensor_mutex); 27static DEFINE_MUTEX(opal_sensor_mutex);
26 28
@@ -64,3 +66,21 @@ out:
64 return ret; 66 return ret;
65} 67}
66EXPORT_SYMBOL_GPL(opal_get_sensor_data); 68EXPORT_SYMBOL_GPL(opal_get_sensor_data);
69
70static __init int opal_sensor_init(void)
71{
72 struct platform_device *pdev;
73 struct device_node *sensor;
74
75 sensor = of_find_node_by_path("/ibm,opal/sensors");
76 if (!sensor) {
77 pr_err("Opal node 'sensors' not found\n");
78 return -ENODEV;
79 }
80
81 pdev = of_platform_device_create(sensor, "opal-sensor", NULL);
82 of_node_put(sensor);
83
84 return PTR_ERR_OR_ZERO(pdev);
85}
86machine_subsys_initcall(powernv, opal_sensor_init);
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index cc861c14840d..fac88ed8a915 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1614,7 +1614,6 @@ static int pnv_pci_ioda_msi_setup(struct pnv_phb *phb, struct pci_dev *dev,
1614 unsigned int is_64, struct msi_msg *msg) 1614 unsigned int is_64, struct msi_msg *msg)
1615{ 1615{
1616 struct pnv_ioda_pe *pe = pnv_ioda_get_pe(dev); 1616 struct pnv_ioda_pe *pe = pnv_ioda_get_pe(dev);
1617 struct pci_dn *pdn = pci_get_pdn(dev);
1618 unsigned int xive_num = hwirq - phb->msi_base; 1617 unsigned int xive_num = hwirq - phb->msi_base;
1619 __be32 data; 1618 __be32 data;
1620 int rc; 1619 int rc;
@@ -1628,7 +1627,7 @@ static int pnv_pci_ioda_msi_setup(struct pnv_phb *phb, struct pci_dev *dev,
1628 return -ENXIO; 1627 return -ENXIO;
1629 1628
1630 /* Force 32-bit MSI on some broken devices */ 1629 /* Force 32-bit MSI on some broken devices */
1631 if (pdn && pdn->force_32bit_msi) 1630 if (dev->no_64bit_msi)
1632 is_64 = 0; 1631 is_64 = 0;
1633 1632
1634 /* Assign XIVE to PE */ 1633 /* Assign XIVE to PE */
@@ -2096,7 +2095,7 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
2096 if (is_kdump_kernel()) { 2095 if (is_kdump_kernel()) {
2097 pr_info(" Issue PHB reset ...\n"); 2096 pr_info(" Issue PHB reset ...\n");
2098 ioda_eeh_phb_reset(hose, EEH_RESET_FUNDAMENTAL); 2097 ioda_eeh_phb_reset(hose, EEH_RESET_FUNDAMENTAL);
2099 ioda_eeh_phb_reset(hose, OPAL_DEASSERT_RESET); 2098 ioda_eeh_phb_reset(hose, EEH_RESET_DEACTIVATE);
2100 } 2099 }
2101 2100
2102 /* Remove M64 resource if we can't configure it successfully */ 2101 /* Remove M64 resource if we can't configure it successfully */
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index ba7452708db3..4945e87f12dc 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -49,7 +49,6 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
49{ 49{
50 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 50 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
51 struct pnv_phb *phb = hose->private_data; 51 struct pnv_phb *phb = hose->private_data;
52 struct pci_dn *pdn = pci_get_pdn(pdev);
53 struct msi_desc *entry; 52 struct msi_desc *entry;
54 struct msi_msg msg; 53 struct msi_msg msg;
55 int hwirq; 54 int hwirq;
@@ -59,7 +58,7 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
59 if (WARN_ON(!phb) || !phb->msi_bmp.bitmap) 58 if (WARN_ON(!phb) || !phb->msi_bmp.bitmap)
60 return -ENODEV; 59 return -ENODEV;
61 60
62 if (pdn && pdn->force_32bit_msi && !phb->msi32_support) 61 if (pdev->no_64bit_msi && !phb->msi32_support)
63 return -ENODEV; 62 return -ENODEV;
64 63
65 list_for_each_entry(entry, &pdev->msi_list, list) { 64 list_for_each_entry(entry, &pdev->msi_list, list) {
@@ -90,7 +89,7 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
90 return rc; 89 return rc;
91 } 90 }
92 irq_set_msi_desc(virq, entry); 91 irq_set_msi_desc(virq, entry);
93 write_msi_msg(virq, &msg); 92 pci_write_msi_msg(virq, &msg);
94 } 93 }
95 return 0; 94 return 0;
96} 95}
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 5c375f93c669..f30cf4d136a4 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -340,16 +340,17 @@ static void pseries_remove_processor(struct device_node *np)
340} 340}
341 341
342static int pseries_smp_notifier(struct notifier_block *nb, 342static int pseries_smp_notifier(struct notifier_block *nb,
343 unsigned long action, void *node) 343 unsigned long action, void *data)
344{ 344{
345 struct of_reconfig_data *rd = data;
345 int err = 0; 346 int err = 0;
346 347
347 switch (action) { 348 switch (action) {
348 case OF_RECONFIG_ATTACH_NODE: 349 case OF_RECONFIG_ATTACH_NODE:
349 err = pseries_add_processor(node); 350 err = pseries_add_processor(rd->dn);
350 break; 351 break;
351 case OF_RECONFIG_DETACH_NODE: 352 case OF_RECONFIG_DETACH_NODE:
352 pseries_remove_processor(node); 353 pseries_remove_processor(rd->dn);
353 break; 354 break;
354 } 355 }
355 return notifier_from_errno(err); 356 return notifier_from_errno(err);
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index 3cb256c2138e..fa41f0da5b6f 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -166,7 +166,7 @@ static int pseries_add_mem_node(struct device_node *np)
166 return (ret < 0) ? -EINVAL : 0; 166 return (ret < 0) ? -EINVAL : 0;
167} 167}
168 168
169static int pseries_update_drconf_memory(struct of_prop_reconfig *pr) 169static int pseries_update_drconf_memory(struct of_reconfig_data *pr)
170{ 170{
171 struct of_drconf_cell *new_drmem, *old_drmem; 171 struct of_drconf_cell *new_drmem, *old_drmem;
172 unsigned long memblock_size; 172 unsigned long memblock_size;
@@ -215,22 +215,21 @@ static int pseries_update_drconf_memory(struct of_prop_reconfig *pr)
215} 215}
216 216
217static int pseries_memory_notifier(struct notifier_block *nb, 217static int pseries_memory_notifier(struct notifier_block *nb,
218 unsigned long action, void *node) 218 unsigned long action, void *data)
219{ 219{
220 struct of_prop_reconfig *pr; 220 struct of_reconfig_data *rd = data;
221 int err = 0; 221 int err = 0;
222 222
223 switch (action) { 223 switch (action) {
224 case OF_RECONFIG_ATTACH_NODE: 224 case OF_RECONFIG_ATTACH_NODE:
225 err = pseries_add_mem_node(node); 225 err = pseries_add_mem_node(rd->dn);
226 break; 226 break;
227 case OF_RECONFIG_DETACH_NODE: 227 case OF_RECONFIG_DETACH_NODE:
228 err = pseries_remove_mem_node(node); 228 err = pseries_remove_mem_node(rd->dn);
229 break; 229 break;
230 case OF_RECONFIG_UPDATE_PROPERTY: 230 case OF_RECONFIG_UPDATE_PROPERTY:
231 pr = (struct of_prop_reconfig *)node; 231 if (!strcmp(rd->prop->name, "ibm,dynamic-memory"))
232 if (!strcmp(pr->prop->name, "ibm,dynamic-memory")) 232 err = pseries_update_drconf_memory(rd);
233 err = pseries_update_drconf_memory(pr);
234 break; 233 break;
235 } 234 }
236 return notifier_from_errno(err); 235 return notifier_from_errno(err);
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 1cc3db95ee71..1d3d52dc3ff3 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -1250,10 +1250,11 @@ static struct notifier_block iommu_mem_nb = {
1250 .notifier_call = iommu_mem_notifier, 1250 .notifier_call = iommu_mem_notifier,
1251}; 1251};
1252 1252
1253static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) 1253static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *data)
1254{ 1254{
1255 int err = NOTIFY_OK; 1255 int err = NOTIFY_OK;
1256 struct device_node *np = node; 1256 struct of_reconfig_data *rd = data;
1257 struct device_node *np = rd->dn;
1257 struct pci_dn *pci = PCI_DN(np); 1258 struct pci_dn *pci = PCI_DN(np);
1258 struct direct_window *window; 1259 struct direct_window *window;
1259 1260
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 8ab5add4ac82..691a154c286d 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -420,7 +420,7 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec_in, int type)
420 */ 420 */
421again: 421again:
422 if (type == PCI_CAP_ID_MSI) { 422 if (type == PCI_CAP_ID_MSI) {
423 if (pdn->force_32bit_msi) { 423 if (pdev->no_64bit_msi) {
424 rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, nvec); 424 rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, nvec);
425 if (rc < 0) { 425 if (rc < 0) {
426 /* 426 /*
@@ -476,7 +476,7 @@ again:
476 irq_set_msi_desc(virq, entry); 476 irq_set_msi_desc(virq, entry);
477 477
478 /* Read config space back so we can restore after reset */ 478 /* Read config space back so we can restore after reset */
479 __read_msi_msg(entry, &msg); 479 __pci_read_msi_msg(entry, &msg);
480 entry->msg = msg; 480 entry->msg = msg;
481 } 481 }
482 482
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 8b8fb19a4097..e445b6701f50 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -251,9 +251,10 @@ static void __init pseries_discover_pic(void)
251 " interrupt-controller\n"); 251 " interrupt-controller\n");
252} 252}
253 253
254static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) 254static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *data)
255{ 255{
256 struct device_node *np = node; 256 struct of_reconfig_data *rd = data;
257 struct device_node *np = rd->dn;
257 struct pci_dn *pci = NULL; 258 struct pci_dn *pci = NULL;
258 int err = NOTIFY_OK; 259 int err = NOTIFY_OK;
259 260
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 8f37204bf94f..d09f4fa2c3d1 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -81,8 +81,8 @@ static void fsl_msi_print_chip(struct irq_data *irqd, struct seq_file *p)
81 81
82 82
83static struct irq_chip fsl_msi_chip = { 83static struct irq_chip fsl_msi_chip = {
84 .irq_mask = mask_msi_irq, 84 .irq_mask = pci_msi_mask_irq,
85 .irq_unmask = unmask_msi_irq, 85 .irq_unmask = pci_msi_unmask_irq,
86 .irq_ack = fsl_msi_end_irq, 86 .irq_ack = fsl_msi_end_irq,
87 .irq_print_chip = fsl_msi_print_chip, 87 .irq_print_chip = fsl_msi_print_chip,
88}; 88};
@@ -241,7 +241,7 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
241 irq_set_msi_desc(virq, entry); 241 irq_set_msi_desc(virq, entry);
242 242
243 fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data); 243 fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data);
244 write_msi_msg(virq, &msg); 244 pci_write_msi_msg(virq, &msg);
245 } 245 }
246 return 0; 246 return 0;
247 247
@@ -360,7 +360,7 @@ static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
360 cascade_data->virq = virt_msir; 360 cascade_data->virq = virt_msir;
361 msi->cascade_array[irq_index] = cascade_data; 361 msi->cascade_array[irq_index] = cascade_data;
362 362
363 ret = request_irq(virt_msir, fsl_msi_cascade, 0, 363 ret = request_irq(virt_msir, fsl_msi_cascade, IRQF_NO_THREAD,
364 "fsl-msi-cascade", cascade_data); 364 "fsl-msi-cascade", cascade_data);
365 if (ret) { 365 if (ret) {
366 dev_err(&dev->dev, "failed to request_irq(%d), ret = %d\n", 366 dev_err(&dev->dev, "failed to request_irq(%d), ret = %d\n",
diff --git a/arch/powerpc/sysdev/mpic_pasemi_msi.c b/arch/powerpc/sysdev/mpic_pasemi_msi.c
index 428de9d23120..a3f660eed6de 100644
--- a/arch/powerpc/sysdev/mpic_pasemi_msi.c
+++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c
@@ -41,7 +41,7 @@ static struct mpic *msi_mpic;
41static void mpic_pasemi_msi_mask_irq(struct irq_data *data) 41static void mpic_pasemi_msi_mask_irq(struct irq_data *data)
42{ 42{
43 pr_debug("mpic_pasemi_msi_mask_irq %d\n", data->irq); 43 pr_debug("mpic_pasemi_msi_mask_irq %d\n", data->irq);
44 mask_msi_irq(data); 44 pci_msi_mask_irq(data);
45 mpic_mask_irq(data); 45 mpic_mask_irq(data);
46} 46}
47 47
@@ -49,7 +49,7 @@ static void mpic_pasemi_msi_unmask_irq(struct irq_data *data)
49{ 49{
50 pr_debug("mpic_pasemi_msi_unmask_irq %d\n", data->irq); 50 pr_debug("mpic_pasemi_msi_unmask_irq %d\n", data->irq);
51 mpic_unmask_irq(data); 51 mpic_unmask_irq(data);
52 unmask_msi_irq(data); 52 pci_msi_unmask_irq(data);
53} 53}
54 54
55static struct irq_chip mpic_pasemi_msi_chip = { 55static struct irq_chip mpic_pasemi_msi_chip = {
@@ -135,7 +135,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
135 * register to generate MSI [512...1023] 135 * register to generate MSI [512...1023]
136 */ 136 */
137 msg.data = hwirq-0x200; 137 msg.data = hwirq-0x200;
138 write_msi_msg(virq, &msg); 138 pci_write_msi_msg(virq, &msg);
139 } 139 }
140 140
141 return 0; 141 return 0;
diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index 4ce8f54f234c..b2cef1809389 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -24,14 +24,14 @@ static struct mpic *msi_mpic;
24 24
25static void mpic_u3msi_mask_irq(struct irq_data *data) 25static void mpic_u3msi_mask_irq(struct irq_data *data)
26{ 26{
27 mask_msi_irq(data); 27 pci_msi_mask_irq(data);
28 mpic_mask_irq(data); 28 mpic_mask_irq(data);
29} 29}
30 30
31static void mpic_u3msi_unmask_irq(struct irq_data *data) 31static void mpic_u3msi_unmask_irq(struct irq_data *data)
32{ 32{
33 mpic_unmask_irq(data); 33 mpic_unmask_irq(data);
34 unmask_msi_irq(data); 34 pci_msi_unmask_irq(data);
35} 35}
36 36
37static struct irq_chip mpic_u3msi_chip = { 37static struct irq_chip mpic_u3msi_chip = {
@@ -170,7 +170,7 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
170 printk("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n", 170 printk("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n",
171 virq, hwirq, (unsigned long)addr); 171 virq, hwirq, (unsigned long)addr);
172 msg.data = hwirq; 172 msg.data = hwirq;
173 write_msi_msg(virq, &msg); 173 pci_write_msi_msg(virq, &msg);
174 174
175 hwirq++; 175 hwirq++;
176 } 176 }
diff --git a/arch/powerpc/sysdev/ppc4xx_hsta_msi.c b/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
index a6a4dbda9078..908105f835d1 100644
--- a/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
+++ b/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
@@ -85,7 +85,7 @@ static int hsta_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
85 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); 85 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1);
86 return -EINVAL; 86 return -EINVAL;
87 } 87 }
88 write_msi_msg(hwirq, &msg); 88 pci_write_msi_msg(hwirq, &msg);
89 } 89 }
90 90
91 return 0; 91 return 0;
diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c
index a59f2890897a..5e622c0544c4 100644
--- a/arch/powerpc/sysdev/ppc4xx_msi.c
+++ b/arch/powerpc/sysdev/ppc4xx_msi.c
@@ -115,7 +115,7 @@ static int ppc4xx_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
115 115
116 irq_set_msi_desc(virq, entry); 116 irq_set_msi_desc(virq, entry);
117 msg.data = int_no; 117 msg.data = int_no;
118 write_msi_msg(virq, &msg); 118 pci_write_msi_msg(virq, &msg);
119 } 119 }
120 return 0; 120 return 0;
121} 121}
diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
index 3c6ee1b64e5d..4ba554ec8eaf 100644
--- a/arch/powerpc/sysdev/xics/ics-opal.c
+++ b/arch/powerpc/sysdev/xics/ics-opal.c
@@ -73,7 +73,7 @@ static unsigned int ics_opal_startup(struct irq_data *d)
73 * at that level, so we do it here by hand. 73 * at that level, so we do it here by hand.
74 */ 74 */
75 if (d->msi_desc) 75 if (d->msi_desc)
76 unmask_msi_irq(d); 76 pci_msi_unmask_irq(d);
77#endif 77#endif
78 78
79 /* unmask it */ 79 /* unmask it */
diff --git a/arch/powerpc/sysdev/xics/ics-rtas.c b/arch/powerpc/sysdev/xics/ics-rtas.c
index 936575d99c5c..bc81335b2cbc 100644
--- a/arch/powerpc/sysdev/xics/ics-rtas.c
+++ b/arch/powerpc/sysdev/xics/ics-rtas.c
@@ -76,7 +76,7 @@ static unsigned int ics_rtas_startup(struct irq_data *d)
76 * at that level, so we do it here by hand. 76 * at that level, so we do it here by hand.
77 */ 77 */
78 if (d->msi_desc) 78 if (d->msi_desc)
79 unmask_msi_irq(d); 79 pci_msi_unmask_irq(d);
80#endif 80#endif
81 /* unmask it */ 81 /* unmask it */
82 ics_rtas_unmask_irq(d); 82 ics_rtas_unmask_irq(d);
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index dfe337238699..5b150f0c5df9 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -337,10 +337,10 @@ static inline void disable_surveillance(void)
337 args.token = rtas_token("set-indicator"); 337 args.token = rtas_token("set-indicator");
338 if (args.token == RTAS_UNKNOWN_SERVICE) 338 if (args.token == RTAS_UNKNOWN_SERVICE)
339 return; 339 return;
340 args.nargs = 3; 340 args.nargs = cpu_to_be32(3);
341 args.nret = 1; 341 args.nret = cpu_to_be32(1);
342 args.rets = &args.args[3]; 342 args.rets = &args.args[3];
343 args.args[0] = SURVEILLANCE_TOKEN; 343 args.args[0] = cpu_to_be32(SURVEILLANCE_TOKEN);
344 args.args[1] = 0; 344 args.args[1] = 0;
345 args.args[2] = 0; 345 args.args[2] = 0;
346 enter_rtas(__pa(&args)); 346 enter_rtas(__pa(&args));