26 Jul, 2011

40 commits

  • There have been persistent lockdep RCU splats, indicating that submitters
    are not testing with CONFIG_PROVE_RCU. Add this config option to the list
    in Documentation/SubmitChecklist. Also add CONFIG_DEBUG_OBJECTS_RCU_HEAD
    for good measure.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • Use hweight_long() to count free bits in the bitmap.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Using __test_and_{set,clear}_bit_le() with ignoring its return value can
    be replaced with __{set,clear}_bit_le().

    This introduces reiserfs_{set,clear}_le_bit for __{set,clear}_bit_le and
    does the above change with them.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • When parsing PnP ACPI resource structures, it may happen that some of
    the resources are disabled (in which case "the size" of the resource
    equals zero).

    The current solution is to skip these resources completely - with the
    unfortunate side effect that they are not registered despite the fact
    that they exist, after all. (The downside of this approach is that
    these resources cannot be used as templates for setting the actual
    device's resources because they are missing from the template.) The
    kernel's APM implementation does not suffer from this problem and
    registers all resources regardless of "their size".

    This patch fixes a problem with (at least) the vintage IBM ThinkPad 600E
    (and most likely also with the 600, 600X, and 770X which have a very
    similar layout) where some of its PnP devices support options where
    either an IRQ, a DMA, or an IO port is disabled. Without this patch,
    the devices can not be configured using the
    "/sys/bus/pnp/devices/*/resources" interface.

    The manipulation of these resources is important because the 600E has
    very demanding requirements. For instance, the number of IRQs is not
    sufficient to support all devices of the 600E. Fortunately, some of the
    devices, like the sound card's MPU-401 UART, can be configured to not
    use any IRQ, hence freeing an IRQ for a device that requires one.
    (Still, the device's "ResourceTemplate" requires an IRQ resource
    descriptor which cannot be created if the resource has not been
    registered in the first place.)

    As an example, the dependent sets of the 600E's CSC0103 device (the
    MPU-401 UART) are listed, with the patch applied, as:

    Dependent: 00 - Priority preferred
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    irq High-Edge
    Dependent: 01 - Priority acceptable
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    irq 5,7,2/9,10,11,15 High-Edge

    (The same result is obtained when PNPBIOS is used instead of PnP ACPI.)
    Without the patch, the IRQ resource in the preferred option is not
    listed at all:

    Dependent: 00 - Priority preferred
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    Dependent: 01 - Priority acceptable
    port 0x300-0x330, align 0xf, size 0x4, 16-bit address decoding
    irq 5,7,2/9,10,11,15 High-Edge

    And in fact, the 600E's DSDT lists the disabled IRQ as an option, as can
    be seen from the following excerpt from the DSDT:

    Name (_PRS, ResourceTemplate ()
    {
    StartDependentFn (0x00, 0x00)
    {
    IO (Decode16, 0x0300, 0x0330, 0x10, 0x04)
    IRQNoFlags () {}
    }
    StartDependentFn (0x01, 0x00)
    {
    IO (Decode16, 0x0300, 0x0330, 0x10, 0x04)
    IRQNoFlags () {5,7,9,10,11,15}
    }
    EndDependentFn ()
    })

    With this patch applied, a user space program - or maybe even the kernel
    - can allocate all devices' resources optimally. For the 600E, this
    means to find optimal resources for (at least) the serial port, the
    parallel port, the infrared port, the MWAVE modem, the sound card, and
    the MPU-401 UART.

    The patch applies the idea to register disabled resources to all types
    of resources, not just to IRQs, DMAs, and IO ports. At the same time,
    it mimics the behavior of the "pnp_assign_xxx" functions from
    "drivers/pnp/manager.c" where resources with "no size" are considered
    disabled.

    No regressions were observed on hardware that does not require this
    patch.

    The patch is applied against 2.6.39.

    NB: The kernel's current PnP interface does not allow for disabling individual
    resources using the "/sys/bus/pnp/devices/$device/resources" file. Assuming
    this could be done, a device could be configured to use a disabled resource
    using a simple series of calls:

    echo disable > /sys/bus/pnp/devices/$device/resources
    echo clear > /sys/bus/pnp/devices/$device/resources
    echo set irq disabled > /sys/bus/pnp/devices/$device/resources
    echo fill > /sys/bus/pnp/devices/$device/resources
    echo activate > /sys/bus/pnp/devices/$device/resources

    This patch addresses only the parsing of PnP ACPI devices.

    ChangeLog (v1 -> v2):
    - extend patch description
    - fix typo in patch itself

    Signed-off-by: Witold Szczeponik
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Cc: Bjorn Helgaas
    Cc: Henrique de Moraes Holschuh
    Cc: Matthew Garrett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Witold Szczeponik
     
  • Using __SPIN_LOCK_UNLOCKED for a dynamically allocated lock is wrong and
    breaks the build with PREEMPT_RT_FULL.

    Signed-off-by: Uwe Kleine-König
    Cc: Andrew Chew
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • We forget to save the return value of the call to
    twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG); in 'ret', making the
    test of 'ret < 0' dead code since 'ret' then couldn't possibly have
    changed since the last test just a few lines above. It also makes us not
    detect failures from that specific twl_rtc_write_u8() call.

    Signed-off-by: Jesper Juhl
    Cc: Alessandro Zummo
    Cc: Alexandre Rusev
    Cc: "George G. Davis"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Add support for PMIC8xxx based RTC. PMIC8xxx is Qualcomm's power
    management IC that internally houses an RTC module. This driver
    communicates with the PMIC module over SSBI bus.

    [akpm@linux-foundation.org: cosmetic tweaks]
    Acked-by: Wan ZongShun
    Reviewed-by: Stephen Boyd
    Signed-off-by: Anirudh Ghayal
    Signed-off-by: Ashay Jaiswal
    Cc: Samuel Ortiz
    Cc: Wan ZongShun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anirudh Ghayal
     
  • Add support for clock gating. Power consumption can be reduced by setting
    rtc_clk disabled state except for when RTC related registers are accessed.

    Signed-off-by: Donggeun Kim
    Signed-off-by: MyungJoo Ham
    Signed-off-by: KyungMin Park
    Cc: Alessandro Zummo
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Donggeun Kim
     
  • MPC5200B contains a limited version of RTC from MPC5121. Add support for
    the RTC on that CPU.

    Signed-off-by: Dmitry Eremin-Solenikov
    Cc: Alessandro Zummo
    Cc: Anatolij Gustschin
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Eremin-Solenikov
     
  • For each CPU, do the calibration delay only once. For subsequent calls,
    use the cached per-CPU value of loops_per_jiffy.

    This saves about 200ms of resume time on dual core Intel Atom N5xx based
    systems. This helps bring down the kernel resume time on such systems
    from about 500ms to about 300ms.

    [akpm@linux-foundation.org: make cpu_loops_per_jiffy static]
    [akpm@linux-foundation.org: clean up message text]
    [akpm@linux-foundation.org: fix things up after upstream rmk changes]
    Signed-off-by: Sameer Nanda
    Cc: Phil Carmody
    Cc: Andrew Worsley
    Cc: David Daney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sameer Nanda
     
  • Both displays on digsy_mtc board obtain their configuration from microwire
    EEPROMs which are connected to the SoC over GPIO lines. We need an easy
    way to access the EEPROMs to write the needed display configuration or to
    read out the currently programmed configuration. The generic
    eeprom_93xx46 SPI driver added by previous patch allows EEPROM access over
    sysfs. Using the simple driver added by this patch we provide used GPIO
    interface and access control description on the board for generic
    eeprom_93xx46 driver and spi_gpio driver.

    Signed-off-by: Anatolij Gustschin
    Cc: Jonathan Cameron
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anatolij Gustschin
     
  • Add EEPROM driver for 93xx46 chips. It can also be used with spi_gpio
    driver to access 93xx46 EEPROMs connected over GPIO lines. This driver
    supports read/write/erase access to the EEPROM chips over sysfs files.

    [rdunlap@xenotime.net: fix printk format]
    Signed-off-by: Anatolij Gustschin
    Cc: Jonathan Cameron
    Cc: Grant Likely
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anatolij Gustschin
     
  • Previous behavior allowed only alphabetic prefixes like pr_info to exceed
    the 80 column line length limit.

    ath6kl wants to add a digit into the prefix, so allow numbers as well as
    digits in the _ printks.

    __ratelimited and __once and WARN_RATELIMIT
    and WARN_ONCE may now exceed 80 cols.

    Add missing _printk type for completeness.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Cc: Kalle Valo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Some patches are sent in using ISO-8859 or even Windows codepage 1252.

    Make checkpatch accept these by default and only emit the "Invalid UTF-8"
    message when using --strict.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Some users would like the ability to not emit some of the messages that
    checkpatch produces. This can make it easier to use checkpatch in other
    projects and integrate into scm hook scripts.

    Add command line option to "--ignore" various message types. Add option
    --show-types to emit the "type" of each message. Categorize all ERROR,
    WARN and CHK messages with types.

    Add optional .checkpatch.conf file to store default options.
    3 paths are searched for .checkpatch.conf
    . customized per-tree configurations
    $HOME user global configuration when per-tree configs don't exist
    ./scripts lk defaults to override script
    The .conf file can contain any valid command-line argument and
    the contents are prepended to any additional command line arguments.
    Multiple lines may be used, blank lines are ignored, # is a comment.

    Update "false positive" output for readability.

    Update version to 0.32

    Signed-off-by: Joe Perches
    Acked-by: Mike Frysinger
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Prefer the use of __aligned(size) over __attribute__((__aligned___(size)))

    Link: http://lkml.kernel.org/r/20110609094526.1571774c.akpm@linux-foundation.org

    Suggested-by: Andrew Morton
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Signatures have many forms and can sometimes cause problems if not in the
    correct format when using git send-email or quilt.

    Try to verify the signature tags and email addresses to use the generally
    accepted "Signed-off-by: Full Name " form.

    Original idea by Anish Kumar

    Signed-off-by: Joe Perches
    Cc: Anish Kumar
    Cc: Nick Bowler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Fix "need consistent spacing around '*'" error after a __rcu sparse
    annotation which was caused by the missing __rcu entry in the
    checkpatch.pl internal list of sparse keywords.

    Signed-off-by: Sven Eckelmann
    Cc: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sven Eckelmann
     
  • A common issue with min() or max() is using a cast on one or both of the
    arguments when using min_t/max_t could be better.

    Add cast detection to uses of min/max and suggest an appropriate use of
    min_t or max_t instead.

    Caveat: This only works for min() or max() on a single line.
    It does not find min() or max() split across multiple lines.

    This does find:
    min((u32)foo, bar);
    But it does not find:
    max((unsigned long)foo,
    bar);

    Suggested-by: Andrew Morton
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Fix module tainting message:

    sigma: module license 'unspecified' taints kernel.

    Signed-off-by: Randy Dunlap
    Acked-by: Mike Frysinger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This function is required by *printf and kstrto* functions that are
    located in the different modules. This patch makes _tolower() public.
    However, it's good idea to not use the helper outside of mentioned
    functions.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Andy Shevchenko
    Acked-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • The symbol 'lcm' is exported to the kernel (EXPORT_SYMBOL_GPL).
    Pick up it's definition in to quiet the sparse noise:

    warning: symbol 'lcm' was not declared. Should it be static?

    Signed-off-by: H Hartley Sweeten
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H Hartley Sweeten
     
  • From: Shreshtha Kumar Sahu

    platform data for simple backlight driver for LM3530
    in the u5500 platform

    Signed-off-by: Shreshtha Kumar Sahu
    Signed-off-by: Linus Walleij
    Cc: Richard Purdie
    Cc: Lee Jones
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • Provide the support for auto calibration of ALS Zone boundaries based on
    min/max ALS input voltage.

    Signed-off-by: Shreshtha Kumar Sahu
    Signed-off-by: Linus Walleij
    Cc: Richard Purdie
    Cc: Lee Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shreshtha Kumar Sahu
     
  • We call led_classdev_register/led_classdev_unregister in
    create_netxbig_led/delete_netxbig_led, thus make LEDS_NETXBIG depend on
    LEDS_CLASS.

    This patch fixes below build error if LEDS_CLASS is not configured.

    LD .tmp_vmlinux1
    drivers/built-in.o: In function `create_netxbig_led':
    drivers/leds/leds-netxbig.c:350: undefined reference to `led_classdev_register'
    drivers/leds/leds-netxbig.c:361: undefined reference to `led_classdev_unregister'
    drivers/built-in.o: In function `delete_netxbig_led':
    drivers/leds/leds-netxbig.c:313: undefined reference to `led_classdev_unregister'

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Acked-by: Simon Guinot
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • - return -ENOMEM if kzalloc fails, rather than the current -EINVAL

    - fix a memory leak in the case of goto out_unregister_led_cdevs

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Tag the and remove() function as __devexit respectively.

    Signed-off-by: Linus Walleij
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • clockchips.h was typoed as clockevents.h

    Signed-off-by: Joe Perches
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Entries that used formats other than "Proper Name "
    were not parsed properly.

    Try to improve the parsing so that the entries in the forms of:
    Proper Name
    and
    Proper Name Commit Name
    are transformed correctly.

    Signed-off-by: Joe Perches
    Reviewed-by: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • If CONFIG_IKCONFIG=m but CONFIG_IKCONFIG_PROC=n we get a module that has
    no MODULE_LICENSE definition. Move the MODULE_*() definitions outside the
    CONFIG_IKCONFIG_PROC #ifdef to prevent this configuration from tainting
    the kernel.

    Signed-off-by: Stephen Boyd
    Acked-by: Randy Dunlap
    Acked-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • It is not necessary to share the same notifier.h.

    Signed-off-by: WANG Cong
    Cc: David Miller
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     
  • It is not necessary to share the same notifier.h.

    Signed-off-by: WANG Cong
    Cc: David Miller
    Acked-by: "Rafael J. Wysocki"
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     
  • It is not necessary to share the same notifier.h.

    This patch already moves register_reboot_notifier() and
    unregister_reboot_notifier() from kernel/notifier.c to kernel/sys.c.

    [amwang@redhat.com: make allyesconfig succeed on ppc64]
    Signed-off-by: WANG Cong
    Cc: David Miller
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Signed-off-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     
  • It is not necessary to share the same notifier.h.

    Signed-off-by: WANG Cong
    Acked-by: David Miller
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     
  • We presently define all kinds of notifiers in notifier.h. This is not
    necessary at all, since different subsystems use different notifiers, they
    are almost non-related with each other.

    This can also save much build time. Suppose I add a new netdevice event,
    really I don't have to recompile all the source, just network related.
    Without this patch, all the source will be recompiled.

    I move the notify events near to their subsystem notifier registers, so
    that they can be found more easily.

    This patch:

    It is not necessary to share the same notifier.h.

    Signed-off-by: WANG Cong
    Cc: David Miller
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     
  • The FSA9480 is a USB port accessory detector and switch. This patch adds
    support the FSA9480 USB Switch.

    [akpm@linux-foundation.org: make a couple of things static]
    Signed-off-by: Donggeun Kim
    Signed-off-by: Minkyu Kang
    Signed-off-by: Kyungmin Park
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Donggeun Kim
     
  • As stated in drivers/mfd/cs5535-mfd.c, the mfd driver exposes the BARs
    which then make the GPIO, MFGPT, ACPI, etc. all visible to the system.

    So the dependencies of the MFGPT stuff have changed, and most people
    expect Kconfig to bring in the necessary dependencies. Without them, the
    module fails to load and most people don't understand why because the
    details of the rewrite aren't captured anywhere most people who know to
    look.

    This dependency needs to be reflected in Kconfig.

    Signed-off-by: Philip A. Prindeville
    Acked-by: Alexandros C. Couloumbis
    Acked-by: Andres Salomon
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philip A. Prindeville
     
  • Fixes

    WARNING: vmlinux.o(.data+0x15d3ac): Section mismatch in reference from the variable pci_eisa_driver to the function .init.text:pci_eisa_init()
    The variable pci_eisa_driver references the function __init pci_eisa_init()
    If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    Signed-off-by: Arnaud Lacombe
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaud Lacombe
     
  • Unexpose to userland the following macros
    - __FUNCTION__
    - NUMA_BUILD
    - COMPACTION_BUILD
    - REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD

    Signed-off-by: Arnaud Lacombe
    Cc: Rusty Russell
    Cc: KOSAKI Motohiro
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Cc: Steven Rostedt
    Acked-by: WANG Cong
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaud Lacombe
     
  • Fix the warning:

    usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel

    As Michal noted, BUILD_BUG_ON stuffs should be moved
    under #ifdef __KERNEL__.

    Signed-off-by: WANG Cong
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong