Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/xz: remove dead IA-64 (Itanium) support code

Support for the IA-64 (Itanium) architecture was removed in commit
cf8e8658100d ("arch: Remove Itanium (IA-64) architecture").

This patch drops the IA-64 specific decompression code from lib/xz, which
was conditionally compiled with the now-obsolete CONFIG_XZ_DEC_IA64
option.

Link: https://lkml.kernel.org/r/20251014052738.31185-1-spyjetfayed@gmail.com
Signed-off-by: Ankan Biswas <spyjetfayed@gmail.com>
Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Khalid Aziz <khalid@kernel.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Cc: David Hunter <david.hunter.linux@gmail.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Ankan Biswas and committed by
Andrew Morton
57f3d896 9544f9e6

-99
-95
lib/xz/xz_dec_bcj.c
··· 20 20 enum { 21 21 BCJ_X86 = 4, /* x86 or x86-64 */ 22 22 BCJ_POWERPC = 5, /* Big endian only */ 23 - BCJ_IA64 = 6, /* Big or little endian */ 24 23 BCJ_ARM = 7, /* Little endian only */ 25 24 BCJ_ARMTHUMB = 8, /* Little endian only */ 26 25 BCJ_SPARC = 9, /* Big or little endian */ ··· 172 173 instr &= 0x03FFFFFC; 173 174 instr |= 0x48000001; 174 175 put_unaligned_be32(instr, buf + i); 175 - } 176 - } 177 - 178 - return i; 179 - } 180 - #endif 181 - 182 - #ifdef XZ_DEC_IA64 183 - static size_t bcj_ia64(struct xz_dec_bcj *s, uint8_t *buf, size_t size) 184 - { 185 - static const uint8_t branch_table[32] = { 186 - 0, 0, 0, 0, 0, 0, 0, 0, 187 - 0, 0, 0, 0, 0, 0, 0, 0, 188 - 4, 4, 6, 6, 0, 0, 7, 7, 189 - 4, 4, 0, 0, 4, 4, 0, 0 190 - }; 191 - 192 - /* 193 - * The local variables take a little bit stack space, but it's less 194 - * than what LZMA2 decoder takes, so it doesn't make sense to reduce 195 - * stack usage here without doing that for the LZMA2 decoder too. 196 - */ 197 - 198 - /* Loop counters */ 199 - size_t i; 200 - size_t j; 201 - 202 - /* Instruction slot (0, 1, or 2) in the 128-bit instruction word */ 203 - uint32_t slot; 204 - 205 - /* Bitwise offset of the instruction indicated by slot */ 206 - uint32_t bit_pos; 207 - 208 - /* bit_pos split into byte and bit parts */ 209 - uint32_t byte_pos; 210 - uint32_t bit_res; 211 - 212 - /* Address part of an instruction */ 213 - uint32_t addr; 214 - 215 - /* Mask used to detect which instructions to convert */ 216 - uint32_t mask; 217 - 218 - /* 41-bit instruction stored somewhere in the lowest 48 bits */ 219 - uint64_t instr; 220 - 221 - /* Instruction normalized with bit_res for easier manipulation */ 222 - uint64_t norm; 223 - 224 - size &= ~(size_t)15; 225 - 226 - for (i = 0; i < size; i += 16) { 227 - mask = branch_table[buf[i] & 0x1F]; 228 - for (slot = 0, bit_pos = 5; slot < 3; ++slot, bit_pos += 41) { 229 - if (((mask >> slot) & 1) == 0) 230 - continue; 231 - 232 - byte_pos = bit_pos >> 3; 233 - bit_res = bit_pos & 7; 234 - instr = 0; 235 - for (j = 0; j < 6; ++j) 236 - instr |= (uint64_t)(buf[i + j + byte_pos]) 237 - << (8 * j); 238 - 239 - norm = instr >> bit_res; 240 - 241 - if (((norm >> 37) & 0x0F) == 0x05 242 - && ((norm >> 9) & 0x07) == 0) { 243 - addr = (norm >> 13) & 0x0FFFFF; 244 - addr |= ((uint32_t)(norm >> 36) & 1) << 20; 245 - addr <<= 4; 246 - addr -= s->pos + (uint32_t)i; 247 - addr >>= 4; 248 - 249 - norm &= ~((uint64_t)0x8FFFFF << 13); 250 - norm |= (uint64_t)(addr & 0x0FFFFF) << 13; 251 - norm |= (uint64_t)(addr & 0x100000) 252 - << (36 - 20); 253 - 254 - instr &= (1 << bit_res) - 1; 255 - instr |= norm << bit_res; 256 - 257 - for (j = 0; j < 6; j++) 258 - buf[i + j + byte_pos] 259 - = (uint8_t)(instr >> (8 * j)); 260 - } 261 176 } 262 177 } 263 178 ··· 422 509 filtered = bcj_powerpc(s, buf, size); 423 510 break; 424 511 #endif 425 - #ifdef XZ_DEC_IA64 426 - case BCJ_IA64: 427 - filtered = bcj_ia64(s, buf, size); 428 - break; 429 - #endif 430 512 #ifdef XZ_DEC_ARM 431 513 case BCJ_ARM: 432 514 filtered = bcj_arm(s, buf, size); ··· 606 698 #endif 607 699 #ifdef XZ_DEC_POWERPC 608 700 case BCJ_POWERPC: 609 - #endif 610 - #ifdef XZ_DEC_IA64 611 - case BCJ_IA64: 612 701 #endif 613 702 #ifdef XZ_DEC_ARM 614 703 case BCJ_ARM:
-4
lib/xz/xz_private.h
··· 24 24 # ifdef CONFIG_XZ_DEC_POWERPC 25 25 # define XZ_DEC_POWERPC 26 26 # endif 27 - # ifdef CONFIG_XZ_DEC_IA64 28 - # define XZ_DEC_IA64 29 - # endif 30 27 # ifdef CONFIG_XZ_DEC_ARM 31 28 # define XZ_DEC_ARM 32 29 # endif ··· 100 103 */ 101 104 #ifndef XZ_DEC_BCJ 102 105 # if defined(XZ_DEC_X86) || defined(XZ_DEC_POWERPC) \ 103 - || defined(XZ_DEC_IA64) \ 104 106 || defined(XZ_DEC_ARM) || defined(XZ_DEC_ARMTHUMB) \ 105 107 || defined(XZ_DEC_SPARC) || defined(XZ_DEC_ARM64) \ 106 108 || defined(XZ_DEC_RISCV)