04 Aug, 2011

19 commits

  • If swap entries are to be stored along with struct page pointers in a
    radix tree, they need to be distinguished as exceptional entries.

    Most of the handling of swap entries in radix tree will be contained in
    shmem.c, but a few functions in filemap.c's common code need to check
    for their appearance: find_get_page(), find_lock_page(),
    find_get_pages() and find_get_pages_contig().

    So as not to slow their fast paths, tuck those checks inside the
    existing checks for unlikely radix_tree_deref_slot(); except for
    find_lock_page(), where it is an added test. And make it a BUG in
    find_get_pages_tag(), which is not applied to tmpfs files.

    A part of the reason for eliminating shmem_readpage() earlier, was to
    minimize the places where common code would need to allow for swap
    entries.

    The swp_entry_t known to swapfile.c must be massaged into a slightly
    different form when stored in the radix tree, just as it gets massaged
    into a pte_t when stored in page tables.

    In an i386 kernel this limits its information (type and page offset) to
    30 bits: given 32 "types" of swapfile and 4kB pagesize, that's a maximum
    swapfile size of 128GB. Which is less than the 512GB we previously
    allowed with X86_PAE (where the swap entry can occupy the entire upper
    32 bits of a pte_t), but not a new limitation on 32-bit without PAE; and
    there's not a new limitation on 64-bit (where swap filesize is already
    limited to 16TB by a 32-bit page offset). Thirty areas of 128GB is
    probably still enough swap for a 64GB 32-bit machine.

    Provide swp_to_radix_entry() and radix_to_swp_entry() conversions, and
    enforce filesize limit in read_swap_header(), just as for ptes.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • A patchset to extend tmpfs to MAX_LFS_FILESIZE by abandoning its
    peculiar swap vector, instead keeping a file's swap entries in the same
    radix tree as its struct page pointers: thus saving memory, and
    simplifying its code and locking.

    This patch:

    The radix_tree is used by several subsystems for different purposes. A
    major use is to store the struct page pointers of a file's pagecache for
    memory management. But what if mm wanted to store something other than
    page pointers there too?

    The low bit of a radix_tree entry is already used to denote an indirect
    pointer, for internal use, and the unlikely radix_tree_deref_retry()
    case.

    Define the next bit as denoting an exceptional entry, and supply inline
    functions radix_tree_exception() to return non-0 in either unlikely
    case, and radix_tree_exceptional_entry() to return non-0 in the second
    case.

    If a subsystem already uses radix_tree with that bit set, no problem: it
    does not affect internal workings at all, but is defined for the
    convenience of those storing well-aligned pointers in the radix_tree.

    The radix_tree_gang_lookups have an implicit assumption that the caller
    can deduce the offset of each entry returned e.g. by the page->index of
    a struct page. But that may not be feasible for some kinds of item to
    be stored there.

    radix_tree_gang_lookup_slot() allow for an optional indices argument,
    output array in which to return those offsets. The same could be added
    to other radix_tree_gang_lookups, but for now keep it to the only one
    for which we need it.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • i386 allmodconfig:

    drivers/built-in.o: In function `aat2870_bl_remove':
    aat2870_bl.c:(.text+0x414f9): undefined reference to `backlight_device_unregister'
    drivers/built-in.o: In function `aat2870_bl_probe':
    aat2870_bl.c:(.text+0x418fc): undefined reference to `backlight_device_register'
    aat2870_bl.c:(.text+0x41a31): undefined reference to `backlight_device_unregiste

    Cc: Jin Park
    Cc: Samuel Ortiz
    Cc: Axel Lin
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • - Current implementation tests wrong value for setting
    aat2870_bl->max_current.

    - In the current implementation, we cannot differentiate between 2 cases:

    a) if pdata->max_current is not set , or

    b) pdata->max_current is set to AAT2870_CURRENT_0_45 (which is also 0).

    Fix it by setting AAT2870_CURRENT_0_45 to be 1 and adjust the equation in
    aat2870_brightness() accordingly.

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Cc: Samuel Ortiz
    Tested-by: Jin Park
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • backlight_device_register() returns ERR_PTR() on error.

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Cc: Jin Park
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Fix:

    arch/cris/arch-v10/kernel/irq.c:239: error: implicit declaration of function 'kgdb_init'
    arch/cris/arch-v10/kernel/irq.c:240: error: implicit declaration of function 'breakpoint'

    Declare these two functions.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix:

    arch/cris/arch-v10/drivers/sync_serial.c:961: error: conflicting types for 'sync_serial_ioctl'

    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix:

    arch/cris/arch-v10/drivers/sync_serial.c:628: error: 'ret' undeclared (first use in this function)

    'ret' should be 'err'.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix this error:

    kernel/fork.c:267: error: implicit declaration of function 'alloc_thread_info_node'

    This is due to renaming alloc_thread_info() to alloc_thread_info_node().

    [akpm@linux-foundation.org: coding-style fixes]
    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix tpm_tis.c build when CONFIG_ACPI is not enabled by providing a stub
    function. Fixes many build errors/warnings:

    drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
    drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
    drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
    ...

    Signed-off-by: Randy Dunlap
    Cc: Leendert van Doorn
    Cc: James Morris
    Cc: Ingo Molnar
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • __GFP_OTHER_NODE is used for NUMA allocations on behalf of other nodes.
    It's supposed to be passed through from the page allocator to
    zone_statistics(), but it never gets there as gfp_allowed_mask is not
    wide enough and masks out the flag early in the allocation path.

    The result is an accounting glitch where successful NUMA allocations
    by-agent are not properly attributed as local.

    Increase __GFP_BITS_SHIFT so that it includes __GFP_OTHER_NODE.

    Signed-off-by: Johannes Weiner
    Acked-by: Andi Kleen
    Reviewed-by: Minchan Kim
    Acked-by: Mel Gorman
    Reviewed-by: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Update the module parameters when platform data is used. This means
    that they can be read from /sys/module/ramoops/parameters in order to
    parse the memory area.

    Signed-off-by: Sergiu Iordache
    Cc: Marco Stornelli
    Cc: Seiji Aguchi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergiu Iordache
     
  • Update kernel-parameters.txt to point users to the authoritative comment
    for name_to_dev_t. In addition, updates other places where some
    name_to_dev_t behavior was discussed. All other references to root=
    appear to be for explicit sample usage or just side comments when
    discussing other kernel parameters.

    Signed-off-by: Will Drewry
    Cc: Kay Sievers
    Cc: Randy Dunlap
    Cc: Namhyung Kim
    Cc: Trond Myklebust
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Drewry
     
  • Fix new kernel-doc warning in fs/dcache.c:

    Warning(fs/dcache.c:797): No description found for parameter 'sb'

    Signed-off-by: Randy Dunlap
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • The current hyper-optimized functions are overkill if you simply want to
    allocate an id for a device. Create versions which use an internal
    lock.

    In followup patches, numerous drivers are converted to use this
    interface.

    Thanks to Tejun for feedback.

    Signed-off-by: Rusty Russell
    Acked-by: Tejun Heo
    Acked-by: Jonathan Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • When send_cpu_listeners() finds the orphaned listener it marks it as
    !valid and drops listeners->sem. Before it takes this sem for writing,
    s->pid can be reused and add_del_listener() can wrongly try to re-use
    this entry.

    Change add_del_listener() to check ->valid = T.

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Vasiliy Kulikov
    Acked-by: Balbir Singh
    Cc: Jerome Marchand
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • 1. Commit 26c4caea9d69 "don't allow duplicate entries in listener mode"
    changed add_del_listener(REGISTER) so that "next_cpu:" can reuse the
    listener allocated for the previous cpu, this doesn't look exactly
    right even if minor.

    Change the code to kfree() in the already-registered case, this case
    is unlikely anyway so the extra kmalloc_node() shouldn't hurt but
    looke more correct and clean.

    2. use the plain list_for_each_entry() instead of _safe() to scan
    listeners->list.

    3. Remove the unneeded INIT_LIST_HEAD(&s->list), we are going to
    list_add(&s->list).

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Vasiliy Kulikov
    Cc: Balbir Singh
    Reviewed-by: Jerome Marchand
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • As the comment explains, the intention of the code is to clear the
    OMAP_RTC_CTRL_MODE_12_24 bit, but instead it only clears the
    OMAP_RTC_CTRL_SPLIT and OMAP_RTC_CTRL_AUTO_COMP bits, which should be
    kept. OMAP_RTC_CTRL_DISABLE, OMAP_RTC_CTRL_SET_32_COUNTER,
    OMAP_RTC_CTRL_TEST, and OMAP_RTC_CTRL_ROUND_30S are also better off
    being cleared.

    Signed-off-by: Daniel Glöckner
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Glöckner
     
  • init_fault_attr_dentries() is used to export fault_attr via debugfs.
    But it can only export it in debugfs root directory.

    Per Forlin is working on mmc_fail_request which adds support to inject
    data errors after a completed host transfer in MMC subsystem.

    The fault_attr for mmc_fail_request should be defined per mmc host and
    export it in debugfs directory per mmc host like
    /sys/kernel/debug/mmc0/mmc_fail_request.

    init_fault_attr_dentries() doesn't help for mmc_fail_request. So this
    introduces fault_create_debugfs_attr() which is able to create a
    directory in the arbitrary directory and replace
    init_fault_attr_dentries().

    [akpm@linux-foundation.org: extraneous semicolon, per Randy]
    Signed-off-by: Akinobu Mita
    Tested-by: Per Forlin
    Cc: Jens Axboe
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Matt Mackall
    Cc: Randy Dunlap
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

03 Aug, 2011

21 commits

  • * 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    efivars: fix warnings when CONFIG_PSTORE=n

    Linus Torvalds
     
  • * 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
    tools/power turbostat: fit output into 80 columns on snb-ep
    tools/power x86_energy_perf_policy: fix print of uninitialized string

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (28 commits)
    ACPI: delete stale reference in kernel-parameters.txt
    ACPI: add missing _OSI strings
    ACPI: remove NID_INVAL
    thermal: make THERMAL_HWMON implementation fully internal
    thermal: split hwmon lookup to a separate function
    thermal: hide CONFIG_THERMAL_HWMON
    ACPI print OSI(Linux) warning only once
    ACPI: DMI workaround for Asus A8N-SLI Premium and Asus A8N-SLI DELUX
    ACPI / Battery: propagate sysfs error in acpi_battery_add()
    ACPI / Battery: avoid acpi_battery_add() use-after-free
    ACPI: introduce "acpi_rsdp=" parameter for kdump
    ACPI: constify ops structs
    ACPI: fix CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
    ACPI: fix 80 char overflow
    ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()
    ACPI / Battery: Add the check before refresh sysfs in the battery_notify()
    ACPI / Battery: Add the hibernation process in the battery_notify()
    ACPI / Battery: Rename acpi_battery_quirks2 with acpi_battery_quirks
    ACPI / Battery: Change 16-bit signed negative battery current into correct value
    ACPI / Battery: Add the power unit macro
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile/mm/init.c: trivial: use BUG_ON
    arch/tile: remove useless set_fixmap_nocache() macro
    arch/tile: add hypervisor-based character driver for SPI flash ROM
    ioctl-number.txt: add the tile hardwall ioctl range
    tile: use generic-y format for one-line asm-generic headers
    clocksource: tile: convert to use clocksource_register_hz

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (31 commits)
    Btrfs: don't call writepages from within write_full_page
    Btrfs: Remove unused variable 'last_index' in file.c
    Btrfs: clean up for find_first_extent_bit()
    Btrfs: clean up for wait_extent_bit()
    Btrfs: clean up for insert_state()
    Btrfs: remove unused members from struct extent_state
    Btrfs: clean up code for merging extent maps
    Btrfs: clean up code for extent_map lookup
    Btrfs: clean up search_extent_mapping()
    Btrfs: remove redundant code for dir item lookup
    Btrfs: make acl functions really no-op if acl is not enabled
    Btrfs: remove remaining ref-cache code
    Btrfs: remove a BUG_ON() in btrfs_commit_transaction()
    Btrfs: use wait_event()
    Btrfs: check the nodatasum flag when writing compressed files
    Btrfs: copy string correctly in INO_LOOKUP ioctl
    Btrfs: don't print the leaf if we had an error
    btrfs: make btrfs_set_root_node void
    Btrfs: fix oops while writing data to SSD partitions
    Btrfs: Protect the readonly flag of block group
    ...

    Fix up trivial conflicts (due to acl and writeback cleanups) in
    - fs/btrfs/acl.c
    - fs/btrfs/ctree.h
    - fs/btrfs/extent_io.c

    Linus Torvalds
     
  • * 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6:
    MAINTAINERS: Add keyword match for of_match_table to device tree section
    of: constify property name parameters for helper functions
    input: xilinx_ps2: Add missing of_address.h header
    of: address: use resource_size helper

    Linus Torvalds
     
  • * 'spi/next' of git://git.secretlab.ca/git/linux-2.6:
    spi/pl022: remove function cannot exit

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (34 commits)
    dm table: set flush capability based on underlying devices
    dm crypt: optionally support discard requests
    dm raid: add md raid1 support
    dm raid: support metadata devices
    dm raid: add write_mostly parameter
    dm raid: add region_size parameter
    dm raid: improve table parameters documentation
    dm ioctl: forbid multiple device specifiers
    dm ioctl: introduce __get_dev_cell
    dm ioctl: fill in device parameters in more ioctls
    dm flakey: add corrupt_bio_byte feature
    dm flakey: add drop_writes
    dm flakey: support feature args
    dm flakey: use dm_target_offset and support discards
    dm table: share target argument parsing functions
    dm snapshot: skip reading origin when overwriting complete chunk
    dm: ignore merge_bvec for snapshots when safe
    dm table: clean dm_get_device and move exports
    dm raid: tidy includes
    dm ioctl: prevent empty message
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog:
    watchdog: Cleanup WATCHDOG_CORE help text
    watchdog: Fix POST failure on ASUS P5N32-E SLI and similar boards
    watchdog: shwdt: fix usage of mod_timer

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: asihpi - Clarify adapter index validity check
    ALSA: asihpi - Don't leak firmware if mem alloc fails
    ALSA: rtctimer.c needs module.h
    ASoC: Fix txx9aclc.c build
    ALSA: hdspm - Add firmware revision 0xcc for RME MADI
    ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIface
    ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIface
    ALSA: sound/core/pcm_compat.c: adjust array index

    Linus Torvalds
     
  • Reduce columns for package number to 1.
    If you can afford more than 9 packages,
    you can also afford a terminal with more than 80 columns:-)

    Also shave a column also off the package C-states

    Signed-off-by: Len Brown

    Len Brown
     
  • drivers/firmware/efivars.c:161: warning: ‘utf16_strlen’ defined but not used
    utf16_strlen() is only used inside CONFIG_PSTORE - make this "static inline"
    to shut the compiler up [thanks to hpa for the suggestion].

    drivers/firmware/efivars.c:602: warning: initialization from incompatible pointer type
    Between v1 and v2 of this patch series we decided to make the "part" number
    unsigned - but missed fixing the stub version of efi_pstore_write()

    Acked-by: Matthew Garrett
    Acked-by: Mike Waychison
    Signed-off-by: Tony Luck

    Tony Luck
     
  • …pm', 'kexec-param' and 'misc' into release

    Conflicts:
    Documentation/kernel-parameters.txt

    Signed-off-by: Len Brown <len.brown@intel.com>

    Len Brown
     
  • Says for acpi=
    See also Documentation/power/pm.txt, pci=noacpi

    but this file does not exist

    Reported-by: Alan Cox
    Signed-off-by: Len Brown

    Len Brown
     
  • Use BUG_ON(x) rather than if(x) BUG();

    The semantic patch that fixes this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@ identifier x; @@
    -if (x) BUG();
    +BUG_ON(x);

    @@ identifier x; @@
    -if (!x) BUG();
    +BUG_ON(!x);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Chris Metcalf

    Julia Lawall
     
  • Chris Metcalf
     
  • Linux supports some optional features, but it should notify the BIOS about
    them via the _OSI method. Currently Linux doesn't notify any, which might
    make such features not work because the BIOS doesn't know about them.

    Jarosz has a system which needs this to make ACPI processor aggregator
    device work.

    Reported-by: "Jarosz, Sebastian"
    Signed-off-by: Shaohua Li
    Acked-by: Matthew Garrett
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Shaohua Li
     
  • b552a8c56db8 ("ACPI: remove NID_INVAL") removed the left over uses of
    NID_INVAL, but didn't actually remove the definition. Remove it.

    Signed-off-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    David Rientjes
     
  • THERMAL_HWMON is implemented inside the thermal_sys driver and has no
    effect on drivers implementing thermal zones, so they shouldn't see
    anything related to it in . Making the THERMAL_HWMON
    implementation fully internal has two advantages beyond the cleaner
    design:

    * This avoids rebuilding all thermal drivers if the THERMAL_HWMON
    implementation changes, or if CONFIG_THERMAL_HWMON gets enabled or
    disabled.

    * This avoids breaking the thermal kABI in these cases too, which should
    make distributions happy.

    The only drawback I can see is slightly higher memory fragmentation, as
    the number of kzalloc() calls will increase by one per thermal zone. But
    I doubt it will be a problem in practice, as I've never seen a system with
    more than two thermal zones.

    Signed-off-by: Jean Delvare
    Cc: Rene Herman
    Acked-by: Guenter Roeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Jean Delvare
     
  • We'll soon need to reuse it.

    Signed-off-by: Jean Delvare
    Cc: Rene Herman
    Acked-by: Guenter Roeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Jean Delvare
     
  • It's about time to revert 16d752397301b9 ("thermal: Create
    CONFIG_THERMAL_HWMON=n"). Anybody running a kernel >= 2.6.40 would also
    be running a recent enough version of lm-sensors.

    Actually having CONFIG_THERMAL_HWMON is pretty convenient so instead of
    dropping it, we keep it but hide it.

    Signed-off-by: Jean Delvare
    Cc: Rene Herman
    Acked-by: Guenter Roeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Jean Delvare