1. 29 Jun, 2021 4 commits
    • 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 1 commit
    • Rafael J. Wysocki's avatar
      ACPI: scan: Simplify acpi_table_events_fn() · 8d287e82
      Rafael J. Wysocki authored
      Notice that the table field of struct acpi_table_events_work is never
      read and its event field is always equal to ACPI_TABLE_EVENT_LOAD, so
      both of them are redundant.
      
      Accordingly, drop struct acpi_table_events_work and use struct
      work_struct directly instead of it, simplify acpi_scan_table_handler()
      and rename it to acpi_scan_table_notify().
      
      Moreover, make acpi_bus_table_handler() check the event code against
      ACPI_TABLE_EVENT_LOAD before calling acpi_scan_table_notify(), so it
      is not necessary to do that check in the latter.
      
      No intentional functional impact.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8d287e82
  4. 18 Jun, 2021 7 commits
  5. 17 Jun, 2021 13 commits
  6. 16 Jun, 2021 1 commit
  7. 14 Jun, 2021 6 commits
  8. 13 Jun, 2021 4 commits
    • Linus Torvalds's avatar
      Linux 5.13-rc6 · 009c9aa5
      Linus Torvalds authored
      009c9aa5
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of... · e4e45343
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Correct buffer copying when peeking events
      
       - Sync cpufeatures/disabled-features.h header with the kernel sources
      
      * tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        tools headers cpufeatures: Sync with the kernel sources
        perf session: Correct buffer copying when peeking events
      e4e45343
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 960f0716
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Stable fixes:
      
         - Fix use-after-free in nfs4_init_client()
      
        Bugfixes:
      
         - Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode()
      
         - Fix second deadlock in nfs4_evict_inode()
      
         - nfs4_proc_set_acl should not change the value of NFS_CAP_UIDGID_NOMAP
      
         - Fix setting of the NFS_CAP_SECURITY_LABEL capability"
      
      * tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: Fix second deadlock in nfs4_evict_inode()
        NFSv4: Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode()
        NFS: FMODE_READ and friends are C macros, not enum types
        NFS: Fix a potential NULL dereference in nfs_get_client()
        NFS: Fix use-after-free in nfs4_init_client()
        NFS: Ensure the NFS_CAP_SECURITY_LABEL capability is set when appropriate
        NFSv4: nfs4_proc_set_acl needs to restore NFS_CAP_UIDGID_NOMAP on error.
      960f0716
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 331a6edb
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four reasonably small fixes to the core for scsi host allocation
        failure paths.
      
        The root problem is that we're not freeing the memory allocated by
        dev_set_name(), which involves a rejig of may of the free on error
        paths to do put_device() instead of kfree which, in turn, has several
        other knock on ramifications and inspection turned up a few other
        lurking bugs"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: core: Only put parent device if host state differs from SHOST_CREATED
        scsi: core: Put .shost_dev in failure path if host state changes to RUNNING
        scsi: core: Fix failure handling of scsi_add_host_with_dma()
        scsi: core: Fix error handling of scsi_host_alloc()
      331a6edb