lib/xz: Add ARM64 BCJ filter
Quoted 4 lines · On Wed, 8 Nov 2023 19:44:48 +0200 Lasse Collin <[email protected]> wrote:
ARM64 kernel decompression is done by bootloaders but the filter can still be useful, for example, for Squashfs.
A duplicated check for
XZ_DEC_ARMinxz_private.hwas omitted too.
There's nothing here that uses the new functionality?
Is a squashfs patch expected?
Lasse Collin
maintainerPATCH 1/1 lib/xz: Add ARM64 BCJ filter
From: Lasse Collin <[email protected]>
ARM64 kernel decompression is done by bootloaders but the filter can still be useful, for example, for Squashfs.
A duplicated check for XZ_DEC_ARM in xz_private.h was omitted too.
---
lib/xz/Kconfig | 5 +++++ lib/xz/xz_dec_bcj.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- lib/xz/xz_private.h | 7 +++++-- 3 files changed, 59 insertions(+), 3 deletions(-)
lib/xz/Kconfig +5 -0
@@ -34,6 +34,11 @@ config XZ_DEC_ARMTHUMB default y select XZ_DEC_BCJ +config XZ_DEC_ARM64 + bool "ARM64 BCJ filter decoder" if EXPERT + default y + select XZ_DEC_BCJ + config XZ_DEC_SPARC bool "SPARC BCJ filter decoder" if EXPERT default y
lib/xz/xz_dec_bcj.c +49 -1
74 lines not on this page · raw message
lib/xz/xz_private.h +5 -2
@@ -37,6 +37,9 @@# ifdef CONFIG_XZ_DEC_SPARC # define XZ_DEC_SPARC # endif +# ifdef CONFIG_XZ_DEC_ARM64 +# define XZ_DEC_ARM64 +# endif # ifdef CONFIG_XZ_DEC_MICROLZMA # define XZ_DEC_MICROLZMA # endif
@@ -98,9 +101,9 @@*/ #ifndef XZ_DEC_BCJ # if defined(XZ_DEC_X86 ) || defined(XZ_DEC_POWERPC ) \ - || defined(XZ_DEC_IA64 ) || defined(XZ_DEC_ARM ) \ + || defined(XZ_DEC_IA64 ) \ || defined(XZ_DEC_ARM ) || defined(XZ_DEC_ARMTHUMB ) \ - || defined(XZ_DEC_SPARC ) + || defined(XZ_DEC_SPARC ) || defined(XZ_DEC_ARM64 )# define XZ_DEC_BCJ # endif #endif
Lasse Collin
maintainerQuoted 11 lines · On 2023-11-08 Andrew Morton wrote:
Quoted 4 lines · On Wed, 8 Nov 2023 19:44:48 +0200 Lasse Collin <[email protected]> wrote:
ARM64 kernel decompression is done by bootloaders but the filter can still be useful, for example, for Squashfs.
A duplicated check for
XZ_DEC_ARMinxz_private.hwas omitted too.There's nothing here that uses the new functionality?
Is a squashfs patch expected?
I need to send a patch to mksquashfs. In the kernel the XZ filters are handled by the XZ code, so Squashfs in the kernel needs no changes.
Initramfs can use the filters if initramfs contains a significant amount of executable code. There are practical reasons why it's not commonly done on other archs though. The main one is that kernel modules shouldn't be filtered (worse compression). There are plans to improve the compression tools to make this easier (it would help in other contexts too) but it will take time.
Signature · 1 line
Lasse Collin