Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 18:08:17 +0000 (11:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 18:08:17 +0000 (11:08 -0700)
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits)
  powerpc: Wireup new syscalls
  Move update_mmu_cache() declaration from tlbflush.h to pgtable.h
  powerpc/pseries: Remove kmalloc call in handling writes to lparcfg
  powerpc/pseries: Update arch vector to indicate support for CMO
  ibmvfc: Add support for collaborative memory overcommit
  ibmvscsi: driver enablement for CMO
  ibmveth: enable driver for CMO
  ibmveth: Automatically enable larger rx buffer pools for larger mtu
  powerpc/pseries: Verify CMO memory entitlement updates with virtual I/O
  powerpc/pseries: vio bus support for CMO
  powerpc/pseries: iommu enablement for CMO
  powerpc/pseries: Add CMO paging statistics
  powerpc/pseries: Add collaborative memory manager
  powerpc/pseries: Utilities to set firmware page state
  powerpc/pseries: Enable CMO feature during platform setup
  powerpc/pseries: Split retrieval of processor entitlement data into a helper routine
  powerpc/pseries: Add memory entitlement capabilities to /proc/ppc64/lparcfg
  powerpc/pseries: Split processor entitlement retrieval and gathering to helper routines
  powerpc/pseries: Remove extraneous error reporting for hcall failures in lparcfg
  powerpc: Fix compile error with binutils 2.15
  ...

Fixed up conflict in arch/powerpc/platforms/52xx/Kconfig manually.

1  2 
arch/powerpc/platforms/52xx/Kconfig
fs/binfmt_elf.c

index ccbd4958412ea83f0a956893433a8026c2cb39d6,9a51675beb80507a792b24edc645329d6e89393f..696a5ee4962d20c81737b5a36db3ece5a13041bd
@@@ -1,7 -1,6 +1,6 @@@
  config PPC_MPC52xx
        bool "52xx-based boards"
        depends on PPC_MULTIPLATFORM && PPC32
-       select FSL_SOC
        select PPC_CLOCK
        select PPC_PCI_CHOICE
  
@@@ -48,6 -47,7 +47,7 @@@ config PPC_MPC5200_BUGFI
  config PPC_MPC5200_GPIO
        bool "MPC5200 GPIO support"
        depends on PPC_MPC52xx
 -      select HAVE_GPIO_LIB
 +      select ARCH_REQUIRE_GPIOLIB
+       select GENERIC_GPIO
        help
          Enable gpiolib support for mpc5200 based boards
diff --combined fs/binfmt_elf.c
index 88d180306cf942a9f65672ab57b5aad8f46722e0,742c8f5304813d55870657ddf7b0120d9070d741..3b6ff854d98379b9af3dca3ea6889e79879575e7
@@@ -131,6 -131,15 +131,15 @@@ static int padzero(unsigned long elf_bs
  #define STACK_ALLOC(sp, len) ({ sp -= len ; sp; })
  #endif
  
+ #ifndef ELF_BASE_PLATFORM
+ /*
+  * AT_BASE_PLATFORM indicates the "real" hardware/microarchitecture.
+  * If the arch defines ELF_BASE_PLATFORM (in asm/elf.h), the value
+  * will be copied to the user stack in the same manner as AT_PLATFORM.
+  */
+ #define ELF_BASE_PLATFORM NULL
+ #endif
  static int
  create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
                unsigned long load_addr, unsigned long interp_load_addr)
        elf_addr_t __user *envp;
        elf_addr_t __user *sp;
        elf_addr_t __user *u_platform;
+       elf_addr_t __user *u_base_platform;
        const char *k_platform = ELF_PLATFORM;
+       const char *k_base_platform = ELF_BASE_PLATFORM;
        int items;
        elf_addr_t *elf_info;
        int ei_index = 0;
                        return -EFAULT;
        }
  
+       /*
+        * If this architecture has a "base" platform capability
+        * string, copy it to userspace.
+        */
+       u_base_platform = NULL;
+       if (k_base_platform) {
+               size_t len = strlen(k_base_platform) + 1;
+               u_base_platform = (elf_addr_t __user *)STACK_ALLOC(p, len);
+               if (__copy_to_user(u_base_platform, k_base_platform, len))
+                       return -EFAULT;
+       }
        /* Create the ELF interpreter info */
        elf_info = (elf_addr_t *)current->mm->saved_auxv;
        /* update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes */
                NEW_AUX_ENT(AT_PLATFORM,
                            (elf_addr_t)(unsigned long)u_platform);
        }
+       if (k_base_platform) {
+               NEW_AUX_ENT(AT_BASE_PLATFORM,
+                           (elf_addr_t)(unsigned long)u_base_platform);
+       }
        if (bprm->interp_flags & BINPRM_FLAGS_EXECFD) {
                NEW_AUX_ENT(AT_EXECFD, bprm->interp_data);
        }
@@@ -1478,7 -1506,7 +1506,7 @@@ static int fill_note_info(struct elfhd
        const struct user_regset_view *view = task_user_regset_view(dump_task);
        struct elf_thread_core_info *t;
        struct elf_prpsinfo *psinfo;
 -      struct task_struct *g, *p;
 +      struct core_thread *ct;
        unsigned int i;
  
        info->size = 0;
        /*
         * Allocate a structure for each thread.
         */
 -      rcu_read_lock();
 -      do_each_thread(g, p)
 -              if (p->mm == dump_task->mm) {
 -                      t = kzalloc(offsetof(struct elf_thread_core_info,
 -                                           notes[info->thread_notes]),
 -                                  GFP_ATOMIC);
 -                      if (unlikely(!t)) {
 -                              rcu_read_unlock();
 -                              return 0;
 -                      }
 -                      t->task = p;
 -                      if (p == dump_task || !info->thread) {
 -                              t->next = info->thread;
 -                              info->thread = t;
 -                      } else {
 -                              /*
 -                               * Make sure to keep the original task at
 -                               * the head of the list.
 -                               */
 -                              t->next = info->thread->next;
 -                              info->thread->next = t;
 -                      }
 +      for (ct = &dump_task->mm->core_state->dumper; ct; ct = ct->next) {
 +              t = kzalloc(offsetof(struct elf_thread_core_info,
 +                                   notes[info->thread_notes]),
 +                          GFP_KERNEL);
 +              if (unlikely(!t))
 +                      return 0;
 +
 +              t->task = ct->task;
 +              if (ct->task == dump_task || !info->thread) {
 +                      t->next = info->thread;
 +                      info->thread = t;
 +              } else {
 +                      /*
 +                       * Make sure to keep the original task at
 +                       * the head of the list.
 +                       */
 +                      t->next = info->thread->next;
 +                      info->thread->next = t;
                }
 -      while_each_thread(g, p);
 -      rcu_read_unlock();
 +      }
  
        /*
         * Now fill in each thread's information.
@@@ -1683,6 -1716,7 +1711,6 @@@ static int fill_note_info(struct elfhd
  {
  #define       NUM_NOTES       6
        struct list_head *t;
 -      struct task_struct *g, *p;
  
        info->notes = NULL;
        info->prstatus = NULL;
  
        info->thread_status_size = 0;
        if (signr) {
 +              struct core_thread *ct;
                struct elf_thread_status *ets;
 -              rcu_read_lock();
 -              do_each_thread(g, p)
 -                      if (current->mm == p->mm && current != p) {
 -                              ets = kzalloc(sizeof(*ets), GFP_ATOMIC);
 -                              if (!ets) {
 -                                      rcu_read_unlock();
 -                                      return 0;
 -                              }
 -                              ets->thread = p;
 -                              list_add(&ets->list, &info->thread_list);
 -                      }
 -              while_each_thread(g, p);
 -              rcu_read_unlock();
 +
 +              for (ct = current->mm->core_state->dumper.next;
 +                                              ct; ct = ct->next) {
 +                      ets = kzalloc(sizeof(*ets), GFP_KERNEL);
 +                      if (!ets)
 +                              return 0;
 +
 +                      ets->thread = ct->task;
 +                      list_add(&ets->list, &info->thread_list);
 +              }
 +
                list_for_each(t, &info->thread_list) {
                        int sz;