From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: linux-kernel@vger.kernel.org, vijayendra.suman@oracle.com,
mlombard@redhat.com, rppt@kernel.org, pjones@redhat.com
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
kernel test robot <lkp@intel.com>
Subject: [PATCH] iscsi_ibft: Fix isa_bus_to_virt not working under ARM
Date: Thu, 2 Sep 2021 14:03:13 +0000 [thread overview]
Message-ID: <20210902140313.1555053-2-konrad.wilk@oracle.com> (raw)
In-Reply-To: <20210902140313.1555053-1-konrad.wilk@oracle.com>
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: kernel test robot <lkp@intel.com>
Reported-by: Vijayendra Suman <vijayendra.suman@oracle.com>
CC: Maurizio Lombardi <mlombard@redhat.com>
CC: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
drivers/firmware/iscsi_ibft.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 612a59e213df..7cde1a7a3ab1 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -86,7 +86,7 @@ MODULE_VERSION(IBFT_ISCSI_VERSION);
static struct acpi_table_ibft *ibft_addr;
-#ifndef CONFIG_ISCSI_IBFT_FIND
+#ifdef CONFIG_ISCSI_IBFT_FIND
phys_addr_t ibft_phys_addr;
#endif
@@ -851,7 +851,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 +878,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) {
--
2.27.0
next prev parent reply other threads:[~2021-09-02 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 14:03 [PATCH] Fix for iBFT compile issues on ARM64 Konrad Rzeszutek Wilk
2021-09-02 14:03 ` Konrad Rzeszutek Wilk [this message]
2021-09-02 17:14 ` [PATCH] iscsi_ibft: Fix isa_bus_to_virt not working under ARM Mike Rapoport
2021-09-02 20:35 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210902140313.1555053-2-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mlombard@redhat.com \
--cc=pjones@redhat.com \
--cc=rppt@kernel.org \
--cc=vijayendra.suman@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.