Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1067930ybl; Wed, 14 Aug 2019 10:11:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzb9hv0kUew8GX0J15fOIKd5EcWXqDYvqw/aEaaXgeDVwJjWdjmxOPP6z/9BDHRLSgTJiAo X-Received: by 2002:a65:6415:: with SMTP id a21mr206934pgv.98.1565802665952; Wed, 14 Aug 2019 10:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802665; cv=none; d=google.com; s=arc-20160816; b=g36ObsuiSA3OeFuDGMOubf+al+NwrEMoLPD4ApCJy8jgOTEtLIl7TyGN7fFFgWpGvX AUD/1nVJ17AQff8Oz0e7cmiyXG1NFeOhNeR5cWP2RORgum5R0rN26p90ECLI+6MJFhXR b9kfzfn+RdnXIPcXPNcHcx41vBWI9wjzd/lhmr6XOp3yaTEOCtAxzNrtjMERRKgiEWTw 2WmajUFg29DwR3xfX7iZ2m8CKyKH0q2CRkUr5T2HzXHJg3yFCUP6PAd0E9JKERhdFVFJ 22GUsUySVfGOCA7dVIpbjQuBSSXNJtR6oP/1ZF4JGYhBcy9/XjohRIxyT3I+KW6i/dVB 3grQ== 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=luyU/07TCqiESPh/ata026SR6OA8O4HeGBLYJKqJNT0=; b=pF5+a/A/xVrlyxbfilQJ3y7dPWFuxpVMuc+M2EnrJgAT5OF4QKWiB0wZ7+ShKhQC8r MIFbQe2/JvAp+kU7WGi6RNEq5RSpGT+YN+UiFcJH0FF+98bYRuNHPQkqaVFk6jqWfh5P HawfP8D9C3lVKx4VkLNU2lU665ej9rYBFm+udjtQRLWJI0NuTpp81Q6dbV7gpjpw5hf0 xvrA69tN3Tv+eADV0RQw+px9lVXp5+/L/RS7SEWVfAzZWcpQCA8RNafq/goeof9ju/L/ J+nlhL22VU4f08JDTCjYKNy5KLWaP7oQ+iyhso4hRcIZQA/QoPe6wdZzJ7SbRqoe8BFD tfwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jzipTGXv; 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 d35si250621pla.90.2019.08.14.10.10.49; Wed, 14 Aug 2019 10:11:05 -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=jzipTGXv; 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 S1730423AbfHNRKB (ORCPT + 99 others); Wed, 14 Aug 2019 13:10:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:60616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730412AbfHNRJ6 (ORCPT ); Wed, 14 Aug 2019 13:09:58 -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 79E5B2084D; Wed, 14 Aug 2019 17:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802598; bh=HbEKa7Zri52UCkOvnsCGr3IcPyOq0d/HtyKJPhXp/Z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jzipTGXvRM4r/RfLmxC19cbwnv10bWJzb/4TiD/wWnkP0rDAB8eSA/KsmAMGP7iMY Yy7Hut40Atsff8+0QxrAfELU3v417EVVb21dAshEHKQCha4xe+JIsuR+Dw0mtJopm2 /ywBxg3CtoB3J0LucHI61AO0iJEMP6c08lqSGDeQ= 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 4.19 44/91] iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND Date: Wed, 14 Aug 2019 19:01:07 +0200 Message-Id: <20190814165751.476809309@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165748.991235624@linuxfoundation.org> References: <20190814165748.991235624@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 6e83880046d78..ed212c8b41083 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -198,7 +198,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 @@ -209,7 +209,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 c51462f5aa1e4..966aef334c420 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -93,6 +93,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