From patchwork Thu Jun 17 15:17:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sierra Guiza, Alejandro (Alex)" X-Patchwork-Id: 12328177 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 8716FC49361 for ; Thu, 17 Jun 2021 15:18:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 344EF613A9 for ; Thu, 17 Jun 2021 15:18:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 344EF613A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CA1E16B0075; Thu, 17 Jun 2021 11:18:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C786A6B0078; Thu, 17 Jun 2021 11:18:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA4046B007B; Thu, 17 Jun 2021 11:18:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id 7C2D46B0075 for ; Thu, 17 Jun 2021 11:18:18 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 181F118028E66 for ; Thu, 17 Jun 2021 15:18:18 +0000 (UTC) X-FDA: 78263571876.40.A1BDD72 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2067.outbound.protection.outlook.com [40.107.220.67]) by imf07.hostedemail.com (Postfix) with ESMTP id 0C7DDA00026B for ; Thu, 17 Jun 2021 15:18:05 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iyA2+3Gd0I6nT/0RLGx+6EJTmE10p+79A3gCCvYv15H2rz8ilXT5n8o/KFw+CSt4bjbl3N5XzWNbOI0zAJP8kwasEPaiVgCJ2HLvjvcUINsu2lS2kaypk2BkCxNyvGHTyGkreCmvMA0hU/hKfDNQfF+kxgU+Ac1fu2u6Zk5D/6Kx5NzRN+KHcqG1WRYkYudXrvhUwIW+o69rjSKX/9w7lmgbUn6jRWrcbH5lcPS0ZhJOWEb9QPKgFrhQ1wRP/rVoWT2IiJdlkq0FcklxyzBAqxXVHtKRvv7XRAcUuBUyzfO1qJUgv4dqv3rfCbrLO1maBPKBy3/Zoo2hNj3QtCxH5w== 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=kAyEHlM08oFq0MP6MAe6GPLU2sVEDRrXuDLmfsvY/H0=; b=d45rdXTpGpA0tTGo2Zh8AiC5s6Rvmz37X/yzhX6xvzl9jvKKAhCg3FesBlRtT2Xg0c/f2lKdW+84Qv6ItXCGymk7vwH4msFtL+tc8jpfL544WttrReUnF28v+5VfkMTdFITIxlasvefX8S4x8yFv7i8MbuqaPNQhOMCMCnZHzR5ff/7vgsF9j01XKZHsApPpKyzcMXkczGSwbO6COtN1hV01PECWkDa6MG/xMTDZ747QccHR7dtPdpgGFKykqcuET742Cp8e5/3pDfW3Ybp8jbQd2/BJFPubUmmaHbqac4XR0OnVleVuuyCQ6oqZJbrGLcP4H8/fRI2wih3p+CKyRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kAyEHlM08oFq0MP6MAe6GPLU2sVEDRrXuDLmfsvY/H0=; b=XhL5O2S7yQIGGkyIVIWiob50bNfe1Dnri4fw+k60S4Jm3kaP1xkcZ202NWaR1KpkmFa3da701660U0SD7DpvppJIm49GPp3UujX4OhJ5bn9vyPIgwqBIpptPS0lTFLBv4nxcdC24YkhZKkJLQVLcfjodFfpHY0N2pk5pIMH8kHQ= Received: from DM6PR12MB4419.namprd12.prod.outlook.com (2603:10b6:5:2aa::20) by DM6PR12MB2970.namprd12.prod.outlook.com (2603:10b6:5:3b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Thu, 17 Jun 2021 15:18:14 +0000 Received: from DM6PR12MB4419.namprd12.prod.outlook.com ([fe80::b972:f4d6:9db3:5761]) by DM6PR12MB4419.namprd12.prod.outlook.com ([fe80::b972:f4d6:9db3:5761%2]) with mapi id 15.20.4242.021; Thu, 17 Jun 2021 15:18:14 +0000 From: Alex Sierra To: akpm@linux-foundation.org, Felix.Kuehling@amd.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, hch@lst.de, jgg@nvidia.com, jglisse@redhat.com, Alex Sierra Subject: [PATCH v3 3/8] kernel: resource: lookup_resource as exported symbol Date: Thu, 17 Jun 2021 10:17:00 -0500 Message-Id: <20210617151705.15367-4-alex.sierra@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210617151705.15367-1-alex.sierra@amd.com> References: <20210617151705.15367-1-alex.sierra@amd.com> X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0501CA0088.namprd05.prod.outlook.com (2603:10b6:803:22::26) To DM6PR12MB4419.namprd12.prod.outlook.com (2603:10b6:5:2aa::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from alex-MS-7B09.amd.com (165.204.78.1) by SN4PR0501CA0088.namprd05.prod.outlook.com (2603:10b6:803:22::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.9 via Frontend Transport; Thu, 17 Jun 2021 15:18:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d163c79c-44f7-4f4a-a116-08d931a32028 X-MS-TrafficTypeDiagnostic: DM6PR12MB2970: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kx7bObyg6Zv7+O+CQOnpHh+Vo3IoQDPp0TiHFt4U6XXNxAn9iEoU7tPwcN+dM8Y14Dp1t8g/1lTCcQr94FDzFXroH46JfCHOniso9m/jXgYMsTd9ZxOi/xMVhr5Swz4F+zHsc0hpEpzBkWG9k9Te+JyElgfi7r1OKxeZgBv/igSAe2tN0GL8T0CzN8T3YH8ct+uq+RuHcrL1wVfFTn7eDKV8agT+K57Gj9vJFcx/wPymmW29leurYUa0zDLBWxRxfmSBcxlXHyc9qEZSq1mT1FQIFCcRv8C0wVgihjRxFY5VScoT4JQj6rPKSXipwrwCjDGutHyXj8EKZ6H3Xm3WLGnetCgUL+/guaB2bFqJxg6fTcjBJBr73WimGhER30mPBRX7/o9o5kBsO4htdhokjsq/JEegE+FUAcdgXI+MmDH4R65sEfbjB8OhMFEyqJsnMB7VA4CfQwaYeI4LQpvlz3DkKhxOBe++8LKikL9w0MVuVFRB4ct6MgDZIWug2zEJhdcbKUoSdfhVUlimIoOMp4u94L9Js/Abf+vqAYNI/PA8+63vjC7S8r6sSdaPDtCrTtA//N3wj4gw1nf/SfvVZIxArAdkNty5OSrPJmYmn1pV9K7US92KoqoA3tm0P2fhPBy182W9wro2KiMIQBKN/rz8GHom+svW2GX8VA487qo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB4419.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(396003)(39860400002)(346002)(366004)(376002)(83380400001)(8676002)(38100700002)(86362001)(4326008)(26005)(316002)(4744005)(2906002)(2616005)(1076003)(38350700002)(956004)(16526019)(66946007)(66556008)(44832011)(478600001)(36756003)(6666004)(8936002)(7416002)(52116002)(186003)(7696005)(5660300002)(66476007)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6la5hMQ6ghu8zAjX4Qe/5QOEU3yY60ECrfi5D7Vx2PzwGYrqja+0zrdA70DIbpj3AjTYT6vLloHPUrVgsV7FbU6dBmj5eGQp9Rjc7tePcvrGyPJkxLGOT26eE/2um+mRVnXVMtLY2vqdTeJ/OOUNKptXh5WfdnGRyHXtvJCyY2NwEjLnSnUtlIGw8n+VS9LRuG0L7JC5jBQ08raJeBahtyal0HTREhEwNzf7N5KH+c0rJkFOgEE7XyBwuQytIE/mi9iICpu0EW4tCTx/ubB9qDsuxDxgo8MywV0+OX4roEeIlvmEzX4FT4xUUdsSZLUf/JLiOm8Qa9xLHhIBPQOhfgTm102BwgCgsyGuAhfOgqvOLZa0HhF6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: DM6PR12MB4419.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 15:18:14.0959 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: H0KNQDuCw1IyqTnabmyEPSJf7cxuUWVat+EIW2Bb06yFCE35l864pOsnJBlBnPvlB+tOUP9uL62lsQpMFUPfeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2970 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=XhL5O2S7; spf=pass (imf07.hostedemail.com: domain of Alex.Sierra@amd.com designates 40.107.220.67 as permitted sender) smtp.mailfrom=Alex.Sierra@amd.com; dmarc=pass (policy=quarantine) header.from=amd.com X-Stat-Signature: ixty3exfymagi5aqbz6wkez4ijxjyrig X-Rspamd-Queue-Id: 0C7DDA00026B X-Rspamd-Server: rspam06 X-HE-Tag: 1623943085-630978 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The AMD architecture for the Frontier supercomputer will have device memory which can be coherently accessed by the CPU. The system BIOS advertises this memory as SPM (special purpose memory) in the UEFI system address map. The AMDGPU driver needs to be able to lookup this resource in order to claim it as MEMORY_DEVICE_GENERIC using devm_memremap_pages. Signed-off-by: Alex Sierra --- kernel/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/resource.c b/kernel/resource.c index 627e61b0c124..269489bb7097 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -783,7 +783,7 @@ struct resource *lookup_resource(struct resource *root, resource_size_t start) return res; } - +EXPORT_SYMBOL_GPL(lookup_resource); /* * Insert a resource into the resource tree. If successful, return NULL, * otherwise return the conflicting resource (compare to __request_resource())