Skip to content

Commit 95ec54a

Browse files
committed
Merge tag 'powerpc-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Madhavan Srinivasan: - Add preempt lazy support - Deprecate cxl and cxl flash driver - Fix a possible IOMMU related OOPS at boot on pSeries - Optimize sched_clock() in ppc32 by replacing mulhdu() by mul_u64_u64_shr() Thanks to Andrew Donnellan, Andy Shevchenko, Ankur Arora, Christophe Leroy, Frederic Barrat, Gaurav Batra, Luis Felipe Hernandez, Michael Ellerman, Nilay Shroff, Ricardo B. Marliere, Ritesh Harjani (IBM), Sebastian Andrzej Siewior, Shrikanth Hegde, Sourabh Jain, Thorsten Blum, and Zhu Jun. * tag 'powerpc-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: selftests/powerpc: Fix argument order to timer_sub() powerpc/prom_init: Use IS_ENABLED() powerpc/pseries/iommu: IOMMU incorrectly marks MMIO range in DDW powerpc: Use str_on_off() helper in check_cache_coherency() powerpc: Large user copy aware of full:rt:lazy preemption powerpc: Add preempt lazy support powerpc/book3s64/hugetlb: Fix disabling hugetlb when fadump is active powerpc/vdso: Mark the vDSO code read-only after init powerpc/64: Use get_user() in start_thread() macintosh: declare ctl_table as const selftest/powerpc/ptrace: Cleanup duplicate macro definitions selftest/powerpc/ptrace/ptrace-pkey: Remove duplicate macros selftest/powerpc/ptrace/core-pkey: Remove duplicate macros powerpc/8xx: Drop legacy-of-mm-gpiochip.h header scsi/cxlflash: Deprecate driver cxl: Deprecate driver selftests/powerpc: Fix typo in test-vphn.c powerpc/xmon: Use str_yes_no() helper in dump_one_paca() powerpc/32: Replace mulhdu() by mul_u64_u64_shr()
2 parents 9ad09c4 + 2bf66e6 commit 95ec54a

File tree

29 files changed

+142
-194
lines changed

29 files changed

+142
-194
lines changed

Documentation/ABI/testing/sysfs-class-cxl renamed to Documentation/ABI/obsolete/sysfs-class-cxl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
The cxl driver is no longer maintained, and will be removed from the kernel in
2+
the near future.
3+
14
Please note that attributes that are shared between devices are stored in
25
the directory pointed to by the symlink device/.
36
For example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6226,8 +6226,8 @@ CXL (IBM Coherent Accelerator Processor Interface CAPI) DRIVER
62266226
M: Frederic Barrat <fbarrat@linux.ibm.com>
62276227
M: Andrew Donnellan <ajd@linux.ibm.com>
62286228
L: linuxppc-dev@lists.ozlabs.org
6229-
S: Supported
6230-
F: Documentation/ABI/testing/sysfs-class-cxl
6229+
S: Obsolete
6230+
F: Documentation/ABI/obsolete/sysfs-class-cxl
62316231
F: Documentation/arch/powerpc/cxl.rst
62326232
F: arch/powerpc/platforms/powernv/pci-cxl.c
62336233
F: drivers/misc/cxl/

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ config PPC
145145
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
146146
select ARCH_HAS_PHYS_TO_DMA
147147
select ARCH_HAS_PMEM_API
148+
select ARCH_HAS_PREEMPT_LAZY
148149
select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64
149150
select ARCH_HAS_PTE_SPECIAL
150151
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64

arch/powerpc/include/asm/hugetlb.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515

1616
extern bool hugetlb_disabled;
1717

18+
static inline bool hugepages_supported(void)
19+
{
20+
if (hugetlb_disabled)
21+
return false;
22+
23+
return HPAGE_SHIFT != 0;
24+
}
25+
#define hugepages_supported hugepages_supported
26+
1827
void __init hugetlbpage_init_defaultsize(void);
1928

2029
int slice_is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,

arch/powerpc/include/asm/thread_info.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ void arch_setup_new_exec(void);
103103
#define TIF_PATCH_PENDING 6 /* pending live patching update */
104104
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
105105
#define TIF_SINGLESTEP 8 /* singlestepping active */
106+
#define TIF_NEED_RESCHED_LAZY 9 /* Scheduler driven lazy preemption */
106107
#define TIF_SECCOMP 10 /* secure computing */
107108
#define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */
108109
#define TIF_NOERROR 12 /* Force successful syscall return */
@@ -122,6 +123,7 @@ void arch_setup_new_exec(void);
122123
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
123124
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
124125
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
126+
#define _TIF_NEED_RESCHED_LAZY (1<<TIF_NEED_RESCHED_LAZY)
125127
#define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)
126128
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
127129
#define _TIF_32BIT (1<<TIF_32BIT)
@@ -142,9 +144,10 @@ void arch_setup_new_exec(void);
142144
_TIF_SYSCALL_EMU)
143145

144146
#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
145-
_TIF_NOTIFY_RESUME | _TIF_UPROBE | \
146-
_TIF_RESTORE_TM | _TIF_PATCH_PENDING | \
147-
_TIF_NOTIFY_SIGNAL)
147+
_TIF_NEED_RESCHED_LAZY | _TIF_NOTIFY_RESUME | \
148+
_TIF_UPROBE | _TIF_RESTORE_TM | \
149+
_TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL)
150+
148151
#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR)
149152

150153
/* Bits in local_flags */

arch/powerpc/include/asm/time.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static inline unsigned long tb_ticks_since(unsigned long tstamp)
8686
#define mulhdu(x,y) \
8787
({unsigned long z; asm ("mulhdu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;})
8888
#else
89-
extern u64 mulhdu(u64, u64);
89+
#define mulhdu(x, y) mul_u64_u64_shr(x, y, 64)
9090
#endif
9191

9292
extern void div128_by_32(u64 dividend_high, u64 dividend_low,

arch/powerpc/kernel/interrupt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ interrupt_exit_user_prepare_main(unsigned long ret, struct pt_regs *regs)
185185
ti_flags = read_thread_flags();
186186
while (unlikely(ti_flags & (_TIF_USER_WORK_MASK & ~_TIF_RESTORE_TM))) {
187187
local_irq_enable();
188-
if (ti_flags & _TIF_NEED_RESCHED) {
188+
if (ti_flags & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY)) {
189189
schedule();
190190
} else {
191191
/*
@@ -396,7 +396,7 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)
396396
/* Returning to a kernel context with local irqs enabled. */
397397
WARN_ON_ONCE(!(regs->msr & MSR_EE));
398398
again:
399-
if (IS_ENABLED(CONFIG_PREEMPT)) {
399+
if (IS_ENABLED(CONFIG_PREEMPTION)) {
400400
/* Return to preemptible kernel context */
401401
if (unlikely(read_thread_flags() & _TIF_NEED_RESCHED)) {
402402
if (preempt_count() == 0)

arch/powerpc/kernel/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ void iommu_table_clear(struct iommu_table *tbl)
687687
void iommu_table_reserve_pages(struct iommu_table *tbl,
688688
unsigned long res_start, unsigned long res_end)
689689
{
690-
int i;
690+
unsigned long i;
691691

692692
WARN_ON_ONCE(res_end < res_start);
693693
/*

arch/powerpc/kernel/misc_32.S

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,6 @@
2727

2828
.text
2929

30-
/*
31-
* This returns the high 64 bits of the product of two 64-bit numbers.
32-
*/
33-
_GLOBAL(mulhdu)
34-
cmpwi r6,0
35-
cmpwi cr1,r3,0
36-
mr r10,r4
37-
mulhwu r4,r4,r5
38-
beq 1f
39-
mulhwu r0,r10,r6
40-
mullw r7,r10,r5
41-
addc r7,r0,r7
42-
addze r4,r4
43-
1: beqlr cr1 /* all done if high part of A is 0 */
44-
mullw r9,r3,r5
45-
mulhwu r10,r3,r5
46-
beq 2f
47-
mullw r0,r3,r6
48-
mulhwu r8,r3,r6
49-
addc r7,r0,r7
50-
adde r4,r4,r8
51-
addze r10,r10
52-
2: addc r4,r4,r9
53-
addze r3,r10
54-
blr
55-
5630
/*
5731
* reloc_got2 runs through the .got2 section adding an offset
5832
* to each entry.

arch/powerpc/kernel/process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,8 +1960,8 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
19601960
* address of _start and the second entry is the TOC
19611961
* value we need to use.
19621962
*/
1963-
__get_user(entry, (unsigned long __user *)start);
1964-
__get_user(toc, (unsigned long __user *)start+1);
1963+
get_user(entry, (unsigned long __user *)start);
1964+
get_user(toc, (unsigned long __user *)start+1);
19651965

19661966
/* Check whether the e_entry function descriptor entries
19671967
* need to be relocated before we can use them.

0 commit comments

Comments
 (0)