From patchwork Tue Sep 20 02:51:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Shixin X-Patchwork-Id: 12981226 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 A2070C54EE9 for ; Tue, 20 Sep 2022 02:17:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 57F42940007; Mon, 19 Sep 2022 22:17:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 35A098000A; Mon, 19 Sep 2022 22:17:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FBEC80008; Mon, 19 Sep 2022 22:17:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F2220940007 for ; Mon, 19 Sep 2022 22:17:54 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C4F851C6CB9 for ; Tue, 20 Sep 2022 02:17:54 +0000 (UTC) X-FDA: 79930853268.19.6C7D1AF Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf26.hostedemail.com (Postfix) with ESMTP id 2BC7A140020 for ; Tue, 20 Sep 2022 02:17:54 +0000 (UTC) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MWlVw0BwVzpSyX; Tue, 20 Sep 2022 10:15:04 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 10:17:51 +0800 Received: from huawei.com (10.175.113.32) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 10:17:50 +0800 From: Liu Shixin To: Andrew Morton , Zefan Li , Waiman Long , "Christoph Lameter" CC: , Liu Shixin , Kefeng Wang Subject: [PATCH v2 6/9] ACPI: HMAT: use hotplug_memory_notifier() directly Date: Tue, 20 Sep 2022 10:51:20 +0800 Message-ID: <20220920025123.2868953-7-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920025123.2868953-1-liushixin2@huawei.com> References: <20220920025123.2868953-1-liushixin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663640274; 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; bh=34qWwJlHpP5N4za9rIs/++NAn26bH7QJ8mD/w5opMhc=; b=iOWzQk4toxNl/wsvKmRhs4YkcCw/k9zFpfgmJBV1z0hEqmb3kC7JU71Dw+0FB33ARasIyO veccCu7kfoEoKlpoDubjKcSMmOoy8lxN59EHvSMbuW+8TWwBSWxf0/xKfocvhah9/rYswJ N01j5x4TfiydeS0BpksadzkoWEhR2bQ= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663640274; a=rsa-sha256; cv=none; b=5LRuRCQOPvPfcev+eFeLNnMkfhZMBXQ/F2KNGwUR9vinBJ5HOPW7JN5YSEATynJAI/rF2w iW7g7Vl1kQlKKUBPkoDtWmbzJFVZGOz43xjCxOb61dII1gUWFZfJ3mle9IQVr2kMazsLtq 5P3DmgNa0y6hpPa0IBfiFRW4PCvVmwQ= X-Stat-Signature: by6t4rt6ioi5y43k4dq7fwxgd4kijska X-Rspam-User: X-Rspamd-Queue-Id: 2BC7A140020 X-Rspamd-Server: rspam02 Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1663640274-87562 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: Since patch 316346243be6 has already updated the minimum gcc version to 5.1. The previous problem mentioned in patch f02c69680088 is not existed. So we can now revert to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand --- drivers/acpi/numa/hmat.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index c3d783aca196..84dffb3dc30e 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -768,11 +768,6 @@ static int hmat_callback(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block hmat_callback_nb = { - .notifier_call = hmat_callback, - .priority = 2, -}; - static __init void hmat_free_structures(void) { struct memory_target *target, *tnext; @@ -855,7 +850,7 @@ static __init int hmat_init(void) hmat_register_targets(); /* Keep the table and structures if the notifier may use them */ - if (!register_hotmemory_notifier(&hmat_callback_nb)) + if (!hotplug_memory_notifier(hmat_callback, 2)) return 0; out_put: hmat_free_structures();