23 Dec, 2009

28 commits

  • Currently all quota block reservation macros contains hardcoded "2"
    aka MAXQUOTAS value. This is no good because in some places it is not
    obvious to understand what does this digit represent. Let's introduce
    new macro with self descriptive name.

    Signed-off-by: Dmitry Monakhov
    Signed-off-by: Jan Kara

    Dmitry Monakhov
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    pata_bf54x: handle portmuxing of pins through GPIO PORTs

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PM: Runtime PM documentation update
    PM / Runtime: Use device type and device class callbacks
    PM: Use pm_runtime_put_sync in system resume
    PM: Measure device suspend and resume times
    PM: Make the initcall_debug style timing for suspend/resume complete

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    jfs: Fix 32bit build warning
    Remove obsolete comment in fs.h
    Sanitize f_flags helpers
    Fix f_flags/f_mode in case of lookup_instantiate_filp() from open(pathname, 3)
    anonfd: Allow making anon files read-only
    fs/compat_ioctl.c: fix build error when !BLOCK
    pohmelfs needs I_LOCK
    alloc_file(): simplify handling of mnt_clone_write() errors

    Linus Torvalds
     
  • * 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
    MAINTAINERS: update entries for WUSB, UWB and WLP subsystems

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (36 commits)
    powerpc/gc/wii: Remove get_irq_desc()
    powerpc/gc/wii: hlwd-pic: convert irq_desc.lock to raw_spinlock
    powerpc/gamecube/wii: Fix off-by-one error in ugecon/usbgecko_udbg
    powerpc/mpic: Fix problem that affinity is not updated
    powerpc/mm: Fix stupid bug in subpge protection handling
    powerpc/iseries: use DECLARE_COMPLETION_ONSTACK for non-constant completion
    powerpc: Fix MSI support on U4 bridge PCIe slot
    powerpc: Handle VSX alignment faults correctly in little-endian mode
    powerpc/mm: Fix typo of cpumask_clear_cpu()
    powerpc/mm: Fix hash_utils_64.c compile errors with DEBUG enabled.
    powerpc: Convert BUG() to use unreachable()
    powerpc/pseries: Make declarations of cpu_hotplug_driver_lock() ANSI compatible.
    powerpc/pseries: Don't panic when H_PROD fails during cpu-online.
    powerpc/mm: Fix a WARN_ON() with CONFIG_DEBUG_PAGEALLOC and CONFIG_DEBUG_VM
    powerpc/defconfigs: Set HZ=100 on pseries and ppc64 defconfigs
    powerpc/defconfigs: Disable token ring in powerpc defconfigs
    powerpc/defconfigs: Reduce 64bit vmlinux by making acenic and cramfs modules
    powerpc/pseries: Select XICS and PCI_MSI PSERIES
    powerpc/85xx: Wrong variable returned on error
    powerpc/iseries: Convert to proc_fops
    ...

    Linus Torvalds
     
  • Fix the cx23888 driver to use the new kfifo API. Using kfifo_reset()
    may result in a possible race conditions. This patch fixes it by using
    a spinlock around the kfifo_reset() function.

    Signed-off-by: Stefani Seibold
    Cc: Mauro Carvalho Chehab
    Reviewed-by: Andy Walls
    Acked-by: Andy Walls
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Add kfifo_in_rec() - puts some record data into the FIFO
    Add kfifo_out_rec() - gets some record data from the FIFO
    Add kfifo_from_user_rec() - puts some data from user space into the FIFO
    Add kfifo_to_user_rec() - gets data from the FIFO and write it to user space
    Add kfifo_peek_rec() - gets the size of the next FIFO record field
    Add kfifo_skip_rec() - skip the next fifo out record
    Add kfifo_avail_rec() - determinate the number of bytes available in a record FIFO

    Signed-off-by: Stefani Seibold
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Add kfifo_reset_out() for save lockless discard the fifo output
    Add kfifo_skip() to skip a number of output bytes
    Add kfifo_from_user() to copy user space data into the fifo
    Add kfifo_to_user() to copy fifo data to user space

    Signed-off-by: Stefani Seibold
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Andi Kleen
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Add DECLARE_KFIFO - macro to declare a kfifo and the associated buffer inside a struct
    Add INIT_KFIFO - Initialize a kfifo declared by DECLARED_KFIFO
    Add DEFINE_KFIFO - macro to define and initialize a kfifo as a global or local object
    Add kfifo_size() - returns the size of the fifo in bytes
    Add kfifo_is_empty() - returns true if the fifo is empty
    Add kfifo_is_full() - returns true if the fifo is full
    Add kfifo_avail() - returns the number of bytes available in the FIFO
    Do some code cleanup

    Signed-off-by: Stefani Seibold
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Andi Kleen
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Fix the "ignoring return value of '...', declared with attribute
    warn_unused_result" compiler warning in several users of the new kfifo
    API.

    It removes the __must_check attribute from kfifo_in() and
    kfifo_in_locked() which must not necessary performed.

    Fix the allocation bug in the nozomi driver file, by moving out the
    kfifo_alloc from the interrupt handler into the probe function.

    Fix the kfifo_out() and kfifo_out_locked() users to handle a unexpected
    end of fifo.

    Signed-off-by: Stefani Seibold
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • rename kfifo_put... into kfifo_in... to prevent miss use of old non in
    kernel-tree drivers

    ditto for kfifo_get... -> kfifo_out...

    Improve the prototypes of kfifo_in and kfifo_out to make the kerneldoc
    annotations more readable.

    Add mini "howto porting to the new API" in kfifo.h

    Signed-off-by: Stefani Seibold
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Andi Kleen
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • change name of __kfifo_* functions to kfifo_*, because the prefix __kfifo
    should be reserved for internal functions only.

    Signed-off-by: Stefani Seibold
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Andi Kleen
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Move the pointer to the spinlock out of struct kfifo. Most users in
    tree do not actually use a spinlock, so the few exceptions now have to
    call kfifo_{get,put}_locked, which takes an extra argument to a
    spinlock.

    Signed-off-by: Stefani Seibold
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Andi Kleen
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • This is a new generic kernel FIFO implementation.

    The current kernel fifo API is not very widely used, because it has to
    many constrains. Only 17 files in the current 2.6.31-rc5 used it.
    FIFO's are like list's a very basic thing and a kfifo API which handles
    the most use case would save a lot of development time and memory
    resources.

    I think this are the reasons why kfifo is not in use:

    - The API is to simple, important functions are missing
    - A fifo can be only allocated dynamically
    - There is a requirement of a spinlock whether you need it or not
    - There is no support for data records inside a fifo

    So I decided to extend the kfifo in a more generic way without blowing up
    the API to much. The new API has the following benefits:

    - Generic usage: For kernel internal use and/or device driver.
    - Provide an API for the most use case.
    - Slim API: The whole API provides 25 functions.
    - Linux style habit.
    - DECLARE_KFIFO, DEFINE_KFIFO and INIT_KFIFO Macros
    - Direct copy_to_user from the fifo and copy_from_user into the fifo.
    - The kfifo itself is an in place member of the using data structure, this save an
    indirection access and does not waste the kernel allocator.
    - Lockless access: if only one reader and one writer is active on the fifo,
    which is the common use case, no additional locking is necessary.
    - Remove spinlock - give the user the freedom of choice what kind of locking to use if
    one is required.
    - Ability to handle records. Three type of records are supported:
    - Variable length records between 0-255 bytes, with a record size
    field of 1 bytes.
    - Variable length records between 0-65535 bytes, with a record size
    field of 2 bytes.
    - Fixed size records, which no record size field.
    - Preserve memory resource.
    - Performance!
    - Easy to use!

    This patch:

    Since most users want to have the kfifo as part of another object,
    reorganize the code to allow including struct kfifo in another data
    structure. This requires changing the kfifo_alloc and kfifo_init
    prototypes so that we pass an existing kfifo pointer into them. This
    patch changes the implementation and all existing users.

    [akpm@linux-foundation.org: fix warning]
    Signed-off-by: Stefani Seibold
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Andi Kleen
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Clean up typos/grammos/spellos in events-kmem.txt.

    Signed-off-by: Randy Dunlap
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Fix kernel-doc warnings (@arg name) in string.c::skip_spaces().

    Warning(lib/string.c:347): No description found for parameter 'str'
    Warning(lib/string.c:347): Excess function parameter 's' description in 'skip_spaces'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This reverts commit 7bc7d637452383d56ba4368d4336b0dde1bb476d, as
    requested by John Stultz. Quoting John:

    "Petr Titěra reported an issue where he saw odd atime regressions with
    2.6.33 where there were a full second worth of nanoseconds in the
    nanoseconds field.

    He also reviewed the time code and narrowed down the problem: unhandled
    overflow of the nanosecond field caused by rounding up the
    sub-nanosecond accumulated time.

    Details:

    * At the end of update_wall_time(), we currently round up the
    sub-nanosecond portion of accumulated time when storing it into xtime.
    This was added to avoid time inconsistencies caused when the
    sub-nanosecond portion was truncated when storing into xtime.
    Unfortunately we don't handle the possible second overflow caused by
    that rounding.

    * Previously the xtime_cache code hid this overflow by normalizing the
    xtime value when storing into the xtime_cache.

    * We could try to handle the second overflow after the rounding up, but
    since this affects the timekeeping's internal state, this would further
    complicate the next accumulation cycle, causing small errors in ntp
    steering. As much as I'd like to get rid of it, the xtime_cache code is
    known to work.

    * The correct fix is really to include the sub-nanosecond portion in the
    timekeeping accessor function, so we don't need to round up at during
    accumulation. This would greatly simplify the accumulation code.
    Unfortunately, we can't do this safely until the last three
    non-GENERIC_TIME arches (sparc32, arm, cris) are converted (those
    patches are in -mm) and we kill off the spots where arches set xtime
    directly. This is all 2.6.34 material, so I think reverting the
    xtime_cache change is the best approach for now.

    Many thanks to Petr for both reporting and finding the issue!"

    Reported-by: Petr Titěra
    Requested-by: john stultz
    Cc: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This patch (as1318) updates the runtime PM documentation, adding a
    section discussing the interaction between runtime PM and system sleep.

    [rjw: Rebased and made it agree with the other updates better.]

    Signed-off-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki

    Alan Stern
     
  • The power management of some devices is handled through device types
    and device classes rather than through bus types. Since these
    devices may also benefit from using the run-time power management
    core, extend it so that the device type and device class run-time PM
    callbacks can be taken into consideration by it if the bus type
    callback is not defined.

    Update the run-time PM core documentation to reflect this change.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • loff_t is a type that isn't entirely dependant upon 32 v 64bit choice

    Signed-off-by: Alan Cox
    Signed-off-by: Al Viro

    Alan Cox
     
  • This question was determined to be a bug which was fixed in
    commit 4a3b0a49.

    Signed-off-by: Andreas Gruenbacher
    Cc: Jan Blunck
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • * pull ACC_MODE to fs.h; we have several copies all over the place
    * nightmarish expression calculating f_mode by f_flags deserves a helper
    too (OPEN_FMODE(flags))

    Signed-off-by: Al Viro

    Al Viro
     
  • Just set f_flags when shoving struct file into nameidata; don't
    postpone that until __dentry_open(). do_filp_open() has correct
    value; lookup_instantiate_filp() doesn't - we lose the difference
    between O_RDWR and 3 by that point.

    We still set .intent.open.flags, so no fs code needs to be changed.

    Signed-off-by: Al Viro

    Al Viro
     
  • It seems a couple places such as arch/ia64/kernel/perfmon.c and
    drivers/infiniband/core/uverbs_main.c could use anon_inode_getfile()
    instead of a private pseudo-fs + alloc_file(), if only there were a way
    to get a read-only file. So provide this by having anon_inode_getfile()
    create a read-only file if we pass O_RDONLY in flags.

    Signed-off-by: Roland Dreier
    Signed-off-by: Al Viro

    Roland Dreier
     
  • No driver uses SG_SET_TRANSFORM any more in Linux, since the ide-scsi
    driver was removed in 2.6.29. The compat-ioctl cleanup series moved
    the handling for this around, which broke building without CONFIG_BLOCK.

    Just remove the code handling it for compat mode.

    Signed-off-by: Al Viro

    Arnd Bergmann
     
  • Kill debugging printk in question

    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Al Viro

    Evgeniy Polyakov
     
  • When alloc_file() and init_file() were combined, the error handling of
    mnt_clone_write() was taken into alloc_file() in a somewhat obfuscated
    way. Since we don't use the error code for anything except warning,
    we might as well warn directly without an extra variable.

    Signed-off-by: Roland Dreier
    Signed-off-by: Al Viro

    Roland Dreier
     

22 Dec, 2009

7 commits

  • Update the file patterns for the WUSB, UWB and WLP subsystems and add
    netdev@vger as the list for the WLP subsystem.

    Signed-off-by: David Vrabel

    David Vrabel
     
  • By default, the PATA pins are routed to the async address lines in which
    case, no peripheral muxing needs to be done. However, if the pins get
    routed through the GPIO PORTs pins, we need to make sure to request them
    so that the muxing is properly set up.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Bryan Wu
    Signed-off-by: Mike Frysinger
    Signed-off-by: Jeff Garzik

    Sonic Zhang
     
  • The second parameter to alignf() in allocate_resource() must
    reflect what new resource is attempted to be allocated, else
    functions like pcibios_align_resource() (at least on x86) or
    pcmcia_align() can't work correctly.

    Commit 1e5ad9679016275d422e36b12a98b0927d76f556 broke this by
    setting the "new" resource until we're about to return success.
    To keep the resource untouched when allocate_resource() fails,
    a "tmp" resource is introduced.

    Signed-off-by: Dominik Brodowski
    Acked-by: Bjorn Helgaas
    Cc: Yinghai Lu
    Cc: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Dominik Brodowski
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    pata_cmd64x: fix overclocking of UDMA0-2 modes
    Revert "pata_cmd64x: implement serialization as per notes"

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    bnx2: Fix bnx2_netif_stop() merge error.
    gianfar: Fix bit definitions of IMASK_GRSC and IMASK_GTSC
    gianfar: Fix stats support
    gianfar: Fix a filer bug
    bnx2: fixing a timout error due not refreshing TX timers correctly
    can/at91: don't check platform_get_irq's return value against zero
    mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion
    bnx2: reset_task is crashing the kernel. Fixing it.
    ipv6: fix an oops when force unload ipv6 module
    TI DaVinci EMAC: Fix MDIO bus frequency configuration
    e100: Fix broken cbs accounting due to missing memset.
    broadcom: bcm54xx_shadow_read() errors ignored in bcm54xx_adjust_rxrefclk()
    e1000e: LED settings in EEPROM ignored on 82571 and 82572
    netxen: use module parameter correctly
    netns: fix net.ipv6.route.gc_min_interval_ms in netns
    Bluetooth: Prevent ill-timed autosuspend in USB driver
    Bluetooth: Fix L2CAP locking scheme regression
    Bluetooth: Ack L2CAP I-frames before retransmit missing packet
    Bluetooth: Fix unset of RemoteBusy flag for L2CAP
    Bluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid()

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix hotplug hang
    sched: Restore printk sanity

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (24 commits)
    ALSA: sbawe: fix memory detection
    ALSA: fix incorrect rounding direction in snd_interval_ratnum()
    ALSA: HDA: add powersaving hook for Realtek
    ALSA: HDA: remove useless mixers on Aspire 8930G
    ALSA: HDA: simplify Aspire 8930G verb array
    ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410
    ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL
    ALSA: Use kzalloc for allocating only one thing
    ALSA: AACI: switch to per-pcm locking
    ALSA: AACI: add double-rate support
    ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params
    ALSA: AACI: cleanup aaci_pcm_hw_params
    ALSA: AACI: simplify codec rate information
    ALSA: aaci - Fix a typo
    ASoC: wm8974: fix a wrong bit definition
    sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer
    ALSA: hda - Fix quirk for Maxdata obook4-1
    ALSA: hda - Fix missing capsrc_nids for ALC88x
    ALSA: hda - Make use of beep device found in Dell Vostro 1015n
    ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015
    ...

    Linus Torvalds
     

21 Dec, 2009

5 commits