Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1062744ybl; Wed, 14 Aug 2019 10:06:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsfuNgEdkBeFSghOD/rvW8kGl1rbODPB5/vpoY+ecMHbLCMLFzEOPsz4uYIBAXsQL9cPpb X-Received: by 2002:a17:902:aa09:: with SMTP id be9mr422603plb.52.1565802412918; Wed, 14 Aug 2019 10:06:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802412; cv=none; d=google.com; s=arc-20160816; b=GKgIaYfFPoeyQcpbSvhTcvmD6LhJrt/ce+cFO6PG84O2G+jX8lST/36QrLLf3zHAuj 9/7jzrqe6MehfxmF8pgsH2g/2fzbN303il10Bhqd4bZPlx352H/7uZKmFG7eyG2hwKuB EtefU31fH+JIULg/qC744BSot1wJ3GiNKEytKAcQXUriM58YXuuQbne2KsiXdCkwf7l7 vvhLEkqsf1c56W7KstUzyi3LPtABC/B0CeOL7XDze8RDx5/RAckiFcy4sBwj53oysgyY tbqMQSOHXc9DOfAkGDJweCkPNmDu7Q4yNU5N93yNp8tp+SYt/bXlGMTNMJlzEclBcaLg PNrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GiatJM+uT5RJtHoW31Bo4EBAmGQmKXlOALW3qL9ZQwM=; b=GVDYXGfon7zFkpL9iGb7LhW0KTCxBLAjX8VYPQDyIOoCpdIsBO9wZ6Q9rOGn+ZKTUZ TrYWxIhoICmz0mw9QdoUW8+ki+NKTs9mAbPfVvZoN0iy6uxXiJxWpthcxZlHr1ELg+20 42rQyeiB5+t0ZM/tLIfuc8T0Bp6cxQ/41sMw0pYVEQSahsb2VRv7Qi1lzx4+sLxCKK+y KVbdenrU4wD4xqpAZ3iYTPNUQP4mh2rdq9hRpFbTtnhYmkIAygKZMrD54VOtw76xoeSe Crx/GnMOmZ16ez0cAykX7PAwQcOSbkgK+PvbtEV0bEFyfzE+acd3V4SPeA9vauuedh3I PrYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sHrClJmD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn5si245764plb.170.2019.08.14.10.06.36; Wed, 14 Aug 2019 10:06:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sHrClJmD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729376AbfHNRFJ (ORCPT + 99 others); Wed, 14 Aug 2019 13:05:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:53986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729357AbfHNRFF (ORCPT ); Wed, 14 Aug 2019 13:05:05 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 27EEA214DA; Wed, 14 Aug 2019 17:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802304; bh=kyMMWi/9VDnkrXmroYinFKQnd21XEuq3gSb6JFy5QkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sHrClJmDvuH2N7bu2CnFyFkIFPkrsYvIhZDHOSD4LF/mBfSp8KvdKvvQxsQ9BASmF FIHzoagmSKAAjzw0dUjh31BXx8asDbiWJk803scMl/sqXJiW+uCh/RTyWxbKsLx6e0 5X1dcEGIoNNCw7IelYWqv/9EvoR1OyT3lcR3cTqQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Tai , Konrad Rzeszutek Wilk , Sasha Levin Subject: [PATCH 5.2 074/144] iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND Date: Wed, 14 Aug 2019 19:00:30 +0200 Message-Id: <20190814165802.952672907@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 94bccc34071094c165c79b515d21b63c78f7e968 ] iscsi_ibft can use ACPI to find the iBFT entry during bootup, currently, ISCSI_IBFT depends on ISCSI_IBFT_FIND which is a X86 legacy way to find the iBFT by searching through the low memory. This patch changes the dependency so that other arch like ARM64 can use ISCSI_IBFT as long as the arch supports ACPI. ibft_init() needs to use the global variable ibft_addr declared in iscsi_ibft_find.c. A #ifndef CONFIG_ISCSI_IBFT_FIND is needed to declare the variable if CONFIG_ISCSI_IBFT_FIND is not selected. Moving ibft_addr into the iscsi_ibft.c does not work because if ISCSI_IBFT is selected as a module, the arch/x86/kernel/setup.c won't be able to find the variable at compile time. Signed-off-by: Thomas Tai Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Sasha Levin --- drivers/firmware/Kconfig | 5 +++-- drivers/firmware/iscsi_ibft.c | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index d40ccc3af9e26..fa7ed01415b72 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -157,7 +157,7 @@ config DMI_SCAN_MACHINE_NON_EFI_FALLBACK config ISCSI_IBFT_FIND bool "iSCSI Boot Firmware Table Attributes" - depends on X86 && ACPI + depends on X86 && ISCSI_IBFT default n help This option enables the kernel to find the region of memory @@ -168,7 +168,8 @@ config ISCSI_IBFT_FIND config ISCSI_IBFT tristate "iSCSI Boot Firmware Table Attributes module" select ISCSI_BOOT_SYSFS - depends on ISCSI_IBFT_FIND && SCSI && SCSI_LOWLEVEL + select ISCSI_IBFT_FIND if X86 + depends on ACPI && SCSI && SCSI_LOWLEVEL default n help This option enables support for detection and exposing of iSCSI diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index ab3aa39838338..7e12cbdf957cc 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -84,6 +84,10 @@ MODULE_DESCRIPTION("sysfs interface to BIOS iBFT information"); MODULE_LICENSE("GPL"); MODULE_VERSION(IBFT_ISCSI_VERSION); +#ifndef CONFIG_ISCSI_IBFT_FIND +struct acpi_table_ibft *ibft_addr; +#endif + struct ibft_hdr { u8 id; u8 version; -- 2.20.1