From patchwork Wed Apr 2 15:08:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 14036171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 433D4C28B20 for ; Wed, 2 Apr 2025 15:08:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:From:To:MIME-Version:Date:Message-ID: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=S4CUB1/8jC5MVe5Jn+bG3EJG66LKcZZggF2WlMyncuI=; b=pnhUrHfSeMUf/o lEaL/1dHxtqsA3dcv4dGjSlDEKxHrsioIpOYLmH8oh3Ob83rv0LY3LRRBafxCUHqGk5KxlR6owPX3 5GHIsfxEFt2oODrFpPpQ7hDwO9f8P8Am29Gfvc09bfszbGPSMilmYxduGVssSfHyKsK5TgQ7Lf2h8 Nd1lnkD/gvpAHCmpeJWXmWVhWyLSS30s1hWdy/nYMoA8KaJOi2QFeYqysQDJ572mzeEXT2nxYTAUK oaBBovOhYvXCZOcJWKWfNnRn3BU7S0JE63rI4EGFLa/ShsTLu254uUfB+fiNUcT12QRri8omdOy/c JVHZ7GkDLJCID4suYQUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzzhP-00000006T9E-2j0P; Wed, 02 Apr 2025 15:08:15 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzzhM-00000006T58-0chJ for linux-riscv@lists.infradead.org; Wed, 02 Apr 2025 15:08:14 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id EAB5B4440C; Wed, 2 Apr 2025 15:08:07 +0000 (UTC) Message-ID: <5a05bc1e-c5d0-4bb9-9b76-e3da5f8b955f@ghiti.fr> Date: Wed, 2 Apr 2025 17:08:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Palmer Dabbelt , "linux-riscv@lists.infradead.org" From: Alexandre Ghiti Subject: [GIT PULL] RISC-V Patches for the 6.15 Merge Window, Part 2 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeehleekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfvhffutgfgsehtkeertddtvdejnecuhfhrohhmpeetlhgvgigrnhgurhgvucfihhhithhiuceorghlvgigsehghhhithhirdhfrheqnecuggftrfgrthhtvghrnhepvdelveekvdfhgeelieejhfetgeduteekhfeuheffjeduiefgtdfgtdeltdeftddunecuffhomhgrihhnpehkvghrnhgvlhdrohhrghdpghhithhhuhgsrdgtohhmpdhtshdrnhgvthenucfkphepfedurdefvddrkedurddukeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepfedurdefvddrkedurddukeejpdhhvghloheplgduledvrdduieekrddvuddrfedungdpmhgrihhlfhhrohhmpegrlhgvgiesghhhihhtihdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepphgrlhhmvghrsegurggssggvlhhtrdgtohhmpdhrtghpthhtoheplhhinhhugidqrhhishgtvheslhhishhtshdrihhnfhhrrgguvggrugdrohhrgh X-GND-Sasl: alex@ghiti.fr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250402_080812_324040_C1516ACC X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The following changes since commit 74f4bf9d15ad1d6862b828d486ed10ea0e874a23:   Merge patch series "riscv: Add runtime constant support" (2025-03-20 09:15:04 +0000) are available in the Git repository at:   git://git.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux tags/riscv-mw2-6.15-rc1 for you to fetch changes up to 6ee928185aeb0ff085c73ae2ee163d436eba8352:   riscv: Add norvc after .option arch in runtime const (2025-04-01 07:09:21 +0000) ---------------------------------------------------------------- riscv patches for 6.15-rc1, part 2 * A bunch of fixes:   - 2 fixes in the purgatory code which prevented kexec to work   - Workaround an issue with gcc-15 ---------------------------------------------------------------- All the patches have been tested on our github CI and no regressions were found against 6.14-rc7 (https://github.com/linux-riscv/linux/pull/215/checks whose results can be seen here https://mazarinen.tail1c623.ts.net/riscv-linux/linux-all/build/v6.14-rc7-64-g6ee928185aeb/). Please note that there is a bad merge between commit 2f4ab3ac10e1 ("mm: support tlbbatch flush for a range of PTEs") and commit d9be2b9b60497a ("riscv: Call secondary mmu notifier when flushing the tlb") in next-20250402 as reported here https://lore.kernel.org/linux-riscv/CA+G9fYug_77HoqyonvsnJiya2q+0-hf9k4Yjk_dDn7P91Sq+3A@mail.gmail.com/T/#u. The correct resolution is:  }  void arch_flush_tlb_batched_pending(struct mm_struct *mm) ---------------------------------------------------------------- Alexandre Ghiti (3):       riscv: Fix hugetlb retrieval of number of ptes in case of !present pte       Merge patch series "Add some validation for vector, vector crypto and fp stuff"       riscv: Make sure toolchain supports zba before using zba instructions Björn Töpel (1):       riscv/purgatory: 4B align purgatory_start Charlie Jenkins (1):       riscv: Add norvc after .option arch in runtime const Conor Dooley (6):       RISC-V: add vector extension validation checks       RISC-V: add vector crypto extension validation checks       RISC-V: add f & d extension validation checks       dt-bindings: riscv: d requires f       dt-bindings: riscv: add vector sub-extension dependencies       dt-bindings: riscv: document vector crypto requirements Ignacio Encinas (1):       selftests: riscv: fix v_exec_initval_nolibc.c Yao Zi (1):       riscv/kexec_file: Handle R_RISCV_64 in purgatory relocator Yunhui Cui (1):       riscv: print hartid on bringup  .../devicetree/bindings/riscv/extensions.yaml     |  85 +++++++++++  arch/riscv/Kconfig                                |   8 ++  arch/riscv/include/asm/cpufeature.h               |   3 +  arch/riscv/include/asm/runtime-const.h            |   7 +-  arch/riscv/kernel/cpufeature.c                    | 143 +++++++++++++------  arch/riscv/kernel/elf_kexec.c                     |   3 +  arch/riscv/kernel/smp.c                           |   2 +  arch/riscv/kernel/smpboot.c                       |   4 +  arch/riscv/mm/hugetlbpage.c                       |  76 ++++++----  arch/riscv/purgatory/entry.S                      |   1 +  .../riscv/vector/v_exec_initval_nolibc.c          |  10 +-  11 files changed, 262 insertions(+), 80 deletions(-) diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c index c25a40aa2fe05..c22d5eb2b1851 100644 --- a/arch/riscv/mm/tlbflush.c +++ b/arch/riscv/mm/tlbflush.c @@ -192,10 +192,9 @@ bool arch_tlbbatch_should_defer(struct mm_struct *mm)  void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,                 struct mm_struct *mm, unsigned long start, unsigned long end)  { -       unsigned long start = uaddr & PAGE_MASK; -         cpumask_or(&batch->cpumask, &batch->cpumask, mm_cpumask(mm)); -       mmu_notifier_arch_invalidate_secondary_tlbs(mm, start, start + PAGE_SIZE); +       mmu_notifier_arch_invalidate_secondary_tlbs(mm, start & PAGE_MASK, +                                                   (end & PAGE_MASK) + PAGE_SIZE);