From patchwork Wed Jul 12 03:16:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bibo mao X-Patchwork-Id: 13309542 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 7DA56EB64DC for ; Wed, 12 Jul 2023 03:16:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 803E16B007B; Tue, 11 Jul 2023 23:16:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 763386B007D; Tue, 11 Jul 2023 23:16:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 540D56B0075; Tue, 11 Jul 2023 23:16:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3F7026B0071 for ; Tue, 11 Jul 2023 23:16:29 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 09A3E1C86BC for ; Wed, 12 Jul 2023 03:16:29 +0000 (UTC) X-FDA: 81001496898.17.4F32F76 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by imf27.hostedemail.com (Postfix) with ESMTP id 9CD504000B for ; Wed, 12 Jul 2023 03:16:26 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of maobibo@loongson.cn designates 114.242.206.163 as permitted sender) smtp.mailfrom=maobibo@loongson.cn ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689131787; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=ekFyi289m5wxFPyQE1lLTXpWi7EVHTV7RxfzEzEeEds=; b=UdOn+Cwpbm98CXJrquZMii4aEc5EYDSYG6JJvMnLXshE7t8+UOxjnGVx9ChYzWOeirTBQb d0Tf8fWQPrgA+9XPMNaDm9pkclzAO1RxASlS2sDymevkoWAYxWfHMSA4b+4/sQr253Awvw izaJVKV4G74zygpNznChQu/3JqiQgLI= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of maobibo@loongson.cn designates 114.242.206.163 as permitted sender) smtp.mailfrom=maobibo@loongson.cn ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689131787; a=rsa-sha256; cv=none; b=Ry03KmHTJJW562rpq2rKvOGXiTVXLyIWjIUP8LD5JKN5DryQi/azxusc29bb/OpIuQh/3t 2GFVn/OojwcwunfUpXryz5MMvSbP0kcDxKwGyaEBOgMCYKk1m09HaMtBLlztMR3Ugh6eG8 KVKNfhKtAyUbFKx/Hhg2d2km2el3vLg= Received: from loongson.cn (unknown [10.2.9.158]) by gateway (Coremail) with SMTP id _____8AxEvAGG65kdscDAA--.9820S3; Wed, 12 Jul 2023 11:16:22 +0800 (CST) Received: from kvm-1-158.loongson.cn (unknown [10.2.9.158]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxWM0GG65kA7cpAA--.53483S2; Wed, 12 Jul 2023 11:16:22 +0800 (CST) From: Bibo Mao To: Huacai Chen , Dennis Zhou , Tejun Heo , Christoph Lameter Cc: Andrew Morton , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org, WANG Xuerui Subject: [PATCH 0/3] LoongArch: mm: Code cleanup with populate pte Date: Wed, 12 Jul 2023 11:16:19 +0800 Message-Id: <20230712031622.1888321-1-maobibo@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-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Y6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j8yCJUUUUU= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 9CD504000B X-Stat-Signature: 5gnp76mtsek4ssqwttcyop1ehn5cekp8 X-Rspam-User: X-HE-Tag: 1689131786-210620 X-HE-Meta: U2FsdGVkX18/3yYyMa2OEuECFBxj7sWI4gKO48opGFm2exjy2ZhkzZGIhA8Y4DZOlxYRmlrirGEH2aaSRMUGbLNCI8F319FISSbqvTI8mNvKWxeBleNuFSxV1N1mfGIRGH879cUA75kSCPySvftmsjQ4TF0YwVVrMg9zfAlZb/dgOg1pX42SJNChkXU8VAy8MW7FTiZFSIz3cRqTKNNrYfQt4oyXxn3zh0YesqWu4rZOlt07r+jW/7+puX8iHMLuws7Q3lb3e6Ov23KHcegaBG08FKXy1XOBsd8xfH/tADo/kNfCKWh5s5Y7ejJpCYQw9xpgdRiJJpi2XNLLcnSkT2ygK3iUGxPlR5np+9eWEfUQQ+ihN+Y01LxopwRtAUun075Ooms2covDoh1qNZa2ZqV7IiRSuLrsHEV8BggndmMnOjKqiw8o55yzBE8Gxo3K2EoAKulR476Abd+baHyjg9YzViKwjHq3d93l0AIo7IcxjXXFSnJLAYL/HklVnh5vR9+KWBzUgeQaSW36s5jHb+ptH0DdIik5m7EmEwrODtBDlHqNrybX/ZpxpfPbtzabh7Ju0tfrjFKkXat0RHUcTwVJ/T1XEHX0030ABNtEufJ32CHlOqKnPFFhVIUrXuPhy+VlBn2WAa3jmqCwD6kta4p1sxNWhNgID4MzciYm33CWcIARwnZvv4W1dMa8jpS37O+wxWrTwk3K37nWndrHsoowbp/a7v961J8x6kyWnxY1XZ4qR9eaAndO994NtLKmJLRfWfgS8sdFWeBhDHLUZgbv3P0KtP+Zjds2SC8bh64mVtHpnoZnXmOcoBj+r+mBXw7p3GzeLPaVTlA3MMDMbbXnMFgpCZGc/6SIVnCYNPAciiY7YGhpKR3G6JgKtqQNANIFLw9S3cpFk8Am1y2ez6hogMJ+hBINqfWvoUTCL6U5eh+Qs82nituFNlodHU6pCoRNMfLNZGI6Vo5t25T Pyiz/IU0 VZceMCaTds72ijqBvUTKYEmE9e+9QLwIdfddu 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: There are some confusion between pdg and p4d when populate pte for kernel address space. This patch modifies this issue and adds unified function for pcpu and fixmap populate pte. Bibo Mao (3): mm/percpu: Remove some local variables in pcpu_populate_pte LoongArch: Code cleanup in function pcpu_populate_pte LoongArch: mm: Add unified function populate_kernel_pte arch/loongarch/include/asm/pgalloc.h | 1 + arch/loongarch/kernel/numa.c | 35 ++----------------- arch/loongarch/mm/init.c | 52 ++++++++++++++++------------ mm/percpu.c | 24 +++++-------- 4 files changed, 42 insertions(+), 70 deletions(-)