Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp34016ybl; Fri, 9 Aug 2019 02:01:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEwzxcHgNF89lAy7OONp9PSPD4vfsx3cNItAwlBItUtftHhRBwDYN7L2ZQmrwSF+G18RQN X-Received: by 2002:a17:90a:9386:: with SMTP id q6mr8246128pjo.81.1565341281891; Fri, 09 Aug 2019 02:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565341281; cv=none; d=google.com; s=arc-20160816; b=ehDtc0k1IjI0a4XR65Chs8Csl7gXXsVbKXN7yCnlz+NRgp/FZOCIuZ5+TXF3sIvpD+ zvKZ8Qcbqk3Oa6wVYHe/CdVu7IyW45UbDCtWF77b8MAlQVTja2opzeNhK+bqnGTsKGZL 3vR8qThQWG+GfE/tvbogX3qP6V9pWetiHeZ0OjULzEMQ/HKYG6KIgxhnv4YJ7K+8uglV Deigh7R1CLtp+4vFjfTkvOENSOUuy3Rwmny+RfZ24rjihmjqWGXMnJKmfsn+q6q4MBI7 t6MVoODhV7wBxJQfj+eqlQ/PuEq6bsLT9jHQd/cFM/N3Q971QPjpL61iTMwYe010EwIX m5+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=v9a6CunqkztcWhEahCiUv20a19QATmRm8swNBF4mU4o=; b=jnDuWxg5pY88AJ8jvxBTI346NFAenG9IPkVJMRc2rnLsW0v8+25fOhcf3XIbRi8R3q J20EAmLXw60v9SSaeZTFc3VkfS0dZwg/mOPRJe+BsijK1K0WyEYePWIsh9tT/owu7Grl UkqqzvQOKhocfu7kAgrae6SG4iHE1QMxAIgZ5SB7/a/J9rZeqdIlNoe4Vu3rXb1Yb61s 6ow97v3HI3GeJLuIyR34PPzR3YPWqjSXLO3rXuABcA89QovbVFWtIwtHgim7RsuLy4vg DeeN6N6P9czxT5N2JxPiBcnST1hNxK/FuFgs4kjc/im8Yk1RitbOnSheRULiXqa8jgZ8 OEQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=ldApItJf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z185si53461183pfz.248.2019.08.09.02.01.05; Fri, 09 Aug 2019 02:01:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=ldApItJf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406022AbfHII7E (ORCPT + 99 others); Fri, 9 Aug 2019 04:59:04 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:35525 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbfHII7D (ORCPT ); Fri, 9 Aug 2019 04:59:03 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 464fLD5lq8z9v0hl; Fri, 9 Aug 2019 10:59:00 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=ldApItJf; 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 ysu8ZTG-4UXw; Fri, 9 Aug 2019 10:59:00 +0200 (CEST) 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 464fLD4h0Qz9v0hj; Fri, 9 Aug 2019 10:59:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1565341140; bh=v9a6CunqkztcWhEahCiUv20a19QATmRm8swNBF4mU4o=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ldApItJf3Z3ekgov7QP6o8AuQtiTl6eP4FvdFirhNkFnWjxjoW5euJ3XJ2BFzpmc4 nrqok56fz4+jVeKILC5UYoAss+g6BrHZ/xGP1de/uYy89moaD3Bwacr/xYPGLlXhN2 BYlvKI9Ijdgy3jGpuZUS2+HhoHvyAKdGfhVCQbgE= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CD8378B881; Fri, 9 Aug 2019 10:59:01 +0200 (CEST) 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 VKVLaEo4TvUq; Fri, 9 Aug 2019 10:59:01 +0200 (CEST) Received: from [172.25.230.101] (po15451.idsi0.si.c-s.fr [172.25.230.101]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8A8D08B7A1; Fri, 9 Aug 2019 10:59:01 +0200 (CEST) Subject: Re: [PATCH 1/2] powerpc: Allow flush_icache_range to work across ranges >4GB To: Alastair D'Silva , alastair@d-silva.org Cc: stable@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Greg Kroah-Hartman , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20190809004548.22445-1-alastair@au1.ibm.com> From: Christophe Leroy Message-ID: Date: Fri, 9 Aug 2019 10:59:01 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190809004548.22445-1-alastair@au1.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 09/08/2019 à 02:45, Alastair D'Silva a écrit : > From: Alastair D'Silva > > When calling flush_icache_range with a size >4GB, we were masking > off the upper 32 bits, so we would incorrectly flush a range smaller > than intended. > > This patch replaces the 32 bit shifts with 64 bit ones, so that > the full size is accounted for. > > Heads-up for backporters: the old version of flush_dcache_range is > subject to a similar bug (this has since been replaced with a C > implementation). Can you submit a patch to stable, explaining this ? > > Signed-off-by: Alastair D'Silva Reviewed-by: Christophe Leroy Should add: Cc: stable@vger.kernel.org Christophe > --- > arch/powerpc/kernel/misc_64.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S > index b55a7b4cb543..9bc0aa9aeb65 100644 > --- a/arch/powerpc/kernel/misc_64.S > +++ b/arch/powerpc/kernel/misc_64.S > @@ -82,7 +82,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) > subf r8,r6,r4 /* compute length */ > add r8,r8,r5 /* ensure we get enough */ > lwz r9,DCACHEL1LOGBLOCKSIZE(r10) /* Get log-2 of cache block size */ > - srw. r8,r8,r9 /* compute line count */ > + srd. r8,r8,r9 /* compute line count */ > beqlr /* nothing to do? */ > mtctr r8 > 1: dcbst 0,r6 > @@ -98,7 +98,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) > subf r8,r6,r4 /* compute length */ > add r8,r8,r5 > lwz r9,ICACHEL1LOGBLOCKSIZE(r10) /* Get log-2 of Icache block size */ > - srw. r8,r8,r9 /* compute line count */ > + srd. r8,r8,r9 /* compute line count */ > beqlr /* nothing to do? */ > mtctr r8 > 2: icbi 0,r6 >