[PATCH v6 13/41] mm: Make pte_mkwrite() take a VMA

2023-02-18 Thread Rick Edgecombe
The x86 Control-flow Enforcement Technology (CET) feature includes a new type of memory called shadow stack. This shadow stack memory has some unusual properties, which requires some core mm changes to function properly. One of these unusual properties is that shadow stack memory is writable, but

Re: [PATCH v2 09/10] powerpc: Use ppc_md_progress()

2023-02-18 Thread Joe Perches
On Sat, 2023-02-18 at 10:15 +0100, Christophe Leroy wrote: > Many places have: > > if (ppc.md_progress) > ppc.md_progress(); > > Use ppc_md_progress() instead. > > Note that checkpatch complains about using function names, > but this is not a function taking format strings,

Re: [PATCH v4 3/3] powerpc: dts: turris1x.dts: Set lower priority for CPLD syscon-reboot

2023-02-18 Thread Pali Rohár
On Thursday 09 February 2023 01:10:21 Pali Rohár wrote: > On Monday 26 December 2022 12:45:13 Pali Rohár wrote: > > Due to CPLD firmware bugs, set CPLD syscon-reboot priority level to 64 > > (between rstcr and watchdog) to ensure that rstcr's global-utilities reset > > method which is preferred

[PATCH v3 8/8] powerpc: dts: turris1x.dts: Remove "fsl,P2020RDB-PC" compatible string

2023-02-18 Thread Pali Rohár
"fsl,P2020RDB-PC" compatible string was present in Turris 1.x DTS file just because Linux kernel required it for proper detection of P2020 processor during boot. This was quite a hack as CZ.NIC Turris 1.x is not compatible with Freescale P2020-RDB-PC board. Now when kernel has generic unified

[PATCH v3 6/8] powerpc/85xx: p2020: Define just one machine description

2023-02-18 Thread Pali Rohár
Combine machine descriptions and code of all P2020 boards into just one generic unified P2020 machine description. This allows kernel to boot on any P2020-based board with P2020 DTS file without need to patch kernel and define a new machine description in 85xx powerpc platform directory.

[PATCH v3 7/8] powerpc/85xx: p2020: Enable boards by new config option CONFIG_PPC_P2020

2023-02-18 Thread Pali Rohár
Generic unified P2020 machine description which supports all P2020-based boards is now in separate file p2020.c. So create a separate config option CONFIG_PPC_P2020 for it. Previously machine descriptions for P2020 boards were enabled by CONFIG_MPC85xx_DS or CONFIG_MPC85xx_RDB option. So set

[PATCH v3 0/8] powerpc/85xx: p2020: Create one unified machine description

2023-02-18 Thread Pali Rohár
This patch series unifies all P2020 boards and machine descriptions into one generic unified P2020 machine description. With this generic machine description, kernel can boot on any P2020-based board with correct DTS file. Tested on CZ.NIC Turris 1.1 board with has Freescale P2020 processor.

[PATCH v3 4/8] powerpc/85xx: p2020: Move i8259 code into own function

2023-02-18 Thread Pali Rohár
Splits mpic and i8259 initialization codes into separate functions. Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdef CONFIG_PPC_I8259'. Signed-off-by: Pali Rohár --- arch/powerpc/platforms/85xx/p2020.c | 36 ++--- 1 file changed, 18 insertions(+), 18

[PATCH v3 3/8] powerpc/85xx: p2020: Move all P2020 machine descriptions to p2020.c

2023-02-18 Thread Pali Rohár
This moves machine descriptions and all related code for all P2020 boards into new p2020.c source file. This change also copies helper static functions from other mpc85xx*.c files into p2020.c, which are required for machine descriptions. This is preparation for code de-duplication and providing

[PATCH v3 5/8] powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks

2023-02-18 Thread Pali Rohár
Make just one .setup_arch and one .init_IRQ callback implementation for all P2020 board code. This deduplicate repeated and same code. Signed-off-by: Pali Rohár --- arch/powerpc/platforms/85xx/p2020.c | 58 + 1 file changed, 9 insertions(+), 49 deletions(-) diff

[PATCH v3 2/8] powerpc/85xx: Mark mpc85xx_ds_pic_init() as static

2023-02-18 Thread Pali Rohár
Function mpc85xx_ds_pic_init() is not used out of the mpc85xx_ds.c file. Signed-off-by: Pali Rohár --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c

[PATCH v3 1/8] powerpc/85xx: Mark mpc85xx_rdb_pic_init() as static

2023-02-18 Thread Pali Rohár
Function mpc85xx_rdb_pic_init() is not used out of the mpc85xx_rdb.c file. Signed-off-by: Pali Rohár --- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c

[PATCH] powerpc/e500: Add missing prototype for 'relocate_init'

2023-02-18 Thread Christophe Leroy
Kernel test robot reports: arch/powerpc/mm/nohash/e500.c:314:21: warning: no previous prototype for 'relocate_init' [-Wmissing-prototypes] 314 | notrace void __init relocate_init(u64 dt_ptr, phys_addr_t start) | ^ Add it in mm/mmu_decl.h, close to

[PATCH v2 07/10] powerpc: Make generic_calibrate_decr() the default

2023-02-18 Thread Christophe Leroy
ppc_md.calibrate_decr() is a mandatory item. Its nullity is never checked so it must be non null on all platforms. Most platforms define generic_calibrate_decr() as their ppc_md.calibrate_decr(). Have time_init() call generic_calibrate_decr() when ppc_md.calibrate_decr() is NULL, and remove

[PATCH v2 09/10] powerpc: Use ppc_md_progress()

2023-02-18 Thread Christophe Leroy
Many places have: if (ppc.md_progress) ppc.md_progress(); Use ppc_md_progress() instead. Note that checkpatch complains about using function names, but this is not a function taking format strings, so we leave the function names for now. Signed-off-by: Christophe Leroy

[PATCH v2 08/10] powerpc: Add ppc_md_progress()

2023-02-18 Thread Christophe Leroy
Many places have: if (ppc.md_progress) ppc.md_progress(); Introduce ppc_md_progress() which will embedded the test. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/machdep.h | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v2 06/10] powerpc/85xx: Fix function naming for p1023_rdb platform

2023-02-18 Thread Christophe Leroy
p1023_rdb platform is a copy of mpc85xx_rdb platform and some of its functions have kept mpc85xx_rdb names. Rename the said functions. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/85xx/p1023_rdb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v2 10/10] powerpc/85xx: Don't check ppc_md.progress in mpc85xx_cds_setup_arch()

2023-02-18 Thread Christophe Leroy
mpc85xx_cds_setup_arch() is not a hot path, creating the string to be printed even when it doesn't get printed at the end is not an problem. Do it at all time. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 11 --- 1 file changed, 4 insertions(+), 7

[PATCH v2 05/10] powerpc/gamecube|wii : Use machine_device_initcall()

2023-02-18 Thread Christophe Leroy
Instead of checking machine type in the function, use machine_device_initcall(). Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/embedded6xx/gamecube.c | 5 + arch/powerpc/platforms/embedded6xx/wii.c | 5 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git

[PATCH v2 04/10] powerpc/47x: Split ppc47x machine in two

2023-02-18 Thread Christophe Leroy
This machine matches two compatibles and sets .pci_irq_fixup on one of them. Split it into two machines, then the probe function can be dropped. Signed-off-by: Christophe Leroy --- v2: Also update/duplicate machine_{device/arch}_initcall --- arch/powerpc/platforms/44x/ppc476.c | 37

[PATCH v2 03/10] powerpc/platforms: Use 'compatible' property for simple cases

2023-02-18 Thread Christophe Leroy
Use the new 'compatible' property for simple cases. checkpatch complains about the new compatible being undocumented but in reality nothing is new so just ignore it for the time being. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/44x/canyonlands.c | 9 +--

[PATCH v2 01/10] powerpc/machdep: Make machine name const

2023-02-18 Thread Christophe Leroy
Machine name in struct machdep_calls should never be modified. Mark it const. Signed-off-by: Christophe Leroy --- v2: New --- arch/powerpc/include/asm/machdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/machdep.h

[PATCH v2 02/10] powerpc/machdep: Define 'compatible' property in ppc_md and use it

2023-02-18 Thread Christophe Leroy
Most probe functions do nothing else than checking whether the machine is compatible to a given string. Define that string in ppc_md structure and check it directly from probe_machine() instead of using ppc_md.probe() for that. Keep checking in ppc_md.probe() only for more complex probing.