03 Oct, 2020

1 commit

  • extlog_init() uses rdmsrl() to read an MSR, which on older CPUs
    provokes a error message at boot:

    unchecked MSR access error: RDMSR from 0x179 at rIP: 0xcd047307 (native_read_msr+0x7/0x40)

    Use rdmsrl_safe() instead, and return -ENODEV if it fails.

    Reported-by: jim@photojim.ca
    References: https://bugs.debian.org/971058
    Cc: All applicable
    Signed-off-by: Ben Hutchings
    Signed-off-by: Rafael J. Wysocki

    Ben Hutchings
     

14 Apr, 2020

2 commits

  • When acpi_extlog was added, we were worried that the same error would
    be reported more than once by different subsystems. But in the ensuing
    years I've seen complaints that people could not find an error log
    (because this mechanism suppressed the log they were looking for).

    Rip it all out. People are smart enough to notice the same address from
    different reporting mechanisms.

    Signed-off-by: Tony Luck
    Signed-off-by: Borislav Petkov
    Tested-by: Tony Luck
    Link: https://lkml.kernel.org/r/20200214222720.13168-8-tony.luck@intel.com

    Tony Luck
     
  • If the handler took any action to log or deal with the error, set a bit
    in mce->kflags so that the default handler on the end of the machine
    check chain can see what has been done.

    Get rid of NOTIFY_STOP returns. Make the EDAC and dev-mcelog handlers
    skip over errors already processed by CEC.

    Signed-off-by: Tony Luck
    Signed-off-by: Borislav Petkov
    Tested-by: Tony Luck
    Link: https://lkml.kernel.org/r/20200214222720.13168-5-tony.luck@intel.com

    Tony Luck
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this file is licensed under gplv2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 22 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Armijn Hemel
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531190115.129548190@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

07 Jun, 2017

1 commit

  • acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
    bytes. Instead we convert them to use guid_t type. At the same time we
    convert current users.

    acpi_str_to_uuid() becomes useless after the conversion and it's safe to
    get rid of it.

    Acked-by: Rafael J. Wysocki
    Cc: Borislav Petkov
    Acked-by: Dan Williams
    Cc: Amir Goldstein
    Reviewed-by: Jarkko Sakkinen
    Reviewed-by: Jani Nikula
    Acked-by: Jani Nikula
    Cc: Ben Skeggs
    Acked-by: Benjamin Tissoires
    Acked-by: Joerg Roedel
    Acked-by: Adrian Hunter
    Cc: Yisen Zhuang
    Acked-by: Bjorn Helgaas
    Acked-by: Felipe Balbi
    Acked-by: Mathias Nyman
    Reviewed-by: Heikki Krogerus
    Acked-by: Mark Brown
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Christoph Hellwig

    Andy Shevchenko
     

06 Jun, 2017

1 commit


10 Apr, 2017

1 commit


24 Jan, 2017

1 commit

  • Assign all notifiers on the MCE decode chain a priority so that they get
    called in the correct order.

    Suggested-by: Thomas Gleixner
    Signed-off-by: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Tony Luck
    Cc: Yazen Ghannam
    Cc: linux-edac
    Link: http://lkml.kernel.org/r/20170123183514.13356-10-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     

07 Aug, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "Again, ACPICA leads the pack (47 commits), followed by cpufreq (18
    commits) and system suspend/hibernation (9 commits).

    From the new code perspective, the ACPICA update brings ACPI 5.1 to
    the table, including a new device configuration object called _DSD
    (Device Specific Data) that will hopefully help us to operate device
    properties like Device Trees do (at least to some extent) and changes
    related to supporting ACPI on ARM.

    Apart from that we have hibernation changes making it use radix trees
    to store memory bitmaps which should speed up some operations carried
    out by it quite significantly. We also have some power management
    changes related to suspend-to-idle (the "freeze" sleep state) support
    and more preliminary changes needed to support ACPI on ARM (outside of
    ACPICA).

    The rest is fixes and cleanups pretty much everywhere.

    Specifics:

    - ACPICA update to upstream version 20140724. That includes ACPI 5.1
    material (support for the _CCA and _DSD predefined names, changes
    related to the DMAR and PCCT tables and ARM support among other
    things) and cleanups related to using ACPICA's header files. A
    major part of it is related to acpidump and the core code used by
    that utility. Changes from Bob Moore, David E Box, Lv Zheng,
    Sascha Wildner, Tomasz Nowicki, Hanjun Guo.

    - Radix trees for memory bitmaps used by the hibernation core from
    Joerg Roedel.

    - Support for waking up the system from suspend-to-idle (also known
    as the "freeze" sleep state) using ACPI-based PCI wakeup signaling
    (Rafael J Wysocki).

    - Fixes for issues related to ACPI button events (Rafael J Wysocki).

    - New device ID for an ACPI-enumerated device included into the
    Wildcat Point PCH from Jie Yang.

    - ACPI video updates related to backlight handling from Hans de Goede
    and Linus Torvalds.

    - Preliminary changes needed to support ACPI on ARM from Hanjun Guo
    and Graeme Gregory.

    - ACPI PNP core cleanups from Arjun Sreedharan and Zhang Rui.

    - Cleanups related to ACPI_COMPANION() and ACPI_HANDLE() macros
    (Rafael J Wysocki).

    - ACPI-based device hotplug cleanups from Wei Yongjun and Rafael J
    Wysocki.

    - Cleanups and improvements related to system suspend from Lan
    Tianyu, Randy Dunlap and Rafael J Wysocki.

    - ACPI battery cleanup from Wei Yongjun.

    - cpufreq core fixes from Viresh Kumar.

    - Elimination of a deadband effect from the cpufreq ondemand governor
    and intel_pstate driver cleanups from Stratos Karafotis.

    - 350MHz CPU support for the powernow-k6 cpufreq driver from Mikulas
    Patocka.

    - Fix for the imx6 cpufreq driver from Anson Huang.

    - cpuidle core and governor cleanups from Daniel Lezcano, Sandeep
    Tripathy and Mohammad Merajul Islam Molla.

    - Build fix for the big_little cpuidle driver from Sachin Kamat.

    - Configuration fix for the Operation Performance Points (OPP)
    framework from Mark Brown.

    - APM cleanup from Jean Delvare.

    - cpupower utility fixes and cleanups from Peter Senna Tschudin,
    Andrey Utkin, Himangi Saraogi, Rickard Strandqvist, Thomas
    Renninger"

    * tag 'pm+acpi-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (118 commits)
    ACPI / LPSS: add LPSS device for Wildcat Point PCH
    ACPI / PNP: Replace faulty is_hex_digit() by isxdigit()
    ACPICA: Update version to 20140724.
    ACPICA: ACPI 5.1: Update for PCCT table changes.
    ACPICA/ARM: ACPI 5.1: Update for GTDT table changes.
    ACPICA/ARM: ACPI 5.1: Update for MADT changes.
    ACPICA/ARM: ACPI 5.1: Update for FADT changes.
    ACPICA: ACPI 5.1: Support for the _CCA predifined name.
    ACPICA: ACPI 5.1: New notify value for System Affinity Update.
    ACPICA: ACPI 5.1: Support for the _DSD predefined name.
    ACPICA: Debug object: Add current value of Timer() to debug line prefix.
    ACPICA: acpihelp: Add UUID support, restructure some existing files.
    ACPICA: Utilities: Fix local printf issue.
    ACPICA: Tables: Update for DMAR table changes.
    ACPICA: Remove some extraneous printf arguments.
    ACPICA: Update for comments/formatting. No functional changes.
    ACPICA: Disassembler: Add support for the ToUUID opererator (macro).
    ACPICA: Remove a redundant cast to acpi_size for ACPI_OFFSET() macro.
    ACPICA: Work around an ancient GCC bug.
    ACPI / processor: Make it possible to get local x2apic id via _MAT
    ...

    Linus Torvalds
     

26 Jun, 2014

3 commits


17 Jun, 2014

1 commit

  • … and ACPICA upstream.

    The following commit has changed ACPICA table header definitions:

    Commit: 88f074f4871a8c212b212b725e4dcdcdb09613c1
    Subject: ACPI, CPER: Update cper info

    While such definitions are currently maintained in ACPICA. As the
    modifications applying to the table definitions affect other OSPMs'
    drivers, it is very difficult for ACPICA to initiate a process to
    complete the merge. Thus this commit finally only leaves us divergences.

    Revert such naming modifications to reduce the source code differecnes
    between Linux and ACPICA upstream. No functional changes.

    Signed-off-by: Lv Zheng <lv.zheng@intel.com>
    Cc: Bob Moore <robert.moore@intel.com>
    Cc: Chen, Gong <gong.chen@linux.intel.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

    Lv Zheng
     

28 May, 2014

1 commit

  • ACPICA doesn't include protections around address space checking, Linux
    build tests always complain increased sparse warnings around ACPICA
    internal acpi_os_map/unmap_memory() invocations. This patch tries to fix
    this issue permanently.

    There are 2 choices left for us to solve this issue:
    1. Add __iomem address space awareness into ACPICA.
    2. Remove sparse checker of __iomem from ACPICA source code.

    This patch chooses solution 2, because:
    1. Most of the acpi_os_map/unmap_memory() invocations are used for ACPICA.
    table mappings, which in fact are not IO addresses.
    2. The only IO addresses usage is for "system memory space" mapping code in:
    drivers/acpi/acpica/exregion.c
    drivers/acpi/acpica/evrgnini.c
    drivers/acpi/acpica/exregion.c
    The mapped address is accessed in the handler of "system memory space"
    - acpi_ex_system_memory_space_handler(). This function in fact can be
    changed to invoke acpi_os_read/write_memory() so that __iomem can
    always be type-casted in the OSL layer.

    According to the above investigation, we drew the following conclusion:
    It is not a good idea to introduce __iomem address space awareness into
    ACPICA mostly in order to protect non-IO addresses.

    We can simply remove __iomem for acpi_os_map/unmap_memory() to remove
    __iomem checker for ACPICA code. Then we need to enforce external usages
    to invoke other APIs that are aware of __iomem address space.
    The external usages are:
    drivers/acpi/apei/einj.c
    drivers/acpi/acpi_extlog.c
    drivers/char/tpm/tpm_acpi.c
    drivers/acpi/nvs.c

    This patch thus performs cleanups in this way:
    1. Add acpi_os_map/unmap_iomem() to be invoked by non-ACPICA code.
    2. Remove __iomem from acpi_os_map/unmap_memory().

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

25 Jan, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "As far as the number of commits goes, the top spot belongs to ACPI
    this time with cpufreq in the second position and a handful of PM
    core, PNP and cpuidle updates. They are fixes and cleanups mostly, as
    usual, with a couple of new features in the mix.

    The most visible change is probably that we will create struct
    acpi_device objects (visible in sysfs) for all devices represented in
    the ACPI tables regardless of their status and there will be a new
    sysfs attribute under those objects allowing user space to check that
    status via _STA.

    Consequently, ACPI device eject or generally hot-removal will not
    delete those objects, unless the table containing the corresponding
    namespace nodes is unloaded, which is extremely rare. Also ACPI
    container hotplug will be handled quite a bit differently and cpufreq
    will support CPU boost ("turbo") generically and not only in the
    acpi-cpufreq driver.

    Specifics:

    - ACPI core changes to make it create a struct acpi_device object for
    every device represented in the ACPI tables during all namespace
    scans regardless of the current status of that device. In
    accordance with this, ACPI hotplug operations will not delete those
    objects, unless the underlying ACPI tables go away.

    - On top of the above, new sysfs attribute for ACPI device objects
    allowing user space to check device status by triggering the
    execution of _STA for its ACPI object. From Srinivas Pandruvada.

    - ACPI core hotplug changes reducing code duplication, integrating
    the PCI root hotplug with the core and reworking container hotplug.

    - ACPI core simplifications making it use ACPI_COMPANION() in the
    code "glueing" ACPI device objects to "physical" devices.

    - ACPICA update to upstream version 20131218. This adds support for
    the DBG2 and PCCT tables to ACPICA, fixes some bugs and improves
    debug facilities. From Bob Moore, Lv Zheng and Betty Dall.

    - Init code change to carry out the early ACPI initialization
    earlier. That should allow us to use ACPI during the timekeeping
    initialization and possibly to simplify the EFI initialization too.
    From Chun-Yi Lee.

    - Clenups of the inclusions of ACPI headers in many places all over
    from Lv Zheng and Rashika Kheria (work in progress).

    - New helper for ACPI _DSM execution and rework of the code in
    drivers that uses _DSM to execute it via the new helper. From
    Jiang Liu.

    - New Win8 OSI blacklist entries from Takashi Iwai.

    - Assorted ACPI fixes and cleanups from Al Stone, Emil Goode, Hanjun
    Guo, Lan Tianyu, Masanari Iida, Oliver Neukum, Prarit Bhargava,
    Rashika Kheria, Tang Chen, Zhang Rui.

    - intel_pstate driver updates, including proper Baytrail support,
    from Dirk Brandewie and intel_pstate documentation from Ramkumar
    Ramachandra.

    - Generic CPU boost ("turbo") support for cpufreq from Lukasz
    Majewski.

    - powernow-k6 cpufreq driver fixes from Mikulas Patocka.

    - cpufreq core fixes and cleanups from Viresh Kumar, Jane Li, Mark
    Brown.

    - Assorted cpufreq drivers fixes and cleanups from Anson Huang, John
    Tobias, Paul Bolle, Paul Walmsley, Sachin Kamat, Shawn Guo, Viresh
    Kumar.

    - cpuidle cleanups from Bartlomiej Zolnierkiewicz.

    - Support for hibernation APM events from Bin Shi.

    - Hibernation fix to avoid bringing up nonboot CPUs with ACPI EC
    disabled during thaw transitions from Bjørn Mork.

    - PM core fixes and cleanups from Ben Dooks, Leonardo Potenza, Ulf
    Hansson.

    - PNP subsystem fixes and cleanups from Dmitry Torokhov, Levente
    Kurusa, Rashika Kheria.

    - New tool for profiling system suspend from Todd E Brandt and a
    cpupower tool cleanup from One Thousand Gnomes"

    * tag 'pm+acpi-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (153 commits)
    thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412)
    cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ
    Documentation: cpufreq / boost: Update BOOST documentation
    cpufreq: exynos: Extend Exynos cpufreq driver to support boost
    cpufreq / boost: Kconfig: Support for software-managed BOOST
    acpi-cpufreq: Adjust the code to use the common boost attribute
    cpufreq: Add boost frequency support in core
    intel_pstate: Add trace point to report internal state.
    cpufreq: introduce cpufreq_generic_get() routine
    ARM: SA1100: Create dummy clk_get_rate() to avoid build failures
    cpufreq: stats: create sysfs entries when cpufreq_stats is a module
    cpufreq: stats: free table and remove sysfs entry in a single routine
    cpufreq: stats: remove hotplug notifiers
    cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly
    cpufreq: speedstep: remove unused speedstep_get_state
    platform: introduce OF style 'modalias' support for platform bus
    PM / tools: new tool for suspend/resume performance optimization
    ACPI: fix module autoloading for ACPI enumerated devices
    ACPI: add module autoloading support for ACPI enumerated devices
    ACPI: fix create_modalias() return value handling
    ...

    Linus Torvalds
     

13 Jan, 2014

1 commit

  • * acpi-dsm:
    ACPI / extlog: replace open-coded _DSM code with helper functions
    ACPI / nouveau: replace open-coded _DSM code with helper functions
    nouveau / ACPI: fix memory leak in ACPI _DSM related code
    ACPI / i915: replace open-coded _DSM code with helper functions
    ACPI / i2c-hid: replace open-coded _DSM code with helper functions
    ACPI / TPM: detect PPI features by checking availability of _DSM functions
    ACPI / TPM: replace open-coded _DSM code with helper functions
    ACPI / TPM: match node name instead of full path when searching for TPM device
    PCI / pci-label: treat PCI label with index 0 as valid label
    ACPI / PCI: replace open-coded _DSM code with helper functions
    PCI / pci-label: release allocated ACPI object on error recovery path
    ACPI: introduce helper interfaces for _DSM method

    Rafael J. Wysocki
     

05 Jan, 2014

1 commit


12 Dec, 2013

1 commit

  • eMCA has higher H/W event reporting priority. Once it is
    loaded, EDAC event reporting should be disabled, unless EDAC
    overrides eMCA priority via command line parameter "edac_report=force".

    Signed-off-by: Chen, Gong
    Acked-by: Tony Luck
    Link: http://lkml.kernel.org/r/1386310630-12529-4-git-send-email-gong.chen@linux.intel.com
    [ Boris: massage printk message. ]
    Signed-off-by: Borislav Petkov

    Chen, Gong
     

07 Dec, 2013

1 commit

  • Replace direct inclusions of , and
    , which are incorrect, with
    inclusions and remove some inclusions of those files that aren't
    necessary.

    First of all, , and
    should not be included directly from any files that are built for
    CONFIG_ACPI unset, because that generally leads to build warnings about
    undefined symbols in !CONFIG_ACPI builds. For CONFIG_ACPI set,
    includes those files and for CONFIG_ACPI unset it
    provides stub ACPI symbols to be used in that case.

    Second, there are ordering dependencies between those files that always
    have to be met. Namely, it is required that be included
    prior to so that the acpi_pci_root declarations the
    latter depends on are always there. And which provides
    basic ACPICA type declarations should always be included prior to any other
    ACPI headers in CONFIG_ACPI builds. That also is taken care of including
    as appropriate.

    Signed-off-by: Lv Zheng
    Cc: Greg Kroah-Hartman
    Cc: Matthew Garrett
    Cc: Tony Luck
    Cc: "H. Peter Anvin"
    Acked-by: Bjorn Helgaas (drivers/pci stuff)
    Acked-by: Konrad Rzeszutek Wilk (Xen stuff)
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

24 Oct, 2013

1 commit

  • This H/W error log driver (a.k.a eMCA driver) is implemented based on
    http://www.intel.com/content/www/us/en/architecture-and-technology/enhanced-mca-logging-xeon-paper.html

    After errors are captured, more detailed platform specific information
    can be got via this new enhanced H/W error log driver. Most notably we
    can track memory errors back to the DIMM slot silk screen label.

    Signed-off-by: Chen, Gong
    Signed-off-by: Tony Luck

    Chen, Gong