From patchwork Wed Jun 9 01:55:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 12308693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43C60C4743D for ; Wed, 9 Jun 2021 02:11:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0575C61287 for ; Wed, 9 Jun 2021 02:11:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0575C61287 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=OkiEVQNy78PfpgHRj2p+TEhh4z8s2ESk8+6YGUm8JCQ=; b=4vaVvHGXE55oLP QVfEDy0tkaTd0Qt4a9U1ROcsQFVdnTmVE6eIbdPZM+3krqTz4xX9FA3N+ROiMtcFFqxMmHgrICEjX up9RqSghtVC6XjnFJaN/2T5ZRs9BQ2M6iDDNyDeQOuBmflF73KF/wsagdHyYaFB7ljl5ZnlYKGiKI UHa2Us/HOpbWT0FJqxWQ6djmOfeZjRkYyDYhlDx/M1YsEd9elnsuE2W47ggZ/mrIom84ojPKUgw5u wvNJxvwOzcQyL2tfPReUkHnZBJ6kKBp2g7+0EVSFZUfYrmQ1BT0OelKsLxRSdbePQy9tkJGZXcnwS GzOxqI04ap0bK9pqnyXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqneW-00BNKf-Nc; Wed, 09 Jun 2021 02:09:10 +0000 Received: from mail-pj1-f47.google.com ([209.85.216.47]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqnSC-00BIwd-Bw for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 01:56:25 +0000 Received: by mail-pj1-f47.google.com with SMTP id g6-20020a17090adac6b029015d1a9a6f1aso2749250pjx.1 for ; Tue, 08 Jun 2021 18:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=vwOvA6+PDk9AU25znRXVA4uXmSYy6Z0YktvmCGpU+2Y=; b=R2bQla0f763vMrUouW7BxZcowdR6Lew/tHQSOl/+94ISfZfZXa0HkDn5aYiNKOR8Hr 2XjpGRWQwc7uQiC01phHK/2LqeVpt+oZ2HOwjM4a6Y3cKx03qL2Py3zxGVYMPrHjpKxE voZU5nGs5JuGT/0xOJg/g0i7Dvo67f07Yhe9rCrDmyyAKEMwC0Beugeh2WAIB8N3WJts hxYniqMcmd9ni9giPJlk3yHNv8qsiQRihgB+rfND6Ae7jehjqiTBdW6QOulUe9BMKtcv G8Gi6WhhRvioO6g3nebbgcq6CcDPFSSDubONznYcOnBM5VnvaV7SIYuvXV2sVi0Tg9Sg uE8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vwOvA6+PDk9AU25znRXVA4uXmSYy6Z0YktvmCGpU+2Y=; b=ijFuClq0WfpjtBRCZ2WmMuBtaNtG2+nYyXb+vTE9VNIVc/knrPYE6Rpuvl8mp57rrL 1t6SKUB7lcLWSItkqymZJMp6RjCov6wEgFcxsdn1g099g47hEGbJPz3a3gVYutpzyhoz iQE1Sj6vzVIIaf0pAazv4g+6xGXCeu6lCBnVv5Mehdu9HIbVQ4hB36pxXnJqGWHJfuYI hhqUGyxQP5frh74OL9dbTt/yRSZ/DOklK/WcTgD6LCcTwWODK/qj+9fKpEj3nOp+J6LP eBjrrKfyLbQsxjsPdlSo5an7pVGoPN39jKEogzVu/LF2EZANEv2WfkoK4S0A6xQ9Kxf8 1nmg== X-Gm-Message-State: AOAM530w7R1Czk5nckXRBQCj0JbhLiFsbl547tHCClZhjilffdVc/4kA RtUaXVPtqnuLhajkMsOSZMfMpw== X-Google-Smtp-Source: ABdhPJz+Pz+qZ0pg7XZVrCDxfq58L9ZLUSK0eRhKOPMqRyjzs65fAJuiVWQ9exyNQwsnN05AV/w3FA== X-Received: by 2002:a17:902:8484:b029:101:7016:fb7b with SMTP id c4-20020a1709028484b02901017016fb7bmr2638654plo.23.1623203722295; Tue, 08 Jun 2021 18:55:22 -0700 (PDT) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id pi8sm11222043pjb.52.2021.06.08.18.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 18:55:21 -0700 (PDT) From: Shawn Guo To: Will Deacon Cc: Robin Murphy , Bjorn Andersson , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Shawn Guo Subject: [PATCH] iommu/arm-smmu-qcom: Protect acpi_match_platform_list() call with CONFIG_ACPI Date: Wed, 9 Jun 2021 09:55:11 +0800 Message-Id: <20210609015511.3955-1-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_185624_445431_C2D048CE X-CRM114-Status: GOOD ( 12.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The struct acpi_platform_list and function acpi_match_platform_list() defined in include/linux/acpi.h are available only when CONFIG_ACPI is enabled. Add protection to fix the build issues with !CONFIG_ACPI. Reported-by: kernel test robot Signed-off-by: Shawn Guo --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index f7e187f3fa66..a437753d84df 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -340,21 +340,25 @@ static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = { { } }; +#ifdef CONFIG_ACPI static struct acpi_platform_list qcom_acpi_platlist[] = { { "LENOVO", "CB-01 ", 0x8180, ACPI_SIG_IORT, equal, "QCOM SMMU" }, { "QCOM ", "QCOMEDK2", 0x8180, ACPI_SIG_IORT, equal, "QCOM SMMU" }, { } }; +#endif struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu) { const struct device_node *np = smmu->dev->of_node; +#ifdef CONFIG_ACPI if (np == NULL) { /* Match platform for ACPI boot */ if (acpi_match_platform_list(qcom_acpi_platlist) >= 0) return qcom_smmu_create(smmu, &qcom_smmu_impl); } +#endif if (of_match_node(qcom_smmu_impl_of_match, np)) return qcom_smmu_create(smmu, &qcom_smmu_impl);