1. 16 8月, 2019 1 次提交
  2. 07 8月, 2019 1 次提交
  3. 26 7月, 2019 1 次提交
    • R
      ACPICA: Clear status of GPEs on first direct enable · f6502ce4
      Rafael J. Wysocki 提交于
      [ Upstream commit 44758bafa53602f2581a6857bb20b55d4d8ad5b2 ]
      
      ACPI GPEs (other than the EC one) can be enabled in two situations.
      First, the GPEs with existing _Lxx and _Exx methods are enabled
      implicitly by ACPICA during system initialization.  Second, the
      GPEs without these methods (like GPEs listed by _PRW objects for
      wakeup devices) need to be enabled directly by the code that is
      going to use them (e.g. ACPI power management or device drivers).
      
      In the former case, if the status of a given GPE is set to start
      with, its handler method (either _Lxx or _Exx) needs to be invoked
      to take care of the events (possibly) signaled before the GPE was
      enabled.  In the latter case, however, the first caller of
      acpi_enable_gpe() for a given GPE should not be expected to care
      about any events that might be signaled through it earlier.  In
      that case, it is better to clear the status of the GPE before
      enabling it, to prevent stale events from triggering unwanted
      actions (like spurious system resume, for example).
      
      For this reason, modify acpi_ev_add_gpe_reference() to take an
      additional boolean argument indicating whether or not the GPE
      status needs to be cleared when its reference counter changes from
      zero to one and make acpi_enable_gpe() pass TRUE to it through
      that new argument.
      
      Fixes: 18996f2d ("ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume")
      Reported-by: NFurquan Shaikh <furquan@google.com>
      Tested-by: NFurquan Shaikh <furquan@google.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      f6502ce4
  4. 22 6月, 2019 1 次提交
  5. 11 6月, 2019 1 次提交
    • K
      pstore: Convert buf_lock to semaphore · d4128a1b
      Kees Cook 提交于
      commit ea84b580b95521644429cc6748b6c2bf27c8b0f3 upstream.
      
      Instead of running with interrupts disabled, use a semaphore. This should
      make it easier for backends that may need to sleep (e.g. EFI) when
      performing a write:
      
      |BUG: sleeping function called from invalid context at kernel/sched/completion.c:99
      |in_atomic(): 1, irqs_disabled(): 1, pid: 2236, name: sig-xstate-bum
      |Preemption disabled at:
      |[<ffffffff99d60512>] pstore_dump+0x72/0x330
      |CPU: 26 PID: 2236 Comm: sig-xstate-bum Tainted: G      D           4.20.0-rc3 #45
      |Call Trace:
      | dump_stack+0x4f/0x6a
      | ___might_sleep.cold.91+0xd3/0xe4
      | __might_sleep+0x50/0x90
      | wait_for_completion+0x32/0x130
      | virt_efi_query_variable_info+0x14e/0x160
      | efi_query_variable_store+0x51/0x1a0
      | efivar_entry_set_safe+0xa3/0x1b0
      | efi_pstore_write+0x109/0x140
      | pstore_dump+0x11c/0x330
      | kmsg_dump+0xa4/0xd0
      | oops_exit+0x22/0x30
      ...
      Reported-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Fixes: 21b3ddd3 ("efi: Don't use spinlocks for efi vars")
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d4128a1b
  6. 31 5月, 2019 2 次提交
    • K
      ACPI/IORT: Reject platform device creation on NUMA node mapping failure · 9082058b
      Kefeng Wang 提交于
      [ Upstream commit 36a2ba07757df790b4a874efb1a105b9330a9ae7 ]
      
      In a system where, through IORT firmware mappings, the SMMU device is
      mapped to a NUMA node that is not online, the kernel bootstrap results
      in the following crash:
      
        Unable to handle kernel paging request at virtual address 0000000000001388
        Mem abort info:
          ESR = 0x96000004
          Exception class = DABT (current EL), IL = 32 bits
          SET = 0, FnV = 0
          EA = 0, S1PTW = 0
        Data abort info:
          ISV = 0, ISS = 0x00000004
          CM = 0, WnR = 0
        [0000000000001388] user address but active_mm is swapper
        Internal error: Oops: 96000004 [#1] SMP
        Modules linked in:
        CPU: 5 PID: 1 Comm: swapper/0 Not tainted 5.0.0 #15
        pstate: 80c00009 (Nzcv daif +PAN +UAO)
        pc : __alloc_pages_nodemask+0x13c/0x1068
        lr : __alloc_pages_nodemask+0xdc/0x1068
        ...
        Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____))
        Call trace:
         __alloc_pages_nodemask+0x13c/0x1068
         new_slab+0xec/0x570
         ___slab_alloc+0x3e0/0x4f8
         __slab_alloc+0x60/0x80
         __kmalloc_node_track_caller+0x10c/0x478
         devm_kmalloc+0x44/0xb0
         pinctrl_bind_pins+0x4c/0x188
         really_probe+0x78/0x2b8
         driver_probe_device+0x64/0x110
         device_driver_attach+0x74/0x98
         __driver_attach+0x9c/0xe8
         bus_for_each_dev+0x84/0xd8
         driver_attach+0x30/0x40
         bus_add_driver+0x170/0x218
         driver_register+0x64/0x118
         __platform_driver_register+0x54/0x60
         arm_smmu_driver_init+0x24/0x2c
         do_one_initcall+0xbc/0x328
         kernel_init_freeable+0x304/0x3ac
         kernel_init+0x18/0x110
         ret_from_fork+0x10/0x1c
        Code: f90013b5 b9410fa1 1a9f0694 b50014c2 (b9400804)
        ---[ end trace dfeaed4c373a32da ]--
      
      Change the dev_set_proximity() hook prototype so that it returns a
      value and make it return failure if the PXM->NUMA-node mapping
      corresponds to an offline node, fixing the crash.
      Acked-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Link: https://lore.kernel.org/linux-arm-kernel/20190315021940.86905-1-wangkefeng.wang@huawei.com/Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      9082058b
    • P
      ACPI / property: fix handling of data_nodes in acpi_get_next_subnode() · 07bb9a71
      Pierre-Louis Bossart 提交于
      [ Upstream commit 23583f7795025e3c783b680d906509366b0906ad ]
      
      When the DSDT tables expose devices with subdevices and a set of
      hierarchical _DSD properties, the data returned by
      acpi_get_next_subnode() is incorrect, with the results suggesting a bad
      pointer assignment. The parser works fine with device_nodes or
      data_nodes, but not with a combination of the two.
      
      The problem is traced to an invalid pointer used when jumping from
      handling device_nodes to data nodes. The existing code looks for data
      nodes below the last subdevice found instead of the common root. Fix
      by forcing the acpi_device pointer to be derived from the same fwnode
      for the two types of subnodes.
      
      This same problem of handling device and data nodes was already fixed
      in a similar way by 'commit bf4703fd ("ACPI / property: fix data
      node parsing in acpi_get_next_subnode()")' but broken later by 'commit
      34055190 ("ACPI / property: Add fwnode_get_next_child_node()")', so
      this should probably go to linux-stable all the way to 4.12
      Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      07bb9a71
  7. 22 5月, 2019 1 次提交
    • R
      ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle · 770e46b3
      Rajat Jain 提交于
      commit 2f844b61db8297a1f7a06adf2eb5c43381f2c183 upstream.
      
      I noticed that recently multiple systems (chromebooks) couldn't wake
      from S0ix using LID or Keyboard after updating to a newer kernel. I
      bisected and it turned up commit f941d3e41da7 ("ACPI: EC / PM: Disable
      non-wakeup GPEs for suspend-to-idle"). I checked that the issue got
      fixed if that commit was reverted.
      
      I debugged and found that although PNP0C0D:00 (representing the LID)
      is wake capable and should wakeup the system per the code in
      acpi_wakeup_gpe_init() and in drivers/acpi/button.c:
      
      localhost /sys # cat /proc/acpi/wakeup
      Device  S-state   Status   Sysfs node
      LID0      S4    *enabled   platform:PNP0C0D:00
      CREC      S5    *disabled  platform:GOOG0004:00
                      *disabled  platform:cros-ec-dev.1.auto
                      *disabled  platform:cros-ec-accel.0
                      *disabled  platform:cros-ec-accel.1
                      *disabled  platform:cros-ec-gyro.0
                      *disabled  platform:cros-ec-ring.0
                      *disabled  platform:cros-usbpd-charger.2.auto
                      *disabled  platform:cros-usbpd-logger.3.auto
      D015      S3    *enabled   i2c:i2c-ELAN0000:00
      PENH      S3    *enabled   platform:PRP0001:00
      XHCI      S3    *enabled   pci:0000:00:14.0
      GLAN      S4    *disabled
      WIFI      S3    *disabled  pci:0000:00:14.3
      localhost /sys #
      
      On debugging, I found that its corresponding GPE is not being enabled.
      The particular GPE's "gpe_register_info->enable_for_wake" does not
      have any bits set when acpi_enable_all_wakeup_gpes() comes around to
      use it. I looked at code and could not find any other code path that
      should set the bits in "enable_for_wake" bitmask for the wake enabled
      devices for s2idle.  [I do see that it happens for S3 in
      acpi_sleep_prepare()].
      
      Thus I used the same call to enable the GPEs for wake enabled devices,
      and verified that this fixes the regression I was seeing on multiple
      of my devices.
      
      [ rjw: The problem is that commit f941d3e41da7 ("ACPI: EC / PM:
        Disable non-wakeup GPEs for suspend-to-idle") forgot to add
        the acpi_enable_wakeup_devices() call for s2idle along with
        acpi_enable_all_wakeup_gpes(). ]
      
      Fixes: f941d3e41da7 ("ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=203579Signed-off-by: NRajat Jain <rajatja@google.com>
      [ rjw: Subject & changelog ]
      Cc: 5.0+ <stable@vger.kernel.org> # 5.0+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      770e46b3
  8. 17 5月, 2019 1 次提交
  9. 15 5月, 2019 1 次提交
    • P
      x86/cpu: Sanitize FAM6_ATOM naming · 1f1bc822
      Peter Zijlstra 提交于
      commit f2c4db1bd80720cd8cb2a5aa220d9bc9f374f04e upstream
      
      Going primarily by:
      
        https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors
      
      with additional information gleaned from other related pages; notably:
      
       - Bonnell shrink was called Saltwell
       - Moorefield is the Merriefield refresh which makes it Airmont
      
      The general naming scheme is: FAM6_ATOM_UARCH_SOCTYPE
      
        for i in `git grep -l FAM6_ATOM` ; do
      	sed -i  -e 's/ATOM_PINEVIEW/ATOM_BONNELL/g'		\
      		-e 's/ATOM_LINCROFT/ATOM_BONNELL_MID/'		\
      		-e 's/ATOM_PENWELL/ATOM_SALTWELL_MID/g'		\
      		-e 's/ATOM_CLOVERVIEW/ATOM_SALTWELL_TABLET/g'	\
      		-e 's/ATOM_CEDARVIEW/ATOM_SALTWELL/g'		\
      		-e 's/ATOM_SILVERMONT1/ATOM_SILVERMONT/g'	\
      		-e 's/ATOM_SILVERMONT2/ATOM_SILVERMONT_X/g'	\
      		-e 's/ATOM_MERRIFIELD/ATOM_SILVERMONT_MID/g'	\
      		-e 's/ATOM_MOOREFIELD/ATOM_AIRMONT_MID/g'	\
      		-e 's/ATOM_DENVERTON/ATOM_GOLDMONT_X/g'		\
      		-e 's/ATOM_GEMINI_LAKE/ATOM_GOLDMONT_PLUS/g' ${i}
        done
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: dave.hansen@linux.intel.com
      Cc: len.brown@intel.com
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1f1bc822
  10. 04 5月, 2019 1 次提交
  11. 27 4月, 2019 4 次提交
  12. 20 4月, 2019 4 次提交
  13. 17 4月, 2019 3 次提交
    • E
      ACPICA: AML interpreter: add region addresses in global list during initialization · f8053df6
      Erik Schmauss 提交于
      commit 4abb951b73ff0a8a979113ef185651aa3c8da19b upstream.
      
      The table load process omitted adding the operation region address
      range to the global list. This omission is problematic because the OS
      queries the global list to check for address range conflicts before
      deciding which drivers to load. This commit may result in warning
      messages that look like the following:
      
      [    7.871761] ACPI Warning: system_IO range 0x00000428-0x0000042F conflicts with op_region 0x00000400-0x0000047F (\PMIO) (20180531/utaddress-213)
      [    7.871769] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
      
      However, these messages do not signify regressions. It is a result of
      properly adding address ranges within the global address list.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=200011Tested-by: NJean-Marc Lenoir <archlinux@jihemel.com>
      Signed-off-by: NErik Schmauss <erik.schmauss@intel.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f8053df6
    • E
      ACPICA: Namespace: remove address node from global list after method termination · d4b4aeea
      Erik Schmauss 提交于
      commit c5781ffbbd4f742a58263458145fe7f0ac01d9e0 upstream.
      
      ACPICA commit b233720031a480abd438f2e9c643080929d144c3
      
      ASL operation_regions declare a range of addresses that it uses. In a
      perfect world, the range of addresses should be used exclusively by
      the AML interpreter. The OS can use this information to decide which
      drivers to load so that the AML interpreter and device drivers use
      different regions of memory.
      
      During table load, the address information is added to a global
      address range list. Each node in this list contains an address range
      as well as a namespace node of the operation_region. This list is
      deleted at ACPI shutdown.
      
      Unfortunately, ASL operation_regions can be declared inside of control
      methods. Although this is not recommended, modern firmware contains
      such code. New module level code changes unintentionally removed the
      functionality of adding and removing nodes to the global address
      range list.
      
      A few months ago, support for adding addresses has been re-
      implemented. However, the removal of the address range list was
      missed and resulted in some systems to crash due to the address list
      containing bogus namespace nodes from operation_regions declared in
      control methods. In order to fix the crash, this change removes
      dynamic operation_regions after control method termination.
      
      Link: https://github.com/acpica/acpica/commit/b2337200
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=202475
      Fixes: 4abb951b73ff ("ACPICA: AML interpreter: add region addresses in global list during initialization")
      Reported-by: NMichael J Gruber <mjg@fedoraproject.org>
      Signed-off-by: NErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Cc: 4.20+ <stable@vger.kernel.org> # 4.20+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d4b4aeea
    • F
      ACPICA: Clear status of GPEs before enabling them · ed52b07b
      Furquan Shaikh 提交于
      commit c8b1917c8987a6fa3695d479b4d60fbbbc3e537b upstream.
      
      Commit 18996f2d ("ACPICA: Events: Stop unconditionally clearing
      ACPI IRQs during suspend/resume") was added to stop clearing event
      status bits unconditionally in the system-wide suspend and resume
      paths. This was done because of an issue with a laptop lid appaering
      to be closed even when it was used to wake up the system from suspend
      (see https://bugzilla.kernel.org/show_bug.cgi?id=196249), which
      happened because event status bits were cleared unconditionally on
      system resume. Though this change fixed the issue in the resume path,
      it introduced regressions in a few suspend paths.
      
      First regression was reported and fixed in the S5 entry path by commit
      fa85015c ("ACPICA: Clear status of all events when entering S5").
      Next regression was reported and fixed for all legacy sleep paths by
      commit f317c7dc ("ACPICA: Clear status of all events when entering
      sleep states").  However, there still is a suspend-to-idle regression,
      since suspend-to-idle does not follow the legacy sleep paths.
      
      In the suspend-to-idle case, wakeup is enabled as part of device
      suspend.  If the status bits of wakeup GPEs are set when they are
      enabled, it causes a premature system wakeup to occur.
      
      To address that problem, partially revert commit 18996f2d to
      restore GPE status bits clearing before the GPE is enabled in
      acpi_ev_enable_gpe().
      
      Fixes: 18996f2d ("ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume")
      Signed-off-by: NFurquan Shaikh <furquan@google.com>
      Cc: 4.17+ <stable@vger.kernel.org> # 4.17+
      [ rjw: Subject & changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ed52b07b
  14. 06 4月, 2019 2 次提交
    • H
      ACPI / video: Extend chassis-type detection with a "Lunch Box" check · 09abe130
      Hans de Goede 提交于
      [ Upstream commit d693c008e3ca04db5916ff72e68ce661888a913b ]
      
      Commit 53fa1f6e ("ACPI / video: Only default only_lcd to true on
      Win8-ready _desktops_") introduced chassis type detection, limiting the
      lcd_only check for the backlight to devices where the chassis-type
      indicates their is no builtin LCD panel.
      
      The purpose of the lcd_only check is to avoid advertising a backlight
      interface on desktops, since skylake and newer machines seem to always
      have a backlight interface even if there is no LCD panel. The limiting
      of this check to desktops only was done to avoid breaking backlight
      support on some laptops which do not have the lcd flag set.
      
      The Fujitsu ESPRIMO Q910 which is a compact (NUC like) desktop machine
      has a chassis type of 0x10 aka "Lunch Box". Without the lcd_only check
      we end up falsely advertising backlight/brightness control on this
      device. This commit extend the dmi_is_desktop check to return true
      for type 0x10 to fix this.
      
      Fixes: 53fa1f6e ("ACPI / video: Only default only_lcd to true ...")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      09abe130
    • H
      ACPI / video: Refactor and fix dmi_is_desktop() · 2df541d0
      Hans de Goede 提交于
      [ Upstream commit cecf3e3e0803462335e25d083345682518097334 ]
      
      This commit refactors the chassis-type detection introduced by
      commit 53fa1f6e ("ACPI / video: Only default only_lcd to true on
      Win8-ready _desktops_") (where desktop means anything without a builtin
      screen).
      
      The DMI chassis_type is an unsigned integer, so rather then doing a
      whole bunch of string-compares on it, convert it to an int and feed
      the result to a switch case.
      
      Note the switch case uses hex values, this is done because the spec
      uses hex values too. This changes the check for "Main Server Chassis"
      from checking for 11 decimal to 11 hexadecimal, this is a bug fix,
      the original check for 11 decimal was wrong.
      
      Fixes: 53fa1f6e ("ACPI / video: Only default only_lcd to true ...")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      [ rjw: Drop redundant return statements ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      2df541d0
  15. 24 3月, 2019 5 次提交
  16. 27 2月, 2019 1 次提交
  17. 20 2月, 2019 1 次提交
    • C
      ACPI: NUMA: Use correct type for printing addresses on i386-PAE · db8c9ab3
      Chao Fan 提交于
      [ Upstream commit b9ced18acf68dffebe6888c7ec765a2b1db7a039 ]
      
      The addresses of NUMA nodes are not printed correctly on i386-PAE
      which is misleading.
      
      Here is a debian9-32bit with PAE in a QEMU guest having more than 4G
      of memory:
      
      qemu-system-i386 \
      -hda /var/lib/libvirt/images/debian32.qcow2 \
      -m 5G \
      -enable-kvm \
      -smp 10 \
      -numa node,mem=512M,nodeid=0,cpus=0 \
      -numa node,mem=512M,nodeid=1,cpus=1 \
      -numa node,mem=512M,nodeid=2,cpus=2 \
      -numa node,mem=512M,nodeid=3,cpus=3 \
      -numa node,mem=512M,nodeid=4,cpus=4 \
      -numa node,mem=512M,nodeid=5,cpus=5 \
      -numa node,mem=512M,nodeid=6,cpus=6 \
      -numa node,mem=512M,nodeid=7,cpus=7 \
      -numa node,mem=512M,nodeid=8,cpus=8 \
      -numa node,mem=512M,nodeid=9,cpus=9 \
      -serial stdio
      
      Because of the wrong value type, it prints as below:
      
      [    0.021049] ACPI: SRAT Memory (0x0 length 0xa0000) in proximity domain 0 enabled
      [    0.021740] ACPI: SRAT Memory (0x100000 length 0x1ff00000) in proximity domain 0 enabled
      [    0.022425] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 1 enabled
      [    0.023092] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 2 enabled
      [    0.023764] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 3 enabled
      [    0.024431] ACPI: SRAT Memory (0x80000000 length 0x20000000) in proximity domain 4 enabled
      [    0.025104] ACPI: SRAT Memory (0xa0000000 length 0x20000000) in proximity domain 5 enabled
      [    0.025791] ACPI: SRAT Memory (0x0 length 0x20000000) in proximity domain 6 enabled
      [    0.026412] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 7 enabled
      [    0.027118] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 8 enabled
      [    0.027802] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 9 enabled
      
      The upper half of the start address of the NUMA domains between 6
      and 9 inclusive was cut, so the printed values are incorrect.
      
      Fix the value type, to get the correct values in the log as follows:
      
      [    0.023698] ACPI: SRAT Memory (0x0 length 0xa0000) in proximity domain 0 enabled
      [    0.024325] ACPI: SRAT Memory (0x100000 length 0x1ff00000) in proximity domain 0 enabled
      [    0.024981] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 1 enabled
      [    0.025659] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 2 enabled
      [    0.026317] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 3 enabled
      [    0.026980] ACPI: SRAT Memory (0x80000000 length 0x20000000) in proximity domain 4 enabled
      [    0.027635] ACPI: SRAT Memory (0xa0000000 length 0x20000000) in proximity domain 5 enabled
      [    0.028311] ACPI: SRAT Memory (0x100000000 length 0x20000000) in proximity domain 6 enabled
      [    0.028985] ACPI: SRAT Memory (0x120000000 length 0x20000000) in proximity domain 7 enabled
      [    0.029667] ACPI: SRAT Memory (0x140000000 length 0x20000000) in proximity domain 8 enabled
      [    0.030334] ACPI: SRAT Memory (0x160000000 length 0x20000000) in proximity domain 9 enabled
      Signed-off-by: NChao Fan <fanc.fnst@cn.fujitsu.com>
      [ rjw: Subject & changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      db8c9ab3
  18. 13 2月, 2019 2 次提交
  19. 31 1月, 2019 2 次提交
  20. 17 1月, 2019 3 次提交
    • J
      ACPI/IORT: Fix rc_dma_get_range() · 3fdb8121
      Jean-Philippe Brucker 提交于
      commit c7777236dd8f587f6a8d6800c03df318fd4d2627 upstream.
      
      When executed for a PCI_ROOT_COMPLEX type, iort_match_node_callback()
      expects the opaque pointer argument to be a PCI bus device. At the
      moment rc_dma_get_range() passes the PCI endpoint instead of the bus,
      and we've been lucky to have pci_domain_nr(ptr) return 0 instead of
      crashing. Pass the bus device to iort_scan_node().
      
      Fixes: 5ac65e8c ("ACPI/IORT: Support address size limit for root complexes")
      Reported-by: NEric Auger <eric.auger@redhat.com>
      Signed-off-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      Cc: stable@vger.kernel.org
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3fdb8121
    • H
      ACPI / PMIC: xpower: Fix TS-pin current-source handling · 6fd3d197
      Hans de Goede 提交于
      commit 2b531d71595d2b5b12782a49b23c335869e2621e upstream.
      
      The current-source used for the battery temp-sensor (TS) is shared with the
      GPADC. For proper fuel-gauge and charger operation the TS current-source
      needs to be permanently on. But to read the GPADC we need to temporary
      switch the TS current-source to ondemand, so that the GPADC can use it,
      otherwise we will always read an all 0 value.
      
      The switching from on to on-ondemand is not necessary when the TS
      current-source is off (this happens on devices which do not have a TS).
      
      Prior to this commit there were 2 issues with our handling of the TS
      current-source switching:
      
       1) We were writing hardcoded values to the ADC TS pin-ctrl register,
       overwriting various other unrelated bits. Specifically we were overwriting
       the current-source setting for the TS and GPIO0 pins, forcing it to 80ųA
       independent of its original setting. On a Chuwi Vi10 tablet this was
       causing us to get a too high adc value (due to a too high current-source)
       resulting in acpi_lpat_raw_to_temp() returning -ENOENT, resulting in:
      
      ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
      ACPI Error: Method parse/execution failed \_SB.SXP1._TMP, AE_ERROR
      
      This commit fixes this by using regmap_update_bits to change only the
      relevant bits.
      
       2) At the end of intel_xpower_pmic_get_raw_temp() we were unconditionally
       enabling the TS current-source even on devices where the TS-pin is not used
       and the current-source thus was off on entry of the function.
      
      This commit fixes this by checking if the TS current-source is off when
      entering intel_xpower_pmic_get_raw_temp() and if so it is left as is.
      
      Fixes: 58eefe2f (ACPI / PMIC: xpower: Do pinswitch ... reading GPADC)
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: 4.14+ <stable@vger.kernel.org> # 4.14+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6fd3d197
    • H
      ACPI: power: Skip duplicate power resource references in _PRx · fec73611
      Hans de Goede 提交于
      commit 7d7b467cb95bf29597b417d4990160d4ea6d69b9 upstream.
      
      Some ACPI tables contain duplicate power resource references like this:
      
              Name (_PR0, Package (0x04)  // _PR0: Power Resources for D0
              {
                  P28P,
                  P18P,
                  P18P,
                  CLK4
              })
      
      This causes a WARN_ON in sysfs_add_link_to_group() because we end up
      adding a link to the same acpi_device twice:
      
      sysfs: cannot create duplicate filename '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/808622C1:00/OVTI2680:00/power_resources_D0/LNXPOWER:0a'
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.12-301.fc29.x86_64 #1
      Hardware name: Insyde CherryTrail/Type2 - Board Product Name, BIOS jumperx.T87.KFBNEEA02 04/13/2016
      Call Trace:
       dump_stack+0x5c/0x80
       sysfs_warn_dup.cold.3+0x17/0x2a
       sysfs_do_create_link_sd.isra.2+0xa9/0xb0
       sysfs_add_link_to_group+0x30/0x50
       acpi_power_expose_list+0x74/0xa0
       acpi_power_add_remove_device+0x50/0xa0
       acpi_add_single_object+0x26b/0x5f0
       acpi_bus_check_add+0xc4/0x250
       ...
      
      To address this issue, make acpi_extract_power_resources() check for
      duplicates and simply skip them when found.
      
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      [ rjw: Subject & changelog, comments ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fec73611
  21. 21 12月, 2018 1 次提交
  22. 17 12月, 2018 1 次提交