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 'powerpc-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
"This is a bit of a big batch for rc4, but just due to holiday hangover
and because I didn't send any fixes last week due to a late revert
request. I think next week should be back to normal.

- Fix ftrace bug on boot caused by exit text sections with
'-fpatchable-function-entry'

- Fix accuracy of stolen time on pseries since the switch to
VIRT_CPU_ACCOUNTING_GEN

- Fix a crash in the IOMMU code when doing DLPAR remove

- Set pt_regs->link on scv entry to fix BPF stack unwinding

- Add missing PPC_FEATURE_BOOKE on 64-bit e5500/e6500, which broke
gdb

- Fix boot on some 6xx platforms with STRICT_KERNEL_RWX enabled

- Fix build failures with KASAN enabled and 32KB stack size

- Some other minor fixes

Thanks to Arnd Bergmann, Benjamin Gray, Christophe Leroy, David
Engraf, Gaurav Batra, Jason Gunthorpe, Jiangfeng Xiao, Matthias
Schiffer, Nathan Lynch, Naveen N Rao, Nicholas Piggin, Nysal Jan K.A,
R Nageswara Sastry, Shivaprasad G Bhat, Shrikanth Hegde, Spoorthy,
Srikar Dronamraju, and Venkat Rao Bagalkote"

* tag 'powerpc-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach
powerpc/pseries: fix accuracy of stolen time
powerpc/ftrace: Ignore ftrace locations in exit text sections
powerpc/cputable: Add missing PPC_FEATURE_BOOKE on PPC64 Book-E
powerpc/kasan: Limit KASAN thread size increase to 32KB
Revert "powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add"
powerpc: 85xx: mark local functions static
powerpc: udbg_memcons: mark functions static
powerpc/kasan: Fix addr error caused by page alignment
powerpc/6xx: set High BAT Enable flag on G2_LE cores
selftests/powerpc/papr_vpd: Check devfd before get_system_loc_code()
powerpc/64: Set task pt_regs->link to the LR value on scv entry
powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add
powerpc/pseries/papr-sysparm: use u8 arrays for payloads

+77 -33
+2 -8
arch/powerpc/include/asm/ftrace.h
··· 20 20 #ifndef __ASSEMBLY__ 21 21 extern void _mcount(void); 22 22 23 - static inline unsigned long ftrace_call_adjust(unsigned long addr) 24 - { 25 - if (IS_ENABLED(CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY)) 26 - addr += MCOUNT_INSN_SIZE; 27 - 28 - return addr; 29 - } 30 - 31 23 unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip, 32 24 unsigned long sp); 33 25 ··· 134 142 #ifdef CONFIG_FUNCTION_TRACER 135 143 extern unsigned int ftrace_tramp_text[], ftrace_tramp_init[]; 136 144 void ftrace_free_init_tramp(void); 145 + unsigned long ftrace_call_adjust(unsigned long addr); 137 146 #else 138 147 static inline void ftrace_free_init_tramp(void) { } 148 + static inline unsigned long ftrace_call_adjust(unsigned long addr) { return addr; } 139 149 #endif 140 150 #endif /* !__ASSEMBLY__ */ 141 151
+1 -1
arch/powerpc/include/asm/papr-sysparm.h
··· 32 32 */ 33 33 struct papr_sysparm_buf { 34 34 __be16 len; 35 - char val[PAPR_SYSPARM_MAX_OUTPUT]; 35 + u8 val[PAPR_SYSPARM_MAX_OUTPUT]; 36 36 }; 37 37 38 38 struct papr_sysparm_buf *papr_sysparm_buf_alloc(void);
+2
arch/powerpc/include/asm/reg.h
··· 617 617 #endif 618 618 #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ 619 619 #define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ 620 + #define SPRN_HID2_G2_LE 0x3F3 /* G2_LE HID2 Register */ 621 + #define HID2_G2_LE_HBE (1<<18) /* High BAT Enable (G2_LE) */ 620 622 #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ 621 623 #define SPRN_IABR2 0x3FA /* 83xx */ 622 624 #define SPRN_IBCR 0x135 /* 83xx Insn Breakpoint Control Reg */
+1
arch/powerpc/include/asm/sections.h
··· 14 14 15 15 extern char __head_end[]; 16 16 extern char __srwx_boundary[]; 17 + extern char __exittext_begin[], __exittext_end[]; 17 18 18 19 /* Patch sites */ 19 20 extern s32 patch__call_flush_branch_caches1;
+1 -1
arch/powerpc/include/asm/thread_info.h
··· 14 14 15 15 #ifdef __KERNEL__ 16 16 17 - #ifdef CONFIG_KASAN 17 + #if defined(CONFIG_KASAN) && CONFIG_THREAD_SHIFT < 15 18 18 #define MIN_THREAD_SHIFT (CONFIG_THREAD_SHIFT + 1) 19 19 #else 20 20 #define MIN_THREAD_SHIFT CONFIG_THREAD_SHIFT
+1 -1
arch/powerpc/include/uapi/asm/papr-sysparm.h
··· 14 14 struct papr_sysparm_io_block { 15 15 __u32 parameter; 16 16 __u16 length; 17 - char data[PAPR_SYSPARM_MAX_OUTPUT]; 17 + __u8 data[PAPR_SYSPARM_MAX_OUTPUT]; 18 18 }; 19 19 20 20 /**
+19 -1
arch/powerpc/kernel/cpu_setup_6xx.S
··· 26 26 bl __init_fpu_registers 27 27 END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE) 28 28 bl setup_common_caches 29 + 30 + /* 31 + * This assumes that all cores using __setup_cpu_603 with 32 + * MMU_FTR_USE_HIGH_BATS are G2_LE compatible 33 + */ 34 + BEGIN_MMU_FTR_SECTION 35 + bl setup_g2_le_hid2 36 + END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS) 37 + 29 38 mtlr r5 30 39 blr 31 40 _GLOBAL(__setup_cpu_604) ··· 123 114 isync 124 115 blr 125 116 SYM_FUNC_END(setup_604_hid0) 117 + 118 + /* Enable high BATs for G2_LE and derivatives like e300cX */ 119 + SYM_FUNC_START_LOCAL(setup_g2_le_hid2) 120 + mfspr r11,SPRN_HID2_G2_LE 121 + oris r11,r11,HID2_G2_LE_HBE@h 122 + mtspr SPRN_HID2_G2_LE,r11 123 + sync 124 + isync 125 + blr 126 + SYM_FUNC_END(setup_g2_le_hid2) 126 127 127 128 /* 7400 <= rev 2.7 and 7410 rev = 1.0 suffer from some 128 129 * erratas we work around here. ··· 514 495 mtcr r7 515 496 blr 516 497 _ASM_NOKPROBE_SYMBOL(__restore_cpu_setup) 517 -
+2 -1
arch/powerpc/kernel/cpu_specs_e500mc.h
··· 8 8 9 9 #ifdef CONFIG_PPC64 10 10 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 11 - PPC_FEATURE_HAS_FPU | PPC_FEATURE_64) 11 + PPC_FEATURE_HAS_FPU | PPC_FEATURE_64 | \ 12 + PPC_FEATURE_BOOKE) 12 13 #else 13 14 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 14 15 PPC_FEATURE_BOOKE)
+2 -2
arch/powerpc/kernel/interrupt_64.S
··· 52 52 mr r10,r1 53 53 ld r1,PACAKSAVE(r13) 54 54 std r10,0(r1) 55 - std r11,_NIP(r1) 55 + std r11,_LINK(r1) 56 + std r11,_NIP(r1) /* Saved LR is also the next instruction */ 56 57 std r12,_MSR(r1) 57 58 std r0,GPR0(r1) 58 59 std r10,GPR1(r1) ··· 71 70 std r9,GPR13(r1) 72 71 SAVE_NVGPRS(r1) 73 72 std r11,_XER(r1) 74 - std r11,_LINK(r1) 75 73 std r11,_CTR(r1) 76 74 77 75 li r11,\trapnr
+3 -1
arch/powerpc/kernel/iommu.c
··· 1289 1289 struct iommu_table_group *table_group; 1290 1290 1291 1291 /* At first attach the ownership is already set */ 1292 - if (!domain) 1292 + if (!domain) { 1293 + iommu_group_put(grp); 1293 1294 return 0; 1295 + } 1294 1296 1295 1297 table_group = iommu_group_get_iommudata(grp); 1296 1298 /*
+12
arch/powerpc/kernel/trace/ftrace.c
··· 27 27 #include <asm/ftrace.h> 28 28 #include <asm/syscall.h> 29 29 #include <asm/inst.h> 30 + #include <asm/sections.h> 30 31 31 32 #define NUM_FTRACE_TRAMPS 2 32 33 static unsigned long ftrace_tramps[NUM_FTRACE_TRAMPS]; 34 + 35 + unsigned long ftrace_call_adjust(unsigned long addr) 36 + { 37 + if (addr >= (unsigned long)__exittext_begin && addr < (unsigned long)__exittext_end) 38 + return 0; 39 + 40 + if (IS_ENABLED(CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY)) 41 + addr += MCOUNT_INSN_SIZE; 42 + 43 + return addr; 44 + } 33 45 34 46 static ppc_inst_t ftrace_create_branch_inst(unsigned long ip, unsigned long addr, int link) 35 47 {
+5
arch/powerpc/kernel/trace/ftrace_64_pg.c
··· 37 37 #define NUM_FTRACE_TRAMPS 8 38 38 static unsigned long ftrace_tramps[NUM_FTRACE_TRAMPS]; 39 39 40 + unsigned long ftrace_call_adjust(unsigned long addr) 41 + { 42 + return addr; 43 + } 44 + 40 45 static ppc_inst_t 41 46 ftrace_call_replace(unsigned long ip, unsigned long addr, int link) 42 47 {
+2
arch/powerpc/kernel/vmlinux.lds.S
··· 281 281 * to deal with references from __bug_table 282 282 */ 283 283 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { 284 + __exittext_begin = .; 284 285 EXIT_TEXT 286 + __exittext_end = .; 285 287 } 286 288 287 289 . = ALIGN(PAGE_SIZE);
+1
arch/powerpc/mm/kasan/init_32.c
··· 64 64 if (ret) 65 65 return ret; 66 66 67 + k_start = k_start & PAGE_MASK; 67 68 block = memblock_alloc(k_end - k_start, PAGE_SIZE); 68 69 if (!block) 69 70 return -ENOMEM;
+1 -1
arch/powerpc/platforms/85xx/mpc8536_ds.c
··· 27 27 28 28 #include "mpc85xx.h" 29 29 30 - void __init mpc8536_ds_pic_init(void) 30 + static void __init mpc8536_ds_pic_init(void) 31 31 { 32 32 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN, 33 33 0, 256, " OpenPIC ");
+1 -1
arch/powerpc/platforms/85xx/mvme2500.c
··· 21 21 22 22 #include "mpc85xx.h" 23 23 24 - void __init mvme2500_pic_init(void) 24 + static void __init mvme2500_pic_init(void) 25 25 { 26 26 struct mpic *mpic = mpic_alloc(NULL, 0, 27 27 MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU,
+1 -1
arch/powerpc/platforms/85xx/p1010rdb.c
··· 24 24 25 25 #include "mpc85xx.h" 26 26 27 - void __init p1010_rdb_pic_init(void) 27 + static void __init p1010_rdb_pic_init(void) 28 28 { 29 29 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 30 30 MPIC_SINGLE_DEST_CPU,
+3 -3
arch/powerpc/platforms/85xx/p1022_ds.c
··· 370 370 * 371 371 * @pixclock: the wavelength, in picoseconds, of the clock 372 372 */ 373 - void p1022ds_set_pixel_clock(unsigned int pixclock) 373 + static void p1022ds_set_pixel_clock(unsigned int pixclock) 374 374 { 375 375 struct device_node *guts_np = NULL; 376 376 struct ccsr_guts __iomem *guts; ··· 418 418 /** 419 419 * p1022ds_valid_monitor_port: set the monitor port for sysfs 420 420 */ 421 - enum fsl_diu_monitor_port 421 + static enum fsl_diu_monitor_port 422 422 p1022ds_valid_monitor_port(enum fsl_diu_monitor_port port) 423 423 { 424 424 switch (port) { ··· 432 432 433 433 #endif 434 434 435 - void __init p1022_ds_pic_init(void) 435 + static void __init p1022_ds_pic_init(void) 436 436 { 437 437 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 438 438 MPIC_SINGLE_DEST_CPU,
+3 -3
arch/powerpc/platforms/85xx/p1022_rdk.c
··· 40 40 * 41 41 * @pixclock: the wavelength, in picoseconds, of the clock 42 42 */ 43 - void p1022rdk_set_pixel_clock(unsigned int pixclock) 43 + static void p1022rdk_set_pixel_clock(unsigned int pixclock) 44 44 { 45 45 struct device_node *guts_np = NULL; 46 46 struct ccsr_guts __iomem *guts; ··· 88 88 /** 89 89 * p1022rdk_valid_monitor_port: set the monitor port for sysfs 90 90 */ 91 - enum fsl_diu_monitor_port 91 + static enum fsl_diu_monitor_port 92 92 p1022rdk_valid_monitor_port(enum fsl_diu_monitor_port port) 93 93 { 94 94 return FSL_DIU_PORT_DVI; ··· 96 96 97 97 #endif 98 98 99 - void __init p1022_rdk_pic_init(void) 99 + static void __init p1022_rdk_pic_init(void) 100 100 { 101 101 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 102 102 MPIC_SINGLE_DEST_CPU,
+2
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
··· 8 8 #include <linux/of_irq.h> 9 9 #include <linux/io.h> 10 10 11 + #include "socrates_fpga_pic.h" 12 + 11 13 /* 12 14 * The FPGA supports 9 interrupt sources, which can be routed to 3 13 15 * interrupt request lines of the MPIC. The line to be used can be
+1 -1
arch/powerpc/platforms/85xx/xes_mpc85xx.c
··· 37 37 #define MPC85xx_L2CTL_L2I 0x40000000 /* L2 flash invalidate */ 38 38 #define MPC85xx_L2CTL_L2SIZ_MASK 0x30000000 /* L2 SRAM size (R/O) */ 39 39 40 - void __init xes_mpc85xx_pic_init(void) 40 + static void __init xes_mpc85xx_pic_init(void) 41 41 { 42 42 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN, 43 43 0, 256, " OpenPIC ");
+6 -2
arch/powerpc/platforms/pseries/lpar.c
··· 662 662 { 663 663 struct lppaca *lppaca = &lppaca_of(cpu); 664 664 665 - return be64_to_cpu(READ_ONCE(lppaca->enqueue_dispatch_tb)) + 666 - be64_to_cpu(READ_ONCE(lppaca->ready_enqueue_tb)); 665 + /* 666 + * VPA steal time counters are reported at TB frequency. Hence do a 667 + * conversion to ns before returning 668 + */ 669 + return tb_to_ns(be64_to_cpu(READ_ONCE(lppaca->enqueue_dispatch_tb)) + 670 + be64_to_cpu(READ_ONCE(lppaca->ready_enqueue_tb))); 667 671 } 668 672 #endif 669 673
+3 -3
arch/powerpc/sysdev/udbg_memcons.c
··· 41 41 .input_end = &memcons_input[CONFIG_PPC_MEMCONS_INPUT_SIZE], 42 42 }; 43 43 44 - void memcons_putc(char c) 44 + static void memcons_putc(char c) 45 45 { 46 46 char *new_output_pos; 47 47 ··· 54 54 memcons.output_pos = new_output_pos; 55 55 } 56 56 57 - int memcons_getc_poll(void) 57 + static int memcons_getc_poll(void) 58 58 { 59 59 char c; 60 60 char *new_input_pos; ··· 77 77 return -1; 78 78 } 79 79 80 - int memcons_getc(void) 80 + static int memcons_getc(void) 81 81 { 82 82 int c; 83 83
+2 -2
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
··· 263 263 off_t size; 264 264 int fd; 265 265 266 - SKIP_IF_MSG(get_system_loc_code(&lc), 267 - "Cannot determine system location code"); 268 266 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, 269 267 DEVPATH " not present"); 268 + SKIP_IF_MSG(get_system_loc_code(&lc), 269 + "Cannot determine system location code"); 270 270 271 271 FAIL_IF(devfd < 0); 272 272