Skip to content
Snippets Groups Projects
  1. Dec 13, 2021
  2. Nov 22, 2021
  3. Nov 17, 2021
  4. Nov 15, 2021
  5. Nov 06, 2021
  6. Oct 29, 2021
  7. Oct 27, 2021
  8. Oct 26, 2021
  9. Oct 25, 2021
  10. Oct 24, 2021
  11. Oct 18, 2021
  12. Oct 07, 2021
    • Cai Huoqing's avatar
      firmware: tegra: bpmp: Use devm_platform_ioremap_resource() · f11c34bd
      Cai Huoqing authored
      
      Use the devm_platform_ioremap_resource() helper instead of calling
      platform_get_resource() and devm_ioremap_resource() separately.
      
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      f11c34bd
    • Arnd Bergmann's avatar
      firmware: tegra: Reduce stack usage · 06c2d9a0
      Arnd Bergmann authored
      Building the bpmp-debugfs driver for Arm results in a warning for stack usage:
      
      drivers/firmware/tegra/bpmp-debugfs.c:321:16: error: stack frame size of 1224 bytes in function 'bpmp_debug_store' [-Werror,-Wframe-larger-than=]
      static ssize_t bpmp_debug_store(struct file *file, const char __user *buf,
      
      It should be possible to rearrange the code to not require two separate
      buffers for the file name, but the easiest workaround is to use dynamic
      allocation.
      
      Fixes: 5e37b9c1 ("firmware: tegra: Add support for in-band debug")
      Link: https://lore.kernel.org/all/20201204193714.3134651-1-arnd@kernel.org/
      
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      [treding@nvidia.com: consistently return NULL on failure]
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      06c2d9a0
    • Arnd Bergmann's avatar
      qcom_scm: hide Kconfig symbol · 424953cf
      Arnd Bergmann authored
      
      Now that SCM can be a loadable module, we have to add another
      dependency to avoid link failures when ipa or adreno-gpu are
      built-in:
      
      aarch64-linux-ld: drivers/net/ipa/ipa_main.o: in function `ipa_probe':
      ipa_main.c:(.text+0xfc4): undefined reference to `qcom_scm_is_available'
      
      ld.lld: error: undefined symbol: qcom_scm_is_available
      >>> referenced by adreno_gpu.c
      >>>               gpu/drm/msm/adreno/adreno_gpu.o:(adreno_zap_shader_load) in archive drivers/built-in.a
      
      This can happen when CONFIG_ARCH_QCOM is disabled and we don't select
      QCOM_MDT_LOADER, but some other module selects QCOM_SCM. Ideally we'd
      use a similar dependency here to what we have for QCOM_RPROC_COMMON,
      but that causes dependency loops from other things selecting QCOM_SCM.
      
      This appears to be an endless problem, so try something different this
      time:
      
       - CONFIG_QCOM_SCM becomes a hidden symbol that nothing 'depends on'
         but that is simply selected by all of its users
      
       - All the stubs in include/linux/qcom_scm.h can go away
      
       - arm-smccc.h needs to provide a stub for __arm_smccc_smc() to
         allow compile-testing QCOM_SCM on all architectures.
      
       - To avoid a circular dependency chain involving RESET_CONTROLLER
         and PINCTRL_SUNXI, drop the 'select RESET_CONTROLLER' statement.
         According to my testing this still builds fine, and the QCOM
         platform selects this symbol already.
      
      Acked-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Acked-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      424953cf
  13. Oct 06, 2021
  14. Oct 05, 2021
    • Zhang Jianhua's avatar
      efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock() · 38fa3206
      Zhang Jianhua authored
      
      While reboot the system by sysrq, the following bug will be occur.
      
      BUG: sleeping function called from invalid context at kernel/locking/semaphore.c:90
      in_atomic(): 0, irqs_disabled(): 128, non_block: 0, pid: 10052, name: rc.shutdown
      CPU: 3 PID: 10052 Comm: rc.shutdown Tainted: G        W O      5.10.0 #1
      Call trace:
       dump_backtrace+0x0/0x1c8
       show_stack+0x18/0x28
       dump_stack+0xd0/0x110
       ___might_sleep+0x14c/0x160
       __might_sleep+0x74/0x88
       down_interruptible+0x40/0x118
       virt_efi_reset_system+0x3c/0xd0
       efi_reboot+0xd4/0x11c
       machine_restart+0x60/0x9c
       emergency_restart+0x1c/0x2c
       sysrq_handle_reboot+0x1c/0x2c
       __handle_sysrq+0xd0/0x194
       write_sysrq_trigger+0xbc/0xe4
       proc_reg_write+0xd4/0xf0
       vfs_write+0xa8/0x148
       ksys_write+0x6c/0xd8
       __arm64_sys_write+0x18/0x28
       el0_svc_common.constprop.3+0xe4/0x16c
       do_el0_svc+0x1c/0x2c
       el0_svc+0x20/0x30
       el0_sync_handler+0x80/0x17c
       el0_sync+0x158/0x180
      
      The reason for this problem is that irq has been disabled in
      machine_restart() and then it calls down_interruptible() in
      virt_efi_reset_system(), which would occur sleep in irq context,
      it is dangerous! Commit 99409b93("locking/semaphore: Add
      might_sleep() to down_*() family") add might_sleep() in
      down_interruptible(), so the bug info is here. down_trylock()
      can solve this problem, cause there is no might_sleep.
      
      --------
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
      Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      38fa3206
    • Ard Biesheuvel's avatar
      efi/cper: use stack buffer for error record decoding · b3a72ca8
      Ard Biesheuvel authored
      
      Joe reports that using a statically allocated buffer for converting CPER
      error records into human readable text is probably a bad idea. Even
      though we are not aware of any actual issues, a stack buffer is clearly
      a better choice here anyway, so let's move the buffer into the stack
      frames of the two functions that refer to it.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      b3a72ca8
    • Heinrich Schuchardt's avatar
      efi/libstub: Simplify "Exiting bootservices" message · 68c9cdf3
      Heinrich Schuchardt authored
      
      The message
      
          "Exiting boot services and installing virtual address map...\n"
      
      is even shown if we have efi=novamap on the command line or the firmware
      does not provide EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP.
      
      To avoid confusion just print
      
          "Exiting boot services...\n"
      
      Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
      Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      68c9cdf3
    • Sudeep Holla's avatar
      firmware: arm_ffa: Fix __ffa_devices_unregister · eb7b52e6
      Sudeep Holla authored
      When arm_ffa firmware driver module is unloaded or removed we call
      __ffa_devices_unregister on all the devices on the ffa bus. It must
      unregister all the devices instead it is currently just releasing the
      devices without unregistering. That is pure wrong as when we try to
      load the module back again, it will result in the kernel crash something
      like below.
      
      -->8
       CPU: 2 PID: 232 Comm: modprobe Not tainted 5.15.0-rc2+ #169
       Hardware name: FVP Base RevC (DT)
       Call trace:
        dump_backtrace+0x0/0x1cc
        show_stack+0x18/0x64
        dump_stack_lvl+0x64/0x7c
        dump_stack+0x18/0x38
        sysfs_create_dir_ns+0xe4/0x140
        kobject_add_internal+0x170/0x358
        kobject_add+0x94/0x100
        device_add+0x178/0x5f0
        device_register+0x20/0x30
        ffa_device_register+0x80/0xcc [ffa_module]
        ffa_setup_partitions+0x7c/0x108 [ffa_module]
        init_module+0x290/0x2dc [ffa_module]
        do_one_initcall+0xbc/0x230
        do_init_module+0x58/0x304
        load_module+0x15e0/0x1f68
        __arm64_sys_finit_module+0xb8/0xf4
        invoke_syscall+0x44/0x140
        el0_svc_common+0xb4/0xf0
        do_el0_svc+0x24/0x80
        el0_svc+0x20/0x50
        el0t_64_sync_handler+0x84/0xe4
        el0t_64_sync+0x1a0/0x1a4
       kobject_add_internal failed for arm-ffa-8001 with -EEXIST, don't try to
       register things with the same name in the same directory.
      ----
      
      Fix the issue by calling device_unregister in __ffa_devices_unregister
      which will also take care of calling device_release(which is mapped to
      ffa_release_device)
      
      Link: https://lore.kernel.org/r/20210924092859.3057562-2-sudeep.holla@arm.com
      
      
      Fixes: e7818584 ("firmware: arm_ffa: Add initial FFA bus support for device enumeration")
      Tested-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      eb7b52e6
    • Sudeep Holla's avatar
      firmware: arm_ffa: Add missing remove callback to ffa_bus_type · 244f5d59
      Sudeep Holla authored
      Currently the arm_ffa firmware driver can be built as module and hence
      all the users of FFA driver. If any driver on the ffa bus is removed or
      unregistered, the remove callback on all the device bound to the driver
      being removed should be callback. For that to happen, we must register
      a remove callback on the ffa_bus which is currently missing. This results
      in the probe getting called again without the previous remove callback
      on a device which may result in kernel crash.
      
      Fix the issue by registering the remove callback on the FFA bus.
      
      Link: https://lore.kernel.org/r/20210924092859.3057562-1-sudeep.holla@arm.com
      
      
      Fixes: e7818584 ("firmware: arm_ffa: Add initial FFA bus support for device enumeration")
      Reported-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
      Tested-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      244f5d59
  15. Oct 01, 2021
  16. Sep 28, 2021
  17. Sep 27, 2021
  18. Sep 23, 2021
  19. Sep 21, 2021
  20. Sep 20, 2021
  21. Sep 02, 2021
    • Konrad Rzeszutek Wilk's avatar
      iscsi_ibft: Fix isa_bus_to_virt not working under ARM · 799206c1
      Konrad Rzeszutek Wilk authored
      
      The isa_bus_to_virt is only needed under X86 and in fact the code
      that sets the ibft_phys_addr is only compiled under X86.
      
      As such lets just ifdef the code.
      
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Reported-by: default avatarVijayendra Suman <vijayendra.suman@oracle.com>
      CC: Maurizio Lombardi <mlombard@redhat.com>
      CC: Mike Rapoport <rppt@kernel.org>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      ---
      v2: Remove the ibft_phys_addr as it is defined in iscsi_ibft.h
      799206c1
    • Hans de Goede's avatar
      firmware: dmi: Move product_sku info to the end of the modalias · f97a2103
      Hans de Goede authored and Jean DELVARE's avatar Jean DELVARE committed
      Commit e26f023e ("firmware/dmi: Include product_sku info to modalias")
      added a new field to the modalias in the middle of the modalias, breaking
      some existing udev/hwdb matches on the whole modalias without a wildcard
      ('*') in between the pvr and rvn fields.
      
      All modalias matches in e.g. :
      https://github.com/systemd/systemd/blob/main/hwdb.d/60-sensor.hwdb
      deliberately end in ':*' so that new fields can be added at *the end* of
      the modalias, but adding a new field in the middle like this breaks things.
      
      Move the new sku field to the end of the modalias to fix some hwdb
      entries no longer matching.
      
      The new sku field has already been put to use in 2 new hwdb entries:
      
       sensor:modalias:platform:HID-SENSOR-200073:dmi:*svnDell*:sku0A3E:*
        ACCEL_LOCATION=base
      
       sensor:modalias:platform:HID-SENSOR-200073:dmi:*svnDell*:sku0B0B:*
        ACCEL_LOCATION=base
      
      The wildcard use before and after the sku in these matches means that they
      should keep working with the sku moved to the end.
      
      Note that there is a second instance of in essence the same problem,
      commit f5152f4d ("firmware/dmi: Report DMI Bios & EC firmware release")
      
      Added 2 new br and efr fields in the middle of the modalias. This too
      breaks some hwdb modalias matches, but this has gone unnoticed for over
      a year. So some newer hwdb modalias matches actually depend on these
      fields being in the middle of the string. Moving these to the end now
      would break 3 hwdb entries, while fixing 8 entries.
      
      Since there is no good answer for the new br and efr fields I have chosen
      to leave these as is. Instead I'll submit a hwdb update to put a wildcard
      at the place where these fields may or may not be present depending on the
      kernel version.
      
      BugLink: https://github.com/systemd/systemd/issues/20550
      Link: https://github.com/systemd/systemd/pull/20562
      
      
      Fixes: e26f023e ("firmware/dmi: Include product_sku info to modalias")
      Cc: stable@vger.kernel.org
      Cc: Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com>
      Cc: Erwan Velu <e.velu@criteo.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
      f97a2103
  22. Aug 27, 2021
Loading