1. 06 4月, 2009 2 次提交
    • L
      Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip · e4c393fd
      Linus Torvalds 提交于
      * 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        printk: correct the behavior of printk_timed_ratelimit()
        vsprintf: unify the format decoding layer for its 3 users, cleanup
        fix regression from "vsprintf: unify the format decoding layer for its 3 users"
        vsprintf: fix bug in negative value printing
        vsprintf: unify the format decoding layer for its 3 users
        vsprintf: add binary printf
        printk: introduce printk_once()
      
      Fix trivial conflicts (printk_once vs log_buf_kexec_setup() added near
      each other) in include/linux/kernel.h.
      e4c393fd
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc · 0a053e8c
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (42 commits)
        atmel-mci: fix sdc_reg typo
        tmio_mmc: add maintainer
        mmc: Add OpenFirmware bindings for SDHCI driver
        sdhci: Add quirk for forcing maximum block size to 2048 bytes
        sdhci: Add quirk for controllers that need IRQ re-init after reset
        sdhci: Add quirk for controllers that need small delays for PIO
        sdhci: Add set_clock callback and a quirk for nonstandard clocks
        sdhci: Add get_{max,timeout}_clock callbacks
        sdhci: Add support for hosts reporting inverted write-protect state
        sdhci: Add support for card-detection polling
        sdhci: Enable only relevant (DMA/PIO) interrupts during transfers
        sdhci: Split card-detection IRQs management from sdhci_init()
        sdhci: Add support for bus-specific IO memory accessors
        mmc_spi: adjust for delayed data token response
        omap_hsmmc: Wait for SDBP
        omap_hsmmc: Fix MMC3 dma
        omap_hsmmc: Disable SDBP at suspend
        omap_hsmmc: Do not prefix slot name
        omap_hsmmc: Allow cover switch to cause rescan
        omap_hsmmc: Add 8-bit bus width mode support
        ...
      0a053e8c
  2. 05 4月, 2009 1 次提交
    • L
      Make non-compat preadv/pwritev use native register size · 601cc11d
      Linus Torvalds 提交于
      Instead of always splitting the file offset into 32-bit 'high' and 'low'
      parts, just split them into the largest natural word-size - which in C
      terms is 'unsigned long'.
      
      This allows 64-bit architectures to avoid the unnecessary 32-bit
      shifting and masking for native format (while the compat interfaces will
      obviously always have to do it).
      
      This also changes the order of 'high' and 'low' to be "low first".  Why?
      Because when we have it like this, the 64-bit system calls now don't use
      the "pos_high" argument at all, and it makes more sense for the native
      system call to simply match the user-mode prototype.
      
      This results in a much more natural calling convention, and allows the
      compiler to generate much more straightforward code.  On x86-64, we now
      generate
      
              testq   %rcx, %rcx      # pos_l
              js      .L122   #,
              movq    %rcx, -48(%rbp) # pos_l, pos
      
      from the C source
      
              loff_t pos = pos_from_hilo(pos_h, pos_l);
      	...
              if (pos < 0)
                      return -EINVAL;
      
      and the 'pos_h' register isn't even touched.  It used to generate code
      like
      
              mov     %r8d, %r8d      # pos_low, pos_low
              salq    $32, %rcx       #, tmp71
              movq    %r8, %rax       # pos_low, pos.386
              orq     %rcx, %rax      # tmp71, pos.386
              js      .L122   #,
              movq    %rax, -48(%rbp) # pos.386, pos
      
      which isn't _that_ horrible, but it does show how the natural word size
      is just a more sensible interface (same arguments will hold in the user
      level glibc wrapper function, of course, so the kernel side is just half
      of the equation!)
      
      Note: in all cases the user code wrapper can again be the same. You can
      just do
      
      	#define HALF_BITS (sizeof(unsigned long)*4)
      	__syscall(PWRITEV, fd, iov, count, offset, (offset >> HALF_BITS) >> HALF_BITS);
      
      or something like that.  That way the user mode wrapper will also be
      nicely passing in a zero (it won't actually have to do the shifts, the
      compiler will understand what is going on) for the last argument.
      
      And that is a good idea, even if nobody will necessarily ever care: if
      we ever do move to a 128-bit lloff_t, this particular system call might
      be left alone.  Of course, that will be the least of our worries if we
      really ever need to care, so this may not be worth really caring about.
      
      [ Fixed for lost 'loff_t' cast noticed by Andrew Morton ]
      Acked-by: NGerd Hoffmann <kraxel@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-api@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Ralf Baechle <ralf@linux-mips.org>>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      601cc11d
  3. 04 4月, 2009 37 次提交