From patchwork Mon Aug 26 12:04:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yukaixiong X-Patchwork-Id: 13777711 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 3D15DC5321D for ; Mon, 26 Aug 2024 12:06:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA6F46B04C8; Mon, 26 Aug 2024 08:05:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 944586B04CB; Mon, 26 Aug 2024 08:05:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7219F6B04C9; Mon, 26 Aug 2024 08:05:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 49C646B0440 for ; Mon, 26 Aug 2024 08:05:59 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E15A2140FF5 for ; Mon, 26 Aug 2024 12:05:58 +0000 (UTC) X-FDA: 82494267996.29.1FCBE9A Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf10.hostedemail.com (Postfix) with ESMTP id 78D12C0024 for ; Mon, 26 Aug 2024 12:05:56 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=yukaixiong@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724673914; 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=mt2OG3fTiirxAORpKav93jptk/RGz+qWfIwPdmxn2xo=; b=InYzy1HIxrIPb06mFFm4ugMjVAXQL3EKmfOw25k8+7LoQfyK6g+T+sQJj6fH7YAVNNB1YP MD5TAvMloyuLuXmxh67hgir9B6JSgdyGxAdu43nn93FZMiPyTdT1PIL7ZADPKyG4aunPh+ TGPaFw95qvRF/x8jYGK1Ql5CibKkApY= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=yukaixiong@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724673914; a=rsa-sha256; cv=none; b=lL5pmH/Bma6nRKNHGvIYXU7LehZ4W6WOCJtzbd/1iJ7vv6rBox6hYMQi/luFW5xmGFXFzX 2WIpNk+Qpo5ew/pqusJ/th3RZ+YDJxfbhBa//ZlMutipGFf5PxC2jqvAPWfr4eOaZnxlmf BJnLOACx0M1U6VCo1yPL6xZC85YYscU= Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Wsq9v2t7YzyQK8; Mon, 26 Aug 2024 20:05:07 +0800 (CST) Received: from kwepemh100016.china.huawei.com (unknown [7.202.181.102]) by mail.maildlp.com (Postfix) with ESMTPS id 4528C1401F0; Mon, 26 Aug 2024 20:05:53 +0800 (CST) Received: from huawei.com (10.175.113.32) by kwepemh100016.china.huawei.com (7.202.181.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 26 Aug 2024 20:05:50 +0800 From: Kaixiong Yu To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH -next 14/15] sh: vdso: move the sysctl into its own file Date: Mon, 26 Aug 2024 20:04:48 +0800 Message-ID: <20240826120449.1666461-15-yukaixiong@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240826120449.1666461-1-yukaixiong@huawei.com> References: <20240826120449.1666461-1-yukaixiong@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 kwepemh100016.china.huawei.com (7.202.181.102) X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 78D12C0024 X-Stat-Signature: ot89o1sb984yc36ix6dg8putcs4gdtex X-HE-Tag: 1724673956-746252 X-HE-Meta: U2FsdGVkX18ECRrjnxL966KNBN3BuR8Mr07XzpeNpe4O6a2NiI2OeGx6X2y8OETdo40oUmi9hOUivMWfI3a1+dnH1TNDHhK8nzqkhBTqEGY9Bh5UmKsfPeeUwcH/M3bSIXSL3DYVXiLDpa2qBkpOyHZl6Am3OX+XSZsAYsoBzh2gEDuMBIBXQf/NJQDbWF0kr/YnmKkh14FuucJxXYPkNgc9iHyvFod7v9qIw5UItpBpkBEoVWZhAGWwlrk3Qg3DMLYrOXoT3EVdV/x/ClEBYKt6XYZXd0Dr42O5s9NrM/RFrj8WV7YWIf0XlZXxRjyB1NXbunszxkeuML2/+VQHf6ujq1xH8SlAAVjjfYivIU7oIm7ZcYe/XJPzTRtGWNuw40yQUpnEiUnY3AFzk4w1RNiHIiraw2SzRbzTgLZKqTmmyKJ/fgQyx+ljrR3Yn2m95kW+CZnuhYroRLfS8obndgFLf+xvNyk1wHjCrWbSMbGZ7QAy9Fimxng2JrhZ7eDJYDOJ+aexY29oCN+juvgUYt62jpSveacBGdtc3pLZAOiJAiWGKNNtWWa+O7v7tvnXeAQ3aroUbujO5LSQtVNh1LPMmpvJ9u3LYAjWxXulQ2dYhnefxFoKXqF6i5ns2ZlQ6wW0gwIYct8hpUkgKYVSFzmAcUrcRfN5/OK0mZbZH+BB++jPSp4erefb9swtSSUeoJjNnqbXYe6PTRy6GAJo4Hi95kwlVJ/XPcF9Tpa1ef2QvFV2UL2SCTlNiTVDn7qg6ALop1k9fXyi3EyNNpBAAG5QbmbD5DWTuvRaJOsUsAgPLzQeljKdz+LJZc7MLgWImAZXW9mxycbsntEHPcquygmiLs+Tm6cDHWov5JtZRixn+BX/KY+rrjG4qapbCvKZtJ/Lib4thl25Gcn8FYKC9xkZUSwH4ulfbytXb6D+MTWWh9R8JuC98N3b3eTutSEWlqniDaxIbVemgCFnx5Y H3pDglVr nfY/5x6FbyAXBzeFalJesQ2coykDQdgv9HAeALqLHfMTKO7kOgBOtDDegIX9weEaxWwW4XKRn0B4Y58LX/lbZYR4pvnaG+9DWCLC7OR6TlUN9GQHfSfP8RB53oJiDc4CTFF33da9Lc+nRaDQqRlBTdXSmfizI/gx2gTXml/cyP/aKnB4Y6vy9p8aVEQ== 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: When CONFIG_SUPERH and CONFIG_VSYSCALL are defined, vdso_enabled belongs to arch/sh/kernel/vsyscall/vsyscall.c. So, move it into its own file. After this patch is applied, all sysctls of vm_table would be moved. So, delete vm_table. Signed-off-by: Kaixiong Yu --- arch/sh/kernel/vsyscall/vsyscall.c | 14 ++++++++++++++ kernel/sysctl.c | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c index add35c51e017..43bc3715e38c 100644 --- a/arch/sh/kernel/vsyscall/vsyscall.c +++ b/arch/sh/kernel/vsyscall/vsyscall.c @@ -14,6 +14,7 @@ #include #include #include +#include #include /* @@ -30,6 +31,17 @@ static int __init vdso_setup(char *s) } __setup("vdso=", vdso_setup); +static struct ctl_table vdso_table[] = { + { + .procname = "vdso_enabled", + .data = &vdso_enabled, + .maxlen = sizeof(vdso_enabled), + .mode = 0644, + .proc_handler = proc_dointvec, + .extra1 = SYSCTL_ZERO, + }, +}; + /* * These symbols are defined by vsyscall.o to mark the bounds * of the ELF DSO images included therein. @@ -55,6 +67,8 @@ int __init vsyscall_init(void) &vsyscall_trapa_start, &vsyscall_trapa_end - &vsyscall_trapa_start); + register_sysctl_init("vm", vdso_table); + return 0; } diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 24617be93119..f04da9f3abc6 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2022,23 +2022,9 @@ static struct ctl_table kern_table[] = { #endif }; -static struct ctl_table vm_table[] = { -#if defined(CONFIG_SUPERH) && defined(CONFIG_VSYSCALL) - { - .procname = "vdso_enabled", - .data = &vdso_enabled, - .maxlen = sizeof(vdso_enabled), - .mode = 0644, - .proc_handler = proc_dointvec, - .extra1 = SYSCTL_ZERO, - }, -#endif -}; - int __init sysctl_init_bases(void) { register_sysctl_init("kernel", kern_table); - register_sysctl_init("vm", vm_table); return 0; }