1. 07 6月, 2010 4 次提交
    • K
      swiotlb: search and replace "int dir" with "enum dma_data_direction dir" · 22d48269
      Konrad Rzeszutek Wilk 提交于
      .. to catch anybody doing something funky.
      
      See "swiotlb: swiotlb: add swiotlb_tbl_map_single library function" for
      full description of patchset.
      
      [v2: swiotlb_sync_single_range_* no more - removed usage]
      [v3: enum dma_data_direction direction -> enum dma_data_direction dir]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Tested-by: NAlbert Herranz <albert_herranz@yahoo.es>
      22d48269
    • K
      swiotlb: Make internal bookkeeping functions have 'swiotlb_tbl' prefix. · bfc5501f
      Konrad Rzeszutek Wilk 提交于
      The functions that operate on io_tlb_list/io_tlb_start/io_tlb_orig_addr
      have the prefix 'swiotlb_tbl' now.
      
      See "swiotlb: swiotlb: add swiotlb_tbl_map_single library function" for
      full description of patchset.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Tested-by: NAlbert Herranz <albert_herranz@yahoo.es>
      bfc5501f
    • F
      swiotlb: add the swiotlb initialization function with iotlb memory · abbceff7
      FUJITA Tomonori 提交于
      This enables the caller to initialize swiotlb with its own iotlb
      memory.
      
      See "swiotlb: swiotlb: add swiotlb_tbl_map_single library function" for
      full description of patchset.
      
      [v2: changed ..with_tlb to ..with_tbl]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Tested-by: NAlbert Herranz <albert_herranz@yahoo.es>
      abbceff7
    • F
      swiotlb: add swiotlb_tbl_map_single library function · eb605a57
      FUJITA Tomonori 提交于
      swiotlb_tbl_map_single() takes the dma address of iotlb instead of
      using swiotlb_virt_to_bus().
      
      [v2: changed swiotlb_tlb to swiotlb_tbl]
      [v3: changed u64 to dma_addr_t]
      
      This patch:
      
      This is a set of patches that separate the address translation
      (virt_to_phys, virt_to_bus, etc) and allocation of the SWIOTLB buffer
      from the SWIOTLB library.
      
      The idea behind this set of patches is to make it possible to have separate
      mechanisms for translating virtual to physical or virtual to DMA addresses
      on platforms which need an SWIOTLB, and where physical != PCI bus address
      and also to allocate the core IOTLB memory outside SWIOTLB.
      
      One customers of this is the pv-ops project, which can switch between
      different modes of operation depending on the environment it is running in:
      bare-metal or virtualized (Xen for now). Another is the Wii DMA - used to
      implement the MEM2 DMA facility needed by its EHCI controller (for details:
      http://lkml.org/lkml/2010/5/18/303)
      
      On bare-metal SWIOTLB is used when there are no hardware IOMMU. In virtualized
      environment it used when PCI pass-through is enabled for the guest. The problems
      with PCI pass-through is that the guest's idea of PFN's is not the real thing.
      To fix that, there is translation layer for PFN->machine frame number and vice-versa.
      To bubble that up to the SWIOTLB layer there are two possible solutions.
      
      One solution has been to wholesale copy the SWIOTLB, stick it in
      arch/x86/xen/swiotlb.c and modify the virt_to_phys, phys_to_virt and others
      to use the Xen address translation functions. Unfortunately, since the kernel can
      run on bare-metal, there would be big code overlap with the real SWIOTLB.
      (git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git xen/dom0/swiotlb-new)
      
      Another approach, which this set of patches explores, is to abstract the
      address translation and address determination functions away from the
      SWIOTLB book-keeping functions. This way the core SWIOTLB library functions
      are present in one place, while the address related functions are in
      a separate library that can be loaded when running under non-bare-metal platform.
      
      Changelog:
      Since the last posting [v8.2] Konrad has done:
       - Added this changelog in the patch and referenced in the other patches
         this description.
       - 'enum dma_data_direction direction' to 'enum dma.. dir' so to be
         unified.
      [v8-v8.2 changes:]
       - Rolled-up the last two patches in one.
       - Rebased against linus latest. That meant dealing with swiotlb_sync_single_range_* changes.
       - added Acked-by: Fujita Tomonori and Tested-by: Albert Herranz
      [v7-v8 changes:]
       - Minimized the list of exported functions.
       - Integrated Fujita's patches and changed "swiotlb_tlb" to "swiotlb_tbl" in them.
      [v6-v7 changes:]
       - Minimized the amount of exported functions/variable with a prefix of: "swiotbl_tbl".
       - Made the usage of 'int dir' to be 'enum dma_data_direction'.
      [v5-v6 changes:]
       - Made the exported functions/variables have the 'swiotlb_bk' prefix.
       - dropped the checkpatches/other reworks
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Tested-by: NAlbert Herranz <albert_herranz@yahoo.es>
      eb605a57
  2. 31 5月, 2010 1 次提交
  3. 28 5月, 2010 6 次提交
    • C
      radix-tree: fix radix_tree_prev_hole() underflow case · edcd1d84
      Cesar Eduardo Barros 提交于
      radix_tree_prev_hole() used LONG_MAX to detect underflow; however,
      ULONG_MAX is clearly what was intended, both here and by its only user
      (count_history_pages at mm/readahead.c).
      Reviewed-by: NWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NCesar Eduardo Barros <cesarb@cesarb.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      edcd1d84
    • F
      swiotlb: remove unnecessary swiotlb_sync_single_range_* · 38388301
      FUJITA Tomonori 提交于
      swiotlb_sync_single_range_for_cpu and swiotlb_sync_single_range_for_device
      are unnecessary because swiotlb_sync_single_for_cpu and
      swiotlb_sync_single_for_device can be used instead.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      38388301
    • J
      lib/random32: export pseudo-random number generator for modules · 5960164f
      Joe Eykholt 提交于
      This patch moves the definition of struct rnd_state and the inline
      __seed() function to linux/random.h.  It renames the static __random32()
      function to prandom32() and exports it for use in modules.
      
      prandom32() is useful as a privately-seeded pseudo random number generator
      that can give the same result every time it is initialized.
      
      For FCoE FC-BB-6 VN2VN mode self-selected unique FC address generation, we
      need an pseudo-random number generator seeded with the 64-bit world-wide
      port name.  A truly random generator or one seeded with randomness won't
      do because the same sequence of numbers should be generated each time we
      boot or the link comes up.
      
      A prandom32_seed() inline function is added to the header file.  It is
      inlined not for speed, but so the function won't be expanded in the base
      kernel, but only in the module that uses it.
      Signed-off-by: NJoe Eykholt <jeykholt@cisco.com>
      Acked-by: NMatt Mackall <mpm@selenic.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5960164f
    • I
      idr: fix backtrack logic in idr_remove_all · 2dcb22b3
      Imre Deak 提交于
      Currently idr_remove_all will fail with a use after free error if
      idr::layers is bigger than 2, which on 32 bit systems corresponds to items
      more than 1024.  This is due to stepping back too many levels during
      backtracking.  For simplicity let's assume that IDR_BITS=1 -> we have 2
      nodes at each level below the root node and each leaf node stores two IDs.
       (In reality for 32 bit systems IDR_BITS=5, with 32 nodes at each sub-root
      level and 32 IDs in each leaf node).  The sequence of freeing the nodes at
      the moment is as follows:
      
      layer
      1 ->                       a(7)
      2 ->            b(3)                  c(5)
      3 ->        d(1)   e(2)           f(4)    g(6)
      
      Until step 4 things go fine, but then node c is freed, whereas node g
      should be freed first.  Since node c contains the pointer to node g we'll
      have a use after free error at step 6.
      
      How many levels we step back after visiting the leaf nodes is currently
      determined by the msb of the id we are currently visiting:
      
      Step
      1.          node d with IDs 0,1 is freed, current ID is advanced to 2.
                  msb of the current ID bit 1. This means we need to step back
                  1 level to node b and take the next sibling, node e.
      2-3.        node e with IDs 2,3 is freed, current ID is 4, msb is bit 2.
                  This means we need to step back 2 levels to node a, freeing
                  node b on the way.
      4-5.        node f with IDs 4,5 is freed, current ID is 6, msb is still
                  bit 2. This means we again need to step back 2 levels to node
                  a and free c on the way.
      6.          We should visit node g, but its pointer is not available as
                  node c was freed.
      
      The fix changes how we determine the number of levels to step back.
      Instead of deducting this merely from the msb of the current ID, we should
      really check if advancing the ID causes an overflow to a bit position
      corresponding to a given layer.  In the above example overflow from bit 0
      to bit 1 should mean stepping back 1 level.  Overflow from bit 1 to bit 2
      should mean stepping back 2 levels and so on.
      
      The fix was tested with IDs up to 1 << 20, which corresponds to 4 layers
      on 32 bit systems.
      Signed-off-by: NImre Deak <imre.deak@nokia.com>
      Reviewed-by: NTejun Heo <tj@kernel.org>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: <stable@kernel.org>		[2.6.34.1]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2dcb22b3
    • A
      fault-injection: add CPU notifier error injection module · c9d221f8
      Akinobu Mita 提交于
      I used this module to test the series of modification to the cpu notifiers
      code.
      
      Example1: inject CPU offline error (-1 == -EPERM)
      
      	# modprobe cpu-notifier-error-inject cpu_down_prepare_error=-1
      	# echo 0 > /sys/devices/system/cpu/cpu1/online
      	bash: echo: write error: Operation not permitted
      
      Example2: inject CPU online error (-2 == -ENOENT)
      
      	# modprobe cpu-notifier-error-inject cpu_up_prepare_error=-2
      	# echo 1 > /sys/devices/system/cpu/cpu1/online
      	bash: echo: write error: No such file or directory
      
      [akpm@linux-foundation.org: fix Kconfig help text]
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c9d221f8
    • J
      cpusets: randomize node rotor used in cpuset_mem_spread_node() · 0ac0c0d0
      Jack Steiner 提交于
      Some workloads that create a large number of small files tend to assign
      too many pages to node 0 (multi-node systems).  Part of the reason is that
      the rotor (in cpuset_mem_spread_node()) used to assign nodes starts at
      node 0 for newly created tasks.
      
      This patch changes the rotor to be initialized to a random node number of
      the cpuset.
      
      [akpm@linux-foundation.org: fix layout]
      [Lee.Schermerhorn@hp.com: Define stub numa_random() for !NUMA configuration]
      Signed-off-by: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NLee Schermerhorn <lee.schermerhorn@hp.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Paul Menage <menage@google.com>
      Cc: Jack Steiner <steiner@sgi.com>
      Cc: Robin Holt <holt@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0ac0c0d0
  4. 26 5月, 2010 1 次提交
  5. 25 5月, 2010 9 次提交
  6. 22 5月, 2010 7 次提交
    • E
      hotplug: netns aware uevent_helper · 417daa1e
      Eric W. Biederman 提交于
      It only makes sense for uevent_helper to get events
      in the intial namespaces.  It's invocation is not
      per namespace and it is not clear how we could make
      it's invocation namespace aware.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      417daa1e
    • E
      kobj: Send hotplug events in the proper namespace. · 5f71a296
      Eric W. Biederman 提交于
      Utilize netlink_broacast_filtered to allow sending hotplug events
      in the proper namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5f71a296
    • E
      kobject: Send hotplug events in all network namespaces · 07e98962
      Eric W. Biederman 提交于
      Open a copy of the uevent kernel socket in each network
      namespace so we can send uevents in all network namespaces.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      07e98962
    • E
      sysfs: Implement sysfs tagged directory support. · 3ff195b0
      Eric W. Biederman 提交于
      The problem.  When implementing a network namespace I need to be able
      to have multiple network devices with the same name.  Currently this
      is a problem for /sys/class/net/*, /sys/devices/virtual/net/*, and
      potentially a few other directories of the form /sys/ ... /net/*.
      
      What this patch does is to add an additional tag field to the
      sysfs dirent structure.  For directories that should show different
      contents depending on the context such as /sys/class/net/, and
      /sys/devices/virtual/net/ this tag field is used to specify the
      context in which those directories should be visible.  Effectively
      this is the same as creating multiple distinct directories with
      the same name but internally to sysfs the result is nicer.
      
      I am calling the concept of a single directory that looks like multiple
      directories all at the same path in the filesystem tagged directories.
      
      For the networking namespace the set of directories whose contents I need
      to filter with tags can depend on the presence or absence of hotplug
      hardware or which modules are currently loaded.  Which means I need
      a simple race free way to setup those directories as tagged.
      
      To achieve a reace free design all tagged directories are created
      and managed by sysfs itself.
      
      Users of this interface:
      - define a type in the sysfs_tag_type enumeration.
      - call sysfs_register_ns_types with the type and it's operations
      - sysfs_exit_ns when an individual tag is no longer valid
      
      - Implement mount_ns() which returns the ns of the calling process
        so we can attach it to a sysfs superblock.
      - Implement ktype.namespace() which returns the ns of a syfs kobject.
      
      Everything else is left up to sysfs and the driver layer.
      
      For the network namespace mount_ns and namespace() are essentially
      one line functions, and look to remain that.
      
      Tags are currently represented a const void * pointers as that is
      both generic, prevides enough information for equality comparisons,
      and is trivial to create for current users, as it is just the
      existing namespace pointer.
      
      The work needed in sysfs is more extensive.  At each directory
      or symlink creating I need to check if the directory it is being
      created in is a tagged directory and if so generate the appropriate
      tag to place on the sysfs_dirent.  Likewise at each symlink or
      directory removal I need to check if the sysfs directory it is
      being removed from is a tagged directory and if so figure out
      which tag goes along with the name I am deleting.
      
      Currently only directories which hold kobjects, and
      symlinks are supported.  There is not enough information
      in the current file attribute interfaces to give us anything
      to discriminate on which makes it useless, and there are
      no potential users which makes it an uninteresting problem
      to solve.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3ff195b0
    • E
      kobj: Add basic infrastructure for dealing with namespaces. · bc451f20
      Eric W. Biederman 提交于
      Move complete knowledge of namespaces into the kobject layer
      so we can use that information when reporting kobjects to
      userspace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bc451f20
    • S
      sysfs: Comment sysfs directory tagging logic · be867b19
      Serge E. Hallyn 提交于
      Add some in-line comments to explain the new infrastructure, which
      was introduced to support sysfs directory tagging with namespaces.
      I think an overall description someplace might be good too, but it
      didn't really seem to fit into Documentation/filesystems/sysfs.txt,
      which appears more geared toward users, rather than maintainers, of
      sysfs.
      
      (Tejun, please let me know if I can make anything clearer or failed
      altogether to comment something that should be commented.)
      Signed-off-by: NSerge E. Hallyn <serue@us.ibm.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      be867b19
    • N
      kref: remove kref_set · db1afffa
      NeilBrown 提交于
      Of the three uses of kref_set in the kernel:
      
       One really should be kref_put as the code is letting go of a
          reference,
       Two really should be kref_init because the kref is being
          initialised.
      
      This suggests that making kref_set available encourages bad code.
      So fix the three uses and remove kref_set completely.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Acked-by: NMimi Zohar <zohar@us.ibm.com>
      Acked-by: NSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      db1afffa
  7. 21 5月, 2010 4 次提交
    • J
      mips,kgdb: kdb low level trap catch and stack trace · 5dd11d5d
      Jason Wessel 提交于
      The only way the debugger can handle a trap in inside rcu_lock,
      notify_die, or atomic_notifier_call_chain without a recursive fault is
      to have a low level "first opportunity handler" do_trap_or_bp() handler.
      
      Generally this will be something the vast majority of folks will not
      need, but for those who need it, it is added as a kernel .config
      option called KGDB_LOW_LEVEL_TRAP.
      
      Also added was a die notification for oops such that kdb can catch an
      oops for analysis.
      
      There appeared to be no obvious way to pass the struct pt_regs from
      the original exception back to the stack back tracer, so a special
      case was added to show_stack() for when kdb is active because you
      generally desire to generally look at the back trace of the original
      exception.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      5dd11d5d
    • J
      x86,kgdb: Add low level debug hook · f503b5ae
      Jason Wessel 提交于
      The only way the debugger can handle a trap in inside rcu_lock,
      notify_die, or atomic_notifier_call_chain without a triple fault is
      to have a low level "first opportunity handler" in the int3 exception
      handler.
      
      Generally this will be something the vast majority of folks will not
      need, but for those who need it, it is added as a kernel .config
      option called KGDB_LOW_LEVEL_TRAP.
      
      CC: Ingo Molnar <mingo@elte.hu>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: H. Peter Anvin <hpa@zytor.com>
      CC: x86@kernel.org
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      f503b5ae
    • J
      kgdboc,keyboard: Keyboard driver for kdb with kgdb · ada64e4c
      Jason Wessel 提交于
      This patch adds in the kdb PS/2 keyboard driver.  This was mostly a
      direct port from the original kdb where I cleaned up the code against
      checkpatch.pl and added the glue to stitch it into kgdb.
      
      This patch also enables early kdb debug via kgdbwait and the keyboard.
      
      All the access to configure kdb using either a serial console or the
      keyboard is done via kgdboc.
      
      If you want to use only the keyboard and want to break in early you
      would add to your kernel command arguments:
      
          kgdboc=kbd kgdbwait
      
      If you wanted serial and or the keyboard access you could use:
      
          kgdboc=kbd,ttyS0
      
      You can also configure kgdboc as a kernel module or at run time with
      the sysfs where you can activate and deactivate kgdb.
      
      Turn it on:
          echo kbd,ttyS0 > /sys/module/kgdboc/parameters/kgdboc
      
      Turn it off:
          echo "" > /sys/module/kgdboc/parameters/kgdboc
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      ada64e4c
    • J
      kgdb: core changes to support kdb · dcc78711
      Jason Wessel 提交于
      These are the minimum changes to the kgdb core in order to enable an
      API to connect a new front end (kdb) to the debug core.
      
      This patch introduces the dbg_kdb_mode variable controls where the
      user level I/O is routed.  It will be routed to the gdbstub (kgdb) or
      to the kdb front end which is a simple shell available over the kgdboc
      connection.
      
      You can switch back and forth between kdb or the gdb stub mode of
      operation dynamically.  From gdb stub mode you can blindly type
      "$3#33", or from the kdb mode you can enter "kgdb" to switch to the
      gdb stub.
      
      The logic in the debug core depends on kdb to look for the typical gdb
      connection sequences and return immediately with KGDB_PASS_EVENT if a
      gdb serial command sequence is detected.  That should allow a
      reasonably seamless transition between kdb -> gdb without leaving the
      kernel exception state.  The two gdb serial queries that kdb is
      responsible for detecting are the "?" and "qSupported" packets.
      
      CC: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NMartin Hicks <mort@sgi.com>
      dcc78711
  8. 20 5月, 2010 1 次提交
    • H
      Unified UUID/GUID definition · fab1c232
      Huang Ying 提交于
      There are many different UUID/GUID definitions in kernel, such as that
      in EFI, many file systems, some drivers, etc. Every kernel components
      need UUID/GUID has its own definition. This patch provides a unified
      definition for UUID/GUID.
      
      UUID is defined via typedef. This makes that UUID appears more like a
      preliminary type, and makes the data type explicit (comparing with
      implicit "u8 uuid[16]").
      
      The binary representation of UUID/GUID can be little-endian (used by
      EFI, etc) or big-endian (defined by RFC4122), so both is defined.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      fab1c232
  9. 19 5月, 2010 1 次提交
  10. 16 5月, 2010 1 次提交
  11. 13 5月, 2010 1 次提交
  12. 11 5月, 2010 3 次提交
    • M
      Debugobjects transition check · a5d8e467
      Mathieu Desnoyers 提交于
      Implement a basic state machine checker in the debugobjects.
      
      This state machine checker detects races and inconsistencies within the "active"
      life of a debugobject. The checker only keeps track of the current state; all
      the state machine logic is kept at the object instance level.
      
      The checker works by adding a supplementary "unsigned int astate" field to the
      debug_obj structure. It keeps track of the current "active state" of the object.
      
      The only constraints that are imposed on the states by the debugobjects system
      is that:
      
      - activation of an object sets the current active state to 0,
      - deactivation of an object expects the current active state to be 0.
      
      For the rest of the states, the state mapping is determined by the specific
      object instance. Therefore, the logic keeping track of the state machine is
      within the specialized instance, without any need to know about it at the
      debugobject level.
      
      The current object active state is changed by calling:
      
      debug_object_active_state(addr, descr, expect, next)
      
      where "expect" is the expected state and "next" is the next state to move to if
      the expected state is found. A warning is generated if the expected is not
      found.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      CC: akpm@linux-foundation.org
      CC: mingo@elte.hu
      CC: laijs@cn.fujitsu.com
      CC: dipankar@in.ibm.com
      CC: josh@joshtriplett.org
      CC: dvhltc@us.ibm.com
      CC: niv@us.ibm.com
      CC: peterz@infradead.org
      CC: rostedt@goodmis.org
      CC: Valdis.Kletnieks@vt.edu
      CC: dhowells@redhat.com
      CC: eric.dumazet@gmail.com
      CC: Alexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      a5d8e467
    • P
      rcu: enable CPU_STALL_VERBOSE by default · 55ec936f
      Paul E. McKenney 提交于
      The CPU_STALL_VERBOSE kernel configuration parameter was added to
      2.6.34 to identify any preempted/blocked tasks that were preventing
      the current grace period from completing when running preemptible
      RCU.  As is conventional for new configurations parameters, this
      defaulted disabled.  It is now time to enable it by default.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      55ec936f
    • L
      rcu: optionally leave lockdep enabled after RCU lockdep splat · 2b3fc35f
      Lai Jiangshan 提交于
      There is no need to disable lockdep after an RCU lockdep splat,
      so remove the debug_lockdeps_off() from lockdep_rcu_dereference().
      To avoid repeated lockdep splats, use a static variable in the inlined
      rcu_dereference_check() and rcu_dereference_protected() macros so that
      a given instance splats only once, but so that multiple instances can
      be detected per boot.
      
      This is controlled by a new config variable CONFIG_PROVE_RCU_REPEATEDLY,
      which is disabled by default.  This provides the normal lockdep behavior
      by default, but permits people who want to find multiple RCU-lockdep
      splats per boot to easily do so.
      Requested-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Tested-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      2b3fc35f
  13. 25 4月, 2010 1 次提交