1. 28 Mar, 2012 29 commits
    • Daniel Lezcano's avatar
      pidns: add reboot_pid_ns() to handle the reboot syscall · cf3f8921
      Daniel Lezcano authored
      In the case of a child pid namespace, rebooting the system does not really
      makes sense.  When the pid namespace is used in conjunction with the other
      namespaces in order to create a linux container, the reboot syscall leads
      to some problems.
      A container can reboot the host.  That can be fixed by dropping the
      sys_reboot capability but we are unable to correctly to poweroff/
      halt/reboot a container and the container stays stuck at the shutdown time
      with the container's init process waiting indefinitively.
      After several attempts, no solution from userspace was found to reliabily
      handle the shutdown from a container.
      This patch propose to make the init process of the child pid namespace to
      exit with a signal status set to : SIGINT if the child pid namespace
      called "halt/poweroff" and SIGHUP if the child pid namespace called
      "reboot".  When the reboot syscall is called and we are not in the initial
      pid namespace, we kill the pid namespace for "HALT", "POWEROFF",
      "RESTART", and "RESTART2".  Otherwise we return EINVAL.
      Returning EINVAL is also an easy way to check if this feature is supported
      by the kernel when invoking another 'reboot' option like CAD.
      By this way the parent process of the child pid namespace knows if it
      rebooted or not and can take the right decision.
      Test case:
      #include <alloca.h>
      #include <stdio.h>
      #include <sched.h>
      #include <unistd.h>
      #include <signal.h>
      #include <sys/reboot.h>
      #include <sys/types.h>
      #include <sys/wait.h>
      #include <linux/reboot.h>
      static int do_reboot(void *arg)
              int *cmd = arg;
              if (reboot(*cmd))
                      printf("failed to reboot(%d): %m\n", *cmd);
      int test_reboot(int cmd, int sig)
              long stack_size = 4096;
              void *stack = alloca(stack_size) + stack_size;
              int status;
              pid_t ret;
              ret = clone(do_reboot, stack, CLONE_NEWPID | SIGCHLD, &cmd);
              if (ret < 0) {
                      printf("failed to clone: %m\n");
                      return -1;
              if (wait(&status) < 0) {
                      printf("unexpected wait error: %m\n");
                      return -1;
              if (!WIFSIGNALED(status)) {
                      printf("child process exited but was not signaled\n");
                      return -1;
              if (WTERMSIG(status) != sig) {
                      printf("signal termination is not the one expected\n");
                      return -1;
              return 0;
      int main(int argc, char *argv[])
              int status;
              status = test_reboot(LINUX_REBOOT_CMD_RESTART, SIGHUP);
              if (status < 0)
                      return 1;
              printf("reboot(LINUX_REBOOT_CMD_RESTART) succeed\n");
              status = test_reboot(LINUX_REBOOT_CMD_RESTART2, SIGHUP);
              if (status < 0)
                      return 1;
              printf("reboot(LINUX_REBOOT_CMD_RESTART2) succeed\n");
              status = test_reboot(LINUX_REBOOT_CMD_HALT, SIGINT);
              if (status < 0)
                      return 1;
              printf("reboot(LINUX_REBOOT_CMD_HALT) succeed\n");
              status = test_reboot(LINUX_REBOOT_CMD_POWER_OFF, SIGINT);
              if (status < 0)
                      return 1;
              printf("reboot(LINUX_REBOOT_CMD_POWERR_OFF) succeed\n");
              status = test_reboot(LINUX_REBOOT_CMD_CAD_ON, -1);
              if (status >= 0) {
                      printf("reboot(LINUX_REBOOT_CMD_CAD_ON) should have failed\n");
                      return 1;
              printf("reboot(LINUX_REBOOT_CMD_CAD_ON) has failed as expected\n");
              return 0;
      [akpm@linux-foundation.org: tweak and add comments]
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@free.fr>
      Acked-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
      Tested-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
      Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Akinobu Mita's avatar
      sysctl: use bitmap library functions · 5a04cca6
      Akinobu Mita authored
      Use bitmap_set() instead of using set_bit() for each bit.  This conversion
      is valid because the bitmap is private in the function call and atomic
      bitops were unnecessary.
      This also includes minor change.
      - Use bitmap_copy() for shorter typing
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Corey Minyard's avatar
      ipmi: use locks on watchdog timeout set on reboot · 423a5bb4
      Corey Minyard authored
      The IPMI watchdog timer clears or extends the timer on reboot/shutdown.
      It was using the non-locking routine for setting the watchdog timer, but
      this was causing race conditions.  Instead, use the locking version to
      avoid the races.  It seems to work fine.
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Corey Minyard's avatar
      ipmi: simplify locking · f60adf42
      Corey Minyard authored
      Now that the the IPMI driver is using a tasklet, we can simplify the
      locking in the driver and get rid of the message lock.
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Corey Minyard's avatar
      ipmi: fix message handling during panics · 895dcfd1
      Corey Minyard authored
      The part of the IPMI driver that delivered panic information to the event
      log and extended the watchdog timeout during a panic was not properly
      handling the messages.  It used static messages to avoid allocation, but
      wasn't properly waiting for these, or wasn't properly handling the
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Corey Minyard's avatar
      ipmi: use a tasklet for handling received messages · 7adf579c
      Corey Minyard authored
      The IPMI driver would release a lock, deliver a message, then relock.
      This is obviously ugly, and this patch converts the message handler
      interface to use a tasklet to schedule work.  This lets the receive
      handler be called from an interrupt handler with interrupts enabled.
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Matthew Garrett's avatar
      ipmi: increase KCS timeouts · 828dc9da
      Matthew Garrett authored
      We currently time out and retry KCS transactions after 1 second of waiting
      for IBF or OBF.  This appears to be too short for some hardware.  The IPMI
      spec says "All system software wait loops should include error timeouts.
      For simplicity, such timeouts are not shown explicitly in the flow
      diagrams.  A five-second timeout or greater is recommended".  Change the
      timeout to five seconds to satisfy the slow hardware.
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Srinivas_Gowda's avatar
      ipmi: decrease the IPMI message transaction time in interrupt mode · b88e7693
      Srinivas_Gowda authored
      Call the event handler immediately after starting the next message.
      This change considerably decreases the IPMI transaction time (cuts off
      ~9ms for a single ipmitool transaction).
      Signed-off-by: default avatarSrinivas_Gowda <srinivas_g_gowda@dell.com>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Dave Young's avatar
      kdump x86: fix total mem size calculation for reservation · 09c71bfd
      Dave Young authored
      crashkernel reservation need know the total memory size.  Current
      get_total_mem simply use max_pfn - min_low_pfn.  It is wrong because it
      will including memory holes in the middle.
      Especially for kvm guest with memory > 0xe0000000, there's below in qemu
      code: qemu split memory as below:
          if (ram_size >= 0xe0000000 ) {
              above_4g_mem_size = ram_size - 0xe0000000;
              below_4g_mem_size = 0xe0000000;
          } else {
              below_4g_mem_size = ram_size;
      So for 4G mem guest, seabios will insert a 512M usable region beyond of
      4G.  Thus in above case max_pfn - min_low_pfn will be more than original
      Fixing this issue by using memblock_phys_mem_size() to get the total
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Reviewed-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
      Reviewed-by: default avatarSimon Horman <horms@verge.net.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Zhenzhong Duan's avatar
      kexec: add further check to crashkernel · eaa3be6a
      Zhenzhong Duan authored
      When using crashkernel=2M-256M, the kernel doesn't give any warning.  This
      is misleading sometimes.
      Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@oracle.com>
      Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Will Deacon's avatar
      kexec: crash: don't save swapper_pg_dir for !CONFIG_MMU configurations · d034cfab
      Will Deacon authored
      nommu platforms don't have very interesting swapper_pg_dir pointers and
      usually just #define them to NULL, meaning that we can't include them in
      the vmcoreinfo on the kexec crash path.
      This patch only saves the swapper_pg_dir if we have an MMU.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Reviewed-by: default avatarSimon Horman <horms@verge.net.au>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Srivatsa S. Bhat's avatar
      arch/ia64: remove references to cpu_*_map · 7d7f9848
      Srivatsa S. Bhat authored
      This was marked as obsolete for quite a while now..  Now it is time to
      remove it altogether.  And while doing this, get rid of first_cpu() as
      well.  Also, remove the redundant setting of cpu_online_mask in
      smp_prepare_cpus() because the generic code would have already set cpu 0
      in cpu_online_mask.
      Reported-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Srivatsa S. Bhat's avatar
      lib/cpumask.c: remove __any_online_cpu() · 38b93780
      Srivatsa S. Bhat authored
      __any_online_cpu() is not optimal and also unnecessary.  So, replace its
      use by faster cpumask_* operations.
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Venkatesh Pallipadi <venki@google.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Gilad Ben-Yossef's avatar
      mm: only IPI CPUs to drain local pages if they exist · 74046494
      Gilad Ben-Yossef authored
      Calculate a cpumask of CPUs with per-cpu pages in any zone and only send
      an IPI requesting CPUs to drain these pages to the buddy allocator if they
      actually have pages when asked to flush.
      This patch saves 85%+ of IPIs asking to drain per-cpu pages in case of
      severe memory pressure that leads to OOM since in these cases multiple,
      possibly concurrent, allocation requests end up in the direct reclaim code
      path so when the per-cpu pages end up reclaimed on first allocation
      failure for most of the proceeding allocation attempts until the memory
      pressure is off (possibly via the OOM killer) there are no per-cpu pages
      on most CPUs (and there can easily be hundreds of them).
      This also has the side effect of shortening the average latency of direct
      reclaim by 1 or more order of magnitude since waiting for all the CPUs to
      ACK the IPI takes a long time.
      Tested by running "hackbench 400" on a 8 CPU x86 VM and observing the
      difference between the number of direct reclaim attempts that end up in
      drain_all_pages() and those were more then 1/2 of the online CPU had any
      per-cpu page in them, using the vmstat counters introduced in the next
      patch in the series and using proc/interrupts.
      In the test sceanrio, this was seen to save around 3600 global
      IPIs after trigerring an OOM on a concurrent workload:
      $ cat /proc/vmstat | tail -n 2
      pcp_global_drain 0
      pcp_global_ipi_saved 0
      $ cat /proc/interrupts | grep CAL
      CAL:          1          2          1          2
                2          2          2          2   Function call interrupts
      $ hackbench 400
      [OOM messages snipped]
      $ cat /proc/vmstat | tail -n 2
      pcp_global_drain 3647
      pcp_global_ipi_saved 3642
      $ cat /proc/interrupts | grep CAL
      CAL:          6         13          6          3
                3          3         1 2          7   Function call interrupts
      Please note that if the global drain is removed from the direct reclaim
      path as a patch from Mel Gorman currently suggests this should be replaced
      with an on_each_cpu_cond invocation.
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Gilad Ben-Yossef's avatar
      fs: only send IPI to invalidate LRU BH when needed · 42be35d0
      Gilad Ben-Yossef authored
      In several code paths, such as when unmounting a file system (but not
      only) we send an IPI to ask each cpu to invalidate its local LRU BHs.
      For multi-cores systems that have many cpus that may not have any LRU BH
      because they are idle or because they have not performed any file system
      accesses since last invalidation (e.g.  CPU crunching on high perfomance
      computing nodes that write results to shared memory or only using
      filesystems that do not use the bh layer.) This can lead to loss of
      performance each time someone switches the KVM (the virtual keyboard and
      screen type, not the hypervisor) if it has a USB storage stuck in.
      This patch attempts to only send an IPI to cpus that have LRU BH.
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Gilad Ben-Yossef's avatar
      slub: only IPI CPUs that have per cpu obj to flush · a8364d55
      Gilad Ben-Yossef authored
      flush_all() is called for each kmem_cache_destroy().  So every cache being
      destroyed dynamically ends up sending an IPI to each CPU in the system,
      regardless if the cache has ever been used there.
      For example, if you close the Infinband ipath driver char device file, the
      close file ops calls kmem_cache_destroy().  So running some infiniband
      config tool on one a single CPU dedicated to system tasks might interrupt
      the rest of the 127 CPUs dedicated to some CPU intensive or latency
      sensitive task.
      I suspect there is a good chance that every line in the output of "git
      grep kmem_cache_destroy linux/ | grep '\->'" has a similar scenario.
      This patch attempts to rectify this issue by sending an IPI to flush the
      per cpu objects back to the free lists only to CPUs that seem to have such
      The check which CPU to IPI is racy but we don't care since asking a CPU
      without per cpu objects to flush does no damage and as far as I can tell
      the flush_all by itself is racy against allocs on remote CPUs anyway, so
      if you required the flush_all to be determinstic, you had to arrange for
      locking regardless.
      Without this patch the following artificial test case:
      $ cd /sys/kernel/slab
      $ for DIR in *; do cat $DIR/alloc_calls > /dev/null; done
      produces 166 IPIs on an cpuset isolated CPU. With it it produces none.
      The code path of memory allocation failure for CPUMASK_OFFSTACK=y
      config was tested using fault injection framework.
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Michal Nazarewicz <mina86@mina86.org>
      Cc: Kosaki Motohiro <kosaki.motohiro@gmail.com>
      Cc: Milton Miller <miltonm@bga.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Gilad Ben-Yossef's avatar
      smp: add func to IPI cpus based on parameter func · b3a7e98e
      Gilad Ben-Yossef authored
      Add the on_each_cpu_cond() function that wraps on_each_cpu_mask() and
      calculates the cpumask of cpus to IPI by calling a function supplied as a
      parameter in order to determine whether to IPI each specific cpu.
      The function works around allocation failure of cpumask variable in
      CONFIG_CPUMASK_OFFSTACK=y by itereating over cpus sending an IPI a time
      via smp_call_function_single().
      The function is useful since it allows to seperate the specific code that
      decided in each case whether to IPI a specific cpu for a specific request
      from the common boilerplate code of handling creating the mask, handling
      failures etc.
      [akpm@linux-foundation.org: s/gfpflags/gfp_flags/]
      [akpm@linux-foundation.org: avoid double-evaluation of `info' (per Michal), parenthesise evaluation of `cond_func']
      [akpm@linux-foundation.org: s/CPU/CPUs, use all 80 cols in comment]
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Avi Kivity <avi@redhat.com>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.org>
      Cc: Kosaki Motohiro <kosaki.motohiro@gmail.com>
      Cc: Milton Miller <miltonm@bga.com>
      Reviewed-by: default avatar"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Gilad Ben-Yossef's avatar
      smp: introduce a generic on_each_cpu_mask() function · 3fc498f1
      Gilad Ben-Yossef authored
      We have lots of infrastructure in place to partition multi-core systems
      such that we have a group of CPUs that are dedicated to specific task:
      cgroups, scheduler and interrupt affinity, and cpuisol= boot parameter.
      Still, kernel code will at times interrupt all CPUs in the system via IPIs
      for various needs.  These IPIs are useful and cannot be avoided
      altogether, but in certain cases it is possible to interrupt only specific
      CPUs that have useful work to do and not the entire system.
      This patch set, inspired by discussions with Peter Zijlstra and Frederic
      Weisbecker when testing the nohz task patch set, is a first stab at trying
      to explore doing this by locating the places where such global IPI calls
      are being made and turning the global IPI into an IPI for a specific group
      of CPUs.  The purpose of the patch set is to get feedback if this is the
      right way to go for dealing with this issue and indeed, if the issue is
      even worth dealing with at all.  Based on the feedback from this patch set
      I plan to offer further patches that address similar issue in other code
      This patch creates an on_each_cpu_mask() and on_each_cpu_cond()
      infrastructure API (the former derived from existing arch specific
      versions in Tile and Arm) and uses them to turn several global IPI
      invocation to per CPU group invocations.
      Core kernel:
      on_each_cpu_mask() calls a function on processors specified by cpumask,
      which may or may not include the local processor.
      You must not call this function with disabled interrupts or from a
      hardware interrupt handler or from a bottom half handler.
      Note that the generic version is a little different then the Arm one:
      1. It has the mask as first parameter
      2. It calls the function on the calling CPU with interrupts disabled,
         but this should be OK since the function is called on the other CPUs
         with interrupts disabled anyway.
      The API is the same as the tile private one, but the generic version
      also calls the function on the with interrupts disabled in UP case
      This is OK since the function is called on the other CPUs
      with interrupts disabled.
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Reviewed-by: default avatarChristoph Lameter <cl@linux.com>
      Acked-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Avi Kivity <avi@redhat.com>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.org>
      Cc: Kosaki Motohiro <kosaki.motohiro@gmail.com>
      Cc: Milton Miller <miltonm@bga.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Hugh Dickins's avatar
      swapon: check validity of swap_flags · d15cab97
      Hugh Dickins authored
      Most system calls taking flags first check that the flags passed in are
      valid, and that helps userspace to detect when new flags are supported.
      But swapon never did so: start checking now, to help if we ever want to
      support more swap_flags in future.
      It's difficult to get stray bits set in an int, and swapon is not widely
      used, so this is most unlikely to break any userspace; but we can just
      revert if it turns out to do so.
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • David Rientjes's avatar
      mm, coredump: fail allocations when coredumping instead of oom killing · 29fd66d2
      David Rientjes authored
      The size of coredump files is limited by RLIMIT_CORE, however, allocating
      large amounts of memory results in three negative consequences:
       - the coredumping process may be chosen for oom kill and quickly deplete
         all memory reserves in oom conditions preventing further progress from
         being made or tasks from exiting,
       - the coredumping process may cause other processes to be oom killed
         without fault of their own as the result of a SIGSEGV, for example, in
         the coredumping process, or
       - the coredumping process may result in a livelock while writing to the
         dump file if it needs memory to allocate while other threads are in
         the exit path waiting on the coredumper to complete.
      This is fixed by implying __GFP_NORETRY in the page allocator for
      coredumping processes when reclaim has failed so the allocations fail and
      the process continues to exit.
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Andrea Arcangeli's avatar
      mm: thp: fix up pmd_trans_unstable() locations · 45f83cef
      Andrea Arcangeli authored
      pmd_trans_unstable() should be called before pmd_offset_map() in the
      locations where the mmap_sem is held for reading.
      Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Ulrich Obergfell <uobergfe@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Mark Salter <msalter@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Hugh Dickins's avatar
      mm for fs: add truncate_pagecache_range() · 623e3db9
      Hugh Dickins authored
      Holepunching filesystems ext4 and xfs are using truncate_inode_pages_range
      but forgetting to unmap pages first (ocfs2 remembers).  This is not really
      a bug, since races already require truncate_inode_page() to handle that
      case once the page is locked; but it can be very inefficient if the file
      being punched happens to be mapped into many vmas.
      Provide a drop-in replacement truncate_pagecache_range() which does the
      unmapping pass first, handling the awkward mismatch between arguments to
      truncate_inode_pages_range() and arguments to unmap_mapping_range().
      Note that holepunching does not unmap privately COWed pages in the range:
      POSIX requires that we do so when truncating, but it's hard to justify,
      difficult to implement without an i_size cutoff, and no filesystem is
      attempting to implement it.
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Ben Myers <bpm@sgi.com>
      Cc: Alex Elder <elder@kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • KAMEZAWA Hiroyuki's avatar
      procfs: fix /proc/statm · 3748b2f1
      KAMEZAWA Hiroyuki authored
       ("procfs: speed up /proc/pid/stat, statm") broke /proc/statm
      - 'text' is printed twice by mistake.
      Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Reported-by: default avatarUlrich Drepper <drepper@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Linus Torvalds's avatar
      Merge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux · 529b73fc
      Linus Torvalds authored
      Pull trivial writeback fixes from Wu Fengguang:
       "They've been tested in linux-next for 20 days actually."
      * tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
        writeback: Remove outdated comment
        fs: Remove bogus wait in write_inode_now()
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 69e1aadd
      Linus Torvalds authored
      Pull ext4 updates for 3.4 from Ted Ts'o:
       "Ext4 commits for 3.3 merge window; mostly cleanups and bug fixes
        The changes to export dirty_writeback_interval are from Artem's s_dirt
        cleanup patch series.  The same is true of the change to remove the
        s_dirt helper functions which never got used by anyone in-tree.  I've
        run these changes by Al Viro, and am carrying them so that Artem can
        more easily fix up the rest of the file systems during the next merge
        window.  (Originally we had hopped to remove the use of s_dirt from
        ext4 during this merge window, but his patches had some bugs, so I
        ultimately ended dropping them from the ext4 tree.)"
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (66 commits)
        vfs: remove unused superblock helpers
        mm: export dirty_writeback_interval
        ext4: remove useless s_dirt assignment
        ext4: write superblock only once on unmount
        ext4: do not mark superblock as dirty unnecessarily
        ext4: correct ext4_punch_hole return codes
        ext4: remove restrictive checks for EOFBLOCKS_FL
        ext4: always set then trimmed blocks count into len
        ext4: fix trimmed block count accunting
        ext4: fix start and len arguments handling in ext4_trim_fs()
        ext4: update s_free_{inodes,blocks}_count during online resize
        ext4: change some printk() calls to use ext4_msg() instead
        ext4: avoid output message interleaving in ext4_error_<foo>()
        ext4: remove trailing newlines from ext4_msg() and ext4_error() messages
        ext4: add no_printk argument validation, fix fallout
        ext4: remove redundant "EXT4-fs: " from uses of ext4_msg
        ext4: give more helpful error message in ext4_ext_rm_leaf()
        ext4: remove unused code from ext4_ext_map_blocks()
        ext4: rewrite punch hole to use ext4_ext_remove_space()
        jbd2: cleanup journal tail after transaction commit
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 56b59b42
      Linus Torvalds authored
      Pull Ceph updates for 3.4-rc1 from Sage Weil:
       "Alex has been busy.  There are a range of rbd and libceph cleanups,
        especially surrounding device setup and teardown, and a few critical
        fixes in that code.  There are more cleanups in the messenger code,
        virtual xattrs, a fix for CRC calculation/checks, and lots of other
        miscellaneous stuff.
        There's a patch from Amon Ott to make inos behave a bit better on
        32-bit boxes, some decode check fixes from Xi Wang, and network
        throttling fix from Jim Schutt, and a couple RBD fixes from Josh
        No new functionality, just a lot of cleanup and bug fixing."
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (65 commits)
        rbd: move snap_rwsem to the device, rename to header_rwsem
        ceph: fix three bugs, two in ceph_vxattrcb_file_layout()
        libceph: isolate kmap() call in write_partial_msg_pages()
        libceph: rename "page_shift" variable to something sensible
        libceph: get rid of zero_page_address
        libceph: only call kernel_sendpage() via helper
        libceph: use kernel_sendpage() for sending zeroes
        libceph: fix inverted crc option logic
        libceph: some simple changes
        libceph: small refactor in write_partial_kvec()
        libceph: do crc calculations outside loop
        libceph: separate CRC calculation from byte swapping
        libceph: use "do" in CRC-related Boolean variables
        ceph: ensure Boolean options support both senses
        libceph: a few small changes
        libceph: make ceph_tcp_connect() return int
        libceph: encapsulate some messenger cleanup code
        libceph: make ceph_msgr_wq private
        libceph: encapsulate connection kvec operations
        libceph: move prepare_write_banner()
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 9a7259d5
      Linus Torvalds authored
      Pull ext3, UDF, and quota fixes from Jan Kara:
       "A couple of ext3 & UDF fixes and also one improvement in quota
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        ext3: fix start and len arguments handling in ext3_trim_fs()
        udf: Fix deadlock in udf_release_file()
        udf: Fix file entry logicalBlocksRecorded
        udf: Fix handling of i_blocks
        quota: Make quota code not call tty layer with dqptr_sem held
        udf: Init/maintain file entry checkpoint field
        ext3: Update ctime in ext3_splice_branch() only when needed
        ext3: Don't call dquot_free_block() if we don't update anything
        udf: Remove unnecessary OOM messages
    • Linus Torvalds's avatar
      Merge tag 'for-linus-3.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs · e9c0f152
      Linus Torvalds authored
      Pull 9p changes for the 3.4 merge window from Eric Van Hensbergen.
      * tag 'for-linus-3.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
        9p: statfs should not override server f_type
        net/9p: handle flushed Tclunk/Tremove
        net/9p: don't allow Tflush to be interrupted
    • Michel Lespinasse's avatar
      vfs: fix d_ancestor() case in d_materialize_unique · b18dafc8
      Michel Lespinasse authored
      In d_materialise_unique() there are 3 subcases to the 'aliased dentry'
      case; in two subcases the inode i_lock is properly released but this
      does not occur in the -ELOOP subcase.
      This seems to have been introduced by commit 18367501
       ("fix loop
      checks in d_materialise_unique()").
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Cc: stable@vger.kernel.org # v3.0+
      [ Added a comment, and moved the unlock to where we generate the -ELOOP,
        which seems to be more natural.
        You probably can't actually trigger this without a buggy network file
        server - d_materialize_unique() is for finding aliases on non-local
        filesystems, and the d_ancestor() case is for a hardlinked directory
        But we should be robust in the case of such buggy servers anyway. ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  2. 27 Mar, 2012 11 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 6658a699
      Linus Torvalds authored
      Pull s390 patches part 2 from Martin Schwidefsky:
       "Some minor improvements and one additional feature for the 3.4 merge
        window: Hendrik added perf support for the s390 CPU counters."
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        [S390] register cpu devices for SMP=n
        [S390] perf: add support for s390x CPU counters
        [S390] oprofile: Allow multiple users of the measurement alert interrupt
        [S390] qdio: log all adapter characteristics
        [S390] Remove unncessary export of arch_pick_mmap_layout
    • Linus Torvalds's avatar
      Merge branch 'for-linus-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · fa453a62
      Linus Torvalds authored
      Pull UML changes from Richard Weinberger:
       "Mostly bug fixes and cleanups"
      * 'for-linus-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (35 commits)
        um: Update defconfig
        um: Switch to large mcmodel on x86_64
        MTD: Relax dependencies
        um: Wire CONFIG_GENERIC_IO up
        um: Serve io_remap_pfn_range()
        Introduce CONFIG_GENERIC_IO
        um: allow SUBARCH=x86
        um: most of the SUBARCH uses can be killed
        um: deadlock in line_write_interrupt()
        um: don't bother trying to rebuild CHECKFLAGS for USER_OBJS
        um: use the right ifdef around exports in user_syms.c
        um: a bunch of headers can be killed by using generic-y
        um: ptrace-generic.h doesn't need user.h
        um: kill HOST_TASK_PID
        um: remove pointless include of asm/fixmap.h from asm/pgtable.h
        um: asm-offsets.h might as well come from underlying arch...
        um: merge processor_{32,64}.h a bit...
        um: switch close_chan() to struct line
        um: race fix: initialize delayed_work *before* registering IRQ
        um: line->have_irq is never checked...
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze · 30eebb54
      Linus Torvalds authored
      Pull arch/microblaze fixes from Michal Simek
      * 'next' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Handle TLB skip size dynamically
        microblaze: Introduce TLB skip size
        microblaze: Improve TLB calculation for small systems
        microblaze: Extend space for compiled-in FDT to 32kB
        microblaze: Clear all MSR flags on the first kernel instruction
        microblaze: Use node name instead of compatible string
        microblaze: Fix mapin_ram function
        microblaze: Highmem support
        microblaze: Use active regions
        microblaze: Show more detailed information about memory
        microblaze: Introduce fixmap
        microblaze: mm: Fix lowmem max memory size limits
        microblaze: mm: Use ZONE_DMA instead of ZONE_NORMAL
        microblaze: trivial: Fix typo fault in timer.c
        microblaze: Use vsprintf extention %pf with builtin_return_address
        microblaze: Add PVR version string for MB 8.20.b and 8.30.a
        microblaze: Fix makefile to work with latest toolchain
        microblaze: Fix typo in early_printk.c
    • Linus Torvalds's avatar
      Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm · 9e4db1c3
      Linus Torvalds authored
      Pull ARM platform updates from Russell King:
       "This covers platform stuff for platforms I have a direct interest in
        (iow, I have the hardware).  Essentially:
         - as we no longer support any other Acorn platforms other than RiscPC
           anymore, we can collect all that code into mach-rpc.
         - convert Acorn expansion card stuff to use IRQ allocation functions,
           and get rid of NO_IRQ from there.
         - cleanups to the ebsa110 platform to move some private stuff out of
           its header files.
         - large amount of SA11x0 updates:
         - conversion of private DMA implementation to DMA engine support
           (this actually gives us greater flexibility in drivers over the old
         - re-worked ucb1x00 updates - convert to genirq, remove sa11x0
           dependencies, fix various minor issues
         - move platform specific sa11x0 framebuffer data into platform files
           in arch/arm instead of keeping this in the driver itself
         - update sa11x0 IrDA driver for DMA engine, and allow it to use DMA
           for SIR transmissions as well as FIR
         - rework sa1111 support for genirq, and irq allocation
         - fix sa1111 IRQ support so it works again
         - use sparse IRQ support
        After this, I have one more pull request remaining from my current
        set, which I think is going to be the most problematical as it
        generates 8 conflicts."
      Fixed up the trivial conflict in arch/arm/mach-rpc/Makefile as per
      * 'platforms' of git://git.linaro.org/people/rmk/linux-arm: (125 commits)
        ARM: 7343/1: sa11x0: convert to sparse IRQ
        ARM: 7342/2: sa1100: prepare for sparse irq conversion
        ARM: 7341/1: input: prepare jornada720 keyboard and ts for sa11x0 sparse irq
        ARM: 7340/1: rtc: sa1100: include mach/irqs.h instead of asm/irq.h
        ARM: sa11x0: remove unused DMA controller definitions
        ARM: sa11x0: remove old SoC private DMA driver
        USB: sa1111: add hcd .reset method
        USB: sa1111: add OHCI shutdown methods
        USB: sa1111: reorganize ohci-sa1111.c
        USB: sa1111: get rid of nasty printk(KERN_DEBUG "%s: ...", __FILE__)
        USB: sa1111: sparse and checkpatch cleanups
        ARM: sa11x0: don't static map sa1111
        ARM: sa1111: use dev_err() rather than printk()
        ARM: sa1111: cleanup sub-device registration and unregistration
        ARM: sa1111: only setup DMA for DMA capable devices
        ARM: sa1111: register sa1111 devices with dmabounce in bus notifier
        ARM: sa1111: move USB interface register definitions to ohci-sa1111.c
        ARM: sa1111: move PCMCIA interface register definitions to sa1111_generic.c
        ARM: sa1111: move PS/2 interface register definitions to sa1111p2.c
        ARM: sa1111: delete unused physical GPIO register definitions
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · de8856d2
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       1) Name string overrun fix in gianfar driver from Joe Perches.
       2) VHOST bug fixes from Michael S. Tsirkin and Nadav Har'El
       3) Fix dependencies on xt_LOG netfilter module, from Pablo Neira Ayuso.
       4) Fix RCU locking in xt_CT, also from Pablo Neira Ayuso.
       5) Add a parameter to skb_add_rx_frag() so we can fix the truesize
          adjustments in the drivers that use it.  The individual drivers
          aren't fixed by this commit, but will be dealt with using follow-on
          commits.  From Eric Dumazet.
       6) Add some device IDs to qmi_wwan driver, from Andrew Bird.
       7) Fix a potential rcu_read_lock() imbalancein rt6_fill_node().  From
          Eric Dumazet.
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: fix a potential rcu_read_lock() imbalance in rt6_fill_node()
        net: add a truesize parameter to skb_add_rx_frag()
        gianfar: Fix possible overrun and simplify interrupt name field creation
        USB: qmi_wwan: Add ZTE (Vodafone) K3570-Z and K3571-Z net interfaces
        USB: option: Ignore ZTE (Vodafone) K3570/71 net interfaces
        USB: qmi_wwan: Add ZTE (Vodafone) K3565-Z and K4505-Z net interfaces
        qlcnic: Bug fix for LRO
        netfilter: nf_conntrack: permanently attach timeout policy to conntrack
        netfilter: xt_CT: fix assignation of the generic protocol tracker
        netfilter: xt_CT: missing rcu_read_lock section in timeout assignment
        netfilter: cttimeout: fix dependency with l4protocol conntrack module
        netfilter: xt_LOG: use CONFIG_IP6_NF_IPTABLES instead of CONFIG_IPV6
        vhost: fix release path lockdep checks
        vhost: don't forget to schedule()
        tools/virtio: stub out strong barriers
        tools/virtio: add linux/hrtimer.h stub
        tools/virtio: add linux/module.h stub
    • Linus Torvalds's avatar
      Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 66f03c61
      Linus Torvalds authored
      Pull "ARM: device tree work" from Arnd Bergmann:
       "Most of these patches convert code from using static platform data to
        describing the hardware in the device tree.  This is only the first
        half of the changes for v3.4 because a lot of patches for this topic
        came in the last week before the merge window.
        Signed-off-by: Arnd Bergmann <arnd@arndb.de>"
      Fix up trivial conflicts in arch/arm/mach-vexpress/{Kconfig,core.h}
      * tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (86 commits)
        Document: devicetree: add OF documents for arch-mmp
        ARM: dts: append DTS file of pxa168
        ARM: mmp: append OF support on pxa168
        ARM: mmp: enable rtc clk in pxa168
        i2c: pxa: add OF support
        serial: pxa: add OF support
        arm/dts: mt_ventoux: very basic support for TeeJet Mt.Ventoux board
        ARM: OMAP2+: Remove extra ifdefs for board-generic
        ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected
        ASoC: DT: Add digital microphone binding to PAZ00 board.
        ARM: dt: Add ARM PMU to tegra*.dtsi
        ARM: at91: at91sam9x5cm/dt: add leds support
        ARM: at91: usb_a9g20/dt: add gpio-keys support
        ARM: at91: at91sam9m10g45ek/dt: add gpio-keys support
        ARM: at91: at91sam9m10g45ek/dt: add leds support
        ARM: at91: usb_a9g20/dt: add leds support
        ARM: at91/pio: add new PIO3 features
        ARM: at91: add sam9_smc.o to at91sam9x5 build
        ARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter
        ARM: at91/tc: add device tree support to atmel_tclib
    • Linus Torvalds's avatar
      Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 34800598
      Linus Torvalds authored
      Pull "ARM: driver specific updates" from Arnd Bergmann:
       "These are all specific to some driver.  They are typically the
        platform side of a change in the drivers directory, such as adding a
        new driver or extending the interface to the platform.  In cases where
        there is no maintainer for the driver, or the maintainer prefers to
        have the platform changes in the same branch as the driver changes,
        the patches to the drivers are included as well.
        A much smaller set of driver updates that depend on other branches
        getting merged first will be sent later.
        The new export of tegra_chip_uid conflicts with other changes in
        fuse.c.  In rtc-sa1100.c, the global removal of IRQF_DISABLED
        conflicts with the cleanup of the interrupt handling of that driver.
        Signed-off-by: Arnd Bergmann <arnd@arndb.de>"
      Fixed up aforementioned trivial conflicts.
      * tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (94 commits)
        ARM: SAMSUNG: change the name from s3c-sdhci to exynos4-sdhci
        mmc: sdhci-s3c: add platform data for the second capability
        ARM: SAMSUNG: support the second capability for samsung-soc
        ARM: EXYNOS: add support DMA for EXYNOS4X12 SoC
        ARM: EXYNOS: Add apb_pclk clkdev entry for mdma1
        ARM: EXYNOS: Enable MDMA driver
        regulator: Remove bq24022 regulator driver
        rtc: sa1100: add OF support
        pxa: magician/hx4700: Convert to gpio-regulator from bq24022
        ARM: OMAP3+: SmartReflex: fix error handling
        ARM: OMAP3+: SmartReflex: fix the use of debugfs_create_* API
        ARM: OMAP3+: SmartReflex: micro-optimization for sanity check
        ARM: OMAP3+: SmartReflex: misc cleanups
        ARM: OMAP3+: SmartReflex: move late_initcall() closer to its argument
        ARM: OMAP3+: SmartReflex: add missing platform_set_drvdata()
        ARM: OMAP3+: hwmod: add SmartReflex IRQs
        ARM: OMAP3+: SmartReflex: clear ERRCONFIG_VPBOUNDINTST only on a need
        ARM: OMAP3+: SmartReflex: Fix status masking in ERRCONFIG register
        ARM: OMAP3+: SmartReflex: Add a shutdown hook
        ARM: OMAP3+: SmartReflex Class3: disable errorgen before disable VP
    • Linus Torvalds's avatar
      Merge tag 'rpmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 46b407ca
      Linus Torvalds authored
      Pull "remoteproc/rpmsg: new subsystem" from Arnd Bergmann:
       "This new subsystem provides a common way to talk to secondary
        processors on an SoC, e.g.  a DSP, GPU or service processor, using
        virtio as the transport.  In the long run, it should replace a few
        dozen vendor specific ways to do the same thing, which all never made
        it into the upstream kernel.  There is a broad agreement that rpmsg is
        the way to go here and several vendors have started working on
        replacing their own subsystems.
        Two branches each add one virtio protocol number.  Fortunately the
        numbers were agreed upon in advance, so there are only context
        Signed-off-by: Arnd Bergmann <arnd@arndb.de>"
      Fixed up trivial protocol number conflict due to the mentioned additions
      next to each other.
      * tag 'rpmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (32 commits)
        remoteproc: cleanup resource table parsing paths
        remoteproc: remove the hardcoded vring alignment
        remoteproc/omap: remove the mbox_callback limitation
        remoteproc: remove the single rpmsg vdev limitation
        remoteproc: safer boot/shutdown order
        remoteproc: remoteproc_rpmsg -> remoteproc_virtio
        remoteproc: resource table overhaul
        rpmsg: fix build warning when dma_addr_t is 64-bit
        rpmsg: fix published buffer length in rpmsg_recv_done
        rpmsg: validate incoming message length before propagating
        rpmsg: fix name service endpoint leak
        remoteproc/omap: two Kconfig fixes
        remoteproc: make sure we're parsing a 32bit firmware
        remoteproc: s/big switch/lookup table/
        remoteproc: bail out if firmware has different endianess
        remoteproc: don't use virtio's weak barriers
        rpmsg: rename virtqueue_add_buf_gfp to virtqueue_add_buf
        rpmsg: depend on EXPERIMENTAL
        remoteproc: depend on EXPERIMENTAL
        rpmsg: add Kconfig menu
    • Linus Torvalds's avatar
      Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 1bfecd93
      Linus Torvalds authored
      Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson:
       "These changes are all specific to one board only.  We're trying to
        keep the number of board files low, but generally board level updates
        are ok on platforms that are working on moving towards DT based
        probing, which will eventually lead to removing them.
        The board-ams-delta.c board file gets a conflict between the removal
        of ams_delta_config and the addition of a lot of other data.  The
        Kconfig file has two changes in the same line, and in exynos, the
        power domain cleanup conflicts with the addition of the image sensor
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
        [olof: Amended a fix for a mismerge to board-omap4panda.c]
        Signed-off-by: Olof Johansson <olof@lixom.net>"
      Fixed up some fairly trivial conflicts manually.
      * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits)
        i.MX35-PDK: Add Camera support
        ARM : mx35: 3ds-board: add framebuffer device
        pxa/hx4700: Remove pcmcia platform_device structure
        ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35%
        ARM: pxa/hx4700: Remove unwanted request for GPIO105
        ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
        ARM: EXYNOS: Register JPEG on nuri
        ARM: EXYNOS: Register JPEG on universal_c210
        ARM: S5PV210: Enable JPEG on SMDKV210
        ARM: S5PV210: Add JPEG board definition
        ARM: EXYNOS: Enable JPEG on Origen
        ARM: EXYNOS: Enable JPEG on SMDKV310
        ARM: EXYNOS: Add __init attribute to universal_camera_init()
        ARM: EXYNOS: Add __init attribute to nuri_camera_init()
        ARM: S5PV210: Enable FIMC on SMDKC110
        ARM: S5PV210: Enable FIMC on SMDKV210
        ARM: S5PV210: Enable MFC on SMDKC110
        ARM: S5PV210: Enable MFC on SMDKV210
        ARM: EXYNOS: Enable G2D on SMDKV310
        ARM: tegra: update defconfig
    • Linus Torvalds's avatar
      Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 281b0539
      Linus Torvalds authored
      Pull "ARM: SoC specific updates" from Arnd Bergmann:
       "These changes are all specific to an soc family or the code for one
        soc.  Lots of work for Tegra3 this time, but also a lot of other
        platforms.  There will be another (smaller) set of soc patches later
        in the merge window for stuff that has dependencies on external trees
        or that was sent just before the merge window opened.
        The asoc tree added a few devices to the i.mx platform, which conflict
        with other devices added in the same place here.
        The tegra Makefile conflicts between a number of branches, mostly
        because of changes regarding localtimer.c, which was removed in the
        Signed-off-by: Arnd Bergmann <arnd@arndb.de>"
      Fix up some trivial conflicts, including the mentioned Tegra Makefile.
      * tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (51 commits)
        ARM: EXYNOS: fix cycle count for periodic mode of clock event timers
        ARM: EXYNOS: add support JPEG
        ARM: EXYNOS: Add DMC1, allow PPMU access for DMC
        ARM: SAMSUNG: Correct MIPI-CSIS io memory resource definition
        ARM: SAMSUNG: fix __init attribute on regarding s3c_set_platdata()
        ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
        ARM: S5PV210: Add usb otg phy control
        ARM: S3C64XX: Add usb otg phy control
        ARM: EXYNOS: Enable l2 configuration through device tree
        ARM: EXYNOS: remove useless code to save/restore L2
        ARM: EXYNOS: save L2 settings during bootup
        ARM: S5P: add L2 early resume code
        ARM: EXYNOS: Add support AFTR mode on EXYNOS4210
        ARM: mx35: Setup the AIPS registers
        ARM: mx5: Use common function for configuring AIPS
        ARM: mx3: Setup AIPS registers
        ARM: mx3: Let mx31 and mx35 enter in LPM mode in WFI
        ARM: defconfig: imx_v6_v7: build in REGULATOR_FIXED_VOLTAGE
        ARM: imx: update imx_v6_v7_defconfig
        ARM: tegra: Demote EMC clock inconsistency BUG to WARN
    • Linus Torvalds's avatar
      Merge tag 'timer' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 48d55441
      Linus Torvalds authored
      Pull "ARM: timer cleanup work" from Arnd Bergmann:
       "These are split out from the generic soc and driver updates because
        there was a lot of conflicting work by multiple people.  Marc Zyngier
        worked on simplifying the "localtimer" interfaces, and some of the
        platforms are touching the same code as they move to device tree based
        Signed-off-by: Arnd Bergmann <arnd@arndb.de>"
      * tag 'timer' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (61 commits)
        ARM: tegra: select USB_ULPI if USB is selected
        arm/tegra: pcie: fix return value of function
        ARM: ux500: fix compilation after local timer rework
        ARM: shmobile: remove additional __io() macro use
        ARM: local timers: make the runtime registration interface mandatory
        ARM: local timers: convert MSM to runtime registration interface
        ARM: local timers: convert exynos to runtime registration interface
        ARM: smp_twd: remove old local timer interface
        ARM: imx6q: convert to twd_local_timer_register() interface
        ARM: highbank: convert to twd_local_timer_register() interface
        ARM: ux500: convert to twd_local_timer_register() interface
        ARM: shmobile: convert to twd_local_timer_register() interface
        ARM: tegra: convert to twd_local_timer_register() interface
        ARM: plat-versatile: convert to twd_local_timer_register() interface
        ARM: OMAP4: convert to twd_local_timer_register() interface
        ARM: smp_twd: add device tree support
        ARM: smp_twd: add runtime registration support
        ARM: local timers: introduce a new registration interface
        ARM: smp_twd: make local_timer_stop a symbol instead of a #define
        ARM: mach-shmobile: default to no earlytimer