1. 04 7月, 2012 1 次提交
  2. 31 5月, 2012 1 次提交
    • L
      Merge branch 'for-3.5/drivers' of git://git.kernel.dk/linux-block · a70f35af
      Linus Torvalds 提交于
      Pull block driver updates from Jens Axboe:
       "Here are the driver related changes for 3.5.  It contains:
      
         - The floppy changes from Jiri.  Jiri is now also marked as the
           maintainer of floppy.c, I shall be publically branding his forehead
           with red hot iron at the next opportune moment.
      
         - A batch of drbd updates and fixes from the linbit crew, as well as
           fixes from others.
      
         - Two small fixes for xen-blkfront courtesy of Jan."
      
      * 'for-3.5/drivers' of git://git.kernel.dk/linux-block: (70 commits)
        floppy: take over maintainership
        floppy: remove floppy-specific O_EXCL handling
        floppy: convert to delayed work and single-thread wq
        xen-blkfront: module exit handling adjustments
        xen-blkfront: properly name all devices
        drbd: grammar fix in log message
        drbd: check MODULE for THIS_MODULE
        drbd: Restore the request restart logic
        drbd: introduce a bio_set to allocate housekeeping bios from
        drbd: remove unused define
        drbd: bm_page_async_io: properly initialize page->private
        drbd: use the newly introduced page pool for bitmap IO
        drbd: add page pool to be used for meta data IO
        drbd: allow bitmap to change during writeout from resync_finished
        drbd: fix race between drbdadm invalidate/verify and finishing resync
        drbd: fix resend/resubmit of frozen IO
        drbd: Ensure that data_size is not 0 before using data_size-1 as index
        drbd: Delay/reject other state changes while establishing a connection
        drbd: move put_ldev from __req_mod() to the endio callback
        drbd: fix WRITE_ACKED_BY_PEER_AND_SIS to not set RQ_NET_DONE
        ...
      a70f35af
  3. 30 5月, 2012 38 次提交
    • L
      Merge branch 'for-3.5/core' of git://git.kernel.dk/linux-block · 0d167518
      Linus Torvalds 提交于
      Merge block/IO core bits from Jens Axboe:
       "This is a bit bigger on the core side than usual, but that is purely
        because we decided to hold off on parts of Tejun's submission on 3.4
        to give it a bit more time to simmer.  As a consequence, it's seen a
        long cycle in for-next.
      
        It contains:
      
         - Bug fix from Dan, wrong locking type.
         - Relax splice gifting restriction from Eric.
         - A ton of updates from Tejun, primarily for blkcg.  This improves
           the code a lot, making the API nicer and cleaner, and also includes
           fixes for how we handle and tie policies and re-activate on
           switches.  The changes also include generic bug fixes.
         - A simple fix from Vivek, along with a fix for doing proper delayed
           allocation of the blkcg stats."
      
      Fix up annoying conflict just due to different merge resolution in
      Documentation/feature-removal-schedule.txt
      
      * 'for-3.5/core' of git://git.kernel.dk/linux-block: (92 commits)
        blkcg: tg_stats_alloc_lock is an irq lock
        vmsplice: relax alignement requirements for SPLICE_F_GIFT
        blkcg: use radix tree to index blkgs from blkcg
        blkcg: fix blkcg->css ref leak in __blkg_lookup_create()
        block: fix elvpriv allocation failure handling
        block: collapse blk_alloc_request() into get_request()
        blkcg: collapse blkcg_policy_ops into blkcg_policy
        blkcg: embed struct blkg_policy_data in policy specific data
        blkcg: mass rename of blkcg API
        blkcg: style cleanups for blk-cgroup.h
        blkcg: remove blkio_group->path[]
        blkcg: blkg_rwstat_read() was missing inline
        blkcg: shoot down blkgs if all policies are deactivated
        blkcg: drop stuff unused after per-queue policy activation update
        blkcg: implement per-queue policy activation
        blkcg: add request_queue->root_blkg
        blkcg: make request_queue bypassing on allocation
        blkcg: make sure blkg_lookup() returns %NULL if @q is bypassing
        blkcg: make blkg_conf_prep() take @pol and return with queue lock held
        blkcg: remove static policy ID enums
        ...
      0d167518
    • L
      Merge tag 'iommu-updates-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 2f83766d
      Linus Torvalds 提交于
      Pull IOMMU updates from Joerg Roedel:
       "Not much stuff this time.  The only change to the IOMMU core code is
        the addition of a handle to the fault handling code.  A few updates to
        the AMD IOMMU driver to work around new errata.  The other patches are
        mostly fixes and enhancements to the existing ARM IOMMU drivers and
        documentation updates.
      
        A new IOMMU driver for the Exynos platform was also underway but got
        merged via the Samsung tree and is not part of this tree."
      
      * tag 'iommu-updates-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        Documentation: kernel-parameters.txt Add amd_iommu_dump
        iommu/core: pass a user-provided token to fault handlers
        iommu/tegra: gart: Fix register offset correctly
        iommu: OMAP: device detach on domain destroy
        iommu: tegra/gart: Add device tree support
        iommu: tegra/gart: use correct gart_device
        iommu/tegra: smmu: Print device name correctly
        iommu/amd: Add workaround for event log erratum
        iommu/amd: Check for the right TLP prefix bit
        dma-debug: release free_entries_lock before saving stack trace
      2f83766d
    • D
      mm: fix vma_resv_map() NULL pointer · 4523e145
      Dave Hansen 提交于
      hugetlb_reserve_pages() can be used for either normal file-backed
      hugetlbfs mappings, or MAP_HUGETLB.  In the MAP_HUGETLB, semi-anonymous
      mode, there is not a VMA around.  The new call to resv_map_put() assumed
      that there was, and resulted in a NULL pointer dereference:
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
        IP: vma_resv_map+0x9/0x30
        PGD 141453067 PUD 1421e1067 PMD 0
        Oops: 0000 [#1] PREEMPT SMP
        ...
        Pid: 14006, comm: trinity-child6 Not tainted 3.4.0+ #36
        RIP: vma_resv_map+0x9/0x30
        ...
        Process trinity-child6 (pid: 14006, threadinfo ffff8801414e0000, task ffff8801414f26b0)
        Call Trace:
          resv_map_put+0xe/0x40
          hugetlb_reserve_pages+0xa6/0x1d0
          hugetlb_file_setup+0x102/0x2c0
          newseg+0x115/0x360
          ipcget+0x1ce/0x310
          sys_shmget+0x5a/0x60
          system_call_fastpath+0x16/0x1b
      
      This was reported by Dave Jones, but was reproducible with the
      libhugetlbfs test cases, so shame on me for not running them in the
      first place.
      
      With this, the oops is gone, and the output of libhugetlbfs's
      run_tests.py is identical to plain 3.4 again.
      
      [ Marked for stable, since this was introduced by commit c50ac050
        ("hugetlb: fix resv_map leak in error path") which was also marked for
        stable ]
      Reported-by: NDave Jones <davej@redhat.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: <stable@vger.kernel.org>        [2.6.32+]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4523e145
    • J
    • S
      Documentation: kernel-parameters.txt Add amd_iommu_dump · c099cf17
      Shuah Khan 提交于
      Add amd_iommu_dump to kernel-parameters.txt
      Signed-off-by: NShuah Khan <shuahkhan@gmail.com>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      c099cf17
    • L
      Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 731a7378
      Linus Torvalds 提交于
      Pull x86 trampoline rework from H. Peter Anvin:
       "This code reworks all the "trampoline"/"realmode" code (various bits
        that need to live in the first megabyte of memory, most but not all of
        which runs in real mode at some point) in the kernel into a single
        object.  The main reason for doing this is that it eliminates the last
        place in the kernel where we needed pages to be mapped RWX.  This code
        separates all that code into proper R/RW/RX pages."
      
      Fix up conflicts in arch/x86/kernel/Makefile (mca removed next to reboot
      code), and arch/x86/kernel/reboot.c (reboot code moved around in one
      branch, modified in this one), and arch/x86/tools/relocs.c (mostly same
      code came in earlier due to working around the ld bugs just before the
      3.4 release).
      
      Also remove stale x86-relocs entry from scripts/.gitignore as per Peter
      Anvin.
      
      * commit '61f54461': (36 commits)
        x86, realmode: Move end signature into header.S
        x86, relocs: When printing an error, say relative or absolute
        x86, relocs: More relocations which may end up as absolute
        x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
        xen-acpi-processor: Add missing #include <xen/xen.h>
        acpi, bgrd: Add missing <linux/io.h> to drivers/acpi/bgrt.c
        x86, realmode: Change EFER to a single u64 field
        x86, realmode: Move kernel/realmode.c to realmode/init.c
        x86, realmode: Move not-common bits out of trampoline_common.S
        x86, realmode: Mask out EFER.LMA when saving trampoline EFER
        x86, realmode: Fix no cache bits test in reboot_32.S
        x86, realmode: Make sure all generated files are listed in targets
        x86, realmode: build fix: remove duplicate build
        x86, realmode: read cr4 and EFER from kernel for 64-bit trampoline
        x86, realmode: fixes compilation issue in tboot.c
        x86, realmode: move relocs from scripts/ to arch/x86/tools
        x86, realmode: header for trampoline code
        x86, realmode: flattened rm hierachy
        x86, realmode: don't copy real_mode_header
        x86, realmode: fix 64-bit wakeup sequence
        ...
      731a7378
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac · 87a5af24
      Linus Torvalds 提交于
      Pull EDAC internal API changes from Mauro Carvalho Chehab:
       "This changeset is the first part of a series of patches that fixes the
        EDAC sybsystem.  On this set, it changes the Kernel EDAC API in order
        to properly represent the Intel i3/i5/i7, Xeon 3xxx/5xxx/7xxx, and
        Intel E5-xxxx memory controllers.
      
        The EDAC core used to assume that:
      
             - the DRAM chip select pin is directly accessed by the memory
               controller
      
             - when multiple channels are used, they're all filled with the
               same type of memory.
      
        None of the above premises is true on Intel memory controllers since
        2002, when RAMBUS and FB-DIMMs were introduced, and Advanced Memory
        Buffer or by some similar technologies hides the direct access to the
        DRAM pins.
      
        So, the existing drivers for those chipsets had to lie to the EDAC
        core, in general telling that just one channel is filled.  That
        produces some hard to understand error messages like:
      
             EDAC MC0: CE row 3, channel 0, label "DIMM1": 1 Unknown error(s): memory read error on FATAL area : cpu=0 Err=0008:00c2 (ch=2), addr = 0xad1f73480 => socket=0, Channel=0(mask=2), rank=1
      
        The location information there (row3 channel 0) is completely bogus:
        it has no physical meaning, and are just some random values that the
        driver uses to talk with the EDAC core.  The error actually happened
        at CPU socket 0, channel 0, slot 1, but this is not reported anywhere,
        as the EDAC core doesn't know anything about the memory layout.  So,
        only advanced users that know how the EDAC driver works and that tests
        their systems to see how DIMMs are mapped can actually benefit for
        such error logs.
      
        This patch series fixes the error report logic, in order to allow the
        EDAC to expose the memory architecture used by them to the EDAC core.
        So, as the EDAC core now understands how the memory is organized, it
        can provide an useful report:
      
             EDAC MC0: CE memory read error on DIMM1 (channel:0 slot:1 page:0x364b1b offset:0x600 grain:32 syndrome:0x0 - count:1 area:DRAM err_code:0001:0090 socket:0 channel_mask:1 rank:4)
      
        The location of the DIMM where the error happened is reported by "MC0"
        (cpu socket #0), at "channel:0 slot:1" location, and matches the
        physical location of the DIMM.
      
        There are two remaining issues not covered by this patch series:
      
             - The EDAC sysfs API will still report bogus values.  So,
               userspace tools like edac-utils will still use the bogus data;
      
             - Add a new tracepoint-based way to get the binary information
               about the errors.
      
        Those are on a second series of patches (also at -next), but will
        probably miss the train for 3.5, due to the slow review process."
      
      Fix up trivial conflict (due to spelling correction of removed code) in
      drivers/edac/edac_device.c
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (42 commits)
        i7core: fix ranks information at the per-channel struct
        i5000: Fix the fatal error handling
        i5100_edac: Fix a warning when compiled with 32 bits
        i82975x_edac: Test nr_pages earlier to save a few CPU cycles
        e752x_edac: provide more info about how DIMMS/ranks are mapped
        i5000_edac: Fix the logic that retrieves memory information
        i5400_edac: improve debug messages to better represent the filled memory
        edac: Cleanup the logs for i7core and sb edac drivers
        edac: Initialize the dimm label with the known information
        edac: Remove the legacy EDAC ABI
        x38_edac: convert driver to use the new edac ABI
        tile_edac: convert driver to use the new edac ABI
        sb_edac: convert driver to use the new edac ABI
        r82600_edac: convert driver to use the new edac ABI
        ppc4xx_edac: convert driver to use the new edac ABI
        pasemi_edac: convert driver to use the new edac ABI
        mv64x60_edac: convert driver to use the new edac ABI
        mpc85xx_edac: convert driver to use the new edac ABI
        i82975x_edac: convert driver to use the new edac ABI
        i82875p_edac: convert driver to use the new edac ABI
        ...
      87a5af24
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 7e5b2db7
      Linus Torvalds 提交于
      Pull MIPS updates from Ralf Baechle:
       "The whole series has been sitting in -next for quite a while with no
        complaints.  The last change to the series was before the weekend the
        removal of an SPI patch which Grant - even though previously acked by
        himself - appeared to raise objections.  So I removed it until the
        situation is clarified.  Other than that all the patches have the acks
        from their respective maintainers, all MIPS and x86 defconfigs are
        building fine and I'm not aware of any problems introduced by this
        series.
      
        Among the key features for this patch series is a sizable patchset for
        Lantiq which among other things introduces support for Lantiq's
        flagship product, the FALCON SOC.  It also means that the opensource
        developers behind this patchset have overtaken Lantiq's competing
        inhouse development team that was working behind closed doors.
      
        Less noteworthy the ath79 patchset which adds support for a few more
        chip variants, cleanups and fixes.  Finally the usual dose of tweaking
        of generic code."
      
      Fix up trivial conflicts in arch/mips/lantiq/xway/gpio_{ebu,stp}.c where
      printk spelling fixes clashed with file move and eventual removal of the
      printk.
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (81 commits)
        MIPS: lantiq: remove orphaned code
        MIPS: Remove all -Wall and almost all -Werror usage from arch/mips.
        MIPS: lantiq: implement support for FALCON soc
        MTD: MIPS: lantiq: verify that the NOR interface is available on falcon soc
        MTD: MIPS: lantiq: implement OF support
        watchdog: MIPS: lantiq: implement OF support and minor fixes
        SERIAL: MIPS: lantiq: implement OF support
        GPIO: MIPS: lantiq: convert gpio-stp-xway to OF
        GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpio
        GPIO: MIPS: lantiq: move gpio-stp and gpio-ebu to the subsystem folder
        MIPS: pci: convert lantiq driver to OF
        MIPS: lantiq: convert dma to platform driver
        MIPS: lantiq: implement support for clkdev api
        MIPS: lantiq: drop ltq_gpio_request() and gpio_to_irq()
        OF: MIPS: lantiq: implement irq_domain support
        OF: MIPS: lantiq: implement OF support
        MIPS: lantiq: drop mips_machine support
        OF: PCI: const usage needed by MIPS
        MIPS: Cavium: Remove smp_reserve_lock.
        MIPS: Move cache setup to setup_arch().
        ...
      7e5b2db7
    • L
      Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm · 227d1e43
      Linus Torvalds 提交于
      Pull arm updates from Russell King:
       "This contains both some fixes found when trying to get the
        Assabet+neponset setup as a replacement firewall with a 3c589 PCMCIA
        card, and a bunch of changes from Al to fix up the ARM signal
        handling, particularly some of the restart behaviour."
      
      * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: neponset: make sure neponset_ncr_frob() is exported
        ARM: fix out[bwl]()
        arm: don't open-code ptrace_report_syscall()
        arm: bury unused _TIF_RESTORE_SIGMASK
        arm: remove unused restart trampoline
        arm: new way of handling ERESTART_RESTARTBLOCK
        arm: if we get into work_pending while returning to kernel mode, just go away
        arm: don't call try_to_freeze() from do_signal()
        arm: if there's no handler we need to restore sigmask, syscall or no syscall
        arm: trim _TIF_WORK_MASK, get rid of useless test and branch...
        arm: missing checks of __get_user()/__put_user() return values
      227d1e43
    • L
      Merge branch 'akpm' (Andrew's patch-bomb) · 7d36014b
      Linus Torvalds 提交于
      Merge patches through Andrew Morton:
       "180 patches - err 181 - listed below:
      
         - most of MM.  I held back the (large) "memcg: add hugetlb extension"
           series because a bunfight has recently broken out.
      
         - leds.  After this, Bryan Wu will be handling drivers/leds/
      
         - backlight
      
         - lib/
      
         - rtc"
      
      * emailed from Andrew Morton <akpm@linux-foundation.org>: (181 patches)
        drivers/rtc/rtc-s3c.c: fix compiler warning
        drivers/rtc/rtc-tegra.c: clean up probe/remove routines
        drivers/rtc/rtc-pl031.c: remove RTC timer interrupt handling
        drivers/rtc/rtc-lpc32xx.c: add device tree support
        drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF
        rtc: ds1307: add trickle charger support
        rtc: ds1307: remove superfluous initialization
        rtc: rename CONFIG_RTC_MXC to CONFIG_RTC_DRV_MXC
        drivers/rtc/Kconfig: place RTC_DRV_IMXDI and RTC_MXC under "on-CPU RTC drivers"
        drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature
        rtc: add ioctl to get/clear battery low voltage status
        drivers/rtc/rtc-ep93xx.c: convert to use module_platform_driver()
        rtc/spear: add Device Tree probing capability
        lib/vsprintf.c: "%#o",0 becomes '0' instead of '00'
        radix-tree: fix preload vector size
        spinlock_debug: print kallsyms name for lock
        vsprintf: fix %ps on non symbols when using kallsyms
        lib/bitmap.c: fix documentation for scnprintf() functions
        lib/string_helpers.c: make arrays static
        lib/test-kstrtox.c: mark const init data with __initconst instead of __initdata
        ...
      7d36014b
    • S
      drivers/rtc/rtc-s3c.c: fix compiler warning · ecb41a77
      Sachin Kamat 提交于
      rtc-s3c.c:673:32: warning: `s3c_rtc_drv_data_array' defined but not used [-Wunused-variable]
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ecb41a77
    • H
      drivers/rtc/rtc-tegra.c: clean up probe/remove routines · 621bae79
      Hannu Heikkinen 提交于
      Use the devres managed resource functions in the probe routine.  Also
      affects the remove routine where the previously used free and release
      functions are not needed.
      
      The devm_* functions eliminate the need for manual resource releasing and
      simplify error handling.  Resources allocated by devm_* are freed
      automatically on driver detach.
      Signed-off-by: NHannu Heikkinen <ext-hannu.m.heikkinen@nokia.com>
      Acked-by: NStephen Warren <swarren@wwwdotorg.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      621bae79
    • R
      drivers/rtc/rtc-pl031.c: remove RTC timer interrupt handling · ac2dee59
      Rajkumar Kasirajan 提交于
      Remove RTT interrupt handling, since PIE mode interrupts are now better
      emulated in generic code via an hrtimer we have no need for this, and
      there is no codepath in the driver that enables these periodic interrupts
      anyway.
      Signed-off-by: NRajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Cc: Mattias Wallin <mattias.wallin@stericsson.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac2dee59
    • R
      drivers/rtc/rtc-lpc32xx.c: add device tree support · e862e7c4
      Roland Stigge 提交于
      Adds device tree support for rtc-lpc32xx.c
      Signed-off-by: NRoland Stigge <stigge@antcom.de>
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e862e7c4
    • N
      drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF · bcffb10f
      Nikolaus Voss 提交于
      If the rtc reports the time might be invalid due to oscillator failure,
      M41T93_FLAG_OF flag must not be reset by get_time() as the read operation
      doesn't make the time valid.
      
      Without this patch, only the first get_time() reported an invalid time,
      the second get_time() reported a valid time althought the reported time is
      probably wrong due to oscillator failure.
      
      Instead of resetting in get_time(), with this patch M41T93_FLAG_OF is
      reset in set_time() when a valid time is to be written.
      Signed-off-by: NNikolaus Voss <n.voss@weinmann.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bcffb10f
    • W
      rtc: ds1307: add trickle charger support · eb86c306
      Wolfram Sang 提交于
      Some DS13XX devices have "trickle chargers".  Its configuration register
      is at different locations, the setup is the same, though.  Since the
      configuration is board specific, introduce a platform_data to this driver.
      Tested with a DS1339 on a custom board.
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eb86c306
    • W
      rtc: ds1307: remove superfluous initialization · f8ae9701
      Wolfram Sang 提交于
      ds1307 was kzalloced, so no need to zero members of the struct.
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      Acked-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f8ae9701
    • F
      rtc: rename CONFIG_RTC_MXC to CONFIG_RTC_DRV_MXC · 79811595
      Fabio Estevam 提交于
      In order to keep consistency with other rtc drivers,rename CONFIG_RTC_MXC
      to CONFIG_RTC_DRV_MXC.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NWolfram Sang <w.sang@pengutronix.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      [akpm@linux-foundation.org: fix missed arch/arm/configs/imx_v6_v7_defconfig]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      79811595
    • F
      drivers/rtc/Kconfig: place RTC_DRV_IMXDI and RTC_MXC under "on-CPU RTC drivers" · b224b9ac
      Fabio Estevam 提交于
      RTC_DRV_IMXDI and RTC_MXC are on-chip RTC modules, so move them under
      "on-CPU RTC drivers" selection menu.
      
      While at it change the dependency of RTC_DRV_IMXDI from ARCH_MX25 to
      SOC_IMX25.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NWolfram Sang <w.sang@pengutronix.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b224b9ac
    • A
      drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature · 0f20b767
      Alexander Stein 提交于
      Changes are based on arch/cris/arch-v10/drivers/pcf8563.c
      
      [akpm@linux-foundation.org: fix sparse warning]
      Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Mikael Starvik <starvik@axis.com>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Wu Fengguang <wfg@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0f20b767
    • A
      rtc: add ioctl to get/clear battery low voltage status · e311c929
      Alexander Stein 提交于
      Currently there is no generic way to get the RTC battery status within an
      application.  So add an ioctl to read the status bit.  The idea is that
      the bit is set once a low voltage is detected.  It stays there until it is
      reset using the RTC_VL_CLR ioctl.
      Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e311c929
    • H
      drivers/rtc/rtc-ep93xx.c: convert to use module_platform_driver() · 84d56b38
      H Hartley Sweeten 提交于
      Use module_platform_driver() to remove the boilerplate code.
      
      Also, change the probe and remove functions to __devinit/__devexit.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      84d56b38
    • V
      rtc/spear: add Device Tree probing capability · 0108c4ff
      Viresh Kumar 提交于
      SPEAr platforms now support DT and so must convert all drivers support DT.
      This patch adds DT probing support for rtc and updates its documentation
      too.
      Signed-off-by: NViresh Kumar <viresh.kumar@st.com>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Rajeev Kumar <rajeev-dlh.kumar@st.com>
      Cc: Rob Herring <robherring2@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0108c4ff
    • P
      lib/vsprintf.c: "%#o",0 becomes '0' instead of '00' · 7c203422
      Pierre Carrier 提交于
      number()'s behaviour is slighly changed: 0 becomes "0" instead of "00"
      when using the flag SPECIAL and base 8.
      
      Before:
      Number\Format  %o    %#o  %x    %#x
                  0     0   00    0   0x0
                  1     1   01    1   0x1
                 16    20  020   10  0x10
      
      After:
      Number\Format  %o    %#o  %x    %#x
                  0     0    0    0   0x0
                  1     1   01    1   0x1
                 16    20  020   10  0x10
      Signed-off-by: NPierre Carrier <pierre@spotify.com>
      Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7c203422
    • N
      radix-tree: fix preload vector size · 55368052
      Nick Piggin 提交于
      We are not preallocating a sufficient number of nodes.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      55368052
    • S
      spinlock_debug: print kallsyms name for lock · fd0a3735
      Stephen Boyd 提交于
      When a spinlock warning is printed we usually get
      
       BUG: spinlock bad magic on CPU#0, modprobe/111
        lock: 0xdff09f38, .magic: 00000000, .owner: /0, .owner_cpu: 0
      
      but it's nicer to print the symbol for the lock if we have it so that we
      can avoid 'grep dff09f38 /proc/kallsyms' to find out which lock it was.
      Use kallsyms to print the symbol name so we get something a bit easier to
      read
      
       BUG: spinlock bad magic on CPU#0, modprobe/112
        lock: test_lock, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
      
      If the lock is not in kallsyms %ps will fall back to printing the address
      directly.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd0a3735
    • S
      vsprintf: fix %ps on non symbols when using kallsyms · 4796dd20
      Stephen Boyd 提交于
      Using %ps in a printk format will sometimes fail silently and print the
      empty string if the address passed in does not match a symbol that
      kallsyms knows about.  But using %pS will fall back to printing the full
      address if kallsyms can't find the symbol.  Make %ps act the same as %pS
      by falling back to printing the address.
      
      While we're here also make %ps print the module that a symbol comes from
      so that it matches what %pS already does.  Take this simple function for
      example (in a module):
      
      	static void test_printk(void)
      	{
      		int test;
      		pr_info("with pS: %pS\n", &test);
      		pr_info("with ps: %ps\n", &test);
      	}
      
      Before this patch:
      
       with pS: 0xdff7df44
       with ps:
      
      After this patch:
      
       with pS: 0xdff7df44
       with ps: 0xdff7df44
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4796dd20
    • A
      lib/bitmap.c: fix documentation for scnprintf() functions · 05a6c8a9
      Andrew Morton 提交于
      The code comments for bscnl_emit() and bitmap_scnlistprintf() are
      describing snprintf() return semantics, but these functions use
      scnprintf() return semantics.  Fix that, and document the
      bitmap_scnprintf() return value as well.
      
      Cc: Ryota Ozaki <ozaki.ryota@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      05a6c8a9
    • A
      lib/string_helpers.c: make arrays static · 68aecfb9
      Andrew Morton 提交于
      Moving these arrays into static storage shrinks the kernel a bit:
      
         text    data     bss     dec     hex filename
          723     112      64     899     383 lib/string_helpers.o
          516     272      64     852     354 lib/string_helpers.o
      
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      68aecfb9
    • U
      lib/test-kstrtox.c: mark const init data with __initconst instead of __initdata · 26d7b99b
      Uwe Kleine-König 提交于
      As long as there is no other non-const variable marked __initdata in the
      same compilation unit it doesn't hurt.  If there were one however
      compilation would fail with
      
      	error: $variablename causes a section type conflict
      
      because a section containing const variables is marked read only and so
      cannot contain non-const variables.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26d7b99b
    • C
      list_debug: WARN for adding something already in the list · 17a801f4
      Chris Metcalf 提交于
      We were bitten by this at one point and added an additional sanity test
      for DEBUG_LIST.  You can't validly add a list_head to a list where either
      prev or next is the same as the thing you're adding.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      17a801f4
    • J
      leds: add LM3533 LED driver · 401dea7f
      Johan Hovold 提交于
      Add sub-driver for the LEDs on National Semiconductor / TI LM3533 lighting
      power chips.
      
      The chip provides 256 brightness levels, hardware accelerated blinking as
      well as ambient-light-sensor and pwm input control.
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Rob Landley <rob@landley.net>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      401dea7f
    • A
      drivers/leds/leds-pca955x.c: fix race condition while setting brightness on several LEDs · e7e11d8b
      Alexander Stein 提交于
      When issuing the following command:
      
        for I in 0 1 2 3 4 5 6 7; do
          echo 0 > /sys/class/leds/pca955x\:${I}/brightness;
        done
      
      It is possible that all the pca955x_read_ls calls are done sequentially
      before any pca955x_write_ls call is done.  This updates the LS only to
      the last LED update in its set.
      
      Fix this by using a global lock for the pca995x device during
      pca955x_led_work.  Also used a struct for shared data betreen all LEDs.
      
      [akpm@linux-foundation.org: revert unintentional rename of pca955x_ledsel()]
      Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e7e11d8b
    • S
      leds: add new transient trigger for one shot timer activation · 44e1e9f8
      Shuah Khan 提交于
      The leds timer trigger does not currently have an interface to activate a
      one shot timer.  The current support allows for setting two timers, one
      for specifying how long a state to be on, and the second for how long the
      state to be off.  The delay_on value specifies the time period an LED
      should stay in on state, followed by a delay_off value that specifies how
      long the LED should stay in off state.  The on and off cycle repeats until
      the trigger gets deactivated.  There is no provision for one time
      activation to implement features that require an on or off state to be
      held just once and then stay in the original state forever.
      
      Without one shot timer interface, user space can still use timer trigger
      to set a timer to hold a state, however when user space application
      crashes or goes away without deactivating the timer, the hardware will be
      left in that state permanently.
      
      As a specific example of this use-case, let's look at vibrate feature on
      phones.  Vibrate function on phones is implemented using PWM pins on SoC
      or PMIC.  There is a need to activate one shot timer to control the
      vibrate feature, to prevent user space crashes leaving the phone in
      vibrate mode permanently causing the battery to drain.
      
      This trigger exports three properties, activate, state, and duration When
      transient trigger is activated these properties are set to default values.
      
      - duration allows setting timer value in msecs. The initial value is 0.
      - activate allows activating and deactivating the timer specified by
        duration as needed. The initial and default value is 0.  This will allow
        duration to be set after trigger activation.
      - state allows user to specify a transient state to be held for the specified
        duration.
      Signed-off-by: NShuah Khan <shuahkhan@gmail.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: NeilBrown <neilb@suse.de>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      44e1e9f8
    • A
      leds: heartbeat: stop on shutdown · 49dca5ae
      Alexander Holler 提交于
      A halted kernel should not show a heartbeat.
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NAlexander Holler <holler@ahsoftware.de>
      Cc: Shuah Khan <shuahkhan@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      49dca5ae
    • K
      drivers/leds/leds-lm3530.c: simplify als configuration on initialization · 6335f8fa
      Kim, Milo 提交于
      For better code readability, ALS code is moved to new a function -
      lm3530_als_configure()
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Cc: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6335f8fa
    • K
      include/linux/led-lm3530.h: comment correction about the range of brightness · 8035a502
      Kim, Milo 提交于
      max brightness is 127, so the range of brt_val should be from 0 to 127
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Cc: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8035a502
    • S
      leds: change ledtrig-timer to use activated flag · 13811879
      Shuah Khan 提交于
      Change existing timer trigger to use the new ->activated flag to set
      activate successful status in activate routine and check it in deactivate
      routine to do cleanup.
      Signed-off-by: NShuah Khan <shuahkhan@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13811879