From patchwork Thu Jul 13 17:26:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311644 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 131F6C001DC for ; Thu, 13 Jul 2023 09:26:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 840C18D0001; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A03A8D0006; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A4CD8D0001; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3F71D8D0001 for ; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 02518C01AB for ; Thu, 13 Jul 2023 09:26:03 +0000 (UTC) X-FDA: 81006057048.25.5E99E6C Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf01.hostedemail.com (Postfix) with ESMTP id B23274000C for ; Thu, 13 Jul 2023 09:26:00 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=none; spf=none (imf01.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240362; 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:in-reply-to:references:references; bh=z9tcfIaRK2iLZLQrbr2HRaNoW38Ipxj6ZwrtLwjt7Kg=; b=bYUDZUSbGJ6GU0368iAqIDjnnny5+sh+KSO+eeBDnUxlYs+MJJvJ81iAOLVmNp3ndpCMPd xyv/xQredXzh2w6HYOj6gwGVMfqIMSzWjMycTxGf3vg7DPw1JiW7IjyRp2YAJkzluEZhZr BUwXFYWJzLn40Y5+tIURBfs1gYgFgsA= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=none; spf=none (imf01.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240362; a=rsa-sha256; cv=none; b=TdNPW2iiKKrs0wjY00dEqbs2nr7AIRy4RM6P/R1Rm47/nNIQJye433M9Aw4lcsC2igzUbO 1uZDP4uNEtsHPrJaezAOrTJ91jEmNGCzY2tkq7AmI4IKfcfgZpVGhln2CsFPRfuqmdSiL6 hUzSvpogJliqup5Yd+P50EQhMYeRUt0= Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4R1q3Q4Rr8z4f3lXR for ; Thu, 13 Jul 2023 17:25:54 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S3; Thu, 13 Jul 2023 17:25:55 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 1/8] mm/page_table_check: remove unused parameters in page_table_check_clear() Date: Fri, 14 Jul 2023 01:26:29 +0800 Message-Id: <20230713172636.1705415-2-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S3 X-Coremail-Antispam: 1UD129KBjvJXoWxJr1UJr17GF4UWFy8GrW8Crg_yoW8ZFyxp3 W5X34vqr4Yg345Wr1S9Fs8AryUtrs8WayxXr17GayYv3Way34fKFyUJwn8Za95GrykXay3 GFWSqr17CF4xJa7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBK14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_Jr4l82xGYIkIc2x26xkF7I0E14v26r1Y6r1xM28lY4IEw2IIxxk0rwA2 F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjx v20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2 z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErc IFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v2 6r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2 Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_ Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMI IF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7sRiDGYDUUUUU= = X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B23274000C X-Stat-Signature: 3d51hafb6cdso979ar6b5wgjsni8nfd5 X-Rspam-User: X-HE-Tag: 1689240360-826551 X-HE-Meta: U2FsdGVkX18hN+AKeWG0SHNHX4cFCLychvlmSJTa3B9ceGfqbwxoDyZQ1mhxNN7T9TPoAd6CjKSi21fxZrqFNEAjOejiTwYyKqTsegV3su/flLW5kHe2bNrZVHYD7v6+cKOfk3BuRBRha9AGiALnVKw6uYzS0HoaRVviTSyBQ0eOSH5Mn7Nb+7AJIrCKcGB6j9xlJTrUiU48MZxoMx42iE+YR5w5krJ7xUNo1myGmBzbipzC4QtC/Nxjg6Vb+eAXKFjcAG+OEEjimhMJE12UbmFZacILdBI82FI1IJu0aiO3GUt0qkMCHE0aTnd4TM2QGprPyQx2L58YOxDAozTjvVitseVnTUYKMl6L6y0dSjP67KicwU0iym4WVMfwH5Z99HwCnxfl7Mq1mndt6uRy7j3/ocnjuVHs3XIDt+yo/+05PmvZ3rT3zF+abs474XNV2vGKdiFdexhk1oqVXE4Q44wNpNsF7pfz+z8WfqGNS5Mc9miEywhcVFTzt+2DOKSg4cBqwFbyXEyJiQ9C7v7tLcMilhIFVlFN+DkS99iZ5+hjRwVSUGtxBuTKh471+nxxTgKH6JnVp3e6e1qAxB9LI81As11pp8L0G6AnjDGq6VJq0x8sNlENtumDQ3io7F8tWKp86MjMy4jDYtGdTxAGaknhPSX8sR6Hbjs/apa9HO9WzN84bSbfSxatJjujIbG2sfHPnoosRa2K+F8lr9c1BLfwAZu2n92VxgkJ0biMTPKLaQ34N5cl7cT9GM3x4kiT5UYruabVojTQEohphC5coxRoTHksfyEvtI4lqU/zDi+yrmHkEWbKT5eIAy5DnmiirSK9sPtHAiWBPDCKVFCZ24zWPKYhyaZKX6/sie9VXga8KE9KyoIW2pj2C/soPrrCs4qijw3CV5JTITex0XQv7SgzBgoxp1+G+AZBCD7ru+oujjXgi8GisVwTDrOu4wPpClCpj6uwEhZYE3Vm9W3 ScbX0TNX 1r9eITdyXGr0iqgVZOdE26Od3RiSBD8Jr587KwDVXjYq3aWtbE1bkXSeSi2DwR18uRFGQASqCf65db7h1mvPuxYIJ5i3rjcWkWbOLognzs87+8NH95nuAneIYEbRHhUpPojvcO1Dn0Ovwq/GRzMWuqc9VYOc3e+BbsSotDC05hgsNAmt/ham7auPPE2ZXlxm+4giTyyCysi79/vVnZbRLHODy5tPavvdJxyOgSIpI5eOalza7X0h8rtuU2s/Z5MW0s8+Ce2e2jPg79eoLfrNeDqE/8b9oTLPSvUOUJ0JXJGwN8S0QmyaRALEGvQ== 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: Remove unused mm and addr in function page_table_check_clear(). Signed-off-by: Kemeng Shi --- mm/page_table_check.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 93ec7690a0d8..9477b93d8463 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -58,8 +58,7 @@ static struct page_table_check *get_page_table_check(struct page_ext *page_ext) * An entry is removed from the page table, decrement the counters for that page * verify that it is of correct type and counters do not become negative. */ -static void page_table_check_clear(struct mm_struct *mm, unsigned long addr, - unsigned long pfn, unsigned long pgcnt) +static void page_table_check_clear(unsigned long pfn, unsigned long pgcnt) { struct page_ext *page_ext; struct page *page; @@ -158,8 +157,7 @@ void __page_table_check_pte_clear(struct mm_struct *mm, unsigned long addr, return; if (pte_user_accessible_page(pte)) { - page_table_check_clear(mm, addr, pte_pfn(pte), - PAGE_SIZE >> PAGE_SHIFT); + page_table_check_clear(pte_pfn(pte), PAGE_SIZE >> PAGE_SHIFT); } } EXPORT_SYMBOL(__page_table_check_pte_clear); @@ -171,8 +169,7 @@ void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr, return; if (pmd_user_accessible_page(pmd)) { - page_table_check_clear(mm, addr, pmd_pfn(pmd), - PMD_SIZE >> PAGE_SHIFT); + page_table_check_clear(pmd_pfn(pmd), PMD_SIZE >> PAGE_SHIFT); } } EXPORT_SYMBOL(__page_table_check_pmd_clear); @@ -184,8 +181,7 @@ void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr, return; if (pud_user_accessible_page(pud)) { - page_table_check_clear(mm, addr, pud_pfn(pud), - PUD_SIZE >> PAGE_SHIFT); + page_table_check_clear(pud_pfn(pud), PUD_SIZE >> PAGE_SHIFT); } } EXPORT_SYMBOL(__page_table_check_pud_clear); From patchwork Thu Jul 13 17:26:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311649 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 688F7C0015E for ; Thu, 13 Jul 2023 09:26:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D3D248D0006; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B22C78D0008; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 94F448D0008; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 62CF58D0006 for ; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 38DF11401A2 for ; Thu, 13 Jul 2023 09:26:05 +0000 (UTC) X-FDA: 81006057090.13.D74C954 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf19.hostedemail.com (Postfix) with ESMTP id 6F75F1A0006 for ; Thu, 13 Jul 2023 09:26:01 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=none; spf=none (imf19.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240363; a=rsa-sha256; cv=none; b=237vs2Lf+mdJKiervbNE863xrnJKcM1q2lFSbaLHuH1M6+VJrBpo6a7qWy8zh+fEe08j+A KA4YJ6IiZ36+u5Aga7XEH5AWY0/z4pGNGWsOJhX9oTDViAqH0f2YQcG4Kb4mIIaFT4zkUE 52ixqFKc6VRZ7471nWxz0O5pMYBBPT8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=none; spf=none (imf19.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240363; 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:in-reply-to:references:references; bh=E/93imGBblZ+AMmT7z8ffaC0y6/9p4puHJ78MPV3E4w=; b=aetnG0Zi+i3Z9SQaI9fpgfpph31khbH6zBJ1sLLTZVb9U2rcxsojgDNDRbYBgU+Q1uC4eN Pj8VgyWAXTbPh+PLYKmIuDrekl9H5o2EpL3iI1burXWMnfAS21arcoBpWCTkXQUSQmmiSY 1ZgK8Hw/UD9KOflTLRIYOJ8f6wBTA9E= Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R1q3P1V9Hz4f3kjP for ; Thu, 13 Jul 2023 17:25:53 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S4; Thu, 13 Jul 2023 17:25:55 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 2/8] mm/page_table_check: remove unused parameters in page_table_check_set() Date: Fri, 14 Jul 2023 01:26:30 +0800 Message-Id: <20230713172636.1705415-3-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S4 X-Coremail-Antispam: 1UD129KBjvJXoW7tF1kCF17Cr4rAFW7XFWUurg_yoW8Zr1kpa 4Yga4qqr45W345WF1jvFZ5ZryUJrs8JayxWr13CayYv3W5XrW0gF9rJr9rZayrJry8Z343 GFWftrsrAF4xX3JanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBE14x267AKxVW5JVWrJwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_Jryl82xGYIkIc2x26xkF7I0E14v26r1I6r4UM28lY4IEw2IIxxk0rwA2 F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjx v20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2 z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErc IFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v2 6r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2 Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_ Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMI IF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRcBMtUUUUU = X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 6F75F1A0006 X-Stat-Signature: jp1nqkfpn3y5113p7ekgxirkjccixp1f X-Rspam-User: X-HE-Tag: 1689240361-790810 X-HE-Meta: U2FsdGVkX1+yHUOjpTJ7hNPyBbr7eSC5RAiS4K0uHVfMIITlpc1mSupx752aMu2E8JJIbv4FcBJy5dqJcDLqXv28WN3JddNpo8GQ7BbiO8xaDF1yEnKrRlG/c6OyQU0rLGocdSSWIfBOQE39LXw4mB7svGPIRICBejNmlY+Ju/Dq/gGsoGbGLqLBH3UAsPRt4ZcEZSK2tnIoDjiBUsg6/GmH78BnxjVRH9y+AZdHFxekZK3VnFGJrSI8Lhs7+vrSuFlRSAzLGzeVvfP+YkLv+BTj45q9dtwEpCbbkplwy5KlhpXT94inAkascoxOWJ+3SsS4m5dgyFyBYqX9J0CoIZb8/rBbP3CfuCr4WkIdLX98zfHY5pwrtMit4cWovi7yNQbPrXVOofcGXcP0aw4wi00MDGgBqDBe6EPbTtRKP0AVmDfQalGiFAVu8eEC2hhH4OgsZMpnkFZVLO+0TiloxOZlNHQQjEsmsuwHzs3DeUykyRFW2wOzupgUyMbdrAacuMZzDwzU5DCmppx9dx281qsTouIqKyMOM5Nk9/L0t/GDtehson4o/rNbYGx59HcYnNgl2jM5wTFN2ppe4EmuBo6kP8zNEmVjBJkd3Lhk+EJ3u0YMCxp+L9Gy1YVHQpMbleXp7djuz/qkz0ur+VslZRPzx9EN0WKVlzMJdP2Y6NECxmC39ki7LP7PeYsUawH0MNr9sT84znOgrTNZY5NRKfY2TDNM9GEssyuBbPtabfVWXuQXMVQ5PDIuGZjgorlg3meCVjHOV4d3VZ8GJfUk4trnbY5yXB+5QW9+UzOpU5BFYgAxk79adDd0xjP33Tk1BekNgsZDE14AmL1Tj/AIO/dBjowJgWXUessBqR/U1WUxccZNAfgtExN53iRqLabKAg7jWFRCyogaU+Rd+VFCFmDcJk+lCuAWpyqZ0JqCWtYAVc4hAWWkD70Gurdaj44UhG/84kV/v+oz0UxKxRf g40y+1Fd Kv93ws9zRRsGkMgo+NLm2iawp+zRd0KtGz1WxEYO4DWx0TqQ4UHPHtcc4r004px/aJxbOoYhlG8kpuNGbCPE8uQFGq1H6VjYbiYbQun2J4GAQGvN9LmSMVi+hiWFFxW95z6uDRWQRccULFUL/tAEgcyTUjs5xvLo/iDPYgDGlifgHm5nA/bhQNOTMBUwgK1zzsFyqnOsJWUwx79yzQ8bIs+70ST/zz86dBLAbHb3qyLdCmOu7k+zGcd4dleD9TcMDOPWnwCgECSH6/BCMKPSehERXXRZcS6jW+J9iiS7iVv5HFdJxvC6vBWAVAA== 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: Remove unused mm and addr in page_table_check_set(). Signed-off-by: Kemeng Shi --- mm/page_table_check.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 9477b93d8463..53a9a1e4f342 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -94,8 +94,7 @@ static void page_table_check_clear(unsigned long pfn, unsigned long pgcnt) * verify that it is of correct type and is not being mapped with a different * type to a different process. */ -static void page_table_check_set(struct mm_struct *mm, unsigned long addr, - unsigned long pfn, unsigned long pgcnt, +static void page_table_check_set(unsigned long pfn, unsigned long pgcnt, bool rw) { struct page_ext *page_ext; @@ -194,8 +193,7 @@ void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, __page_table_check_pte_clear(mm, addr, ptep_get(ptep)); if (pte_user_accessible_page(pte)) { - page_table_check_set(mm, addr, pte_pfn(pte), - PAGE_SIZE >> PAGE_SHIFT, + page_table_check_set(pte_pfn(pte), PAGE_SIZE >> PAGE_SHIFT, pte_write(pte)); } } @@ -209,8 +207,7 @@ void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, __page_table_check_pmd_clear(mm, addr, *pmdp); if (pmd_user_accessible_page(pmd)) { - page_table_check_set(mm, addr, pmd_pfn(pmd), - PMD_SIZE >> PAGE_SHIFT, + page_table_check_set(pmd_pfn(pmd), PMD_SIZE >> PAGE_SHIFT, pmd_write(pmd)); } } @@ -224,8 +221,7 @@ void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, __page_table_check_pud_clear(mm, addr, *pudp); if (pud_user_accessible_page(pud)) { - page_table_check_set(mm, addr, pud_pfn(pud), - PUD_SIZE >> PAGE_SHIFT, + page_table_check_set(pud_pfn(pud), PUD_SIZE >> PAGE_SHIFT, pud_write(pud)); } } From patchwork Thu Jul 13 17:26:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311643 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 EB3DFEB64DD for ; Thu, 13 Jul 2023 09:26:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5A9458D0002; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 52ED88D0003; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3815A8D0002; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) 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 23BCE8D0001 for ; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id DD19F1A01AF for ; Thu, 13 Jul 2023 09:26:03 +0000 (UTC) X-FDA: 81006057006.26.2A48FB9 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf21.hostedemail.com (Postfix) with ESMTP id D0C761C001E for ; Thu, 13 Jul 2023 09:26:00 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=none; spf=none (imf21.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240361; a=rsa-sha256; cv=none; b=y5dcvi1RQ7DOnd0AvVbqreNMBM1OpezsQCN/gdmP1zYqa84LR2YS0rIjG5hSJb447/o/cV x8HDZ55sL/V9/Tg68XH1Iydm8TN30gl55vtXyUJq8uDp9MtJufZvhDt28T4uKGxv4j8S5F wNVEuCH5DyxhdsjKqWvsPBymbqYXtEk= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; dmarc=none; spf=none (imf21.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240361; 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:in-reply-to:references:references; bh=uHro5qAkw16w8PdVbxq61FlHyptvTuIuK0OOCzrLKHw=; b=QSFv/YqkY8Jeo7AUemLnctJlAL4aSzRkU/iII6jJX0yGrloCt48yBlZkghbRoBH5wj8BnW KlaFlcTNqtwLnBq2fOd/DV9fZF5Z5GPIqpNDDGLXDFkxyHbqafcOM5fkm9x5kzgRHKH+vB tOx5S42gKPbrL+jI4V+JavO7ZF1/EBo= Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R1q3P3Hszz4f3khH for ; Thu, 13 Jul 2023 17:25:53 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S5; Thu, 13 Jul 2023 17:25:55 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 3/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pte_clear Date: Fri, 14 Jul 2023 01:26:31 +0800 Message-Id: <20230713172636.1705415-4-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S5 X-Coremail-Antispam: 1UD129KBjvJXoWxKF18uF4xXrW8GF4fZr1DKFg_yoW7ZF1kpa s8W3s2qrW5W34rWry7uFs0yry8trsxW3yfJry8GF4Yvw13KrWIqF98Gr9xAas5Ga4kX34f GFWFgrsrGF4Igr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPSb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M2 8IrcIa0xkI8VA2jI8067AKxVWUWwA2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK 0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4 x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l 84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zV CS5cI20VAGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E 5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAV WUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY 1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI 0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7s RNBT5UUUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: D0C761C001E X-Stat-Signature: nmdqtfgqmhtj95ked3jffzq73immits3 X-Rspam-User: X-HE-Tag: 1689240360-642869 X-HE-Meta: U2FsdGVkX18v4EK+d8aV75w7wybZU1Nnakd2k2jMroo32dA8h9rXhWJTgTB6m9v7WeQ1NOZrpiiAyVWPB9D+OCisWj7J+Nx3tdNChxB/1uH5MbwaaeHRhZs4oG/dUz0yzPtkwDLn49gtzZHvofYZ3cE93WgvCZ0MTjb6dcS9bMOArlvkXYe/z1EllYOuDmIwFKKcbtTvihS0JfnENkz1qOoVjLNXhZrR99d0iLPVzWLkrYKqF157FJgh0SN+raYd80HYIdxAY1GvilUcWEr8Ctjpiv4toyfgV9o95/YiQV8RmAY+y1BzQtahlAUwc10XhCxtqCZ0jmykAi9IDtRlpwulxlkttfVuJXO1G25p0uZhZFRFP/DJUA5bs6MBaIHtrkssCDPTmvv6p6Btxr/mwu2HRx3Mjy7oiwl1ePGxjyhmOZZD+tBpc9sLlrReCbWhq5qr/ULgEO/J+8U90yJFlKyWWcLs6R8BdV7FlOpKdnMbo5lcKU2TDKtREcln+GcI5JKbHbVtgHwVWbPGxz8crign5PmMdzlb/j4WomrGSfktsCqKRGcr7Zxu5L5boiQ4aSik8QD/GCB1heED9+FlbxlcFzbjHArbUMT6uQZYaKXGbFPU0kChqmVylUwLX9LMzDhWG0WN1kksOT7qqJRFsdSy/ZysqJlv7BpjGAOl6hkxa0vM+hgesBtcm9hn3epO6JB69ewM+vqzBkF7xhZgBPV+FDgvm2qLdBHA/oUVLabvRAMJ23aA5eCMP7iztHS+yNvwQG/dyd0QzG5NZ+Cyp/BwsIc1FGy2SinVnsP0F4KPxqPIkhsTBpyXItABxXCDnQHT7Ti+U2NdeA97rv67GOVnn3LVo1WJnMUXLtD2Dxc1L2fjJA4WYT8RU1jGo0qOvLU9o6+UjYwIVmmD/zXqgKdH8IbmZu9V+DofJvUjtNr0mk3AE5exa0ZrSzXMDyRnAj6pONGWd3I/a549CBw /o2OwdDJ bfeJdAQKa+Vl0zWcD0z6pZIkIvLR+ZU8bp577VyIcajgwZl79k5IsVZhddxqCNOIlLN+e7h16MtfiAvWbl+MxNO/VqHi0ARIbkWLoD0InorAyzJnS6nLxzt6xDhLFI7xNwMtWAS56CgZoZT56L01cYxlQHJxfOCSrn372yyIhedW/Pke+AHMJk9WoWdZhwPifQm9EyC79GyRzWDwJAuxzlRCeBUMp1FijHi4q4HRlncETwkX45M93IAGAz/rPySr6ybSYBBMURKuSm2eVD1fMSIQbPKtIVqxAEefNAs7WaTDg9dF/P0qzXh6AwmH1UvOies3Z 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: Remove unused addr in page_table_check_pte_clear and __page_table_check_pte_clear. Signed-off-by: Kemeng Shi --- arch/arm64/include/asm/pgtable.h | 2 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/x86/include/asm/pgtable.h | 4 ++-- include/linux/page_table_check.h | 11 ++++------- include/linux/pgtable.h | 2 +- mm/page_table_check.c | 7 +++---- 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index e8a252e62b12..f7ea51f9c1c1 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -928,7 +928,7 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, { pte_t pte = __pte(xchg_relaxed(&pte_val(*ptep), 0)); - page_table_check_pte_clear(mm, address, pte); + page_table_check_pte_clear(mm, pte); return pte; } diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 75970ee2bda2..5e07312cd3e1 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -529,7 +529,7 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, { pte_t pte = __pte(atomic_long_xchg((atomic_long_t *)ptep, 0)); - page_table_check_pte_clear(mm, address, pte); + page_table_check_pte_clear(mm, pte); return pte; } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 5700bb337987..5085e838b860 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1068,7 +1068,7 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t pte = native_ptep_get_and_clear(ptep); - page_table_check_pte_clear(mm, addr, pte); + page_table_check_pte_clear(mm, pte); return pte; } @@ -1084,7 +1084,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, * care about updates and native needs no locking */ pte = native_local_ptep_get_and_clear(ptep); - page_table_check_pte_clear(mm, addr, pte); + page_table_check_pte_clear(mm, pte); } else { pte = ptep_get_and_clear(mm, addr, ptep); } diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index 01e16c7696ec..35c53c4b94d3 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -14,8 +14,7 @@ extern struct static_key_true page_table_check_disabled; extern struct page_ext_operations page_table_check_ops; void __page_table_check_zero(struct page *page, unsigned int order); -void __page_table_check_pte_clear(struct mm_struct *mm, unsigned long addr, - pte_t pte); +void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte); void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr, pmd_t pmd); void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr, @@ -46,13 +45,12 @@ static inline void page_table_check_free(struct page *page, unsigned int order) __page_table_check_zero(page, order); } -static inline void page_table_check_pte_clear(struct mm_struct *mm, - unsigned long addr, pte_t pte) +static inline void page_table_check_pte_clear(struct mm_struct *mm, pte_t pte) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pte_clear(mm, addr, pte); + __page_table_check_pte_clear(mm, pte); } static inline void page_table_check_pmd_clear(struct mm_struct *mm, @@ -123,8 +121,7 @@ static inline void page_table_check_free(struct page *page, unsigned int order) { } -static inline void page_table_check_pte_clear(struct mm_struct *mm, - unsigned long addr, pte_t pte) +static inline void page_table_check_pte_clear(struct mm_struct *mm, pte_t pte) { } diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 9fa34be65159..a1ccb13c4853 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -322,7 +322,7 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, { pte_t pte = ptep_get(ptep); pte_clear(mm, address, ptep); - page_table_check_pte_clear(mm, address, pte); + page_table_check_pte_clear(mm, pte); return pte; } #endif diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 53a9a1e4f342..a1015fc4d045 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -149,8 +149,7 @@ void __page_table_check_zero(struct page *page, unsigned int order) page_ext_put(page_ext); } -void __page_table_check_pte_clear(struct mm_struct *mm, unsigned long addr, - pte_t pte) +void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte) { if (&init_mm == mm) return; @@ -191,7 +190,7 @@ void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, if (&init_mm == mm) return; - __page_table_check_pte_clear(mm, addr, ptep_get(ptep)); + __page_table_check_pte_clear(mm, ptep_get(ptep)); if (pte_user_accessible_page(pte)) { page_table_check_set(pte_pfn(pte), PAGE_SIZE >> PAGE_SHIFT, pte_write(pte)); @@ -241,7 +240,7 @@ void __page_table_check_pte_clear_range(struct mm_struct *mm, if (WARN_ON(!ptep)) return; for (i = 0; i < PTRS_PER_PTE; i++) { - __page_table_check_pte_clear(mm, addr, ptep_get(ptep)); + __page_table_check_pte_clear(mm, ptep_get(ptep)); addr += PAGE_SIZE; ptep++; } From patchwork Thu Jul 13 17:26:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311652 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 CF5D2C0015E for ; Thu, 13 Jul 2023 09:26:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F7D08D000B; Thu, 13 Jul 2023 05:26:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 580238D000A; Thu, 13 Jul 2023 05:26:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30D0B8D000B; Thu, 13 Jul 2023 05:26:07 -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 16D958D000A for ; Thu, 13 Jul 2023 05:26:07 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CF6DFC01A2 for ; Thu, 13 Jul 2023 09:26:06 +0000 (UTC) X-FDA: 81006057132.02.BC90A2F Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by imf14.hostedemail.com (Postfix) with ESMTP id 5D378100018 for ; Thu, 13 Jul 2023 09:26:02 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=none (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240365; 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:in-reply-to:references:references; bh=j5q2T68GPv/Yr7xFGfSYTM0E5cNTHrn2fliGh8orwNo=; b=0Pehao40324HM7sDcZ6eD4iRuHZfYGV45tUvUxtP5apRPWGjmXj2IyN5OS3npmkg0AE/8E chlsr/AfX765YMO1Low9OOdGcw+T+ZqTN5yjtlgzbuyii5Z4JGBhvF+Z6X2ttEgAJ04QAe pW54VsJfN4s6wyyDgtk5ERfUHdC8bH8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240365; a=rsa-sha256; cv=none; b=YphLK7RtDM901kR4t/s+uLdHBLhcqsy54XUtVRyNGWmseTv/NzUo9CGIqPYaDOYYro7Edy S+9aVF+YODi6tsYZ/dUp5Zptywci9on4ldoiJLS/+IU2ykisx9NJ6IRWEE60yZzL25PWst QrdyQ7GkOSLRJZZanC3+gSaTQq4vRHQ= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=none (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4R1q3R2njtz4f3pBs for ; Thu, 13 Jul 2023 17:25:55 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S6; Thu, 13 Jul 2023 17:25:56 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 4/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_clear Date: Fri, 14 Jul 2023 01:26:32 +0800 Message-Id: <20230713172636.1705415-5-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S6 X-Coremail-Antispam: 1UD129KBjvJXoWxJFWfXw45GrWDtr4rur18Grg_yoW7Jw4xpF n8XasYqrW5W34Ygrya9Fs0yryxtrs8GayIqryUGanYvw13Kry0qF1DJrnrAas5Gay8J3yf GFWYgrnrGr4IgrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUmGb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M2 8IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAv FVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3w A2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE 3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr2 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjI I2zVCS5cI20VAGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCI bckI1I0E14v26r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_Jr I_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v2 6r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj4 0_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8 JrUvcSsGvfC2KfnxnUUI43ZEXa7sRNv31UUUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 5D378100018 X-Rspam-User: X-Stat-Signature: whzbam5rmy8n84aob84hyubun38688ba X-Rspamd-Server: rspam03 X-HE-Tag: 1689240362-728541 X-HE-Meta: U2FsdGVkX18nPkxFJdBY3vvX2TY0DrPOOiN6ReAF9l33qhwVFLsIJlxEgPKFzTW4/7HIodxWZjxyivkPWTtoA3+GK+ZTHIVEdAG+9y2ho4v71IxmAkvYcRwBeMmBP1whWnsu3fyDVmMEKcLhkl02N6o7YbNUQN57Mk4za50N1rU4YFh2+npdGUyD5TX32LDWIAdUxc8vsDxkmYLmEM8JZc+JKyK79GprXiad+Oy3VOL/T5Bvm+XmlrKN1cb66LxJC8MR12GdFU3BJNpS4/mJSfG2ZRr7zLsCeLGJ28pTjXLRqmUbXwCtV62gAQl46hwQ4Gyo/O/9tDrSaB7hTAkzynvS8+i7L949fS+eYolkHdOdTPmoCDJHqzjotvGnOeruPv1og+nTlGvZOMI+URCz4ipqCrPU3Mqmxh4nM6P6vSpDumq7ofJV4/9VUkSBlY3pXcJXbSphX4OArhXF2EYD4h3c4gnfHujzi4Gj7GrHyi7NEfrZWU4lv6bj9A7ksgIOULyv7WHWMLzjGiJ1LT7DI5rGcNXXvl0Azb03tA8Wge3mbIPFMc+1f8VmFugPkjD04VmFxuvgDpRdP75DVBiCp79L+HykUTd7SnEX6W8HdVWX/8OBKOn/psEHBGZsZ4asgBLRSmZ/Fe02pKjhv35YfLaEm6RDTDgykMLzDM8LNK9op5rO7RhuaGaiZj9O6qVT1yfy1qUeNjHPVukMDTvyJD8drTJA8TyxvLWmRWS5kmVLqATNfNMTU5Qn3Qb9AuWy8OtezLWrS8E2PoERfupedFx86FTnyeEZMNMCdU5Z7eB56Vs/aE9vixovWjn1RhjLNqu4n5ppM+wSQNyKA6wXNdDcqJ1ufW6wOPqv474xj5ApgAkW7S3YL7fZLEeifKZSSuh/R3dD1hq0Nm+P9LdVexaHv2KGPYoM/pDdy/turwLn9erA43WJNb5fnR0XvE2y5SZ5QkWzV7fYQlvKrng cA3zD+qP mXR7ANSNc5iwlYmrj//AcgWFzf/O6xSyFBg/8YwX1oy+BeNAqoaWoZNvhYGh2kYJolWZRkBTS32TCxKqKJBqpvpONa97ZPH0YqiC4TFUMNAQ8FUuKnmmnPjuVigAttK7xD4AgCDSuOXtzB4XGeP0Xg/+ps9Ixhb5oe+KJAPYRCcEvW3VyxaSv0fMZvXOhefd/Dsy5swmFrO3Fjc5a/gJUoKqKRsGE8ZyhGgtqtzdnxN3yCFK5CATrO9qL3cD3IMFIQGB4uh9sGrQ8sY0= 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: Remove unused addr in page_table_check_pmd_clear and __page_table_check_pmd_clear. Signed-off-by: Kemeng Shi --- arch/arm64/include/asm/pgtable.h | 2 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/x86/include/asm/pgtable.h | 2 +- include/linux/page_table_check.h | 11 ++++------- include/linux/pgtable.h | 2 +- mm/page_table_check.c | 5 ++--- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index f7ea51f9c1c1..6e3387ec6013 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -940,7 +940,7 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, { pmd_t pmd = __pmd(xchg_relaxed(&pmd_val(*pmdp), 0)); - page_table_check_pmd_clear(mm, address, pmd); + page_table_check_pmd_clear(mm, pmd); return pmd; } diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 5e07312cd3e1..388c3af8a9f9 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -742,7 +742,7 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, { pmd_t pmd = __pmd(atomic_long_xchg((atomic_long_t *)pmdp, 0)); - page_table_check_pmd_clear(mm, address, pmd); + page_table_check_pmd_clear(mm, pmd); return pmd; } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 5085e838b860..5d71f933d933 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1133,7 +1133,7 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, unsigned long { pmd_t pmd = native_pmdp_get_and_clear(pmdp); - page_table_check_pmd_clear(mm, addr, pmd); + page_table_check_pmd_clear(mm, pmd); return pmd; } diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index 35c53c4b94d3..0f777bca5283 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -15,8 +15,7 @@ extern struct page_ext_operations page_table_check_ops; void __page_table_check_zero(struct page *page, unsigned int order); void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte); -void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr, - pmd_t pmd); +void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr, pud_t pud); void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, @@ -53,13 +52,12 @@ static inline void page_table_check_pte_clear(struct mm_struct *mm, pte_t pte) __page_table_check_pte_clear(mm, pte); } -static inline void page_table_check_pmd_clear(struct mm_struct *mm, - unsigned long addr, pmd_t pmd) +static inline void page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pmd_clear(mm, addr, pmd); + __page_table_check_pmd_clear(mm, pmd); } static inline void page_table_check_pud_clear(struct mm_struct *mm, @@ -125,8 +123,7 @@ static inline void page_table_check_pte_clear(struct mm_struct *mm, pte_t pte) { } -static inline void page_table_check_pmd_clear(struct mm_struct *mm, - unsigned long addr, pmd_t pmd) +static inline void page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) { } diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index a1ccb13c4853..3edef5ed008f 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -425,7 +425,7 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, pmd_t pmd = *pmdp; pmd_clear(pmdp); - page_table_check_pmd_clear(mm, address, pmd); + page_table_check_pmd_clear(mm, pmd); return pmd; } diff --git a/mm/page_table_check.c b/mm/page_table_check.c index a1015fc4d045..51f2274c0a20 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -160,8 +160,7 @@ void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte) } EXPORT_SYMBOL(__page_table_check_pte_clear); -void __page_table_check_pmd_clear(struct mm_struct *mm, unsigned long addr, - pmd_t pmd) +void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) { if (&init_mm == mm) return; @@ -204,7 +203,7 @@ void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, if (&init_mm == mm) return; - __page_table_check_pmd_clear(mm, addr, *pmdp); + __page_table_check_pmd_clear(mm, *pmdp); if (pmd_user_accessible_page(pmd)) { page_table_check_set(pmd_pfn(pmd), PMD_SIZE >> PAGE_SHIFT, pmd_write(pmd)); From patchwork Thu Jul 13 17:26:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311647 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 94529C001B0 for ; Thu, 13 Jul 2023 09:26:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B0598D0005; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3CF0E8D0009; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22F838D0005; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) 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 09C4F8D0006 for ; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id CF15C40175 for ; Thu, 13 Jul 2023 09:26:04 +0000 (UTC) X-FDA: 81006057048.19.DB93A1E Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf23.hostedemail.com (Postfix) with ESMTP id 481E4140005 for ; Thu, 13 Jul 2023 09:26:01 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=none (imf23.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240363; 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:in-reply-to:references:references; bh=QuRnBiL/kYCD8OHEQekQQ0rYJaMort8NuxTpqbOiQuY=; b=TjCSZABDCpgTFGrtgntFwoMHaHcK37Qj15gxqLxNWX/bP2hGm+XVgTeAQgBXQZIaeXvpfD oxIWX1Aaf6RWZj3WI2tE3P4GmR3gVeUsembqYec9w+Mt3tCZsCcnG9iEoKxQeiaYU90HxN Pi/FYjH+NimubnfpaVq+2q3TYJpTglw= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=none; spf=none (imf23.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240363; a=rsa-sha256; cv=none; b=lpmQMo/Omj6OPTM7XREEsAioON+/8fiQwPNEZOcBR2fKD9d5RfS1g8Re161RVmR4tQrrYc +QFnlpUZlRKY7AboZZ2dzmGQe+jUYBkWjMnBlA4iEtqryESUcVRt29eoixGPghECr1rjwE BDXnZh7wIaDgJ0TtfptgFpzNE28LhW4= Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4R1q3R4whbz4f3pr6 for ; Thu, 13 Jul 2023 17:25:55 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S7; Thu, 13 Jul 2023 17:25:56 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 5/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pud_clear Date: Fri, 14 Jul 2023 01:26:33 +0800 Message-Id: <20230713172636.1705415-6-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S7 X-Coremail-Antispam: 1UD129KBjvJXoWxXrW5Jw45WF17XrWfWrW5Awb_yoWrXFy5pF 15X34vqr45W34Y9r1j9Fs0yryIqrs8GayxWry5Ga1Fvw13Kry0qF1DJr9rZas5Gry8Aw1f GFWYqrnrGr4IgrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUm214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AK xVWUXVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVF xhVjvjDU0xZFpf9x0pRvJPtUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 481E4140005 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: o5sm4bgfm9s1d8317zh53xbdxi3kth4q X-HE-Tag: 1689240361-296210 X-HE-Meta: U2FsdGVkX18eKlc7XWp5M9ZkCB/RymXVQvjB/Mz6tzssa5C/UYZEEdOplmolYMrf21KtA1OeIpObjvNieItQZ96W13r5zCoGH2S96h0Z2dWfoNFMNKAXkcdVyTq0p2GezqA+5K74cQmBjFKUKOh5sgxxLx44SX8O8WeeUgaYUti5Uu1Gk87s63OI2O5gNfEz2nPt9PKkmmFOpErFNBc2f47/n79MgCiRV0/NjzNqsHRiWV45xNHHQnjSKDtXqH55M9pCuhANbEHijQJWWvsrxV0RciTgAYKJT13xNPy3WlJk4RNNzaPKGe8N03oO4hCzxYz4Ev12ronKJzZ8y8qCQOawZGlp5305Or7S/LYLszwsj00+/G+qLibPyseHOB0lYeCG7AltE/dwN6grQ7r4CSlK/hnJakn42tRGfVbdfH7ESAOKkdMrobhL8yRyLi5zJGNIdhHKPRsqm0hG2t2udHYPhBpZpBEzRDMAV4julyJmRG1IZcPXs/u71MD2nZgf1dRyUFCot8Bq7e1KGo6UHeH+oEN4x6EbjcsD8l6mXJioM1O5aligLYnipW10jPxjuFePZILlFCZT1VfS6pG1RWnDSecdKnd8cbdv9xV1sDsoPtvayhcsaqc2bJJKIO9MtU9gO1lxRq0v6372N8yYcM15JroraXh46L4LDJsST+Ml/Q1RiuVrkt6m4qOaqOQx4n6DbZeCP2jY1dZU8WGK6FKcUVP70W8Rkl5/GPi0+zwmip8plSGOzYmw+rJ8AQEss7TUAfOljLhNGKhhByK7X+ghllEmlR221K3/W0AtLh7cBavzysXgSSyYB8zn2jb6rVFqNW3yclboKbBUfX4Tagt5STVisodPoojKQj1hy6lf2+7rRgcDjPzB32Qin9bOuI+uHY/TdJnyC7zvNIkW3N46YDNyeXMkoZl/lNsEy+aXG7X904k44HvhYUcJKkblUNPOHGE0FxRKJfaMBJt bPq0lIT1 E9Pflzfw/8m0c6C+MEoSPzyab58nld10RYVmSkH1cVE92gXccNRcYDYhsF7f1qBH7Ev/EWOUrgcIJhXi37hgcfETZHdbvVTCcbhjOl/Fqw749pRHDpkp76XjWRIeBkvr5X0+lwVkT3whYbGYjWZlFHU5qoW6Wfo5PBpRk/0aspmlqJb4rDW7Nsv52oDSwSkSWf6kjUC8nWwSHHfTgMpz3QjsxHQ8RYRAaYOQGYhkAJe6x3zIwMrHpnn60GxyfFyjXx7KNSCoqB8vJ96A/Y36gf3WQ6KKCtIex7YAxJxL5f3WQnwTty+8R4xzOVw6e+EA8yxK4 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: Remove unused addr in __page_table_check_pud_clear and page_table_check_pud_clear. Signed-off-by: Kemeng Shi --- arch/x86/include/asm/pgtable.h | 2 +- include/linux/page_table_check.h | 11 ++++------- include/linux/pgtable.h | 2 +- mm/page_table_check.c | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 5d71f933d933..f07c610c3458 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1144,7 +1144,7 @@ static inline pud_t pudp_huge_get_and_clear(struct mm_struct *mm, { pud_t pud = native_pudp_get_and_clear(pudp); - page_table_check_pud_clear(mm, addr, pud); + page_table_check_pud_clear(mm, pud); return pud; } diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index 0f777bca5283..5c9dc848a1bc 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -16,8 +16,7 @@ extern struct page_ext_operations page_table_check_ops; void __page_table_check_zero(struct page *page, unsigned int order); void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte); void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); -void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr, - pud_t pud); +void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud); void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte); void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, @@ -60,13 +59,12 @@ static inline void page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) __page_table_check_pmd_clear(mm, pmd); } -static inline void page_table_check_pud_clear(struct mm_struct *mm, - unsigned long addr, pud_t pud) +static inline void page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pud_clear(mm, addr, pud); + __page_table_check_pud_clear(mm, pud); } static inline void page_table_check_pte_set(struct mm_struct *mm, @@ -127,8 +125,7 @@ static inline void page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) { } -static inline void page_table_check_pud_clear(struct mm_struct *mm, - unsigned long addr, pud_t pud) +static inline void page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) { } diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 3edef5ed008f..5f36c055794b 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -438,7 +438,7 @@ static inline pud_t pudp_huge_get_and_clear(struct mm_struct *mm, pud_t pud = *pudp; pud_clear(pudp); - page_table_check_pud_clear(mm, address, pud); + page_table_check_pud_clear(mm, pud); return pud; } diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 51f2274c0a20..2643135bf45c 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -171,8 +171,7 @@ void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd) } EXPORT_SYMBOL(__page_table_check_pmd_clear); -void __page_table_check_pud_clear(struct mm_struct *mm, unsigned long addr, - pud_t pud) +void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) { if (&init_mm == mm) return; @@ -217,7 +216,7 @@ void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, if (&init_mm == mm) return; - __page_table_check_pud_clear(mm, addr, *pudp); + __page_table_check_pud_clear(mm, *pudp); if (pud_user_accessible_page(pud)) { page_table_check_set(pud_pfn(pud), PUD_SIZE >> PAGE_SHIFT, pud_write(pud)); From patchwork Thu Jul 13 17:26:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311646 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 B928AC001DC for ; Thu, 13 Jul 2023 09:26:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 35E048D0007; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BF938D0006; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 09C6A8D0007; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) 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 E85C18D0005 for ; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C6E81AFF0D for ; Thu, 13 Jul 2023 09:26:04 +0000 (UTC) X-FDA: 81006057048.19.E4C5749 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf18.hostedemail.com (Postfix) with ESMTP id BCA1B1C000F for ; Thu, 13 Jul 2023 09:26:01 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=none (imf18.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240363; a=rsa-sha256; cv=none; b=7mdpIHzSyDkhSKyJZwGqpLtI9A+EejNS6GsiZTSJaNtHjTxrkbUxlbHB0p447RyvQvLISQ VSaSBAFoy0GzY0hNqcRkULQcacy007vo5ZKYrytrlOsTAM1M9sW+SZg9K5TaQfJ/by2jyn BXgKZzmt8o3abB7+dx0FVIlGCYRJaIk= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=none (imf18.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240363; 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:in-reply-to:references:references; bh=v0AMiqKWlfUNL1FDQGobXi+jVe/zewxzXTBRkWdIAJE=; b=Z0rxd6nUDZbMRHCoWwhmgkTQVGpjA+KgPRXrtBcQNOS9bTw7U5H9qY2QUb3BPBGqdg33Sv Hkyv+W/c0E2s/Jw2KVdugWDAB4iTqj8kfjptE6pQdbNUe0l2qCa24szYlfkGKhpQxWdN/p fy8waiIS81ivdmTJNdmFoEXs6WSZhrE= Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R1q3Q1cZYz4f3lKk for ; Thu, 13 Jul 2023 17:25:54 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S8; Thu, 13 Jul 2023 17:25:56 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 6/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pte_set Date: Fri, 14 Jul 2023 01:26:34 +0800 Message-Id: <20230713172636.1705415-7-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S8 X-Coremail-Antispam: 1UD129KBjvJXoWxCFyrWr4Uuw17JFWrXF17GFg_yoWrur4DpF n8C3saqrW5W34Yqr10krs0vryxtrs8WFWxtryxGanYvw15Kw18XFyDJrZxAayrGa4kuasx GFWFgrnrJr42qr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUm214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AK xVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVF xhVjvjDU0xZFpf9x0pRvJPtUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: BCA1B1C000F X-Stat-Signature: 116kiu7nuunpoaf1b7et8g18x6z1dr33 X-HE-Tag: 1689240361-232847 X-HE-Meta: U2FsdGVkX1+3URCY1/SggwaAg0ewQyGYgclh25ipTOPtCKv/aotSQvpSPYDmBfIvSt9pTHuDIBHJgQjRmrRaG0pvKuJwkw1Z9dpf4qoNGmYCI9eutf7tkflLETIlMp2ipBLKlTtPnpitlk4ExSHptWMWu2ZAbel9FCrO/aT9kYvGp/97KjEDvQH75mrAYqD3BMhVRLu1wdP3G9r1/MuEtv7QVx19T5l1HRyGIPymn9If5Dr6ZzmAW+dhskmyFRxeiaSPTCUCV7bNQ+rWBSf3kYQa9Z1/k8AONjM8EkvFEyKMeIA3q3z5cIgcH3m/y7hQT1DKG5xf1XYXJyEurNr3CKzGhg/RErZQK34bBFdxo9s7F+95oYLWZqJA70QlnzlfmVQZ117GAY7+BHMGLX/6Fi/7PEspK8mzcAXMO16zzchpjZ+PNJ8nXTc9Sr2+ZOV11sZzakM4bfOOVDXrJy+bHD502woFYNd7/mA74PWHHWcB+OlYk3cvvPWtL64lsmXtuvtmLU3tva7ld9nqfsyU2MBSVwNj/xow+TKZyBBpdIEECg8FWeagOSGIZryvQ/MskNXDq5xRTNAGHppkLwSo+vB/8e8Nkz0urP+lVhMfCIh4AuzDffYlo0mLuiPWG+4/Mrax5MjDYJTkzz8gPII7RAi+iTQH+Jg/3+zmvkG7f8/RhsJjv+/8ghW8ouRpEy3+dmlvZO/F6s2zkRLpzAPJqfgulqEl6O0Xw8/iTRml01tQ/KfMrumnQYTstCK04GyzWcnE6U3wsb6byAp3AnrV9igdUaa0C92ynAaobAxEIh4VYQA9wmddaOJkEaUaRMs9OkDdYXyDsR3kUM//HF/uR4ZYw1wiLo9IRv9AVOEX+CrFetnMnGARMnU4cWh67Kv/LIwi0IIZpSnctOkA8hOzZjSGz7wRNsHmJXBO2YHuQ9bZJtikGMVgYR4fn1u4TsdY0a13B2BDTmSgynIKJKe V/56aiQa qMoIAvoePx/cmYHiygrSDZlxqWG8vtBiWW/EI69cYmNe+pAu+4Xi8xc8BgB4HfXR9pfV+qA5bC+Gai2sXtHJQ/zu3tdsVGN0hYgvB4FS5BtPATXwST98S+2GIHRm+WB6GrU1EkJUJ68PVxowcvHk+3rJvdzuhwfRU90wfA0EgCPqUvXluBdbTTZI50HYzu1i8lSZuQyDX1Nt6voDe7Y5ORD72mS09pMEpWwBhTTOZl4GdcpGpNy1sBzgOuoNIkTT77z0tDhIAYU03eZbjPcQnUOxaLHFG8SK0bYXpPCkx0y2HIuOmlQaXcD3qgm09nhM5/1S+ 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: Remove unused addr in __page_table_check_pte_set and page_table_check_pte_set. Signed-off-by: Kemeng Shi --- arch/arm64/include/asm/pgtable.h | 2 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/x86/include/asm/pgtable.h | 2 +- include/linux/page_table_check.h | 11 ++++------- mm/page_table_check.c | 3 +-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 6e3387ec6013..f0a8dcbca04a 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -348,7 +348,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { - page_table_check_pte_set(mm, addr, ptep, pte); + page_table_check_pte_set(mm, ptep, pte); return __set_pte_at(mm, addr, ptep, pte); } diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 388c3af8a9f9..90063afe8d36 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -499,7 +499,7 @@ static inline void __set_pte_at(struct mm_struct *mm, static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) { - page_table_check_pte_set(mm, addr, ptep, pteval); + page_table_check_pte_set(mm, ptep, pteval); __set_pte_at(mm, addr, ptep, pteval); } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index f07c610c3458..d14f0d92f04b 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1023,7 +1023,7 @@ static inline pud_t native_local_pudp_get_and_clear(pud_t *pudp) static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { - page_table_check_pte_set(mm, addr, ptep, pte); + page_table_check_pte_set(mm, ptep, pte); set_pte(ptep, pte); } diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index 5c9dc848a1bc..63ebd9fcf28b 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -17,8 +17,7 @@ void __page_table_check_zero(struct page *page, unsigned int order); void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte); void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud); -void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pte); +void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte); void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd); void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, @@ -67,14 +66,13 @@ static inline void page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) __page_table_check_pud_clear(mm, pud); } -static inline void page_table_check_pte_set(struct mm_struct *mm, - unsigned long addr, pte_t *ptep, +static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pte_set(mm, addr, ptep, pte); + __page_table_check_pte_set(mm, ptep, pte); } static inline void page_table_check_pmd_set(struct mm_struct *mm, @@ -129,8 +127,7 @@ static inline void page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) { } -static inline void page_table_check_pte_set(struct mm_struct *mm, - unsigned long addr, pte_t *ptep, +static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) { } diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 2643135bf45c..fc20ddc3a63e 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -182,8 +182,7 @@ void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) } EXPORT_SYMBOL(__page_table_check_pud_clear); -void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pte) +void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) { if (&init_mm == mm) return; From patchwork Thu Jul 13 17:26:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311648 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 598A4EB64DD for ; Thu, 13 Jul 2023 09:26:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AFE978D0009; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C6498D0006; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74E068D000A; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 368518D0008 for ; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F3010140168 for ; Thu, 13 Jul 2023 09:26:04 +0000 (UTC) X-FDA: 81006057048.14.F718025 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf27.hostedemail.com (Postfix) with ESMTP id 76C1840004 for ; Thu, 13 Jul 2023 09:26:01 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; spf=none (imf27.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240363; 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:in-reply-to:references:references; bh=MqZRHafPCEkUNTVRqtf54NZEiRYiYt4Df+IOIxcA8oU=; b=UxLLmrZDXUnnHEQUq+jT4OFdFTI4ByW22TrP3g1uC4IWoQ1uKyQnpinX2VHEYLXY7c+7KC rQ80PsrjH0ikPwjPlVo8rWoqnSxSIoKB+UYm8ktgc5m27AANzNlX4xT/bSLj8UyRdqQe20 3Tone/UaeG/fH5qyKbv2vZdZuMiI6p8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240363; a=rsa-sha256; cv=none; b=K8WzIU3lNSguw8Af2x1JXHmlscKA/sME2l5p36J7JFxvJdaqYE5SQ+e6l6BFFnRUfksQvL G0XWJDtsRPu8e2Pd8gyUqVJHTYimFKFdoFuV3O2xdcFzdTahHKOGp3yKiLIObKQbQ7Xoco FQxrzL6nv+vARhvtIsI1r7ZpdY5jK3Y= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=none (imf27.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R1q3Q3Rv2z4f3lY2 for ; Thu, 13 Jul 2023 17:25:54 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S9; Thu, 13 Jul 2023 17:25:56 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 7/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_set Date: Fri, 14 Jul 2023 01:26:35 +0800 Message-Id: <20230713172636.1705415-8-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S9 X-Coremail-Antispam: 1UD129KBjvJXoW3Ww13XFW7JFW7AF4kJF1rtFb_yoW7ur1xpF s8t3ZYqr45W34Yq3yrArsYvryftFs8GFWftry3GanYv3W5Kr48XFyDJ39xZa95Ga48u393 GFWYqF9xGw12grUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUm214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AK xVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVF xhVjvjDU0xZFpf9x0pRvJPtUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Stat-Signature: ksszu54urczoqxsx6azbi6fzy994h39y X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 76C1840004 X-Rspam-User: X-HE-Tag: 1689240361-441329 X-HE-Meta: U2FsdGVkX191ZCO/hofqH2GtsmP3E4fv9MCZdmcB3UQTq1JoPszMgODqC5wB9eZQzelIDTxhvJy7ndJkJWmaA8dmXqf0eRaDIjeQeZuUATmsqPmVDSf+Wfa5csCrM1Xnjz2rKPw07td3VhoXPxnbo5L7F2TLYP9Ff7S+UuzKzd9Q1a/n/ksGmIlMljjFp6mAgJmcY2IjOKmX24uih8JfRQmskX6szpm4EupKmSJI37/1XX+rfBC5MHq0wDOHeYcbGeXkbKQ3ig2TRBkB64OKTXXce1wjtSBHKsbfq9jQMVW8DiziM+s2ZzvjxtHlxb4Ym2jHW65BJJ5cmjAyn885vXoU7zrtv86mkJGiYTFiJIGB05N6yXlxPY+iSHZBr2ninN9hMFglaNCwVy3/2r+w0d03Lx+GJf16TWfDw7SVdf2fnyflxv3VoIwT0g/U/hJLsdG0EaG6zym63oqOa+Sl1dbt8SAxc0z2lG0m/ff9uOwS+ND1c/2tA/miJ3WDxNpyEGncOd9vZ8L+AfqpBD8AYg6Rnb+p8IOm3VQzFOPUw4ocXnSAA59ZETpFgRqy9PC7Izsmjg27LKvChjqNONra5gTbodHgAjg++x50Ldr5nmS0up3Ipojkrw7+Dsxn/+lMFUFO7hRtH628cf/cACNAwlXFm+dbFvokVnCapnQJxcJ4ibo3+CliWfm2RwILa+LLI5hA/QctbBjxbxfwReIhxlB2JGoaTkY0w+JeEEzbRyTORdKZuKE8ToXQWfU+EQk8RWpF28Od2bmLsEmVVmC20FHUmr/BoyQ/iHHiMjUkDQzj9+Ye4TTWBlXWWNETezqdHfnggQcAMk1FrojU/1mKZj7akFarnfAmrOH3BnK51cXaGaj2kvlMOmDWH2yk7zqBRLFt13L0XJ4eKHxxjqwuZMODkd6nGc9wxWANPtcgj/4o4sax7yU+3sVI6x1hoJgh2bzQOtORNsdwgg/8wiX 5Y0pDve5 9DCif5ozkN5dAnM1/woV+lGwuHsodffYuN/4gX2ptHcDbQPw84VpS4oOAhfsdv4fS0Sp1OJQKWP6IXVYjsQz1gvALl32lIrmF61gdfoV39DzIEAerzqx+fSI65/xCC5N0D7r2hyFct9cDhLLatZLTbiltJzdLRCajb37NLoI2S57RVKQ+SfTqgYUXzeLK+ZbXlOwqrbQl2NR3dsIIeB1rJgOObklVGbCSiAs+/E+bo1Izf1UrCULxxdMMlcv5Q7nhllAeRr5XpXHPtAyqjLDh05WMKzw4l/7RlaqlGk8DW13kd2e0G3SzPdWIlcnDeM2jdatw 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: Remove unused addr in __page_table_check_pmd_set and page_table_check_pmd_set. Signed-off-by: Kemeng Shi --- arch/arm64/include/asm/pgtable.h | 4 ++-- arch/riscv/include/asm/pgtable.h | 4 ++-- arch/x86/include/asm/pgtable.h | 4 ++-- include/linux/page_table_check.h | 11 ++++------- mm/page_table_check.c | 3 +-- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index f0a8dcbca04a..1fbf8d3f42b1 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -524,7 +524,7 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd) static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(mm, addr, pmdp, pmd); + page_table_check_pmd_set(mm, pmdp, pmd); return __set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)); } @@ -976,7 +976,7 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, static inline pmd_t pmdp_establish(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(vma->vm_mm, address, pmdp, pmd); + page_table_check_pmd_set(vma->vm_mm, pmdp, pmd); return __pmd(xchg_relaxed(&pmd_val(*pmdp), pmd_val(pmd))); } #endif diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 90063afe8d36..a30658b2611b 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -687,7 +687,7 @@ static inline pmd_t pmd_mkdirty(pmd_t pmd) static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(mm, addr, pmdp, pmd); + page_table_check_pmd_set(mm, pmdp, pmd); return __set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)); } @@ -758,7 +758,7 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, static inline pmd_t pmdp_establish(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(vma->vm_mm, address, pmdp, pmd); + page_table_check_pmd_set(vma->vm_mm, pmdp, pmd); return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd))); } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index d14f0d92f04b..9cc26cb0bc9f 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1030,7 +1030,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(mm, addr, pmdp, pmd); + page_table_check_pmd_set(mm, pmdp, pmd); set_pmd(pmdp, pmd); } @@ -1167,7 +1167,7 @@ static inline int pud_write(pud_t pud) static inline pmd_t pmdp_establish(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(vma->vm_mm, address, pmdp, pmd); + page_table_check_pmd_set(vma->vm_mm, pmdp, pmd); if (IS_ENABLED(CONFIG_SMP)) { return xchg(pmdp, pmd); } else { diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index 63ebd9fcf28b..dd58dfb0e643 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -18,8 +18,7 @@ void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte); void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud); void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte); -void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, - pmd_t *pmdp, pmd_t pmd); +void __page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd); void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, pud_t *pudp, pud_t pud); void __page_table_check_pte_clear_range(struct mm_struct *mm, @@ -75,14 +74,13 @@ static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, __page_table_check_pte_set(mm, ptep, pte); } -static inline void page_table_check_pmd_set(struct mm_struct *mm, - unsigned long addr, pmd_t *pmdp, +static inline void page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pmd_set(mm, addr, pmdp, pmd); + __page_table_check_pmd_set(mm, pmdp, pmd); } static inline void page_table_check_pud_set(struct mm_struct *mm, @@ -132,8 +130,7 @@ static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, { } -static inline void page_table_check_pmd_set(struct mm_struct *mm, - unsigned long addr, pmd_t *pmdp, +static inline void page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) { } diff --git a/mm/page_table_check.c b/mm/page_table_check.c index fc20ddc3a63e..033956704a64 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -195,8 +195,7 @@ void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) } EXPORT_SYMBOL(__page_table_check_pte_set); -void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, - pmd_t *pmdp, pmd_t pmd) +void __page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) { if (&init_mm == mm) return; From patchwork Thu Jul 13 17:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311651 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 D1264C001B0 for ; Thu, 13 Jul 2023 09:26:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E7D78D0008; Thu, 13 Jul 2023 05:26:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 271468D000A; Thu, 13 Jul 2023 05:26:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0EC668D0008; Thu, 13 Jul 2023 05:26:06 -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 D5E028D000A for ; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id AB07F140168 for ; Thu, 13 Jul 2023 09:26:05 +0000 (UTC) X-FDA: 81006057090.11.0A198A2 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by imf08.hostedemail.com (Postfix) with ESMTP id A5F8716000F for ; Thu, 13 Jul 2023 09:26:01 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; spf=none (imf08.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240363; 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:in-reply-to:references:references; bh=qjCVA5MDxvd3EeNJU3W/jmqQ/LWIpwAI10XwgSHHZWw=; b=NueqQIGPVFubFzg4X3O7bC+w91wMoSPSpss2uK0nV6l7YyZiyvOuNiUJdDXQ5umA+uQZ2k idZ32hvGUNjuOiVNLKALQSqtzsjML72bo2S/6jlbKxEbt1qV4o2jaRvBHBd0XDQzG0B/B2 OLexQq/p340j+tYj0dOTpZYkU4otG5M= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240363; a=rsa-sha256; cv=none; b=4TDe73fRE8HiVAp2hxcYvkddPZqHyzNe7sEXDn/PrOQOKwrKBIc9qocUBRo2O4gieKEnof bT61Ukj9x9k6wbCEhLng2m+KMSkq4Gtj8ztXQYGEaKKE9DIw2FbaiglJ4ac26hLRKlNNRj 0jjQpRaG/m3sUBkfNKAP0u/t6YDTdhE= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; spf=none (imf08.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4R1q3S2wtvz4f3q36 for ; Thu, 13 Jul 2023 17:25:56 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S10; Thu, 13 Jul 2023 17:25:57 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 8/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pud_set Date: Fri, 14 Jul 2023 01:26:36 +0800 Message-Id: <20230713172636.1705415-9-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S10 X-Coremail-Antispam: 1UD129KBjvJXoWxXFW3tFykCr4UGFy7Jry7Wrg_yoWrurWxpF s8A3Wvqr45W34Fvry2yrsYvryxtrs8GFWrWryfGanYv3W3Kry0qFyDJrZrAayrGa4xua9x GFWYgwn8GF42qrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUm214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AK xVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVF xhVjvjDU0xZFpf9x0pRvJPtUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Stat-Signature: qsoy5hn1zua9qcsbjc95hby861jkw469 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: A5F8716000F X-Rspam-User: X-HE-Tag: 1689240361-105970 X-HE-Meta: U2FsdGVkX1+kUn4jH5BKcn29jpBUZLb9ksbxTAM633/uQf5exdSldDzm1KjJ30VkXvk3PmKEkh8wemXi0GW6sBXMq+UEaO5MSU9/YaQif3I7rkwdn+5LFTyvFbcXhRdwOw8qQkbfaWM4r4WSmuEacMLsefTDdk+dmpDMk9j/3C6AyE6FncDXf6tw4JOfQLjb0RnKA7J9d9TuG5StQgG4NvUGM9lqgys5Bag7o27lnj99Xti8CyW6axS2vtE5OhRBB3KLeKske0uFH3r56orA190SlhdAnG54iOa/epDQ6FxrBj4Bn271P1pJLG+ErcijohdudkTJ2h6EoiqsRUiVFWGxbnn4QE8LvtO46WS6PXPrDrmBqpKLUJ2xGzU/b23DE8sHHLDqHbzVgeEHpwmnzZotSRXwUid0GZvcaa4/VJQvt8TzceD4BOPCyNppG1rS/KvdP+DioHQnFcPbzEnBX89/8v8FPMpuZpJKK03k4k3P/6XkuBgVN3iZKab7f1H6GfoLj1rJI539rLVDULno24L+Obr3UGLax+mKS2NOoRHtTTNtcXw8QGe6zfQzkzOUIzDtpH21mj97gCDQPUe0SZDrihZJeQlH45zedDsw06khixRV6F66LDyyqZqEPHZFP7NpcpiFx6nDSaXKelFLAsHXG38klTYIbszKi9qkktW83YaNfqJOSBtKafnRSn9BQdcKbdb+uMbZV0BavStfWy392lckCpJ+2RyKsvdbHB8EJ2xpGgSY/QvCSpNvE/CexCHJVF9T56RoR6TLmLK6rM3vziCt8NkzYvR7pRcRj6qaOar+MIOUTLFNJoIFMApLCRWnPlBcwW1BpljTtuQipKrxWRZL/tvaQg0jfOcuFJJh+5hZhebdS8C68q8hrDrKwK8iewvfZyZC/W8y1TkOjhhuaeToqzkdeddo6iD4GfPKWN09bHyTPZzBKwGW1tN1dC6vvUFFn/E+Kzcwbb7 eJCrdyz8 Yg52IQwpyuRfEqnhw/feYLgEi4n/+59Kg5TkNj23plWQlRpEQA/578j3QdEDdRqAWvLO2s5FIFokEsXkTn85IT5uxxLKe0qdutbAmZy7hfjbmEDy36UxjVCJtGw+MErx4V1hx8/0Hy4x5aqVRDkboIWbRIHpUzDhLTwlhrL1MRLmT3kJ1jn2WZKrzYNqJ1ahvlrgbEJTSh+ruBVOwwcBCmfc/6R8MgWDyKMytQUMze74v2XAIE2tHKOlef5NMVPCGWUTk/Q9lbzSz1pw= 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: Remove unused addr in __page_table_check_pud_set and page_table_check_pud_set. Signed-off-by: Kemeng Shi --- arch/arm64/include/asm/pgtable.h | 2 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/x86/include/asm/pgtable.h | 2 +- include/linux/page_table_check.h | 11 ++++------- mm/page_table_check.c | 3 +-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 1fbf8d3f42b1..fe4b913589ee 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -531,7 +531,7 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, static inline void set_pud_at(struct mm_struct *mm, unsigned long addr, pud_t *pudp, pud_t pud) { - page_table_check_pud_set(mm, addr, pudp, pud); + page_table_check_pud_set(mm, pudp, pud); return __set_pte_at(mm, addr, (pte_t *)pudp, pud_pte(pud)); } diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index a30658b2611b..44377f0d7c35 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -694,7 +694,7 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, static inline void set_pud_at(struct mm_struct *mm, unsigned long addr, pud_t *pudp, pud_t pud) { - page_table_check_pud_set(mm, addr, pudp, pud); + page_table_check_pud_set(mm, pudp, pud); return __set_pte_at(mm, addr, (pte_t *)pudp, pud_pte(pud)); } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 9cc26cb0bc9f..ada1bbf12961 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1037,7 +1037,7 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, static inline void set_pud_at(struct mm_struct *mm, unsigned long addr, pud_t *pudp, pud_t pud) { - page_table_check_pud_set(mm, addr, pudp, pud); + page_table_check_pud_set(mm, pudp, pud); native_set_pud(pudp, pud); } diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index dd58dfb0e643..7f6b9bf926c5 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -19,8 +19,7 @@ void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud); void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte); void __page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd); -void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, - pud_t *pudp, pud_t pud); +void __page_table_check_pud_set(struct mm_struct *mm, pud_t *pudp, pud_t pud); void __page_table_check_pte_clear_range(struct mm_struct *mm, unsigned long addr, pmd_t pmd); @@ -83,14 +82,13 @@ static inline void page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, __page_table_check_pmd_set(mm, pmdp, pmd); } -static inline void page_table_check_pud_set(struct mm_struct *mm, - unsigned long addr, pud_t *pudp, +static inline void page_table_check_pud_set(struct mm_struct *mm, pud_t *pudp, pud_t pud) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pud_set(mm, addr, pudp, pud); + __page_table_check_pud_set(mm, pudp, pud); } static inline void page_table_check_pte_clear_range(struct mm_struct *mm, @@ -135,8 +133,7 @@ static inline void page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, { } -static inline void page_table_check_pud_set(struct mm_struct *mm, - unsigned long addr, pud_t *pudp, +static inline void page_table_check_pud_set(struct mm_struct *mm, pud_t *pudp, pud_t pud) { } diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 033956704a64..84c8163984e5 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -208,8 +208,7 @@ void __page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) } EXPORT_SYMBOL(__page_table_check_pmd_set); -void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, - pud_t *pudp, pud_t pud) +void __page_table_check_pud_set(struct mm_struct *mm, pud_t *pudp, pud_t pud) { if (&init_mm == mm) return;