From patchwork Mon Feb 25 13:48:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 10828601 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 A47EA1575 for ; Mon, 25 Feb 2019 13:48:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93C022B722 for ; Mon, 25 Feb 2019 13:48:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 871492B724; Mon, 25 Feb 2019 13:48:52 +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 2E8752B722 for ; Mon, 25 Feb 2019 13:48:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4A3038E0156; Mon, 25 Feb 2019 08:48:43 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 42B258E011F; Mon, 25 Feb 2019 08:48:43 -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 3407A8E0156; Mon, 25 Feb 2019 08:48:43 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by kanga.kvack.org (Postfix) with ESMTP id D1A638E011F for ; Mon, 25 Feb 2019 08:48:42 -0500 (EST) Received: by mail-wr1-f71.google.com with SMTP id s5so4757659wrp.17 for ; Mon, 25 Feb 2019 05:48:42 -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=x5Dwfe9pBn0jiYAytmPEco/+5u9wkUq+xY/xh4B++1o=; b=m/f5p6N/lFjEWzOdUgcaB9/2mrGydahbxMi0oeEEGqFBrmJ9O0B1ypIQsiu4uBwy41 FMEovepkO7X52Nl/qzQQWquxFw5Udn+9fkCqtcvjgs+0Ss6mDnq24KsQlrHLMUMkxoy1 srN8RUwlI/MKtvmO94+EsgdLZq19j2mpM/4tNDBO95FiW4nq4bgsBJse///e9hL1aWXf Oo33eAatOePXNQBn+wdaVBEkp/Ta48HDYOhj2lIzfQO1QwLFcYEter0HnLDkOhz6WW/f GUlsM0cFxf4rjC5v3JoAp5kOpmEj6Ca5by8D4o/tYTF0c3wdPuNmUuvf28dMEVAfU9BU Ucmw== X-Gm-Message-State: AHQUAuYCrQF2K/0j2v3JiEiTCj+KEby8gN6SBoOo8oV4Sks5ZPe31SQ4 cPe2XzLFIWDSzu9f7OWAm9RsBYaeq1ZNlRl0O6KiJO7BCyUbs6lFwVbY1Ja1YTa51TjF1/q/U5m 3PssJwgr33UrtrDtdA0QHdr7RaMTnUxDTI7jDRJIrx0Z2RL7XNFJ0g620mBOkahV0Iw== X-Received: by 2002:adf:c3c5:: with SMTP id d5mr12192470wrg.308.1551102522350; Mon, 25 Feb 2019 05:48:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IYXN2ri3Rf891Em7SWT6ECyNvgxa4cRkaLeA/5XdmRtkyXTW+SlgxXfnbprjRnTlCgDcdpY X-Received: by 2002:adf:c3c5:: with SMTP id d5mr12192432wrg.308.1551102521473; Mon, 25 Feb 2019 05:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551102521; cv=none; d=google.com; s=arc-20160816; b=K0pi1oBF8gPxDG/uBwAG1nGhGATZGhhfjUXL/qUaDxtCtdYweBX762waBxZq7WFiW+ Lt+LOeqPHOzEJ63or+5FdnQa26NSPzqkO8YZrWBsajzUztRI6NrRO3xo1diSm1N/Bgly D9bCN7z2RIVbjAdJhvt7gAbdbr53yiPPeSh+OrjjtZkWK+Co0KV72jJO+cq3Hzxun5Rt 1TpiLVaZFkZaagE+OzrzFRIJ5YIom7ORVvPfmFQJORqGTQJRyVNl8C3l8O6ECXexr6pm k/niKWRTWYDHcFcRGZECTdQjjedPsuarrOsIN78rJBSscmZ28Mt8WikHOn8/ws38EW87 nMxQ== 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=x5Dwfe9pBn0jiYAytmPEco/+5u9wkUq+xY/xh4B++1o=; b=HYK0zlb0DlH/IMXejusc9zXSRsl2EB2Lb+jeJiHX4r782OaKo9SYWGEli0JFPzJMIr XNdM6YlKl9veUMfdTDE0Fw9av7P43gX+1+SoyZeP7Bj/5mzYaqY4HuNe4leRJ4YqetWJ wYvUVw03LqZLe27Uph0JnS7rq6OSIB61ZUdHpxmKi4kZIjsg9dmsEEiPWfvM29PtmoOP ydb9OoK/YRVnzGZHAIDcn4blViplEADJAAshOfq25MiClwk6xMnZfpnQMFNgMkMd0rd4 3ELKTpB76wnAygQ6gFvBBphviGFQv8HzLRYKaLB6MmLuRrq6E6F+OFB+OisrRniTfiqn GwbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=InB4Rtmw; 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 f17si3261647wmh.24.2019.02.25.05.48.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 05:48:41 -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=InB4Rtmw; 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 447NZW6sbhzB09Zx; Mon, 25 Feb 2019 14:48:35 +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=InB4Rtmw; 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 KITX66fVEf2E; Mon, 25 Feb 2019 14:48:35 +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 447NZW5p8YzB09Zr; Mon, 25 Feb 2019 14:48:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1551102515; bh=x5Dwfe9pBn0jiYAytmPEco/+5u9wkUq+xY/xh4B++1o=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=InB4RtmwYoK6LQaYlrN8w0doKaOvX/dKEXYejh8RpF/WfWvvN1AmsYBpLQeY0du5P mHTbB12/X5l5xY+VNueAh7CFB1/SwNTNFtQdGnGXnLuESiXoeAUK33+mwiqOqM8RnU C0HCq8V7Zb6ojSSYHw8fSFHia6p5TXhYZ5xCE+ss= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 110048B849; Mon, 25 Feb 2019 14:48:40 +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 qbr4j7dF2fny; Mon, 25 Feb 2019 14:48:40 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CD30F8B847; Mon, 25 Feb 2019 14:48:39 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 67C2A6F20E; Mon, 25 Feb 2019 13:48:40 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v7 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: Mon, 25 Feb 2019 13:48:40 +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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/early_32.c b/arch/powerpc/kernel/early_32.c index 99a3d82588e7..3482118ffe76 100644 --- a/arch/powerpc/kernel/early_32.c +++ b/arch/powerpc/kernel/early_32.c @@ -21,10 +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