Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1904517pxb; Mon, 12 Apr 2021 09:18:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8oSu39blFxUPm0dEckXUwG6kPSOEJx1V0za/arCeOzscPe8I9bKrjH1jKjZhxXFyI3E/z X-Received: by 2002:aa7:c74c:: with SMTP id c12mr29709651eds.346.1618244334955; Mon, 12 Apr 2021 09:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618244334; cv=none; d=google.com; s=arc-20160816; b=bcWqE8ma/mfKZIpKzMP4vMZ6oGbDCMq0V5jzaSY3oq9TQlgk1g2MaY2+vi9uRQgKI6 JdPxM3FwWKJGqsKpyb+9Uf51q52OC2wJsmDgdSeXeKvmTGKrnOgYyUxtqQwcPTK7mAH2 QsR3XJ5lt+5dT5FQitjw/WVY1k+jaN1Z57S1LWIMDQUpOiL0JH58jsEOWVFrGp9f+jQS sMGxWyKeK1hspg/WPjzeMr/Noi6f6d0gzi0dxm07Rqb3gf6KJ6R148jus0D9Fi/4KNYM eI6I2mD9Rp/h4N1oMB/PaK5TMzaIC6enohq243spNWljUgMrVNqqp7Vc2CZSSW3L1ijp c3xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=HPUQ5hikiB/PpNEHlz4qMgRr8a4Ky8d+Pas5GCx2Zt4=; b=aG+CY17CpzHbMAuUahCZARB47zfuOlw/93oq3pKKow2uEFNc2cGtiLdfFk/PX+lM0v 3RG2cAIi6B8tz9LJdTQ6CmR69XbpWyJK2VOdFrY0FU4C8SdDPt3s2Fo22FfPgFvG+0kA 2r3BHes3aOyf+RD6HBEvJA4N8SQj62PYmZh71NUMM4CfEecSMzZ6uFvQMlXOTcySlNu4 ri58prH/0REm5W+LxT2OZWrcfO7Uu04yme9nLOWX+e4gEXLJ3tkegyjRDeP+ZbpOlE5q KP748fz7ZKQJXi2jG1XYiRNgC5i0XBjcSPfIbUCzeuaI4BtRAh6Knc26AJhDlN99cRW3 lgCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mail.ustc.edu.cn header.s=dkim header.b=mivupzkp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mail.ustc.edu.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si2683475ejo.365.2021.04.12.09.18.31; Mon, 12 Apr 2021 09:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mail.ustc.edu.cn header.s=dkim header.b=mivupzkp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mail.ustc.edu.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240489AbhDLQRd (ORCPT + 99 others); Mon, 12 Apr 2021 12:17:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237798AbhDLQRd (ORCPT ); Mon, 12 Apr 2021 12:17:33 -0400 Received: from ustc.edu.cn (email6.ustc.edu.cn [IPv6:2001:da8:d800::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CD937C061574 for ; Mon, 12 Apr 2021 09:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ustc.edu.cn; s=dkim; h=Received:Date:From:To:Cc:Subject: Message-ID:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=HPUQ5hikiB/PpNEHlz4qMgRr8a4Ky8d+Pa s5GCx2Zt4=; b=mivupzkpXptRxp9N1ifz0wtDutpyuLRAKVv6LYt8+CTJcct0O1 ffjGX+j1PUmbwuycphSBYkipj8AdG4+qGnYrfmCnFHsJ5TgevkPSQE+HU8uDpgAL +z1yVfr5AUnyS3oFHSxme+5oMr2VBzvg0VaEvL/UDjnx3pIctEpcMKnaU= Received: from xhacker (unknown [101.86.20.15]) by newmailweb.ustc.edu.cn (Coremail) with SMTP id LkAmygDn70t9cnRgbDjLAA--.59972S2; Tue, 13 Apr 2021 00:17:02 +0800 (CST) Date: Tue, 13 Apr 2021 00:11:59 +0800 From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , " =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?=" , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Luke Nelson , Xi Wang , Anup Patel Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 01/10] riscv: mm: Remove setup_zero_page() Message-ID: <20210413001159.341a95d6@xhacker> In-Reply-To: <20210413001110.7209bae6@xhacker> References: <20210413001110.7209bae6@xhacker> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CM-TRANSID: LkAmygDn70t9cnRgbDjLAA--.59972S2 X-Coremail-Antispam: 1UD129KBjvdXoW7GFyDCw48tF4fWF4rKrW5trb_yoWDGFb_Wr yvvr4fWFy5Wa18uanrXwsxJr1UAayvyF4DXr1Iy34ayr13Wan8A3s5KFW3Xw1kGr4SvFZ2 gFW3JFZxtr12kjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb48YjsxI4VWDJwAYFVCjjxCrM7AC8VAFwI0_Xr0_Wr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4 vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40E FcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr 0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JM4IIrI8v6xkF7I0E8cxan2IY 04v7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI 0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y 0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Gr0_Zr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1l IxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU81GQDUUUU U== X-CM-SenderInfo: xmv2xttqjtqzxdloh3xvwfhvlgxou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jisheng Zhang The empty_zero_page sits at .bss..page_aligned section, so will be cleared to zero during clearing bss, we don't need to clear it again. Signed-off-by: Jisheng Zhang --- arch/riscv/mm/init.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 7f5036fbee8c..dbeaa4144e4d 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -57,11 +57,6 @@ static void __init zone_sizes_init(void) free_area_init(max_zone_pfns); } -static void setup_zero_page(void) -{ - memset((void *)empty_zero_page, 0, PAGE_SIZE); -} - #if defined(CONFIG_MMU) && defined(CONFIG_DEBUG_VM) static inline void print_mlk(char *name, unsigned long b, unsigned long t) { @@ -589,7 +584,6 @@ void mark_rodata_ro(void) void __init paging_init(void) { setup_vm_final(); - setup_zero_page(); } void __init misc_mem_init(void) -- 2.31.0