1. 29 5月, 2011 1 次提交
    • E
      ns: Wire up the setns system call · 7b21fddd
      Eric W. Biederman 提交于
      32bit and 64bit on x86 are tested and working.  The rest I have looked
      at closely and I can't find any problems.
      
      setns is an easy system call to wire up.  It just takes two ints so I
      don't expect any weird architecture porting problems.
      
      While doing this I have noticed that we have some architectures that are
      very slow to get new system calls.  cris seems to be the slowest where
      the last system calls wired up were preadv and pwritev.  avr32 is weird
      in that recvmmsg was wired up but never declared in unistd.h.  frv is
      behind with perf_event_open being the last syscall wired up.  On h8300
      the last system call wired up was epoll_wait.  On m32r the last system
      call wired up was fallocate.  mn10300 has recvmmsg as the last system
      call wired up.  The rest seem to at least have syncfs wired up which was
      new in the 2.6.39.
      
      v2: Most of the architecture support added by Daniel Lezcano <dlezcano@fr.ibm.com>
      v3: ported to v2.6.36-rc4 by: Eric W. Biederman <ebiederm@xmission.com>
      v4: Moved wiring up of the system call to another patch
      v5: ported to v2.6.39-rc6
      v6: rebased onto parisc-next and net-next to avoid syscall  conflicts.
      v7: ported to Linus's latest post 2.6.39 tree.
      
      >  arch/blackfin/include/asm/unistd.h     |    3 ++-
      >  arch/blackfin/mach-common/entry.S      |    1 +
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      
      Oh - ia64 wiring looks good.
      Acked-by: NTony Luck <tony.luck@intel.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7b21fddd
  2. 20 5月, 2011 1 次提交
    • S
      extable, core_kernel_data(): Make sure all archs define _sdata · a2d063ac
      Steven Rostedt 提交于
      A new utility function (core_kernel_data()) is used to determine if a
      passed in address is part of core kernel data or not. It may or may not
      return true for RO data, but this utility must work for RW data.
      
      Thus both _sdata and _edata must be defined and continuous,
      without .init sections that may later be freed and replaced by
      volatile memory (memory that can be freed).
      
      This utility function is used to determine if data is safe from
      ever being freed. Thus it should return true for all RW global
      data that is not in a module or has been allocated, or false
      otherwise.
      
      Also change core_kernel_data() back to the more precise _sdata condition
      and document the function.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Helge Deller <deller@gmx.de>
      Cc: JamesE.J.Bottomley <jejb@parisc-linux.org>
      Link: http://lkml.kernel.org/r/1305855298.1465.19.camel@gandalf.stny.rr.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
      ----
       arch/alpha/kernel/vmlinux.lds.S   |    1 +
       arch/m32r/kernel/vmlinux.lds.S    |    1 +
       arch/m68k/kernel/vmlinux-std.lds  |    2 ++
       arch/m68k/kernel/vmlinux-sun3.lds |    1 +
       arch/mips/kernel/vmlinux.lds.S    |    1 +
       arch/parisc/kernel/vmlinux.lds.S  |    3 +++
       kernel/extable.c                  |   12 +++++++++++-
       7 files changed, 20 insertions(+), 1 deletion(-)
      a2d063ac
  3. 19 5月, 2011 10 次提交
  4. 18 5月, 2011 1 次提交
  5. 14 5月, 2011 1 次提交
  6. 11 5月, 2011 5 次提交
  7. 14 4月, 2011 1 次提交
  8. 06 4月, 2011 1 次提交
  9. 31 3月, 2011 1 次提交
  10. 29 3月, 2011 1 次提交
  11. 26 3月, 2011 13 次提交
  12. 25 3月, 2011 1 次提交
    • T
      percpu: Always align percpu output section to PAGE_SIZE · 0415b00d
      Tejun Heo 提交于
      Percpu allocator honors alignment request upto PAGE_SIZE and both the
      percpu addresses in the percpu address space and the translated kernel
      addresses should be aligned accordingly.  The calculation of the
      former depends on the alignment of percpu output section in the kernel
      image.
      
      The linker script macros PERCPU_VADDR() and PERCPU() are used to
      define this output section and the latter takes @align parameter.
      Several architectures are using @align smaller than PAGE_SIZE breaking
      percpu memory alignment.
      
      This patch removes @align parameter from PERCPU(), renames it to
      PERCPU_SECTION() and makes it always align to PAGE_SIZE.  While at it,
      add PCPU_SETUP_BUG_ON() checks such that alignment problems are
      reliably detected and remove percpu alignment comment recently added
      in workqueue.c as the condition would trigger BUG way before reaching
      there.
      
      For um, this patch raises the alignment of percpu area.  As the area
      is in .init, there shouldn't be any noticeable difference.
      
      This problem was discovered by David Howells while debugging boot
      failure on mn10300.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      Cc: uclinux-dist-devel@blackfin.uclinux.org
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: user-mode-linux-devel@lists.sourceforge.net
      0415b00d
  13. 15 3月, 2011 3 次提交
    • M
      MIPS: Move idle task creation to work queue · 6667deb6
      Maksim Rayskiy 提交于
      To avoid forking usermode thread when creating an idle task, move fork_idle
      to a work queue.
      
      If kernel starts with maxcpus= option which does not bring all available
      cpus online at boot time, idle tasks for offline cpus are not created. If
      later offline cpus are hotplugged through sysfs, __cpu_up is called in
      the context of the user task, and fork_idle copies its non-zero mm
      pointer.  This causes BUG() in per_cpu_trap_init.
      
      This also avoids issues with resource limits of the CPU writing to sysfs,
      containers, maybe others.
      Signed-off-by: NMaksim Rayskiy <mrayskiy@broadcom.com>
      To: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/2070/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6667deb6
    • D
      MIPS, Perf-events: Use unsigned delta for right shift in event update · ba9786f3
      Deng-Cheng Zhu 提交于
      Leverage the commit for ARM by Will Deacon:
      
      - 446a5a8b
          ARM: 6205/1: perf: ensure counter delta is treated as unsigned
      
          Hardware performance counters on ARM are 32-bits wide but atomic64_t
          variables are used to represent counter data in the hw_perf_event structure.
      
          The armpmu_event_update function right-shifts a signed 64-bit delta variable
          and adds the result to the event count. This can lead to shifting in sign-bits
          if the MSB of the 32-bit counter value is set. This results in perf output
          such as:
      
           Performance counter stats for 'sleep 20':
      
           18446744073460670464  cycles             <-- 0xFFFFFFFFF12A6000
                  7783773  instructions             #      0.000 IPC
                      465  context-switches
                      161  page-faults
                  1172393  branches
      
             20.154242147  seconds time elapsed
      
          This patch ensures that the delta value is treated as unsigned so that the
          right shift sets the upper bits to zero.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: a.p.zijlstra@chello.nl
      To: fweisbec@gmail.com
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: wuzhangjin@gmail.com
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com
      Patchwork: http://patchwork.linux-mips.org/patch/2015/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ba9786f3
    • D
      MIPS, Perf-events: Work with the new callchain interface · 98f92f2f
      Deng-Cheng Zhu 提交于
      This is the MIPS part of the following commits by Frederic Weisbecker:
      
      - f72c1a93
          perf: Factorize callchain context handling
      
          Store the kernel and user contexts from the generic layer instead
          of archs, this gathers some repetitive code.
      
      - 56962b44
          perf: Generalize some arch callchain code
      
          - Most archs use one callchain buffer per cpu, except x86 that needs
            to deal with NMIs. Provide a default perf_callchain_buffer()
            implementation that x86 overrides.
      
          - Centralize all the kernel/user regs handling and invoke new arch
            handlers from there: perf_callchain_user() / perf_callchain_kernel()
            That avoid all the user_mode(), current->mm checks and so...
      
          - Invert some parameters in perf_callchain_*() helpers: entry to the
            left, regs to the right, following the traditional (dst, src).
      
      - 70791ce9
          perf: Generalize callchain_store()
      
          callchain_store() is the same on every archs, inline it in
          perf_event.h and rename it to perf_callchain_store() to avoid
          any collision.
      
          This removes repetitive code.
      
      - c1a65932
          perf: Drop unappropriate tests on arch callchains
      
          Drop the TASK_RUNNING test on user tasks for callchains as
          this check doesn't seem to make any sense.
      
          Also remove the tests for !current that is not supposed to
          happen and current->pid as this should be handled at the
          generic level, with exclude_idle attribute.
      Reported-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: a.p.zijlstra@chello.nl
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: dengcheng.zhu@gmail.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com
      Patchwork: http://patchwork.linux-mips.org/patch/2014/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      98f92f2f