Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3171748pxj; Sun, 23 May 2021 23:53:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTJojH904Jn2/wU6rw+QeMPw1RLbliLNSN8iAQWF7X1lqekiRoYnwavp9BrYgFmyL0eXhk X-Received: by 2002:a17:906:2749:: with SMTP id a9mr1569168ejd.498.1621839204201; Sun, 23 May 2021 23:53:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621839204; cv=none; d=google.com; s=arc-20160816; b=xL91ywY1Br7U/l89tj9h+vkSHLoOsD+JYlZOXWZXn4D0dxYFHzC3P175uc4WvTzqcN nzawD5efIIE+qSAbd3aavbxn/AMzuu5hAmEMfhVTtRQfIQmSKWMdXliLm/Wo7ikRlRVs EB9zRZy2xosP98JvGozwHEsgq2+Mm6kUVtn2ZGjHmtvXVXB6rl6LS/i0MBLNqO+5mitg 8vy+a0/X7vdGnwn+cqZKDRa02zN9bwqjPQdwikz1aBrfqlvFvoUAa5mSYhWYHrz3LObD LFZHq/TwIfBE+OtqbNehHP2sCX7vuyPvri+TiPuQqsQwrm526Ljm4oBrlIp5IWQep9Xa R/bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=eyE8GHUixuaGkP9nXoK7rmW7/YIkV7mSGtAJDjg9YTE=; b=RWbs2QJOSbYgDLKq4vfteZCONVrJjklZmyy2B8PiEq1SyKiP5MuLOJbtCstitsQv94 lggTge1LCHVwiRpmbXvKLTTsICRw3icTT3inRodpp3UMst2yItcVl6z4+CnuwWzpu9IY nGMJjEno7xhX1YWyVBz9vG/h8tnkaDBozLfYgTHuRwLQ8u/oyiYSh3+HPewy/sD9LW2B 7CeZSDHnqq2M74kJLvp4D5nfNr74WPraI39zbN976MzlaQZX8TT/fAJ1hU3/jcq3+K2W ja4HS0J3gEwckNw6E0NxS2ibgfgLgPATbEeDW6W63NNY+9j9OXRVIeLpMxB3sN6aAuXT HWtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OyLPKyKN; 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 ah12si12199659ejc.252.2021.05.23.23.53.01; Sun, 23 May 2021 23:53:24 -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=OyLPKyKN; 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 S232326AbhEXGxY (ORCPT + 99 others); Mon, 24 May 2021 02:53:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:60518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232238AbhEXGxY (ORCPT ); Mon, 24 May 2021 02:53:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A9CF6105A; Mon, 24 May 2021 06:51:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621839116; bh=hn/pNdORUktwb876bgR0Q9d7/7wCHAT4MmtogXIo1fI=; h=From:To:Cc:Subject:Date:From; b=OyLPKyKN4zCBvU1tXo+4+eiqPf0uANbR6+w/b1cVC6Hb6dyNlVHepztt/rGDEDz3S QAJ4G661BTNRHFqAsX7vn2T9uldInvS0oEc/jRsgscxg3Xo7CQGDzsy2449DxBtmsP eSKyh3moIbEbOZfntQbDUui/mYqJUBYDmg5RJDod/X6QQwxyosXHNQNlreC0k3+lo0 j1ZMCqqjh6d+xn/ZDbyq9NYzsUn/gutXKm8ixERLfxWudQoVvgbx1r7jHPt14GdXj7 tzMq5Q4YWwpfYz19ZUdjJK7eYdZWyGcEPpFfo/L7OOqfkRfz+23uraImrNrf3rOct/ tM1L24PbV4j9g== From: guoren@kernel.org To: guoren@kernel.org, anup.patel@wdc.com, palmerdabbelt@google.com, arnd@arndb.de Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-sunxi@lists.linux.dev, Guo Ren Subject: [PATCH 1/3] riscv: Fixup _PAGE_GLOBAL in _PAGE_KERNEL Date: Mon, 24 May 2021 06:51:06 +0000 Message-Id: <1621839068-31738-1-git-send-email-guoren@kernel.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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