Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3222669pxj; Mon, 24 May 2021 01:24:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0wYklJx19RId42x9A8S1v467fMqJT70kNq9nAR/M0ziNNvDfAjNrwNBGeGFJagPzI/QhR X-Received: by 2002:a05:6602:cd:: with SMTP id z13mr14624367ioe.199.1621844642894; Mon, 24 May 2021 01:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621844642; cv=none; d=google.com; s=arc-20160816; b=YAhNzKYW3NagHWy4ncwKLwY1F4tZz7EyHZ0xd68nywXegxBcCHRRKiN7RukmrL9xAh jaugFy6TtBYayE3w7LKeusZe5R+GtNUjcVVv0MgyCbLRfHPyFob/HEUMp3R6OwPHoXn6 wlOUAVhBg+UA+ylr/rdWfWI110qtdOBnl3ggVUBW8nFxX5pb9i+pU0FBaTUQVh+kwdr6 QT7FNtEqDYDJ5P2u9W9gXYmuMvh7Xd2F+jR5nohrhXO7iiMleFZ0VUj6ZPYulkJleUhY JhmzT1aS3i4yCLwAP7cyULHU0QbwTo5q83EEtZbbfK81/l4AW/BuvPhgZf6SH6h3LK0I HKjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zZ3xgaPI2rNhpX0WCvm0exwP8Saxneik2ZdDZ43KppA=; b=dlgbd6AlC8HdbeI6NP2IZjoCyJRxmMMl1pOoD3HqMlTk0rg5ABeDAiCiHeMBDITgit lOk3Lh+xMHePAScaw4/OURpY0+cz3C0Mciuk0leP3UgoWLNYll79WdxldNXHYXbElAR6 T3kDF6SE2PeuFMJWUPTPNoXQ3Tulcx+bYpQGImkaN0Ilds1NBIN/7dUCMqDaBVGmvsV/ CRE2EQPYA4dHSiuN0w0XxW8OORBJVfgnb+peDpSjnsB2Ts1q8gLvlLwzviB7sNpIkyxF BLQ+6YcYzIJN+ky0CO0Njsatw3TIpVtqqau74gxi93nYnyZAspP3FarhsDZ6KTWoImVX pT5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V7BHr2cH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si3422403ilu.149.2021.05.24.01.23.49; Mon, 24 May 2021 01:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V7BHr2cH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232371AbhEXIYb (ORCPT + 99 others); Mon, 24 May 2021 04:24:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:44948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232279AbhEXIYa (ORCPT ); Mon, 24 May 2021 04:24:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A8CA661151; Mon, 24 May 2021 08:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621844582; bh=+TDQoVOokc8WBAFuv0fWAuKnZ09Bvva98Z+VkeSiyYI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=V7BHr2cHba8OquErjEX+iEHS40AtGDmaVhe5QzR9Csdt4vq7ORsDL78UFibSuLxk/ 8vEePM0DgKoR0c8ymNZ16ZtQHrnAbKGMYgi6jLqivEGbLUXOPcpup3aQf21ixsPYuR 3Jy2uUBrj47v2RTPFhuuaKLOphOCOGFlnt9rc/bJVo5S35GOmMZxy3eJ9PL/Ez7972 9HJ+ks6cJRZQ1u3k7GEOKKRX6ee9BGoy2ruJCIWZdP2TgAeNLSRy2HLPA98BZFDOl7 NAHUuEoWM/DAfVqIlYp1FWYlAyUvA71alreGu1DM66bKGrZ4IUqJJyDPb7NbXxqCoX Jxec/u3jfcm9Q== Received: by mail-lj1-f176.google.com with SMTP id e2so26135834ljk.4; Mon, 24 May 2021 01:23:02 -0700 (PDT) X-Gm-Message-State: AOAM530bNhRnRnhBfzAZ77EaS/C4dSOgjMo5JIIIAPwqY9uNfQzh1/27 uO7gO08HsWZDqyKtT11Ob5QYdUvwWFb/CN4qesk= X-Received: by 2002:a2e:b557:: with SMTP id a23mr16493146ljn.238.1621844581046; Mon, 24 May 2021 01:23:01 -0700 (PDT) MIME-Version: 1.0 References: <1621839068-31738-1-git-send-email-guoren@kernel.org> In-Reply-To: From: Guo Ren Date: Mon, 24 May 2021 16:22:49 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] riscv: Fixup _PAGE_GLOBAL in _PAGE_KERNEL To: Anup Patel Cc: Anup Patel , Palmer Dabbelt , Arnd Bergmann , linux-riscv , "linux-kernel@vger.kernel.org List" , linux-arch , linux-sunxi@lists.linux.dev, Guo Ren Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anup, On Mon, May 24, 2021 at 4:03 PM Anup Patel wrote: > > On Mon, May 24, 2021 at 12:22 PM wrote: > > > > From: Guo Ren > > > > Kernel virtual address translation should avoid care asid or it'll > > cause more TLB-miss and TLB-refill. Because the current asid in satp > > belongs to the current process, but the target kernel va TLB entry's > > asid still belongs to the previous process. > > > > Signed-off-by: Guo Ren > > Cc: Anup Patel > > Cc: Palmer Dabbelt > > First of all thanks for doing this series, I had similar changes in mind > as follow-up to the ASID allocator. > > I went through all three patches and at least I don't see any > obvious issue but I think we should try testing it more on a few > existing platforms. We've tested it on Allwinner D1 C906 and C910 SMP*4 for a long time, just hope it won't affect u540. (In fact, C910 has used ASID allocator for more than two years with our own kernel-tree. I remember we've talked about it in 2019 plumber.) > > Reviewed-by: Anup Patel > > Regards, > Anup > > > --- > > arch/riscv/include/asm/pgtable.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h > > index 78f2323..017da15 100644 > > --- a/arch/riscv/include/asm/pgtable.h > > +++ b/arch/riscv/include/asm/pgtable.h > > @@ -135,6 +135,7 @@ > > | _PAGE_PRESENT \ > > | _PAGE_ACCESSED \ > > | _PAGE_DIRTY \ > > + | _PAGE_GLOBAL \ > > | _PAGE_CACHE) > > > > #define PAGE_KERNEL __pgprot(_PAGE_KERNEL) > > -- > > 2.7.4 > > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/