From patchwork Mon Feb 6 01:03:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 13129238 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 E1FDFC636CC for ; Mon, 6 Feb 2023 01:03:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 792CC6B0074; Sun, 5 Feb 2023 20:03:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 743786B0078; Sun, 5 Feb 2023 20:03:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60BF26B0083; Sun, 5 Feb 2023 20:03:44 -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 4C7146B0074 for ; Sun, 5 Feb 2023 20:03:44 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2FDC916090A for ; Mon, 6 Feb 2023 01:03:44 +0000 (UTC) X-FDA: 80435069568.30.A3CC35E Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf18.hostedemail.com (Postfix) with ESMTP id 25BD21C000F for ; Mon, 6 Feb 2023 01:03:41 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=eP4cAodk; spf=pass (imf18.hostedemail.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675645422; a=rsa-sha256; cv=none; b=UQxXx7EIAnSR+1gFy72lG7uy8e923CaV551MFhD8xYhxb9v3HWrheR1nl1cKJcp89ulMo/ a54i0EYz+84fUCfpYDiRFShgXx/2vYinhjYjGJy2YlSYt3/I2uWZXKEenFq2GgZ00OVoUa P0HXxNqe4kjrDNexJewuD4vJD6pRnmY= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=eP4cAodk; spf=pass (imf18.hostedemail.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675645422; 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=Clt0rrKEtsA377yEcSYmcHAsRruSX8GZOpR5+rVGnW4=; b=6su7OKNcpLHZTN/VOxIwmR1Ro+JzSn1uP9MP5j89bOYvSYhFdDInEE4+9JaDZ7ECD+mOct l4h+zr4gsfJi7gd65YbgWeqpV1KqjaloOJuaa7myHnSjcnFABdDkoH7wUcUPJ9xqLLmhKp y4ZEFkXj+uAEX4Q2Mea9YeVnIEkg7j4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675645422; x=1707181422; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=efc+FneV0jKpVBpxm5XWbyZ/alUdKgjj2AHpNBEopmM=; b=eP4cAodkDv9olDacOZruUJcfdxGqC4rI3/oXKsdQ9WA1ghgZBEzLp6qv JS8iCtDqBIDD1qHzA2jkCTPuX1VYfZwJsHCaPpSaaO0hidgw10jVE2145 SvxbHlm44ZgOIt19CRU4lneXSPw4I1V31vewUly8kPIt5FJQP+CZvgmS9 aruP7uE4GUbavns8r0xdoV0JtEqlvkXqm6V1Q0Ii50wl5dXolomth4JiV cYdjD9Z5fRN2K2HMKhvNMQ8V0vh0xg5U+0cNFn8D4AUBcNXOS4SAoL0WA LT2FQHTmQ7xOBSgxa5Y212jgt2DF1sAQfl8hYjyR0Usi+fGs3a7foNc5w w==; X-IronPort-AV: E=McAfee;i="6500,9779,10612"; a="309442668" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="309442668" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2023 17:03:41 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10612"; a="775006670" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="775006670" Received: from mkrysak-mobl.amr.corp.intel.com (HELO dwillia2-xfh.jf.intel.com) ([10.212.255.187]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2023 17:03:41 -0800 Subject: [PATCH 13/18] dax/hmem: Move HMAT and Soft reservation probe initcall level From: Dan Williams To: linux-cxl@vger.kernel.org Cc: dave.hansen@linux.intel.com, linux-mm@kvack.org, linux-acpi@vger.kernel.org Date: Sun, 05 Feb 2023 17:03:41 -0800 Message-ID: <167564542109.847146.10113972881782419363.stgit@dwillia2-xfh.jf.intel.com> In-Reply-To: <167564534874.847146.5222419648551436750.stgit@dwillia2-xfh.jf.intel.com> References: <167564534874.847146.5222419648551436750.stgit@dwillia2-xfh.jf.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 25BD21C000F X-Rspamd-Server: rspam01 X-Stat-Signature: uz8xxi4ajtcttywag5nqbe6z65qsfpj5 X-HE-Tag: 1675645421-933436 X-HE-Meta: U2FsdGVkX1+etovQOXpkuwn1VjB17osceqexPW+zcXcXaQL4xsA1yrMil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6cpBF9Q9g/yTmUhO7Yaq9kBT4Mg7lk9z8AytvN7w== 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: In preparation for moving more filtering of "hmem" ranges into the dax_hmem.ko module, update the initcall levels. HMAT range registration moves to subsys_initcall() to be done before Soft Reservation probing, and Soft Reservation probing is moved to device_initcall() to be done before dax_hmem.ko initialization if it is built-in. Signed-off-by: Dan Williams --- drivers/acpi/numa/hmat.c | 2 +- drivers/dax/hmem/Makefile | 3 ++- drivers/dax/hmem/device.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 605a0c7053be..ff24282301ab 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -869,4 +869,4 @@ static __init int hmat_init(void) acpi_put_table(tbl); return 0; } -device_initcall(hmat_init); +subsys_initcall(hmat_init); diff --git a/drivers/dax/hmem/Makefile b/drivers/dax/hmem/Makefile index 57377b4c3d47..d4c4cd6bccd7 100644 --- a/drivers/dax/hmem/Makefile +++ b/drivers/dax/hmem/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_DEV_DAX_HMEM) += dax_hmem.o +# device_hmem.o deliberately precedes dax_hmem.o for initcall ordering obj-$(CONFIG_DEV_DAX_HMEM_DEVICES) += device_hmem.o +obj-$(CONFIG_DEV_DAX_HMEM) += dax_hmem.o device_hmem-y := device.o dax_hmem-y := hmem.o diff --git a/drivers/dax/hmem/device.c b/drivers/dax/hmem/device.c index 903325aac991..20749c7fab81 100644 --- a/drivers/dax/hmem/device.c +++ b/drivers/dax/hmem/device.c @@ -104,4 +104,4 @@ static __init int hmem_init(void) * As this is a fallback for address ranges unclaimed by the ACPI HMAT * parsing it must be at an initcall level greater than hmat_init(). */ -late_initcall(hmem_init); +device_initcall(hmem_init);