31 May, 2010

1 commit

  • This reverts commit 0ac0c0d0f837c499afd02a802f9cf52d3027fa3b, which
    caused cross-architecture build problems for all the wrong reasons.
    IA64 already added its own version of __node_random(), but the fact is,
    there is nothing architectural about the function, and the original
    commit was just badly done. Revert it, since no fix is forthcoming.

    Requested-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

30 May, 2010

3 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    ceph: clean up on forwarded aborted mds request
    ceph: fix leak of osd authorizer
    ceph: close out mds, osd connections before stopping auth
    ceph: make lease code DN specific
    fs/ceph: Use ERR_CAST
    ceph: renew auth tickets before they expire
    ceph: do not resend mon requests on auth ticket renewal
    ceph: removed duplicated #includes
    ceph: avoid possible null dereference
    ceph: make mds requests killable, not interruptible
    sched: add wait_for_completion_killable_timeout

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
    ALSA: snd-usb-caiaq: Bump version number to 1.3.21
    ALSA: Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ"
    ALSA: snd-usb-caiaq: Simplify single case to an 'if'
    ALSA: snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ
    ALSA: hda: Use LPIB for a Shuttle device
    ALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec
    ALSA: hda: Use LPIB for Sony VPCS11V9E
    ALSA: usb-audio: fix feature unit parser for UAC2
    ALSA: asihpi - Minor code cleanup
    ALSA: asihpi - Add support for new ASI8800 family
    ALSA: asihpi - Fix bug preventing outstream_write preload from happening
    ALSA: asihpi - Fix imbalanced lock path in hw_message
    ALSA: asihpi - Remove support for old ASI8800 family
    ALSA: asihpi - Add hd radio blend functions
    ALSA: asihpi - Remove unused io map functions
    ALSA: usb-audio: add support for UAC2 pitch control
    ALSA: usb-audio: parse UAC2 endpoint descriptors correctly
    ALSA: usb-audio: fix return values
    ALSA: usb-audio: parse more format descriptors with structs
    sound: Add missing spin_unlock
    ...

    Linus Torvalds
     
  • Add missing _killable_timeout variant for wait_for_completion that will
    return when a timeout expires or the task is killed.

    CC: Ingo Molnar
    CC: Andreas Herrmann
    CC: Thomas Gleixner
    CC: Mike Galbraith
    Acked-by: Peter Zijlstra
    Signed-off-by: Sage Weil

    Sage Weil
     

29 May, 2010

8 commits

  • * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
    intel_idle: native hardware cpuidle driver for latest Intel processors
    ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case
    acpi_pad: uses MONITOR/MWAIT, so it doesn't need to clear TS_POLLING
    sched: clarify commment for TS_POLLING
    ACPI: allow a native cpuidle driver to displace ACPI
    cpuidle: make cpuidle_curr_driver static
    cpuidle: add cpuidle_unregister_driver() error check
    cpuidle: fail to register if !CONFIG_CPU_IDLE

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (27 commits)
    ACPI: Don't let acpi_pad needlessly mark TSC unstable
    drivers/acpi/sleep.h: Checkpatch cleanup
    ACPI: Minor cleanup eliminating redundant PMTIMER_TICKS to NS conversion
    ACPI: delete unused c-state promotion/demotion data strucutures
    ACPI: video: fix acpi_backlight=video
    ACPI: EC: Use kmemdup
    drivers/acpi: use kasprintf
    ACPI, APEI, EINJ injection parameters support
    Add x64 support to debugfs
    ACPI, APEI, Use ERST for persistent storage of MCE
    ACPI, APEI, Error Record Serialization Table (ERST) support
    ACPI, APEI, Generic Hardware Error Source memory error support
    ACPI, APEI, UEFI Common Platform Error Record (CPER) header
    Unified UUID/GUID definition
    ACPI Hardware Error Device (PNP0C33) support
    ACPI, APEI, PCIE AER, use general HEST table parsing in AER firmware_first setup
    ACPI, APEI, Document for APEI
    ACPI, APEI, EINJ support
    ACPI, APEI, HEST table parsing
    ACPI, APEI, APEI supporting infrastructure
    ...

    Linus Torvalds
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
    netlink: bug fix: wrong size was calculated for vfinfo list blob
    netlink: bug fix: don't overrun skbs on vf_port dump
    xt_tee: use skb_dst_drop()
    netdev/fec: fix ifconfig eth0 down hang issue
    cnic: Fix context memory init. on 5709.
    drivers/net: Eliminate a NULL pointer dereference
    drivers/net/hamradio: Eliminate a NULL pointer dereference
    be2net: Patch removes redundant while statement in loop.
    ipv6: Add GSO support on forwarding path
    net: fix __neigh_event_send()
    vhost: fix the memory leak which will happen when memory_access_ok fails
    vhost-net: fix to check the return value of copy_to/from_user() correctly
    vhost: fix to check the return value of copy_to/from_user() correctly
    vhost: Fix host panic if ioctl called with wrong index
    net: fix lock_sock_bh/unlock_sock_bh
    net/iucv: Add missing spin_unlock
    net: ll_temac: fix checksum offload logic
    net: ll_temac: fix interrupt bug when interrupt 0 is used
    sctp: dubious bitfields in sctp_transport
    ipmr: off by one in __ipmr_fill_mroute()
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    remove detritus left by "mm: make read_cache_page synchronous"
    fix fs/sysv s_dirt handling
    fat: convert to use the new truncate convention.
    ext2: convert to use the new truncate convention.
    tmpfs: convert to use the new truncate convention
    fs: convert simple fs to new truncate
    kill spurious reference to vmtruncate
    fs: introduce new truncate sequence
    fs/super: fix kernel-doc warning
    fs/minix: bugfix, number of indirect block ptrs per block depends on block size
    rename the generic fsync implementations
    drop unused dentry argument to ->fsync
    fs: Add missing mutex_unlock
    Fix racy use of anon_inode_getfd() in perf_event.c
    get rid of the magic around f_count in aio
    VFS: fix recent breakage of FS_REVAL_DOT
    Revert "anon_inode: set S_IFREG on the anon_inode"

    Linus Torvalds
     

28 May, 2010

28 commits

  • Introduce a new truncate calling sequence into fs/mm subsystems. Rather than
    setattr > vmtruncate > truncate, have filesystems call their truncate sequence
    from ->setattr if filesystem specific operations are required. vmtruncate is
    deprecated, and truncate_pagecache and inode_newsize_ok helpers introduced
    previously should be used.

    simple_setattr is introduced for simple in-ram filesystems to implement
    the new truncate sequence. Eventually all filesystems should be converted
    to implement a setattr, and the default code in notify_change should go
    away.

    simple_setsize is also introduced to perform just the ATTR_SIZE portion
    of simple_setattr (ie. changing i_size and trimming pagecache).

    To implement the new truncate sequence:
    - filesystem specific manipulations (eg freeing blocks) must be done in
    the setattr method rather than ->truncate.
    - vmtruncate can not be used by core code to trim blocks past i_size in
    the event of write failure after allocation, so this must be performed
    in the fs code.
    - convert usage of helpers block_write_begin, nobh_write_begin,
    cont_write_begin, and *blockdev_direct_IO* to use _newtrunc postfixed
    variants. These avoid calling vmtruncate to trim blocks (see previous).
    - inode_setattr should not be used. generic_setattr is a new function
    to be used to copy simple attributes into the generic inode.
    - make use of the better opportunity to handle errors with the new sequence.

    Big problem with the previous calling sequence: the filesystem is not called
    until i_size has already changed. This means it is not allowed to fail the
    call, and also it does not know what the previous i_size was. Also, generic
    code calling vmtruncate to truncate allocated blocks in case of error had
    no good way to return a meaningful error (or, for example, atomically handle
    block deallocation).

    Cc: Christoph Hellwig
    Acked-by: Jan Kara
    Signed-off-by: Nick Piggin
    Signed-off-by: Al Viro

    npiggin@suse.de
     
  • We don't name our generic fsync implementations very well currently.
    The no-op implementation for in-memory filesystems currently is called
    simple_sync_file which doesn't make too much sense to start with,
    the the generic one for simple filesystems is called simple_fsync
    which can lead to some confusion.

    This patch renames the generic file fsync method to generic_file_fsync
    to match the other generic_file_* routines it is supposed to be used
    with, and the no-op implementation to noop_fsync to make it obvious
    what to expect. In addition add some documentation for both methods.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • __aio_put_req() plays sick games with file refcount. What
    it wants is fput() from atomic context; it's almost always
    done with f_count > 1, so they only have to deal with delayed
    work in rare cases when their reference happens to be the
    last one. Current code decrements f_count and if it hasn't
    hit 0, everything is fine. Otherwise it keeps a pointer
    to struct file (with zero f_count!) around and has delayed
    work do __fput() on it.

    Better way to do it: use atomic_long_add_unless( , -1, 1)
    instead of !atomic_long_dec_and_test(). IOW, decrement it
    only if it's not the last reference, leave refcount alone
    if it was. And use normal fput() in delayed work.

    I've made that atomic_long_add_unless call a new helper -
    fput_atomic(). Drops a reference to file if it's safe to
    do in atomic (i.e. if that's not the last one), tells if
    it had been able to do that. aio.c converted to it, __fput()
    use is gone. req->ki_file *always* contributes to refcount
    now. And __fput() became static.

    Signed-off-by: Al Viro

    Al Viro
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: implement dump_id force param
    libata: disable ATAPI AN by default
    libata-sff: make BMDMA optional
    libata-sff: kill dummy BMDMA ops from sata_qstor and pata_octeon_cf
    libata-sff: separate out BMDMA init
    libata-sff: separate out BMDMA irq handler
    libata-sff: ata_sff_irq_clear() is BMDMA specific
    sata_mv: drop unncessary EH callback resetting

    Linus Torvalds
     
  • cpuidle_register_driver() sets cpuidle_curr_driver
    cpuidle_unregister_driver() clears cpuidle_curr_driver

    We should't expose cpuidle_curr_driver to
    potential modification except via these interfaces.
    So make it static and create cpuidle_get_driver() to observe it.

    Signed-off-by: Len Brown

    Len Brown
     
  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (61 commits)
    tracing: Add __used annotation to event variable
    perf, trace: Fix !x86 build bug
    perf report: Support multiple events on the TUI
    perf annotate: Fix up usage of the build id cache
    x86/mmiotrace: Remove redundant instruction prefix checks
    perf annotate: Add TUI interface
    perf tui: Remove annotate from popup menu after failure
    perf report: Don't start the TUI if -D is used
    perf: Fix getline undeclared
    perf: Optimize perf_tp_event_match()
    perf: Remove more code from the fastpath
    perf: Optimize the !vmalloc backed buffer
    perf: Optimize perf_output_copy()
    perf: Fix wakeup storm for RO mmap()s
    perf-record: Share per-cpu buffers
    perf-record: Remove -M
    perf: Ensure that IOC_OUTPUT isn't used to create multi-writer buffers
    perf, trace: Optimize tracepoints by using per-tracepoint-per-cpu hlist to track events
    perf, trace: Optimize tracepoints by removing IRQ-disable from perf/tracepoint interaction
    perf tui: Allow disabling the TUI on a per command basis in ~/.perfconfig
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
    gta02: Use pcf50633 backlight driver instead of platform backlight driver.
    backlight: pcf50633: Register a pcf50633-backlight device in pcf50633 core driver.
    backlight: Add pcf50633 backlight driver
    backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe
    backlight: max8925_bl: Fix error handling path
    backlight: l4f00242t03: fix error handling in l4f00242t03_probe
    backlight: add S6E63M0 AMOLED LCD Panel driver
    backlight: adp8860: add support for ADP8861 & ADP8863
    backlight: mbp_nvidia_bl - Fix DMI_SYS_VENDOR for MacBook1,1
    backlight: Add Cirrus EP93xx backlight driver
    backlight: l4f00242t03: Fix regulators handling code in remove function
    backlight: fix adp8860_bl build errors
    backlight: new driver for the ADP8860 backlight parts
    backlight: 88pm860x_bl - potential memory leak
    backlight: mbp_nvidia_bl - add support for older MacBookPro and MacBook 6,1.
    backlight: Kconfig cleanup
    backlight: backlight_device_register() return ERR_PTR()

    Linus Torvalds
     
  • * 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
    leds: Add mx31moboard MC13783 led support
    leds: Add mc13783 LED support
    leds: leds-ss4200: fix led_classdev_unregister twice in error handling
    leds: leds-lp3944: properly handle lp3944_configure fail in lp3944_probe
    leds: led-class: set permissions on max_brightness file to 0444
    leds: leds-gpio: Change blink_set callback to be able to turn off blinking
    leds: Add LED driver for the Soekris net5501 board
    leds: 88pm860x - fix checking in probe function

    Linus Torvalds
     
  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (23 commits)
    hwmon: (lm75) Add support for the Texas Instruments TMP105
    hwmon: (ltc4245) Read only one GPIO pin
    hwmon: (dme1737) Add SCH5127 support
    hwmon: (tmp102) Don't always stop chip at exit
    hwmon: (tmp102) Fix suspend and resume functions
    hwmon: (tmp102) Various fixes
    hwmon: Driver for TI TMP102 temperature sensor
    hwmon: EMC1403 thermal sensor support
    hwmon: (applesmc) Add temperature sensor labels to sysfs interface
    hwmon: (applesmc) Add generic support for MacBook Pro 7
    hwmon: (applesmc) Add generic support for MacBook Pro 6
    hwmon: (applesmc) Add support for MacBook Pro 5,3 and 5,4
    hwmon: (tmp401) Reorganize code to get rid of static forward declarations
    hwmon: (tmp401) Use constants for sysfs file permissions
    hwmon: (adm1031) Allow setting update rate
    hwmon: Add description of the update_rate sysfs attribute
    hwmon: (lm90) Use programmed update rate
    hwmon: (f71882fg) Acquire I/O regions while we're working with them
    hwmon: (f71882fg) Code cleanup
    hwmon: (f71882fg) Use strict_stro(l|ul) instead of simple_strto$1
    ...

    Linus Torvalds
     
  • When the user passes the kernel parameter acpi_enforce_resources=lax,
    the ACPI resources are no longer protected, so a native driver can
    make use of them. In that case, we do not want the asus_atk0110 to be
    loaded. Unfortunately, this driver loads automatically due to its
    MODULE_DEVICE_TABLE, so the user ends up with two drivers loaded for
    the same device - this is bad.

    So I suggest that we prevent the asus_atk0110 driver from loading if
    acpi_enforce_resources=lax.

    Signed-off-by: Jean Delvare
    Acked-by: Luca Tettamanti
    Cc: Len Brown

    Jean Delvare
     
  • * 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6:
    SFI: add sysfs interface for SFI tables.
    SFI: add support for v0.81 spec

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (27 commits)
    Btrfs: add more error checking to btrfs_dirty_inode
    Btrfs: allow unaligned DIO
    Btrfs: drop verbose enospc printk
    Btrfs: Fix block generation verification race
    Btrfs: fix preallocation and nodatacow checks in O_DIRECT
    Btrfs: avoid ENOSPC errors in btrfs_dirty_inode
    Btrfs: move O_DIRECT space reservation to btrfs_direct_IO
    Btrfs: rework O_DIRECT enospc handling
    Btrfs: use async helpers for DIO write checksumming
    Btrfs: don't walk around with task->state != TASK_RUNNING
    Btrfs: do aio_write instead of write
    Btrfs: add basic DIO read/write support
    direct-io: do not merge logically non-contiguous requests
    direct-io: add a hook for the fs to provide its own submit_bio function
    fs: allow short direct-io reads to be completed via buffered IO
    Btrfs: Metadata ENOSPC handling for balance
    Btrfs: Pre-allocate space for data relocation
    Btrfs: Metadata ENOSPC handling for tree log
    Btrfs: Metadata reservation for orphan inodes
    Btrfs: Introduce global metadata reservation
    ...

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (40 commits)
    ext4: Make fsync sync new parent directories in no-journal mode
    ext4: Drop whitespace at end of lines
    ext4: Fix compat EXT4_IOC_ADD_GROUP
    ext4: Conditionally define compat ioctl numbers
    tracing: Convert more ext4 events to DEFINE_EVENT
    ext4: Add new tracepoints to track mballoc's buddy bitmap loads
    ext4: Add a missing trace hook
    ext4: restart ext4_ext_remove_space() after transaction restart
    ext4: Clear the EXT4_EOFBLOCKS_FL flag only when warranted
    ext4: Avoid crashing on NULL ptr dereference on a filesystem error
    ext4: Use bitops to read/modify i_flags in struct ext4_inode_info
    ext4: Convert calls of ext4_error() to EXT4_ERROR_INODE()
    ext4: Convert callers of ext4_get_blocks() to use ext4_map_blocks()
    ext4: Add new abstraction ext4_map_blocks() underneath ext4_get_blocks()
    ext4: Use our own write_cache_pages()
    ext4: Show journal_checksum option
    ext4: Fix for ext4_mb_collect_stats()
    ext4: check for a good block group before loading buddy pages
    ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate
    ext4: Remove extraneous newlines in ext4_msg() calls
    ...

    Fixed up trivial conflict in fs/ext4/fsync.c

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
    ieee1394: schedule for removal
    firewire: core: use separate timeout for each transaction
    firewire: core: Fix tlabel exhaustion problem
    firewire: core: make transaction label allocation more robust
    firewire: core: clean up config ROM related defined constants
    ieee1394: mark char device files as not seekable
    firewire: cdev: mark char device files as not seekable
    firewire: ohci: cleanups and fix for nonstandard build without debug facility
    firewire: ohci: wait for PHY register accesses to complete
    firewire: ohci: fix up configuration of TI chips
    firewire: ohci: enable 1394a enhancements
    firewire: ohci: do not clear PHY interrupt status inadvertently
    firewire: ohci: add a function for reading PHY registers

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: usbtouchscreen - support bigger iNexio touchscreens
    Input: ads7846 - return error on regulator_get() failure
    Input: twl4030-vibra - correct the power down sequence
    Input: enable onkey driver of max8925
    Input: use ABS_CNT rather than (ABS_MAX + 1)

    Linus Torvalds
     
  • Introduce numa_mem_id(), based on generic percpu variable infrastructure
    to track "nearest node with memory" for archs that support memoryless
    nodes.

    Define API in when CONFIG_HAVE_MEMORYLESS_NODES
    defined, else stubs. Architectures will define HAVE_MEMORYLESS_NODES
    if/when they support them.

    Archs can override definitions of:

    numa_mem_id() - returns node number of "local memory" node
    set_numa_mem() - initialize [this cpus'] per cpu variable 'numa_mem'
    cpu_to_mem() - return numa_mem for specified cpu; may be used as lvalue

    Generic initialization of 'numa_mem' occurs in __build_all_zonelists().
    This will initialize the boot cpu at boot time, and all cpus on change of
    numa_zonelist_order, or when node or memory hot-plug requires zonelist
    rebuild. Archs that support memoryless nodes will need to initialize
    'numa_mem' for secondary cpus as they're brought on-line.

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Lee Schermerhorn
    Signed-off-by: Christoph Lameter
    Cc: Tejun Heo
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Nick Piggin
    Cc: David Rientjes
    Cc: Eric Whitney
    Cc: KAMEZAWA Hiroyuki
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: "Luck, Tony"
    Cc: Pekka Enberg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lee Schermerhorn
     
  • Rework the generic version of the numa_node_id() function to use the new
    generic percpu variable infrastructure.

    Guard the new implementation with a new config option:

    CONFIG_USE_PERCPU_NUMA_NODE_ID.

    Archs which support this new implemention will default this option to 'y'
    when NUMA is configured. This config option could be removed if/when all
    archs switch over to the generic percpu implementation of numa_node_id().
    Arch support involves:

    1) converting any existing per cpu variable implementations to use
    this implementation. x86_64 is an instance of such an arch.
    2) archs that don't use a per cpu variable for numa_node_id() will
    need to initialize the new per cpu variable "numa_node" as cpus
    are brought on-line. ia64 is an example.
    3) Defining USE_PERCPU_NUMA_NODE_ID in arch dependent Kconfig--e.g.,
    when NUMA is configured. This is required because I have
    retained the old implementation by default to allow archs to
    be modified incrementally, as desired.

    Subsequent patches will convert x86_64 and ia64 to use this implemenation.

    Signed-off-by: Lee Schermerhorn
    Cc: Tejun Heo
    Cc: Mel Gorman
    Reviewed-by: Christoph Lameter
    Cc: Nick Piggin
    Cc: David Rientjes
    Cc: Eric Whitney
    Cc: KAMEZAWA Hiroyuki
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: "Luck, Tony"
    Cc: Pekka Enberg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lee Schermerhorn
     
  • This is an implementation of ->llseek useable for the rare special case
    when userspace expects the seek to succeed but the (device) file is
    actually not able to perform the seek. In this case you use noop_llseek()
    instead of falling back to the default implementation of ->llseek.

    Signed-off-by: Jan Blunck
    Cc: Frederic Weisbecker
    Cc: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    jan Blunck
     
  • There are more architectures that don't support ARCH_HAS_SG_CHAIN than
    those that support it. This removes removes ARCH_HAS_SG_CHAIN in
    asm-generic/scatterlist.h and lets arhictectures to define it.

    It's clearer than defining ARCH_HAS_SG_CHAIN asm-generic/scatterlist.h and
    undefing it in arhictectures that don't support it.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • There are only two ways to define sg_dma_len(); use sg->dma_length or
    sg->length. This patch introduces NEED_SG_DMA_LENGTH that enables
    architectures to choose sg->dma_length or sg->length.

    Signed-off-by: FUJITA Tomonori
    Cc: Arnd Bergmann
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Russell King
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • This is the first half of the attempt to use asm-generic/scatterlist.h
    on every architecture.

    There are only two ways to define scatterlist structure. So it's easy
    to convert every architecture to use asm-generic/scatterlist.h.

    This patch:

    The trick for ISA_DMA_THRESHOLD in asm-generic/scatterlist.h doesn't work
    for powerpc. This lets architectures defin ISA_DMA_THRESHOLD.

    Hopefully, we can remove ISA_DMA_THRESHOLD in the future; we can do better
    to decide if the bouncing is necessary or not.

    Signed-off-by: FUJITA Tomonori
    Cc: Arnd Bergmann
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Russell King
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • The aio compat code was not converting the struct iovecs from 32bit to
    64bit pointers, causing either EINVAL to be returned from io_getevents, or
    EFAULT as the result of the I/O. This patch passes a compat flag to
    io_submit to signal that pointer conversion is necessary for a given iocb
    array.

    A variant of this was tested by Michael Tokarev. I have also updated the
    libaio test harness to exercise this code path with good success.
    Further, I grabbed a copy of ltp and ran the
    testcases/kernel/syscall/readv and writev tests there (compiled with -m32
    on my 64bit system). All seems happy, but extra eyes on this would be
    welcome.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: fix CONFIG_COMPAT=n build]
    Signed-off-by: Jeff Moyer
    Reported-by: Michael Tokarev
    Cc: Zach Brown
    Cc: [2.6.35.1]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Moyer
     
  • It was reported in http://lkml.org/lkml/2010/3/8/309 that 32 bit readv and
    writev AIO operations were not functioning properly. It turns out that
    the code to convert the 32bit io vectors to 64 bits was never written.
    The results of that can be pretty bad, but in my testing, it mostly ended
    up in generating EFAULT as we walked off the list of I/O vectors provided.

    This patch set fixes the problem in my environment. are greatly
    appreciated.

    This patch:

    Factor out code that will be used by both compat_do_readv_writev and the
    compat aio submission code paths.

    Signed-off-by: Jeff Moyer
    Reported-by: Michael Tokarev
    Cc: Zach Brown
    Cc: [2.6.35.1]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Moyer
     
  • Since 2.6.5, it had been commented, 'for backwards compatibility,
    removed in 2.7.x'. Since 2.6.31, it have been marked as __deprecated.

    I think that we can remove the API safely now.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • sync_single_range_for_cpu and sync_single_range_for_device hooks are
    unnecessary because sync_single_for_cpu and sync_single_for_device can
    be used instead.

    Signed-off-by: FUJITA Tomonori
    Reviewed-by: Konrad Rzeszutek Wilk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • swiotlb_sync_single_range_for_cpu and swiotlb_sync_single_range_for_device
    are unnecessary because swiotlb_sync_single_for_cpu and
    swiotlb_sync_single_for_device can be used instead.

    Signed-off-by: FUJITA Tomonori
    Reviewed-by: Konrad Rzeszutek Wilk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • This patch moves the definition of struct rnd_state and the inline
    __seed() function to linux/random.h. It renames the static __random32()
    function to prandom32() and exports it for use in modules.

    prandom32() is useful as a privately-seeded pseudo random number generator
    that can give the same result every time it is initialized.

    For FCoE FC-BB-6 VN2VN mode self-selected unique FC address generation, we
    need an pseudo-random number generator seeded with the 64-bit world-wide
    port name. A truly random generator or one seeded with randomness won't
    do because the same sequence of numbers should be generated each time we
    boot or the link comes up.

    A prandom32_seed() inline function is added to the header file. It is
    inlined not for speed, but so the function won't be expanded in the base
    kernel, but only in the module that uses it.

    Signed-off-by: Joe Eykholt
    Acked-by: Matt Mackall
    Cc: Theodore Ts'o
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Eykholt