Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2119909rdb; Tue, 20 Feb 2024 19:03:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+zQlCtWnfcCnCnh+QT7vQKV5yFq0wvsTCrTrsbxzjfOiAisjb4PniTRyXAqwwbfPpQpYw/NdMgiN4KBasNiIT9i1C5VVlVKQYnCyDtQ== X-Google-Smtp-Source: AGHT+IGF2NDo6gxRVsY4DVsvJ/uitP5fUQvcFksY3ZL93t2HXMgXK85jETIXG70gOzvS8duu10lb X-Received: by 2002:a05:622a:1a9c:b0:42e:14f5:994 with SMTP id s28-20020a05622a1a9c00b0042e14f50994mr7688251qtc.9.1708484606561; Tue, 20 Feb 2024 19:03:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708484606; cv=pass; d=google.com; s=arc-20160816; b=fAaSx481KFZJXRmyiMRGV9ifrskWmAZ9+E2p3KGEbLsWa72qB9hn+xOJR/yD0zUoaC ZLjBatj1qaeAxGAbJb0s0C8aGNe4s1MLJTKheZm/xDKhok77CWb82UkUVM/TZZg79Vd0 Vs8s1wbC8EkHVlB9QUU/eO9XELbwUP1xna7tMEPaFEdm5/UZX9DqgFYKWZkQapl3PUPT oj4iuYD2d/Ic1kn+R2rQhp0dl/H+6T9J5SWwH5VkzNpfB3iwX9lN1BTzhTL9H3oyKh19 PfnkAQ9QrGredTFP1RHUSOzoO4ce5V+U9HOboBf6OyOgVQZEoMJzMep8Hy28BX5ueCcJ 5Qag== 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:date:subject:cc:to:from :message-id:dkim-signature; bh=LKI66u4dgr+7iwYTp927KXhXTPqMfb6/+YRPw56ONE4=; fh=sBTW3qeFfzzAWUpExQ/XtiEF3Bw26ptMFm35vCWUZM8=; b=DFnwt6L6kq8O6RJ4FznJS2cC7bLTLhIT5b7uhLO4mUcgC96OZcn2NSu0ddtGaHtH0G h86Rimw7Hiwa4KQBXMiBU3toRPTgyBaP3Wxac2w+gUorhu1x5gg8nl1sUWVsHuPpN6nr Nx6wNeuKJ/2o3tcLo3Q20O4mUleaw3jipomVmkrxNVYXv5id3QEIIN1Drf3UJRYsWaat eYlpkhC43WR/goMQ7VzHp0OSDCyISyc4WWzNvc7G5d6154Z/gopcZHWF43WXYgj9vn0f v8zIF7B/I+ho02qi9TBPCjoRpED8sl3IuwZyvZaKEu3g36OCUIr1dVJYizsNjBMFFgr/ O5Jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=frPaumst; arc=pass (i=1 dkim=pass dkdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-73989-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73989-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e22-20020a05622a111600b0042be7c435casi11019792qty.763.2024.02.20.19.03.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 19:03:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73989-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=frPaumst; arc=pass (i=1 dkim=pass dkdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-73989-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73989-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 538FD1C22C6E for ; Wed, 21 Feb 2024 03:03:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46FA32BAE9; Wed, 21 Feb 2024 03:03:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="frPaumst" Received: from out203-205-221-173.mail.qq.com (out203-205-221-173.mail.qq.com [203.205.221.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE98B2F36 for ; Wed, 21 Feb 2024 03:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.205.221.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708484601; cv=none; b=TbJmPPWWNI5H4Wza3yJQ9EZL+ZjxJmIPYobAnpIWCphihYcXHxwH+cZDtiRsWOJ5QKJLJmeKciM9c6tUw31UwKl9jqzqgHj5qd2cjjJHrUaMdJ10ZFRBgGwnQZmQKbiv4ZDeXu8zmCZoM/KW+IfhUMhB+RIR2DsK+1I4HrBnBx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708484601; c=relaxed/simple; bh=oobwvJOSlJZ6jqTkxaLxre6wjaVBnYmAyPVTnY+MfJM=; h=Message-ID:From:To:Cc:Subject:Date:MIME-Version; b=sXhwbqwmSuXX0XAWmqWZsUp3z+Uql/Bjywa93A0Mokn6DvkeBHJTMO2LTbRvEjFcjFWbb8xYen0zx7RJBLAqfeU/fPNYfyMoahMi78py069+xPj3VISf1gDRu6WFBmo/TaOu/Ra7djxJGX3j/EKej9vb1SbUL1fffr+SXSCvFoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name; spf=none smtp.mailfrom=cyyself.name; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b=frPaumst; arc=none smtp.client-ip=203.205.221.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=cyyself.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1708484589; bh=LKI66u4dgr+7iwYTp927KXhXTPqMfb6/+YRPw56ONE4=; h=From:To:Cc:Subject:Date; b=frPaumstbBFv47/rdxEFDJLe4zIYNI5yWDb8mM4pf6ydyw4Hqn6mbKxrwA+Yp1sw3 XjCb0F7jFT6Q0WrH+++6upH+oL0KTODunCAFQmjFbiuUAa7CPec3Dh9D1GVHstXMIn r9hO3+WXwz5Qptm8RIT1laiXH3xBFQ4t1JFlir1U= Received: from cyy-pc.lan ([240e:379:2240:ef00:159c:db93:bdcd:c9c6]) by newxmesmtplogicsvrsza1-0.qq.com (NewEsmtp) with SMTP id C5A0C88; Wed, 21 Feb 2024 11:03:05 +0800 X-QQ-mid: xmsmtpt1708484585txbs3v0gn Message-ID: X-QQ-XMAILINFO: OUnVc07lD2ZBmrI0ZhjTbaZSf3JrAeZvIVT6kjHJ26bXBjMScunXxm1aDNZZKQ /X/0IbcXbZ2RgT8zWVbJ9Or//pv5wVpAsfgTCHTb0t4ud6fWvmCH6mL82nuOjSk6/qeQ8LRZQBO8 8fbHDB1JF1SUl/Ova/4VF68qRq7N+tdwe/kceR1I+X8S7JtQFRoUCu+QRGSX5auPoW7zMccfPGgF csuJjMy61fN3y9sSZkZ8alcyAr4/kU7vU0Ul/yJoiTNU4Jyi+JUCNpZaULAdpgqo1FXBUfzWCMfh 994NDiDExo5GjgDnf7OSDXQXmf9yHwGpScNSfEQ7YdofkkcOiedu6zxodZbriXjvZdzbB+gsfzf3 P3p8ynZDcDqNdWUCYR1mDsjOgZNUk/QaC2IHmdBXyRzsaitWiJH7D/w0ZTxvZEj+CplhxOvcdRDb zk9berts7PfJWpbYb6pY9aTJiB7/mUWzzvllshAernW9m6UZ22EchXrOwN64b3lXmdLNVgAsVyzk vC+V6Iue9wFWAwW8dGMXv9aCHg4tyEWfYa4roEfIZKBoY8SHv/y4mDsP/C9VaWpyqw9YJtjcvBIk +a0x210bc7oc84PeoLUeAK4DncF/i7t6QBFnf8KszULRdSQLiQ4qRV/LsQnEZ5fBKac5xynLBVYB RzFpnfmftmwafv5dmkBR9NpOscvCC2nroj9kc8fRAF5x6ZjKpAZcoXOnmDoIittaDitwQpY8Kwo8 yWKgmNmzcoBRDZ9BnrpOdQ6/Kht50BLNP2Kk70f8tTUcLI5PzDBhNRauTdXVuRg6569JpxiB3aQP NENXpQQWq36kZr7hO3GZwYJ9RNHILSgSQzO9s+jYaOdYiOxrzwq6uIyVW5YCLESDnR5YommNMggM a+9nT/Ic6sDUBVr9aOT0Gk/4TnEHlzooLRHraW8pN9S2iLiTGZX+CL4pn7bys4+k3L/MLV4mAPri 5AkTJsC6bl4Md5U3zGvUlz3r0E8QBFu4BKxrJq31Ru8ka9sSneuKyeqDeMdNxrIqJUDrB80MfNnu AJdMvN59mRU4LF9QPn X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= From: Yangyu Chen To: linux-riscv@lists.infradead.org Cc: Jisheng Zhang , Paul Walmsley , Palmer Dabbelt , Guo Ren , Alexandre Ghiti , linux-kernel@vger.kernel.org, Yangyu Chen Subject: [PATCH v2] riscv: mm: fix NOCACHE_THEAD does not set bit[61] correctly Date: Wed, 21 Feb 2024 11:02:31 +0800 X-OQ-MSGID: <20240221030231.3413066-1-cyy@cyyself.name> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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