From patchwork Thu Jan 16 17:42:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Fontenot X-Patchwork-Id: 13942079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF432C02183 for ; Thu, 16 Jan 2025 17:43:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F2DA6B008C; Thu, 16 Jan 2025 12:43:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A32C6B0092; Thu, 16 Jan 2025 12:43:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41D146B0093; Thu, 16 Jan 2025 12:43:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 231986B008C for ; Thu, 16 Jan 2025 12:43:25 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 95BD6AEE29 for ; Thu, 16 Jan 2025 17:43:24 +0000 (UTC) X-FDA: 83014036728.21.2721CC5 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2075.outbound.protection.outlook.com [40.107.93.75]) by imf03.hostedemail.com (Postfix) with ESMTP id A760B2000B for ; Thu, 16 Jan 2025 17:43:21 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=bi4Ji7v1; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf03.hostedemail.com: domain of Nathan.Fontenot@amd.com designates 40.107.93.75 as permitted sender) smtp.mailfrom=Nathan.Fontenot@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1737049401; a=rsa-sha256; cv=pass; b=sBWJBVaEoOXbQ/c6yPi8Whd/7Ugk3XLLCcxcdvwFXZDKE4Nn73zwYTyGQOgkF+udTknmag +vGyDTLiAU1eI29Urfhh5xux5kJ9+DyTgVdb8MBVhF0N2Jiasgfbhe755nCW6PgFwCDaMZ 25ijT5Wh+ORtjnKm7BNCFEg7APLiZk4= ARC-Authentication-Results: i=2; imf03.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=bi4Ji7v1; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf03.hostedemail.com: domain of Nathan.Fontenot@amd.com designates 40.107.93.75 as permitted sender) smtp.mailfrom=Nathan.Fontenot@amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737049401; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=j6wi+AkmrdVXhwbF9U8L/CrH+T4javGvPOhk9ojLIQ0=; b=VfSNYbaAb3sA6Y7HIWUwSC8c1KL+e0yNkTlPeMMqMxSxncaNxlJXB+7V01nqXwEBYQtFKk WarlOKjtkW2/n6Q8IZ4dbTkDkepwO5vEiZfGznbQ9Sk8HLElGkak0Hn8PcwJxh7OrqPVq/ oxVSHuQmkH3WtFIhYksQyEcEctSlmnU= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p4CCnWCQiSqL5uec+63QhPpKzh6tlMJID5bPVnuwW1V9JasOMeEhpuKSrm/RGEs19lM6NyjJu84FqJGWuvGAS4ytCVGW7p7AmihjImHV9Q8I2Rwy6qrXGMBC/HZXjDY7VpPyLnVpM3b8fHQVrnLSrJ/Q/mpNgcHlq9GSSDYVgJeabHdCq8TAPNdDSrtP4NtISQ9jNiQycHRDyzVieD8qioW/bdI5ZXEbTumCIU8A6VU3SXFNmpC2y6KxgfTUldXSN5iPld6fn1Fse5ANfNfu6V0gG2dUp691qhvVi8NWdiUCVw9Kq72lWMCstQmtLj9L2g716t56XEsxHQ1/eHQFQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=j6wi+AkmrdVXhwbF9U8L/CrH+T4javGvPOhk9ojLIQ0=; b=CWd0Ox7hlSHys1zyoovjO5KOLxQoPZhSAChIia/b0lIn7W6twshDhCrxeRQ8ygk2xpdwJVS2jUc6W/wQKkATr+obMGvb4qe7oPcZmmiCuJ1gzud2ICBvLmUSfHcc673luczONIx4ntc+ikwsdYaIw88eMmh4Emrdp8BU8dU6vLK0kH5kM6LIe3BOSg6mKy9TJYSVrXmxEvFJLZ1nrHyG6Q5dHM/jEyOWkVW8+wcWWbIdla3fPaOn5EvJaYMy6b2pPv3wvIebN+1QcJMzOJxwDV1a+v+VDdXoX8ZDaEoNM2sNFsZ0NXB3sVIiggygUbAPu/FIsJnJfjPRDS9l7S6GzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=j6wi+AkmrdVXhwbF9U8L/CrH+T4javGvPOhk9ojLIQ0=; b=bi4Ji7v192stp9plebhMoGQkgLzzGe8V+Rrzw4Xjvcl0TI53dycJG+Il8of2iORhGNtP9M5/H3aUDgrq5zKN99fija2Xf+Ae5YVvU/DP6AUdfSVRZI5pY+YKJpK3F22xIX2ufYcYXuxUEdtXYOcc2kGC3H7VP76CS88vtahC9l0= Received: from BL0PR02CA0130.namprd02.prod.outlook.com (2603:10b6:208:35::35) by MW4PR12MB7285.namprd12.prod.outlook.com (2603:10b6:303:22e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.12; Thu, 16 Jan 2025 17:43:16 +0000 Received: from BL6PEPF0001AB73.namprd02.prod.outlook.com (2603:10b6:208:35:cafe::68) by BL0PR02CA0130.outlook.office365.com (2603:10b6:208:35::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.13 via Frontend Transport; Thu, 16 Jan 2025 17:43:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF0001AB73.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8356.11 via Frontend Transport; Thu, 16 Jan 2025 17:43:15 +0000 Received: from AUSNAFONTEN1.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 16 Jan 2025 11:43:13 -0600 From: Nathan Fontenot To: CC: , , , Subject: [PATCH v2 3/4] dax: Update hmem resource/device registration Date: Thu, 16 Jan 2025 11:42:07 -0600 Message-ID: <9a41f91ed487ea64e187d84fab3bd69a4a5862f9.1737046620.git.nathan.fontenot@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB73:EE_|MW4PR12MB7285:EE_ X-MS-Office365-Filtering-Correlation-Id: 890cf9a1-f885-41e3-11d3-08dd36554172 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: uwZUr1ajQAxfKgZEAfD2dE9/ZN08IuZyghe7qEBv8XVZrjUVoDQOY6SjDM3jnGQuqoQHukJCaKRJA5g63RwoIS8ZUP/W8by09/5Vdhq+Cf8SmuYfmjOuEWcgtEgBkAT3lfHZlX1gWd5zvUZ14Mz3B+DhdLL8qqmix4L++FJOONklSXTCAlC3ZKUOvJnwZO5fk3FRPdy5J36JjXo7Acrzbs6mPw3CK69GTl7ydHP/O50R72RU+8vOqysW/5HBu5VlRAUx187zhg5PLZAAle9U3mxp+f2KX9iYc30dq5vqpXO21vUmjc9vwdgR51ZoZpJ+JYe8OgeX0pQ35ul1iRspNsLQHDgXJ6naSawhVjEOezCPtud49KQbn+lt3A0uZy3huOMd1K9h1k+STlJmToPECkAbcEn6QmcfkJOBoM9D8gcnOOrds3vqDVTYZpuVUcDUDSTnvyB8MDTWwXBbO/TCpV6v6g2YvSseyExGhk4ZpiGajoT+XBgkWquRUiXqGH+Ts0sW9ahVm3a7a1UhfJLhDDJQt9e2EOZwVnyYPqELV/zdEQ4k1WM3G2G0pvt/l0eaYqhOOW5Flg/9mofrrj98mUs9VYOljSDYII/xg0nHUBc6A09/gQWCFhDqRCdnszIeIIocam4TJloTpPlju+LksZRps7tAk/GFARERAwVoFem1X+h4wG+6fJgw6y1kTdRGVyFK36ruqXPtjuKF8LwKdOwxE1d5Qgtvpw1oMt5b1INtRWfuy66oS5JYzXWScjiqFUNt4vvGKQnP+An6OOCDmSaIpZ4Bf2Ru/6QpVwltipOwhRu79jMuZV8//mkGffA5ml0eYmEKyJou6uboP2skii12cU2HcEUCSgxg9MFbz9T4UKLrXP+JBJDZ5dH0Ye55vMeK7c2J2zkdHiV3E/sOeS9AD9G6biA/Okme3hhJ057dvwSnBpPRkku3sPnFfNNcqCJ9kPhgt8KNeplVrvlQ7tPVA3zrDq65ThnKy1vb41aOSS2LfO2fBIf0qu8ZJs6jaOVPRxeITbNAY7cKSbmjqzpMokxtEA5EdUxgA6pG0dBBEZnEOEstZqkQGIrDp9Mnqnrxbsb8oo7Fdn9s+SMU3ixHMF8eJLIgBbD+eoP/+znuBCU9F6iYkwal/AXzNbO6V/iHZzQKX7lpL9dVkeTGpyYI+SLvmFxeVgAkuuKFTTiw3IYil8z8Fenx8GKi5ZpDiqIxWvV5kwMpgzserjRqBzltjlDOmKkHcwdpQTwShWrQGclVQVBk7FdY8rnrvJOYe9sHWbWjaNzSy2f23O52OJevd5esOf/cc6S25Ea5BwUyMULBsRTthy4Ni0vtnlv5GwDnkx5/wVeXRJKaV0dBL3FnWOLk4DXrZxQg7tDikHL9KDKuUs5TerMypxij4GKGQF6FkxpaFiF8vIDAVMsgMDDV6fsoQ8RJggzN52KlvBJeqdlEVrkw5Bn56HWipCZJj8qJjzA11sk3inj9vqx6ADAycabV4b6Le2OmBMFhMNY= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2025 17:43:15.3811 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 890cf9a1-f885-41e3-11d3-08dd36554172 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB73.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7285 X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A760B2000B X-Stat-Signature: uza86f4stjq7ry7ci6snoduqqpqy315t X-HE-Tag: 1737049401-900505 X-HE-Meta: U2FsdGVkX1+Bfbrer6MWzFBjMnyyJdhkSpYWIpHDwULxMf8cgDbHHT9qfK4CAquennKiR/QmPZLv+ehhhVrtfLtVTZ+YuMLqRrzw5TWM/F9xIxiLHnDVNux47/Q6LWn1Okxv74m5yBlJRgObC76N1HWO9ZbYhzACWe2Hf9riAlb8lPd/fDaMLpFliqr82UzcAJsu5lHy9Xh9JldFStEC5PodG0eV9e/ivqB99qpafoTteyI/jeeGOO/8i/o94cI1hglj3l8rcJtyBfjwlCsFS6N0TWyoCfwfC39dyCCd4QhdEjE/f0+ShIMp0ZvtVlhW9UAaNf4OJVTOLsY+Yp172u52hoVXP8wEx9D9BV2ACKo56nJpA8zzRr+p2yh4At0qxB0tO4y0w72+Byk/RFEdFG18vnoGs9te2nFmrhfQDSYJP0rc2F9daMfB6fM4jGDKez+3ZpC0wdfznXNNBTzJAnBBUMYNlJyVQ7zI/l7YihQ21fFxECfyA1XMg+L1YfrbjieRdmaWLDDj38qENoIqkrn5XjtqADcrD092+HXwLfyRdztOVnDAS9s5WoH0QYtn+gBa/zMKtIDyQeAmpX04u36IbIIyCc51DWQj4W19REzALmWRPZu5H3m4ZrERH212ONvUegf5Shp1C3MxEM+mLm1HokKUSOwhB9T2NcQZJyZGQAUM+B4PBrEU0cSZAYgyShiGeF4ZY5YYC/WymOdYnKMxJZocUk54QDdwLb9htJn4knqRmQzx7xRe/GBBwWRqP6+jxxA84Cz2CH7RN0C9OoJFXtQEh2FnQyUgwyLaSztdymQLFHEghdKUzeLYYhegmzcjv3YL2zeh1gIFZlZQSizYVEv4W4JK+fFTpgQ6Rmzw9RxYtdszr+NNKpz0CmLmRYvluiSr+U0QWJfrJ+eTnn4VfAcW57uGQzS428bqdxeCOnEX8Gxu71tKQqXBekLY9LiDvn0Xu634JrVTFZr NUziOBJ6 bJzlm7oCzGbA1k4wwV7qFZ4mOeG0j59Kl49oV0SALz3FLo2K7BM4fgAexDB3NUuE8fLOrw27P18cfYGmNBKfEu9atYkgm7UxOHOlf1KxvdCewQbMJYvn/AKAweyEKqbuSTbllispQOd6g5Sk8lSnzBuCUArrJMzw23kAhJ1sy82aW2XHpnEVS33mVu21WyfaCOvT1FdnRxS0ALNJXXIC8qNLAWKHIXdiX8++lWbpuOK0DXqZtyotEMt0EQvMvhurMyHr0cLjE2WhYfA1SeWJM2Y/TmXqOMTye1HQvw7MvuDO6+7eQrh1nOelTFMVMldItF3tRYojQVNkHMk0Kvwj7qEqFUBGU1frPgvhdk5z2D9tlPRANLTf9ww17zz3V7mpvn2MiS+JxXqyR4o+7ggdeqkDH2GTVF3S7m0dnxuTlxiqSkgi9BvyLoVKZUo8V8Nz2T3teNXmn+r44tuQ= 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: List-Subscribe: List-Unsubscribe: In order to handle registering hmem devices for SOFT RESERVE reources that are added late in boot update the hmem_register_resource(), hmem_register_device(), and walk_hmem_resources() interfaces. Remove the target_nid arg to hmem_register_resource(). The target nid value is calculated from the resource start address and not used until registering a device for the resource. Move the target nid calculation to hmem_register_device(). To allow for registering hmem devices outside of the hmem dax driver probe routine save the dax hmem platform driver during probe. The hmem_register_device() interface can then drop the host and target nid parameters. There should be no functional changes. Signed-off-by: Nathan Fontenot --- drivers/acpi/numa/hmat.c | 7 ++----- drivers/dax/hmem/device.c | 14 ++++++-------- drivers/dax/hmem/hmem.c | 12 ++++++++---- include/linux/dax.h | 9 ++++----- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 1a902a02390f..23d4b3ad6d88 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -857,11 +857,8 @@ static void hmat_register_target_devices(struct memory_target *target) if (!IS_ENABLED(CONFIG_DEV_DAX_HMEM)) return; - for (res = target->memregions.child; res; res = res->sibling) { - int target_nid = pxm_to_node(target->memory_pxm); - - hmem_register_resource(target_nid, res); - } + for (res = target->memregions.child; res; res = res->sibling) + hmem_register_resource(res); } static void hmat_register_target(struct memory_target *target) diff --git a/drivers/dax/hmem/device.c b/drivers/dax/hmem/device.c index f9e1a76a04a9..ae25e08a636f 100644 --- a/drivers/dax/hmem/device.c +++ b/drivers/dax/hmem/device.c @@ -17,14 +17,14 @@ static struct resource hmem_active = { .flags = IORESOURCE_MEM, }; -int walk_hmem_resources(struct device *host, walk_hmem_fn fn) +int walk_hmem_resources(walk_hmem_fn fn) { struct resource *res; int rc = 0; mutex_lock(&hmem_resource_lock); for (res = hmem_active.child; res; res = res->sibling) { - rc = fn(host, (int) res->desc, res); + rc = fn(res); if (rc) break; } @@ -33,7 +33,7 @@ int walk_hmem_resources(struct device *host, walk_hmem_fn fn) } EXPORT_SYMBOL_GPL(walk_hmem_resources); -static void __hmem_register_resource(int target_nid, struct resource *res) +static void __hmem_register_resource(struct resource *res) { struct platform_device *pdev; struct resource *new; @@ -46,8 +46,6 @@ static void __hmem_register_resource(int target_nid, struct resource *res) return; } - new->desc = target_nid; - if (platform_initialized) return; @@ -64,19 +62,19 @@ static void __hmem_register_resource(int target_nid, struct resource *res) platform_initialized = true; } -void hmem_register_resource(int target_nid, struct resource *res) +void hmem_register_resource(struct resource *res) { if (nohmem) return; mutex_lock(&hmem_resource_lock); - __hmem_register_resource(target_nid, res); + __hmem_register_resource(res); mutex_unlock(&hmem_resource_lock); } static __init int hmem_register_one(struct resource *res, void *data) { - hmem_register_resource(phys_to_target_node(res->start), res); + hmem_register_resource(res); return 0; } diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c index 5e7c53f18491..088f4060d4d5 100644 --- a/drivers/dax/hmem/hmem.c +++ b/drivers/dax/hmem/hmem.c @@ -9,6 +9,8 @@ static bool region_idle; module_param_named(region_idle, region_idle, bool, 0644); +static struct platform_device *dax_hmem_pdev; + static int dax_hmem_probe(struct platform_device *pdev) { unsigned long flags = IORESOURCE_DAX_KMEM; @@ -59,13 +61,13 @@ static void release_hmem(void *pdev) platform_device_unregister(pdev); } -static int hmem_register_device(struct device *host, int target_nid, - const struct resource *res) +static int hmem_register_device(const struct resource *res) { + struct device *host = &dax_hmem_pdev->dev; struct platform_device *pdev; struct memregion_info info; + int target_nid, rc; long id; - int rc; if (IS_ENABLED(CONFIG_CXL_REGION) && region_intersects(res->start, resource_size(res), IORESOURCE_MEM, @@ -94,6 +96,7 @@ static int hmem_register_device(struct device *host, int target_nid, return -ENOMEM; } + target_nid = phys_to_target_node(res->start); pdev->dev.numa_node = numa_map_to_online_node(target_nid); info = (struct memregion_info) { .target_node = target_nid, @@ -125,7 +128,8 @@ static int hmem_register_device(struct device *host, int target_nid, static int dax_hmem_platform_probe(struct platform_device *pdev) { - return walk_hmem_resources(&pdev->dev, hmem_register_device); + dax_hmem_pdev = pdev; + return walk_hmem_resources(hmem_register_device); } static struct platform_driver dax_hmem_platform_driver = { diff --git a/include/linux/dax.h b/include/linux/dax.h index 9d3e3327af4c..beaa4bcb515c 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -276,14 +276,13 @@ static inline int dax_mem2blk_err(int err) } #ifdef CONFIG_DEV_DAX_HMEM_DEVICES -void hmem_register_resource(int target_nid, struct resource *r); +void hmem_register_resource(struct resource *r); #else -static inline void hmem_register_resource(int target_nid, struct resource *r) +static inline void hmem_register_resource(struct resource *r) { } #endif -typedef int (*walk_hmem_fn)(struct device *dev, int target_nid, - const struct resource *res); -int walk_hmem_resources(struct device *dev, walk_hmem_fn fn); +typedef int (*walk_hmem_fn)(const struct resource *res); +int walk_hmem_resources(walk_hmem_fn fn); #endif