From mboxrd@z Thu Jan 1 00:00:00 1970 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=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 D941CC433ED for ; Wed, 12 May 2021 18:19:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 0356F613BD for ; Wed, 12 May 2021 18:19:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0356F613BD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=t2czZsu2VQe2s7PljeLJ6MZn7m1mpM4iHX16YDGJQ3g=; b=KMxMu3q7j4aiCnAVxZl2rZ8qu Q/w7h7nTRe76a85z3EHnYAEnpJfZ300/jWaB4Unngfw5USwO6s9Zf3bkpCjYy83EOLu9X4ogOUK24 Vc4n6L/ZMX2OBDRBNdOgqcz4bW48llZFzIMMQMyWxroKmZQEAph3ZYMYluFg3chVllxDndNrI/9bz 0tR3cByxzry+ZQ/7MF8lQR2FOmYWQlSuUWcFOOkY/Yr87Ur5KBIJs9ag+Gel3aIBpcK1mPj52ujzN Ez8PPfvJBWjisQBSqmuCrxuLG2/KSGamxR1SaOsCLuXgQoJBtft/HC5qeoR1h+2USMzd0noRwgYrD SjF4NYwyQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgtPv-003aZ9-VV; Wed, 12 May 2021 18:17:08 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgtEA-003WnY-0W for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 18:04:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=8eoshd6w1OS1ctMUaOu+mgEBiy8qVd8il3K5zTdfYh0=; b=OgWYywk3B2HKujAK32siBr/MvZ fL6XwMLMuPideUtxzjayC+Csy56yoo6iR/cXIO1fg0rjA+S+DaPcHf4ZwufDAFukH0n4ZxDWEbEZQ nQSPS/RyjPVl3b+2uMGtHTHC5w1Co3YtdBSv1NHnbaN3lq6UcDAfmn4J/xp/ZUj5TuwzsEBiyyTgf syyyLxSbI6wy9yI0AUDW3nzJGddzw7JFz+mB81DNyD/YzdiEhX3q+42rNFtRQWYwAI1INiSOfxF32 qCtVJm0TAvBgbwCdbMw/yRVE9+qSvfCRP7RulfmAhu/IsGHRefqxNZ82CdGdXWKvIyPvecbfWAT8O eBM9GNyQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgtE7-00AgEZ-3s for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 18:04:56 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C1D261628; Wed, 12 May 2021 18:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620842694; bh=LBtwEOIaJ4nCZqsS9YG3HNUNAC92HZWxjQNO35KTYu0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VaUmO8+IRjd0e+Ja7er7XKjmZ/2dd2SmtH20MDW0oNgHZ+57Zt3YTiAj4IPuNiYmN uYV1FHGbDyGMYkkF4H0hCWzzqzQw4NYBb4TM7AzeW3O3b8dlrT+dM6Wx2Jt11GTm1e zKdkDX3uD01aHqoket6C1bKPkfDxyWVUoAGreyMI6uJZymsyoSR/OyThdXJTFchPn/ 08YXjkYgIbk55SrbDY9AQbq+xte4fOqoP8rcILY+ruI8crjQ95nzdrxrC6rx+ldsDd CGIZvi1M4qSScS/Cs1wmLN3qZF8KpfEmnkS0uOgEOAKoalYuDMxBI0l+VXouegBv+V J2az9se3wiLyw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Bjorn Helgaas , Kuppuswamy Sathyanarayanan , Robert Richter , Sasha Levin , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 02/18] PCI: thunder: Fix compile testing Date: Wed, 12 May 2021 14:04:33 -0400 Message-Id: <20210512180450.665586-2-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210512180450.665586-1-sashal@kernel.org> References: <20210512180450.665586-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_110455_252361_98E7DF94 X-CRM114-Status: GOOD ( 12.83 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann [ Upstream commit 16f7ae5906dfbeff54f74ec75d0563bb3a87ab0b ] Compile-testing these drivers is currently broken. Enabling it causes a couple of build failures though: drivers/pci/controller/pci-thunder-ecam.c:119:30: error: shift count >= width of type [-Werror,-Wshift-count-overflow] drivers/pci/controller/pci-thunder-pem.c:54:2: error: implicit declaration of function 'writeq' [-Werror,-Wimplicit-function-declaration] drivers/pci/controller/pci-thunder-pem.c:392:8: error: implicit declaration of function 'acpi_get_rc_resources' [-Werror,-Wimplicit-function-declaration] Fix them with the obvious one-line changes. Link: https://lore.kernel.org/r/20210308152501.2135937-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Robert Richter Signed-off-by: Sasha Levin --- drivers/pci/controller/pci-thunder-ecam.c | 2 +- drivers/pci/controller/pci-thunder-pem.c | 13 +++++++------ drivers/pci/pci.h | 6 ++++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/pci/controller/pci-thunder-ecam.c b/drivers/pci/controller/pci-thunder-ecam.c index 32d1d7b81ef4..18715d2ce022 100644 --- a/drivers/pci/controller/pci-thunder-ecam.c +++ b/drivers/pci/controller/pci-thunder-ecam.c @@ -116,7 +116,7 @@ static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, * the config space access window. Since we are working with * the high-order 32 bits, shift everything down by 32 bits. */ - node_bits = (cfg->res.start >> 32) & (1 << 12); + node_bits = upper_32_bits(cfg->res.start) & (1 << 12); v |= node_bits; set_val(v, where, size, val); diff --git a/drivers/pci/controller/pci-thunder-pem.c b/drivers/pci/controller/pci-thunder-pem.c index f127ce8bd4ef..1650ec2c35f9 100644 --- a/drivers/pci/controller/pci-thunder-pem.c +++ b/drivers/pci/controller/pci-thunder-pem.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "../pci.h" #if defined(CONFIG_PCI_HOST_THUNDER_PEM) || (defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS)) @@ -314,9 +315,9 @@ static int thunder_pem_init(struct device *dev, struct pci_config_window *cfg, * structure here for the BAR. */ bar4_start = res_pem->start + 0xf00000; - pem_pci->ea_entry[0] = (u32)bar4_start | 2; - pem_pci->ea_entry[1] = (u32)(res_pem->end - bar4_start) & ~3u; - pem_pci->ea_entry[2] = (u32)(bar4_start >> 32); + pem_pci->ea_entry[0] = lower_32_bits(bar4_start) | 2; + pem_pci->ea_entry[1] = lower_32_bits(res_pem->end - bar4_start) & ~3u; + pem_pci->ea_entry[2] = upper_32_bits(bar4_start); cfg->priv = pem_pci; return 0; @@ -324,9 +325,9 @@ static int thunder_pem_init(struct device *dev, struct pci_config_window *cfg, #if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS) -#define PEM_RES_BASE 0x87e0c0000000UL -#define PEM_NODE_MASK GENMASK(45, 44) -#define PEM_INDX_MASK GENMASK(26, 24) +#define PEM_RES_BASE 0x87e0c0000000ULL +#define PEM_NODE_MASK GENMASK_ULL(45, 44) +#define PEM_INDX_MASK GENMASK_ULL(26, 24) #define PEM_MIN_DOM_IN_NODE 4 #define PEM_MAX_DOM_IN_NODE 10 diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index e9ede82ee2c2..39725b71300f 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -473,6 +473,12 @@ static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe) #if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64) int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment, struct resource *res); +#else +static inline int acpi_get_rc_resources(struct device *dev, const char *hid, + u16 segment, struct resource *res) +{ + return -ENODEV; +} #endif u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar); -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel