Received: by 10.213.65.68 with SMTP id h4csp351337imn; Wed, 28 Mar 2018 05:00:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ZQOm95AMRIo0TpqYoA+i8TM2YbzBAkGCkZ6T5+LJUSFWDNH+TLmmaa05b8Hac+31YjTnJ X-Received: by 10.99.115.69 with SMTP id d5mr318470pgn.289.1522238413172; Wed, 28 Mar 2018 05:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522238413; cv=none; d=google.com; s=arc-20160816; b=VkDI0FNDxI6G5XplqpHxjfnRY6bGJ16KdAi0XYQMb2AKqBUU12OVe9oYW+Ltr71/tn F4pREcM0GjZpNbyzuY2z3Q2VTWpuYaQKN5Jrj1LpRFm7BAlku7PH20TIOpHWx53zvBeQ uaAVoEu2kRUrF+9JOVIsb+zL9wds+F/kjmqt2Gwix30qjt3GVUgEQhApr9S/FaSKBMmA WOFYc8qL1BJbVUnoCNtDR9NSiOup0Nk5aY8ThRxuCj5gOXkFQlBP1eWDPVTW06i9n0B6 McAk6vJHfMPyC0+zZvrqOWLTdygIhxCzy92+lop2OxjR8CARmsFYkJJyPdYe65QwQeX7 zzcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=H3nhZrT5KjnccA3PlHc7M0CUjWcszZlClEQl+7IdXKc=; b=TinxAIom97QHqnBM32VbrMFpxsHwTp8s/RmE+mQPAohuJhk57U5zVV5WMTBwZwiTLz E6cUmfgROV+CLmR/giDx759g+mGzY6W0r2U6QJWnRAP5FqbMZZIxTcGs9F/T9wsUUnbu 1+3aEw6S8mHdPtgCRqK/g3k40WyTtC4HzBZgdZ09dh9c/Su3P2TbFMZDaH+9gFQtzRWI IkVX0r0b8rhsQkZwsPP6xoS1Pr3E0K2z/HcuCx6fkUhisxwCrtOniTsYArnOovPRvMSt 5bpN162sGI5NEYiJ4WGlPJ5TeNvIt+rDeAMZbFVeH9zN6c8n6cDghv1QYFZ28sAHgZaT 44zQ== ARC-Authentication-Results: i=1; mx.google.com; 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 t10-v6si3321250plo.18.2018.03.28.04.59.58; Wed, 28 Mar 2018 05:00:13 -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; 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 S1752827AbeC1L54 (ORCPT + 99 others); Wed, 28 Mar 2018 07:57:56 -0400 Received: from foss.arm.com ([217.140.101.70]:39858 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbeC1L5y (ORCPT ); Wed, 28 Mar 2018 07:57:54 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0703215AB; Wed, 28 Mar 2018 04:57:54 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CD0B13F590; Wed, 28 Mar 2018 04:57:53 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id DF86D1AE5515; Wed, 28 Mar 2018 12:58:04 +0100 (BST) Date: Wed, 28 Mar 2018 12:58:04 +0100 From: Will Deacon To: Shanker Donthineni Cc: Mark Rutland , Philip Elcan , Catalin Marinas , linux-kernel@vger.kernel.org, Thomas Speier , Robin Murphy , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V2] arm64: tlbflush: avoid writing RES0 bits Message-ID: <20180328115804.GD30850@arm.com> References: <1522120877-9136-1-git-send-email-pelcan@codeaurora.org> <985a0edd-e388-dade-8824-30cc58a236f3@arm.com> <56b560a5-6e57-8e01-32ca-9d3c95ccd2e5@codeaurora.org> <20180327173613.GI18435@arm.com> <96f894bb-4855-a77f-3fd1-c8a2878faabb@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <96f894bb-4855-a77f-3fd1-c8a2878faabb@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 27, 2018 at 08:03:07PM -0500, Shanker Donthineni wrote: > On 03/27/2018 12:36 PM, Will Deacon wrote: > > On Tue, Mar 27, 2018 at 09:53:16AM -0500, Shanker Donthineni wrote: > >>>> @@ -154,8 +163,8 @@ static inline void __flush_tlb_range(struct vm_area_struct *vma, > >>>> ????????? return; > >>>> ????? } > >>>> ? -??? start = asid | (start >> 12); > >>>> -??? end = asid | (end >> 12); > >>>> +??? start = __TLBI_VADDR(start, asid); > >>>> +??? end = __TLBI_VADDR(end, asid); > > > > Can you test this bit too, please? ;) > > > > I've verified the basic boot functionality on QDF2400 platform. But I can see now > after your comments, it leads to TLB conflicts because of ASID is truncated to zero > due to two times 48bit shift. > > Thanks for catching this one. I just noticed it during review. In general, if you're making changes relating to virtual memory stuff I'd *strongly* advise you to do more than a basic boot test. It's amazing how much appears to run fine when stuff like TLB invalidation is completely broken. Anyway, thanks for turning around a new version so quickly. Will