1. 10 2月, 2014 1 次提交
    • T
      locking/mcs: Order the header files in Kbuild of each architecture in alphabetical order · b119fa61
      Tim Chen 提交于
      We perform a clean up of the Kbuid files in each architecture.
      We order the files in each Kbuild in alphabetical order
      by running the below script.
      
      for i in arch/*/include/asm/Kbuild
      do
              cat $i | gawk '/^generic-y/ {
                      i = 3;
                      do {
                              for (; i <= NF; i++) {
                                      if ($i == "\\") {
                                              getline;
                                              i = 1;
                                              continue;
                                      }
                                      if ($i != "")
                                              hdr[$i] = $i;
                              }
                              break;
                      } while (1);
                      next;
              }
              // {
                      print $0;
              }
              END {
                      n = asort(hdr);
                      for (i = 1; i <= n; i++)
                              print "generic-y += " hdr[i];
              }' > ${i}.sorted;
              mv ${i}.sorted $i;
      done
      Signed-off-by: NTim Chen <tim.c.chen@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Matthew R Wilcox <matthew.r.wilcox@intel.com>
      Cc: AswinChandramouleeswaran <aswin@hp.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: "Paul E.McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Scott J Norton <scott.norton@hp.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: "Figo.zhang" <figo1802@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Waiman Long <waiman.long@hp.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Alex Shi <alex.shi@linaro.org>
      Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: George Spelvin <linux@horizon.com>
      Cc: MichelLespinasse <walken@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      [ Fixed build bug. ]
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      b119fa61
  2. 19 1月, 2014 1 次提交
    • M
      net: introduce SO_BPF_EXTENSIONS · ea02f941
      Michal Sekletar 提交于
      For user space packet capturing libraries such as libpcap, there's
      currently only one way to check which BPF extensions are supported
      by the kernel, that is, commit aa1113d9 ("net: filter: return
      -EINVAL if BPF_S_ANC* operation is not supported"). For querying all
      extensions at once this might be rather inconvenient.
      
      Therefore, this patch introduces a new option which can be used as
      an argument for getsockopt(), and allows one to obtain information
      about which BPF extensions are supported by the current kernel.
      
      As David Miller suggests, we do not need to define any bits right
      now and status quo can just return 0 in order to state that this
      versions supports SKF_AD_PROTOCOL up to SKF_AD_PAY_OFFSET. Later
      additions to BPF extensions need to add their bits to the
      bpf_tell_extensions() function, as documented in the comment.
      Signed-off-by: NMichal Sekletar <msekleta@redhat.com>
      Cc: David Miller <davem@davemloft.net>
      Reviewed-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea02f941
  3. 18 1月, 2014 1 次提交
  4. 14 1月, 2014 1 次提交
  5. 12 1月, 2014 1 次提交
  6. 09 1月, 2014 1 次提交
    • J
      parisc: Ensure full cache coherency for kmap/kunmap · f8dae006
      John David Anglin 提交于
      Helge Deller noted a few weeks ago problems with the AIO support on
      parisc. This change is the result of numerous iterations on how best to
      deal with this problem.
      
      The solution adopted here is to provide full cache coherency in a
      uniform manner on all parisc systems. This involves calling
      flush_dcache_page() on kmap operations and flush_kernel_dcache_page() on
      kunmap operations. As a result, the copy_user_page() and
      clear_user_page() functions can be removed and the overall code is
      simpler.
      
      The change ensures that both userspace and kernel aliases to a mapped
      page are invalidated and flushed. This is necessary for the correct
      operation of PA8800 and PA8900 based systems which do not support
      inequivalent aliases.
      
      With this change, I have observed no cache related issues on c8000 and
      rp3440. It is now possible for example to do kernel builds with "-j64"
      on four way systems.
      
      On systems using XFS file systems, the patch recently posted by Mikulas
      Patocka to "fix crash using XFS on loopback" is needed to avoid a hang
      caused by an uninitialized lock passed to flush_dcache_page() in the
      page struct.
      Signed-off-by: NJohn David Anglin <dave.anglin@bell.net>
      Cc: stable@vger.kernel.org # v3.9+
      Signed-off-by: NHelge Deller <deller@gmx.de>
      f8dae006
  7. 18 12月, 2013 1 次提交
  8. 01 12月, 2013 1 次提交
  9. 20 11月, 2013 2 次提交
  10. 15 11月, 2013 1 次提交
  11. 14 11月, 2013 1 次提交
  12. 13 11月, 2013 1 次提交
  13. 08 11月, 2013 5 次提交
    • H
      parisc: implement full version of access_ok() · 63379c13
      Helge Deller 提交于
      Up to now PA-RISC could live with a trivial version of access_ok().
      Our fault handlers can correctly handle fault cases.
      
      But testcases showed that we need a better access check else we won't
      always return correct errno failure codes to userspace.
      
      Problem showed up during 32bit userspace tests in which writev() used a
      32bit memory area and length which would then wrap around on 64bit
      kernel.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      63379c13
    • H
      parisc: do not count IPI calls twice · 6f0c4aa6
      Helge Deller 提交于
      The number of IPI calls is already visible as per-cpu IPI irq counters
      in/proc/cpuinfo, so let's drop this additional counting.
      
      This partly reverts:
      cd85d551 parisc: more irq statistics in /proc/interrupts
      Signed-off-by: NHelge Deller <deller@gmx.de>
      6f0c4aa6
    • H
      parisc: make udelay() SMP-safe · f6d12eef
      Helge Deller 提交于
      Each CPU has it's own Control Register 16 (CR16) which is used as time source
      for the udelay() function. But since the CR16 registers across different CPUs
      are not synced, we need to recalculate the loop count if we get switched away
      to ensure that we really delay as much time as requested.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      f6d12eef
    • H
      parisc: add kernel audit feature · 527973c8
      Helge Deller 提交于
      Implement missing functions for parisc to provide kernel audit feature.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      527973c8
    • H
      parisc: provide macro to create exception table entries · 61dbbaeb
      Helge Deller 提交于
      Provide a macro ASM_EXCEPTIONTABLE_ENTRY() to create exception table
      entries and convert all open-coded places to use that macro.
      
      This patch is a first step toward creating a exception table which only
      holds 32bit pointers even on a 64bit kernel. That way in my own kernel
      I was able to reduce the in-kernel exception table from 44kB to 22kB.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      61dbbaeb
  14. 13 10月, 2013 1 次提交
  15. 29 9月, 2013 1 次提交
    • E
      net: introduce SO_MAX_PACING_RATE · 62748f32
      Eric Dumazet 提交于
      As mentioned in commit afe4fd06 ("pkt_sched: fq: Fair Queue packet
      scheduler"), this patch adds a new socket option.
      
      SO_MAX_PACING_RATE offers the application the ability to cap the
      rate computed by transport layer. Value is in bytes per second.
      
      u32 val = 1000000;
      setsockopt(sockfd, SOL_SOCKET, SO_MAX_PACING_RATE, &val, sizeof(val));
      
      To be effectively paced, a flow must use FQ packet scheduler.
      
      Note that a packet scheduler takes into account the headers for its
      computations. The effective payload rate depends on MSS and retransmits
      if any.
      
      I chose to make this pacing rate a SOL_SOCKET option instead of a
      TCP one because this can be used by other protocols.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Steinar H. Gunderson <sesse@google.com>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62748f32
  16. 25 9月, 2013 1 次提交
  17. 01 8月, 2013 1 次提交
    • T
      parisc: Fix interrupt routing for C8000 serial ports · dd5e6d6a
      Thomas Bogendoerfer 提交于
      We can't use dev->mod_index for selecting the interrupt routing entry,
      because it's not an index into interrupt routing table. It will be even
      wrong on a machine with 2 CPUs (4 cores). But all needed information is
      contained in the PAT entries for the serial ports. mod[0] contains the
      iosapic address and mod_info has some indications for the interrupt
      input (at least it looks like it). This patch implements the searching
      for the right iosapic and uses this interrupt input information.
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: <stable@vger.kernel.org> # 3.10
      Signed-off-by: NHelge Deller <deller@gmx.de>
      dd5e6d6a
  18. 13 7月, 2013 1 次提交
    • A
      Safer ABI for O_TMPFILE · bb458c64
      Al Viro 提交于
      [suggested by Rasmus Villemoes] make O_DIRECTORY | O_RDWR part of O_TMPFILE;
      that will fail on old kernels in a lot more cases than what I came up with.
      And make sure O_CREAT doesn't get there...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      bb458c64
  19. 11 7月, 2013 1 次提交
  20. 10 7月, 2013 2 次提交
    • J
      parisc: Ensure volatile space register %sr1 is not clobbered · e8d8fc21
      John David Anglin 提交于
      I still see the occasional random segv on rp3440.  Looking at one of
      these (a code 15), it appeared the problem must be with the cache
      handling of anonymous pages.  Reviewing this, I noticed that the space
      register %sr1 might be being clobbered when we flush an anonymous page.
      
      Register %sr1 is used for TLB purges in a couple of places.  These
      purges are needed on PA8800 and PA8900 processors to ensure cache
      consistency of flushed cache lines.
      
      The solution here is simply to move the %sr1 load into the TLB lock
      region needed to ensure that one purge executes at a time on SMP
      systems.  This was already the case for one use.  After a few days of
      operation, I haven't had a random segv on my rp3440.
      Signed-off-by: NJohn David Anglin <dave.anglin@bell.net>
      Cc: <stable@vger.kernel.org> # 3.10
      Signed-off-by: NHelge Deller <deller@gmx.de>
      e8d8fc21
    • H
      parisc: optimize mtsp(0,sr) inline assembly · 92b59929
      Helge Deller 提交于
      If the value which should be moved into a space register is zero, we can
      optimize the inline assembly to become "mtsp %r0,%srX".
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org> # 3.10
      92b59929
  21. 29 6月, 2013 2 次提交
  22. 19 6月, 2013 2 次提交
  23. 18 6月, 2013 1 次提交
  24. 01 6月, 2013 1 次提交
    • H
      parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 · ae249b5f
      Helge Deller 提交于
      With CONFIG_DISCONTIGMEM=y and multiple physical memory areas,
      cat /proc/kpageflags triggers this kernel bug:
      
      kernel BUG at arch/parisc/include/asm/mmzone.h:50!
      CPU: 2 PID: 7848 Comm: cat Tainted: G      D W 3.10.0-rc3-64bit #44
       IAOQ[0]: kpageflags_read0x128/0x238
       IAOQ[1]: kpageflags_read0x12c/0x238
       RP(r2): proc_reg_read0xbc/0x130
      Backtrace:
       [<00000000402ca2d4>] proc_reg_read0xbc/0x130
       [<0000000040235bcc>] vfs_read0xc4/0x1d0
       [<0000000040235f0c>] SyS_read0x94/0xf0
       [<0000000040105fc0>] syscall_exit0x0/0x14
      
      kpageflags_read() walks through the whole memory, even if some memory
      areas are physically not available. So, we should better not BUG on an
      unavailable pfn in pfn_to_nid() but just return the expected value -1 or
      0.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      ae249b5f
  25. 25 5月, 2013 3 次提交
    • H
      parisc: fix irq stack on UP and SMP · d96b51ec
      Helge Deller 提交于
      The logic to detect if the irq stack was already in use with
      raw_spin_trylock() is wrong, because it will generate a "trylock failure
      on UP" error message with CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y.
      
      arch_spin_trylock() can't be used either since in the CONFIG_SMP=n case
      no atomic protection is given and we are reentrant here. A mutex didn't
      worked either and brings more overhead by turning off interrupts.
      
      So, let's use the fastest path for parisc which is the ldcw instruction.
      
      Counting how often the irq stack was used is pretty useless, so just
      drop this piece of code.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      d96b51ec
    • J
      parisc: make interrupt and interruption stack allocation reentrant · b63a2bbc
      John David Anglin 提交于
      The get_stack_use_cr30 and get_stack_use_r30 macros allocate a stack
      frame for external interrupts and interruptions requiring a stack frame.
      They are currently not reentrant in that they save register context
      before the stack is set or adjusted.
      
      I have observed a number of system crashes where there was clear
      evidence of stack corruption during interrupt processing, and as a
      result register corruption. Some interruptions can still occur during
      interruption processing, however external interrupts are disabled and
      data TLB misses don't occur for absolute accesses. So, it's not entirely
      clear what triggers this issue. Also, if an interruption occurs when
      Q=0, it is generally not possible to recover as the shadowed registers
      are not copied.
      
      The attached patch reworks the get_stack_use_cr30 and get_stack_use_r30
      macros to allocate stack before doing register saves. The new code is a
      couple of instructions shorter than the old implementation. Thus, it's
      an improvement even if it doesn't fully resolve the stack corruption
      issue. Based on limited testing, it improves SMP system stability.
      Signed-off-by: NJohn David Anglin <dave.anglin@bell.net>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      b63a2bbc
    • H
      parisc: show number of FPE and unaligned access handler calls in /proc/interrupts · d0c3be80
      Helge Deller 提交于
      Show number of floating point assistant and unaligned access fixup
      handler in /proc/interrupts file.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      d0c3be80
  26. 12 5月, 2013 1 次提交
    • H
      parisc: implement irq stacks - part 2 (v2) · 416821d3
      Helge Deller 提交于
      This patch fixes few build issues which were introduced with the last
      irq stack patch, e.g. the combination of stack overflow check and irq
      stack.
      
      Furthermore we now do proper locking and change the irq bh handler
      to use the irq stack as well.
      
      In /proc/interrupts one now can monitor how huge the irq stack has grown
      and how often it was preferred over the kernel stack.
      
      IRQ stacks are now enabled by default just to make sure that we not
      overflow the kernel stack by accident.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      416821d3
  27. 08 5月, 2013 4 次提交
    • H
      parisc: tlb flush counting fix for SMP and UP · 0fc537d1
      Helge Deller 提交于
      Fix up build error on UP and show correctly number of function call
      (ipi) irqs.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      0fc537d1
    • H
      parisc: more irq statistics in /proc/interrupts · cd85d551
      Helge Deller 提交于
      Add framework and initial values for more fine grained statistics in
      /proc/interrupts.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      cd85d551
    • H
      parisc: implement irq stacks · 200c8804
      Helge Deller 提交于
      Default kernel stack size on parisc is 16k.  During tests we found that the
      kernel stack can easily grow beyond 13k, which leaves 3k left for irq
      processing.
      
      This patch adds the possibility to activate an additional stack of 16k per CPU
      which is being used during irq processing.  This implementation does not yet
      uses this irq stack for the irq bh handler.
      
      The assembler code for call_on_stack was heavily cleaned up by John
      David Anglin.
      
      CC: John David Anglin <dave.anglin@bell.net>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      200c8804
    • H
      parisc: add kernel stack overflow check · 9372450c
      Helge Deller 提交于
      Add the CONFIG_DEBUG_STACKOVERFLOW config option to enable checks to
      detect kernel stack overflows.
      
      Stack overflows can not be detected reliable since we do not want to
      introduce too much overhead.
      
      Instead, during irq processing in do_cpu_irq_mask() we check kernel
      stack usage of the interrupted kernel process. Kernel threads can be
      easily detected by checking the value of space register 7 (sr7) which
      is zero when running inside the kernel.
      
      Since THREAD_SIZE is 16k and PAGE_SIZE is 4k, reduce the alignment of
      the init thread to the lower value (PAGE_SIZE) in the kernel
      vmlinux.ld.S linker script.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      9372450c