From patchwork Mon Apr 12 16:11:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 12198477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD375C433B4 for ; Mon, 12 Apr 2021 16:17:34 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 521D661241 for ; Mon, 12 Apr 2021 16:17:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 521D661241 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=mail.ustc.edu.cn Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wQfKYbM/OOP4pqg0DWpolTTTyVFj3uBJ3equjrVhkfs=; b=Gjb1S1dVeF1txrN+LaRnIPIXA 9me6FezCdPXs+vTBgkGR7SrzA+QepItB1L/XZ9atFBbEIr1xvvvL8i/biuAptqcUrQCuZCGDPI7hE sjHC1Rh7xCc7dUXrXi6kCuuAEK8u/6fZPbuqcgKjM2bIZssJX7A0q3JzAmB6ftKZaP0I5kIc3J6lv 0Vwvz3Pw2a+OiDQDvfx6RG/Az3HJmkuPROob4v/VTVCRn3mETUDzRH83yvgv8HN9kAXKsgeLmhHsy AQvOJ00zrtybFWybEeVOc/XfG4v8ReLE1XwqkPUtXQMZZRxSIZtVpFLvvYGi4EMiEvueYCfqnV5Ek 3Xj6x4iNw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVzFV-007Duj-HR; Mon, 12 Apr 2021 16:17:18 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVzFS-007DuB-10 for linux-riscv@desiato.infradead.org; Mon, 12 Apr 2021 16:17:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description; bh=HPUQ5hikiB/PpNEHlz4qMgRr8a4Ky8d+Pas5GCx2Zt4=; b=QiKGwNIkFg68TbtH/OIYLsnsd/ fJUjhYWoETQosIf+/geqSqacRAUuzvmutBqwNpXWyw1rLs5StGt8rWASvpBOt80KAiepUIR+Ux8MD HPjeGGxwZTw0RX2h6U6Uhr+HylsDR5wREQSOI+nNEkD2nfHgoVarjgzCorRrZUeOBnTsOac8N8hp4 m5OG9EV3bNDGb6ooBl8g3dACprtXeFPQXnF/Xz9OBH/OK/nwtskt702GMTFD9dDTEHR7Bkjc3ypkR CK+fePhe0NvmUFjVrMvBlOEirILUBYf+p0AIMQYVqNkxcoe0f1uIw2o/S1aASJQ86Co1xjuCD7lng c3bcaLDQ==; Received: from email6.ustc.edu.cn ([2001:da8:d800::8] helo=ustc.edu.cn) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVzFP-006NiU-7h for linux-riscv@lists.infradead.org; Mon, 12 Apr 2021 16:17:12 +0000 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: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VC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU81GQDUUUU U== X-CM-SenderInfo: xmv2xttqjtqzxdloh3xvwfhvlgxou0/ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_091711_741854_47B90AAC X-CRM114-Status: UNSURE ( 8.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 Reviewed-by: Anup Patel --- 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)