Skip to content

Commit 691dd9c

Browse files
Automatic merge of 'next' into merge (2026-04-03 13:48)
2 parents 01f1978 + bd77a34 commit 691dd9c

31 files changed

Lines changed: 323 additions & 442 deletions

File tree

arch/powerpc/Kconfig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ config PPC
172172
select ARCH_STACKWALK
173173
select ARCH_SUPPORTS_ATOMIC_RMW
174174
select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx
175+
select ARCH_SUPPORTS_HUGE_PFNMAP if PPC_BOOK3S_64 && TRANSPARENT_HUGEPAGE
175176
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if !HUGETLB_PAGE
176177
select ARCH_SUPPORTS_SCHED_MC if SMP
177178
select ARCH_SUPPORTS_SCHED_SMT if PPC64 && SMP
@@ -188,6 +189,7 @@ config PPC
188189
select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP if PPC_RADIX_MMU
189190
select ARCH_WANTS_MODULES_DATA_IN_VMALLOC if PPC_BOOK3S_32 || PPC_8xx
190191
select ARCH_WEAK_RELEASE_ACQUIRE
192+
select AUDIT_ARCH_COMPAT_GENERIC
191193
select BINFMT_ELF
192194
select BUILDTIME_TABLE_SORT
193195
select CLONE_BACKWARDS
@@ -370,10 +372,6 @@ config GENERIC_TBSYNC
370372
bool
371373
default y if PPC32 && SMP
372374

373-
config AUDIT_ARCH
374-
bool
375-
default y
376-
377375
config GENERIC_BUG
378376
bool
379377
default y

arch/powerpc/boot/dts/wii.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
bootargs = "root=/dev/mmcblk0p2 rootwait udbg-immortal";
3030
};
3131

32-
memory {
32+
memory@0 {
3333
device_type = "memory";
3434
reg = <0x00000000 0x01800000 /* MEM1 24MB 1T-SRAM */
3535
0x10000000 0x04000000>; /* MEM2 64MB GDDR3 */
@@ -246,7 +246,7 @@
246246
compatible = "gpio-leds";
247247

248248
/* This is the blue LED in the disk drive slot */
249-
drive-slot {
249+
led-0 {
250250
label = "wii:blue:drive_slot";
251251
gpios = <&GPIO 5 GPIO_ACTIVE_HIGH>;
252252
panic-indicator;
@@ -256,13 +256,13 @@
256256
gpio-keys {
257257
compatible = "gpio-keys";
258258

259-
power {
259+
button-power {
260260
label = "Power Button";
261261
gpios = <&GPIO 0 GPIO_ACTIVE_HIGH>;
262262
linux,code = <KEY_POWER>;
263263
};
264264

265-
eject {
265+
button-eject {
266266
label = "Eject Button";
267267
gpios = <&GPIO 6 GPIO_ACTIVE_HIGH>;
268268
linux,code = <KEY_EJECTCD>;

arch/powerpc/include/asm/book3s/64/pgtable.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,29 @@ static inline pud_t pud_mkhuge(pud_t pud)
12891289
return pud;
12901290
}
12911291

1292+
#ifdef CONFIG_ARCH_SUPPORTS_PMD_PFNMAP
1293+
static inline bool pmd_special(pmd_t pmd)
1294+
{
1295+
return pte_special(pmd_pte(pmd));
1296+
}
1297+
1298+
static inline pmd_t pmd_mkspecial(pmd_t pmd)
1299+
{
1300+
return pte_pmd(pte_mkspecial(pmd_pte(pmd)));
1301+
}
1302+
#endif
1303+
1304+
#ifdef CONFIG_ARCH_SUPPORTS_PUD_PFNMAP
1305+
static inline bool pud_special(pud_t pud)
1306+
{
1307+
return pte_special(pud_pte(pud));
1308+
}
1309+
1310+
static inline pud_t pud_mkspecial(pud_t pud)
1311+
{
1312+
return pte_pud(pte_mkspecial(pud_pte(pud)));
1313+
}
1314+
#endif
12921315

12931316
#define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
12941317
extern int pmdp_set_access_flags(struct vm_area_struct *vma,

arch/powerpc/include/asm/checksum.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <linux/bitops.h>
1010
#include <linux/in6.h>
11+
#include <linux/uaccess.h>
1112
/*
1213
* Computes the checksum of a memory block at src, length len,
1314
* and adds in "sum" (32-bit), while copying the block to dst.
@@ -21,11 +22,24 @@
2122
extern __wsum csum_partial_copy_generic(const void *src, void *dst, int len);
2223

2324
#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
24-
extern __wsum csum_and_copy_from_user(const void __user *src, void *dst,
25-
int len);
25+
static inline __wsum csum_and_copy_from_user(const void __user *src, void *dst, int len)
26+
{
27+
scoped_user_read_access_size(src, len, efault)
28+
return csum_partial_copy_generic((void __force *)src, dst, len);
29+
30+
efault:
31+
return 0;
32+
}
33+
2634
#define HAVE_CSUM_COPY_USER
27-
extern __wsum csum_and_copy_to_user(const void *src, void __user *dst,
28-
int len);
35+
static inline __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len)
36+
{
37+
scoped_user_write_access_size(dst, len, efault)
38+
return csum_partial_copy_generic(src, (void __force *)dst, len);
39+
40+
efault:
41+
return 0;
42+
}
2943

3044
#define _HAVE_ARCH_CSUM_AND_COPY
3145
#define csum_partial_copy_nocheck(src, dst, len) \

arch/powerpc/include/asm/futex.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval,
3333
{
3434
int oldval = 0, ret;
3535

36-
if (!user_access_begin(uaddr, sizeof(u32)))
37-
return -EFAULT;
36+
uaddr = masked_user_access_begin(uaddr);
3837

3938
switch (op) {
4039
case FUTEX_OP_SET:
@@ -69,8 +68,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
6968
int ret = 0;
7069
u32 prev;
7170

72-
if (!user_access_begin(uaddr, sizeof(u32)))
73-
return -EFAULT;
71+
uaddr = masked_user_access_begin(uaddr);
7472

7573
__asm__ __volatile__ (
7674
PPC_ATOMIC_ENTRY_BARRIER

arch/powerpc/include/asm/kexec.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,20 @@ void relocate_new_kernel(unsigned long indirection_page, unsigned long reboot_co
6666
unsigned long start_address) __noreturn;
6767
void kexec_copy_flush(struct kimage *image);
6868

69-
#ifdef CONFIG_KEXEC_FILE
70-
extern const struct kexec_file_ops kexec_elf64_ops;
7169

70+
#if defined(CONFIG_KEXEC_FILE) || defined(CONFIG_CRASH_DUMP)
7271
#define ARCH_HAS_KIMAGE_ARCH
73-
7472
struct kimage_arch {
7573
struct crash_mem *exclude_ranges;
7674

7775
unsigned long backup_start;
7876
void *backup_buf;
7977
void *fdt;
8078
};
79+
#endif
80+
81+
#ifdef CONFIG_KEXEC_FILE
82+
extern const struct kexec_file_ops kexec_elf64_ops;
8183

8284
char *setup_kdump_cmdline(struct kimage *image, char *cmdline,
8385
unsigned long cmdline_len);
@@ -145,6 +147,10 @@ int arch_crash_hotplug_support(struct kimage *image, unsigned long kexec_flags);
145147

146148
unsigned int arch_crash_get_elfcorehdr_size(void);
147149
#define crash_get_elfcorehdr_size arch_crash_get_elfcorehdr_size
150+
151+
int machine_kexec_post_load(struct kimage *image);
152+
#define machine_kexec_post_load machine_kexec_post_load
153+
148154
#endif /* CONFIG_CRASH_HOTPLUG */
149155

150156
extern int crashing_cpu;
@@ -159,6 +165,8 @@ extern void default_machine_crash_shutdown(struct pt_regs *regs);
159165
extern void crash_kexec_prepare(void);
160166
extern void crash_kexec_secondary(struct pt_regs *regs);
161167

168+
extern void sync_backup_region_phdr(struct kimage *image, Elf64_Ehdr *ehdr,
169+
bool phdr_to_kimage);
162170
static inline bool kdump_in_progress(void)
163171
{
164172
return crashing_cpu >= 0;

arch/powerpc/include/asm/pgtable.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ static inline pgprot_t pte_pgprot(pte_t pte)
6363
return __pgprot(pte_flags);
6464
}
6565

66+
#ifdef CONFIG_PPC64
67+
#define pmd_pgprot pmd_pgprot
68+
static inline pgprot_t pmd_pgprot(pmd_t pmd)
69+
{
70+
return pte_pgprot(pmd_pte(pmd));
71+
}
72+
73+
#define pud_pgprot pud_pgprot
74+
static inline pgprot_t pud_pgprot(pud_t pud)
75+
{
76+
return pte_pgprot(pud_pte(pud));
77+
}
78+
#endif /* CONFIG_PPC64 */
79+
6680
static inline pgprot_t pgprot_nx(pgprot_t prot)
6781
{
6882
return pte_pgprot(pte_exprotect(__pte(pgprot_val(prot))));

arch/powerpc/include/asm/ps3.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ struct ps3_dma_region_ops;
6565

6666
/**
6767
* struct ps3_dma_region - A per device dma state variables structure
68+
* @dev: device structure
6869
* @did: The HV device id.
6970
* @page_size: The ioc pagesize.
7071
* @region_type: The HV region type.
@@ -108,15 +109,15 @@ struct ps3_dma_region_ops {
108109
dma_addr_t bus_addr,
109110
unsigned long len);
110111
};
112+
113+
struct ps3_system_bus_device;
114+
111115
/**
112116
* struct ps3_dma_region_init - Helper to initialize structure variables
113117
*
114118
* Helper to properly initialize variables prior to calling
115119
* ps3_system_bus_device_register.
116120
*/
117-
118-
struct ps3_system_bus_device;
119-
120121
int ps3_dma_region_init(struct ps3_system_bus_device *dev,
121122
struct ps3_dma_region *r, enum ps3_dma_page_size page_size,
122123
enum ps3_dma_region_type region_type, void *addr, unsigned long len);
@@ -156,10 +157,12 @@ struct ps3_mmio_region_ops {
156157
int (*free)(struct ps3_mmio_region *);
157158
};
158159
/**
159-
* struct ps3_mmio_region_init - Helper to initialize structure variables
160+
* ps3_mmio_region_init - Helper to initialize structure variables
160161
*
161162
* Helper to properly initialize variables prior to calling
162163
* ps3_system_bus_device_register.
164+
*
165+
* Returns: %0 on success, %-errno on error (or BUG())
163166
*/
164167

165168
int ps3_mmio_region_init(struct ps3_system_bus_device *dev,
@@ -405,7 +408,7 @@ static inline struct ps3_system_bus_driver *
405408
}
406409

407410
/**
408-
* ps3_system_bus_set_drvdata -
411+
* ps3_system_bus_set_drvdata - set driver's private data for this device
409412
* @dev: device structure
410413
* @data: Data to set
411414
*/
@@ -464,7 +467,7 @@ enum ps3_lpm_rights {
464467
* enum ps3_lpm_tb_type - Type of trace buffer lv1 should use.
465468
*
466469
* @PS3_LPM_TB_TYPE_NONE: Do not use a trace buffer.
467-
* @PS3_LPM_RIGHTS_USE_TB: Use the lv1 internal trace buffer. Must have
470+
* @PS3_LPM_TB_TYPE_INTERNAL: Use the lv1 internal trace buffer. Must have
468471
* rights @PS3_LPM_RIGHTS_USE_TB.
469472
*/
470473

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* SPDX-License-Identifier: GPL-2.0-or-later */
2+
#ifndef _ASM_POWERPC_UNISTD32_H_
3+
#define _ASM_POWERPC_UNISTD32_H_
4+
5+
#include <asm/unistd_32.h>
6+
7+
#endif /* _ASM_POWERPC_UNISTD32_H_ */

arch/powerpc/kernel/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ obj-$(CONFIG_PCI) += pci_$(BITS).o $(pci64-y) \
149149
pci-common.o pci_of_scan.o
150150
obj-$(CONFIG_PCI_MSI) += msi.o
151151

152-
obj-$(CONFIG_AUDIT) += audit.o
153-
obj64-$(CONFIG_AUDIT) += compat_audit.o
154-
155152
obj-y += trace/
156153

157154
ifneq ($(CONFIG_PPC_INDIRECT_PIO),y)

0 commit comments

Comments
 (0)