1. 29 Jun, 2021 6 commits
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-ec', 'acpi-apei', 'acpi-soc' and 'acpi-misc' · 64f9111d
      Rafael J. Wysocki authored
      * acpi-ec:
        ACPI: EC: trust DSDT GPE for certain HP laptop
        ACPI: EC: Make more Asus laptops use ECDT _GPE
      
      * acpi-apei:
        ACPI: APEI: fix synchronous external aborts in user-mode
        ACPI: APEI: Don't warn if ACPI is disabled
      
      * acpi-soc:
        ACPI: LPSS: Use kstrtol() instead of simple_strtol()
      
      * acpi-misc:
        ACPI: NVS: fix doc warnings in nvs.c
        ACPI: NUMA: fix typo in a comment
        ACPI: OSL: Use DEFINE_RES_IO_NAMED() to simplify code
        ACPI: bus: Call kobject_put() in acpi_init() error path
        ACPI: bus: Remove unneeded assignment
        ACPI: configfs: Replace ACPI_INFO() with pr_debug()
        ACPI: ipmi: Remove address space handler in error path
        ACPI: event: Remove redundant initialization of local variable
        ACPI: sbshc: Fix fall-through warning for Clang
      64f9111d
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-dptf' and 'acpi-messages' · 8b457d60
      Rafael J. Wysocki authored
      * acpi-dptf:
        ACPI: DPTF: Add battery participant for Intel SoCs
      
      * acpi-messages:
        ACPI: Remove the macro PREFIX "ACPI: "
        ACPI: sleep: Unify the message printing
        ACPI: sbs: Unify the message printing
        ACPI: scan: Unify the log message printing
        ACPI: sbshc: Unify the message printing
        ACPI: sysfs: Cleanup message printing
        ACPI: reboot: Unify the message printing
        ACPI: processor_throttling: Cleanup the printing messages
        ACPI: processor_perflib: Cleanup print messages
        ACPI: processor_thermal: Remove unused PREFIX for printing
        ACPI: pci_root: Unify the message printing
        ACPI: osl: Remove the duplicated PREFIX for message printing
        ACPI: nvs: Unify the message printing
        ACPI: glue: Clean up the printing messages
        ACPI: event: Use pr_*() macros to replace printk()
        ACPI: bus: Use pr_*() macros to replace printk()
        ACPI: blacklist: Unify the message printing
        ACPI: cmos_rtc: Using pr_fmt() and remove PREFIX
      8b457d60
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-prm', 'acpi-sysfs' and 'acpi-x86' · 3a616ec7
      Rafael J. Wysocki authored
      * acpi-prm:
        ACPI: PRM: make symbol 'prm_module_list' static
        ACPI: Add \_SB._OSC bit for PRM
        ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype
      
      * acpi-sysfs:
        ACPI: sysfs: Remove tailing return statement in void function
        ACPI: sysfs: Use __ATTR_RO() and __ATTR_RW() macros
        ACPI: sysfs: Sort headers alphabetically
        ACPI: sysfs: Refactor param_get_trace_state() to drop dead code
        ACPI: sysfs: Unify pattern of memory allocations
        ACPI: sysfs: Allow bitmap list to be supplied to acpi_mask_gpe
        ACPI: sysfs: Make sparse happy about address space in use
        ACPI: sysfs: fix doc warnings in device_sysfs.c
        ACPI: sysfs: Drop four redundant return statements
        ACPI: sysfs: Fix a buffer overrun problem with description_show()
      
      * acpi-x86:
        x86/acpi: Switch to pr_xxx log functions
      3a616ec7
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pm', 'acpi-processor' and 'acpi-resources' · 2f4edfad
      Rafael J. Wysocki authored
      * acpi-pm:
        ACPI: PM: postpone bringing devices to D0 unless we need them
        ACPI: PM: Adjust behavior for field problems on AMD systems
        ACPI: PM: s2idle: Add support for new Microsoft UUID
        ACPI: PM: s2idle: Add support for multiple func mask
        ACPI: PM: s2idle: Refactor common code
        ACPI: PM: s2idle: Use correct revision id
        ACPI: power: Use dev_dbg() to print some messages
        ACPI: sleep: Fix acpi_pm_pre_suspend() kernel-doc
        ACPI: power: Rework turning off unused power resources
        ACPI: power: Save the last known state of each power resource
        ACPI: power: Use u8 as the power resource state data type
        ACPI: PM / fan: Put fan device IDs into separate header file
        ACPI: PM: s2idle: Add missing LPS0 functions for AMD
      
      * acpi-processor:
        ACPI: processor_throttling: Fix several coding style issues
        ACPI: processor_throttling: Remove redundant initialization of 'obj'
        ACPI: processor idle: Fix up C-state latency if not ordered
      
      * acpi-resources:
        ACPI: resources: Add checks for ACPI IRQ override
      2f4edfad
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-bus', 'acpi-scan' and 'acpi-tables' · dfef7710
      Rafael J. Wysocki authored
      * acpi-bus:
        ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc()
      
      * acpi-scan:
        ACPI: scan: Simplify acpi_table_events_fn()
        ACPI: scan: Fix race related to dropping dependencies
        ACPI: scan: Reorganize acpi_device_add()
        ACPI: scan: Fix device object rescan in acpi_scan_clear_dep()
        ACPI: scan: Make acpi_walk_dep_device_list()
        ACPI: scan: Rearrange acpi_dev_get_first_consumer_dev_cb()
        ACPI: scan: Define acpi_bus_put_acpi_device() as static inline
        ACPI: scan: initialize local variable to avoid garbage being returned
        ACPI: scan: Add function to fetch dependent of ACPI device
        ACPI: scan: Extend acpi_walk_dep_device_list()
        ACPI: scan: Rearrange dep_unmet initialization
      
      * acpi-tables:
        ACPI: tables: Add custom DSDT file as makefile prerequisite
        ACPI: bgrt: Use sysfs_emit
        ACPI: bgrt: Fix CFI violation
        ACPI: tables: FPDT: Add missing acpi_put_table() in acpi_init_fpdt()
        ACPI: tables: PPTT: Populate cache-id if provided by firmware
      dfef7710
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · f9ef9b82
      Rafael J. Wysocki authored
      * acpica:
        ACPICA: Add PRMT module header to facilitate parsing
        ACPICA: Update version to 20210604
        ACPICA: Add support for PlatformRtMechanism OperationRegion handler
        ACPICA: iASL: add disassembler support for PRMT
        ACPICA: Add the CFMWS structure definition to the CEDT table
        ACPICA: Add defines for the CXL Host Bridge Structure (CHBS)
        ACPICA: iASL: Add support for the BDAT ACPI table
        ACPICA: Add _PLD panel positions
        ACPICA: Use ACPI_FALLTHROUGH
        ACPICA: iASL Table Compiler: Add full support for RGRT ACPI table
        ACPICA: iASL: Add support for the SVKL table
        ACPICA: iASL: Finish support for the IVRS ACPI table
        ACPICA: Fix memory leak caused by _CID repair function
        ACPICA: Add SVKL table headers
        ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Mailbox Structure
      f9ef9b82
  2. 23 Jun, 2021 4 commits
    • Dmitry Torokhov's avatar
      ACPI: PM: postpone bringing devices to D0 unless we need them · f7599be2
      Dmitry Torokhov authored
      Currently ACPI power domain brings devices into D0 state in the "resume
      early" phase. Normally this does not cause any issues, as powering up
      happens quickly. However there are peripherals that have certain timing
      requirements for powering on, for example some models of Elan
      touchscreens need 300msec after powering up/releasing reset line before
      they can accept commands from the host. Such devices will dominate
      the time spent in early resume phase and cause increase in overall
      resume time as we wait for early resume to complete before we can
      proceed to the normal resume stage.
      
      There are ways for a driver to indicate that it can tolerate device
      being in the low power mode and that it knows how to power the device
      back up when resuming, bit that requires changes to individual drivers
      that may not really care about details of ACPI controlled power
      management.
      
      This change attempts to solve this issue at ACPI power domain level, by
      postponing powering up device until we get to the normal resume stage,
      unless there is early resume handler defined for the device, or device
      does not declare any resume handlers, in which case we continue powering
      up such devices early. This allows us to shave off several hundred
      milliseconds of resume time on affected systems.
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f7599be2
    • Richard Fitzgerald's avatar
      ACPI: tables: Add custom DSDT file as makefile prerequisite · d1059c1b
      Richard Fitzgerald authored
      A custom DSDT file is mostly used during development or debugging,
      and in that case it is quite likely to want to rebuild the kernel
      after changing ONLY the content of the DSDT.
      
      This patch adds the custom DSDT as a prerequisite to tables.o
      to ensure a rebuild if the DSDT file is updated. Make will merge
      the prerequisites from multiple rules for the same target.
      Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d1059c1b
    • Nathan Chancellor's avatar
      ACPI: bgrt: Use sysfs_emit · 6554ca9c
      Nathan Chancellor authored
      sysfs_emit is preferred to snprintf for emitting values after
      commit 2efc459d ("sysfs: Add sysfs_emit and sysfs_emit_at to format
      sysfs output").
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6554ca9c
    • Nathan Chancellor's avatar
      ACPI: bgrt: Fix CFI violation · f37ccf8f
      Nathan Chancellor authored
      clang's Control Flow Integrity requires that every indirect call has a
      valid target, which is based on the type of the function pointer. The
      *_show() functions in this file are written as if they will be called
      from dev_attr_show(); however, they will be called from
      sysfs_kf_seq_show() because the files were created by
      sysfs_create_group() and the sysfs ops are based on kobj_sysfs_ops
      because of kobject_add_and_create(). Because the *_show() functions do
      not match the type of the show() member in struct kobj_attribute, there
      is a CFI violation.
      
      $ cat /sys/firmware/acpi/bgrt/{status,type,version,{x,y}offset}}
      1
      0
      1
      522
      307
      
      $ dmesg | grep "CFI failure"
      [  267.761825] CFI failure (target: type_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8):
      [  267.762246] CFI failure (target: xoffset_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8):
      [  267.762584] CFI failure (target: status_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8):
      [  267.762973] CFI failure (target: yoffset_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8):
      [  267.763330] CFI failure (target: version_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8):
      
      Convert these functions to the type of the show() member in struct
      kobj_attribute so that there is no more CFI violation. Because these
      functions are all so similar, combine them into a macro.
      
      Fixes: d1ff4b1c ("ACPI: Add support for exposing BGRT data")
      Link: https://github.com/ClangBuiltLinux/linux/issues/1406Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f37ccf8f
  3. 21 Jun, 2021 2 commits
  4. 18 Jun, 2021 7 commits
  5. 17 Jun, 2021 15 commits
  6. 16 Jun, 2021 1 commit
  7. 14 Jun, 2021 5 commits