From patchwork Fri Mar 1 12:33:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 10835175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F37FD1390 for ; Fri, 1 Mar 2019 12:34:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3A8205F8 for ; Fri, 1 Mar 2019 12:34:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF224251F4; Fri, 1 Mar 2019 12:34:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 669F5205F8 for ; Fri, 1 Mar 2019 12:34:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 58ABA8E000A; Fri, 1 Mar 2019 07:33:48 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 49C758E0008; Fri, 1 Mar 2019 07:33:48 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2588F8E000B; Fri, 1 Mar 2019 07:33:48 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by kanga.kvack.org (Postfix) with ESMTP id B3CE98E0008 for ; Fri, 1 Mar 2019 07:33:47 -0500 (EST) Received: by mail-wm1-f70.google.com with SMTP id q24so5060554wmq.9 for ; Fri, 01 Mar 2019 04:33:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:message-id:in-reply-to:references :from:subject:to:cc:date; bh=FcoH0MWZdtOBuC7W/yk0A9+bmiNTMQTCcIimrSkyq24=; b=VM2dFMt3vyMrzahBl5aywl3+jqDAwztgkh8EsvKbnH4sQgBM9gzYB04OYZH285TxFM Jbj/t94hz3Y/Yfk6HIyKxLXmEgqC6GJC314DXDzozLjq6UQJV7sB54LOzMWn5EhZ/rmi VgzFLl8QVeFMjMLfKu3nPhtxDxE6lqrWSX+HXAPaaQ6NxsafJt31MOR+V1RWAeSvlMmB NU//z4aoPn/HjbThnT1FJ72JFMxZR2FjYqqLRMSrzVq6QkFBOxfndgD8jAJ70AmZucI9 9SEcWnBhUbKxV2cVIxC8hV6hhZ4gMgzLoNuagpvKyABtSgUIGe+LQ2VvQAZjZIvIKkj4 kq4Q== X-Gm-Message-State: AHQUAuZQY31DXAdWkLiIqsReChaxQp4UPgPCtrxh96omG0NPBVsgEJTS LZFz0cnaualxXwt2/fCYaC/CMuxTaqmGbmLhPS0gnszqpZawnHpowmpYIqRgtCl014DLzM/zQx1 VP/sr5demlpIBf3pKUJXftbXVAZCiF1jNxS+0M/9ZqcKYX+hdMqg9rYFJG8mCwpL5mg== X-Received: by 2002:a1c:44c3:: with SMTP id r186mr3109904wma.63.1551443627162; Fri, 01 Mar 2019 04:33:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxyHMd2oL3ls4UDwrP9EsIZX5pA/DDNOHqeeg0etScRLUGuB/xp+T5fSyfOEfZKBQCmGcvp X-Received: by 2002:a1c:44c3:: with SMTP id r186mr3109783wma.63.1551443624252; Fri, 01 Mar 2019 04:33:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551443624; cv=none; d=google.com; s=arc-20160816; b=d/fjMOnfIeXSi7qAuDqinOThbHpxoqYN4gmp9Xuf53bDeeFjGavgay1Ymn/fYXKSHY QnMPkDUFoMO8acZ8rGf/PRBpfUqjABEZ/QdjVXV/JSTd9oYQq9oFZZr1z0R5XcaPKw/t B8KiPji8w8jpVxiMozyUKsqfZJAyQn2AoI8IcMlgm2wpuLVIWlvX32GzPieccNK6mW/q 3GMIB6vfGL3/WRLZ4Eyt/It4X1CC1jV8pK06OBtogHu32pSrWvkfp85hZnC3dYzhOamK 8L5jfztHTF05sO5B4UHi8MKitZKbCmQFVV/tLpiZPClVr0pn6f7NkIpx+HVyicRql2Tc xAaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:cc:to:subject:from:references:in-reply-to:message-id :dkim-signature; bh=FcoH0MWZdtOBuC7W/yk0A9+bmiNTMQTCcIimrSkyq24=; b=b7QAIE4nukOcT9AMCYOMZhi1lyUfOn32+9OC/RBtDgf1gcsnqHtw4zzEPn/qsbPWjG Ib2OWtngvZ3615e+I7744pLT5Yj9eYR+1eMa0osMJeLIvSqmHYldOyQSQcPD+9dTNm/g HoHVXV+n2GJaniXbwYWEdn2csP3SokHoQbms16bE0fygJyhAiSTfzpdd3db6+vZC9Hfx 28reyBUo5JbX7pRgcZYFbX4W/xpDIKhcI723TFL8yoJJEUmG8Jt5iuiapUAdV6xl8EyE ker9AA00LwPEygbEL9qeuOOIq9nVoYLBxI9nKZ5fsawVDW73nbUKTQbc8kChsHCFwnqN xcOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=rybuktLB; spf=pass (google.com: domain of christophe.leroy@c-s.fr designates 93.17.236.30 as permitted sender) smtp.mailfrom=christophe.leroy@c-s.fr Received: from pegase1.c-s.fr (pegase1.c-s.fr. [93.17.236.30]) by mx.google.com with ESMTPS id q15si5119865wme.79.2019.03.01.04.33.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2019 04:33:44 -0800 (PST) Received-SPF: pass (google.com: domain of christophe.leroy@c-s.fr designates 93.17.236.30 as permitted sender) client-ip=93.17.236.30; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=rybuktLB; spf=pass (google.com: domain of christophe.leroy@c-s.fr designates 93.17.236.30 as permitted sender) smtp.mailfrom=christophe.leroy@c-s.fr Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 449pkG3qKmz9txrr; Fri, 1 Mar 2019 13:33:42 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=rybuktLB; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 7fh6xtct_1Ud; Fri, 1 Mar 2019 13:33:42 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 449pkG2lcbz9txrh; Fri, 1 Mar 2019 13:33:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1551443622; bh=FcoH0MWZdtOBuC7W/yk0A9+bmiNTMQTCcIimrSkyq24=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=rybuktLBqTBbP5JYSCuz5k6KxvrQheL8FM5pOdWxhSLBzmveOkS1mAgRCBi8LKncy UEH9iOedKdAZZOeqRlElTiI8SzAeztUUL1ZV5ANzdBw7+ZntaKX60Hsrk+OFy6IQ6S CXjw07kftkLCuuK8z4kDMVfzlE99g0cNGBla9/Cg= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9F9518BB73; Fri, 1 Mar 2019 13:33:43 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 7QyMtoFXDvp0; Fri, 1 Mar 2019 13:33:43 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 647948BB8B; Fri, 1 Mar 2019 13:33:43 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 3F9AD6F89E; Fri, 1 Mar 2019 12:33:43 +0000 (UTC) Message-Id: <9718764d2702d89df6de6e9607e5e53256f766c1.1551443453.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v9 05/11] powerpc/32: use memset() instead of memset_io() to zero BSS To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , Aneesh Kumar K.V , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Daniel Axtens Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com, linux-mm@kvack.org Date: Fri, 1 Mar 2019 12:33:43 +0000 (UTC) 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: X-Virus-Scanned: ClamAV using ClamSMTP Since commit 400c47d81ca38 ("powerpc32: memset: only use dcbz once cache is enabled"), memset() can be used before activation of the cache, so no need to use memset_io() for zeroing the BSS. Acked-by: Dmitry Vyukov Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/early_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/early_32.c b/arch/powerpc/kernel/early_32.c index cf3cdd81dc47..3482118ffe76 100644 --- a/arch/powerpc/kernel/early_32.c +++ b/arch/powerpc/kernel/early_32.c @@ -21,8 +21,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr) { unsigned long offset = reloc_offset(); - /* First zero the BSS -- use memset_io, some platforms don't have caches on yet */ - memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, __bss_stop - __bss_start); + /* First zero the BSS */ + memset(PTRRELOC(&__bss_start), 0, __bss_stop - __bss_start); /* * Identify the CPU type and fix up code sections