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
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,
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
"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
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.
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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 +--
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
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.
23 matches
Mail list logo