1. 19 May, 2011 27 commits
  2. 12 Apr, 2011 3 commits
    • Dave Martin's avatar
      ARM: mxc: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL · 0575b4b8
      Dave Martin authored
      Directives such as .long and .word do not magically cause the
      assembler location counter to become aligned in gas.  As a
      result, using these directives in code sections can result in
      misaligned data words when building a Thumb-2 kernel
      (CONFIG_THUMB2_KERNEL).
      
      This is a Bad Thing, since the ABI permits the compiler to
      assume that fundamental types of word size or above are word-
      aligned when accessing them from C.  If the data is not really
      word-aligned, this can cause impaired performance and stray
      alignment faults in some circumstances.
      
      In general, the following rules should be applied when using
      data word declaration directives inside code sections:
      
          * .quad and .double:
               .align 3
      
          * .long, .word, .single, .float:
               .align (or .align 2)
      
          * .short:
              No explicit alignment required, since Thumb-2
              instructions are always 2 or 4 bytes in size.
              immediately after an instruction.
      Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      LAKML-Reference: 1289913217-8672-1-git-send-email-dave.martin@linaro.org
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      0575b4b8
    • Uwe Kleine-König's avatar
      ARM: mxs/clock-mx28: fix up name##_set_rate · f61b9fc2
      Uwe Kleine-König authored
      For the lcdif clock get_rate looks as follows:
      
      	read div from HW_CLKCTRL_DIS_LCDIF.DIV
      	return clk_get_rate(clk->parent) / div
      
      with clk->parent being ref_pix_clk on my system.
      
      ref_pix_clk's rate depends on HW_CLKCTRL_FRAC1.PIXFRAC.
      
      The set_rate function for lcdif does:
      
      	parent_rate = clk_get_rate(clk->parent);
      	based on that calculate frac and div such that
      	  parent_rate * 18 / frac / div is near the requested rate.
      	HW_CLKCTRL_FRAC1.PIXFRAC is updated with frac
      	HW_CLKCTRL_DIS_LCDIF.DIV is updated with div
      
      For this calculation to be correct parent_rate needs to be
      initialized not with the clock rate of lcdif's parent (i.e. ref_pix) but
      that of its grandparent (i.e. ref_pix' parent == pll0_clk).
      
      The obvious downside of this patch is that now set_rate(lcdif) changes
      its parent's rate, too.  Still this is better than a wrong rate.
      Acked-by: default avatarShawn Guo <shawn.guo@freescale.com>
      LAKML-Reference: 20110225084950.GA13684@S2101-09.ap.freescale.net
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      f61b9fc2
    • Uwe Kleine-König's avatar
      ARM: imx: fix usb related build failure for mach-vpr200 · 32a90b6e
      Uwe Kleine-König authored
      This was broken by
      
      	4bd597b6 (ARM i.MX ehci: do ehci init in board specific functions)
      
      and fixes:
      
        CC      arch/arm/mach-mx3/mach-vpr200.o
      arch/arm/mach-mx3/mach-vpr200.c:263: error: unknown field 'flags' specified in initializer
      arch/arm/mach-mx3/mach-vpr200.c:264: warning: initialization makes pointer from integer without a cast
      
      by just applying the change to mach-vpr200.c that the other machine files
      got by 4bd597b6.
      
      LAKML-Reference: 1302257029-17397-1-git-send-email-u.kleine-koenig@pengutronix.de
      Acked-by: default avatarMarc Reilly <marc@cpdesign.com.au>
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      32a90b6e
  3. 06 Apr, 2011 1 commit
  4. 05 Apr, 2011 9 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block · 44148a66
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block:
        ide: always ensure that blk_delay_queue() is called if we have pending IO
        block: fix request sorting at unplug
        dm: improve block integrity support
        fs: export empty_aops
        ide: ide_requeue_and_plug() reinstate "always plug" behaviour
        blk-throttle: don't call xchg on bool
        ufs: remove unessecary blk_flush_plug
        block: make the flush insertion use the tail of the dispatch list
        block: get rid of elv_insert() interface
        block: dump request state on seeing a corrupted request completion
      44148a66
    • Eric Paris's avatar
      inotify: fix double free/corruption of stuct user · d0de4dc5
      Eric Paris authored
      On an error path in inotify_init1 a normal user can trigger a double
      free of struct user.  This is a regression introduced by a2ae4cc9
      ("inotify: stop kernel memory leak on file creation failure").
      
      We fix this by making sure that if a group exists the user reference is
      dropped when the group is cleaned up.  We should not explictly drop the
      reference on error and also drop the reference when the group is cleaned
      up.
      
      The new lifetime rules are that an inotify group lives from
      inotify_new_group to the last fsnotify_put_group.  Since the struct user
      and inotify_devs are directly tied to this lifetime they are only
      changed/updated in those two locations.  We get rid of all special
      casing of struct user or user->inotify_devs.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Cc: stable@kernel.org (2.6.37 and up)
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d0de4dc5
    • Jens Axboe's avatar
      ide: always ensure that blk_delay_queue() is called if we have pending IO · 782b86e2
      Jens Axboe authored
      Just because we are not requeuing a request does not mean that
      some aren't pending. So always issue a blk_delay_queue() if
      either we are requeueing OR there's pending IO.
      
      This fixes a boot problem for some IDE boxes.
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      782b86e2
    • Konstantin Khlebnikov's avatar
      block: fix request sorting at unplug · f83e8261
      Konstantin Khlebnikov authored
      Comparison function for list_sort() must be anticommutative,
      otherwise it is not sorting in ordinary meaning.
      
      But fortunately list_sort() always check ((*cmp)(priv, a, b) <= 0)
      it not distinguish negative and zero, so comparison function can
      implement only less-or-equal instead of full three-way comparison.
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      f83e8261
    • Mike Snitzer's avatar
      dm: improve block integrity support · a63a5cf8
      Mike Snitzer authored
      The current block integrity (DIF/DIX) support in DM is verifying that
      all devices' integrity profiles match during DM device resume (which
      is past the point of no return).  To some degree that is unavoidable
      (stacked DM devices force this late checking).  But for most DM
      devices (which aren't stacking on other DM devices) the ideal time to
      verify all integrity profiles match is during table load.
      
      Introduce the notion of an "initialized" integrity profile: a profile
      that was blk_integrity_register()'d with a non-NULL 'blk_integrity'
      template.  Add blk_integrity_is_initialized() to allow checking if a
      profile was initialized.
      
      Update DM integrity support to:
      - check all devices with _initialized_ integrity profiles match
        during table load; uninitialized profiles (e.g. for underlying DM
        device(s) of a stacked DM device) are ignored.
      - disallow a table load that would result in an integrity profile that
        conflicts with a DM device's existing (in-use) integrity profile
      - avoid clearing an existing integrity profile
      - validate all integrity profiles match during resume; but if they
        don't all we can do is report the mismatch (during resume we're past
        the point of no return)
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      a63a5cf8
    • Jens Axboe's avatar
      fs: export empty_aops · 7dcda1c9
      Jens Axboe authored
      With the ->sync_page() hook gone, we have a few users that
      add their own static address_space_operations without any
      functions defined.
      
      fs/inode.c already has an empty_aops that it uses for init
      purposes. Lets export that and use it in the places where
      an otherwise empty aops was defined.
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      7dcda1c9
    • Jens Axboe's avatar
      ide: ide_requeue_and_plug() reinstate "always plug" behaviour · 929e2725
      Jens Axboe authored
      We see stalls if we don't always ensure that the queue gets run
      again. Even if rq == NULL, we could have other pending requests
      in the queue.
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      929e2725
    • Andreas Schwab's avatar
      blk-throttle: don't call xchg on bool · 6f037937
      Andreas Schwab authored
      xchg does not work portably with smaller than 32bit types.
      Signed-off-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      6f037937
    • Christoph Hellwig's avatar
      ufs: remove unessecary blk_flush_plug · ee3dea35
      Christoph Hellwig authored
      We already flush the per-process plugging list when context switching,
      so a blk_flush_plug call just before a yield() is not needed.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      ee3dea35