Skip to content
  1. Oct 15, 2010
    • Paul Mundt's avatar
      sh: clkfwk: support clock remapping. · 28085bc5
      Paul Mundt authored
      
      
      This implements support for ioremapping of register windows that
      encapsulate clock control registers used by a struct clk, with
      transparent sibling inheritance.
      
      Root clocks at the top of a given topology often encapsulate the entire
      register space of all of their sibling clocks, so this mapping can be
      done once and handed down. A given clock enable/disable case maps out to
      a single bit in a shared register, so this prevents creating multiple
      overlapping mappings.
      
      The mapping case breaks down in to a couple of different situations:
      
      	- Sibling clocks without a specific mapping.
      	- Root clocks without a specific mapping.
      	- Any of sibling/root clocks with a specific mapping.
      
      Sibling clocks with no specified mapping will grovel up the clock chain
      and install the root clock mapping unconditionally at registration time.
      
      Root clocks without their own mappings have a dummy BSS-initialized
      mapping inserted that is handed down the chain just like any other
      mapping. This permits all of the sibling clock ops to read/write using
      the mapping offsets without any special configuration, enabling them to
      not care whether access ultimately goes through translatable or
      untranslatable memory.
      
      Any clock with its own mapping will have the window initialized at
      registration time and be ready for use by its clock ops. Failure to
      establish the mapping will prevent registration, so no additional sanity
      checks are needed. Sibling clocks that double as parents for the moment
      will not propagate their mapping down, but this is easily tunable if the
      need arises.
      
      All clock mappings are kref refcounted, with each instance of mapping
      inheritance incrementing the refcount.
      
      Tested-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      28085bc5
  2. Oct 13, 2010
  3. Oct 06, 2010
  4. Oct 05, 2010
    • Paul Mundt's avatar
      sh: intc: Split up the INTC code. · 2be6bb0c
      Paul Mundt authored
      
      
      This splits up the sh intc core in to something more vaguely resembling
      a subsystem. Most of the functionality was alread fairly well
      compartmentalized, and there were only a handful of interdependencies
      that needed to be resolved in the process.
      
      This also serves as future-proofing for the genirq and sparseirq rework,
      which will make some of the split out functionality wholly generic,
      allowing things to be killed off in place with minimal migration pain.
      
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      2be6bb0c
    • Paul Mundt's avatar
      sh: intc: Handle early lookups of subgroup IRQs. · d74310d3
      Paul Mundt authored
      
      
      If lookups happen while the radix node still points to a subgroup
      mapping, an IRQ hasn't yet been made available for the specified id, so
      error out accordingly. Once the slot is replaced with an IRQ mapping and
      the tag is discarded, lookup can commence as normal.
      
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      d74310d3
  5. Oct 04, 2010
    • Paul Mundt's avatar
      sh: intc: Support virtual mappings for IRQ subgroups. · c1e30ad9
      Paul Mundt authored
      
      
      Many interrupts that share a single mask source but are on different
      hardware vectors will have an associated register tied to an INTEVT that
      denotes the precise cause for the interrupt exception being triggered.
      
      This introduces the concept of IRQ subgroups in the intc core, where
      a virtual IRQ map is constructed for each of the pre-defined cause bits,
      and a higher level chained handler takes control of the parent INTEVT.
      This enables CPUs with heavily muxed IRQ vectors (especially across
      disjoint blocks) to break things out in to a series of managed chained
      handlers while being able to dynamically lookup and adopt the IRQs
      created for them.
      
      This is largely an opt-in interface, requiring CPUs to manually submit
      IRQs for subgroup splitting, in addition to providing identifiers in
      their enum maps that can be used for lazy lookup via the radix tree.
      
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      c1e30ad9
    • Paul Mundt's avatar
      sh: intc: Implement reverse mapping for IRQs to per-controller IDs. · 44629f57
      Paul Mundt authored
      
      
      This implements a scheme roughly analogous to the PowerPC virtual to
      hardware IRQ mapping, which we use for IRQ to per-controller ID mapping.
      This makes it possible for drivers to use the IDs directly for lookup
      instead of hardcoding the vector.
      
      The main motivation for this work is as a building block for dynamically
      allocating virtual IRQs for demuxing INTC events sharing a single INTEVT
      in addition to a common masking source.
      
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      44629f57
  6. Oct 03, 2010
    • Paul Mundt's avatar
      sh: pfc: Fix up BUG() triggered by gpiolib debugfs lookups. · e8184a47
      Paul Mundt authored
      
      
      The gpiolib debugfs entry takes a hammer approach and iterates over all
      of the potential GPIOs, regardless of their type. The SH PFC code on the
      other hand contains a variable mismash of input/output/function types
      spread out sparsely, leading to situations where the debug code can
      trigger an out of range enum for the type. Since we already have an error
      path for out of range enums, we can just hand that up to the higher level
      instead of the current BUG() behaviour.
      
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      e8184a47
    • Paul Mundt's avatar
      sh: pfc: support pinmux deregistration. · b72421d8
      Paul Mundt authored
      
      
      Presently the pinmux code is a one-way thing, but there's nothing
      preventing an unregistration if no one has grabbed any of the pins.
      This will permit us to save a bit of memory on systems that require pin
      demux for certain peripherals in the case where registration of those
      peripherals fails, or they are otherwise not attached to the system.
      
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      b72421d8
  7. Oct 02, 2010
  8. Oct 01, 2010
  9. Sep 16, 2010
  10. Aug 20, 2010
    • Paul Mundt's avatar
      sh: reinstate clock framework rate rounding. · 960bc368
      Paul Mundt authored
      
      
      This was killed off by a simplification patch previously that failed to
      take the cpufreq use case in to account, so reinstate the old bounding
      logic. The lowest rate bounding on the other hand was broken in that it
      never actually got assigned a rate and the best fit rate was instead just
      getting lucky based on the ordering of the rate table, fix this up so the
      code actually does what it was intended to do originally.
      
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      960bc368
  11. Aug 18, 2010
    • Uwe Kleine-König's avatar
      mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=y · 81ca03a0
      Uwe Kleine-König authored
      
      
      This fixes a build breakage introduced by commit 4c2ef25f ("mmc: fix
      all hangs related to mmc/sd card insert/removal during suspend/resume")
      
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: linux-mmc@vger.kernel.org
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      Acked-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
      Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      81ca03a0
    • Nicholas Piggin's avatar
      tty: fix fu_list abuse · d996b62a
      Nicholas Piggin authored
      
      
      tty: fix fu_list abuse
      
      tty code abuses fu_list, which causes a bug in remount,ro handling.
      
      If a tty device node is opened on a filesystem, then the last link to the inode
      removed, the filesystem will be allowed to be remounted readonly. This is
      because fs_may_remount_ro does not find the 0 link tty inode on the file sb
      list (because the tty code incorrectly removed it to use for its own purpose).
      This can result in a filesystem with errors after it is marked "clean".
      
      Taking idea from Christoph's initial patch, allocate a tty private struct
      at file->private_data and put our required list fields in there, linking
      file and tty. This makes tty nodes behave the same way as other device nodes
      and avoid meddling with the vfs, and avoids this bug.
      
      The error handling is not trivial in the tty code, so for this bugfix, I take
      the simple approach of using __GFP_NOFAIL and don't worry about memory errors.
      This is not a problem because our allocator doesn't fail small allocs as a rule
      anyway. So proper error handling is left as an exercise for tty hackers.
      
      [ Arguably filesystem's device inode would ideally be divorced from the
      driver's pseudo inode when it is opened, but in practice it's not clear whether
      that will ever be worth implementing. ]
      
      Cc: linux-kernel@vger.kernel.org
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      d996b62a
    • Nicholas Piggin's avatar
      fs: cleanup files_lock locking · ee2ffa0d
      Nicholas Piggin authored
      
      
      fs: cleanup files_lock locking
      
      Lock tty_files with a new spinlock, tty_files_lock; provide helpers to
      manipulate the per-sb files list; unexport the files_lock spinlock.
      
      Cc: linux-kernel@vger.kernel.org
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ee2ffa0d
    • Nicholas Piggin's avatar
      fs: fs_struct rwlock to spinlock · 2a4419b5
      Nicholas Piggin authored
      
      
      fs: fs_struct rwlock to spinlock
      
      struct fs_struct.lock is an rwlock with the read-side used to protect root and
      pwd members while taking references to them. Taking a reference to a path
      typically requires just 2 atomic ops, so the critical section is very small.
      Parallel read-side operations would have cacheline contention on the lock, the
      dentry, and the vfsmount cachelines, so the rwlock is unlikely to ever give a
      real parallelism increase.
      
      Replace it with a spinlock to avoid one or two atomic operations in typical
      path lookup fastpath.
      
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      2a4419b5
    • NeilBrown's avatar
      md raid-1/10 Fix bio_rw bit manipulations again · 2c7d46ec
      NeilBrown authored
      
      
      commit 7b6d91da changed the behaviour
      of a few variables in raid1 and raid10 from flags to bit-sets, but
      left them as type 'bool' so they did not work.
      
      Change them (back) to unsigned long.
      (historical note: see 1ef04fef)
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Reported-by: Jiri Slaby <jslaby@suse.cz> and many others
      2c7d46ec
    • Greg Ungerer's avatar
      m68knommu: include sched.h in ColdFire/SPI driver · 5e1c5335
      Greg Ungerer authored
      
      
      Using the coldfire qspi driver, I get the following error:
      
      drivers/spi/coldfire_qspi.c: In function 'mcfqspi_irq_handler':
      drivers/spi/coldfire_qspi.c:166: error: 'TASK_NORMAL' undeclared (first use in this function)
      drivers/spi/coldfire_qspi.c:166: error: (Each undeclared identifier is reported only once
      
      It is solved by adding the following include to coldfire_sqpi.c:
      
          #include <linux/sched.h>
      
      Fix suggested by Jate Sujjavanich <jsujjavanich@syntech-fuelmaster.com>
      
      Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
      5e1c5335
    • NeilBrown's avatar
      md: provide appropriate return value for spare_active functions. · 6b965620
      NeilBrown authored
      
      
      md_check_recovery expects ->spare_active to return 'true' if any
      spares were activated, but none of them do, so the consequent change
      in 'degraded' is not notified through sysfs.
      
      So count the number of spares activated, subtract it from 'degraded'
      just once, and return it.
      
      Reported-by: default avatarAdrian Drzewiecki <adriand@vmware.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      6b965620
    • Adrian Drzewiecki's avatar
      md: Notify sysfs when RAID1/5/10 disk is In_sync. · e6ffbcb6
      Adrian Drzewiecki authored
      
      
      When RAID1 is done syncing disks, it'll update the state
      of synced rdevs to In_sync. But it neglected to notify
      sysfs that the attribute changed. So any programs that
      are waiting for an rdev's state to change will not be
      woken.
      
      (raid5/raid10 added by neilb)
      
      Signed-off-by: default avatarAdrian Drzewiecki <adriand@vmware.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      e6ffbcb6
    • NeilBrown's avatar
      Update recovery_offset even when external metadata is used. · 3a3a5ddb
      NeilBrown authored
      
      
      The update of ->recovery_offset in sync_sbs is appropriate even then external
      metadata is in use.  However sync_sbs is only called when native
      metadata is used.
      
      So move that update in to the top of md_update_sb (which is the only
      caller of sync_sbs) before the test on ->external.
      
      This moves the update out of ->write_lock protection, but those fields
      only need ->reconfig_mutex protection which they still have.
      
      Also move the test on ->persistent up to where ->external is set as
      for metadata update purposes they are the same.
      
      Clear MD_CHANGE_DEVS and MD_CHANGE_CLEAN as they can only be confusing
      if ->external is set or ->persistent isn't.
      
      Finally move the update of ->utime down as it is only relevent (like
      the ->events update) for native metadata.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Reported-by: default avatar"Kwolek, Adam" <adam.kwolek@intel.com>
      3a3a5ddb
    • David Miller's avatar
      a7c8962b
  12. Aug 17, 2010
  13. Aug 16, 2010
Loading