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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'alpha-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha

Pull alpha fixes from Matt Turner:
"A few changes for alpha, including some important fixes for kernel
stack alignment"

* tag 'alpha-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
alpha: Use str_yes_no() helper in pci_dac_dma_supported()
alpha: Replace one-element array with flexible array member
alpha: align stack for page fault and user unaligned trap handlers
alpha: make stack 16-byte aligned (most cases)
alpha: replace hardcoded stack offsets with autogenerated ones

+22 -19
+1 -1
arch/alpha/include/asm/hwrpb.h
··· 135 135 /* virtual->physical map */ 136 136 unsigned long map_entries; 137 137 unsigned long map_pages; 138 - struct vf_map_struct map[1]; 138 + struct vf_map_struct map[]; 139 139 }; 140 140 141 141 struct memclust_struct {
+2
arch/alpha/include/uapi/asm/ptrace.h
··· 42 42 unsigned long trap_a0; 43 43 unsigned long trap_a1; 44 44 unsigned long trap_a2; 45 + /* This makes the stack 16-byte aligned as GCC expects */ 46 + unsigned long __pad0; 45 47 /* These are saved by PAL-code: */ 46 48 unsigned long ps; 47 49 unsigned long pc;
+4
arch/alpha/kernel/asm-offsets.c
··· 19 19 DEFINE(TI_STATUS, offsetof(struct thread_info, status)); 20 20 BLANK(); 21 21 22 + DEFINE(SP_OFF, offsetof(struct pt_regs, ps)); 22 23 DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); 24 + BLANK(); 25 + 26 + DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack)); 23 27 BLANK(); 24 28 25 29 DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
+10 -14
arch/alpha/kernel/entry.S
··· 15 15 .set noat 16 16 .cfi_sections .debug_frame 17 17 18 - /* Stack offsets. */ 19 - #define SP_OFF 184 20 - #define SWITCH_STACK_SIZE 64 21 - 22 18 .macro CFI_START_OSF_FRAME func 23 19 .align 4 24 20 .globl \func ··· 194 198 CFI_START_OSF_FRAME entMM 195 199 SAVE_ALL 196 200 /* save $9 - $15 so the inline exception code can manipulate them. */ 197 - subq $sp, 56, $sp 198 - .cfi_adjust_cfa_offset 56 201 + subq $sp, 64, $sp 202 + .cfi_adjust_cfa_offset 64 199 203 stq $9, 0($sp) 200 204 stq $10, 8($sp) 201 205 stq $11, 16($sp) ··· 210 214 .cfi_rel_offset $13, 32 211 215 .cfi_rel_offset $14, 40 212 216 .cfi_rel_offset $15, 48 213 - addq $sp, 56, $19 217 + addq $sp, 64, $19 214 218 /* handle the fault */ 215 219 lda $8, 0x3fff 216 220 bic $sp, $8, $8 ··· 223 227 ldq $13, 32($sp) 224 228 ldq $14, 40($sp) 225 229 ldq $15, 48($sp) 226 - addq $sp, 56, $sp 230 + addq $sp, 64, $sp 227 231 .cfi_restore $9 228 232 .cfi_restore $10 229 233 .cfi_restore $11 ··· 231 235 .cfi_restore $13 232 236 .cfi_restore $14 233 237 .cfi_restore $15 234 - .cfi_adjust_cfa_offset -56 238 + .cfi_adjust_cfa_offset -64 235 239 /* finish up the syscall as normal. */ 236 240 br ret_from_sys_call 237 241 CFI_END_OSF_FRAME entMM ··· 378 382 .cfi_restore $0 379 383 .cfi_adjust_cfa_offset -256 380 384 SAVE_ALL /* setup normal kernel stack */ 381 - lda $sp, -56($sp) 382 - .cfi_adjust_cfa_offset 56 385 + lda $sp, -64($sp) 386 + .cfi_adjust_cfa_offset 64 383 387 stq $9, 0($sp) 384 388 stq $10, 8($sp) 385 389 stq $11, 16($sp) ··· 395 399 .cfi_rel_offset $14, 40 396 400 .cfi_rel_offset $15, 48 397 401 lda $8, 0x3fff 398 - addq $sp, 56, $19 402 + addq $sp, 64, $19 399 403 bic $sp, $8, $8 400 404 jsr $26, do_entUnaUser 401 405 ldq $9, 0($sp) ··· 405 409 ldq $13, 32($sp) 406 410 ldq $14, 40($sp) 407 411 ldq $15, 48($sp) 408 - lda $sp, 56($sp) 412 + lda $sp, 64($sp) 409 413 .cfi_restore $9 410 414 .cfi_restore $10 411 415 .cfi_restore $11 ··· 413 417 .cfi_restore $13 414 418 .cfi_restore $14 415 419 .cfi_restore $15 416 - .cfi_adjust_cfa_offset -56 420 + .cfi_adjust_cfa_offset -64 417 421 br ret_from_sys_call 418 422 CFI_END_OSF_FRAME entUna 419 423
+2 -1
arch/alpha/kernel/pci_iommu.c
··· 13 13 #include <linux/log2.h> 14 14 #include <linux/dma-map-ops.h> 15 15 #include <linux/iommu-helper.h> 16 + #include <linux/string_choices.h> 16 17 17 18 #include <asm/io.h> 18 19 #include <asm/hwrpb.h> ··· 213 212 214 213 /* If both conditions above are met, we are fine. */ 215 214 DBGA("pci_dac_dma_supported %s from %ps\n", 216 - ok ? "yes" : "no", __builtin_return_address(0)); 215 + str_yes_no(ok), __builtin_return_address(0)); 217 216 218 217 return ok; 219 218 }
+1 -1
arch/alpha/kernel/traps.c
··· 649 649 static int unauser_reg_offsets[32] = { 650 650 R(r0), R(r1), R(r2), R(r3), R(r4), R(r5), R(r6), R(r7), R(r8), 651 651 /* r9 ... r15 are stored in front of regs. */ 652 - -56, -48, -40, -32, -24, -16, -8, 652 + -64, -56, -48, -40, -32, -24, -16, /* padding at -8 */ 653 653 R(r16), R(r17), R(r18), 654 654 R(r19), R(r20), R(r21), R(r22), R(r23), R(r24), R(r25), R(r26), 655 655 R(r27), R(r28), R(gp),
+2 -2
arch/alpha/mm/fault.c
··· 78 78 79 79 /* Macro for exception fixup code to access integer registers. */ 80 80 #define dpf_reg(r) \ 81 - (((unsigned long *)regs)[(r) <= 8 ? (r) : (r) <= 15 ? (r)-16 : \ 82 - (r) <= 18 ? (r)+10 : (r)-10]) 81 + (((unsigned long *)regs)[(r) <= 8 ? (r) : (r) <= 15 ? (r)-17 : \ 82 + (r) <= 18 ? (r)+11 : (r)-10]) 83 83 84 84 asmlinkage void 85 85 do_page_fault(unsigned long address, unsigned long mmcsr,