Message ID | 20231123065708.91345-10-luxu.kernel@bytedance.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp262059vqx; Wed, 22 Nov 2023 22:59:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHT3XWLwry+xWHk2ZzpPlgyXP08zqckiJBlCu5astpTgbwcwdRiUhts12/HhFKEyoDD48Qy X-Received: by 2002:a9d:65c4:0:b0:6c6:4473:6f05 with SMTP id z4-20020a9d65c4000000b006c644736f05mr4898192oth.9.1700722768401; Wed, 22 Nov 2023 22:59:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700722768; cv=none; d=google.com; s=arc-20160816; b=Jld82wfMTfaGpQjDor5G12f+Aapez6f+KhX59eUUjMPI7j8P9W+qm7sbgMXu0uMPDH G3I/uG2qHL077ogx3SujThOiJaypLW0ZGe0Xh0YZyo9T9nLo0+BrSfHEa8F3lofPvf1F KOikgNBFKTOBa0sDbSQLMvqIcJ1G07dXjkOi/U8kqABczicFL7SPQucSNb6gYwyJqVnx wHxrqc6BAHVjG+I2Ovl85++cQg2Y7URhyz3anJFbqwvbsLLNvpSg2CYRD0MvQ6vAU6HC hjE2SKQ+Fm5TlX0pG5I542FuKFrSDeLHlZjgrJo+UTj2fwXBahlmJtuvqjpLfagaViC2 /P8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xy98WgGNwj9rOwWzhsI6VzEfMnk+JFUolM0E3kCQh54=; fh=lDvMTZMBKweKvOrJ9wQD/BR+dk+xQF4teciUGM79mGM=; b=rtRxrKhbZeA9qcg2EgrUHjHDcl7jBX41v+P0TUizEipATPBdjDj1xqhVIqxdcSXpHe /PUlet+wWYKbcznpprX8djOl6B1FwFCc0ed/mTGBf5rEKGc3bVgMy6UsyhnWfRBbDWRx NSy3BZ0AHGGzIk5oQohYwyvc/Fwwc5p6/BDcUIWynna1Z1ecxKTn18O9uRMNZhKkerVM oDOMF253tE0PVOgYs6RiiBOOmiEtP9yCuHvtHSxUeKcaFt4LTfw7DZuMvhUyhPJbHVv+ nqdKgDUpzsDEIbKrtmKC2N9CtbzC0fOAIO6AQUVQI0m+fcrElpuEz6d0w/C1jCvbefJd 22Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="MB/rSC/3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id m129-20020a632687000000b005a9b0fe6afbsi771477pgm.144.2023.11.22.22.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 22:59:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="MB/rSC/3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id BF20C807FD63; Wed, 22 Nov 2023 22:59:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344845AbjKWG7I (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Thu, 23 Nov 2023 01:59:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233005AbjKWG6m (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Nov 2023 01:58:42 -0500 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89E8D173A for <linux-kernel@vger.kernel.org>; Wed, 22 Nov 2023 22:58:15 -0800 (PST) Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3b2f4a5ccebso397698b6e.3 for <linux-kernel@vger.kernel.org>; Wed, 22 Nov 2023 22:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1700722695; x=1701327495; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xy98WgGNwj9rOwWzhsI6VzEfMnk+JFUolM0E3kCQh54=; b=MB/rSC/3YZADVKTafFmvFV3jrY93Z0k8QNx3OSQcfLT/4ksxpUwtrwR3SmnG8TPxYx fq/ayY6XLaToLZ7QVLJoqphbgRrgYVtjqHEA7j2kvLBi+2OwhIt7fK3kUnBGv4z36PYb RTj2fTGlHpY/hExfVb3KJOhTIZS9Kxb8mqa+Ow7NKwov2UHX8M/6FCjZmI4k4yIdmHsP E38IHohxg3UvBdQoP78c8wiNIltyvITUyh8euXvqbxNzEU6G7ZK5F665jEK9VYgb5z33 XtnAKDtuKujnojVMEaV+YSsmiN2gbRiiNpFV4EXAHcXeuSS8nNVw7cFY0R9Aa9+QkLV8 1ekQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700722695; x=1701327495; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xy98WgGNwj9rOwWzhsI6VzEfMnk+JFUolM0E3kCQh54=; b=EW8C7hTHuHb/XJLbGkliqKV5aVZFSfyp68KrSx6rEoYMY1rZy/3OjnLrgF78ebaQ8K DFMUtaf1S/erYqWb/198Iaz4S7xGpvd9Oj/1G/aBzwf5poOF2ca9pIks+s8lQVA2hVeK Y3/0vd/iembImm5JJ34t7ctxYdTxp/O6SeSWv/RNtUFY/KPgKKyDS3Pjtr47a8rCjBid rmjFsKtAOV2SlftZMsWfBy6eG25YVtUw6+dlm5dhjlSJGFUzACokD/8EZGXhfWRuYE5g rFWvCPhyCuB1Uymz9MG2KSgZi1Zrxt1Vmv/r6G0BpwKYLuUxsjpRjYXW6xoLJE6wJHlG kEcA== X-Gm-Message-State: AOJu0Yw5+79+K70raMuyMfkVBBncbC/gWbpgbSJIVQoXtO2fmiuHNn3S evxJ/iHscl/yaNJxHncK8jCJNg== X-Received: by 2002:a05:6808:ab8:b0:3b2:f557:666e with SMTP id r24-20020a0568080ab800b003b2f557666emr5093225oij.19.1700722694829; Wed, 22 Nov 2023 22:58:14 -0800 (PST) Received: from J9GPGXL7NT.bytedance.net ([139.177.225.230]) by smtp.gmail.com with ESMTPSA id w37-20020a634765000000b005bd2b3a03eesm615437pgk.6.2023.11.22.22.58.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 22:58:14 -0800 (PST) From: Xu Lu <luxu.kernel@bytedance.com> To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, ardb@kernel.org, anup@brainfault.org, atishp@atishpatra.org Cc: dengliang.1214@bytedance.com, xieyongji@bytedance.com, lihangjing@bytedance.com, songmuchun@bytedance.com, punit.agrawal@bytedance.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Xu Lu <luxu.kernel@bytedance.com> Subject: [RFC PATCH V1 09/11] riscv: Adjust fix_btmap slots number to match variable page size Date: Thu, 23 Nov 2023 14:57:06 +0800 Message-Id: <20231123065708.91345-10-luxu.kernel@bytedance.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20231123065708.91345-1-luxu.kernel@bytedance.com> References: <20231123065708.91345-1-luxu.kernel@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 22 Nov 2023 22:59:26 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783337077190518200 X-GMAIL-MSGID: 1783337077190518200 |
Series |
riscv: Introduce 64K base page
|
|
Commit Message
Xu Lu
Nov. 23, 2023, 6:57 a.m. UTC
The existing fixmap slot number will cause the fixmap size to exceed
FIX_FDT_SIZE when base page becomes larger than 4K. This patch adjusts
the slot number to make them always match.
Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
---
arch/riscv/include/asm/fixmap.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/fixmap.h b/arch/riscv/include/asm/fixmap.h index 0a55099bb734..17bf31334bd5 100644 --- a/arch/riscv/include/asm/fixmap.h +++ b/arch/riscv/include/asm/fixmap.h @@ -44,7 +44,8 @@ enum fixed_addresses { * before ioremap() is functional. */ #define NR_FIX_BTMAPS (SZ_256K / PAGE_SIZE) -#define FIX_BTMAPS_SLOTS 7 +#define FIX_BTMAPS_SIZE (FIXADDR_SIZE - ((FIX_BTMAP_END + 1) << PAGE_SHIFT)) +#define FIX_BTMAPS_SLOTS (FIX_BTMAPS_SIZE / SZ_256K) #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) FIX_BTMAP_END = __end_of_permanent_fixed_addresses,