1. 11 Feb, 2021 3 commits
    • Bard Liao's avatar
    • Bard Liao's avatar
      regmap: sdw: use _no_pm functions in regmap_read/write · d288a571
      Bard Liao authored
      sdw_update_slave_status will be invoked when a codec is attached,
      and the codec driver will initialize the codec with regmap functions
      while the codec device is pm_runtime suspended.
      
      regmap routines currently rely on regular SoundWire IO functions,
      which will call pm_runtime_get_sync()/put_autosuspend.
      
      This causes a deadlock where the resume routine waits for an
      initialization complete signal that while the initialization complete
      can only be reached when the resume completes.
      
      The only solution if we allow regmap functions to be used in resume
      operations as well as during codec initialization is to use _no_pm
      routines. The duty of making sure the bus is operational needs to be
      handled above the regmap level.
      
      Fixes: 7c22ce6e ('regmap: Add SoundWire bus support')
      Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Link: https://lore.kernel.org/r/20210122070634.12825-6-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      d288a571
    • Marcin Ślusarz's avatar
      soundwire: intel: fix possible crash when no device is detected · 957e3f79
      Marcin Ślusarz authored
      acpi_walk_namespace can return success without executing our
      callback which initializes info->handle.
      If the random value in this structure is a valid address (which
      is on the stack, so it's quite possible), then nothing bad will
      happen, because:
      sdw_intel_scan_controller
       -> acpi_bus_get_device
       -> acpi_get_device_data
       -> acpi_get_data_full
       -> acpi_ns_validate_handle
      will reject this handle.
      
      However, if the value from the stack doesn't point to a valid
      address, we get this:
      
      BUG: kernel NULL pointer dereference, address: 0000000000000050
      PGD 0 P4D 0
      Oops: 0000 [#1] SMP NOPTI
      CPU: 6 PID: 472 Comm: systemd-udevd Tainted: G        W         5.10.0-1-amd64 #1 Debian 5.10.4-1
      Hardware name: HP HP Pavilion Laptop 15-cs3xxx/86E2, BIOS F.05 01/01/2020
      RIP: 0010:acpi_ns_validate_handle+0x1a/0x23
      Code: 00 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f 1f 44 00 00 48 8d 57 ff 48 89 f8 48 83 fa fd 76 08 48 8b 05 0c b8 67 01 c3 <80> 7f 08 0f 74 02 31 c0 c3 0f 1f 44 00 00 48 8b 3d f6 b7 67 01 e8
      RSP: 0000:ffffc388807c7b20 EFLAGS: 00010213
      RAX: 0000000000000048 RBX: ffffc388807c7b70 RCX: 0000000000000000
      RDX: 0000000000000047 RSI: 0000000000000246 RDI: 0000000000000048
      RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
      R10: ffffffffc0f5f4d1 R11: ffffffff8f0cb268 R12: 0000000000001001
      R13: ffffffff8e33b160 R14: 0000000000000048 R15: 0000000000000000
      FS:  00007f24548288c0(0000) GS:ffff9f781fb80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000050 CR3: 0000000106158004 CR4: 0000000000770ee0
      PKRU: 55555554
      Call Trace:
       acpi_get_data_full+0x4d/0x92
       acpi_bus_get_device+0x1f/0x40
       sdw_intel_acpi_scan+0x59/0x230 [soundwire_intel]
       ? strstr+0x22/0x60
       ? dmi_matches+0x76/0xe0
       snd_intel_dsp_driver_probe.cold+0xaf/0x163 [snd_intel_dspcfg]
       azx_probe+0x7a/0x970 [snd_hda_intel]
       local_pci_probe+0x42/0x80
       ? _cond_resched+0x16/0x40
       pci_device_probe+0xfd/0x1b0
       really_probe+0x205/0x460
       driver_probe_device+0xe1/0x150
       device_driver_attach+0xa1/0xb0
       __driver_attach+0x8a/0x150
       ? device_driver_attach+0xb0/0xb0
       ? device_driver_attach+0xb0/0xb0
       bus_for_each_dev+0x78/0xc0
       bus_add_driver+0x12b/0x1e0
       driver_register+0x8b/0xe0
       ? 0xffffffffc0f65000
       do_one_initcall+0x44/0x1d0
       ? do_init_module+0x23/0x250
       ? kmem_cache_alloc_trace+0xf5/0x200
       do_init_module+0x5c/0x250
       __do_sys_finit_module+0xb1/0x110
       do_syscall_64+0x33/0x80
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      Signed-off-by: default avatarMarcin Ślusarz <marcin.slusarz@intel.com>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      CC: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20210208120104.204761-1-marcin.slusarz@gmail.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      957e3f79
  2. 07 Feb, 2021 3 commits
  3. 06 Feb, 2021 4 commits
  4. 01 Feb, 2021 2 commits
  5. 19 Jan, 2021 10 commits
  6. 06 Jan, 2021 1 commit
  7. 27 Dec, 2020 8 commits
  8. 26 Dec, 2020 5 commits
  9. 25 Dec, 2020 4 commits
    • Linus Torvalds's avatar
      drm/amd/display: avoid uninitialized variable warning · 61d79136
      Linus Torvalds authored
      clang (quite rightly) complains fairly loudly about the newly added
      mpc1_get_mpc_out_mux() function returning an uninitialized value if the
      'opp_id' checks don't pass.
      
      This may not happen in practice, but the code really shouldn't return
      garbage if the sanity checks don't pass.
      
      So just initialize 'val' to zero to avoid the issue.
      
      Fixes: 110b055b ("drm/amd/display: add getter routine to retrieve mpcc mux")
      Cc: Josip Pavic <Josip.Pavic@amd.com>
      Cc: Bindu Ramamurthy <bindu.r@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      61d79136
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux · 5814bc2d
      Linus Torvalds authored
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Refactor 'perf stat' per CPU/socket/die/thread aggregation fixing use
         cases in ARM machines.
      
       - Fix memory leak when synthesizing SDT probes in 'perf probe'.
      
       - Update kernel header copies related to KVM, epol_pwait. msr-index and
         powerpc and s390 syscall tables.
      
      * tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (24 commits)
        perf probe: Fix memory leak when synthesizing SDT probes
        perf stat aggregation: Add separate thread member
        perf stat aggregation: Add separate core member
        perf stat aggregation: Add separate die member
        perf stat aggregation: Add separate socket member
        perf stat aggregation: Add separate node member
        perf stat aggregation: Start using cpu_aggr_id in map
        perf cpumap: Drop in cpu_aggr_map struct
        perf cpumap: Add new map type for aggregation
        perf stat: Replace aggregation ID with a struct
        perf cpumap: Add new struct for cpu aggregation
        perf cpumap: Use existing allocator to avoid using malloc
        perf tests: Improve topology test to check all aggregation types
        perf tools: Update s390's syscall.tbl copy from the kernel sources
        perf tools: Update powerpc's syscall.tbl copy from the kernel sources
        perf s390: Move syscall.tbl check into check-headers.sh
        perf powerpc: Move syscall.tbl check to check-headers.sh
        tools headers UAPI: Synch KVM's svm.h header with the kernel
        tools kvm headers: Update KVM headers from the kernel sources
        tools headers UAPI: Sync KVM's vmx.h header with the kernel sources
        ...
      5814bc2d
    • Linus Torvalds's avatar
      Merge branch 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux · 42dc45e8
      Linus Torvalds authored
      Pull coccinelle updates from Julia Lawall.
      
      * 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
        scripts: coccicheck: Correct usage of make coccicheck
        coccinelle: update expiring email addresses
        coccinnelle: Remove ptr_ret script
        kbuild: do not use scripts/ld-version.sh for checking spatch version
        remove boolinit.cocci
      42dc45e8
    • Michael Ellerman's avatar
      genirq: Fix export of irq_to_desc() for powerpc KVM · 11cc92eb
      Michael Ellerman authored
      Commit 64a1b95b ("genirq: Restrict export of irq_to_desc()") removed
      the export of irq_to_desc() unless powerpc KVM is being built, because
      there is still a use of irq_to_desc() in modular code there.
      
      However it used:
      
        #ifdef CONFIG_KVM_BOOK3S_64_HV
      
      Which doesn't work when that symbol is =m, leading to a build failure:
      
        ERROR: modpost: "irq_to_desc" [arch/powerpc/kvm/kvm-hv.ko] undefined!
      
      Fix it by checking for the definedness of the correct symbol which is
      CONFIG_KVM_BOOK3S_64_HV_MODULE.
      
      Fixes: 64a1b95b ("genirq: Restrict export of irq_to_desc()")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      11cc92eb