aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/44x/Kconfig2
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype43
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c2
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c1
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig22
-rw-r--r--arch/powerpc/platforms/ps3/mm.c77
-rw-r--r--arch/powerpc/platforms/ps3/platform.h16
-rw-r--r--arch/powerpc/platforms/ps3/repository.c198
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig2
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c2
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h4
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c7
12 files changed, 317 insertions, 59 deletions
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
index 2e4e64abfab4..8abf6fb8f410 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -23,6 +23,8 @@ config BLUESTONE
23 default n 23 default n
24 select PPC44x_SIMPLE 24 select PPC44x_SIMPLE
25 select APM821xx 25 select APM821xx
26 select PCI_MSI
27 select PPC4xx_MSI
26 select PPC4xx_PCI_EXPRESS 28 select PPC4xx_PCI_EXPRESS
27 select IBM_EMAC_RGMII 29 select IBM_EMAC_RGMII
28 help 30 help
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 425db18580a2..61c9550819a2 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -78,6 +78,36 @@ config PPC_BOOK3E_64
78 78
79endchoice 79endchoice
80 80
81choice
82 prompt "CPU selection"
83 depends on PPC64
84 default GENERIC_CPU
85 help
86 This will create a kernel which is optimised for a particular CPU.
87 The resulting kernel may not run on other CPUs, so use this with care.
88
89 If unsure, select Generic.
90
91config GENERIC_CPU
92 bool "Generic"
93
94config CELL_CPU
95 bool "Cell Broadband Engine"
96
97config POWER4_CPU
98 bool "POWER4"
99
100config POWER5_CPU
101 bool "POWER5"
102
103config POWER6_CPU
104 bool "POWER6"
105
106config POWER7_CPU
107 bool "POWER7"
108
109endchoice
110
81config PPC_BOOK3S 111config PPC_BOOK3S
82 def_bool y 112 def_bool y
83 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 113 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
@@ -86,15 +116,6 @@ config PPC_BOOK3E
86 def_bool y 116 def_bool y
87 depends on PPC_BOOK3E_64 117 depends on PPC_BOOK3E_64
88 118
89config POWER4_ONLY
90 bool "Optimize for POWER4"
91 depends on PPC64 && PPC_BOOK3S
92 default n
93 ---help---
94 Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
95 The resulting binary will not work on POWER3 or RS64 processors
96 when compiled with binutils 2.15 or later.
97
98config 6xx 119config 6xx
99 def_bool y 120 def_bool y
100 depends on PPC32 && PPC_BOOK3S 121 depends on PPC32 && PPC_BOOK3S
@@ -258,7 +279,7 @@ config PPC_ICSWX_PID
258 default y 279 default y
259 ---help--- 280 ---help---
260 The PID register in server is used explicitly for ICSWX. In 281 The PID register in server is used explicitly for ICSWX. In
261 embedded systems PID managment is done by the system. 282 embedded systems PID management is done by the system.
262 283
263config PPC_ICSWX_USE_SIGILL 284config PPC_ICSWX_USE_SIGILL
264 bool "Should a bad CT cause a SIGILL?" 285 bool "Should a bad CT cause a SIGILL?"
@@ -266,7 +287,7 @@ config PPC_ICSWX_USE_SIGILL
266 default n 287 default n
267 ---help--- 288 ---help---
268 Should a bad CT used for "non-record form ICSWX" cause an 289 Should a bad CT used for "non-record form ICSWX" cause an
269 illegal intruction signal or should it be silent as 290 illegal instruction signal or should it be silent as
270 architected. 291 architected.
271 292
272 If in doubt, say N here. 293 If in doubt, say N here.
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 1d75c92ea8fb..66519d263da7 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -151,7 +151,7 @@ static void
151spufs_evict_inode(struct inode *inode) 151spufs_evict_inode(struct inode *inode)
152{ 152{
153 struct spufs_inode_info *ei = SPUFS_I(inode); 153 struct spufs_inode_info *ei = SPUFS_I(inode);
154 end_writeback(inode); 154 clear_inode(inode);
155 if (ei->i_ctx) 155 if (ei->i_ctx)
156 put_spu_context(ei->i_ctx); 156 put_spu_context(ei->i_ctx);
157 if (ei->i_gang) 157 if (ei->i_gang)
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index 03685a329d7d..fc536f2971c0 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -1503,6 +1503,7 @@ static int __init pmac_i2c_create_platform_devices(void)
1503 if (bus->platform_dev == NULL) 1503 if (bus->platform_dev == NULL)
1504 return -ENOMEM; 1504 return -ENOMEM;
1505 bus->platform_dev->dev.platform_data = bus; 1505 bus->platform_dev->dev.platform_data = bus;
1506 bus->platform_dev->dev.of_node = bus->busnode;
1506 platform_device_add(bus->platform_dev); 1507 platform_device_add(bus->platform_dev);
1507 } 1508 }
1508 1509
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 476d9d9b2405..46b7f0232523 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -7,7 +7,6 @@ config PPC_PS3
7 select USB_OHCI_BIG_ENDIAN_MMIO 7 select USB_OHCI_BIG_ENDIAN_MMIO
8 select USB_ARCH_HAS_EHCI 8 select USB_ARCH_HAS_EHCI
9 select USB_EHCI_BIG_ENDIAN_MMIO 9 select USB_EHCI_BIG_ENDIAN_MMIO
10 select MEMORY_HOTPLUG
11 select PPC_PCI_CHOICE 10 select PPC_PCI_CHOICE
12 help 11 help
13 This option enables support for the Sony PS3 game console 12 This option enables support for the Sony PS3 game console
@@ -74,7 +73,7 @@ config PS3_PS3AV
74 help 73 help
75 Include support for the PS3 AV Settings driver. 74 Include support for the PS3 AV Settings driver.
76 75
77 This support is required for graphics and sound. In 76 This support is required for PS3 graphics and sound. In
78 general, all users will say Y or M. 77 general, all users will say Y or M.
79 78
80config PS3_SYS_MANAGER 79config PS3_SYS_MANAGER
@@ -85,9 +84,22 @@ config PS3_SYS_MANAGER
85 help 84 help
86 Include support for the PS3 System Manager. 85 Include support for the PS3 System Manager.
87 86
88 This support is required for system control. In 87 This support is required for PS3 system control. In
89 general, all users will say Y or M. 88 general, all users will say Y or M.
90 89
90config PS3_REPOSITORY_WRITE
91 bool "PS3 Repository write support" if PS3_ADVANCED
92 depends on PPC_PS3
93 default n
94 help
95 Enables support for writing to the PS3 System Repository.
96
97 This support is intended for bootloaders that need to store data
98 in the repository for later boot stages.
99
100 If in doubt, say N here and reduce the size of the kernel by a
101 small amount.
102
91config PS3_STORAGE 103config PS3_STORAGE
92 depends on PPC_PS3 104 depends on PPC_PS3
93 tristate 105 tristate
@@ -122,7 +134,7 @@ config PS3_FLASH
122 134
123 This support is required to access the PS3 FLASH ROM, which 135 This support is required to access the PS3 FLASH ROM, which
124 contains the boot loader and some boot options. 136 contains the boot loader and some boot options.
125 In general, all users will say Y or M. 137 In general, PS3 OtherOS users will say Y or M.
126 138
127 As this driver needs a fixed buffer of 256 KiB of memory, it can 139 As this driver needs a fixed buffer of 256 KiB of memory, it can
128 be disabled on the kernel command line using "ps3flash=off", to 140 be disabled on the kernel command line using "ps3flash=off", to
@@ -156,7 +168,7 @@ config PS3GELIC_UDBG
156 via the Ethernet port (UDP port number 18194). 168 via the Ethernet port (UDP port number 18194).
157 169
158 This driver uses a trivial implementation and is independent 170 This driver uses a trivial implementation and is independent
159 from the main network driver. 171 from the main PS3 gelic network driver.
160 172
161 If in doubt, say N here. 173 If in doubt, say N here.
162 174
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index de2aea421707..0c9f643d9e2a 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -20,7 +20,6 @@
20 20
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/export.h> 22#include <linux/export.h>
23#include <linux/memory_hotplug.h>
24#include <linux/memblock.h> 23#include <linux/memblock.h>
25#include <linux/slab.h> 24#include <linux/slab.h>
26 25
@@ -79,12 +78,14 @@ enum {
79 * @base: base address 78 * @base: base address
80 * @size: size in bytes 79 * @size: size in bytes
81 * @offset: difference between base and rm.size 80 * @offset: difference between base and rm.size
81 * @destroy: flag if region should be destroyed upon shutdown
82 */ 82 */
83 83
84struct mem_region { 84struct mem_region {
85 u64 base; 85 u64 base;
86 u64 size; 86 u64 size;
87 unsigned long offset; 87 unsigned long offset;
88 int destroy;
88}; 89};
89 90
90/** 91/**
@@ -96,7 +97,7 @@ struct mem_region {
96 * The HV virtual address space (vas) allows for hotplug memory regions. 97 * The HV virtual address space (vas) allows for hotplug memory regions.
97 * Memory regions can be created and destroyed in the vas at runtime. 98 * Memory regions can be created and destroyed in the vas at runtime.
98 * @rm: real mode (bootmem) region 99 * @rm: real mode (bootmem) region
99 * @r1: hotplug memory region(s) 100 * @r1: highmem region(s)
100 * 101 *
101 * ps3 addresses 102 * ps3 addresses
102 * virt_addr: a cpu 'translated' effective address 103 * virt_addr: a cpu 'translated' effective address
@@ -222,10 +223,6 @@ void ps3_mm_vas_destroy(void)
222 } 223 }
223} 224}
224 225
225/*============================================================================*/
226/* memory hotplug routines */
227/*============================================================================*/
228
229/** 226/**
230 * ps3_mm_region_create - create a memory region in the vas 227 * ps3_mm_region_create - create a memory region in the vas
231 * @r: pointer to a struct mem_region to accept initialized values 228 * @r: pointer to a struct mem_region to accept initialized values
@@ -262,6 +259,7 @@ static int ps3_mm_region_create(struct mem_region *r, unsigned long size)
262 goto zero_region; 259 goto zero_region;
263 } 260 }
264 261
262 r->destroy = 1;
265 r->offset = r->base - map.rm.size; 263 r->offset = r->base - map.rm.size;
266 return result; 264 return result;
267 265
@@ -279,7 +277,14 @@ static void ps3_mm_region_destroy(struct mem_region *r)
279{ 277{
280 int result; 278 int result;
281 279
280 if (!r->destroy) {
281 pr_info("%s:%d: Not destroying high region: %llxh %llxh\n",
282 __func__, __LINE__, r->base, r->size);
283 return;
284 }
285
282 DBG("%s:%d: r->base = %llxh\n", __func__, __LINE__, r->base); 286 DBG("%s:%d: r->base = %llxh\n", __func__, __LINE__, r->base);
287
283 if (r->base) { 288 if (r->base) {
284 result = lv1_release_memory(r->base); 289 result = lv1_release_memory(r->base);
285 BUG_ON(result); 290 BUG_ON(result);
@@ -288,50 +293,36 @@ static void ps3_mm_region_destroy(struct mem_region *r)
288 } 293 }
289} 294}
290 295
291/** 296static int ps3_mm_get_repository_highmem(struct mem_region *r)
292 * ps3_mm_add_memory - hot add memory
293 */
294
295static int __init ps3_mm_add_memory(void)
296{ 297{
297 int result; 298 int result;
298 unsigned long start_addr;
299 unsigned long start_pfn;
300 unsigned long nr_pages;
301
302 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
303 return -ENODEV;
304 299
305 BUG_ON(!mem_init_done); 300 /* Assume a single highmem region. */
306 301
307 start_addr = map.rm.size; 302 result = ps3_repository_read_highmem_info(0, &r->base, &r->size);
308 start_pfn = start_addr >> PAGE_SHIFT;
309 nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT;
310 303
311 DBG("%s:%d: start_addr %lxh, start_pfn %lxh, nr_pages %lxh\n", 304 if (result)
312 __func__, __LINE__, start_addr, start_pfn, nr_pages); 305 goto zero_region;
313
314 result = add_memory(0, start_addr, map.r1.size);
315 306
316 if (result) { 307 if (!r->base || !r->size) {
317 pr_err("%s:%d: add_memory failed: (%d)\n", 308 result = -1;
318 __func__, __LINE__, result); 309 goto zero_region;
319 return result;
320 } 310 }
321 311
322 memblock_add(start_addr, map.r1.size); 312 r->offset = r->base - map.rm.size;
323 313
324 result = online_pages(start_pfn, nr_pages); 314 DBG("%s:%d: Found high region in repository: %llxh %llxh\n",
315 __func__, __LINE__, r->base, r->size);
325 316
326 if (result) 317 return 0;
327 pr_err("%s:%d: online_pages failed: (%d)\n",
328 __func__, __LINE__, result);
329 318
319zero_region:
320 DBG("%s:%d: No high region in repository.\n", __func__, __LINE__);
321
322 r->size = r->base = r->offset = 0;
330 return result; 323 return result;
331} 324}
332 325
333device_initcall(ps3_mm_add_memory);
334
335/*============================================================================*/ 326/*============================================================================*/
336/* dma routines */ 327/* dma routines */
337/*============================================================================*/ 328/*============================================================================*/
@@ -1217,13 +1208,23 @@ void __init ps3_mm_init(void)
1217 BUG_ON(map.rm.base); 1208 BUG_ON(map.rm.base);
1218 BUG_ON(!map.rm.size); 1209 BUG_ON(!map.rm.size);
1219 1210
1211 /* Check if we got the highmem region from an earlier boot step */
1220 1212
1221 /* arrange to do this in ps3_mm_add_memory */ 1213 if (ps3_mm_get_repository_highmem(&map.r1))
1222 ps3_mm_region_create(&map.r1, map.total - map.rm.size); 1214 ps3_mm_region_create(&map.r1, map.total - map.rm.size);
1223 1215
1224 /* correct map.total for the real total amount of memory we use */ 1216 /* correct map.total for the real total amount of memory we use */
1225 map.total = map.rm.size + map.r1.size; 1217 map.total = map.rm.size + map.r1.size;
1226 1218
1219 if (!map.r1.size) {
1220 DBG("%s:%d: No highmem region found\n", __func__, __LINE__);
1221 } else {
1222 DBG("%s:%d: Adding highmem region: %llxh %llxh\n",
1223 __func__, __LINE__, map.rm.size,
1224 map.total - map.rm.size);
1225 memblock_add(map.rm.size, map.total - map.rm.size);
1226 }
1227
1227 DBG(" <- %s:%d\n", __func__, __LINE__); 1228 DBG(" <- %s:%d\n", __func__, __LINE__);
1228} 1229}
1229 1230
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 1a633ed0fe98..d71329a8e325 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -188,6 +188,22 @@ int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
188int ps3_repository_read_region_total(u64 *region_total); 188int ps3_repository_read_region_total(u64 *region_total);
189int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size, 189int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
190 u64 *region_total); 190 u64 *region_total);
191int ps3_repository_read_highmem_region_count(unsigned int *region_count);
192int ps3_repository_read_highmem_base(unsigned int region_index,
193 u64 *highmem_base);
194int ps3_repository_read_highmem_size(unsigned int region_index,
195 u64 *highmem_size);
196int ps3_repository_read_highmem_info(unsigned int region_index,
197 u64 *highmem_base, u64 *highmem_size);
198
199int ps3_repository_write_highmem_region_count(unsigned int region_count);
200int ps3_repository_write_highmem_base(unsigned int region_index,
201 u64 highmem_base);
202int ps3_repository_write_highmem_size(unsigned int region_index,
203 u64 highmem_size);
204int ps3_repository_write_highmem_info(unsigned int region_index,
205 u64 highmem_base, u64 highmem_size);
206int ps3_repository_delete_highmem_info(unsigned int region_index);
191 207
192/* repository pme info */ 208/* repository pme info */
193 209
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 7bdfea336f5e..9b47ba7a5de7 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -779,6 +779,72 @@ int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size, u64 *region_total)
779} 779}
780 780
781/** 781/**
782 * ps3_repository_read_highmem_region_count - Read the number of highmem regions
783 *
784 * Bootloaders must arrange the repository nodes such that regions are indexed
785 * with a region_index from 0 to region_count-1.
786 */
787
788int ps3_repository_read_highmem_region_count(unsigned int *region_count)
789{
790 int result;
791 u64 v1 = 0;
792
793 result = read_node(PS3_LPAR_ID_CURRENT,
794 make_first_field("highmem", 0),
795 make_field("region", 0),
796 make_field("count", 0),
797 0,
798 &v1, NULL);
799 *region_count = v1;
800 return result;
801}
802
803
804int ps3_repository_read_highmem_base(unsigned int region_index,
805 u64 *highmem_base)
806{
807 return read_node(PS3_LPAR_ID_CURRENT,
808 make_first_field("highmem", 0),
809 make_field("region", region_index),
810 make_field("base", 0),
811 0,
812 highmem_base, NULL);
813}
814
815int ps3_repository_read_highmem_size(unsigned int region_index,
816 u64 *highmem_size)
817{
818 return read_node(PS3_LPAR_ID_CURRENT,
819 make_first_field("highmem", 0),
820 make_field("region", region_index),
821 make_field("size", 0),
822 0,
823 highmem_size, NULL);
824}
825
826/**
827 * ps3_repository_read_highmem_info - Read high memory region info
828 * @region_index: Region index, {0,..,region_count-1}.
829 * @highmem_base: High memory base address.
830 * @highmem_size: High memory size.
831 *
832 * Bootloaders that preallocate highmem regions must place the
833 * region info into the repository at these well known nodes.
834 */
835
836int ps3_repository_read_highmem_info(unsigned int region_index,
837 u64 *highmem_base, u64 *highmem_size)
838{
839 int result;
840
841 *highmem_base = 0;
842 result = ps3_repository_read_highmem_base(region_index, highmem_base);
843 return result ? result
844 : ps3_repository_read_highmem_size(region_index, highmem_size);
845}
846
847/**
782 * ps3_repository_read_num_spu_reserved - Number of physical spus reserved. 848 * ps3_repository_read_num_spu_reserved - Number of physical spus reserved.
783 * @num_spu: Number of physical spus. 849 * @num_spu: Number of physical spus.
784 */ 850 */
@@ -1002,6 +1068,138 @@ int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
1002 lpar, rights); 1068 lpar, rights);
1003} 1069}
1004 1070
1071#if defined(CONFIG_PS3_REPOSITORY_WRITE)
1072
1073static int create_node(u64 n1, u64 n2, u64 n3, u64 n4, u64 v1, u64 v2)
1074{
1075 int result;
1076
1077 dump_node(0, n1, n2, n3, n4, v1, v2);
1078
1079 result = lv1_create_repository_node(n1, n2, n3, n4, v1, v2);
1080
1081 if (result) {
1082 pr_devel("%s:%d: lv1_create_repository_node failed: %s\n",
1083 __func__, __LINE__, ps3_result(result));
1084 return -ENOENT;
1085 }
1086
1087 return 0;
1088}
1089
1090static int delete_node(u64 n1, u64 n2, u64 n3, u64 n4)
1091{
1092 int result;
1093
1094 dump_node(0, n1, n2, n3, n4, 0, 0);
1095
1096 result = lv1_delete_repository_node(n1, n2, n3, n4);
1097
1098 if (result) {
1099 pr_devel("%s:%d: lv1_delete_repository_node failed: %s\n",
1100 __func__, __LINE__, ps3_result(result));
1101 return -ENOENT;
1102 }
1103
1104 return 0;
1105}
1106
1107static int write_node(u64 n1, u64 n2, u64 n3, u64 n4, u64 v1, u64 v2)
1108{
1109 int result;
1110
1111 result = create_node(n1, n2, n3, n4, v1, v2);
1112
1113 if (!result)
1114 return 0;
1115
1116 result = lv1_write_repository_node(n1, n2, n3, n4, v1, v2);
1117
1118 if (result) {
1119 pr_devel("%s:%d: lv1_write_repository_node failed: %s\n",
1120 __func__, __LINE__, ps3_result(result));
1121 return -ENOENT;
1122 }
1123
1124 return 0;
1125}
1126
1127int ps3_repository_write_highmem_region_count(unsigned int region_count)
1128{
1129 int result;
1130 u64 v1 = (u64)region_count;
1131
1132 result = write_node(
1133 make_first_field("highmem", 0),
1134 make_field("region", 0),
1135 make_field("count", 0),
1136 0,
1137 v1, 0);
1138 return result;
1139}
1140
1141int ps3_repository_write_highmem_base(unsigned int region_index,
1142 u64 highmem_base)
1143{
1144 return write_node(
1145 make_first_field("highmem", 0),
1146 make_field("region", region_index),
1147 make_field("base", 0),
1148 0,
1149 highmem_base, 0);
1150}
1151
1152int ps3_repository_write_highmem_size(unsigned int region_index,
1153 u64 highmem_size)
1154{
1155 return write_node(
1156 make_first_field("highmem", 0),
1157 make_field("region", region_index),
1158 make_field("size", 0),
1159 0,
1160 highmem_size, 0);
1161}
1162
1163int ps3_repository_write_highmem_info(unsigned int region_index,
1164 u64 highmem_base, u64 highmem_size)
1165{
1166 int result;
1167
1168 result = ps3_repository_write_highmem_base(region_index, highmem_base);
1169 return result ? result
1170 : ps3_repository_write_highmem_size(region_index, highmem_size);
1171}
1172
1173static int ps3_repository_delete_highmem_base(unsigned int region_index)
1174{
1175 return delete_node(
1176 make_first_field("highmem", 0),
1177 make_field("region", region_index),
1178 make_field("base", 0),
1179 0);
1180}
1181
1182static int ps3_repository_delete_highmem_size(unsigned int region_index)
1183{
1184 return delete_node(
1185 make_first_field("highmem", 0),
1186 make_field("region", region_index),
1187 make_field("size", 0),
1188 0);
1189}
1190
1191int ps3_repository_delete_highmem_info(unsigned int region_index)
1192{
1193 int result;
1194
1195 result = ps3_repository_delete_highmem_base(region_index);
1196 result += ps3_repository_delete_highmem_size(region_index);
1197
1198 return result ? -1 : 0;
1199}
1200
1201#endif /* defined(CONFIG_PS3_WRITE_REPOSITORY) */
1202
1005#if defined(DEBUG) 1203#if defined(DEBUG)
1006 1204
1007int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo) 1205int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 178a5f300bc9..837cf49357ed 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -67,7 +67,7 @@ config IO_EVENT_IRQ
67 67
68 This option will only enable the IO event platform code. You 68 This option will only enable the IO event platform code. You
69 will still need to enable or compile the actual drivers 69 will still need to enable or compile the actual drivers
70 that use this infrastruture to handle IO event interrupts. 70 that use this infrastructure to handle IO event interrupts.
71 71
72 Say Y if you are unsure. 72 Say Y if you are unsure.
73 73
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index a75e37dc41aa..ecd394cf34e6 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -489,7 +489,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
489 * a stack trace will help the device-driver authors figure 489 * a stack trace will help the device-driver authors figure
490 * out what happened. So print that out. 490 * out what happened. So print that out.
491 */ 491 */
492 dump_stack(); 492 WARN(1, "EEH: failure detected\n");
493 return 1; 493 return 1;
494 494
495dn_unlock: 495dn_unlock:
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index 342797fc0f9c..13e8cc43adf7 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -22,12 +22,12 @@ static inline long poll_pending(void)
22 22
23static inline u8 get_cede_latency_hint(void) 23static inline u8 get_cede_latency_hint(void)
24{ 24{
25 return get_lppaca()->gpr5_dword.fields.cede_latency_hint; 25 return get_lppaca()->cede_latency_hint;
26} 26}
27 27
28static inline void set_cede_latency_hint(u8 latency_hint) 28static inline void set_cede_latency_hint(u8 latency_hint)
29{ 29{
30 get_lppaca()->gpr5_dword.fields.cede_latency_hint = latency_hint; 30 get_lppaca()->cede_latency_hint = latency_hint;
31} 31}
32 32
33static inline long cede_processor(void) 33static inline long cede_processor(void)
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 168651acdd83..7b3bf76ef834 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -103,11 +103,13 @@ int pSeries_reconfig_notifier_register(struct notifier_block *nb)
103{ 103{
104 return blocking_notifier_chain_register(&pSeries_reconfig_chain, nb); 104 return blocking_notifier_chain_register(&pSeries_reconfig_chain, nb);
105} 105}
106EXPORT_SYMBOL_GPL(pSeries_reconfig_notifier_register);
106 107
107void pSeries_reconfig_notifier_unregister(struct notifier_block *nb) 108void pSeries_reconfig_notifier_unregister(struct notifier_block *nb)
108{ 109{
109 blocking_notifier_chain_unregister(&pSeries_reconfig_chain, nb); 110 blocking_notifier_chain_unregister(&pSeries_reconfig_chain, nb);
110} 111}
112EXPORT_SYMBOL_GPL(pSeries_reconfig_notifier_unregister);
111 113
112int pSeries_reconfig_notify(unsigned long action, void *p) 114int pSeries_reconfig_notify(unsigned long action, void *p)
113{ 115{
@@ -426,6 +428,7 @@ static int do_remove_property(char *buf, size_t bufsize)
426static int do_update_property(char *buf, size_t bufsize) 428static int do_update_property(char *buf, size_t bufsize)
427{ 429{
428 struct device_node *np; 430 struct device_node *np;
431 struct pSeries_reconfig_prop_update upd_value;
429 unsigned char *value; 432 unsigned char *value;
430 char *name, *end, *next_prop; 433 char *name, *end, *next_prop;
431 int rc, length; 434 int rc, length;
@@ -454,6 +457,10 @@ static int do_update_property(char *buf, size_t bufsize)
454 return -ENODEV; 457 return -ENODEV;
455 } 458 }
456 459
460 upd_value.node = np;
461 upd_value.property = newprop;
462 pSeries_reconfig_notify(PSERIES_UPDATE_PROPERTY, &upd_value);
463
457 rc = prom_update_property(np, newprop, oldprop); 464 rc = prom_update_property(np, newprop, oldprop);
458 if (rc) 465 if (rc)
459 return rc; 466 return rc;