dlpar.c (a61944c251c3e68c4bbf6eb96ff61c7b286351c5) | dlpar.c (3aef19f0a10d1c274a15191766b627fe550d456e) |
---|---|
1/* 2 * Support for dynamic reconfiguration for PCI, Memory, and CPU 3 * Hotplug and Dynamic Logical Partitioning on RPA platforms. 4 * 5 * Copyright (C) 2009 Nathan Fontenot 6 * Copyright (C) 2009 IBM Corporation 7 * 8 * This program is free software; you can redistribute it and/or --- 248 unchanged lines hidden (view full) --- 257 int rc; 258 259 of_node_set_flag(dn, OF_DYNAMIC); 260 kref_init(&dn->kref); 261 dn->parent = derive_parent(dn->full_name); 262 if (!dn->parent) 263 return -ENOMEM; 264 | 1/* 2 * Support for dynamic reconfiguration for PCI, Memory, and CPU 3 * Hotplug and Dynamic Logical Partitioning on RPA platforms. 4 * 5 * Copyright (C) 2009 Nathan Fontenot 6 * Copyright (C) 2009 IBM Corporation 7 * 8 * This program is free software; you can redistribute it and/or --- 248 unchanged lines hidden (view full) --- 257 int rc; 258 259 of_node_set_flag(dn, OF_DYNAMIC); 260 kref_init(&dn->kref); 261 dn->parent = derive_parent(dn->full_name); 262 if (!dn->parent) 263 return -ENOMEM; 264 |
265 rc = blocking_notifier_call_chain(&pSeries_reconfig_chain, 266 PSERIES_RECONFIG_ADD, dn); 267 if (rc == NOTIFY_BAD) { | 265 rc = pSeries_reconfig_notify(PSERIES_RECONFIG_ADD, dn); 266 if (rc) { |
268 printk(KERN_ERR "Failed to add device node %s\n", 269 dn->full_name); | 267 printk(KERN_ERR "Failed to add device node %s\n", 268 dn->full_name); |
270 return -ENOMEM; /* For now, safe to assume kmalloc failure */ | 269 return rc; |
271 } 272 273 of_attach_node(dn); 274 275#ifdef CONFIG_PROC_DEVICETREE 276 ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde); 277 if (ent) 278 proc_device_tree_add_node(dn, ent); --- 13 unchanged lines hidden (view full) --- 292 remove_proc_entry(prop->name, dn->pde); 293 prop = prop->next; 294 } 295 296 if (dn->pde) 297 remove_proc_entry(dn->pde->name, parent->pde); 298#endif 299 | 270 } 271 272 of_attach_node(dn); 273 274#ifdef CONFIG_PROC_DEVICETREE 275 ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde); 276 if (ent) 277 proc_device_tree_add_node(dn, ent); --- 13 unchanged lines hidden (view full) --- 291 remove_proc_entry(prop->name, dn->pde); 292 prop = prop->next; 293 } 294 295 if (dn->pde) 296 remove_proc_entry(dn->pde->name, parent->pde); 297#endif 298 |
300 blocking_notifier_call_chain(&pSeries_reconfig_chain, 301 PSERIES_RECONFIG_REMOVE, dn); | 299 pSeries_reconfig_notify(PSERIES_RECONFIG_REMOVE, dn); |
302 of_detach_node(dn); 303 of_node_put(dn); /* Must decrement the refcount */ 304 305 return 0; 306} 307 308#define DR_ENTITY_SENSE 9003 309#define DR_ENTITY_PRESENT 1 --- 254 unchanged lines hidden --- | 300 of_detach_node(dn); 301 of_node_put(dn); /* Must decrement the refcount */ 302 303 return 0; 304} 305 306#define DR_ENTITY_SENSE 9003 307#define DR_ENTITY_PRESENT 1 --- 254 unchanged lines hidden --- |