1. 23 Oct, 2011 3 commits
  2. 20 Oct, 2011 1 commit
  3. 17 Oct, 2011 7 commits
  4. 04 Oct, 2011 1 commit
  5. 03 Oct, 2011 2 commits
    • Marc Zyngier's avatar
      genirq: percpu: allow interrupt type to be set at enable time · 1e7c5fd2
      Marc Zyngier authored
      
      As request_percpu_irq() doesn't allow for a percpu interrupt to have
      its type configured (it is generally impossible to configure it on all
      CPUs at once), add a 'type' argument to enable_percpu_irq().
      
      This allows some low-level, board specific init code to be switched to
      a generic API.
      
      [ tglx: Added WARN_ON argument ]
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1e7c5fd2
    • Marc Zyngier's avatar
      genirq: Add support for per-cpu dev_id interrupts · 31d9d9b6
      Marc Zyngier authored
      
      The ARM GIC interrupt controller offers per CPU interrupts (PPIs),
      which are usually used to connect local timers to each core. Each CPU
      has its own private interface to the GIC, and only sees the PPIs that
      are directly connect to it.
      
      While these timers are separate devices and have a separate interrupt
      line to a core, they all use the same IRQ number.
      
      For these devices, request_irq() is not the right API as it assumes
      that an IRQ number is visible by a number of CPUs (through the
      affinity setting), but makes it very awkward to express that an IRQ
      number can be handled by all CPUs, and yet be a different interrupt
      line on each CPU, requiring a different dev_id cookie to be passed
      back to the handler.
      
      The *_percpu_irq() functions is designed to overcome these
      limitations, by providing a per-cpu dev_id vector:
      
      int request_percpu_irq(unsigned int irq, irq_handler_t handler,
      		   const char *devname, void __percpu *percpu_dev_id);
      void free_percpu_irq(unsigned int, void __percpu *);
      int setup_percpu_irq(unsigned int irq, struct irqaction *new);
      void remove_percpu_irq(unsigned int irq, struct irqaction *act);
      void enable_percpu_irq(unsigned int irq);
      void disable_percpu_irq(unsigned int irq);
      
      The API has a number of limitations:
      - no interrupt sharing
      - no threading
      - common handler across all the CPUs
      
      Once the interrupt is requested using setup_percpu_irq() or
      request_percpu_irq(), it must be enabled by each core that wishes its
      local interrupt to be delivered.
      
      Based on an initial patch by Thomas Gleixner.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/1316793788-14500-2-git-send-email-marc.zyngier@arm.com
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      31d9d9b6
  6. 12 Sep, 2011 2 commits
  7. 10 Sep, 2011 8 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm · d0a77454
      Linus Torvalds authored
      * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
        ARM: 7088/1: entry: fix wrong parameter name used in do_thumb_abort
        ARM: 7080/1: l2x0: make sure I&D are not locked down on init
        ARM: 7081/1: mach-integrator: fix the clocksource
        NET: am79c961: fix race in link status code
        ARM: 7067/1: mm: keep significant bits in pfn_valid
      d0a77454
    • Janusz Krzysztofik's avatar
      ARM: 7088/1: entry: fix wrong parameter name used in do_thumb_abort · 6c6d8deb
      Janusz Krzysztofik authored
      Commit be020f86
      
      , "ARM: entry: abort-macro: specify registers to be
      used for macros", while replacing register numbers with macro parameter
      names, mismatched the name used for r1. For me, this resulted in user
      space built for EABI with -march=armv4t -mtune=arm920t -mthumb-interwork
      -mthumb broken on my OMAP1510 based Amstrad Delta (old ABI and no thumb
      still worked for me though).
      
      Fix this by using correct parameter name fsr instead of mismatched psr,
      used by callers for another purpose.
      Signed-off-by: default avatarJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      6c6d8deb
    • Bart Van Assche's avatar
      backlight: Declare backlight_types[] const · c338bfb5
      Bart Van Assche authored
      Since backlight_types[] isn't modified, let's declare it const.  That
      was probably the intention of the author of commit bb7ca747
      
      
      ("backlight: add backlight type"), via which the "const char const *"
      construct was introduced.  The duplicate const was detected by sparse.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c338bfb5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · 290a1cc4
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        md: Fix handling for devices from 2TB to 4TB in 0.90 metadata.
        md/raid1,10: Remove use-after-free bug in make_request.
        md/raid10: unify handling of write completion.
        Avoid dereferencing a 'request_queue' after last close.
      290a1cc4
    • NeilBrown's avatar
      md: Fix handling for devices from 2TB to 4TB in 0.90 metadata. · 27a7b260
      NeilBrown authored
      
      0.90 metadata uses an unsigned 32bit number to count the number of
      kilobytes used from each device.
      This should allow up to 4TB per device.
      However we multiply this by 2 (to get sectors) before casting to a
      larger type, so sizes above 2TB get truncated.
      
      Also we allow rdev->sectors to be larger than 4TB, so it is possible
      for the array to be resized larger than the metadata can handle.
      So make sure rdev->sectors never exceeds 4TB when 0.90 metadata is in
      used.
      
      Also the sanity check at the end of super_90_load should include level
      1 as it used ->size too. (RAID0 and Linear don't use ->size at all).
      Reported-by: default avatarPim Zandbergen <P.Zandbergen@macroscoop.nl>
      Cc: stable@kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      27a7b260
    • NeilBrown's avatar
      md/raid1,10: Remove use-after-free bug in make_request. · 079fa166
      NeilBrown authored
      A single request to RAID1 or RAID10 might result in multiple
      requests if there are known bad blocks that need to be avoided.
      
      To detect if we need to submit another write request we test:
       	if (sectors_handled < (bio->bi_size >> 9)) {
      
      However this is after we call **_write_done() so the 'bio' no longer
      belongs to us - the writes could have completed and the bio freed.
      
      So move the **_write_done call until after the test against
      bio->bi_size.
      
      This addresses https://bugzilla.kernel.org/show_bug.cgi?id=41862
      
      Reported-by: default avatarBruno Wolff III <bruno@wolff.to>
      Tested-by: default avatarBruno Wolff III <bruno@wolff.to>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      079fa166
    • NeilBrown's avatar
      md/raid10: unify handling of write completion. · 19d5f834
      NeilBrown authored
      
      A write can complete at two different places:
      1/ when the last member-device write completes, through
         raid10_end_write_request
      2/ in make_request() when we remove the initial bias from ->remaining.
      
      These two should do exactly the same thing and the comment says they
      do, but they don't.
      
      So factor the correct code out into a function and call it in both
      places.  This makes the code much more similar to RAID1.
      
      The difference is only significant if there is an error, and they
      usually take a while, so it is unlikely that there will be an error
      already when make_request is completing, so this is unlikely to cause
      real problems.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      19d5f834
    • NeilBrown's avatar
      Avoid dereferencing a 'request_queue' after last close. · 94007751
      NeilBrown authored
      On the last close of an 'md' device which as been stopped, the device
      is destroyed and in particular the request_queue is freed.  The free
      is done in a separate thread so it might happen a short time later.
      
      __blkdev_put calls bdev_inode_switch_bdi *after* ->release has been
      called.
      
      Since commit f758eeab
      
      
      bdev_inode_switch_bdi will dereference the 'old' bdi, which lives
      inside a request_queue, to get a spin lock.  This causes the last
      close on an md device to sometime take a spin_lock which lives in
      freed memory - which results in an oops.
      
      So move the called to bdev_inode_switch_bdi before the call to
      ->release.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Acked-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      94007751
  8. 09 Sep, 2011 5 commits
  9. 08 Sep, 2011 7 commits
  10. 07 Sep, 2011 4 commits