1. 08 10月, 2012 2 次提交
  2. 13 9月, 2012 1 次提交
  3. 31 7月, 2012 15 次提交
  4. 30 7月, 2012 1 次提交
  5. 23 7月, 2012 1 次提交
    • D
      of/lib: Allow scripts/dtc/libfdt to be used from kernel code · ab253839
      David Daney 提交于
      libfdt is part of the device tree support in scripts/dtc/libfdt.  For
      some platforms that use the Device Tree, we want to be able to edit
      the flattened device tree form.
      
      We don't want to burden kernel builds that do not require it, so we
      gate compilation of libfdt files with CONFIG_LIBFDT.  So if it is
      needed, you need to do this in your Kconfig:
      
      	select LIBFDT
      
      And in the Makefile of the code using libfdt something like:
      
      ccflags-y := -I$(src)/../../../scripts/dtc/libfdt
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: linux-kernel@vger.kernel.org
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ab253839
  6. 20 7月, 2012 1 次提交
    • T
      debug: Do not permit CONFIG_DEBUG_STACK_USAGE=y on IA64 or PARISC · e9c31b32
      Tony Luck 提交于
      The stack_not_used() function in <linux/sched.h> assumes that stacks
      grow downwards. This is not true on IA64 or PARISC, so this function
      would walk off in the wrong direction and into the weeds.
      
      Found on IA64 because of a compilation failure with recursive dependencies
      on IA64_TASKSIZE and IA64_THREAD_INFO_SIZE.
      
      Fixing the code is possible, but should be combined with other
      infrastructure additions to set up the "canary" at the end of the stack.
      
      Reported-by: Fengguang Wu <fengguang.wu@intel.com> (failed allmodconfig build)
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      e9c31b32
  7. 06 7月, 2012 1 次提交
  8. 02 7月, 2012 1 次提交
  9. 30 6月, 2012 1 次提交
    • P
      netlink: add netlink_kernel_cfg parameter to netlink_kernel_create · a31f2d17
      Pablo Neira Ayuso 提交于
      This patch adds the following structure:
      
      struct netlink_kernel_cfg {
              unsigned int    groups;
              void            (*input)(struct sk_buff *skb);
              struct mutex    *cb_mutex;
      };
      
      That can be passed to netlink_kernel_create to set optional configurations
      for netlink kernel sockets.
      
      I've populated this structure by looking for NULL and zero parameters at the
      existing code. The remaining parameters that always need to be set are still
      left in the original interface.
      
      That includes optional parameters for the netlink socket creation. This allows
      easy extensibility of this interface in the future.
      
      This patch also adapts all callers to use this new interface.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a31f2d17
  10. 28 6月, 2012 1 次提交
  11. 21 6月, 2012 1 次提交
  12. 09 6月, 2012 2 次提交
    • J
      lib: Fix possible deadlock in flexible proportion code · e78d4833
      Jan Kara 提交于
      When percpu counter function in fprop_new_period() is interrupted by an
      interrupt while holding counter lock, it can cause deadlock when the
      interrupt wants to take the lock as well. Fix the problem by disabling
      interrupts when calling percpu counter functions.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      e78d4833
    • J
      lib: Proportions with flexible period · f3109a51
      Jan Kara 提交于
      Implement code computing proportions of events of different type (like code in
      lib/proportions.c) but allowing periods to have different lengths. This allows
      us to have aging periods of fixed wallclock time which gives better proportion
      estimates given the hugely varying throughput of different devices - previous
      measuring of aging period by number of events has the problem that a reasonable
      period length for a system with low-end USB stick is not a reasonable period
      length for a system with high-end storage array resulting either in too slow
      proportion updates or too fluctuating proportion updates.
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      f3109a51
  13. 08 6月, 2012 2 次提交
  14. 06 6月, 2012 2 次提交
  15. 01 6月, 2012 5 次提交
    • D
      vsprintf: further optimize decimal conversion · 133fd9f5
      Denys Vlasenko 提交于
      Previous code was using optimizations which were developed to work well
      even on narrow-word CPUs (by today's standards).  But Linux runs only on
      32-bit and wider CPUs.  We can use that.
      
      First: using 32x32->64 multiply and trivial 32-bit shift, we can correctly
      divide by 10 much larger numbers, and thus we can print groups of 9 digits
      instead of groups of 5 digits.
      
      Next: there are two algorithms to print larger numbers.  One is generic:
      divide by 1000000000 and repeatedly print groups of (up to) 9 digits.
      It's conceptually simple, but requires an (unsigned long long) /
      1000000000 division.
      
      Second algorithm splits 64-bit unsigned long long into 16-bit chunks,
      manipulates them cleverly and generates groups of 4 decimal digits.  It so
      happens that it does NOT require long long division.
      
      If long is > 32 bits, division of 64-bit values is relatively easy, and we
      will use the first algorithm.  If long long is > 64 bits (strange
      architecture with VERY large long long), second algorithm can't be used,
      and we again use the first one.
      
      Else (if long is 32 bits and long long is 64 bits) we use second one.
      
      And third: there is a simple optimization which takes fast path not only
      for zero as was done before, but for all one-digit numbers.
      
      In all tested cases new code is faster than old one, in many cases by 30%,
      in few cases by more than 50% (for example, on x86-32, conversion of
      12345678).  Code growth is ~0 in 32-bit case and ~130 bytes in 64-bit
      case.
      
      This patch is based upon an original from Michal Nazarewicz.
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Cc: Douglas W Jones <jones@cs.uiowa.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      133fd9f5
    • G
      vsprintf: correctly handle width when '#' flag used in %#p format · 725fe002
      Grant Likely 提交于
      The '%p' output of the kernel's vsprintf() uses spec.field_width to
      determine how many digits to output based on 2 * sizeof(void*) so that all
      digits of a pointer are shown.  ie.  a pointer will be output as
      "001A2B3C" instead of "1A2B3C".  However, if the '#' flag is used in the
      format (%#p), then the code doesn't take into account the width of the
      '0x' prefix and will end up outputing "0x1A2B3C" instead of "0x001A2B3C".
      
      This patch reworks the "pointer()" format hook to include 2 characters for
      the '0x' prefix if the '#' flag is included.
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      725fe002
    • H
      bql: Avoid possible inconsistent calculation. · 914bec10
      Hiroaki SHIMODA 提交于
      dql->num_queued could change while processing dql_completed().
      To provide consistent calculation, added an on stack variable.
      Signed-off-by: NHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Denys Fedoryshchenko <denys@visp.net.lb>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      914bec10
    • H
      bql: Avoid unneeded limit decrement. · 25426b79
      Hiroaki SHIMODA 提交于
      When below pattern is observed,
      
                                                     TIME
             dql_queued()         dql_completed()     |
            a) initial state                          |
                                                      |
            b) X bytes queued                         V
      
            c) Y bytes queued
                                 d) X bytes completed
            e) Z bytes queued
                                 f) Y bytes completed
      
      a) dql->limit has already some value and there is no in-flight packet.
      b) X bytes queued.
      c) Y bytes queued and excess limit.
      d) X bytes completed and dql->prev_ovlimit is set and also
         dql->prev_num_queued is set Y.
      e) Z bytes queued.
      f) Y bytes completed. inprogress and prev_inprogress are true.
      
      At f), according to the comment, all_prev_completed becomes
      true and limit should be increased. But POSDIFF() ignores
      (completed == dql->prev_num_queued) case, so limit is decreased.
      Signed-off-by: NHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Denys Fedoryshchenko <denys@visp.net.lb>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25426b79
    • H
      bql: Fix POSDIFF() to integer overflow aware. · 0cfd32b7
      Hiroaki SHIMODA 提交于
      POSDIFF() fails to take into account integer overflow case.
      Signed-off-by: NHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Denys Fedoryshchenko <denys@visp.net.lb>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0cfd32b7
  16. 30 5月, 2012 3 次提交