Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Dec 2012 17:58:09 +0000 (09:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Dec 2012 17:58:09 +0000 (09:58 -0800)
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
  ...

13 files changed:
1  2 
arch/arm/mach-mxs/mach-mxs.c
arch/powerpc/include/asm/machdep.h
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/entry_64.S
arch/powerpc/platforms/pseries/reconfig.c
arch/powerpc/sysdev/fsl_pci.c
drivers/macintosh/smu.c
drivers/of/base.c
drivers/video/Kconfig
include/linux/of.h
lib/Kconfig.debug
lib/Makefile

index 98070370d602de66f781c8187ebdaf0bc8015e38,d61b915ce52c9377958bdaf58515698333fd749c..c66129b5dd18574fbfc1bd4716f80536c625c341
@@@ -100,25 -100,6 +100,25 @@@ static struct fb_videomode apx4devkit_v
        },
  };
  
 +static struct fb_videomode apf28dev_video_modes[] = {
 +      {
 +              .name = "LW700",
 +              .refresh = 60,
 +              .xres = 800,
 +              .yres = 480,
 +              .pixclock = 30303, /* picosecond */
 +              .left_margin = 96,
 +              .right_margin = 96, /* at least 3 & 1 */
 +              .upper_margin = 0x14,
 +              .lower_margin = 0x15,
 +              .hsync_len = 64,
 +              .vsync_len = 4,
 +              .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT |
 +                              FB_SYNC_DATA_ENABLE_HIGH_ACT |
 +                              FB_SYNC_DOTCLK_FAILING_ACT,
 +      },
 +};
 +
  static struct mxsfb_platform_data mxsfb_pdata __initdata;
  
  /*
@@@ -179,7 -160,6 +179,7 @@@ static struct sys_timer imx28_timer = 
  enum mac_oui {
        OUI_FSL,
        OUI_DENX,
 +      OUI_CRYSTALFONTZ,
  };
  
  static void __init update_fec_mac_prop(enum mac_oui oui)
                np = of_find_compatible_node(from, NULL, "fsl,imx28-fec");
                if (!np)
                        return;
 +
                from = np;
  
 +              if (of_get_property(np, "local-mac-address", NULL))
 +                      continue;
 +
                newmac = kzalloc(sizeof(*newmac) + 6, GFP_KERNEL);
                if (!newmac)
                        return;
                        macaddr[1] = 0xe5;
                        macaddr[2] = 0x4e;
                        break;
 +              case OUI_CRYSTALFONTZ:
 +                      macaddr[0] = 0x58;
 +                      macaddr[1] = 0xb9;
 +                      macaddr[2] = 0xe1;
 +                      break;
                }
                val = ocotp[i];
                macaddr[3] = (val >> 16) & 0xff;
                macaddr[4] = (val >> 8) & 0xff;
                macaddr[5] = (val >> 0) & 0xff;
  
-               prom_update_property(np, newmac);
+               of_update_property(np, newmac);
        }
  }
  
@@@ -290,11 -261,6 +290,11 @@@ static void __init m28evk_init(void
        mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT;
  }
  
 +static void __init sc_sps1_init(void)
 +{
 +      enable_clk_enet_out();
 +}
 +
  static int apx4devkit_phy_fixup(struct phy_device *phy)
  {
        phy->dev_flags |= MICREL_PHY_50MHZ_CLK;
@@@ -389,22 -355,6 +389,22 @@@ static void __init tx28_post_init(void
        pinctrl_put(pctl);
  }
  
 +static void __init cfa10049_init(void)
 +{
 +      enable_clk_enet_out();
 +      update_fec_mac_prop(OUI_CRYSTALFONTZ);
 +}
 +
 +static void __init apf28_init(void)
 +{
 +      enable_clk_enet_out();
 +
 +      mxsfb_pdata.mode_list = apf28dev_video_modes;
 +      mxsfb_pdata.mode_count = ARRAY_SIZE(apf28dev_video_modes);
 +      mxsfb_pdata.default_bpp = 16;
 +      mxsfb_pdata.ld_intf_width = STMLCDIF_16BIT;
 +}
 +
  static void __init mxs_machine_init(void)
  {
        if (of_machine_is_compatible("fsl,imx28-evk"))
                m28evk_init();
        else if (of_machine_is_compatible("bluegiga,apx4devkit"))
                apx4devkit_init();
 +      else if (of_machine_is_compatible("crystalfontz,cfa10049"))
 +              cfa10049_init();
 +      else if (of_machine_is_compatible("armadeus,imx28-apf28"))
 +              apf28_init();
 +      else if (of_machine_is_compatible("schulercontrol,imx28-sps1"))
 +              sc_sps1_init();
  
        of_platform_populate(NULL, of_default_bus_match_table,
                             mxs_auxdata_lookup, NULL);
index 3c82daf8be998a7db1e65d8d3d0479d654c6761b,a338bc7cf9d48beefa3115ec78414f62dafb015b..19d9d96eb8d357129e4db6b4cfeb521d44cabfa7
@@@ -166,9 -166,6 +166,6 @@@ struct machdep_calls 
                                                unsigned long size,
                                                pgprot_t vma_prot);
  
-       /* Idle loop for this platform, leave empty for default idle loop */
-       void            (*idle_loop)(void);
        /*
         * Function for waiting for work with reduced power in idle loop;
         * called with interrupts disabled.
@@@ -320,28 -317,28 +317,28 @@@ static inline void log_error(char *buf
                ppc_md.log_error(buf, err_type, fatal);
  }
  
 -#define __define_machine_initcall(mach,level,fn,id) \
 +#define __define_machine_initcall(mach, fn, id) \
        static int __init __machine_initcall_##mach##_##fn(void) { \
                if (machine_is(mach)) return fn(); \
                return 0; \
        } \
 -      __define_initcall(level,__machine_initcall_##mach##_##fn,id);
 -
 -#define machine_core_initcall(mach,fn)                __define_machine_initcall(mach,"1",fn,1)
 -#define machine_core_initcall_sync(mach,fn)   __define_machine_initcall(mach,"1s",fn,1s)
 -#define machine_postcore_initcall(mach,fn)    __define_machine_initcall(mach,"2",fn,2)
 -#define machine_postcore_initcall_sync(mach,fn)       __define_machine_initcall(mach,"2s",fn,2s)
 -#define machine_arch_initcall(mach,fn)                __define_machine_initcall(mach,"3",fn,3)
 -#define machine_arch_initcall_sync(mach,fn)   __define_machine_initcall(mach,"3s",fn,3s)
 -#define machine_subsys_initcall(mach,fn)      __define_machine_initcall(mach,"4",fn,4)
 -#define machine_subsys_initcall_sync(mach,fn) __define_machine_initcall(mach,"4s",fn,4s)
 -#define machine_fs_initcall(mach,fn)          __define_machine_initcall(mach,"5",fn,5)
 -#define machine_fs_initcall_sync(mach,fn)     __define_machine_initcall(mach,"5s",fn,5s)
 -#define machine_rootfs_initcall(mach,fn)      __define_machine_initcall(mach,"rootfs",fn,rootfs)
 -#define machine_device_initcall(mach,fn)      __define_machine_initcall(mach,"6",fn,6)
 -#define machine_device_initcall_sync(mach,fn) __define_machine_initcall(mach,"6s",fn,6s)
 -#define machine_late_initcall(mach,fn)                __define_machine_initcall(mach,"7",fn,7)
 -#define machine_late_initcall_sync(mach,fn)   __define_machine_initcall(mach,"7s",fn,7s)
 +      __define_initcall(__machine_initcall_##mach##_##fn, id);
 +
 +#define machine_core_initcall(mach, fn)               __define_machine_initcall(mach, fn, 1)
 +#define machine_core_initcall_sync(mach, fn)  __define_machine_initcall(mach, fn, 1s)
 +#define machine_postcore_initcall(mach, fn)   __define_machine_initcall(mach, fn, 2)
 +#define machine_postcore_initcall_sync(mach, fn)      __define_machine_initcall(mach, fn, 2s)
 +#define machine_arch_initcall(mach, fn)               __define_machine_initcall(mach, fn, 3)
 +#define machine_arch_initcall_sync(mach, fn)  __define_machine_initcall(mach, fn, 3s)
 +#define machine_subsys_initcall(mach, fn)     __define_machine_initcall(mach, fn, 4)
 +#define machine_subsys_initcall_sync(mach, fn)        __define_machine_initcall(mach, fn, 4s)
 +#define machine_fs_initcall(mach, fn)         __define_machine_initcall(mach, fn, 5)
 +#define machine_fs_initcall_sync(mach, fn)    __define_machine_initcall(mach, fn, 5s)
 +#define machine_rootfs_initcall(mach, fn)     __define_machine_initcall(mach, fn, rootfs)
 +#define machine_device_initcall(mach, fn)     __define_machine_initcall(mach, fn, 6)
 +#define machine_device_initcall_sync(mach, fn)        __define_machine_initcall(mach, fn, 6s)
 +#define machine_late_initcall(mach, fn)               __define_machine_initcall(mach, fn, 7)
 +#define machine_late_initcall_sync(mach, fn)  __define_machine_initcall(mach, fn, 7s)
  
  #endif /* __KERNEL__ */
  #endif /* _ASM_POWERPC_MACHDEP_H */
index 42b1f43b943ba197ce766067d735c47397519382,e434d8b68dda3dbc1871914d2b719c5e2f587e2e..51fb00a20d7ea4a02304b43cf14a3a1593ef8350
@@@ -1,5 -1,5 +1,5 @@@
  /*
-  * Copyright 2009 Freescale Semicondutor, Inc.
+  * Copyright 2009 Freescale Semiconductor, Inc.
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License
@@@ -86,6 -86,7 +86,7 @@@
  #define PPC_INST_DCBA_MASK            0xfc0007fe
  #define PPC_INST_DCBAL                        0x7c2005ec
  #define PPC_INST_DCBZL                        0x7c2007ec
+ #define PPC_INST_ICBT                 0x7c00002c
  #define PPC_INST_ISEL                 0x7c00001e
  #define PPC_INST_ISEL_MASK            0xfc00003e
  #define PPC_INST_LDARX                        0x7c0000a8
  #define PPC_INST_AND                  0x7c000038
  #define PPC_INST_ANDDOT                       0x7c000039
  #define PPC_INST_OR                   0x7c000378
 +#define PPC_INST_XOR                  0x7c000278
  #define PPC_INST_ANDI                 0x70000000
  #define PPC_INST_ORI                  0x60000000
  #define PPC_INST_ORIS                 0x64000000
 +#define PPC_INST_XORI                 0x68000000
 +#define PPC_INST_XORIS                        0x6c000000
  #define PPC_INST_NEG                  0x7c0000d0
  #define PPC_INST_BRANCH                       0x48000000
  #define PPC_INST_BRANCH_COND          0x40800000
  #define __PPC_MB(s)   (((s) & 0x1f) << 6)
  #define __PPC_ME(s)   (((s) & 0x1f) << 1)
  #define __PPC_BI(s)   (((s) & 0x1f) << 16)
+ #define __PPC_CT(t)   (((t) & 0x0f) << 21)
  
  /*
   * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
                                        __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b))
  #define PPC_SLBFEE_DOT(t, b)  stringify_in_c(.long PPC_INST_SLBFEE | \
                                        __PPC_RT(t) | __PPC_RB(b))
+ #define PPC_ICBT(c,a,b)               stringify_in_c(.long PPC_INST_ICBT | \
+                                      __PPC_CT(c) | __PPC_RA0(a) | __PPC_RB(b))
  /* PASemi instructions */
  #define LBZCIX(t,a,b)         stringify_in_c(.long PPC_INST_LBZCIX | \
                                       __PPC_RT(t) | __PPC_RA(a) | __PPC_RB(b))
index 97d37278ea2da4f978bbf5b5967b5ed22912ee7d,1b853f744f8b50e87c019b6740bba1aa140c48ee..3d5c9dc8917a8d48ea33c77c14769f663765a50a
  #define   LPCR_RMLS    0x1C000000      /* impl dependent rmo limit sel */
  #define         LPCR_RMLS_SH  (63-37)
  #define   LPCR_ILE     0x02000000      /* !HV irqs set MSR:LE */
+ #define   LPCR_AIL_0  0x00000000      /* MMU off exception offset 0x0 */
+ #define   LPCR_AIL_3  0x01800000      /* MMU on exception offset 0xc00...4xxx */
  #define   LPCR_PECE   0x00007000      /* powersave exit cause enable */
  #define     LPCR_PECE0        0x00004000      /* ext. exceptions can cause exit */
  #define     LPCR_PECE1        0x00002000      /* decrementer can cause exit */
  #define         SRR1_WS_DEEPER        0x00020000 /* Some resources not maintained */
  #define         SRR1_WS_DEEP          0x00010000 /* All resources maintained */
  #define   SRR1_PROGFPE                0x00100000 /* Floating Point Enabled */
 +#define   SRR1_PROGILL                0x00080000 /* Illegal instruction */
  #define   SRR1_PROGPRIV               0x00040000 /* Privileged instruction */
  #define   SRR1_PROGTRAP               0x00020000 /* Trap */
  #define   SRR1_PROGADDR               0x00010000 /* SRR0 contains subsequent addr */
  #define PVR_970MP     0x0044
  #define PVR_970GX     0x0045
  #define PVR_POWER7p   0x004A
+ #define PVR_POWER8    0x004B
  #define PVR_BE                0x0070
  #define PVR_PA6T      0x0090
  
index e9a906c27234fe880a5c78bd9c80ef7835c712ab,ad7666695761103571c7aa5b258816d517a27392..b310a0573625dec8a672c267ab6158f8e90b37a6
@@@ -373,11 -373,19 +373,13 @@@ _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
        li      r3,0
 -      b       .do_exit        # no return
 -
 -_GLOBAL(__ret_from_kernel_execve)
 -      addi    r1,r3,-STACK_FRAME_OVERHEAD
 -      li      r10,1
 -      std     r10,SOFTE(r1)
        b       syscall_exit
  
        .section        ".toc","aw"
index 2f4668136b200d9f22a25c7761749e7e512b315f,30b358dc2bebdac232ced9966daadf7b969fd1c6..d6491bd481d0cef934cf9873a0b014d28c7a25ac
  #include <linux/notifier.h>
  #include <linux/proc_fs.h>
  #include <linux/slab.h>
+ #include <linux/of.h>
  
  #include <asm/prom.h>
  #include <asm/machdep.h>
  #include <asm/uaccess.h>
- #include <asm/pSeries_reconfig.h>
  #include <asm/mmu.h>
  
- /*
-  * Routines for "runtime" addition and removal of device tree nodes.
-  */
- #ifdef CONFIG_PROC_DEVICETREE
- /*
-  * Add a node to /proc/device-tree.
-  */
- static void add_node_proc_entries(struct device_node *np)
- {
-       struct proc_dir_entry *ent;
-       ent = proc_mkdir(strrchr(np->full_name, '/') + 1, np->parent->pde);
-       if (ent)
-               proc_device_tree_add_node(np, ent);
- }
- static void remove_node_proc_entries(struct device_node *np)
- {
-       struct property *pp = np->properties;
-       struct device_node *parent = np->parent;
-       while (pp) {
-               remove_proc_entry(pp->name, np->pde);
-               pp = pp->next;
-       }
-       if (np->pde)
-               remove_proc_entry(np->pde->name, parent->pde);
- }
- #else /* !CONFIG_PROC_DEVICETREE */
- static void add_node_proc_entries(struct device_node *np)
- {
-       return;
- }
- static void remove_node_proc_entries(struct device_node *np)
- {
-       return;
- }
- #endif /* CONFIG_PROC_DEVICETREE */
  /**
   *    derive_parent - basically like dirname(1)
   *    @path:  the full_name of a node to be added to the tree
@@@ -97,28 -55,6 +55,6 @@@ static struct device_node *derive_paren
        return parent;
  }
  
- static BLOCKING_NOTIFIER_HEAD(pSeries_reconfig_chain);
- int pSeries_reconfig_notifier_register(struct notifier_block *nb)
- {
-       return blocking_notifier_chain_register(&pSeries_reconfig_chain, nb);
- }
- EXPORT_SYMBOL_GPL(pSeries_reconfig_notifier_register);
- void pSeries_reconfig_notifier_unregister(struct notifier_block *nb)
- {
-       blocking_notifier_chain_unregister(&pSeries_reconfig_chain, nb);
- }
- EXPORT_SYMBOL_GPL(pSeries_reconfig_notifier_unregister);
- int pSeries_reconfig_notify(unsigned long action, void *p)
- {
-       int err = blocking_notifier_call_chain(&pSeries_reconfig_chain,
-                                               action, p);
-       return notifier_to_errno(err);
- }
  static int pSeries_reconfig_add_node(const char *path, struct property *proplist)
  {
        struct device_node *np;
                goto out_err;
        }
  
-       err = pSeries_reconfig_notify(PSERIES_RECONFIG_ADD, np);
+       err = of_attach_node(np);
        if (err) {
                printk(KERN_ERR "Failed to add device node %s\n", path);
                goto out_err;
        }
  
-       of_attach_node(np);
-       add_node_proc_entries(np);
        of_node_put(np->parent);
  
        return 0;
@@@ -179,11 -111,7 +111,7 @@@ static int pSeries_reconfig_remove_node
                return -EBUSY;
        }
  
-       remove_node_proc_entries(np);
-       pSeries_reconfig_notify(PSERIES_RECONFIG_REMOVE, np);
        of_detach_node(np);
        of_node_put(parent);
        of_node_put(np); /* Must decrement the refcount */
        return 0;
@@@ -281,11 -209,12 +209,11 @@@ static struct property *new_property(co
        if (!new)
                return NULL;
  
 -      if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL)))
 +      if (!(new->name = kstrdup(name, GFP_KERNEL)))
                goto cleanup;
        if (!(new->value = kmalloc(length + 1, GFP_KERNEL)))
                goto cleanup;
  
 -      strcpy(new->name, name);
        memcpy(new->value, value, length);
        *(((char *)new->value) + length) = 0;
        new->length = length;
@@@ -397,7 -326,7 +325,7 @@@ static int do_add_property(char *buf, s
        if (!prop)
                return -ENOMEM;
  
-       prom_add_property(np, prop);
+       of_add_property(np, prop);
  
        return 0;
  }
@@@ -421,16 -350,15 +349,15 @@@ static int do_remove_property(char *buf
  
        prop = of_find_property(np, buf, NULL);
  
-       return prom_remove_property(np, prop);
+       return of_remove_property(np, prop);
  }
  
  static int do_update_property(char *buf, size_t bufsize)
  {
        struct device_node *np;
-       struct pSeries_reconfig_prop_update upd_value;
        unsigned char *value;
        char *name, *end, *next_prop;
-       int rc, length;
+       int length;
        struct property *newprop;
        buf = parse_node(buf, bufsize, &np);
        end = buf + bufsize;
        if (!strcmp(name, "slb-size") || !strcmp(name, "ibm,slb-size"))
                slb_set_size(*(int *)value);
  
-       upd_value.node = np;
-       upd_value.property = newprop;
-       pSeries_reconfig_notify(PSERIES_UPDATE_PROPERTY, &upd_value);
-       rc = prom_update_property(np, newprop);
-       if (rc)
-               return rc;
-       /* For memory under the ibm,dynamic-reconfiguration-memory node
-        * of the device tree, adding and removing memory is just an update
-        * to the ibm,dynamic-memory property instead of adding/removing a
-        * memory node in the device tree.  For these cases we still need to
-        * involve the notifier chain.
-        */
-       if (!strcmp(name, "ibm,dynamic-memory")) {
-               int action;
-               next_prop = parse_next_property(next_prop, end, &name,
-                                               &length, &value);
-               if (!next_prop)
-                       return -EINVAL;
-               if (!strcmp(name, "add"))
-                       action = PSERIES_DRCONF_MEM_ADD;
-               else
-                       action = PSERIES_DRCONF_MEM_REMOVE;
-               rc = pSeries_reconfig_notify(action, value);
-               if (rc) {
-                       prom_update_property(np, newprop);
-                       return rc;
-               }
-       }
-       return 0;
+       return of_update_property(np, newprop);
  }
  
  /**
index 01b62a62c63582d2a56e870e2522186185391446,b96885b4e9960d78ff19f6d408db6c40cc1b7361..5ba325bff3a28422cbbe2303e24783eca452fb38
@@@ -89,7 -89,7 +89,7 @@@ static int fsl_pci_dma_set_mask(struct 
        return 0;
  }
  
- static int __init setup_one_atmu(struct ccsr_pci __iomem *pci,
+ static int setup_one_atmu(struct ccsr_pci __iomem *pci,
        unsigned int index, const struct resource *res,
        resource_size_t offset)
  {
  }
  
  /* atmu setup for fsl pci/pcie controller */
- static void __init setup_pci_atmu(struct pci_controller *hose,
+ static void setup_pci_atmu(struct pci_controller *hose,
                                  struct resource *rsrc)
  {
        struct ccsr_pci __iomem *pci;
        u32 pcicsrbar = 0, pcicsrbar_sz;
        u32 piwar = PIWAR_EN | PIWAR_PF | PIWAR_TGI_LOCAL |
                        PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
 -      char *name = hose->dn->full_name;
 +      const char *name = hose->dn->full_name;
        const u64 *reg;
        int len;
  
@@@ -902,9 -902,42 +902,42 @@@ static int __devinit fsl_pci_probe(stru
        return 0;
  }
  
+ #ifdef CONFIG_PM
+ static int fsl_pci_resume(struct device *dev)
+ {
+       struct pci_controller *hose;
+       struct resource pci_rsrc;
+       hose = pci_find_hose_for_OF_device(dev->of_node);
+       if (!hose)
+               return -ENODEV;
+       if (of_address_to_resource(dev->of_node, 0, &pci_rsrc)) {
+               dev_err(dev, "Get pci register base failed.");
+               return -ENODEV;
+       }
+       setup_pci_atmu(hose, &pci_rsrc);
+       return 0;
+ }
+ static const struct dev_pm_ops pci_pm_ops = {
+       .resume = fsl_pci_resume,
+ };
+ #define PCI_PM_OPS (&pci_pm_ops)
+ #else
+ #define PCI_PM_OPS NULL
+ #endif
  static struct platform_driver fsl_pci_driver = {
        .driver = {
                .name = "fsl-pci",
+               .pm = PCI_PM_OPS,
                .of_match_table = pci_ids,
        },
        .probe = fsl_pci_probe,
diff --combined drivers/macintosh/smu.c
index 196368009001196f08f103a39c9786d93f335751,5b939509db3bf36bae876194669640b28ebb0428..9c6b964148628db7d626c2b5962ccc6b159c8aa8
@@@ -565,7 -565,7 +565,7 @@@ fail_msg_node
  fail_db_node:
        of_node_put(smu->db_node);
  fail_bootmem:
 -      free_bootmem((unsigned long)smu, sizeof(struct smu_device));
 +      free_bootmem(__pa(smu), sizeof(struct smu_device));
        smu = NULL;
  fail_np:
        of_node_put(np);
@@@ -997,7 -997,7 +997,7 @@@ static struct smu_sdbp_header *smu_crea
                       "%02x !\n", id, hdr->id);
                goto failure;
        }
-       if (prom_add_property(smu->of_node, prop)) {
+       if (of_add_property(smu->of_node, prop)) {
                printk(KERN_DEBUG "SMU: Failed creating sdb-partition-%02x "
                       "property !\n", id);
                goto failure;
diff --combined drivers/of/base.c
index be846408dbc14e86dd5df8b2d511eac36be4c711,fa40402fe8d5f4fe00979a4e813958e3b45b3f1a..db8d211a0d05d4f26b8b297ecb82d9a8e0139b04
@@@ -45,8 -45,7 +45,8 @@@ struct alias_prop 
  
  static LIST_HEAD(aliases_lookup);
  
 -struct device_node *allnodes;
 +struct device_node *of_allnodes;
 +EXPORT_SYMBOL(of_allnodes);
  struct device_node *of_chosen;
  struct device_node *of_aliases;
  
@@@ -200,7 -199,7 +200,7 @@@ struct device_node *of_find_all_nodes(s
        struct device_node *np;
  
        read_lock(&devtree_lock);
 -      np = prev ? prev->allnext : allnodes;
 +      np = prev ? prev->allnext : of_allnodes;
        for (; np != NULL; np = np->allnext)
                if (of_node_get(np))
                        break;
@@@ -423,7 -422,7 +423,7 @@@ EXPORT_SYMBOL(of_get_child_by_name)
   */
  struct device_node *of_find_node_by_path(const char *path)
  {
 -      struct device_node *np = allnodes;
 +      struct device_node *np = of_allnodes;
  
        read_lock(&devtree_lock);
        for (; np; np = np->allnext) {
@@@ -453,7 -452,7 +453,7 @@@ struct device_node *of_find_node_by_nam
        struct device_node *np;
  
        read_lock(&devtree_lock);
 -      np = from ? from->allnext : allnodes;
 +      np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext)
                if (np->name && (of_node_cmp(np->name, name) == 0)
                    && of_node_get(np))
@@@ -482,7 -481,7 +482,7 @@@ struct device_node *of_find_node_by_typ
        struct device_node *np;
  
        read_lock(&devtree_lock);
 -      np = from ? from->allnext : allnodes;
 +      np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext)
                if (np->type && (of_node_cmp(np->type, type) == 0)
                    && of_node_get(np))
@@@ -513,7 -512,7 +513,7 @@@ struct device_node *of_find_compatible_
        struct device_node *np;
  
        read_lock(&devtree_lock);
 -      np = from ? from->allnext : allnodes;
 +      np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext) {
                if (type
                    && !(np->type && (of_node_cmp(np->type, type) == 0)))
@@@ -546,7 -545,7 +546,7 @@@ struct device_node *of_find_node_with_p
        struct property *pp;
  
        read_lock(&devtree_lock);
 -      np = from ? from->allnext : allnodes;
 +      np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext) {
                for (pp = np->properties; pp; pp = pp->next) {
                        if (of_prop_cmp(pp->name, prop_name) == 0) {
@@@ -595,35 -594,27 +595,35 @@@ const struct of_device_id *of_match_nod
  EXPORT_SYMBOL(of_match_node);
  
  /**
 - *    of_find_matching_node - Find a node based on an of_device_id match
 - *                            table.
 + *    of_find_matching_node_and_match - Find a node based on an of_device_id
 + *                                      match table.
   *    @from:          The node to start searching from or NULL, the node
   *                    you pass will not be searched, only the next one
   *                    will; typically, you pass what the previous call
   *                    returned. of_node_put() will be called on it
   *    @matches:       array of of device match structures to search in
 + *    @match          Updated to point at the matches entry which matched
   *
   *    Returns a node pointer with refcount incremented, use
   *    of_node_put() on it when done.
   */
 -struct device_node *of_find_matching_node(struct device_node *from,
 -                                        const struct of_device_id *matches)
 +struct device_node *of_find_matching_node_and_match(struct device_node *from,
 +                                      const struct of_device_id *matches,
 +                                      const struct of_device_id **match)
  {
        struct device_node *np;
  
 +      if (match)
 +              *match = NULL;
 +
        read_lock(&devtree_lock);
 -      np = from ? from->allnext : allnodes;
 +      np = from ? from->allnext : of_allnodes;
        for (; np; np = np->allnext) {
 -              if (of_match_node(matches, np) && of_node_get(np))
 +              if (of_match_node(matches, np) && of_node_get(np)) {
 +                      if (match)
 +                              *match = matches;
                        break;
 +              }
        }
        of_node_put(from);
        read_unlock(&devtree_lock);
@@@ -670,7 -661,7 +670,7 @@@ struct device_node *of_find_node_by_pha
        struct device_node *np;
  
        read_lock(&devtree_lock);
 -      for (np = allnodes; np; np = np->allnext)
 +      for (np = of_allnodes; np; np = np->allnext)
                if (np->phandle == handle)
                        break;
        of_node_get(np);
  }
  EXPORT_SYMBOL(of_find_node_by_phandle);
  
 +/**
 + * of_property_read_u8_array - Find and read an array of u8 from a property.
 + *
 + * @np:               device node from which the property value is to be read.
 + * @propname: name of the property to be searched.
 + * @out_value:        pointer to return value, modified only if return value is 0.
 + * @sz:               number of array elements to read
 + *
 + * Search for a property in a device node and read 8-bit value(s) from
 + * it. Returns 0 on success, -EINVAL if the property does not exist,
 + * -ENODATA if property does not have a value, and -EOVERFLOW if the
 + * property data isn't large enough.
 + *
 + * dts entry of array should be like:
 + *    property = /bits/ 8 <0x50 0x60 0x70>;
 + *
 + * The out_value is modified only if a valid u8 value can be decoded.
 + */
 +int of_property_read_u8_array(const struct device_node *np,
 +                      const char *propname, u8 *out_values, size_t sz)
 +{
 +      struct property *prop = of_find_property(np, propname, NULL);
 +      const u8 *val;
 +
 +      if (!prop)
 +              return -EINVAL;
 +      if (!prop->value)
 +              return -ENODATA;
 +      if ((sz * sizeof(*out_values)) > prop->length)
 +              return -EOVERFLOW;
 +
 +      val = prop->value;
 +      while (sz--)
 +              *out_values++ = *val++;
 +      return 0;
 +}
 +EXPORT_SYMBOL_GPL(of_property_read_u8_array);
 +
 +/**
 + * of_property_read_u16_array - Find and read an array of u16 from a property.
 + *
 + * @np:               device node from which the property value is to be read.
 + * @propname: name of the property to be searched.
 + * @out_value:        pointer to return value, modified only if return value is 0.
 + * @sz:               number of array elements to read
 + *
 + * Search for a property in a device node and read 16-bit value(s) from
 + * it. Returns 0 on success, -EINVAL if the property does not exist,
 + * -ENODATA if property does not have a value, and -EOVERFLOW if the
 + * property data isn't large enough.
 + *
 + * dts entry of array should be like:
 + *    property = /bits/ 16 <0x5000 0x6000 0x7000>;
 + *
 + * The out_value is modified only if a valid u16 value can be decoded.
 + */
 +int of_property_read_u16_array(const struct device_node *np,
 +                      const char *propname, u16 *out_values, size_t sz)
 +{
 +      struct property *prop = of_find_property(np, propname, NULL);
 +      const __be16 *val;
 +
 +      if (!prop)
 +              return -EINVAL;
 +      if (!prop->value)
 +              return -ENODATA;
 +      if ((sz * sizeof(*out_values)) > prop->length)
 +              return -EOVERFLOW;
 +
 +      val = prop->value;
 +      while (sz--)
 +              *out_values++ = be16_to_cpup(val++);
 +      return 0;
 +}
 +EXPORT_SYMBOL_GPL(of_property_read_u16_array);
 +
  /**
   * of_property_read_u32_array - Find and read an array of 32 bit integers
   * from a property.
   * @np:               device node from which the property value is to be read.
   * @propname: name of the property to be searched.
   * @out_value:        pointer to return value, modified only if return value is 0.
 + * @sz:               number of array elements to read
   *
   * Search for a property in a device node and read 32-bit value(s) from
   * it. Returns 0 on success, -EINVAL if the property does not exist,
@@@ -979,8 -893,8 +979,8 @@@ EXPORT_SYMBOL_GPL(of_property_count_str
   * Returns the device_node pointer with refcount incremented.  Use
   * of_node_put() on it when done.
   */
 -struct device_node *
 -of_parse_phandle(struct device_node *np, const char *phandle_name, int index)
 +struct device_node *of_parse_phandle(const struct device_node *np,
 +                                   const char *phandle_name, int index)
  {
        const __be32 *phandle;
        int size;
@@@ -1025,7 -939,7 +1025,7 @@@ EXPORT_SYMBOL(of_parse_phandle)
   * To get a device_node of the `node2' node you may call this:
   * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args);
   */
 -int of_parse_phandle_with_args(struct device_node *np, const char *list_name,
 +int of_parse_phandle_with_args(const struct device_node *np, const char *list_name,
                                const char *cells_name, int index,
                                struct of_phandle_args *out_args)
  {
  }
  EXPORT_SYMBOL(of_parse_phandle_with_args);
  
+ #if defined(CONFIG_OF_DYNAMIC)
+ static int of_property_notify(int action, struct device_node *np,
+                             struct property *prop)
+ {
+       struct of_prop_reconfig pr;
+       pr.dn = np;
+       pr.prop = prop;
+       return of_reconfig_notify(action, &pr);
+ }
+ #else
+ static int of_property_notify(int action, struct device_node *np,
+                             struct property *prop)
+ {
+       return 0;
+ }
+ #endif
  /**
-  * prom_add_property - Add a property to a node
+  * of_add_property - Add a property to a node
   */
- int prom_add_property(struct device_node *np, struct property *prop)
+ int of_add_property(struct device_node *np, struct property *prop)
  {
        struct property **next;
        unsigned long flags;
+       int rc;
+       rc = of_property_notify(OF_RECONFIG_ADD_PROPERTY, np, prop);
+       if (rc)
+               return rc;
  
        prop->next = NULL;
        write_lock_irqsave(&devtree_lock, flags);
  }
  
  /**
-  * prom_remove_property - Remove a property from a node.
+  * of_remove_property - Remove a property from a node.
   *
   * Note that we don't actually remove it, since we have given out
   * who-knows-how-many pointers to the data using get-property.
   * Instead we just move the property to the "dead properties"
   * list, so it won't be found any more.
   */
- int prom_remove_property(struct device_node *np, struct property *prop)
+ int of_remove_property(struct device_node *np, struct property *prop)
  {
        struct property **next;
        unsigned long flags;
        int found = 0;
+       int rc;
+       rc = of_property_notify(OF_RECONFIG_REMOVE_PROPERTY, np, prop);
+       if (rc)
+               return rc;
  
        write_lock_irqsave(&devtree_lock, flags);
        next = &np->properties;
  }
  
  /*
-  * prom_update_property - Update a property in a node, if the property does
+  * of_update_property - Update a property in a node, if the property does
   * not exist, add it.
   *
   * Note that we don't actually remove it, since we have given out
   * Instead we just move the property to the "dead properties" list,
   * and add the new property to the property list
   */
- int prom_update_property(struct device_node *np,
-                        struct property *newprop)
+ int of_update_property(struct device_node *np, struct property *newprop)
  {
        struct property **next, *oldprop;
        unsigned long flags;
-       int found = 0;
+       int rc, found = 0;
+       rc = of_property_notify(OF_RECONFIG_UPDATE_PROPERTY, np, newprop);
+       if (rc)
+               return rc;
  
        if (!newprop->name)
                return -EINVAL;
  
        oldprop = of_find_property(np, newprop->name, NULL);
        if (!oldprop)
-               return prom_add_property(np, newprop);
+               return of_add_property(np, newprop);
  
        write_lock_irqsave(&devtree_lock, flags);
        next = &np->properties;
   * device tree nodes.
   */
  
+ static BLOCKING_NOTIFIER_HEAD(of_reconfig_chain);
+ int of_reconfig_notifier_register(struct notifier_block *nb)
+ {
+       return blocking_notifier_chain_register(&of_reconfig_chain, nb);
+ }
+ EXPORT_SYMBOL_GPL(of_reconfig_notifier_register);
+ int of_reconfig_notifier_unregister(struct notifier_block *nb)
+ {
+       return blocking_notifier_chain_unregister(&of_reconfig_chain, nb);
+ }
+ EXPORT_SYMBOL_GPL(of_reconfig_notifier_unregister);
+ int of_reconfig_notify(unsigned long action, void *p)
+ {
+       int rc;
+       rc = blocking_notifier_call_chain(&of_reconfig_chain, action, p);
+       return notifier_to_errno(rc);
+ }
+ #ifdef CONFIG_PROC_DEVICETREE
+ static void of_add_proc_dt_entry(struct device_node *dn)
+ {
+       struct proc_dir_entry *ent;
+       ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde);
+       if (ent)
+               proc_device_tree_add_node(dn, ent);
+ }
+ #else
+ static void of_add_proc_dt_entry(struct device_node *dn)
+ {
+       return;
+ }
+ #endif
  /**
   * of_attach_node - Plug a device node into the tree and global list.
   */
void of_attach_node(struct device_node *np)
int of_attach_node(struct device_node *np)
  {
        unsigned long flags;
+       int rc;
+       rc = of_reconfig_notify(OF_RECONFIG_ATTACH_NODE, np);
+       if (rc)
+               return rc;
  
        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.
   *
   * The caller must hold a reference to the node.  The memory associated with
   * the node is not freed until its refcount goes to zero.
   */
void of_detach_node(struct device_node *np)
int of_detach_node(struct device_node *np)
  {
        struct device_node *parent;
        unsigned long flags;
+       int rc = 0;
+       rc = of_reconfig_notify(OF_RECONFIG_DETACH_NODE, np);
+       if (rc)
+               return rc;
  
        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)
                        ;
        }
  
        of_node_set_flag(np, OF_DETACHED);
- out_unlock:
        write_unlock_irqrestore(&devtree_lock, flags);
+       of_remove_proc_dt_entry(np);
+       return rc;
  }
  #endif /* defined(CONFIG_OF_DYNAMIC) */
  
diff --combined drivers/video/Kconfig
index 9c31277b3a811067a1e7985eaa2256e379a149e3,0cff083fbbe21c8cebe7bb6f30649145550540df..e7068c508800ce502bff34055da63ae71f25f0f6
@@@ -2045,7 -2045,7 +2045,7 @@@ config FB_S3C_DEBUG_REGWRIT
         bool "Debug register writes"
         depends on FB_S3C
         ---help---
 -         Show all register writes via printk(KERN_DEBUG)
 +         Show all register writes via pr_debug()
  
  config FB_S3C2410
        tristate "S3C2410 LCD framebuffer support"
@@@ -2140,14 -2140,16 +2140,16 @@@ config FB_UD
          To compile as a module, choose M here: the module name is udlfb.
  
  config FB_IBM_GXT4500
-       tristate "Framebuffer support for IBM GXT4500P adaptor"
+       tristate "Framebuffer support for IBM GXT4000P/4500P/6000P/6500P adaptors"
        depends on FB && PPC
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        ---help---
-         Say Y here to enable support for the IBM GXT4500P display
-         adaptor, found on some IBM System P (pSeries) machines.
+         Say Y here to enable support for the IBM GXT4000P/6000P and
+         GXT4500P/6500P display adaptor based on Raster Engine RC1000,
+         found on some IBM System P (pSeries) machines. This driver
+         doesn't use Geometry Engine GT1000.
  
  config FB_PS3
        tristate "PS3 GPU framebuffer driver"
@@@ -2442,19 -2444,4 +2444,19 @@@ config FB_SH_MOBILE_MERA
          Up to 4 memory channels can be configured, allowing 4 RGB or
          2 YCbCr framebuffers to be configured.
  
 +config FB_SSD1307
 +      tristate "Solomon SSD1307 framebuffer support"
 +      depends on FB && I2C
 +      depends on OF
 +      depends on GENERIC_GPIO
 +      select FB_SYS_FOPS
 +      select FB_SYS_FILLRECT
 +      select FB_SYS_COPYAREA
 +      select FB_SYS_IMAGEBLIT
 +      select FB_DEFERRED_IO
 +      select PWM
 +      help
 +        This driver implements support for the Solomon SSD1307
 +        OLED controller over I2C.
 +
  endmenu
diff --combined include/linux/of.h
index 6cfea9aa401f766651956f97c389c0e209202279,681a6c88010fbfd4ede20c9d13d26939cc927a6f..5ebcc5c8e42399f07ef6d46b308835b05a0ae6ad
@@@ -22,6 -22,7 +22,7 @@@
  #include <linux/mod_devicetable.h>
  #include <linux/spinlock.h>
  #include <linux/topology.h>
+ #include <linux/notifier.h>
  
  #include <asm/byteorder.h>
  #include <asm/errno.h>
@@@ -46,7 -47,7 +47,7 @@@ struct device_node 
        const char *name;
        const char *type;
        phandle phandle;
 -      char    *full_name;
 +      const char *full_name;
  
        struct  property *properties;
        struct  property *deadprops;    /* removed properties */
@@@ -60,7 -61,7 +61,7 @@@
        unsigned long _flags;
        void    *data;
  #if defined(CONFIG_SPARC)
 -      char    *path_component_name;
 +      const char *path_component_name;
        unsigned int unique_id;
        struct of_irq_controller *irq_trans;
  #endif
@@@ -88,14 -89,14 +89,14 @@@ static inline void of_node_put(struct d
  #ifdef CONFIG_OF
  
  /* Pointer for first entry in chain of all nodes. */
 -extern struct device_node *allnodes;
 +extern struct device_node *of_allnodes;
  extern struct device_node *of_chosen;
  extern struct device_node *of_aliases;
  extern rwlock_t devtree_lock;
  
  static inline bool of_have_populated_dt(void)
  {
 -      return allnodes != NULL;
 +      return of_allnodes != NULL;
  }
  
  static inline bool of_node_is_root(const struct device_node *node)
@@@ -179,22 -180,11 +180,22 @@@ extern struct device_node *of_find_comp
  #define for_each_compatible_node(dn, type, compatible) \
        for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
             dn = of_find_compatible_node(dn, type, compatible))
 -extern struct device_node *of_find_matching_node(struct device_node *from,
 -      const struct of_device_id *matches);
 +extern struct device_node *of_find_matching_node_and_match(
 +      struct device_node *from,
 +      const struct of_device_id *matches,
 +      const struct of_device_id **match);
 +static inline struct device_node *of_find_matching_node(
 +      struct device_node *from,
 +      const struct of_device_id *matches)
 +{
 +      return of_find_matching_node_and_match(from, matches, NULL);
 +}
  #define for_each_matching_node(dn, matches) \
        for (dn = of_find_matching_node(NULL, matches); dn; \
             dn = of_find_matching_node(dn, matches))
 +#define for_each_matching_node_and_match(dn, matches, match) \
 +      for (dn = of_find_matching_node_and_match(NULL, matches, match); \
 +           dn; dn = of_find_matching_node_and_match(dn, matches, match))
  extern struct device_node *of_find_node_by_path(const char *path);
  extern struct device_node *of_find_node_by_phandle(phandle handle);
  extern struct device_node *of_get_parent(const struct device_node *node);
@@@ -234,10 -224,6 +235,10 @@@ extern struct device_node *of_find_node
  extern struct property *of_find_property(const struct device_node *np,
                                         const char *name,
                                         int *lenp);
 +extern int of_property_read_u8_array(const struct device_node *np,
 +                      const char *propname, u8 *out_values, size_t sz);
 +extern int of_property_read_u16_array(const struct device_node *np,
 +                      const char *propname, u16 *out_values, size_t sz);
  extern int of_property_read_u32_array(const struct device_node *np,
                                      const char *propname,
                                      u32 *out_values,
@@@ -270,10 -256,10 +271,10 @@@ extern int of_n_size_cells(struct devic
  extern const struct of_device_id *of_match_node(
        const struct of_device_id *matches, const struct device_node *node);
  extern int of_modalias_node(struct device_node *node, char *modalias, int len);
 -extern struct device_node *of_parse_phandle(struct device_node *np,
 +extern struct device_node *of_parse_phandle(const struct device_node *np,
                                            const char *phandle_name,
                                            int index);
 -extern int of_parse_phandle_with_args(struct device_node *np,
 +extern int of_parse_phandle_with_args(const struct device_node *np,
        const char *list_name, const char *cells_name, int index,
        struct of_phandle_args *out_args);
  
@@@ -282,16 -268,28 +283,28 @@@ extern int of_alias_get_id(struct devic
  
  extern int of_machine_is_compatible(const char *compat);
  
- extern int prom_add_property(struct device_node* np, struct property* prop);
- extern int prom_remove_property(struct device_node *np, struct property *prop);
- extern int prom_update_property(struct device_node *np,
-                               struct property *newprop);
+ extern int of_add_property(struct device_node *np, struct property *prop);
+ extern int of_remove_property(struct device_node *np, struct property *prop);
+ extern int of_update_property(struct device_node *np, struct property *newprop);
  
- #if defined(CONFIG_OF_DYNAMIC)
  /* For updating the device tree at runtime */
- extern void of_attach_node(struct device_node *);
- extern void of_detach_node(struct device_node *);
- #endif
+ #define OF_RECONFIG_ATTACH_NODE               0x0001
+ #define OF_RECONFIG_DETACH_NODE               0x0002
+ #define OF_RECONFIG_ADD_PROPERTY      0x0003
+ #define OF_RECONFIG_REMOVE_PROPERTY   0x0004
+ #define OF_RECONFIG_UPDATE_PROPERTY   0x0005
+ struct of_prop_reconfig {
+       struct device_node      *dn;
+       struct property         *prop;
+ };
+ extern int of_reconfig_notifier_register(struct notifier_block *);
+ extern int of_reconfig_notifier_unregister(struct notifier_block *);
+ extern int of_reconfig_notify(unsigned long, void *);
+ extern int of_attach_node(struct device_node *);
+ extern int of_detach_node(struct device_node *);
  
  #define of_match_ptr(_ptr)    (_ptr)
  
@@@ -379,18 -377,6 +392,18 @@@ static inline struct device_node *of_fi
        return NULL;
  }
  
 +static inline int of_property_read_u8_array(const struct device_node *np,
 +                      const char *propname, u8 *out_values, size_t sz)
 +{
 +      return -ENOSYS;
 +}
 +
 +static inline int of_property_read_u16_array(const struct device_node *np,
 +                      const char *propname, u16 *out_values, size_t sz)
 +{
 +      return -ENOSYS;
 +}
 +
  static inline int of_property_read_u32_array(const struct device_node *np,
                                             const char *propname,
                                             u32 *out_values, size_t sz)
@@@ -438,7 -424,7 +451,7 @@@ static inline int of_property_match_str
        return -ENOSYS;
  }
  
 -static inline struct device_node *of_parse_phandle(struct device_node *np,
 +static inline struct device_node *of_parse_phandle(const struct device_node *np,
                                                   const char *phandle_name,
                                                   int index)
  {
@@@ -497,20 -483,6 +510,20 @@@ static inline bool of_property_read_boo
        return prop ? true : false;
  }
  
 +static inline int of_property_read_u8(const struct device_node *np,
 +                                     const char *propname,
 +                                     u8 *out_value)
 +{
 +      return of_property_read_u8_array(np, propname, out_value, 1);
 +}
 +
 +static inline int of_property_read_u16(const struct device_node *np,
 +                                     const char *propname,
 +                                     u16 *out_value)
 +{
 +      return of_property_read_u16_array(np, propname, out_value, 1);
 +}
 +
  static inline int of_property_read_u32(const struct device_node *np,
                                       const char *propname,
                                       u32 *out_value)
diff --combined lib/Kconfig.debug
index e458782f3c52ac69f88d05d10233fd32b330a7fb,c2d89f37004e6840860121b99a300c32b390686f..3a353091a90390f6b95b632408797d14908d57f3
@@@ -972,7 -972,7 +972,7 @@@ config RCU_CPU_STALL_TIMEOU
        int "RCU CPU stall timeout in seconds"
        depends on TREE_RCU || TREE_PREEMPT_RCU
        range 3 300
 -      default 60
 +      default 21
        help
          If a given RCU grace period extends more than the specified
          number of seconds, a CPU stall warning is printed.  If the
@@@ -1115,7 -1115,7 +1115,7 @@@ config NOTIFIER_ERROR_INJECTIO
        depends on DEBUG_KERNEL
        select DEBUG_FS
        help
 -        This option provides the ability to inject artifical errors to
 +        This option provides the ability to inject artificial errors to
          specified notifier chain callbacks. It is useful to test the error
          handling of notifier call chain failures.
  
@@@ -1126,7 -1126,7 +1126,7 @@@ config CPU_NOTIFIER_ERROR_INJEC
        depends on HOTPLUG_CPU && NOTIFIER_ERROR_INJECTION
        help
          This option provides a kernel module that can be used to test
 -        the error handling of the cpu notifiers by injecting artifical
 +        the error handling of the cpu notifiers by injecting artificial
          errors to CPU notifier chain callbacks.  It is controlled through
          debugfs interface under /sys/kernel/debug/notifier-error-inject/cpu
  
@@@ -1150,7 -1150,7 +1150,7 @@@ config PM_NOTIFIER_ERROR_INJEC
        depends on PM && NOTIFIER_ERROR_INJECTION
        default m if PM_DEBUG
        help
 -        This option provides the ability to inject artifical errors to
 +        This option provides the ability to inject artificial errors to
          PM notifier chain callbacks.  It is controlled through debugfs
          interface /sys/kernel/debug/notifier-error-inject/pm
  
@@@ -1173,7 -1173,7 +1173,7 @@@ config MEMORY_NOTIFIER_ERROR_INJEC
        tristate "Memory hotplug notifier error injection module"
        depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
        help
 -        This option provides the ability to inject artifical errors to
 +        This option provides the ability to inject artificial errors to
          memory hotplug notifier chain callbacks.  It is controlled through
          debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
  
  
          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/<notifier event>/error".
diff --combined lib/Makefile
index 5558e35170cd7af27a17f974979f97237f93a22a,7c0090895373e3b9c9016df7e8536038593fc59f..02ed6c04cd7d943ead75e63bde87c18ec330f156
@@@ -12,8 -12,7 +12,8 @@@ lib-y := ctype.o string.o vsprintf.o cm
         idr.o int_sqrt.o extable.o \
         sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \
         proportions.o flex_proportions.o prio_heap.o ratelimit.o show_mem.o \
 -       is_single_threaded.o plist.o decompress.o
 +       is_single_threaded.o plist.o decompress.o kobject_uevent.o \
 +       earlycpio.o
  
  lib-$(CONFIG_MMU) += ioremap.o
  lib-$(CONFIG_SMP) += cpumask.o
@@@ -32,6 -31,7 +32,6 @@@ CFLAGS_kobject.o += -DDEBU
  CFLAGS_kobject_uevent.o += -DDEBUG
  endif
  
 -lib-$(CONFIG_HOTPLUG) += kobject_uevent.o
  obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
  obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o
  obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
@@@ -40,7 -40,6 +40,7 @@@ obj-$(CONFIG_DEBUG_LOCKING_API_SELFTEST
  obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
  lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
  lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
 +lib-$(CONFIG_PERCPU_RWSEM) += percpu-rwsem.o
  
  CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS))
  obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
@@@ -95,8 -94,8 +95,8 @@@ obj-$(CONFIG_NOTIFIER_ERROR_INJECTION) 
  obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o
  obj-$(CONFIG_PM_NOTIFIER_ERROR_INJECT) += pm-notifier-error-inject.o
  obj-$(CONFIG_MEMORY_NOTIFIER_ERROR_INJECT) += memory-notifier-error-inject.o
- obj-$(CONFIG_PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT) += \
-       pSeries-reconfig-notifier-error-inject.o
+ obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
+       of-reconfig-notifier-error-inject.o
  
  lib-$(CONFIG_GENERIC_BUG) += bug.o
  
@@@ -164,7 -163,7 +164,7 @@@ $(obj)/crc32table.h: $(obj)/gen_crc32ta
  #
  obj-$(CONFIG_OID_REGISTRY) += oid_registry.o
  
 -$(obj)/oid_registry.c: $(obj)/oid_registry_data.c
 +$(obj)/oid_registry.o: $(obj)/oid_registry_data.c
  
  $(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \
                            $(src)/build_OID_registry