diff options
Diffstat (limited to 'arch/powerpc/platforms')
23 files changed, 88 insertions, 86 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c index c31e5b534f0a..d45be5b5ad49 100644 --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -51,6 +51,8 @@ static void __init mpc5200_simple_setup_arch(void) | |||
51 | /* list of the supported boards */ | 51 | /* list of the supported boards */ |
52 | static char *board[] __initdata = { | 52 | static char *board[] __initdata = { |
53 | "intercontrol,digsy-mtc", | 53 | "intercontrol,digsy-mtc", |
54 | "manroland,mucmc52", | ||
55 | "manroland,uc101", | ||
54 | "phytec,pcm030", | 56 | "phytec,pcm030", |
55 | "phytec,pcm032", | 57 | "phytec,pcm032", |
56 | "promess,motionpro", | 58 | "promess,motionpro", |
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 51fcae41f08a..f9aee182e6f7 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -132,12 +132,25 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev, | |||
132 | return -ENOMEM; | 132 | return -ENOMEM; |
133 | 133 | ||
134 | bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); | 134 | bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); |
135 | if (bus->irq == NULL) { | ||
136 | ret = -ENOMEM; | ||
137 | goto err_free_bus; | ||
138 | } | ||
135 | 139 | ||
136 | bus->name = "ep8248e-mdio-bitbang"; | 140 | bus->name = "ep8248e-mdio-bitbang"; |
137 | bus->parent = &ofdev->dev; | 141 | bus->parent = &ofdev->dev; |
138 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); | 142 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); |
139 | 143 | ||
140 | return of_mdiobus_register(bus, ofdev->node); | 144 | ret = of_mdiobus_register(bus, ofdev->node); |
145 | if (ret) | ||
146 | goto err_free_irq; | ||
147 | |||
148 | return 0; | ||
149 | err_free_irq: | ||
150 | kfree(bus->irq); | ||
151 | err_free_bus: | ||
152 | free_mdio_bitbang(bus); | ||
153 | return ret; | ||
141 | } | 154 | } |
142 | 155 | ||
143 | static int ep8248e_mdio_remove(struct of_device *ofdev) | 156 | static int ep8248e_mdio_remove(struct of_device *ofdev) |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 9efc8bda01b4..e382cae678b8 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -280,9 +280,9 @@ config PPC_HAVE_PMU_SUPPORT | |||
280 | 280 | ||
281 | config PPC_PERF_CTRS | 281 | config PPC_PERF_CTRS |
282 | def_bool y | 282 | def_bool y |
283 | depends on PERF_COUNTERS && PPC_HAVE_PMU_SUPPORT | 283 | depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT |
284 | help | 284 | help |
285 | This enables the powerpc-specific perf_counter back-end. | 285 | This enables the powerpc-specific perf_event back-end. |
286 | 286 | ||
287 | config SMP | 287 | config SMP |
288 | depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE | 288 | depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE |
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index aca5741ddc67..a86c34b3bb84 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -365,7 +365,7 @@ static int axon_msi_probe(struct of_device *device, | |||
365 | printk(KERN_ERR | 365 | printk(KERN_ERR |
366 | "axon_msi: couldn't parse dcr properties on %s\n", | 366 | "axon_msi: couldn't parse dcr properties on %s\n", |
367 | dn->full_name); | 367 | dn->full_name); |
368 | goto out; | 368 | goto out_free_msic; |
369 | } | 369 | } |
370 | 370 | ||
371 | msic->dcr_host = dcr_map(dn, dcr_base, dcr_len); | 371 | msic->dcr_host = dcr_map(dn, dcr_base, dcr_len); |
diff --git a/arch/powerpc/platforms/cell/beat_iommu.c b/arch/powerpc/platforms/cell/beat_iommu.c index 93b0efddd658..39d361c5c6d2 100644 --- a/arch/powerpc/platforms/cell/beat_iommu.c +++ b/arch/powerpc/platforms/cell/beat_iommu.c | |||
@@ -77,7 +77,7 @@ static void __init celleb_init_direct_mapping(void) | |||
77 | static void celleb_dma_dev_setup(struct device *dev) | 77 | static void celleb_dma_dev_setup(struct device *dev) |
78 | { | 78 | { |
79 | dev->archdata.dma_ops = get_pci_dma_ops(); | 79 | dev->archdata.dma_ops = get_pci_dma_ops(); |
80 | dev->archdata.dma_data = (void *)celleb_dma_direct_offset; | 80 | set_dma_offset(dev, celleb_dma_direct_offset); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void celleb_pci_dma_dev_setup(struct pci_dev *pdev) | 83 | static void celleb_pci_dma_dev_setup(struct pci_dev *pdev) |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 416db17eb18f..ca5bfdfe47f2 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -657,15 +657,13 @@ static void cell_dma_dev_setup_fixed(struct device *dev); | |||
657 | 657 | ||
658 | static void cell_dma_dev_setup(struct device *dev) | 658 | static void cell_dma_dev_setup(struct device *dev) |
659 | { | 659 | { |
660 | struct dev_archdata *archdata = &dev->archdata; | ||
661 | |||
662 | /* Order is important here, these are not mutually exclusive */ | 660 | /* Order is important here, these are not mutually exclusive */ |
663 | if (get_dma_ops(dev) == &dma_iommu_fixed_ops) | 661 | if (get_dma_ops(dev) == &dma_iommu_fixed_ops) |
664 | cell_dma_dev_setup_fixed(dev); | 662 | cell_dma_dev_setup_fixed(dev); |
665 | else if (get_pci_dma_ops() == &dma_iommu_ops) | 663 | else if (get_pci_dma_ops() == &dma_iommu_ops) |
666 | archdata->dma_data = cell_get_iommu_table(dev); | 664 | set_iommu_table_base(dev, cell_get_iommu_table(dev)); |
667 | else if (get_pci_dma_ops() == &dma_direct_ops) | 665 | else if (get_pci_dma_ops() == &dma_direct_ops) |
668 | archdata->dma_data = (void *)cell_dma_direct_offset; | 666 | set_dma_offset(dev, cell_dma_direct_offset); |
669 | else | 667 | else |
670 | BUG(); | 668 | BUG(); |
671 | } | 669 | } |
@@ -973,11 +971,10 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask) | |||
973 | 971 | ||
974 | static void cell_dma_dev_setup_fixed(struct device *dev) | 972 | static void cell_dma_dev_setup_fixed(struct device *dev) |
975 | { | 973 | { |
976 | struct dev_archdata *archdata = &dev->archdata; | ||
977 | u64 addr; | 974 | u64 addr; |
978 | 975 | ||
979 | addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base; | 976 | addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base; |
980 | archdata->dma_data = (void *)addr; | 977 | set_dma_offset(dev, addr); |
981 | 978 | ||
982 | dev_dbg(dev, "iommu: fixed addr = %llx\n", addr); | 979 | dev_dbg(dev, "iommu: fixed addr = %llx\n", addr); |
983 | } | 980 | } |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index ab8aef9bb8ea..884e8bcec499 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
30 | #include <linux/ptrace.h> | 30 | #include <linux/ptrace.h> |
31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
32 | #include <linux/marker.h> | ||
33 | 32 | ||
34 | #include <asm/io.h> | 33 | #include <asm/io.h> |
35 | #include <asm/time.h> | 34 | #include <asm/time.h> |
@@ -148,7 +147,7 @@ static int __fops ## _open(struct inode *inode, struct file *file) \ | |||
148 | __simple_attr_check_format(__fmt, 0ull); \ | 147 | __simple_attr_check_format(__fmt, 0ull); \ |
149 | return spufs_attr_open(inode, file, __get, __set, __fmt); \ | 148 | return spufs_attr_open(inode, file, __get, __set, __fmt); \ |
150 | } \ | 149 | } \ |
151 | static struct file_operations __fops = { \ | 150 | static const struct file_operations __fops = { \ |
152 | .owner = THIS_MODULE, \ | 151 | .owner = THIS_MODULE, \ |
153 | .open = __fops ## _open, \ | 152 | .open = __fops ## _open, \ |
154 | .release = spufs_attr_release, \ | 153 | .release = spufs_attr_release, \ |
@@ -310,7 +309,7 @@ static int spufs_mem_mmap_access(struct vm_area_struct *vma, | |||
310 | return len; | 309 | return len; |
311 | } | 310 | } |
312 | 311 | ||
313 | static struct vm_operations_struct spufs_mem_mmap_vmops = { | 312 | static const struct vm_operations_struct spufs_mem_mmap_vmops = { |
314 | .fault = spufs_mem_mmap_fault, | 313 | .fault = spufs_mem_mmap_fault, |
315 | .access = spufs_mem_mmap_access, | 314 | .access = spufs_mem_mmap_access, |
316 | }; | 315 | }; |
@@ -437,7 +436,7 @@ static int spufs_cntl_mmap_fault(struct vm_area_struct *vma, | |||
437 | return spufs_ps_fault(vma, vmf, 0x4000, SPUFS_CNTL_MAP_SIZE); | 436 | return spufs_ps_fault(vma, vmf, 0x4000, SPUFS_CNTL_MAP_SIZE); |
438 | } | 437 | } |
439 | 438 | ||
440 | static struct vm_operations_struct spufs_cntl_mmap_vmops = { | 439 | static const struct vm_operations_struct spufs_cntl_mmap_vmops = { |
441 | .fault = spufs_cntl_mmap_fault, | 440 | .fault = spufs_cntl_mmap_fault, |
442 | }; | 441 | }; |
443 | 442 | ||
@@ -1144,7 +1143,7 @@ spufs_signal1_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1144 | #endif | 1143 | #endif |
1145 | } | 1144 | } |
1146 | 1145 | ||
1147 | static struct vm_operations_struct spufs_signal1_mmap_vmops = { | 1146 | static const struct vm_operations_struct spufs_signal1_mmap_vmops = { |
1148 | .fault = spufs_signal1_mmap_fault, | 1147 | .fault = spufs_signal1_mmap_fault, |
1149 | }; | 1148 | }; |
1150 | 1149 | ||
@@ -1280,7 +1279,7 @@ spufs_signal2_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1280 | #endif | 1279 | #endif |
1281 | } | 1280 | } |
1282 | 1281 | ||
1283 | static struct vm_operations_struct spufs_signal2_mmap_vmops = { | 1282 | static const struct vm_operations_struct spufs_signal2_mmap_vmops = { |
1284 | .fault = spufs_signal2_mmap_fault, | 1283 | .fault = spufs_signal2_mmap_fault, |
1285 | }; | 1284 | }; |
1286 | 1285 | ||
@@ -1398,7 +1397,7 @@ spufs_mss_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1398 | return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_MSS_MAP_SIZE); | 1397 | return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_MSS_MAP_SIZE); |
1399 | } | 1398 | } |
1400 | 1399 | ||
1401 | static struct vm_operations_struct spufs_mss_mmap_vmops = { | 1400 | static const struct vm_operations_struct spufs_mss_mmap_vmops = { |
1402 | .fault = spufs_mss_mmap_fault, | 1401 | .fault = spufs_mss_mmap_fault, |
1403 | }; | 1402 | }; |
1404 | 1403 | ||
@@ -1459,7 +1458,7 @@ spufs_psmap_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1459 | return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_PS_MAP_SIZE); | 1458 | return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_PS_MAP_SIZE); |
1460 | } | 1459 | } |
1461 | 1460 | ||
1462 | static struct vm_operations_struct spufs_psmap_mmap_vmops = { | 1461 | static const struct vm_operations_struct spufs_psmap_mmap_vmops = { |
1463 | .fault = spufs_psmap_mmap_fault, | 1462 | .fault = spufs_psmap_mmap_fault, |
1464 | }; | 1463 | }; |
1465 | 1464 | ||
@@ -1518,7 +1517,7 @@ spufs_mfc_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1518 | return spufs_ps_fault(vma, vmf, 0x3000, SPUFS_MFC_MAP_SIZE); | 1517 | return spufs_ps_fault(vma, vmf, 0x3000, SPUFS_MFC_MAP_SIZE); |
1519 | } | 1518 | } |
1520 | 1519 | ||
1521 | static struct vm_operations_struct spufs_mfc_mmap_vmops = { | 1520 | static const struct vm_operations_struct spufs_mfc_mmap_vmops = { |
1522 | .fault = spufs_mfc_mmap_fault, | 1521 | .fault = spufs_mfc_mmap_fault, |
1523 | }; | 1522 | }; |
1524 | 1523 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 24b30b6909c4..fc1b1c42b1dc 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -119,7 +119,7 @@ spufs_new_file(struct super_block *sb, struct dentry *dentry, | |||
119 | const struct file_operations *fops, int mode, | 119 | const struct file_operations *fops, int mode, |
120 | size_t size, struct spu_context *ctx) | 120 | size_t size, struct spu_context *ctx) |
121 | { | 121 | { |
122 | static struct inode_operations spufs_file_iops = { | 122 | static const struct inode_operations spufs_file_iops = { |
123 | .setattr = spufs_setattr, | 123 | .setattr = spufs_setattr, |
124 | }; | 124 | }; |
125 | struct inode *inode; | 125 | struct inode *inode; |
@@ -773,7 +773,7 @@ static int | |||
773 | spufs_fill_super(struct super_block *sb, void *data, int silent) | 773 | spufs_fill_super(struct super_block *sb, void *data, int silent) |
774 | { | 774 | { |
775 | struct spufs_sb_info *info; | 775 | struct spufs_sb_info *info; |
776 | static struct super_operations s_ops = { | 776 | static const struct super_operations s_ops = { |
777 | .alloc_inode = spufs_alloc_inode, | 777 | .alloc_inode = spufs_alloc_inode, |
778 | .destroy_inode = spufs_destroy_inode, | 778 | .destroy_inode = spufs_destroy_inode, |
779 | .statfs = simple_statfs, | 779 | .statfs = simple_statfs, |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index bb5b77c66d05..4678078fede8 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/pid_namespace.h> | 39 | #include <linux/pid_namespace.h> |
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/seq_file.h> | 41 | #include <linux/seq_file.h> |
42 | #include <linux/marker.h> | ||
43 | 42 | ||
44 | #include <asm/io.h> | 43 | #include <asm/io.h> |
45 | #include <asm/mmu_context.h> | 44 | #include <asm/mmu_context.h> |
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index cc7161ff1666..ce014928d460 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile | |||
@@ -1,18 +1,9 @@ | |||
1 | EXTRA_CFLAGS += -mno-minimal-toc | 1 | EXTRA_CFLAGS += -mno-minimal-toc |
2 | 2 | ||
3 | extra-y += dt.o | ||
4 | |||
5 | obj-y += exception.o | 3 | obj-y += exception.o |
6 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \ | 4 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt.o mf.o lpevents.o \ |
7 | hvcall.o proc.o htab.o iommu.o misc.o irq.o | 5 | hvcall.o proc.o htab.o iommu.o misc.o irq.o |
8 | obj-$(CONFIG_PCI) += pci.o | 6 | obj-$(CONFIG_PCI) += pci.o |
9 | obj-$(CONFIG_SMP) += smp.o | 7 | obj-$(CONFIG_SMP) += smp.o |
10 | obj-$(CONFIG_VIOPATH) += viopath.o vio.o | 8 | obj-$(CONFIG_VIOPATH) += viopath.o vio.o |
11 | obj-$(CONFIG_MODULES) += ksyms.o | 9 | obj-$(CONFIG_MODULES) += ksyms.o |
12 | |||
13 | quiet_cmd_dt_strings = DT_STR $@ | ||
14 | cmd_dt_strings = $(OBJCOPY) --rename-section .rodata.str1.8=.dt_strings \ | ||
15 | $< $@ | ||
16 | |||
17 | $(obj)/dt_mod.o: $(obj)/dt.o | ||
18 | $(call if_changed,dt_strings) | ||
diff --git a/arch/powerpc/platforms/iseries/dt.c b/arch/powerpc/platforms/iseries/dt.c index c5a87a72057b..7f45a51fe793 100644 --- a/arch/powerpc/platforms/iseries/dt.c +++ b/arch/powerpc/platforms/iseries/dt.c | |||
@@ -51,11 +51,16 @@ | |||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * These are created by the linker script at the start and end | 53 | * These are created by the linker script at the start and end |
54 | * of the section containing all the strings from this file. | 54 | * of the section containing all the strings marked with the DS macro. |
55 | */ | 55 | */ |
56 | extern char __dt_strings_start[]; | 56 | extern char __dt_strings_start[]; |
57 | extern char __dt_strings_end[]; | 57 | extern char __dt_strings_end[]; |
58 | 58 | ||
59 | #define DS(s) ({ \ | ||
60 | static const char __s[] __attribute__((section(".dt_strings"))) = s; \ | ||
61 | __s; \ | ||
62 | }) | ||
63 | |||
59 | struct iseries_flat_dt { | 64 | struct iseries_flat_dt { |
60 | struct boot_param_header header; | 65 | struct boot_param_header header; |
61 | u64 reserve_map[2]; | 66 | u64 reserve_map[2]; |
@@ -64,9 +69,8 @@ struct iseries_flat_dt { | |||
64 | static void * __initdata dt_data; | 69 | static void * __initdata dt_data; |
65 | 70 | ||
66 | /* | 71 | /* |
67 | * Putting these strings here keeps them out of the section | 72 | * Putting these strings here keeps them out of the .dt_strings section |
68 | * that we rename to .dt_strings using objcopy and capture | 73 | * that we capture for the strings blob of the flattened device tree. |
69 | * for the strings blob of the flattened device tree. | ||
70 | */ | 74 | */ |
71 | static char __initdata device_type_cpu[] = "cpu"; | 75 | static char __initdata device_type_cpu[] = "cpu"; |
72 | static char __initdata device_type_memory[] = "memory"; | 76 | static char __initdata device_type_memory[] = "memory"; |
@@ -173,7 +177,7 @@ static void __init dt_start_node(struct iseries_flat_dt *dt, const char *name) | |||
173 | 177 | ||
174 | #define dt_end_node(dt) dt_push_u32(dt, OF_DT_END_NODE) | 178 | #define dt_end_node(dt) dt_push_u32(dt, OF_DT_END_NODE) |
175 | 179 | ||
176 | static void __init dt_prop(struct iseries_flat_dt *dt, const char *name, | 180 | static void __init __dt_prop(struct iseries_flat_dt *dt, const char *name, |
177 | const void *data, int len) | 181 | const void *data, int len) |
178 | { | 182 | { |
179 | unsigned long offset; | 183 | unsigned long offset; |
@@ -191,44 +195,32 @@ static void __init dt_prop(struct iseries_flat_dt *dt, const char *name, | |||
191 | /* The actual data. */ | 195 | /* The actual data. */ |
192 | dt_push_bytes(dt, data, len); | 196 | dt_push_bytes(dt, data, len); |
193 | } | 197 | } |
198 | #define dt_prop(dt, name, data, len) __dt_prop((dt), DS(name), (data), (len)) | ||
194 | 199 | ||
195 | static void __init dt_prop_str(struct iseries_flat_dt *dt, const char *name, | 200 | #define dt_prop_str(dt, name, data) \ |
196 | const char *data) | 201 | dt_prop((dt), name, (data), strlen((data)) + 1); /* + 1 for NULL */ |
197 | { | ||
198 | dt_prop(dt, name, data, strlen(data) + 1); /* + 1 for NULL */ | ||
199 | } | ||
200 | 202 | ||
201 | static void __init dt_prop_u32(struct iseries_flat_dt *dt, const char *name, | 203 | static void __init __dt_prop_u32(struct iseries_flat_dt *dt, const char *name, |
202 | u32 data) | 204 | u32 data) |
203 | { | 205 | { |
204 | dt_prop(dt, name, &data, sizeof(u32)); | 206 | __dt_prop(dt, name, &data, sizeof(u32)); |
205 | } | 207 | } |
208 | #define dt_prop_u32(dt, name, data) __dt_prop_u32((dt), DS(name), (data)) | ||
206 | 209 | ||
207 | static void __init __maybe_unused dt_prop_u64(struct iseries_flat_dt *dt, | 210 | static void __init __maybe_unused __dt_prop_u64(struct iseries_flat_dt *dt, |
208 | const char *name, | 211 | const char *name, u64 data) |
209 | u64 data) | ||
210 | { | 212 | { |
211 | dt_prop(dt, name, &data, sizeof(u64)); | 213 | __dt_prop(dt, name, &data, sizeof(u64)); |
212 | } | 214 | } |
215 | #define dt_prop_u64(dt, name, data) __dt_prop_u64((dt), DS(name), (data)) | ||
213 | 216 | ||
214 | static void __init dt_prop_u64_list(struct iseries_flat_dt *dt, | 217 | #define dt_prop_u64_list(dt, name, data, n) \ |
215 | const char *name, u64 *data, int n) | 218 | dt_prop((dt), name, (data), sizeof(u64) * (n)) |
216 | { | ||
217 | dt_prop(dt, name, data, sizeof(u64) * n); | ||
218 | } | ||
219 | 219 | ||
220 | static void __init dt_prop_u32_list(struct iseries_flat_dt *dt, | 220 | #define dt_prop_u32_list(dt, name, data, n) \ |
221 | const char *name, u32 *data, int n) | 221 | dt_prop((dt), name, (data), sizeof(u32) * (n)) |
222 | { | ||
223 | dt_prop(dt, name, data, sizeof(u32) * n); | ||
224 | } | ||
225 | 222 | ||
226 | #ifdef notyet | 223 | #define dt_prop_empty(dt, name) dt_prop((dt), name, NULL, 0) |
227 | static void __init dt_prop_empty(struct iseries_flat_dt *dt, const char *name) | ||
228 | { | ||
229 | dt_prop(dt, name, NULL, 0); | ||
230 | } | ||
231 | #endif | ||
232 | 224 | ||
233 | static void __init dt_cpus(struct iseries_flat_dt *dt) | 225 | static void __init dt_cpus(struct iseries_flat_dt *dt) |
234 | { | 226 | { |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index 6c1e1011959e..9d53cb481a7c 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -193,7 +193,7 @@ static void pci_dma_dev_setup_iseries(struct pci_dev *pdev) | |||
193 | pdn->iommu_table = iommu_init_table(tbl, -1); | 193 | pdn->iommu_table = iommu_init_table(tbl, -1); |
194 | else | 194 | else |
195 | kfree(tbl); | 195 | kfree(tbl); |
196 | pdev->dev.archdata.dma_data = pdn->iommu_table; | 196 | set_iommu_table_base(&pdev->dev, pdn->iommu_table); |
197 | } | 197 | } |
198 | #else | 198 | #else |
199 | #define pci_dma_dev_setup_iseries NULL | 199 | #define pci_dma_dev_setup_iseries NULL |
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index a0ff03a3d8da..7b1d608ea3c8 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -189,7 +189,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev) | |||
189 | } | 189 | } |
190 | #endif | 190 | #endif |
191 | 191 | ||
192 | dev->dev.archdata.dma_data = &iommu_table_iobmap; | 192 | set_iommu_table_base(&dev->dev, &iommu_table_iobmap); |
193 | } | 193 | } |
194 | 194 | ||
195 | static void pci_dma_bus_setup_null(struct pci_bus *b) { } | 195 | static void pci_dma_bus_setup_null(struct pci_bus *b) { } |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 21226b74c9b2..414ca9849f23 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -540,8 +540,11 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np) | |||
540 | /* Make sure IRQ is disabled */ | 540 | /* Make sure IRQ is disabled */ |
541 | kw_write_reg(reg_ier, 0); | 541 | kw_write_reg(reg_ier, 0); |
542 | 542 | ||
543 | /* Request chip interrupt */ | 543 | /* Request chip interrupt. We set IRQF_TIMER because we don't |
544 | if (request_irq(host->irq, kw_i2c_irq, 0, "keywest i2c", host)) | 544 | * want that interrupt disabled between the 2 passes of driver |
545 | * suspend or we'll have issues running the pfuncs | ||
546 | */ | ||
547 | if (request_irq(host->irq, kw_i2c_irq, IRQF_TIMER, "keywest i2c", host)) | ||
545 | host->irq = NO_IRQ; | 548 | host->irq = NO_IRQ; |
546 | 549 | ||
547 | printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n", | 550 | printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n", |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 937a38e73178..b40c22d697f0 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -320,7 +320,7 @@ static int __init smp_psurge_probe(void) | |||
320 | if (ncpus > NR_CPUS) | 320 | if (ncpus > NR_CPUS) |
321 | ncpus = NR_CPUS; | 321 | ncpus = NR_CPUS; |
322 | for (i = 1; i < ncpus ; ++i) | 322 | for (i = 1; i < ncpus ; ++i) |
323 | cpu_set(i, cpu_present_map); | 323 | set_cpu_present(i, true); |
324 | 324 | ||
325 | if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352); | 325 | if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352); |
326 | 326 | ||
@@ -867,7 +867,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr) | |||
867 | 867 | ||
868 | int smp_core99_cpu_disable(void) | 868 | int smp_core99_cpu_disable(void) |
869 | { | 869 | { |
870 | cpu_clear(smp_processor_id(), cpu_online_map); | 870 | set_cpu_online(smp_processor_id(), false); |
871 | 871 | ||
872 | /* XXX reset cpu affinity here */ | 872 | /* XXX reset cpu affinity here */ |
873 | mpic_cpu_set_priority(0xf); | 873 | mpic_cpu_set_priority(0xf); |
@@ -952,7 +952,7 @@ void __init pmac_setup_smp(void) | |||
952 | int cpu; | 952 | int cpu; |
953 | 953 | ||
954 | for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) | 954 | for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) |
955 | cpu_set(cpu, cpu_possible_map); | 955 | set_cpu_possible(cpu, true); |
956 | smp_ops = &psurge_smp_ops; | 956 | smp_ops = &psurge_smp_ops; |
957 | } | 957 | } |
958 | #endif /* CONFIG_PPC32 */ | 958 | #endif /* CONFIG_PPC32 */ |
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c index 572771fd8463..9490157da62e 100644 --- a/arch/powerpc/platforms/powermac/udbg_scc.c +++ b/arch/powerpc/platforms/powermac/udbg_scc.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * udbg for for zilog scc ports as found on Apple PowerMacs | 2 | * udbg for zilog scc ports as found on Apple PowerMacs |
3 | * | 3 | * |
4 | * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp | 4 | * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp |
5 | * | 5 | * |
diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c index ab69925d579b..937a544a236d 100644 --- a/arch/powerpc/platforms/pseries/dtl.c +++ b/arch/powerpc/platforms/pseries/dtl.c | |||
@@ -209,7 +209,7 @@ static ssize_t dtl_file_read(struct file *filp, char __user *buf, size_t len, | |||
209 | return n_read * sizeof(struct dtl_entry); | 209 | return n_read * sizeof(struct dtl_entry); |
210 | } | 210 | } |
211 | 211 | ||
212 | static struct file_operations dtl_fops = { | 212 | static const struct file_operations dtl_fops = { |
213 | .open = dtl_file_open, | 213 | .open = dtl_file_open, |
214 | .release = dtl_file_release, | 214 | .release = dtl_file_release, |
215 | .read = dtl_file_read, | 215 | .read = dtl_file_read, |
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c index 5a707da3f5c2..0a14d8cd314f 100644 --- a/arch/powerpc/platforms/pseries/firmware.c +++ b/arch/powerpc/platforms/pseries/firmware.c | |||
@@ -51,11 +51,10 @@ firmware_features_table[FIRMWARE_MAX_FEATURES] = { | |||
51 | {FW_FEATURE_VIO, "hcall-vio"}, | 51 | {FW_FEATURE_VIO, "hcall-vio"}, |
52 | {FW_FEATURE_RDMA, "hcall-rdma"}, | 52 | {FW_FEATURE_RDMA, "hcall-rdma"}, |
53 | {FW_FEATURE_LLAN, "hcall-lLAN"}, | 53 | {FW_FEATURE_LLAN, "hcall-lLAN"}, |
54 | {FW_FEATURE_BULK, "hcall-bulk"}, | 54 | {FW_FEATURE_BULK_REMOVE, "hcall-bulk"}, |
55 | {FW_FEATURE_XDABR, "hcall-xdabr"}, | 55 | {FW_FEATURE_XDABR, "hcall-xdabr"}, |
56 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, | 56 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, |
57 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, | 57 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, |
58 | {FW_FEATURE_BULK_REMOVE, "hcall-bulk"}, | ||
59 | }; | 58 | }; |
60 | 59 | ||
61 | /* Build up the firmware features bitmask using the contents of | 60 | /* Build up the firmware features bitmask using the contents of |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index a20ead87153d..ebff6d9a4e39 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -94,7 +94,7 @@ static int pseries_cpu_disable(void) | |||
94 | { | 94 | { |
95 | int cpu = smp_processor_id(); | 95 | int cpu = smp_processor_id(); |
96 | 96 | ||
97 | cpu_clear(cpu, cpu_online_map); | 97 | set_cpu_online(cpu, false); |
98 | vdso_data->processorCount--; | 98 | vdso_data->processorCount--; |
99 | 99 | ||
100 | /*fix boot_cpuid here*/ | 100 | /*fix boot_cpuid here*/ |
@@ -185,7 +185,7 @@ static int pseries_add_processor(struct device_node *np) | |||
185 | 185 | ||
186 | for_each_cpu_mask(cpu, tmp) { | 186 | for_each_cpu_mask(cpu, tmp) { |
187 | BUG_ON(cpu_isset(cpu, cpu_present_map)); | 187 | BUG_ON(cpu_isset(cpu, cpu_present_map)); |
188 | cpu_set(cpu, cpu_present_map); | 188 | set_cpu_present(cpu, true); |
189 | set_hard_smp_processor_id(cpu, *intserv++); | 189 | set_hard_smp_processor_id(cpu, *intserv++); |
190 | } | 190 | } |
191 | err = 0; | 191 | err = 0; |
@@ -217,7 +217,7 @@ static void pseries_remove_processor(struct device_node *np) | |||
217 | if (get_hard_smp_processor_id(cpu) != intserv[i]) | 217 | if (get_hard_smp_processor_id(cpu) != intserv[i]) |
218 | continue; | 218 | continue; |
219 | BUG_ON(cpu_online(cpu)); | 219 | BUG_ON(cpu_online(cpu)); |
220 | cpu_clear(cpu, cpu_present_map); | 220 | set_cpu_present(cpu, false); |
221 | set_hard_smp_processor_id(cpu, -1); | 221 | set_hard_smp_processor_id(cpu, -1); |
222 | break; | 222 | break; |
223 | } | 223 | } |
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c index eae51ef9af24..3631a4f277eb 100644 --- a/arch/powerpc/platforms/pseries/hvCall_inst.c +++ b/arch/powerpc/platforms/pseries/hvCall_inst.c | |||
@@ -71,7 +71,7 @@ static int hc_show(struct seq_file *m, void *p) | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | static struct seq_operations hcall_inst_seq_ops = { | 74 | static const struct seq_operations hcall_inst_seq_ops = { |
75 | .start = hc_start, | 75 | .start = hc_start, |
76 | .next = hc_next, | 76 | .next = hc_next, |
77 | .stop = hc_stop, | 77 | .stop = hc_stop, |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 661c8e02bcba..1a0000a4b6d6 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -482,7 +482,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev) | |||
482 | phb->node); | 482 | phb->node); |
483 | iommu_table_setparms(phb, dn, tbl); | 483 | iommu_table_setparms(phb, dn, tbl); |
484 | PCI_DN(dn)->iommu_table = iommu_init_table(tbl, phb->node); | 484 | PCI_DN(dn)->iommu_table = iommu_init_table(tbl, phb->node); |
485 | dev->dev.archdata.dma_data = PCI_DN(dn)->iommu_table; | 485 | set_iommu_table_base(&dev->dev, PCI_DN(dn)->iommu_table); |
486 | return; | 486 | return; |
487 | } | 487 | } |
488 | 488 | ||
@@ -494,7 +494,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev) | |||
494 | dn = dn->parent; | 494 | dn = dn->parent; |
495 | 495 | ||
496 | if (dn && PCI_DN(dn)) | 496 | if (dn && PCI_DN(dn)) |
497 | dev->dev.archdata.dma_data = PCI_DN(dn)->iommu_table; | 497 | set_iommu_table_base(&dev->dev, PCI_DN(dn)->iommu_table); |
498 | else | 498 | else |
499 | printk(KERN_WARNING "iommu: Device %s has no iommu table\n", | 499 | printk(KERN_WARNING "iommu: Device %s has no iommu table\n", |
500 | pci_name(dev)); | 500 | pci_name(dev)); |
@@ -538,7 +538,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
538 | */ | 538 | */ |
539 | if (dma_window == NULL || pdn->parent == NULL) { | 539 | if (dma_window == NULL || pdn->parent == NULL) { |
540 | pr_debug(" no dma window for device, linking to parent\n"); | 540 | pr_debug(" no dma window for device, linking to parent\n"); |
541 | dev->dev.archdata.dma_data = PCI_DN(pdn)->iommu_table; | 541 | set_iommu_table_base(&dev->dev, PCI_DN(pdn)->iommu_table); |
542 | return; | 542 | return; |
543 | } | 543 | } |
544 | 544 | ||
@@ -554,7 +554,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
554 | pr_debug(" found DMA window, table: %p\n", pci->iommu_table); | 554 | pr_debug(" found DMA window, table: %p\n", pci->iommu_table); |
555 | } | 555 | } |
556 | 556 | ||
557 | dev->dev.archdata.dma_data = pci->iommu_table; | 557 | set_iommu_table_base(&dev->dev, pci->iommu_table); |
558 | } | 558 | } |
559 | #else /* CONFIG_PCI */ | 559 | #else /* CONFIG_PCI */ |
560 | #define pci_dma_bus_setup_pSeries NULL | 560 | #define pci_dma_bus_setup_pSeries NULL |
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index bf2e1ac41308..1164c3430f2c 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c | |||
@@ -432,8 +432,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | |||
432 | /* Read config space back so we can restore after reset */ | 432 | /* Read config space back so we can restore after reset */ |
433 | read_msi_msg(virq, &msg); | 433 | read_msi_msg(virq, &msg); |
434 | entry->msg = msg; | 434 | entry->msg = msg; |
435 | |||
436 | unmask_msi_irq(virq); | ||
437 | } | 435 | } |
438 | 436 | ||
439 | return 0; | 437 | return 0; |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 419f8a637ffe..b9bf0eedccf2 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/radix-tree.h> | 19 | #include <linux/radix-tree.h> |
20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
21 | #include <linux/msi.h> | ||
21 | #include <linux/of.h> | 22 | #include <linux/of.h> |
22 | 23 | ||
23 | #include <asm/firmware.h> | 24 | #include <asm/firmware.h> |
@@ -219,6 +220,14 @@ static void xics_unmask_irq(unsigned int virq) | |||
219 | 220 | ||
220 | static unsigned int xics_startup(unsigned int virq) | 221 | static unsigned int xics_startup(unsigned int virq) |
221 | { | 222 | { |
223 | /* | ||
224 | * The generic MSI code returns with the interrupt disabled on the | ||
225 | * card, using the MSI mask bits. Firmware doesn't appear to unmask | ||
226 | * at that level, so we do it here by hand. | ||
227 | */ | ||
228 | if (irq_to_desc(virq)->msi_desc) | ||
229 | unmask_msi_irq(virq); | ||
230 | |||
222 | /* unmask it */ | 231 | /* unmask it */ |
223 | xics_unmask_irq(virq); | 232 | xics_unmask_irq(virq); |
224 | return 0; | 233 | return 0; |