1. 10 6月, 2020 2 次提交
    • M
      mm: reorder includes after introduction of linux/pgtable.h · 65fddcfc
      Mike Rapoport 提交于
      The replacement of <asm/pgrable.h> with <linux/pgtable.h> made the include
      of the latter in the middle of asm includes.  Fix this up with the aid of
      the below script and manual adjustments here and there.
      
      	import sys
      	import re
      
      	if len(sys.argv) is not 3:
      	    print "USAGE: %s <file> <header>" % (sys.argv[0])
      	    sys.exit(1)
      
      	hdr_to_move="#include <linux/%s>" % sys.argv[2]
      	moved = False
      	in_hdrs = False
      
      	with open(sys.argv[1], "r") as f:
      	    lines = f.readlines()
      	    for _line in lines:
      		line = _line.rstrip('
      ')
      		if line == hdr_to_move:
      		    continue
      		if line.startswith("#include <linux/"):
      		    in_hdrs = True
      		elif not moved and in_hdrs:
      		    moved = True
      		    print hdr_to_move
      		print line
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Cain <bcain@codeaurora.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ley Foon Tan <ley.foon.tan@intel.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nick Hu <nickhu@andestech.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Link: http://lkml.kernel.org/r/20200514170327.31389-4-rppt@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      65fddcfc
    • M
      mm: introduce include/linux/pgtable.h · ca5999fd
      Mike Rapoport 提交于
      The include/linux/pgtable.h is going to be the home of generic page table
      manipulation functions.
      
      Start with moving asm-generic/pgtable.h to include/linux/pgtable.h and
      make the latter include asm/pgtable.h.
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Cain <bcain@codeaurora.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ley Foon Tan <ley.foon.tan@intel.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nick Hu <nickhu@andestech.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Link: http://lkml.kernel.org/r/20200514170327.31389-3-rppt@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ca5999fd
  2. 08 6月, 2020 1 次提交
    • R
      ACPI: PM: Avoid using power resources if there are none for D0 · 956ad9d9
      Rafael J. Wysocki 提交于
      As recently reported, some platforms provide a list of power
      resources for device power state D3hot, through the _PR3 object,
      but they do not provide a list of power resources for device power
      state D0.
      
      Among other things, this causes acpi_device_get_power() to return
      D3hot as the current state of the device in question if all of the
      D3hot power resources are "on", because it sees the power_resources
      flag set and calls acpi_power_get_inferred_state() which finds that
      D3hot is the shallowest power state with all of the associated power
      resources turned "on", so that's what it returns.  Moreover, that
      value takes precedence over the acpi_dev_pm_explicit_get() return
      value, because it means a deeper power state.  The device may very
      well be in D0 physically at that point, however.
      
      Moreover, the presence of _PR3 without _PR0 for a given device
      means that only one D3-level power state can be supported by it.
      Namely, because there are no power resources to turn "off" when
      transitioning the device from D0 into D3cold (which should be
      supported since _PR3 is present), the evaluation of _PS3 should
      be sufficient to put it straight into D3cold, but this means that
      the effect of turning "on" the _PR3 power resources is unclear,
      so it is better to avoid doing that altogether.  Consequently,
      there is no practical way do distinguish D3cold from D3hot for
      the device in question and the power states of it can be labeled
      so that D3hot is the deepest supported one (and Linux assumes
      that putting a device into D3hot via ACPI may cause power to be
      removed from it anyway, for legacy reasons).
      
      To work around the problem described above modify the ACPI
      enumeration of devices so that power resources are only used
      for device power management if the list of D0 power resources
      is not empty and make it mart D3cold as supported only if that
      is the case and the D3hot list of power resources is not empty
      too.
      
      Fixes: ef85bdbe ("ACPI / scan: Consolidate extraction of power resources lists")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=205057
      Link: https://lore.kernel.org/linux-acpi/20200603194659.185757-1-hdegoede@redhat.com/Reported-by: NHans de Goede <hdegoede@redhat.com>
      Tested-by: NHans de Goede <hdegoede@redhat.com>
      Tested-by: youling257@gmail.com
      Cc: 3.10+ <stable@vger.kernel.org> # 3.10+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NHans de Goede <hdegoede@redhat.com>
      956ad9d9
  3. 05 6月, 2020 1 次提交
  4. 03 6月, 2020 1 次提交
  5. 28 5月, 2020 3 次提交
  6. 27 5月, 2020 2 次提交
  7. 25 5月, 2020 5 次提交
    • R
      ACPI: EC: PM: s2idle: Extend GPE dispatching debug message · 5fcd7359
      Rafael J. Wysocki 提交于
      Add the "ACPI" string to the "EC GPE dispatched" message as it is
      ACPI-related.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5fcd7359
    • R
      ACPI: PM: s2idle: Print type of wakeup debug messages · 3441362b
      Rafael J. Wysocki 提交于
      Since acpi_s2idle_wake() knows the category of wakeup causing the
      system to resume from suspend-to-idle, make it print a unique message
      for each of them to help diagnose wakeup issues.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3441362b
    • S
      ACPI: DPTF: Add battery participant driver · 7b52b200
      Srinivas Pandruvada 提交于
      This driver adds support for Dynamic Platform and Thermal Framework
      battery participant device support.
      
      These attributes are presented via sysfs interface under the platform
      device for the battery participant:
      $ls /sys/bus/platform/devices/INT3532:00/dptf_battery
      	current_discharge_capbility_ma
      	max_platform_power_mw
      	no_load_voltage_mv
      	high_freq_impedance_mohm
      	max_steady_state_power_mw
      
      Refer to the documentation at
      Documentation/ABI/testing/sysfs-platform-dptf
      for details.
      
      Here the implementation reuses existing dptf-power.c as the motivation and
      processing is same. It also shares one ACPI method. Here this change is
      using participant type, "PTYP" method to identify and do different
      processing. By using participant type, create/delete either "dptf_power"
      or "dptf_battery" attribute group and send notifications.
      
      The particpant type for for the battery participant is 0x0C.
      
      ACPI methods description:
      
      PMAX (Intel(R) Dynamic Tuning Platform Max Power Supplied by Battery):
      This object evaluates to the maximum platform power that can be supported
      by the battery in milli watts.
      
      PBSS (Intel(R) Dynamic Tuning Power Battery Steady State):
      This object returns the max sustained power for battery in milli watts.
      
      RBHF (Intel(R) Dynamic Tuning High Frequency Impedance):
      This object returns high frequency impedance value that can be obtained
      from battery fuel gauge.
      
      VBNL (Intel(R) Dynamic Tuning No-Load Voltage)
      This object returns battery instantaneous no-load voltage that can be
      obtained from battery fuel gauge in milli volts
      
      CMPP (Intel(R) Dynamic Tuning Current Discharge Capability)
      This object returns battery discharge current capability obtained from
      battery fuel gauge milli amps.
      
      Notifications:
      
      0x80: PMAX change. Used to notify Intel(R)Dynamic Tuning Battery
      participant driver when the PMAX has changed by 250mw.
      0x83: PBSS change. Used to notify Intel(R) Dynamic Tuning Battery
      participant driver when the power source has changed.
      0x85: RBHF change. Used to notify Intel(R)Dynamic Tuning Battery
      participant driver when the RBHF has changed over a threshold by
      5mOhm.
      0x86: Battery Capability change. Used to notify Intel(R)Dynamic Tuning
      Battery participant driver when the battery capability has changed.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      [ rjw: Subject ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7b52b200
    • S
      ACPI: DPTF: Additional sysfs attributes for power participant driver · 668ce99e
      Srinivas Pandruvada 提交于
      Add two additional attributes to the existing power participant driver:
      rest_of_platform_power_mw: (RO) Shows the rest of worst case platform
      power in mW outside of S0C. This will help in power distribution to SoC
      and rest of the system. For example on a test system, this value is 2.5W
      with a 15W TDP SoC. Based on the adapter rating (adapter_rating_mw), user
      space software can decide on proper power allocation to SoC to improve
      short term performance via powercap/RAPL interface.
      
      prochot_confirm: (WO) Confirm EC about a prochot notification.
      
      Also userspace is notified via sysfs_notify(), whenever power source or
      rest of the platform power is changed. So user space can use poll()
      system call on those attributes.
      
      The ACPI methods used in this patch are as follows:
      
      PROP
      This object evaluates to the rest of worst case platform power in mW.
      Bits:
      23:0 Worst case rest of platform power in mW.
      
      PBOK
      PBOK is a method designed to provide a mechanism for OSPM to change power
      setting before EC can de-assert a PROCHOT from a device. The EC may
      receive several PROCHOTs, so it has a sequence number attached to PSRC
      (read via existing attribute "platform_power_source"). Once OSPM takes
      action for a PSRC change notification, it can call PBOK method to confirm
      with the sequence number.
      Bits:
      3:0 Power Delivery State Change Sequence number
      30  Reserved
      31  0 – Not OK to de-assert PROCHOT
          1 – OK to de-assert PROCHOT
      
      PSRC (Platform Power Source): Not new in this patch but for
      documentation for new bits
      This object evaluates to an integer that represents the system power
      source as well as the power delivery state change sequence number.
      Bits:
      3:0 The current power source as an integer for AC, DC, USB, Wireless.
      0 = DC, 1 = AC, 2 = USB, 3 = Wireless Charging
      7:4 Power Delivery State Change Sequence Number. Default value is 0
      
      Notifications:
      0x81: (Power State Change) Used to notify when the power source has
      changed.
      0x84: (PROP change) Used to notify when the platform rest of power has
      changed.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      [ rjw: Subject, minor ABI documentation edit ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      668ce99e
    • P
      ACPI: video: Use native backlight on Acer TravelMate 5735Z · c41c36e9
      Paul Menzel 提交于
      Currently, changing the brightness of the internal display of the Acer
      TravelMate 5735Z does not work. Pressing the function keys or changing the
      slider, GNOME Shell 3.36.2 displays the OSD (five steps), but the
      brightness does not change.
      
      The Acer TravelMate 5735Z shipped with Windows 7 and as such does not
      trigger our "win8 ready" heuristic for preferring the native backlight
      interface.
      
      Still ACPI backlight control doesn't work on this model, where as the
      native (intel_video) backlight interface does work by adding
      `acpi_backlight=native` or `acpi_backlight=none` to Linux’ command line.
      
      So, add a quirk to force using native backlight control on this model.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=207835Reviewed-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c41c36e9
  8. 21 5月, 2020 1 次提交
  9. 20 5月, 2020 1 次提交
    • J
      ACPI: APEI: Kick the memory_failure() queue for synchronous errors · 7f17b4a1
      James Morse 提交于
      memory_failure() offlines or repairs pages of memory that have been
      discovered to be corrupt. These may be detected by an external
      component, (e.g. the memory controller), and notified via an IRQ.
      In this case the work is queued as not all of memory_failure()s work
      can happen in IRQ context.
      
      If the error was detected as a result of user-space accessing a
      corrupt memory location the CPU may take an abort instead. On arm64
      this is a 'synchronous external abort', and on a firmware first
      system it is replayed using NOTIFY_SEA.
      
      This notification has NMI like properties, (it can interrupt
      IRQ-masked code), so the memory_failure() work is queued. If we
      return to user-space before the queued memory_failure() work is
      processed, we will take the fault again. This loop may cause platform
      firmware to exceed some threshold and reboot when Linux could have
      recovered from this error.
      
      For NMIlike notifications keep track of whether memory_failure() work
      was queued, and make task_work pending to flush out the queue.
      To save memory allocations, the task_work is allocated as part of
      the ghes_estatus_node, and free()ing it back to the pool is deferred.
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Tested-by: NTyler Baicar <baicar@os.amperecomputing.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7f17b4a1
  10. 19 5月, 2020 2 次提交
  11. 18 5月, 2020 2 次提交
  12. 16 5月, 2020 1 次提交
  13. 14 5月, 2020 1 次提交
  14. 11 5月, 2020 2 次提交
  15. 09 5月, 2020 15 次提交