1. 11 Jun, 2014 14 commits
    • Dan Carpenter's avatar
      powerpc/spufs: Remove duplicate SPUFS_CNTL_MAP_SIZE define · be8f9642
      Dan Carpenter authored
      The SPUFS_CNTL_MAP_SIZE define is cut and pasted twice so we can delete
      the second instance.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarJeremy Kerr <jk@ozlabs.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      be8f9642
    • Dan Carpenter's avatar
      powerpc/cpm: Remove duplicate FCC_GFMR_TTX define · d9d82123
      Dan Carpenter authored
      The FCC_GFMR_TTX define is cut and pasted twice so we can remove the
      second instance.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d9d82123
    • Guo Chao's avatar
      powerpc/powernv: Fix endianness problems in EEH · ddf0322a
      Guo Chao authored
      EEH information fetched from OPAL need fix before using in LE environment.
      To be included in sparse's endian check, declare them as __beXX and
      access them by accessors.
      
      Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarGuo Chao <yan@linux.vnet.ibm.com>
      Acked-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ddf0322a
    • Anton Blanchard's avatar
      crypto/nx: disable NX on little endian builds · 8b9f9269
      Anton Blanchard authored
      The NX driver has endian issues so disable it for now.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8b9f9269
    • Anton Blanchard's avatar
      powernv: Fix permissions on sysparam sysfs entries · 1bd09890
      Anton Blanchard authored
      Everyone can write to these files, which is not what we want.
      
      Cc: stable@vger.kernel.org # 3.15
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1bd09890
    • Shreyas B. Prabhu's avatar
      powerpc/powernv : Disable subcore for UP configs · ad417330
      Shreyas B. Prabhu authored
      Build throws following errors when CONFIG_SMP=n
      arch/powerpc/platforms/powernv/subcore.c: In function ‘cpu_update_split_mode’:
      arch/powerpc/platforms/powernv/subcore.c:274:15: error: ‘setup_max_cpus’ undeclared (first use in this function)
      arch/powerpc/platforms/powernv/subcore.c:285:5: error: lvalue required as left operand of assignment
      
      'setup_max_cpus' variable is relevant only on SMP, so there is no point
      working around it for UP. Furthermore, subcore itself is relevant only
      on SMP and hence the better solution is to exclude subcore.o and
      subcore-asm.o for UP builds.
      Signed-off-by: default avatarShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ad417330
    • Shreyas B. Prabhu's avatar
      powerpc/powernv: Include asm/smp.h to fix UP build failure · b2a80878
      Shreyas B. Prabhu authored
      Build throws following errors when CONFIG_SMP=n
      arch/powerpc/platforms/powernv/setup.c: In function ‘pnv_kexec_wait_secondaries_down’:
      arch/powerpc/platforms/powernv/setup.c:179:4: error: implicit declaration of function ‘get_hard_smp_processor_id’
          rc = opal_query_cpu_status(get_hard_smp_processor_id(i),
      
      The usage of get_hard_smp_processor_id() needs the declaration from
      <asm/smp.h>. The file setup.c includes <linux/sched.h>, which in-turn
      includes <linux/smp.h>. However, <linux/smp.h> includes <asm/smp.h>
      only on SMP configs and hence UP builds fail.
      
      Fix this by directly including <asm/smp.h> in setup.c unconditionally.
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b2a80878
    • Michael Neuling's avatar
      powerpc: Don't setup CPUs with bad status · 59a53afe
      Michael Neuling authored
      OPAL will mark a CPU that is guarded as "bad" in the status property of the CPU
      node.
      
      Unfortunatley Linux doesn't check this property and will put the bad CPU in the
      present map.  This has caused hangs on booting when we try to unsplit the core.
      
      This patch checks the CPU is avaliable via this status property before putting
      it in the present map.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Tested-by: default avatarAnton Blanchard <anton@samba.org>
      cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      59a53afe
    • Sam bobroff's avatar
      powerpc: Correct DSCR during TM context switch · 96d01610
      Sam bobroff authored
      Correct the DSCR SPR becoming temporarily corrupted if a task is
      context switched during a transaction.
      
      The problem occurs while suspending the task and is caused by saving
      the DSCR to thread.dscr after it has already been set to the CPU's
      default value:
      
      __switch_to() calls __switch_to_tm()
      	which calls tm_reclaim_task()
      	which calls tm_reclaim_thread()
      	which calls tm_reclaim()
      		where the DSCR is set to the CPU's default
      __switch_to() calls _switch()
      		where thread.dscr is set to the DSCR
      
      When the task is resumed, it's transaction will be doomed (as usual)
      and the DSCR SPR will be corrupted, although the checkpointed value
      will be correct. Therefore the DSCR will be immediately corrected by
      the transaction aborting, unless it has been suspended. In that case
      the incorrect value can be seen by the task until it resumes the
      transaction.
      
      The fix is to treat the DSCR similarly to the TAR and save it early
      in __switch_to().
      
      A program exposing the problem is added to the kernel self tests as:
      tools/testing/selftests/powerpc/tm/tm-resched-dscr.
      Signed-off-by: default avatarSam Bobroff <sam.bobroff@au1.ibm.com>
      CC: <stable@vger.kernel.org> [v3.10+]
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      96d01610
    • Michael Ellerman's avatar
      powerpc: Remove platforms/wsp and associated pieces · fb5a5157
      Michael Ellerman authored
      __attribute__ ((unused))
      
      WSP is the last user of CONFIG_PPC_A2, so we remove that as well.
      
      Although CONFIG_PPC_ICSWX still exists, it's no longer selectable for
      any Book3E platform, so we can remove the code in mmu-book3e.h that
      depended on it.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      fb5a5157
    • Paul Bolle's avatar
      powerpc: Remove check for CONFIG_SERIAL_TEXT_DEBUG · 94314290
      Paul Bolle authored
      The Kconfig symbol SERIAL_TEXT_DEBUG was removed from
      arch/powerpc/Kconfig.debug in v2.6.22. (In v2.6.27 it was also removed
      from arch/ppc/Kconfig.debug.) So the check for its macro has evaluated
      to false for over five years now. Remove that check and the few lines
      of code hidden behind it.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      94314290
    • Benjamin Herrenschmidt's avatar
      powerpc: Add AT_HWCAP2 to indicate V.CRYPTO category support · dd58a092
      Benjamin Herrenschmidt authored
      The Vector Crypto category instructions are supported by current POWER8
      chips, advertise them to userspace using a specific bit to properly
      differentiate with chips of the same architecture level that might not
      have them.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org> [v3.10+]
      dd58a092
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · dfb94547
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
       "This contains:
         - addition of the Intel MID watchdog
         - removal of W83697HF and W83697UG drivers (code was merged into
           w83627hf_wdt driver)
         - addition of Armada 375/380 SoC support
         - conversion of imx2_wdt to regmap API and to watchdog core API
         - lots of other small improvements and fixes"
      
      [ Wim was also tagged by gmail as a spammer, but not delayed by days
        unlike Ben ]
      
      * git://www.linux-watchdog.org/linux-watchdog: (25 commits)
        x86: intel-mid: add watchdog platform code for Merrifield
        watchdog: add Intel MID watchdog driver support
        watchdog: sp805: Set watchdog_device->timeout from ->set_timeout()
        booke/watchdog: refine and clean up the codes
        watchdog: iop_wdt only builds for mach-iop13xx
        watchdog: Remove drivers for W83697HF and W83697UG
        watchdog: w83627hf_wdt: Add early_disable module parameter
        ARM: mvebu: Add A375/A380 watchdog binding documentation
        watchdog: orion: Add Armada 375/380 SoC support
        watchdog: orion: Introduce per-SoC enabled() function
        watchdog: orion: Introduce per-SoC stop() function
        watchdog: orion: Remove unneeded atomic access
        watchdog: orion: Introduce a SoC-specific RSTOUT mapping
        watchdog: orion: Move the register ioremap'ing to its own function
        watchdog: xilinx: Make of_device_id array const
        watchdog: imx2_wdt: convert to watchdog core api
        watchdog: imx2_wdt: convert to use regmap API.
        watchdog: imx2_wdt: Sort the header files alphabetically
        watchdog: ath79_wdt: switch to clk_prepare/clk_disable
        watchdog: ath79_wdt: avoid spurious restarts on AR934x
        ...
      dfb94547
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · c5aec4c7
      Linus Torvalds authored
      Pull powerpc updates from Ben Herrenschmidt:
       "Here is the bulk of the powerpc changes for this merge window.  It got
        a bit delayed in part because I wasn't paying attention, and in part
        because I discovered I had a core PCI change without a PCI maintainer
        ack in it.  Bjorn eventually agreed it was ok to merge it though we'll
        probably improve it later and I didn't want to rebase to add his ack.
      
        There is going to be a bit more next week, essentially fixes that I
        still want to sort through and test.
      
        The biggest item this time is the support to build the ppc64 LE kernel
        with our new v2 ABI.  We previously supported v2 userspace but the
        kernel itself was a tougher nut to crack.  This is now sorted mostly
        thanks to Anton and Rusty.
      
        We also have a fairly big series from Cedric that add support for
        64-bit LE zImage boot wrapper.  This was made harder by the fact that
        traditionally our zImage wrapper was always 32-bit, but our new LE
        toolchains don't really support 32-bit anymore (it's somewhat there
        but not really "supported") so we didn't want to rely on it.  This
        meant more churn that just endian fixes.
      
        This brings some more LE bits as well, such as the ability to run in
        LE mode without a hypervisor (ie. under OPAL firmware) by doing the
        right OPAL call to reinitialize the CPU to take HV interrupts in the
        right mode and the usual pile of endian fixes.
      
        There's another series from Gavin adding EEH improvements (one day we
        *will* have a release with less than 20 EEH patches, I promise!).
      
        Another highlight is the support for the "Split core" functionality on
        P8 by Michael.  This allows a P8 core to be split into "sub cores" of
        4 threads which allows the subcores to run different guests under KVM
        (the HW still doesn't support a partition per thread).
      
        And then the usual misc bits and fixes ..."
      
      [ Further delayed by gmail deciding that BenH is a dirty spammer.
        Google knows.  ]
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (155 commits)
        powerpc/powernv: Add missing include to LPC code
        selftests/powerpc: Test the THP bug we fixed in the previous commit
        powerpc/mm: Check paca psize is up to date for huge mappings
        powerpc/powernv: Pass buffer size to OPAL validate flash call
        powerpc/pseries: hcall functions are exported to modules, need _GLOBAL_TOC()
        powerpc: Exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC()
        powerpc/powernv: Set memory_block_size_bytes to 256MB
        powerpc: Allow ppc_md platform hook to override memory_block_size_bytes
        powerpc/powernv: Fix endian issues in memory error handling code
        powerpc/eeh: Skip eeh sysfs when eeh is disabled
        powerpc: 64bit sendfile is capped at 2GB
        powerpc/powernv: Provide debugfs access to the LPC bus via OPAL
        powerpc/serial: Use saner flags when creating legacy ports
        powerpc: Add cpu family documentation
        powerpc/xmon: Fix up xmon format strings
        powerpc/powernv: Add calls to support little endian host
        powerpc: Document sysfs DSCR interface
        powerpc: Fix regression of per-CPU DSCR setting
        powerpc: Split __SYSFS_SPRSETUP macro
        arch: powerpc/fadump: Cleaning up inconsistent NULL checks
        ...
      c5aec4c7
  2. 10 Jun, 2014 26 commits
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 · 2937f5ef
      Linus Torvalds authored
      Pull x86 platform driver updates from Matthew Garrett:
       "Very little of excitement here - the most significant is a new driver
        for detecting device freefall on Dells, other than that it's pretty
        much entirely minor fixes for specific machines"
      
      * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
        hp-wmi: Enable hotkeys on some systems
        thinkpad_acpi: Add mappings for F9 - F12 hotkeys on X240 / T440 / T540
        platform: x86: dell-smo8800: Dell Latitude freefall driver (ACPI SMO8800/SMO8810)
        ideapad_laptop: Introduce the use of the managed version of kzalloc
        platform/x86: Fix run-time dependencies of OLPC drivers
        platform: x86: asus-wmi.c: Cleaning up uninitialized variables
        ix86/mid/thermal: Introduce the use of the managed version of kzalloc
        platform x86 Kconfig: Refer to the laptop list in the Compal driver help
        Documentation: Add list of laptop models supported by the Compal driver
        ideapad-laptop: Blacklist rfkill control on the Lenovo Yoga 2 11
        asus-wmi: Set WAPF to 4 for Asus X550CA
        alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status
        alienware-wmi: Update WMAX brightness method limit to 15
        pvpanic: Set high notifier priority
        platform/x86: samsung-laptop: Add support for Samsung's NP7[34]0U3E models.
        toshiba_acpi: Add alternative keymap support for Satellite M840
        platform-drivers-x86: intel_pmic_gpio: Fix off-by-one valid offset range check
      2937f5ef
    • Kyle Evans's avatar
      hp-wmi: Enable hotkeys on some systems · f82bdd0d
      Kyle Evans authored
      This is a third attempt to enable these buttons. The new variable being
      commit 997daa1b (i.e. hp-wmi: detect
      "2009 BIOS or later"). Older systems that do not have the 2009 BIOS query
      method respond with a dummy value, in this case 4. Using that, we can
      target a fairly narrow group of systems. i.e. old enough to not have
      HPWMI_FEATURE_QUERY 0xd, but new enough to have HPWMI_BIOS_QUERY 0x9.
      This group may be further limited if some systems respond with something
      other than 4 to non-existant feature queries.
      Signed-off-by: default avatarKyle Evans <kvans32@gmail.com>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      f82bdd0d
    • Hans de Goede's avatar
      thinkpad_acpi: Add mappings for F9 - F12 hotkeys on X240 / T440 / T540 · 8b9dd4fa
      Hans de Goede authored
      The T440s user guide says that when Fn-lock is not active, the *40s' F9 - F12
      keys should be mapped to: control-panel, search, show-all-windows and Computer.
      
      These keys generate the sofar unused 28 - 31 hotkey scancodes.
      
      For the first 2 this nicely matches the icons on the keys, for the latter 2
      the icons are somewhat creative, which is why I ended up looking them up in
      the user manual.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      8b9dd4fa
    • Pali Rohár's avatar
      platform: x86: dell-smo8800: Dell Latitude freefall driver (ACPI SMO8800/SMO8810) · 4738d8aa
      Pali Rohár authored
      This acpi driver provide supports for freefall sensors SMO8800/SMO8810 which
      can be found on Dell Latitude laptops. Driver register /dev/freefall misc
      device which has same interface as driver hp_accel freefall driver. So any
      existing applications for HP freefall sensor /dev/freefall will work for with
      this new driver for Dell Latitude laptops too.
      Signed-off-by: default avatarPali Rohár <pali.rohar@gmail.com>
      Cc: Sonal Santan <sonal.santan@gmail.com>
      Tested-By: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
      Acked-By: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      4738d8aa
    • Himangi Saraogi's avatar
      ideapad_laptop: Introduce the use of the managed version of kzalloc · b3facd7b
      Himangi Saraogi authored
      This patch moves data allocated using kzalloc to managed data allocated
      using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
      functions. The label sysfs_failed is removed as it is no longer
      required.  Also, linux/device.h is added to make sure the devm_*()
      routine declarations are unambiguously available.
      
      The following Coccinelle semantic patch was used for making the change:
      
      @platform@
      identifier p, probefn, removefn;
      @@
      struct platform_driver p = {
        .probe = probefn,
        .remove = removefn,
      };
      
      @prb@
      identifier platform.probefn, pdev;
      expression e, e1, e2;
      @@
      probefn(struct platform_device *pdev, ...) {
        <+...
      - e = kzalloc(e1, e2)
      + e = devm_kzalloc(&pdev->dev, e1, e2)
        ...
      ?-kfree(e);
        ...+>
      }
      
      @rem depends on prb@
      identifier platform.removefn;
      expression e;
      @@
      removefn(...) {
        <...
      - kfree(e);
        ...>
      }
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      b3facd7b
    • Jean Delvare's avatar
      platform/x86: Fix run-time dependencies of OLPC drivers · b02fdfcc
      Jean Delvare authored
      Let the xo15-ebook driver depend on OLPC as all other OLPC drivers
      already do. Add COMPILE_TEST as an alternative for both xo1-rfkill
      and xo15-ebook, to increase the build testing coverage.
      Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
      Cc: Matthew Garrett <matthew.garrett@nebula.com>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      b02fdfcc
    • Rickard Strandqvist's avatar
      platform: x86: asus-wmi.c: Cleaning up uninitialized variables · 8ad3be1e
      Rickard Strandqvist authored
      There is a risk that the variable will be used without being initialized.
      
      This was largely found by using a static code analysis program called cppcheck.
      Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      8ad3be1e
    • Himangi Saraogi's avatar
      ix86/mid/thermal: Introduce the use of the managed version of kzalloc · 14627e36
      Himangi Saraogi authored
      This patch moves data allocated using kzalloc to managed data allocated
      using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
      functions.
      
      The following Coccinelle semantic patch was used for making the change:
      
      @platform@
      identifier p, probefn, removefn;
      @@
      struct platform_driver p = {
        .probe = probefn,
        .remove = removefn,
      };
      
      @prb@
      identifier platform.probefn, pdev;
      expression e, e1, e2;
      @@
      probefn(struct platform_device *pdev, ...) {
        <+...
      - e = kzalloc(e1, e2)
      + e = devm_kzalloc(&pdev->dev, e1, e2)
        ...
      ?-kfree(e);
        ...+>
      }
      
      @rem depends on prb@
      identifier platform.removefn;
      expression e;
      @@
      removefn(...) {
        <...
      - kfree(e);
        ...>
      }
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      14627e36
    • Ismael Luceno's avatar
    • Ismael Luceno's avatar
    • Hans de Goede's avatar
      ideapad-laptop: Blacklist rfkill control on the Lenovo Yoga 2 11 · 85093f79
      Hans de Goede authored
      The Lenovo Yoga 2 11 always reports everything as blocked, causing userspace
      to not even try to use the wlan / bluetooth even though they work fine.
      
      Note this patch also removes the "else priv->rfk[i] = NULL;" bit of the
      rfkill initialization, it is not necessary as the priv struct is allocated
      with kzalloc.
      Reported-and-tested-by: default avatarVincent Gerris <vgerris@gmail.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      85093f79
    • Andreas Utterberg's avatar
      asus-wmi: Set WAPF to 4 for Asus X550CA · c08db55f
      Andreas Utterberg authored
      The 'asus-nb-wmi' WAPF parameter must be set to 4, so the internal Wireless LAN device is operational.
      Signed-off-by: default avatarAndreas Utterberg <andreas.utterberg@thundera.se>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      c08db55f
    • Mario Limonciello's avatar
      alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status · bc2ef884
      Mario Limonciello authored
      Since there are now multiple HDMI attributes associated with the WMAX method,
      create a sysfs group for them instead.
      Signed-off-by: default avatarMario Limonciello <mario_limonciello@dell.com>
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      bc2ef884
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew Morton) · 9ee4d7a6
      Linus Torvalds authored
      Merge leftovers from Andrew Morton:
       "A few leftovers: ocfs2, gcov, RTC"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        rtc: s5m: consolidate two device type switch statements
        rtc: s5m: add support for S2MPS14 RTC
        rtc: s5m: support different register layout
        rtc: s5m: use shorter time of register update
        rtc: s5m: remove undocumented time init on first boot
        mfd/rtc: sec/s5m: rename SEC* symbols to S5M
        gcov: add support for GCC 4.9
        ocfs2/o2net: incorrect to terminate accepting connections loop upon rejecting an invalid one
      9ee4d7a6
    • Krzysztof Kozlowski's avatar
      rtc: s5m: consolidate two device type switch statements · a0347f20
      Krzysztof Kozlowski authored
      In probe the configuration of driver for different chipsets was done in
      two switch (pdata->device_type) statements.  Consolidate them into one
      switch statement to increase code readability.
      
      Additionally check the return value of regmap_irq_get_virq and exit
      probe on error.
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Sangbeom Kim <sbkim73@samsung.com>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a0347f20
    • Krzysztof Kozlowski's avatar
      rtc: s5m: add support for S2MPS14 RTC · 0c5deb1e
      Krzysztof Kozlowski authored
      Add support for S2MPS14 to the rtc-s5m driver.  Differences in S2MPS14
      (in comparison to S5M8767):
      
       - Layout of registers
       - Lack of century support for time and alarms (7 registers used for
         storing time/alarm)
       - Two buffer control registers: WUDR and RUDR
       - No register for enabling writing time
       - RTC interrupts are reported in main PMIC I2C device
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Sangbeom Kim <sbkim73@samsung.com>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0c5deb1e
    • Krzysztof Kozlowski's avatar
      rtc: s5m: support different register layout · f8b23bbd
      Krzysztof Kozlowski authored
      Prepare for adding support for S2MPS14 RTC device to the rtc-s5m driver:
      
      1. Add a map of registers used by the driver which differ between
         the chipsets (S5M876X and S2MPS14).
      
      2. Move code of checking for alarm pending to separate function.
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Sangbeom Kim <sbkim73@samsung.com>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f8b23bbd
    • Krzysztof Kozlowski's avatar
      rtc: s5m: use shorter time of register update · 0c5f5d9a
      Krzysztof Kozlowski authored
      Set the time needed for updating alarm and time registers to 0.45 ms.
      The default is 7.32 ms which is too long and leads to warnings when
      setting alarm or time:
      
      	s5m-rtc: waiting for UDR update, reached max number of retries
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Sangbeom Kim <sbkim73@samsung.com>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0c5f5d9a
    • Krzysztof Kozlowski's avatar
      rtc: s5m: remove undocumented time init on first boot · fe787a5b
      Krzysztof Kozlowski authored
      Remove the code for initializing time if this is first boot.
      
      The code for detecting first boot uses undocumented field RTC_TCON in
      RTC_UDR_CON register.  According to S5M8767's datasheet this field is
      reserved.  On S2MPS14 it is not documented at all.
      
      On device first boot the registers will be initialized with reset value
      (2000-01-01 00:00:00).
      
      The code might work on S5M8763 but still this does not look like a task
      for RTC driver.
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Sangbeom Kim <sbkim73@samsung.com>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fe787a5b
    • Krzysztof Kozlowski's avatar
      mfd/rtc: sec/s5m: rename SEC* symbols to S5M · 602cb5bb
      Krzysztof Kozlowski authored
      Prepare for adding support for S2MPS14 RTC device to the rtc-s5m driver:
      
      1. Rename SEC* symbols to S5M.
      2. Add S5M prefix to some of defines which are different between S5M876X
         and S2MPS14.
      
      This is only a rename-like patch, new code is not added.
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: default avatarLee Jones <lee.jones@linaro.org>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Sangbeom Kim <sbkim73@samsung.com>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      602cb5bb
    • Yuan Pengfei's avatar
      gcov: add support for GCC 4.9 · a992bf83
      Yuan Pengfei authored
      This patch handles the gcov-related changes in GCC 4.9:
      
        A new counter (time profile) is added. The total number is 9 now.
      
        A new profile merge function __gcov_merge_time_profile is added.
      
      See gcc/gcov-io.h and libgcc/libgcov-merge.c
      
      For the first change, the layout of struct gcov_info is affected.
      
      For the second one, a dummy function is added to kernel/gcov/base.c
      similarly.
      Signed-off-by: default avatarYuan Pengfei <coolypf@qq.com>
      Acked-by: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a992bf83
    • Tariq Saeed's avatar
      ocfs2/o2net: incorrect to terminate accepting connections loop upon rejecting an invalid one · 79deb3c1
      Tariq Saeed authored
      When o2net-accept-one() rejects an illegal connection, it terminates the
      loop picking up the remaining queued connections.  This fix will
      continue accepting connections till the queue is emtpy.
      
      Addresses Orabug 17489469.
      Signed-off-by: default avatarTariq Saseed <tariq.x.saeed@oracle.com>
      Signed-off-by: default avatarSrinivas Eeda <srinivas.eeda@oracle.com>
      Reviewed-by: default avatarMark Fasheh <mfasheh@suse.de>
      Cc: Joel Becker <jlbec@evilplan.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79deb3c1
    • Sasha Levin's avatar
      decode_stacktrace: make stack dump output useful again · dbd1abb2
      Sasha Levin authored
      Right now when people try to report issues in the kernel they send stack
      dumps to eachother, which looks something like this:
      
        [    6.906437]  [<ffffffff811f0e90>] ? backtrace_test_irq_callback+0x20/0x20
        [    6.907121]  [<ffffffff84388ce8>] dump_stack+0x52/0x7f
        [    6.907640]  [<ffffffff811f0ec8>] backtrace_regression_test+0x38/0x110
        [    6.908281]  [<ffffffff813596a0>] ? proc_create_data+0xa0/0xd0
        [    6.908870]  [<ffffffff870a8040>] ? proc_modules_init+0x22/0x22
        [    6.909480]  [<ffffffff810020c2>] do_one_initcall+0xc2/0x1e0
        [...]
      
      However, most of the text you get is pure garbage.
      
      The only useful thing above is the function name.  Due to the amount of
      different kernel code versions and various configurations being used,
      the kernel address and the offset into the function are not really
      helpful in determining where the problem actually occured.
      
      Too often the result of someone looking at a stack dump is asking the
      person who sent it for a translation for one or more 'addr2line'
      translations.  Which slows down the entire process of debugging the
      issue (and really annoying).
      
      The decode_stacktrace script is an attempt to make the output more
      useful and easy to work with by translating all kernel addresses in the
      stack dump into line numbers.  Which means that the stack dump would
      look like this:
      
        [  635.148361]  dump_stack (lib/dump_stack.c:52)
        [  635.149127]  warn_slowpath_common (kernel/panic.c:418)
        [  635.150214]  warn_slowpath_null (kernel/panic.c:453)
        [  635.151031]  _oalloc_pages_slowpath+0x6a/0x7d0
        [  635.152171]  ? zone_watermark_ok (mm/page_alloc.c:1728)
        [  635.152988]  ? get_page_from_freelist (mm/page_alloc.c:1939)
        [  635.154766]  __alloc_pages_nodemask (mm/page_alloc.c:2766)
      
      It's pretty obvious why this is better than the previous stack dump
      before.
      
      Usage is pretty simple:
      
              ./decode_stacktrace.sh [vmlinux] [base path]
      
      Where vmlinux is the vmlinux to extract line numbers from and base path
      is the path that points to the root of the build tree, for example:
      
              ./decode_stacktrace.sh vmlinux /home/sasha/linux/ < input.log > output.log
      
      The stack trace should be piped through it (I, for example, just pipe
      the output of the serial console of my KVM test box through it).
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dbd1abb2
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.16-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · d1e1cda8
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Highlights include:
      
         - massive cleanup of the NFS read/write code by Anna and Dros
         - support multiple NFS read/write requests per page in order to deal
           with non-page aligned pNFS striping.  Also cleans up the r/wsize <
           page size code nicely.
         - stable fix for ensuring inode is declared uptodate only after all
           the attributes have been checked.
         - stable fix for a kernel Oops when remounting
         - NFS over RDMA client fixes
         - move the pNFS files layout driver into its own subdirectory"
      
      * tag 'nfs-for-3.16-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits)
        NFS: populate ->net in mount data when remounting
        pnfs: fix lockup caused by pnfs_generic_pg_test
        NFSv4.1: Fix typo in dprintk
        NFSv4.1: Comment is now wrong and redundant to code
        NFS: Use raw_write_seqcount_begin/end int nfs4_reclaim_open_state
        xprtrdma: Disconnect on registration failure
        xprtrdma: Remove BUG_ON() call sites
        xprtrdma: Avoid deadlock when credit window is reset
        SUNRPC: Move congestion window constants to header file
        xprtrdma: Reset connection timeout after successful reconnect
        xprtrdma: Use macros for reconnection timeout constants
        xprtrdma: Allocate missing pagelist
        xprtrdma: Remove Tavor MTU setting
        xprtrdma: Ensure ia->ri_id->qp is not NULL when reconnecting
        xprtrdma: Reduce the number of hardway buffer allocations
        xprtrdma: Limit work done by completion handler
        xprtrmda: Reduce calls to ib_poll_cq() in completion handlers
        xprtrmda: Reduce lock contention in completion handlers
        xprtrdma: Split the completion queue
        xprtrdma: Make rpcrdma_ep_destroy() return void
        ...
      d1e1cda8
    • Linus Torvalds's avatar
      Merge tag 'mmc-updates-for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 07888238
      Linus Torvalds authored
      Pull MMC update from Chris Ball:
       "MMC highlights for 3.16:
      
        Core:
         - support HS400 mode of eMMC 5.0, via DT bindings mmc-hs400-1_{2,8}v
         - if card init at 3.3v doesn't work, try 1.8v and 1.2v too
      
        Drivers:
         - moxart: New driver for MOXA ART SoCs
         - rtsx_usb_sdmmc: New driver for Realtek USB card readers
         - sdhci: Large rework around IRQ/regulator handling, remove card_tasklet
         - sdhci-pci-o2micro: Add SeaBird SeaEagle SD3 support
         - sunxi: New driver for Allwinner sunxi SoCs
         - usdhi6rol0: New driver for Renesas SD/SDIO controller"
      
      * tag 'mmc-updates-for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (95 commits)
        mmc: sdhci-s3c: use mmc_of_parse and remove the card_tasklet
        mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller
        mmc: sdhci-of-esdhc: Fixup compile error
        mmc: tegra: fix reporting of base clock frequency
        mmc: tegra: disable UHS modes
        mmc: sdhci-dove: use mmc_of_parse() and remove card_tasklet CD handler
        MAINTAINERS: mmc: Add path to git tree
        mmc: dove: fix missing MACH_DOVE dependency
        mmc: sdhci: SD tuning is broken for some controllers
        mmc: sdhci-esdhc-imx: fix mmc ddr mode regression issue
        mmc: sdhci-pci-o2micro: Add SeaBird SeaEagle SD3 support
        mmc: omap_hsmmc: split omap-dma header file
        mmc: omap_hsmmc: fix cmd23 multiblock read/write
        mmc: omap_hsmmc: use devm_ioremap_resource
        mmc: omap_hsmmc: use devm_request_threaded_irq
        mmc: omap_hsmmc: use devm_request_irq
        mmc: omap_hsmmc: use devm_clk_get
        mmc: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
        mmc: wmt-sdmmc: Use GFP_KERNEL instead of hard-coded value
        mmc: omap: Use DIV_ROUND_UP instead of open coded
        ...
      07888238
    • Andy Lutomirski's avatar
      fs,userns: Change inode_capable to capable_wrt_inode_uidgid · 23adbe12
      Andy Lutomirski authored
      The kernel has no concept of capabilities with respect to inodes; inodes
      exist independently of namespaces.  For example, inode_capable(inode,
      CAP_LINUX_IMMUTABLE) would be nonsense.
      
      This patch changes inode_capable to check for uid and gid mappings and
      renames it to capable_wrt_inode_uidgid, which should make it more
      obvious what it does.
      
      Fixes CVE-2014-4014.
      
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Serge Hallyn <serge.hallyn@ubuntu.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      23adbe12