diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-03 15:21:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-03 15:21:54 -0700 |
commit | 4e71add02821bdd204dd29c35e66baecc9b6a235 (patch) | |
tree | 0e3d74b02498208820ac09e17f66af2cca2f1d32 | |
parent | 7cca308cfdc0725363ac5943dca9dcd49cc1d2d5 (diff) | |
parent | 8b7084b848cd9d7071ed9e253e1c600a25f72ddd (diff) | |
download | linux-4e71add02821bdd204dd29c35e66baecc9b6a235.tar.bz2 |
Merge branch 'stable/for-linus-5.15-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft
Pull ibft fix from Konrad Rzeszutek Wilk:
"An arm64 compile fix for the new code that fixed the iBFT KASLR
handling. I missed the original 0-day build email report"
* 'stable/for-linus-5.15-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft:
iscsi_ibft: Fix isa_bus_to_virt not working under ARM
-rw-r--r-- | drivers/firmware/iscsi_ibft.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 612a59e213df..6e9788324fea 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -86,10 +86,6 @@ MODULE_VERSION(IBFT_ISCSI_VERSION); static struct acpi_table_ibft *ibft_addr; -#ifndef CONFIG_ISCSI_IBFT_FIND -phys_addr_t ibft_phys_addr; -#endif - struct ibft_hdr { u8 id; u8 version; @@ -851,7 +847,21 @@ static void __init acpi_find_ibft_region(void) { } #endif - +#ifdef CONFIG_ISCSI_IBFT_FIND +static int __init acpi_find_isa_region(void) +{ + if (ibft_phys_addr) { + ibft_addr = isa_bus_to_virt(ibft_phys_addr); + return 0; + } + return -ENODEV; +} +#else +static int __init acpi_find_isa_region(void) +{ + return -ENODEV; +} +#endif /* * ibft_init() - creates sysfs tree entries for the iBFT data. */ @@ -864,9 +874,7 @@ static int __init ibft_init(void) is called before ACPI tables are parsed and it only does legacy finding. */ - if (ibft_phys_addr) - ibft_addr = isa_bus_to_virt(ibft_phys_addr); - else + if (acpi_find_isa_region()) acpi_find_ibft_region(); if (ibft_addr) { |