Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3716057pxt; Tue, 10 Aug 2021 09:40:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+0S9oII6A9xjxIHcoBXRWvLeWwmvGKYZsscBloiiZnyRLAMdp1hsCLyWh0xquTbX4ewpS X-Received: by 2002:a17:907:20b6:: with SMTP id pw22mr6174979ejb.512.1628613656978; Tue, 10 Aug 2021 09:40:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1628613656; cv=pass; d=google.com; s=arc-20160816; b=LF6UVR/g61IAoD25TJIh1jyu5l3+1TdmNwj+8wBbbSRMw4+bSLLpgFmxZ4vUKAi3ad z3a+LkfaiMaITKqQ6jJ6fUjSco2JVBeBw2Ph7oaEVVGpv2GVZHHnXQSTzNvGE26wu+7R iFAZ4wOUO95Bqggn7NIg/wuCSRfmdMWpg9JAqgK5jikyoczo+MqBrUcO+989ipDef3Z9 KvUF4vdwThwpWx2RxxUeBuEL8uvJfLre8lq/XL9ifArVhoV9u7lWvBA0AEtG8YjmGhvi xy/F5jJPdKDrpsMTcck12cv255hrLHkfKR4Sa9IKq69Lvs30NF9YJi9JgIi0jcC7pHuA tCEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=FFRVIGtqy6Pp+PwfBFzooKPpfsRFQsBOVOAH8BPYosw=; b=SMmr1otiTJV4bALqTRwe/O0HuiKgWCrb6SAmSdSuofsysYnBDOUIzxFG1/6dYknjiI PDjAHCkmsDtlDXx2r/Lj0aSJdEiyxuDiakrW+fzh75byjUrs0w0Dn9kS3HrTEKXXabEo mKuB91k9DJvbv+OwajH5Ew3rZuhKnZafO4NMUsZ/cSR63yC5+4JYdQOgmJvIh7PU1W26 Xby6L3yDGcCygd6fUvUid7gRGEARQ7bqZC98Nh+dhJUa571A+m8FcW4KeD60HH6YNHuT oMJdcyyvsQeCZFwK4TZSCAVy1j2Jg13ScqNgJiCp8yc5/5sO0cMBY23PmVh1yq1fUiUL jHWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="bt+B5+/r"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp5si23494140ejc.473.2021.08.10.09.40.31; Tue, 10 Aug 2021 09:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@Nvidia.com header.s=selector2 header.b="bt+B5+/r"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239460AbhHJOb6 (ORCPT + 99 others); Tue, 10 Aug 2021 10:31:58 -0400 Received: from mail-mw2nam12on2063.outbound.protection.outlook.com ([40.107.244.63]:38517 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229663AbhHJOb5 (ORCPT ); Tue, 10 Aug 2021 10:31:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OYQGOlL9qVsJRbige2Ys3MHJGy7RaOdhmOvyRk/UnRTs0QjAcrZuID1sbmtpSMPP6tuThkhFql2SvFllBownSWl7kE9Cx6VwFdZYgR0jUpVYG1COOVu4e6LnM1qjJNJr+von6Hy5Qtusysu///xLHC0uWIy+aLlbCMDxztbBOzWwJq2Zk4MBMkMSELI9b9+aAn5EJDMjOKoJBMyex3DofxJSge2ryZfz8h2QARhrm6IPWtsxKWG3bfQIY17fxYUvAy+MpB9BrZkC2Npz1ylWxj5sNg+DjaMIRI5Xp+SsLcW7Undt0WlWebsEZtseqZCOnFNCjq+oChUVknny4LRVzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FFRVIGtqy6Pp+PwfBFzooKPpfsRFQsBOVOAH8BPYosw=; b=flwcGvjycuEFwKDOADB9difFjOYgUt3HYcqWma+pjP4kP8y2S8hYOd0M7P7YrILdlHxSHwnWRH/ZyYSab8yuFfDzWIb2djGust6z7lIPKII17WdKr0KcSxyOuFkHMPDucSyGqGJw9am4y7mIkOkbFXMnrjdgVtZh7SkgBabUjfU/Lp0+XuW3Bn9sUzJ0tgYHde0j8aqulLa9JUGTKo/bJWd0LctbGIR1TAJVU8rEC9Tx2m/br+aRu/gXYeRpHl3d2QrZXOzvQ61Fti7j6odfu80w9yKLzKyvYlWNGNt1i0w229uzyDoM3BRVuqA3AuYtvUdjp1vAVKwWua6mZBK6uQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FFRVIGtqy6Pp+PwfBFzooKPpfsRFQsBOVOAH8BPYosw=; b=bt+B5+/roKCjFCMB99KgesZFtJqpBz1y4IR4iynVvype4/ZSNRMcxrYZ9FjbT9yyihlQtISqZDFpQrxcxuvq57X5HvMDA2KlIvWizLZcexaMn4s91kBx6y1nfR8F0hUmlgl00UGoofHGfvrEdcqconKgF3fqgUgpnjSfk/UQu6fB/6uK/jhTw0RVW1SQx5G9Vq0zfRyIUdIRQwUHsC7q8Q29k5Dc7naprJQweYe4wzx5YItHEs4xwUvuT88FikjGrc+Rm9eX74EchW6oAjytjgRYEQRZL/yP3WJKu3SA9OnOhuF3nyU2uXoH5OxzZl9fRWNomJpPGHiEfQHCkIBd2A== Received: from BN9PR03CA0026.namprd03.prod.outlook.com (2603:10b6:408:fa::31) by SN1PR12MB2366.namprd12.prod.outlook.com (2603:10b6:802:25::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.21; Tue, 10 Aug 2021 14:31:34 +0000 Received: from BN8NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fa:cafe::1d) by BN9PR03CA0026.outlook.office365.com (2603:10b6:408:fa::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.13 via Frontend Transport; Tue, 10 Aug 2021 14:31:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT042.mail.protection.outlook.com (10.13.177.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4394.16 via Frontend Transport; Tue, 10 Aug 2021 14:31:33 +0000 Received: from [10.20.114.145] (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 10 Aug 2021 14:31:32 +0000 Subject: Re: [PATCH 3/3] PCI/ACPI: Add new quirk detection, enable bcm2711 To: Jeremy Linton , CC: , , , , , , , , , , , , References: <20210805211200.491275-1-jeremy.linton@arm.com> <20210805211200.491275-4-jeremy.linton@arm.com> From: Shanker R Donthineni Message-ID: Date: Tue, 10 Aug 2021 09:31:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210805211200.491275-4-jeremy.linton@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ce751c86-85d3-4899-c716-08d95c0b8daf X-MS-TrafficTypeDiagnostic: SN1PR12MB2366: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UUHTvJ0sklA4r/brSG9ywNGf9rDfY5D3XMCwjiAFEz572P05XD24mgRui9vXcnUppGwrBD0WXcZbh0faUdT8rospzFy0GxgDC+F8qD34bmyvR/NXtDJrvayPSELg5TB1/EWa7QAJoyetM/cuebTr6IySBdlJTjPm4F0JGm4EcDKKRK1bdiktpZ02Rkj0caEWfSnq+LBbJNTudXTjpKsK4dOMpi5Ps34WVWQRBpSJd9ab524wa+DCgmlyPp8YXKxVVQDeCGOu5bvMi+8B4qldCcsUq5qjgSzGdGUHUlnABVpz9YluOxEvwZX73feaHqBJSIjg1DOuY4F2sh42jrA+KkRjKI7yM7ZEU0GjBwsuDvgy1z2sPjDEA9swryXVpwxeBtzGaUbIcjykGas8/qRsOtap32uGbcue1rV/fYCt8dN6fHYpnQAeeYVw6ZNDGa2jEUAtWF/GKYsrylfjAt/Y8FAEZsP9O2qhFkI4Z60H3lBheSEz1j6JOvK6L4q77OqepOLxAbh0XZnRAfbNQC5YGTZXTFBW7myzXv894RHeRe/UR0NbtcwHZ7qB1VVSkjKFqFhsNDtvT9TuFYaqGxIeV6MDA2r8YsC1twIOvoiXa04lvRIA6Flw8YBZJzJ7OKEqKH646NsRXKEJ7aDDYt89K32jWsR3AzshswrHdpU7WpCyA/3Zd5L0gkdCNkWXyIKQB7d59Q7PBbJyxJOPQ3xIozSS3y/Q/cMqDOoIjF96ENQ= X-Forefront-Antispam-Report: CIP:216.228.112.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(356005)(8676002)(70586007)(186003)(31696002)(36860700001)(70206006)(4326008)(2906002)(2616005)(31686004)(7636003)(47076005)(336012)(426003)(16526019)(8936002)(508600001)(83380400001)(110136005)(36756003)(16576012)(86362001)(54906003)(53546011)(26005)(5660300002)(36906005)(316002)(82310400003)(7416002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2021 14:31:33.9479 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce751c86-85d3-4899-c716-08d95c0b8daf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.34];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2366 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jeremy, On 8/5/21 4:12 PM, Jeremy Linton wrote: > Now that we have a bcm2711 quirk, we need to be able to > detect it when the MCFG is missing. Use a namespace > property as an alternative to the MCFG OEM. > > Signed-off-by: Jeremy Linton > --- > drivers/acpi/pci_mcfg.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c > index 53cab975f612..7d77fc72c2a4 100644 > --- a/drivers/acpi/pci_mcfg.c > +++ b/drivers/acpi/pci_mcfg.c > @@ -169,6 +169,9 @@ static struct mcfg_fixup mcfg_quirks[] = { > ALTRA_ECAM_QUIRK(1, 13), > ALTRA_ECAM_QUIRK(1, 14), > ALTRA_ECAM_QUIRK(1, 15), > + > + { "bcm2711", "", 0, 0, MCFG_BUS_ANY, &bcm2711_pcie_ops, > + DEFINE_RES_MEM(0xFD500000, 0xA000) }, > }; > > static char mcfg_oem_id[ACPI_OEM_ID_SIZE]; > @@ -198,8 +201,19 @@ static void pci_mcfg_apply_quirks(struct acpi_pci_root *root, > u16 segment = root->segment; > struct resource *bus_range = &root->secondary; > struct mcfg_fixup *f; > + const char *soc; > int i; > > + /* > + * This could be a machine with a PCI/SMC conduit, > + * which means it doens't have MCFG. Get the machineid from > + * the namespace definition instead. > + */ > + if (!fwnode_property_read_string(acpi_fwnode_handle(root->device), > + "linux,pcie-quirk", &soc)) { > + memcpy(mcfg_oem_id, soc, ACPI_OEM_ID_SIZE); > + } > + Is there any specific reason for not using the firmware agnostic API to get properties?   if (!device_property_read_string(root->device, "linux,pcie-quirk", &soc)) { memcpy(mcfg_oem_id, soc, ACPI_OEM_ID_SIZE); }