aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-12 00:43:32 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-12 00:43:32 -0400
commitb6ec995a21a9428aef620b5adf46d047a18d88b8 (patch)
tree6719121e6605cbca524b687f47336b9bbf3b8d41 /arch/ppc64
parent3a5f8c5f788d68e325d9fe3c26f4df5a5aee838a (diff)
parentda64c6ee6bb71bfb3f09d9bb89ce1aa4b1ee7e89 (diff)
Merge from Linus' tree
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/bpa_iommu.c8
-rw-r--r--arch/ppc64/kernel/dma.c2
-rw-r--r--arch/ppc64/kernel/iommu.c2
-rw-r--r--arch/ppc64/kernel/kprobes.c8
-rw-r--r--arch/ppc64/kernel/module.c13
-rw-r--r--arch/ppc64/kernel/pci_direct_iommu.c2
-rw-r--r--arch/ppc64/kernel/pci_iommu.c2
-rw-r--r--arch/ppc64/kernel/vio.c2
8 files changed, 28 insertions, 11 deletions
diff --git a/arch/ppc64/kernel/bpa_iommu.c b/arch/ppc64/kernel/bpa_iommu.c
index 45ebe5486c40..da1b4b7a3269 100644
--- a/arch/ppc64/kernel/bpa_iommu.c
+++ b/arch/ppc64/kernel/bpa_iommu.c
@@ -99,7 +99,11 @@ get_iost_entry(unsigned long iopt_base, unsigned long io_address, unsigned page_
99 break; 99 break;
100 100
101 default: /* not a known compile time constant */ 101 default: /* not a known compile time constant */
102 BUG_ON(1); 102 {
103 /* BUILD_BUG_ON() is not usable here */
104 extern void __get_iost_entry_bad_page_size(void);
105 __get_iost_entry_bad_page_size();
106 }
103 break; 107 break;
104 } 108 }
105 109
@@ -306,7 +310,7 @@ static void bpa_map_iommu(void)
306 310
307 311
308static void *bpa_alloc_coherent(struct device *hwdev, size_t size, 312static void *bpa_alloc_coherent(struct device *hwdev, size_t size,
309 dma_addr_t *dma_handle, unsigned int __nocast flag) 313 dma_addr_t *dma_handle, gfp_t flag)
310{ 314{
311 void *ret; 315 void *ret;
312 316
diff --git a/arch/ppc64/kernel/dma.c b/arch/ppc64/kernel/dma.c
index 4da8e31b2b61..7c3419656ccc 100644
--- a/arch/ppc64/kernel/dma.c
+++ b/arch/ppc64/kernel/dma.c
@@ -53,7 +53,7 @@ int dma_set_mask(struct device *dev, u64 dma_mask)
53EXPORT_SYMBOL(dma_set_mask); 53EXPORT_SYMBOL(dma_set_mask);
54 54
55void *dma_alloc_coherent(struct device *dev, size_t size, 55void *dma_alloc_coherent(struct device *dev, size_t size,
56 dma_addr_t *dma_handle, unsigned int __nocast flag) 56 dma_addr_t *dma_handle, gfp_t flag)
57{ 57{
58 struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 58 struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
59 59
diff --git a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c
index 9032b6bfe036..4d9b4388918b 100644
--- a/arch/ppc64/kernel/iommu.c
+++ b/arch/ppc64/kernel/iommu.c
@@ -519,7 +519,7 @@ void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
519 * to the dma address (mapping) of the first page. 519 * to the dma address (mapping) of the first page.
520 */ 520 */
521void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, 521void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
522 dma_addr_t *dma_handle, unsigned int __nocast flag) 522 dma_addr_t *dma_handle, gfp_t flag)
523{ 523{
524 void *ret = NULL; 524 void *ret = NULL;
525 dma_addr_t mapping; 525 dma_addr_t mapping;
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c
index abb90e67534a..ed876a5178ae 100644
--- a/arch/ppc64/kernel/kprobes.c
+++ b/arch/ppc64/kernel/kprobes.c
@@ -59,9 +59,9 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
59 59
60 /* insn must be on a special executable page on ppc64 */ 60 /* insn must be on a special executable page on ppc64 */
61 if (!ret) { 61 if (!ret) {
62 up(&kprobe_mutex);
63 p->ainsn.insn = get_insn_slot();
64 down(&kprobe_mutex); 62 down(&kprobe_mutex);
63 p->ainsn.insn = get_insn_slot();
64 up(&kprobe_mutex);
65 if (!p->ainsn.insn) 65 if (!p->ainsn.insn)
66 ret = -ENOMEM; 66 ret = -ENOMEM;
67 } 67 }
@@ -90,9 +90,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
90 90
91void __kprobes arch_remove_kprobe(struct kprobe *p) 91void __kprobes arch_remove_kprobe(struct kprobe *p)
92{ 92{
93 up(&kprobe_mutex);
94 free_insn_slot(p->ainsn.insn);
95 down(&kprobe_mutex); 93 down(&kprobe_mutex);
94 free_insn_slot(p->ainsn.insn);
95 up(&kprobe_mutex);
96} 96}
97 97
98static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) 98static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
diff --git a/arch/ppc64/kernel/module.c b/arch/ppc64/kernel/module.c
index c683bf88e690..928b8581fcb0 100644
--- a/arch/ppc64/kernel/module.c
+++ b/arch/ppc64/kernel/module.c
@@ -341,6 +341,19 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
341 *(unsigned long *)location = my_r2(sechdrs, me); 341 *(unsigned long *)location = my_r2(sechdrs, me);
342 break; 342 break;
343 343
344 case R_PPC64_TOC16:
345 /* Subtact TOC pointer */
346 value -= my_r2(sechdrs, me);
347 if (value + 0x8000 > 0xffff) {
348 printk("%s: bad TOC16 relocation (%lu)\n",
349 me->name, value);
350 return -ENOEXEC;
351 }
352 *((uint16_t *) location)
353 = (*((uint16_t *) location) & ~0xffff)
354 | (value & 0xffff);
355 break;
356
344 case R_PPC64_TOC16_DS: 357 case R_PPC64_TOC16_DS:
345 /* Subtact TOC pointer */ 358 /* Subtact TOC pointer */
346 value -= my_r2(sechdrs, me); 359 value -= my_r2(sechdrs, me);
diff --git a/arch/ppc64/kernel/pci_direct_iommu.c b/arch/ppc64/kernel/pci_direct_iommu.c
index 57980a5674d7..e1a32f802c0b 100644
--- a/arch/ppc64/kernel/pci_direct_iommu.c
+++ b/arch/ppc64/kernel/pci_direct_iommu.c
@@ -30,7 +30,7 @@
30#include <asm/ppc-pci.h> 30#include <asm/ppc-pci.h>
31 31
32static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size, 32static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size,
33 dma_addr_t *dma_handle, unsigned int __nocast flag) 33 dma_addr_t *dma_handle, gfp_t flag)
34{ 34{
35 void *ret; 35 void *ret;
36 36
diff --git a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c
index 6c9dc67f59d8..2114dc9c59b5 100644
--- a/arch/ppc64/kernel/pci_iommu.c
+++ b/arch/ppc64/kernel/pci_iommu.c
@@ -70,7 +70,7 @@ static inline struct iommu_table *devnode_table(struct device *dev)
70 * to the dma address (mapping) of the first page. 70 * to the dma address (mapping) of the first page.
71 */ 71 */
72static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size, 72static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size,
73 dma_addr_t *dma_handle, unsigned int __nocast flag) 73 dma_addr_t *dma_handle, gfp_t flag)
74{ 74{
75 return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle, 75 return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle,
76 flag); 76 flag);
diff --git a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c
index c90e1dd875ce..0e555b7a6587 100644
--- a/arch/ppc64/kernel/vio.c
+++ b/arch/ppc64/kernel/vio.c
@@ -218,7 +218,7 @@ static void vio_unmap_sg(struct device *dev, struct scatterlist *sglist,
218} 218}
219 219
220static void *vio_alloc_coherent(struct device *dev, size_t size, 220static void *vio_alloc_coherent(struct device *dev, size_t size,
221 dma_addr_t *dma_handle, unsigned int __nocast flag) 221 dma_addr_t *dma_handle, gfp_t flag)
222{ 222{
223 return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size, 223 return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size,
224 dma_handle, flag); 224 dma_handle, flag);