Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp574004rdb; Thu, 22 Feb 2024 12:23:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVEunIiQ2Uf4Hkp/GVUsEiGEl1J7h/4U4QVTL5+H4cOOyzl9X7+sra3ILB70fkXJXDm/0/PyNSBZlSljOYS/IGRvaqSy9DSj5MgkAQpMg== X-Google-Smtp-Source: AGHT+IHESv0r+6S1lS2NSz4kXjEPp7QPFKjrRhF+44qWjnxRcW55rautzVbLYYg/ANEW8vK3cXQa X-Received: by 2002:aa7:d90f:0:b0:565:632d:fe71 with SMTP id a15-20020aa7d90f000000b00565632dfe71mr184308edr.22.1708633385419; Thu, 22 Feb 2024 12:23:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708633385; cv=pass; d=google.com; s=arc-20160816; b=kpv/Zd9PpSd1GbVXttuQzlKrcT9cm4+RJc/IPz5qXH8ubLdbLMNdCfqwRWheOF+SQ5 fYK7c5YBAIPDMVEYooEOQWSg3iVVDYlHMBcUwVlxAe4MERi4pluRlNXtXBz3aPLeVn3n cIYvY6sXorEiKokldZqVt3ZDoTLN97Blk3rb0mNU48yyNnpD+pLlqOINX81KDlbarGAk k3Q8+g39O+bVS2oGGmgm75a788rIqQ/11CuCvWO5maE8Ch2IDVbVoPUYi3smBa8Bhrvs f8jGgRrTwnAayY+RUMSf/TADne655GtQArV+gzCq1jJ3yf933/qgieGl+oyE1P5+f5mb fASA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:to:from:cc:in-reply-to :subject:date:dkim-signature; bh=AvT+skZuVtuaziWCz2kmemhaijwUBiIAPgW6NDDOZYI=; fh=mYZ1PUK4Mi4NzqpyzFMNBox0/VBySoLrAFqydMQoOd4=; b=kyP+V+QO3MqlEtFHC1wD/5JFyugcX89EzmExauc05VOn1UFm+eua8RNE3s/OTbJmI2 HrWkn1D2tISr119hzevmf3v+n+hoZK1NH0qOuOJHTmYuii/0UIjePfnbYcfh7ha+Ix+P k2rnY7ObJ2LH+XkBZ+II+hHn/+mmFnqVVbrIcrQ+DyCNMJzaTvHfO48GpfEQSzHUU7ra ZDUJdQjkpCfgiXRP//66pvv7PSMW00ciugLK9Z7h7LWSgzEY9Yea5Y9RpToRXVZJ4Fry 0q6TeqXFAEMW/NT2QVIxAy7CgWcERWoqU0+Gr20cshpEKQkTk+tmkGTWN27hhpPDPtWH sQKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dabbelt-com.20230601.gappssmtp.com header.s=20230601 header.b=iZLE4fWJ; arc=pass (i=1 spf=pass spfdomain=dabbelt.com dkim=pass dkdomain=dabbelt-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-77311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77311-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i2-20020a05640242c200b00564bfcb043dsi2977902edc.684.2024.02.22.12.23.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 12:23:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20230601.gappssmtp.com header.s=20230601 header.b=iZLE4fWJ; arc=pass (i=1 spf=pass spfdomain=dabbelt.com dkim=pass dkdomain=dabbelt-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-77311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77311-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2E7B41F2717B for ; Thu, 22 Feb 2024 20:23:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07EE16E60E; Thu, 22 Feb 2024 20:22:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dabbelt-com.20230601.gappssmtp.com header.i=@dabbelt-com.20230601.gappssmtp.com header.b="iZLE4fWJ" Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7430514B81E for ; Thu, 22 Feb 2024 20:22:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708633374; cv=none; b=abOlm0qQFMMwBPfrWdY8tlcUoFUcOxS9S++KF1b1q+ttZGPVtAqlngWFARKb4B3lAOEgF5fANoLyNkbT8NAhanLG+7qfoIDaGKCAvazSQQTDY1Dg8/51zP7VjvugBrGUVkbZbe7VWrBIGTsXKYR3yyGkiWsfYDLcYKC7C7tbJ3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708633374; c=relaxed/simple; bh=URYTFp/fuRVeilL5jaYsFaoYbDFJQDSZAADpYUjI2vg=; h=Date:Subject:In-Reply-To:CC:From:To:Message-ID:Mime-Version: Content-Type; b=Z1/BocNoiVcQpTqG5wwUU/n/8qhEFzTYM8F6xO2GabYHrDi6mdOh6Q/BXa9cuwW56h97pr9dZP2myStXs0vScaFyIk4T39SgoDHE2eDptaL2jAP5FPxP9SbaXM9bzRVEo6jgRqUMSfaZ0WNFU6z2MLlLeinlnxfRjjdXRimNqdw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dabbelt.com; spf=pass smtp.mailfrom=dabbelt.com; dkim=pass (2048-bit key) header.d=dabbelt-com.20230601.gappssmtp.com header.i=@dabbelt-com.20230601.gappssmtp.com header.b=iZLE4fWJ; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1dc0d11d1b7so1900815ad.2 for ; Thu, 22 Feb 2024 12:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20230601.gappssmtp.com; s=20230601; t=1708633372; x=1709238172; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=AvT+skZuVtuaziWCz2kmemhaijwUBiIAPgW6NDDOZYI=; b=iZLE4fWJoxw+ADNTYgLoQuJBkiWWaD5tHxiXzoRt/BUcDXw3J5/HaJLpWyW7CJEg+k fI1N+YlUahifMbqoQyuH2SrfalD+Xx/6G4fpSt6eDoRlgdZ+v0Rocr0lIMfQB+ynJ2o3 /odbgwLNZqpZwAl0Hmk9zjKgwJeAKLZYKVVlyslsCv0cZI0sVg3DkUUs4fdRjc+CO7pb WydXPZz7eUnuxvX1kWqP/3KVBULbXH62ctNBkq2TdbXXlnWTC1PARGGZZNbw87WUMvGX gQYZpT2Jwnk5ntpvW8jB2ANXyN75bD+aCeCEFOEbtU7EvET22In3KHqp6suyf+joNYrh OIQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708633372; x=1709238172; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AvT+skZuVtuaziWCz2kmemhaijwUBiIAPgW6NDDOZYI=; b=V8/3bpuwnNPeKGHt1mIhbk8OdlRpQrFOHdzwVQmVWPxdG/YSxAgJd1qS8mzLZGMH2R D4q51Yebd9Cb2MHW2DA6fBEMHTw5nI5dCqXXju9YCyP7/4nuGp3YTxnqjjC20xbtjugt mSkHO/+Bo51JrcVHRJGR1vJlMNrJ/oKxFfuhFoAlbxi+r+fkxSSnprGcKy1aCZZABmZc pnthQwIvOZoojAID/fUoAD+FOWPZvoRjx0TpbTYZLRTsJAUZZQKF6KFjZx4f4VltYLlH reHsK1vIOgxSMohY2uyxoIA9gQWD7G3BvEBmWw1zEqnx3vp/WNsX04X+bONyHqnq6SFt R0kQ== X-Forwarded-Encrypted: i=1; AJvYcCWEdCOa7VNAkk7Ak1Krh3ZRxHw+BxkSf4/85V6EaBoaI2zgJ6UefJ+InZhwdLidUfKiKAwqub9eCuMxx7WYB6I6u5eeZCiGUIKHt/Oc X-Gm-Message-State: AOJu0Ywq5oVrO4c84zmCeiykmrsMVwAY8Uqr6Zz63vkKqujpB8S8irhb RyUU4I1OGoPQw2ENEuQ/AO0t6RcYPYDBKM++H1PmesBH12BkBCoyJI2wB5g5lC8= X-Received: by 2002:a17:902:db11:b0:1db:f049:6315 with SMTP id m17-20020a170902db1100b001dbf0496315mr15282166plx.51.1708633371738; Thu, 22 Feb 2024 12:22:51 -0800 (PST) Received: from localhost ([50.213.54.97]) by smtp.gmail.com with ESMTPSA id km16-20020a17090327d000b001d9fc826522sm2839647plb.239.2024.02.22.12.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 12:22:51 -0800 (PST) Date: Thu, 22 Feb 2024 12:22:51 -0800 (PST) X-Google-Original-Date: Thu, 22 Feb 2024 12:22:43 PST (-0800) Subject: Re: [PATCH v2] riscv: mm: fix NOCACHE_THEAD does not set bit[61] correctly In-Reply-To: CC: cyy@cyyself.name, linux-riscv@lists.infradead.org, jszhang@kernel.org, Paul Walmsley , guoren@kernel.org, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: alexghiti@rivosinc.com Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On Wed, 21 Feb 2024 06:00:49 PST (-0800), alexghiti@rivosinc.com wrote: > Hi Yangyu, > > On Wed, Feb 21, 2024 at 4:04 AM Yangyu Chen wrote: >> >> Previous commit dbfbda3bd6bf ("riscv: mm: update T-Head memory type >> definitions") from patch [1] missed a `<` for bit shifting, result in >> bit(61) does not set in _PAGE_NOCACHE_THEAD and leaves bit(0) set instead. >> This patch get this fixed. >> >> Changes since v1: >> * reword commit message and add reviewed-by >> >> Link: https://lore.kernel.org/linux-riscv/20230912072510.2510-1-jszhang@kernel.org/ [1] >> Fixes: dbfbda3bd6bf ("riscv: mm: update T-Head memory type definitions") >> Signed-off-by: Yangyu Chen >> Reviewed-by: Guo Ren >> Reviewed-by: Jisheng Zhang >> --- >> arch/riscv/include/asm/pgtable-64.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/riscv/include/asm/pgtable-64.h b/arch/riscv/include/asm/pgtable-64.h >> index b42017d76924..b99bd66107a6 100644 >> --- a/arch/riscv/include/asm/pgtable-64.h >> +++ b/arch/riscv/include/asm/pgtable-64.h >> @@ -136,7 +136,7 @@ enum napot_cont_order { >> * 10010 - IO Strongly-ordered, Non-cacheable, Non-bufferable, Shareable, Non-trustable >> */ >> #define _PAGE_PMA_THEAD ((1UL << 62) | (1UL << 61) | (1UL << 60)) >> -#define _PAGE_NOCACHE_THEAD ((1UL < 61) | (1UL << 60)) >> +#define _PAGE_NOCACHE_THEAD ((1UL << 61) | (1UL << 60)) >> #define _PAGE_IO_THEAD ((1UL << 63) | (1UL << 60)) >> #define _PAGE_MTMASK_THEAD (_PAGE_PMA_THEAD | _PAGE_IO_THEAD | (1UL << 59)) >> >> -- >> 2.43.0 >> > > I feel pretty confident on this one :) Ya, sorry I missed it the first time around -- that's a bit embarassing ;). It should show up on fixes soon, just queued up behind some other patches but the tester is back alive so thing should be sane again. > Reviewed-by: Alexandre Ghiti > > Thanks, > > Alex