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: 456791 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp4515205jae; Tue, 8 Jun 2021 18:56:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlTIYKVp7DoVZqKFoGlE2Flws8oiPIHGwGHBMniio1ycb8ldqcVXWYEsyIuTbHd0tS6ZjD X-Received: by 2002:a05:6402:1705:: with SMTP id y5mr28188176edu.232.1623203799877; Tue, 08 Jun 2021 18:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623203799; cv=none; d=google.com; s=arc-20160816; b=LT5+czR+Y96JGFH00Am793RMncDveRcImOv73Vj/XLZL471bbtZYLdbia8KuCwa8qC Q6LH1CG3jdIevP2Oyg0fbukWCWPnwztzJv+uA1l1lKgg0iodfi5S34rB+gD5bPb2cY4Y kkLWY52aR1WXi/qu4IqKQWglME9xVbUjurz77av0ukVXXAfd4zpfCOC7riSSKS068OsB Fg8vJnQdQ9UTho8aq3aiEmznY7Ae+/wNOhLhU/OqX6u+0Iz6xSRULC60hYwhVB3LNOFB 3WoPGVrm4rJko3DNWNRRHaBbR6dUGSgW0vrbBQfiIUWP5Rlh/jKAdiCfYOQ+fP7ofPVe KoFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=vwOvA6+PDk9AU25znRXVA4uXmSYy6Z0YktvmCGpU+2Y=; b=Sl4VcjLAl+TR6MfSjB0+EFeuPOGy/HZUS6J8MacvHQSvrwqxPIdeiwNcyXrZVLedWZ wtxthaaZyvbDXqUkMRod+mXLUR2ahPzUb1X3uXErSkW5p1HvvEFM+IbFb4xUwvN4prHf R/YE6u1eH8RZsowQUV0xMNIdOSiudXRbcIzJyV9AHiQsBzFQJjYRw055JTC0hYDhgXtT zLwfcm+2GY57OwRETB+4MMA6+GbXIuA/1xqR9ZOab+XK1c+2zZb5RwzrG3gW67k0sff1 q6vYDctZeoZC69rLknsSWh8cK8IBnZO5YSfFvWeBnu6WafNvY4JXEPleXc2ZABZdI0XL otcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R2bQla0f; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si1259922ejd.255.2021.06.08.18.56.39; Tue, 08 Jun 2021 18:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R2bQla0f; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229753AbhFIB6c (ORCPT + 17 others); Tue, 8 Jun 2021 21:58:32 -0400 Received: from mail-pj1-f50.google.com ([209.85.216.50]:50797 "EHLO mail-pj1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbhFIB6c (ORCPT ); Tue, 8 Jun 2021 21:58:32 -0400 Received: by mail-pj1-f50.google.com with SMTP id g4so460203pjk.0 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=LiHoBvaZnxz+4v5i4FuY2qIFGZrZf996AyKp/fGhSdPYO87atl46+MndAGr2P3NTzL UZgYby5j7KIA2dKwaM4/NtV2KtyLYUF+UCJXsRnHOzWEVNX06MBmSGRUFUPRyXYxbpUh PRVUwU+5oz7ZAZZz0FoNCZubjse7bqHpAIJicJ4NTQCfUdvd88vrpbJ+PuwWr9B3HLun 4IBev1rYIEVS5dlxmxcBEM9O8u3NPvfFTu4H/4PphFl8KvBdjTSbpV5WKq/fUaqo2HLf 23yeRrVsZ/Pj7njbcZHgUwpEOtNKWvcvx8OoYgyP1BzqgnKIIMLFNsmneQE2Z4hwuNj1 bJRw== X-Gm-Message-State: AOAM532DCmVCm9KcTccv2g+P+HK7a7YzYuP0BW1zVABxFIS7hPJgHsKv casrBf8tghxoEqGnlRiF+48urg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.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(+) -- 2.17.1 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);