[PATCH] powerpc/book3s64/hugetlb: Fix disabling hugetlb when fadump is active

2024-12-01 Thread Sourabh Jain
Commit 8597538712eb ("powerpc/fadump: Do not use hugepages when fadump is active") disabled hugetlb support when fadump is active by returning early from hugetlbpage_init():arch/powerpc/mm/hugetlbpage.c and not populating hpage_shift/HPAGE_SHIFT. Later, commit 2354ad252b66 ("powerpc/mm: Update def

[PATCH] dt-bindings: soc: fsl: cpm_qe: Limit matching to nodes with "fsl,qe"

2024-12-01 Thread Chen-Yu Tsai
Otherwise the binding matches against random nodes with "simple-bus" giving out all kinds of invalid warnings: $ make CHECK_DTBS=y mediatek/mt8188-evb.dtb SYNCinclude/config/auto.conf.cmd UPD include/config/kernel.release SCHEMA Documentation/devicetree/bindings/proc

[PATCH v4 03/19] lib/crc32: expose whether the lib is really optimized at runtime

2024-12-01 Thread Eric Biggers
From: Eric Biggers Make the CRC32 library export a function crc32_optimizations() which returns flags that indicate which CRC32 functions are actually executing optimized code at runtime. This will be used to determine whether the crc32[c]-$arch shash algorithms should be registered in the crypt

[PATCH v4 01/19] lib/crc32: drop leading underscores from __crc32c_le_base

2024-12-01 Thread Eric Biggers
From: Eric Biggers Remove the leading underscores from __crc32c_le_base(). This is in preparation for adding crc32c_le_arch() and eventually renaming __crc32c_le() to crc32c_le(). Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers --- arch/arm64/lib/crc32-glue.c | 2 +- arch/riscv/lib/c

[PATCH v4 17/19] jbd2: switch to using the crc32c library

2024-12-01 Thread Eric Biggers
From: Eric Biggers Now that the crc32c() library function directly takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32c(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-b

[PATCH v4 10/19] sparc/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the sparc CRC32C assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the

[PATCH v4 02/19] lib/crc32: improve support for arch-specific overrides

2024-12-01 Thread Eric Biggers
From: Eric Biggers Currently the CRC32 library functions are defined as weak symbols, and the arm64 and riscv architectures override them. This method of arch-specific overrides has the limitation that it only works when both the base and arch code is built-in. Also, it makes the arch-specific

[PATCH v4 00/19] Wire up CRC32 library functions to arch-optimized code

2024-12-01 Thread Eric Biggers
This patchset applies to v6.13-rc1 and is also available in git via: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crc32-lib-v4 CRC32 is a family of common non-cryptographic integrity check algorithms that are fairly fast with a portable C implementation and be

[PATCH v4 09/19] s390/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the s390 CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the ar

[PATCH v2 10/12] lib/crc32test: delete obsolete crc32test.c

2024-12-01 Thread Eric Biggers
From: Eric Biggers Delete crc32test.c, since it has been superseded by crc_kunit.c. Reviewed-by: Ard Biesheuvel Reviewed-by: Martin K. Petersen Cc: Vinicius Peixoto Signed-off-by: Eric Biggers --- arch/m68k/configs/amiga_defconfig| 1 - arch/m68k/configs/apollo_defconfig | 1 - ar

[PATCH v2 11/12] powerpc/crc: delete obsolete crc-vpmsum_test.c

2024-12-01 Thread Eric Biggers
From: Eric Biggers Delete crc-vpmsum_test.c, since its functionality is now covered by the new crc_kunit.c as well as the crypto subsystem's fuzz tests. Reviewed-by: Ard Biesheuvel Reviewed-by: Martin K. Petersen Cc: Vinicius Peixoto Signed-off-by: Eric Biggers --- arch/powerpc/configs/ppc6

[PATCH v2 12/12] MAINTAINERS: add entry for CRC library

2024-12-01 Thread Eric Biggers
From: Eric Biggers I am volunteering to maintain the kernel's CRC library code. Ard has volunteered to be a reviewer. Reviewed-by: Ard Biesheuvel Reviewed-by: Martin K. Petersen Signed-off-by: Eric Biggers --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAIN

[PATCH v2 08/12] lib/crc_kunit.c: add KUnit test suite for CRC library functions

2024-12-01 Thread Eric Biggers
From: Eric Biggers Add a KUnit test suite for the crc16, crc_t10dif, crc32_le, crc32_be, crc32c, and crc64_be library functions. It avoids code duplication by sharing most logic among all CRC variants. The test suite includes: - Differential fuzz test of each CRC function against a simple bi

[PATCH v2 09/12] lib/crc16_kunit: delete obsolete crc16_kunit.c

2024-12-01 Thread Eric Biggers
From: Eric Biggers This new test showed up in v6.13-rc1. Delete it since it is being superseded by crc_kunit.c, which is more comprehensive (tests multiple CRC variants without duplicating code, includes a benchmark, etc.). Cc: Vinicius Peixoto Signed-off-by: Eric Biggers --- lib/Kconfig.deb

[PATCH v2 07/12] powerpc/crc-t10dif: expose CRC-T10DIF function through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the powerpc CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus al

[PATCH v2 06/12] arm64/crc-t10dif: expose CRC-T10DIF function through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the arm64 CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all

[PATCH v2 05/12] arm/crc-t10dif: expose CRC-T10DIF function through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the arm CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all th

[PATCH v2 03/12] crypto: crct10dif - expose arch-optimized lib function

2024-12-01 Thread Eric Biggers
From: Eric Biggers Now that crc_t10dif_update() may be directly optimized for each architecture, make the shash driver for crct10dif register a crct10dif-$arch algorithm that uses it, instead of only crct10dif-generic which uses crc_t10dif_generic(). The result is that architecture-optimized crc

[PATCH v2 04/12] x86/crc-t10dif: expose CRC-T10DIF function through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the x86 CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all th

[PATCH v2 02/12] lib/crc-t10dif: add support for arch overrides

2024-12-01 Thread Eric Biggers
From: Eric Biggers Following what was done for CRC32, add support for architecture-specific override of the CRC-T10DIF library. This will allow the CRC-T10DIF library functions to access architecture-optimized code directly. Reviewed-by: Ard Biesheuvel Reviewed-by: Martin K. Petersen Signed-o

[PATCH v2 01/12] lib/crc-t10dif: stop wrapping the crypto API

2024-12-01 Thread Eric Biggers
From: Eric Biggers In preparation for making the CRC-T10DIF library directly optimized for each architecture, like what has been done for CRC32, get rid of the weird layering where crc_t10dif_update() calls into the crypto API. Instead, move crc_t10dif_generic() into the crc-t10dif library module

[PATCH v2 00/12] Wire up CRC-T10DIF library functions to arch-optimized code

2024-12-01 Thread Eric Biggers
This patchset is also available in git via: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crc-t10dif-lib-v2 This patchset updates the kernel's CRC-T10DIF library functions to be directly optimized for x86, arm, arm64, and powerpc without taking an unnecessary

[PATCH v4 11/19] x86/crc32: update prototype for crc_pcl()

2024-12-01 Thread Eric Biggers
From: Eric Biggers - Change the len parameter from unsigned int to size_t, so that the library function which takes a size_t can safely use this code. - Rename to crc32c_x86_3way() which is much clearer. - Move the crc parameter to the front, as this is the usual convention. Reviewed-by: Ard

[PATCH v4 07/19] mips/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the mips CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the ar

[PATCH v4 13/19] x86/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the x86 CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arc

[PATCH v4 19/19] scsi: target: iscsi: switch to using the crc32c library

2024-12-01 Thread Eric Biggers
From: Eric Biggers Now that the crc32c() library function directly takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32c(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-b

[PATCH v4 18/19] f2fs: switch to using the crc32 library

2024-12-01 Thread Eric Biggers
From: Eric Biggers Now that the crc32() library function takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-by: Ard Bies

[PATCH v4 16/19] ext4: switch to using the crc32c library

2024-12-01 Thread Eric Biggers
From: Eric Biggers Now that the crc32c() library function directly takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32c(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-b

[PATCH v4 14/19] bcachefs: Explicitly select CRYPTO from BCACHEFS_FS

2024-12-01 Thread Eric Biggers
From: Eric Biggers Explicitly select CRYPTO from BCACHEFS_FS, so that this dependency of CRYPTO_SHA256, CRYPTO_CHACHA20, and CRYPTO_POLY1305 (which are also selected) is satisfied. Currently this dependency is satisfied indirectly via LIBCRC32C, but this is fragile and is planned to change (http

[PATCH v4 12/19] x86/crc32: update prototype for crc32_pclmul_le_16()

2024-12-01 Thread Eric Biggers
From: Eric Biggers - Change the len parameter from unsigned int to size_t, so that the library function which takes a size_t can safely use this code. - Move the crc parameter to the front, as this is the usual convention. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers --- arch/x8

[PATCH v4 15/19] lib/crc32: make crc32c() go directly to lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Now that the lower level __crc32c_le() library function is optimized for each architecture, make crc32c() just call that instead of taking an inefficient and error-prone detour through the shash API. Note: a future cleanup should make crc32c_le() be the actual library function

[PATCH v4 06/19] loongarch/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the loongarch CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all t

[PATCH v4 08/19] powerpc/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the powerpc CRC32C assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all th

[PATCH v4 04/19] crypto: crc32 - don't unnecessarily register arch algorithms

2024-12-01 Thread Eric Biggers
From: Eric Biggers Instead of registering the crc32-$arch and crc32c-$arch algorithms if the arch-specific code was built, only register them when that code was built *and* is not falling back to the base implementation at runtime. This avoids confusing users like btrfs which checks the shash dr

[PATCH v4 05/19] arm/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers
From: Eric Biggers Move the arm CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arc

Re: [PATCH 2/3] powerpc: support dynamic preemption

2024-12-01 Thread Shrikanth Hegde
On 11/27/24 12:14, Christophe Leroy wrote: Le 25/11/2024 à 05:22, Shrikanth Hegde a écrit : Once the lazy preemption is supported, it would be desirable to change the preemption models at runtime. So this change adds support for dynamic preemption using DYNAMIC_KEY. In irq-exit to kernel p

Re: [PATCH v2 1/2] powerpc: Add preempt lazy support

2024-12-01 Thread Shrikanth Hegde
On 11/26/24 16:23, Christophe Leroy wrote: Le 16/11/2024 à 20:23, Shrikanth Hegde a écrit : Define preempt lazy bit for Powerpc. Use bit 9 which is free and within 16 bit range of NEED_RESCHED, so compiler can issue single andi. Since Powerpc doesn't use the generic entry/exit, add lazy ch

RE: [PATCH v4 1/2] kexec: Consolidate machine_kexec_mask_interrupts() implementation

2024-12-01 Thread Thomas Gleixner
On Sat, Nov 30 2024 at 20:08, Eliav Farber wrote: > On 11/29/2024 3:30 PM, Thomas Gleixner wrote: >> Looking deeper. This function actually cannot be called from this >> context. It does: >> >> irq_get_desc_buslock(irq, &flags, 0); >> >> which means for any interrupt which has an actual b