From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753531AbbINHPJ (ORCPT ); Mon, 14 Sep 2015 03:15:09 -0400 Received: from max.feld.cvut.cz ([147.32.192.36]:54675 "EHLO max.feld.cvut.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751538AbbINHPH (ORCPT ); Mon, 14 Sep 2015 03:15:07 -0400 From: Michal Sojka To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , scottwood@freescale.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v3] powerpc32: memset: only use dcbz once cache is enabled In-Reply-To: <20150914062159.353701A2413@localhost.localdomain> References: <20150914062159.353701A2413@localhost.localdomain> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 14 Sep 2015 09:15:00 +0200 Message-ID: <87bnd5xyiz.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 14 2015, Christophe Leroy wrote: > memset() uses instruction dcbz to speed up clearing by not wasting time > loading cache line with data that will be overwritten. > Some platform like mpc52xx do no have cache active at startup and > can therefore not use memset(). Allthough no part of the code > explicitly uses memset(), GCC may makes calls to it. > > This patch modifies memset() such that at startup, memset() > unconditionally jumps to simple_memset() which doesn't use > the dcbz instruction. I tested both v3 patches (memcpy and memset) and they work for me. Thanks -Michal