1. 25 Sep, 2014 2 commits
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-sleep' · 381e63da
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: release policy->rwsem on error
        cpufreq: fix cpufreq suspend/resume for intel_pstate
      
      * pm-sleep:
        Revert "PM / Hibernate: Iterate over set bits instead of PFNs in swsusp_free()"
      381e63da
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-hotplug', 'acpi-scan', 'acpi-lpss', 'acpi-gpio' and 'acpi-video' · 9ef5a306
      Rafael J. Wysocki authored
      * acpi-hotplug:
        ACPI / hotplug: Generate online uevents for ACPI containers
      
      * acpi-scan:
        ACPI / scan: Correct error return value of create_modalias()
      
      * acpi-lpss:
        ACPI / platform / LPSS: disable async suspend/resume of LPSS devices
      
      * acpi-gpio:
        gpio / ACPI: Use pin index and bit length
        ACPICA: Update to GPIO region handler interface.
      
      * acpi-video:
        ACPI / video: disable native backlight for ThinkPad X201s
      9ef5a306
  2. 24 Sep, 2014 4 commits
    • Rafael J. Wysocki's avatar
      Revert "PM / Hibernate: Iterate over set bits instead of PFNs in swsusp_free()" · 5c4dd348
      Rafael J. Wysocki authored
      Revert commit 6efde38f (PM / Hibernate: Iterate over set bits
      instead of PFNs in swsusp_free()) that introduced a NULL pointer
      dereference during system resume from hibernation:
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<ffffffff810a8cc1>] swsusp_free+0x21/0x190
      PGD b39c2067 PUD b39c1067 PMD 0
      Oops: 0000 [#1] SMP
      Modules linked in: <irrelevant list of modules>
      CPU: 1 PID: 4898 Comm: s2disk Tainted: G         C     3.17-rc5-amd64 #1 Debian 3.17~rc5-1~exp1
      Hardware name: LENOVO 2776LEG/2776LEG, BIOS 6EET55WW (3.15 ) 12/19/2011
      task: ffff88023155ea40 ti: ffff8800b3b14000 task.ti: ffff8800b3b14000
      RIP: 0010:[<ffffffff810a8cc1>]  [<ffffffff810a8cc1>]
      swsusp_free+0x21/0x190
      RSP: 0018:ffff8800b3b17ea8  EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff8800b39bab00 RCX: 0000000000000001
      RDX: ffff8800b39bab10 RSI: ffff8800b39bab00 RDI: 0000000000000000
      RBP: 0000000000000010 R08: 0000000000000000 R09: 0000000000000000
      R10: ffff8800b39bab10 R11: 0000000000000246 R12: ffffea0000000000
      R13: ffff880232f485a0 R14: ffff88023ac27cd8 R15: ffff880232927590
      FS:  00007f406d83b700(0000) GS:ffff88023bc80000(0000)
      knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000000 CR3: 00000000b3a62000 CR4: 00000000000007e0
      Stack:
       ffff8800b39bab00 0000000000000010 ffff880232927590 ffffffff810acb4a
       ffff8800b39bab00 ffffffff811a955a ffff8800b39bab10 0000000000000000
       ffff88023155f098 ffffffff81a6b8c0 ffff88023155ea40 0000000000000007
      Call Trace:
       [<ffffffff810acb4a>] ? snapshot_release+0x2a/0xb0
       [<ffffffff811a955a>] ? __fput+0xca/0x1d0
       [<ffffffff81080627>] ? task_work_run+0x97/0xd0
       [<ffffffff81012d89>] ? do_notify_resume+0x69/0xa0
       [<ffffffff8151452a>] ? int_signal+0x12/0x17
      Code: 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 41 54 48 8b 05 ba 62 9c 00 49 bc 00 00 00 00 00 ea ff ff 48 8b 3d a1 62 9c 00 55 53 <48> 8b 10 48 89 50 18 48 8b 52 20 48 c7 40 28 00 00 00 00 c7 40
      RIP  [<ffffffff810a8cc1>] swsusp_free+0x21/0x190
       RSP <ffff8800b3b17ea8>
      CR2: 0000000000000000
      ---[ end trace f02be86a1ec0cccb ]---
      
      due to forbidden_pages_map being NULL in swsusp_free().
      
      Fixes: 6efde38f "PM / Hibernate: Iterate over set bits instead of PFNs in swsusp_free()"
      Reported-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5c4dd348
    • Srinivas Pandruvada's avatar
      gpio / ACPI: Use pin index and bit length · c15d821d
      Srinivas Pandruvada authored
      Fix code when the operation region callback is for an gpio, which
      is not at index 0 and for partial pins in a GPIO definition.
      For example:
      Name (GMOD, ResourceTemplate ()
      {
      	//3 Outputs that define the Power mode of the device
      	GpioIo (Exclusive, PullDown, , , , "\\_SB.GPI2") {10, 11, 12}
      	})
      }
      
      If opregion callback calls is for:
      - Set pin 10, then address = 0 and bit length = 1
      - Set pin 11, then address = 1 and bit length = 1
      - Set for both pin 11 and pin 12, then address = 1, bit length = 2
      
      This change requires updated ACPICA gpio operation handler code to
      send the pin index and bit length.
      
      Fixes: 473ed7be (gpio / ACPI: Add support for ACPI GPIO operation regions)
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: 3.15+ <stable@vger.kernel.org> # 3.15+: 75ec6e55 ACPICA: Update to GPIO region handler interface.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c15d821d
    • Bob Moore's avatar
      ACPICA: Update to GPIO region handler interface. · 75ec6e55
      Bob Moore authored
      Changes to correct several GPIO issues:
      
      1) The update_rule in a GPIO field definition is now ignored;
      a read-modify-write operation is never performed for GPIO fields.
      (Internally, this means that the field assembly/disassembly
      code is completely bypassed for GPIO.)
      
      2) The Address parameter passed to a GPIO region handler is
      now the bit offset of the field from a previous Connection()
      operator. Thus, it becomes a "Pin Number Index" into the
      Connection() resource descriptor.
      
      3) The bit_width parameter passed to a GPIO region handler is
      now the exact bit width of the GPIO field. Thus, it can be
      interpreted as "number of pins".
      
      Overall, we can now say that the region handler interface
      to GPIO handlers is a raw "bit/pin" addressed interface, not
      a byte-addressed interface like the system_memory handler interface.
      Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      75ec6e55
    • Fu Zhonghui's avatar
      ACPI / platform / LPSS: disable async suspend/resume of LPSS devices · 45792081
      Fu Zhonghui authored
      On some systems (Asus T100 in particular) there are strict ordering
      dependencies between LPSS devices with respect to power management
      that break if they suspend/resume asynchronously.
      
      In theory it should be possible to follow those dependencies in the
      async suspend/resume case too (the ACPI tables tell as that the
      dependencies are there), but since we're missing infrastructure
      for that at the moment, disable async suspend/resume for all of
      the LPSS devices for the time being.
      
      Link: http://marc.info/?l=linux-acpi&m=141158962321905&w=2
      Fixes: 8ce62f85 (ACPI / platform / LPSS: Enable async suspend/resume of LPSS devices)
      Signed-off-by: default avatarLi Aubrey <aubrey.li@linux.intel.com>
      Signed-off-by: default avatarFu Zhonghui <zhonghui.fu@linux.intel.com>
      Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
      [ rjw: Changelog ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      45792081
  3. 22 Sep, 2014 4 commits
    • Prarit Bhargava's avatar
      cpufreq: release policy->rwsem on error · 7106e02b
      Prarit Bhargava authored
      While debugging a cpufreq-related hardware failure on a system I saw the
      following lockdep warning:
      
       =========================
       [ BUG: held lock freed! ] 3.17.0-rc4+ #1 Tainted: G            E
       -------------------------
       insmod/2247 is freeing memory ffff88006e1b1400-ffff88006e1b17ff, with a lock still held there!
        (&policy->rwsem){+.+...}, at: [<ffffffff8156d37d>] __cpufreq_add_dev.isra.21+0x47d/0xb80
       3 locks held by insmod/2247:
        #0:  (subsys mutex#5){+.+.+.}, at: [<ffffffff81485579>] subsys_interface_register+0x69/0x120
        #1:  (cpufreq_rwsem){.+.+.+}, at: [<ffffffff8156cf73>] __cpufreq_add_dev.isra.21+0x73/0xb80
        #2:  (&policy->rwsem){+.+...}, at: [<ffffffff8156d37d>] __cpufreq_add_dev.isra.21+0x47d/0xb80
      
       stack backtrace:
       CPU: 0 PID: 2247 Comm: insmod Tainted: G            E  3.17.0-rc4+ #1
       Hardware name: HP ProLiant MicroServer Gen8, BIOS J06 08/24/2013
        0000000000000000 000000008f3063c4 ffff88006f87bb30 ffffffff8171b358
        ffff88006bcf3750 ffff88006f87bb68 ffffffff810e09e1 ffff88006e1b1400
        ffffea0001b86c00 ffffffff8156d327 ffff880073003500 0000000000000246
       Call Trace:
        [<ffffffff8171b358>] dump_stack+0x4d/0x66
        [<ffffffff810e09e1>] debug_check_no_locks_freed+0x171/0x180
        [<ffffffff8156d327>] ? __cpufreq_add_dev.isra.21+0x427/0xb80
        [<ffffffff8121412b>] kfree+0xab/0x2b0
        [<ffffffff8156d327>] __cpufreq_add_dev.isra.21+0x427/0xb80
        [<ffffffff81724cf7>] ? _raw_spin_unlock+0x27/0x40
        [<ffffffffa003517f>] ? pcc_cpufreq_do_osc+0x17f/0x17f [pcc_cpufreq]
        [<ffffffff8156da8e>] cpufreq_add_dev+0xe/0x10
        [<ffffffff814855d1>] subsys_interface_register+0xc1/0x120
        [<ffffffff8156bcf2>] cpufreq_register_driver+0x112/0x340
        [<ffffffff8121415a>] ? kfree+0xda/0x2b0
        [<ffffffffa003517f>] ? pcc_cpufreq_do_osc+0x17f/0x17f [pcc_cpufreq]
        [<ffffffffa003562e>] pcc_cpufreq_init+0x4af/0xe81 [pcc_cpufreq]
        [<ffffffffa003517f>] ? pcc_cpufreq_do_osc+0x17f/0x17f [pcc_cpufreq]
        [<ffffffff81002144>] do_one_initcall+0xd4/0x210
        [<ffffffff811f7472>] ? __vunmap+0xd2/0x120
        [<ffffffff81127155>] load_module+0x1315/0x1b70
        [<ffffffff811222a0>] ? store_uevent+0x70/0x70
        [<ffffffff811229d9>] ? copy_module_from_fd.isra.44+0x129/0x180
        [<ffffffff81127b86>] SyS_finit_module+0xa6/0xd0
        [<ffffffff81725b69>] system_call_fastpath+0x16/0x1b
       cpufreq: __cpufreq_add_dev: ->get() failed
      insmod: ERROR: could not insert module pcc-cpufreq.ko: No such device
      
      The warning occurs in the __cpufreq_add_dev() code which does
      
              down_write(&policy->rwsem);
      	...
              if (cpufreq_driver->get && !cpufreq_driver->setpolicy) {
                      policy->cur = cpufreq_driver->get(policy->cpu);
                      if (!policy->cur) {
                              pr_err("%s: ->get() failed\n", __func__);
                              goto err_get_freq;
                      }
      
      If cpufreq_driver->get(policy->cpu) returns an error we execute the
      code at err_get_freq, which does not up the policy->rwsem.  This causes
      the lockdep warning.
      
      Trivial patch to up the policy->rwsem in the error path.
      
      After the patch has been applied, and an error occurs in the
      cpufreq_driver->get(policy->cpu) call we will now see
      
      cpufreq: __cpufreq_add_dev: ->get() failed
      cpufreq: __cpufreq_add_dev: ->get() failed
      modprobe: ERROR: could not insert 'pcc_cpufreq': No such device
      
      Fixes: 4e97b631 (cpufreq: Initialize governor for a new policy under policy->rwsem)
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7106e02b
    • Lan Tianyu's avatar
      cpufreq: fix cpufreq suspend/resume for intel_pstate · 8e30444e
      Lan Tianyu authored
      Cpufreq core introduces cpufreq_suspended flag to let cpufreq sysfs nodes
      across S2RAM/S2DISK. But the flag is only set in the cpufreq_suspend()
      for cpufreq drivers which have target or target_index callback. This
      skips intel_pstate driver. This patch is to set the flag before checking
      target or target_index callback.
      
      Fixes: 2f0aea93 (cpufreq: suspend governors on system suspend/hibernate)
      Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
      Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
      [rjw: Subject]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8e30444e
    • Mika Westerberg's avatar
      ACPI / scan: Correct error return value of create_modalias() · 98d28d0e
      Mika Westerberg authored
      There is a typo, it should be negative -errno instead.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      98d28d0e
    • Aaron Lu's avatar
      ACPI / video: disable native backlight for ThinkPad X201s · 789eeea1
      Aaron Lu authored
      The ThinkPad X201s has a working ACPI video backlight interface and is
      shipped before Win8; then there is BIOS update that starts to query
      _OSI("Windows 2012") and that would make our video module stop creating
      backlight interface and caused problem for the user. Add it to the DMI
      table to disable native backlight to fix this problem.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=81691
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=51231
      Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
      Reported-and-tested-by: default avatarYves-Alexis Perez <corsac@debian.org>
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      789eeea1
  4. 21 Sep, 2014 4 commits
    • Linus Torvalds's avatar
      Linux 3.17-rc6 · 0f33be00
      Linus Torvalds authored
      0f33be00
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · dae0af78
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Fixes for ARM, the most notable being the fix from Nathan Lynch to fix
        the state of various registers during execve, to ensure that data
        can't be leaked between two executables.
      
        Fixes from Victor Kamensky for get_user() on big endian platforms,
        since the addition of 8-byte get_user() support broke these fairly
        badly.
      
        A fix from Sudeep Holla for affinity setting when hotplugging CPU 0.
      
        A fix from Stephen Boyd for a perf-induced sleep attempt while atomic.
      
        Lastly, a correctness fix for emulation of the SWP instruction on
        ARMv7+, and a fix for wrong carry handling when updating the
        translation table base address on LPAE platforms"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8149/1: perf: Don't sleep while atomic when enabling per-cpu interrupts
        ARM: 8148/1: flush TLS and thumbee register state during exec
        ARM: 8151/1: add missing exports for asm functions required by get_user macro
        ARM: 8137/1: fix get_user BE behavior for target variable with size of 8 bytes
        ARM: 8135/1: Fix in-correct barrier usage in SWP{B} emulation
        ARM: 8133/1: use irq_set_affinity with force=false when migrating irqs
        ARM: 8132/1: LPAE: drop wrong carry flag correction after adding TTBR1_OFFSET
      dae0af78
    • Linus Torvalds's avatar
      Merge tag 'media-v3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · c1f03b48
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "some media bug fixes:
         - a Kconfig dependency issue
         - some fixes for af9033/it913x demod to be more reliable and address
           a performance regression
         - cx18: fix an oops on devices with tda8290 tuner
         - two new USB IDs for af9035
         - a couple fixes on smapp driver"
      
      * tag 'media-v3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] af9035: new IDs: add support for PCTV 78e and PCTV 79e
        [media] af9033: feed clock to RF tuner
        [media] it913x: init tuner on attach
        [media] af9033: update IT9135 tuner inittabs
        [media] Kconfig: do not select SPI bus on sub-driver auto-select
        [media] cx18: fix kernel oops with tda8290 tuner
        [media] smiapp: Set sub-device owner
        [media] smiapp: Fix power count handling
      c1f03b48
    • Rafael J. Wysocki's avatar
      ACPI / hotplug: Generate online uevents for ACPI containers · 8ab17fc9
      Rafael J. Wysocki authored
      Commit 46394fd0 (ACPI / hotplug: Move container-specific code out of
      the core) removed the generation of "online" uevents for containers,
      because "add" uevents are now generated for them automatically when
      container system devices are registered.  However, there are user
      space tools that need to be notified when the container and all of
      its children have been enumerated, which doesn't happen any more.
      
      For this reason, add a mechanism allowing "online" uevents to be
      generated for ACPI containers after enumerating the container along
      with all of its children.
      
      Fixes: 46394fd0 (ACPI / hotplug: Move container-specific code out of the core)
      Reported-and-tested-by: default avatarYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8ab17fc9
  5. 20 Sep, 2014 8 commits
  6. 19 Sep, 2014 18 commits