Skip to content

Commit 6daf4e8

Browse files
committed
pstore/ram: Move pmsg init earlier
Since the ftrace area can vary in size based on CPU count, move pmsg initialization earlier so it will have a stable location. Suggested-by: Paramjit Oberoi <[email protected]> Cc: Anton Vorontsov <[email protected]> Cc: Colin Cross <[email protected]> Cc: Tony Luck <[email protected]> Signed-off-by: Kees Cook <[email protected]> Reviewed: Guilherme G. Piccoli <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3219122 commit 6daf4e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/pstore/ram.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,11 @@ static int ramoops_probe(struct platform_device *pdev)
785785
if (err)
786786
goto fail_init;
787787

788+
err = ramoops_init_prz("pmsg", dev, cxt, &cxt->mprz, &paddr,
789+
cxt->pmsg_size, 0);
790+
if (err)
791+
goto fail_init;
792+
788793
cxt->max_ftrace_cnt = (cxt->flags & RAMOOPS_FLAG_FTRACE_PER_CPU)
789794
? nr_cpu_ids
790795
: 1;
@@ -796,11 +801,6 @@ static int ramoops_probe(struct platform_device *pdev)
796801
if (err)
797802
goto fail_init;
798803

799-
err = ramoops_init_prz("pmsg", dev, cxt, &cxt->mprz, &paddr,
800-
cxt->pmsg_size, 0);
801-
if (err)
802-
goto fail_init;
803-
804804
cxt->pstore.data = cxt;
805805
/*
806806
* Prepare frontend flags based on which areas are initialized.

0 commit comments

Comments
 (0)