aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 16:06:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 16:06:58 -0500
commit7ef58b32f571bffb7763c6252ad7527562081f34 (patch)
tree6d1493304ec7a47e4d9e3e84dc9f6e53547dff91 /arch/powerpc/platforms/pseries
parent413fd0e3fbf52873f2310eb75bfa6c7b72847277 (diff)
parentc46ca3c8310b61d253a39ff1375ea97912794cd1 (diff)
Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux
Pull devicetree changes from Grant Likely: "Lots of activity in the devicetree code for v3.18. Most of it is related to getting all of the overlay support code in place, but there are other important things in there. Highlights: - OF_RECONFIG notifiers for SPI, I2C and Platform devices. Those subsystems can now respond to live changes to the device tree. - CONFIG_OF_OVERLAY method for applying live changes to the device tree - Removal of the of_allnodes list. This used to be used to iterate over all the nodes in the device tree, but it is unnecessary because the same thing can be done by iterating over the list of child pointers. Getting rid of of_allnodes saves some memory and avoids the possibility of of_allnodes being sorted differently from the child lists. - Support for retrieving original DTB blob via sysfs. Needed by kexec. - More unittests - Documentation and minor bug fixes" * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: (42 commits) of: Delete unnecessary check before calling "of_node_put()" of: Drop ->next pointer from struct device_node spi: Check for spi_of_notifier when CONFIG_OF_DYNAMIC=y of: support passing console options with stdout-path of: add optional options parameter to of_find_node_by_path() of: Add bindings for chosen node, stdout-path of: Remove unneeded and incorrect MODULE_DEVICE_TABLE ARM: dt: fix up PL011 device tree bindings of: base, fix of_property_read_string_helper kernel-doc of: remove select of non-existant OF_DEVICE config symbol spi/of: Add OF notifier handler spi/of: Create new device registration method and accessors i2c/of: Add OF_RECONFIG notifier handler i2c/of: Factor out Devicetree registration code of/overlay: Add overlay unittests of/overlay: Introduce DT overlay support of/reconfig: Add OF_DYNAMIC notifier for platform_bus_type of/reconfig: Always use the same structure for notifiers of/reconfig: Add debug output for OF_RECONFIG notifiers of/reconfig: Add empty stubs for the of_reconfig methods ...
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-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/setup.c5
4 files changed, 17 insertions, 15 deletions
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 3c4c0dcd90d3..1bbb78fab530 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -183,7 +183,7 @@ static int pseries_add_mem_node(struct device_node *np)
183 return (ret < 0) ? -EINVAL : 0; 183 return (ret < 0) ? -EINVAL : 0;
184} 184}
185 185
186static int pseries_update_drconf_memory(struct of_prop_reconfig *pr) 186static int pseries_update_drconf_memory(struct of_reconfig_data *pr)
187{ 187{
188 struct of_drconf_cell *new_drmem, *old_drmem; 188 struct of_drconf_cell *new_drmem, *old_drmem;
189 unsigned long memblock_size; 189 unsigned long memblock_size;
@@ -232,22 +232,21 @@ static int pseries_update_drconf_memory(struct of_prop_reconfig *pr)
232} 232}
233 233
234static int pseries_memory_notifier(struct notifier_block *nb, 234static int pseries_memory_notifier(struct notifier_block *nb,
235 unsigned long action, void *node) 235 unsigned long action, void *data)
236{ 236{
237 struct of_prop_reconfig *pr; 237 struct of_reconfig_data *rd = data;
238 int err = 0; 238 int err = 0;
239 239
240 switch (action) { 240 switch (action) {
241 case OF_RECONFIG_ATTACH_NODE: 241 case OF_RECONFIG_ATTACH_NODE:
242 err = pseries_add_mem_node(node); 242 err = pseries_add_mem_node(rd->dn);
243 break; 243 break;
244 case OF_RECONFIG_DETACH_NODE: 244 case OF_RECONFIG_DETACH_NODE:
245 err = pseries_remove_mem_node(node); 245 err = pseries_remove_mem_node(rd->dn);
246 break; 246 break;
247 case OF_RECONFIG_UPDATE_PROPERTY: 247 case OF_RECONFIG_UPDATE_PROPERTY:
248 pr = (struct of_prop_reconfig *)node; 248 if (!strcmp(rd->prop->name, "ibm,dynamic-memory"))
249 if (!strcmp(pr->prop->name, "ibm,dynamic-memory")) 249 err = pseries_update_drconf_memory(rd);
250 err = pseries_update_drconf_memory(pr);
251 break; 250 break;
252 } 251 }
253 return notifier_from_errno(err); 252 return notifier_from_errno(err);
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index e32e00976a94..3e5bfdafee63 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -1251,10 +1251,11 @@ static struct notifier_block iommu_mem_nb = {
1251 .notifier_call = iommu_mem_notifier, 1251 .notifier_call = iommu_mem_notifier,
1252}; 1252};
1253 1253
1254static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) 1254static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *data)
1255{ 1255{
1256 int err = NOTIFY_OK; 1256 int err = NOTIFY_OK;
1257 struct device_node *np = node; 1257 struct of_reconfig_data *rd = data;
1258 struct device_node *np = rd->dn;
1258 struct pci_dn *pci = PCI_DN(np); 1259 struct pci_dn *pci = PCI_DN(np);
1259 struct direct_window *window; 1260 struct direct_window *window;
1260 1261
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 125c589eeef5..ed8a90022a3d 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