1. 10 Jul, 2015 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo-2' of... · 4756e196
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
        - Fix 'perf top -u username', where not enough memory per thread_map
          entry was being allocated nor was being initialized, causing a
          segfault (Arnaldo Carvalho de Melo)
      
        - Fix locking lockup using 32-bit compat vdso (Adrian Hunter)
      
        - Fix shadow declaration of 'close' with older build environments (Jiri Olsa)
      
        - Make the 'clean' target do a better job, removing some more temp files (Riku Voipio)
      
        - The python binding also has a MANIFEST like file where we list the files that
          need to be built and linked to form the resulting python shared object module
          file. And it has an entry for rbtree.c that still pointed to the one in the
          kernel sources, fix it by also removing one level of indirection so that it
          uses the tools/lib/rbtree.c copy. (Arnaldo Carvalho de Melo)
      
        - For the same reasons as for rbtree.c, copy the kernel lib/hweight.c file to
          tools/lib/, sanitizing it in the process to remove kernel specific stuff like
          EXPORT_SYMBOL() lines and the linux/export.h include reference, as that file
          doesn't exist anymore in tools/include/linux. (Arnaldo Carvalho de Melo)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4756e196
  2. 09 Jul, 2015 19 commits
  3. 08 Jul, 2015 5 commits
  4. 07 Jul, 2015 9 commits
  5. 06 Jul, 2015 6 commits
    • Suthikulpanit, Suravee's avatar
      ata: ahci_platform: Add ACPI _CLS matching · 2051e924
      Suthikulpanit, Suravee authored
      This patch adds ACPI supports for AHCI platform driver, which uses _CLS
      method to match the device.
      
      The following is an example of ASL structure in DSDT for a SATA controller,
      which contains _CLS package to be matched by the ahci_platform driver:
      
        Device (AHC0) // AHCI Controller
        {
          Name(_HID, "AMDI0600")
          Name (_CCA, 1)
          Name (_CLS, Package (3)
          {
            0x01, // Base Class: Mass Storage
            0x06, // Sub-Class: serial ATA
            0x01, // Interface: AHCI
          })
          Name (_CRS, ResourceTemplate ()
          {
            Memory32Fixed (ReadWrite, 0xE0300000, 0x00010000)
            Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 387 }
          })
        }
      
      Also, since ATA driver should not require PCI support for ATA_ACPI,
      this patch removes dependency in the driver/ata/Kconfig.
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: default avatarSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2051e924
    • Suthikulpanit, Suravee's avatar
      ACPI / scan: Add support for ACPI _CLS device matching · 26095a01
      Suthikulpanit, Suravee authored
      Device drivers typically use ACPI _HIDs/_CIDs listed in struct device_driver
      acpi_match_table to match devices. However, for generic drivers, we do not
      want to list _HID for all supported devices. Also, certain classes of devices
      do not have _CID (e.g. SATA, USB). Instead, we can leverage ACPI _CLS,
      which specifies PCI-defined class code (i.e. base-class, subclass and
      programming interface). This patch adds support for matching ACPI devices using
      the _CLS method.
      
      To support loadable module, current design uses _HID or _CID to match device's
      modalias. With the new way of matching with _CLS this would requires modification
      to the current ACPI modalias key to include _CLS. This patch appends PCI-defined
      class-code to the existing ACPI modalias as following.
      
          acpi:<HID>:<CID1>:<CID2>:..:<CIDn>:<bbsspp>:
      E.g:
          # cat /sys/devices/platform/AMDI0600:00/modalias
          acpi:AMDI0600:010601:
      
      where bb is th base-class code, ss is te sub-class code, and pp is the
      programming interface code
      
      Since there would not be _HID/_CID in the ACPI matching table of the driver,
      this patch adds a field to acpi_device_id to specify the matching _CLS.
      
          static const struct acpi_device_id ahci_acpi_match[] = {
              { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
              {},
          };
      
      In this case, the corresponded entry in modules.alias file would be:
      
          alias acpi*:010601:* ahci_platform
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: default avatarSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      26095a01
    • Uwe Geuder's avatar
      PM / hibernate: clarify resume documentation · b51f9b10
      Uwe Geuder authored
      it was not the whole truth that kernel mode cannot be used with swap on LVM
      Signed-off-by: default avatarUwe Geuder <linuxkernel2015-ugeuder@snkmail.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b51f9b10
    • Geert Uytterhoeven's avatar
      PM / Domains: Avoid infinite loops in attach/detach code · 93af5e93
      Geert Uytterhoeven authored
      If pm_genpd_{add,remove}_device() keeps on failing with -EAGAIN, we end
      up with an infinite loop in genpd_dev_pm_{at,de}tach().
      
      This may happen due to a genpd.prepared_count imbalance.  This is a bug
      elsewhere, but it will result in a system lock up, possibly during
      reboot of an otherwise functioning system.
      
      To avoid this, put a limit on the maximum number of loop iterations,
      using an exponential back-off mechanism.  If the limit is reached, the
      operation will just fail.  An error message is already printed.
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      93af5e93
    • Rafael J. Wysocki's avatar
      ACPI / LPSS: Fix up acpi_lpss_create_device() · d3e13ff3
      Rafael J. Wysocki authored
      Fix a return value (which should be a negative error code) and a
      memory leak (the list allocated by acpi_dev_get_resources() needs
      to be freed on ioremap() errors too) in acpi_lpss_create_device()
      introduced by commit 4483d59e 'ACPI / LPSS: check the result
      of ioremap()'.
      
      Fixes: 4483d59e 'ACPI / LPSS: check the result of ioremap()'
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: 4.0+ <stable@vger.kernel.org> # 4.0+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d3e13ff3
    • Rafael J. Wysocki's avatar
      ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage · 0294112e
      Rafael J. Wysocki authored
      This effectively reverts the following three commits:
      
       7bc10388 ACPI / resources: free memory on error in add_region_before()
       0f1b414d ACPI / PNP: Avoid conflicting resource reservations
       b9a5e5e1 ACPI / init: Fix the ordering of acpi_reserve_resources()
      
      (commit b9a5e5e1 introduced regressions some of which, but not
      all, were addressed by commit 0f1b414d and commit 7bc10388
      was a fixup on top of the latter) and causes ACPI fixed hardware
      resources to be reserved at the fs_initcall_sync stage of system
      initialization.
      
      The story is as follows.  First, a boot regression was reported due
      to an apparent resource reservation ordering change after a commit
      that shouldn't lead to such changes.  Investigation led to the
      conclusion that the problem happened because acpi_reserve_resources()
      was executed at the device_initcall() stage of system initialization
      which wasn't strictly ordered with respect to driver initialization
      (and with respect to the initialization of the pcieport driver in
      particular), so a random change causing the device initcalls to be
      run in a different order might break things.
      
      The response to that was to attempt to run acpi_reserve_resources()
      as soon as we knew that ACPI would be in use (commit b9a5e5e1).
      However, that turned out to be too early, because it caused resource
      reservations made by the PNP system driver to fail on at least one
      system and that failure was addressed by commit 0f1b414d.
      
      That fix still turned out to be insufficient, though, because
      calling acpi_reserve_resources() before the fs_initcall stage of
      system initialization caused a boot regression to happen on the
      eCAFE EC-800-H20G/S netbook.  That meant that we only could call
      acpi_reserve_resources() at the fs_initcall initialization stage
      or later, but then we might just as well call it after the PNP
      initalization in which case commit 0f1b414d wouldn't be
      necessary any more.
      
      For this reason, the changes made by commit 0f1b414d are reverted
      (along with a memory leak fixup on top of that commit), the changes
      made by commit b9a5e5e1 that went too far are reverted too and
      acpi_reserve_resources() is changed into fs_initcall_sync, which
      will cause it to be executed after the PNP subsystem initialization
      (which is an fs_initcall) and before device initcalls (including
      the pcieport driver initialization) which should avoid the initial
      issue.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=100581
      Link: http://marc.info/?t=143092384600002&r=1&w=2
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=99831
      Link: http://marc.info/?t=143389402600001&r=1&w=2
      Fixes: b9a5e5e1 "ACPI / init: Fix the ordering of acpi_reserve_resources()"
      Reported-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0294112e