From: Linus Torvalds Date: Tue, 18 Dec 2012 17:58:09 +0000 (-0800) Subject: Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=16e024f30ce96ef5fa651e2914e19d175a924cab;p=~shefty%2Frdma-dev.git Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc Pull powerpc update from Benjamin Herrenschmidt: "The main highlight is probably some base POWER8 support. There's more to come such as transactional memory support but that will wait for the next one. Overall it's pretty quiet, or rather I've been pretty poor at picking things up from patchwork and reviewing them this time around and Kumar no better on the FSL side it seems..." * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (73 commits) powerpc+of: Rename and fix OF reconfig notifier error inject module powerpc: mpc5200: Add a3m071 board support powerpc/512x: don't compile any platform DIU code if the DIU is not enabled powerpc/mpc52xx: use module_platform_driver macro powerpc+of: Export of_reconfig_notifier_[register,unregister] powerpc/dma/raidengine: add raidengine device powerpc/iommu/fsl: Add PAMU bypass enable register to ccsr_guts struct powerpc/mpc85xx: Change spin table to cached memory powerpc/fsl-pci: Add PCI controller ATMU PM support powerpc/86xx: fsl_pcibios_fixup_bus requires CONFIG_PCI drivers/virt: the Freescale hypervisor driver doesn't need to check MSR[GS] powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers powerpc: Disable relocation on exceptions when kexecing powerpc: Enable relocation on during exceptions at boot powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function powerpc: Add wrappers to enable/disable relocation on exceptions powerpc: Add set_mode hcall powerpc: Setup relocation on exceptions for bare metal systems powerpc: Move initial mfspr LPCR out of __init_LPCR powerpc: Add relocation on exception vector handlers ... --- 16e024f30ce96ef5fa651e2914e19d175a924cab diff --cc arch/powerpc/kernel/entry_64.S index e9a906c2723,ad766669576..b310a057362 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@@ -373,7 -373,9 +373,9 @@@ _GLOBAL(ret_from_fork _GLOBAL(ret_from_kernel_thread) bl .schedule_tail REST_NVGPRS(r1) - REST_GPR(2,r1) + li r3,0 + std r3,0(r1) + ld r14, 0(r14) mtlr r14 mr r3,r15 blrl diff --cc drivers/of/base.c index be846408dbc,fa40402fe8d..db8d211a0d0 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@@ -1255,12 -1243,36 +1329,36 @@@ int of_attach_node(struct device_node * write_lock_irqsave(&devtree_lock, flags); np->sibling = np->parent->child; - np->allnext = allnodes; + np->allnext = of_allnodes; np->parent->child = np; - allnodes = np; + of_allnodes = np; write_unlock_irqrestore(&devtree_lock, flags); + + of_add_proc_dt_entry(np); + return 0; } + #ifdef CONFIG_PROC_DEVICETREE + static void of_remove_proc_dt_entry(struct device_node *dn) + { + struct device_node *parent = dn->parent; + struct property *prop = dn->properties; + + while (prop) { + remove_proc_entry(prop->name, dn->pde); + prop = prop->next; + } + + if (dn->pde) + remove_proc_entry(dn->pde->name, parent->pde); + } + #else + static void of_remove_proc_dt_entry(struct device_node *dn) + { + return; + } + #endif + /** * of_detach_node - "Unplug" a node from the device tree. * @@@ -1274,15 -1291,23 +1377,23 @@@ int of_detach_node(struct device_node * write_lock_irqsave(&devtree_lock, flags); + if (of_node_check_flag(np, OF_DETACHED)) { + /* someone already detached it */ + write_unlock_irqrestore(&devtree_lock, flags); + return rc; + } + parent = np->parent; - if (!parent) - goto out_unlock; + if (!parent) { + write_unlock_irqrestore(&devtree_lock, flags); + return rc; + } - if (allnodes == np) - allnodes = np->allnext; + if (of_allnodes == np) + of_allnodes = np->allnext; else { struct device_node *prev; - for (prev = allnodes; + for (prev = of_allnodes; prev->allnext != np; prev = prev->allnext) ; diff --cc lib/Kconfig.debug index e458782f3c5,c2d89f37004..3a353091a90 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@@ -1192,14 -1192,14 +1192,14 @@@ config MEMORY_NOTIFIER_ERROR_INJEC If unsure, say N. - config PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT - tristate "pSeries reconfig notifier error injection module" - depends on PPC_PSERIES && NOTIFIER_ERROR_INJECTION + config OF_RECONFIG_NOTIFIER_ERROR_INJECT + tristate "OF reconfig notifier error injection module" + depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION help - This option provides the ability to inject artifical errors to + This option provides the ability to inject artificial errors to - pSeries reconfig notifier chain callbacks. It is controlled + OF reconfig notifier chain callbacks. It is controlled through debugfs interface under - /sys/kernel/debug/notifier-error-inject/pSeries-reconfig/ + /sys/kernel/debug/notifier-error-inject/OF-reconfig/ If the notifier call chain should be failed with some events notified, write the error code to "actions//error".