1. 08 2月, 2019 2 次提交
  2. 14 1月, 2019 3 次提交
  3. 11 1月, 2019 1 次提交
  4. 08 1月, 2019 1 次提交
    • Q
      ACPI/IORT: Fix build when CONFIG_IOMMU_API=n · 6b68835b
      Qian Cai 提交于
      Commit 8097e53e ("ACPI/IORT: Use helper functions to access
      dev->iommu_fwspec") changed by mistake the iort_fwspec_iommu_ops() stub
      definition (compiled in when CONFIG_IOMMU_API=n), that caused the
      following compilation failure:
      
      drivers/acpi/arm64/iort.c:880:1: error: expected identifier or
      '(' before '{' token
       { return NULL; }
       ^
      drivers/acpi/arm64/iort.c:879:39: warning: 'iort_fwspec_iommu_ops'
      used but never defined
       static inline const struct iommu_ops *iort_fwspec_iommu_ops(struct device *dev);
                                             ^~~~~~~~~~~~~~~~~~~~~
      
      Fix it.
      
      Fixes: 8097e53e ("ACPI/IORT: Use helper functions to access dev->iommu_fwspec")
      Signed-off-by: NQian Cai <cai@lca.pw>
      [lorenzo.pieralisi@arm.com: updated tags and log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      6b68835b
  5. 07 1月, 2019 1 次提交
    • H
      ACPI / PMIC: xpower: Fix TS-pin current-source handling · 2b531d71
      Hans de Goede 提交于
      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>
      2b531d71
  6. 04 1月, 2019 1 次提交
    • L
      Remove 'type' argument from access_ok() function · 96d4f267
      Linus Torvalds 提交于
      Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
      of the user address range verification function since we got rid of the
      old racy i386-only code to walk page tables by hand.
      
      It existed because the original 80386 would not honor the write protect
      bit when in kernel mode, so you had to do COW by hand before doing any
      user access.  But we haven't supported that in a long time, and these
      days the 'type' argument is a purely historical artifact.
      
      A discussion about extending 'user_access_begin()' to do the range
      checking resulted this patch, because there is no way we're going to
      move the old VERIFY_xyz interface to that model.  And it's best done at
      the end of the merge window when I've done most of my merges, so let's
      just get this done once and for all.
      
      This patch was mostly done with a sed-script, with manual fix-ups for
      the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.
      
      There were a couple of notable cases:
      
       - csky still had the old "verify_area()" name as an alias.
      
       - the iter_iov code had magical hardcoded knowledge of the actual
         values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
         really used it)
      
       - microblaze used the type argument for a debug printout
      
      but other than those oddities this should be a total no-op patch.
      
      I tried to fix up all architectures, did fairly extensive grepping for
      access_ok() uses, and the changes are trivial, but I may have missed
      something.  Any missed conversion should be trivially fixable, though.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      96d4f267
  7. 03 1月, 2019 1 次提交
    • C
      ACPI: NUMA: Use correct type for printing addresses on i386-PAE · b9ced18a
      Chao Fan 提交于
      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>
      b9ced18a
  8. 02 1月, 2019 2 次提交
    • H
      ACPI: power: Skip duplicate power resource references in _PRx · 7d7b467c
      Hans de Goede 提交于
      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>
      7d7b467c
    • S
      ACPI: Fix build failure when CONFIG_NLS is set to 'n' · 2e61069b
      Sinan Kaya 提交于
      Observing link failure as follows when CONFIG_ACPI is set but
      both CONFIG_NLS and CONFIG_PCI are no set:
      
      drivers/acpi/device_sysfs.o: In function `description_show':
      device_sysfs.c:(.text+0x48a): undefined reference to `utf16s_to_utf8s'
      
      This issue was previously addressed implicitly by commit 8a226e00
      (PCI: pci-label: Fix build failure when CONFIG_NLS is set to 'm' by
      allmodconfig) causing PCI_LABEL to be selected when ACPI was set
      which caused NLS to be selected too in that case.
      
      However, after commit 5d32a665 (PCI/ACPI: Allow ACPI to be built
      without CONFIG_PCI set) it is possible to build ACPI support without
      PCI, so make ACPI select NLS directly to cover that case.
      
      Fixes: 5d32a665 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set)
      Signed-off-by: NSinan Kaya <okaya@kernel.org>
      [ rjw: Changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2e61069b
  9. 22 12月, 2018 4 次提交
  10. 21 12月, 2018 2 次提交
  11. 20 12月, 2018 6 次提交
  12. 18 12月, 2018 3 次提交
  13. 17 12月, 2018 3 次提交
  14. 14 12月, 2018 10 次提交