1. 12 10月, 2010 12 次提交
  2. 04 10月, 2010 4 次提交
    • T
      genirq: Provide config option to disable deprecated code · bd151412
      Thomas Gleixner 提交于
      This option covers now the old chip functions and the irq_desc data
      fields which are moving to struct irq_data. More stuff will follow.
      
      Pretty handy for testing a conversion, whether something broke or not.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      bd151412
    • T
      genirq: Provide advanced irq chip functions · f8822657
      Thomas Gleixner 提交于
      The low level irq chip functions want access to irq_desc->irq_data.
      Provide new functions which hand down irq_data instead of the irq
      number so these functions avoid to call irq_to_desc() which is a radix
      tree lookup in case of sparse irq.
      
      This provides all the old functions except one: end(). end() is a
      relict of __do_IRQ() and will just go away with the __do_IRQ() code.
      
      The replacement for set_affinity() has an extra argument "bool
      force". The reason for this is to notify the low level code, that the
      move has to be done right away and cannot be delayed until the next
      interrupt happens. That's necessary to handle the irq fixup on cpu
      unplug in the generic code.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20100927121841.742126604@linutronix.de>
      Reviewed-by: NH. Peter Anvin <hpa@zytor.com>
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      f8822657
    • T
      genirq: Convert core code to irq_data · 6b8ff312
      Thomas Gleixner 提交于
      Convert all references in the core code to orq, chip, handler_data,
      chip_data, msi_desc, affinity to irq_data.*
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      6b8ff312
    • T
      genirq: Create irq_data · ff7dcd44
      Thomas Gleixner 提交于
      Low level chip functions need access to irq_desc->handler_data,
      irq_desc->chip_data and irq_desc->msi_desc. We hand down the irq
      number to the low level functions, so they need to lookup irq_desc.
      With sparse irq this means a radix tree lookup.
      
      We could hand down irq_desc itself, but low level chip functions have
      no need to fiddle with it directly and we want to restrict access to
      irq_desc further.
      
      Preparatory patch for new chip functions.
      
      Note, that the ugly anon union/struct is there to avoid a full tree
      wide clean up for now. This is not going to last 3 years like __do_IRQ()
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20100927121841.645542300@linutronix.de>
      Reviewed-by: NH. Peter Anvin <hpa@zytor.com>
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      ff7dcd44
  3. 28 9月, 2010 2 次提交
  4. 27 9月, 2010 2 次提交
  5. 24 9月, 2010 1 次提交
  6. 23 9月, 2010 3 次提交
  7. 22 9月, 2010 1 次提交
  8. 21 9月, 2010 1 次提交
    • T
      xfrm: Allow different selector family in temporary state · 8444cf71
      Thomas Egerer 提交于
      The family parameter xfrm_state_find is used to find a state matching a
      certain policy. This value is set to the template's family
      (encap_family) right before xfrm_state_find is called.
      The family parameter is however also used to construct a temporary state
      in xfrm_state_find itself which is wrong for inter-family scenarios
      because it produces a selector for the wrong family. Since this selector
      is included in the xfrm_user_acquire structure, user space programs
      misinterpret IPv6 addresses as IPv4 and vice versa.
      This patch splits up the original init_tempsel function into a part that
      initializes the selector respectively the props and id of the temporary
      state, to allow for differing ip address families whithin the state.
      Signed-off-by: NThomas Egerer <thomas.egerer@secunet.com>
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8444cf71
  9. 18 9月, 2010 1 次提交
  10. 16 9月, 2010 1 次提交
  11. 15 9月, 2010 1 次提交
    • H
      compat: Make compat_alloc_user_space() incorporate the access_ok() · c41d68a5
      H. Peter Anvin 提交于
      compat_alloc_user_space() expects the caller to independently call
      access_ok() to verify the returned area.  A missing call could
      introduce problems on some architectures.
      
      This patch incorporates the access_ok() check into
      compat_alloc_user_space() and also adds a sanity check on the length.
      The existing compat_alloc_user_space() implementations are renamed
      arch_compat_alloc_user_space() and are used as part of the
      implementation of the new global function.
      
      This patch assumes NULL will cause __get_user()/__put_user() to either
      fail or access userspace on all architectures.  This should be
      followed by checking the return value of compat_access_user_space()
      for NULL in the callers, at which time the access_ok() in the callers
      can also be removed.
      Reported-by: NBen Hawkes <hawkes@sota.gen.nz>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NChris Metcalf <cmetcalf@tilera.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NTony Luck <tony.luck@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Bottomley <jejb@parisc-linux.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: <stable@kernel.org>
      c41d68a5
  12. 14 9月, 2010 1 次提交
  13. 13 9月, 2010 3 次提交
  14. 10 9月, 2010 7 次提交
    • G
      libata-sff: Reenable Port Multiplier after libata-sff remodeling. · ea3c6450
      Gwendal Grignou 提交于
      Keep track of the link on the which the current request is in progress.
      It allows support of links behind port multiplier.
      
      Not all libata-sff is PMP compliant. Code for native BMDMA controller
      does not take in accound PMP.
      
      Tested on Marvell 7042 and Sil7526.
      Signed-off-by: NGwendal Grignou <gwendal@google.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ea3c6450
    • T
      libata: skip EH autopsy and recovery during suspend · e2f3d75f
      Tejun Heo 提交于
      For some mysterious reason, certain hardware reacts badly to usual EH
      actions while the system is going for suspend.  As the devices won't
      be needed until the system is resumed, ask EH to skip usual autopsy
      and recovery and proceed directly to suspend.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Tested-by: NStephan Diestelhorst <stephan.diestelhorst@amd.com>
      Cc: stable@kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      e2f3d75f
    • C
      mm: page allocator: calculate a better estimate of NR_FREE_PAGES when memory... · aa454840
      Christoph Lameter 提交于
      mm: page allocator: calculate a better estimate of NR_FREE_PAGES when memory is low and kswapd is awake
      
      Ordinarily watermark checks are based on the vmstat NR_FREE_PAGES as it is
      cheaper than scanning a number of lists.  To avoid synchronization
      overhead, counter deltas are maintained on a per-cpu basis and drained
      both periodically and when the delta is above a threshold.  On large CPU
      systems, the difference between the estimated and real value of
      NR_FREE_PAGES can be very high.  If NR_FREE_PAGES is much higher than
      number of real free page in buddy, the VM can allocate pages below min
      watermark, at worst reducing the real number of pages to zero.  Even if
      the OOM killer kills some victim for freeing memory, it may not free
      memory if the exit path requires a new page resulting in livelock.
      
      This patch introduces a zone_page_state_snapshot() function (courtesy of
      Christoph) that takes a slightly more accurate view of an arbitrary vmstat
      counter.  It is used to read NR_FREE_PAGES while kswapd is awake to avoid
      the watermark being accidentally broken.  The estimate is not perfect and
      may result in cache line bounces but is expected to be lighter than the
      IPI calls necessary to continually drain the per-cpu counters while kswapd
      is awake.
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aa454840
    • H
      swap: discard while swapping only if SWAP_FLAG_DISCARD · 33994466
      Hugh Dickins 提交于
      Tests with recent firmware on Intel X25-M 80GB and OCZ Vertex 60GB SSDs
      show a shift since I last tested in December: in part because of firmware
      updates, in part because of the necessary move from barriers to awaiting
      completion at the block layer.  While discard at swapon still shows as
      slightly beneficial on both, discarding 1MB swap cluster when allocating
      is now disadvanteous: adds 25% overhead on Intel, adds 230% on OCZ (YMMV).
      
      Surrender: discard as presently implemented is more hindrance than help
      for swap; but might prove useful on other devices, or with improvements.
      So continue to do the discard at swapon, but make discard while swapping
      conditional on a SWAP_FLAG_DISCARD to sys_swapon() (which has been using
      only the lower 16 bits of int flags).
      
      We can add a --discard or -d to swapon(8), and a "discard" to swap in
      /etc/fstab: matching the mount option for btrfs, ext4, fat, gfs2, nilfs2.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Nigel Cunningham <nigel@tuxonice.net>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jens Axboe <jaxboe@fusionio.com>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33994466
    • H
      swap: revert special hibernation allocation · 910321ea
      Hugh Dickins 提交于
      Please revert 2.6.36-rc commit d2997b10
      "hibernation: freeze swap at hibernation".  It complicated matters by
      adding a second swap allocation path, just for hibernation; without in any
      way fixing the issue that it was intended to address - page reclaim after
      fixing the hibernation image might free swap from a page already imaged as
      swapcache, letting its swap be reallocated to store a different page of
      the image: resulting in data corruption if the imaged page were freed as
      clean then swapped back in.  Pages freed to si->swap_map were still in
      danger of being reallocated by the alternative allocation path.
      
      I guess it inadvertently fixed slow SSD swap allocation for hibernation,
      as reported by Nigel Cunningham: by missing out the discards that occur on
      the usual swap allocation path; but that was unintentional, and needs a
      separate fix.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Ondrej Zary <linux@rainbow-software.org>
      Cc: Andrea Gelmini <andrea.gelmini@gmail.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Nigel Cunningham <nigel@tuxonice.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      910321ea
    • D
      gpio: doc updates · c956126c
      David Brownell 提交于
      There's been some recent confusion about error checking GPIO numbers.
      briefly, it should be handled mostly during setup, when gpio_request() is
      called, and NEVER by expectig gpio_is_valid to report more than
      never-usable GPIO numbers.
      
      [akpm@linux-foundation.org: terminate unterminated comment]
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Eric Miao" <eric.y.miao@gmail.com>
      Cc: "Ryan Mallon" <ryan@bluewatersys.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c956126c
    • G
      gpio: sx150x: correct and refine reset-on-probe behavior · 5affb607
      Gregory Bean 提交于
      Replace the arbitrary software-reset call from the device-probe
      method, because:
      
      - It is defective.  To work correctly, it should be two byte writes,
        not a single word write.  As it stands, it does nothing.
      
      - Some devices with sx150x expanders installed have their NRESET pins
        ganged on the same line, so resetting one causes the others to reset -
        not a nice thing to do arbitrarily!
      
      - The probe, usually taking place at boot, implies a recent hard-reset,
        so a software reset at this point is just a waste of energy anyway.
      
      Therefore, make it optional, defaulting to off, as this will match the
      common case of probing at powerup and also matches the current broken
      no-op behavior.
      Signed-off-by: NGregory Bean <gbean@codeaurora.org>
      Reviewed-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5affb607