From: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> The FS_PSTORE_RAMOOPS_RO configuration option keeps barebox from zapping (clearing and fixing header ecc) all ramoops buffers on initialization. It also stops barebox from zapping invalid buffers. This causes issues when the console writing code tries to use the uninitialized, invalid console buffer. Therefore, allow barebox to zap invalid buffers, the kernel will do so anyway if it finds broken buffers during its initialization. Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> --- fs/pstore/ram.c | 2 ++ fs/pstore/ram_core.c | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 3daec0d0d8..734d0c3c1d 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -401,7 +401,9 @@ static int ramoops_init_prz(const char *name, return err; } +#ifndef CONFIG_FS_PSTORE_RAMOOPS_RO persistent_ram_zap(*prz); +#endif /* CONFIG_FS_PSTORE_RAMOOPS_RO */ *paddr += sz; diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 0f7003f937..06be47ce53 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -330,18 +330,12 @@ void persistent_ram_free_old(struct persistent_ram_zone *prz) prz->old_log_size = 0; } -#ifdef CONFIG_FS_PSTORE_RAMOOPS_RO -void persistent_ram_zap(struct persistent_ram_zone *prz) -{ -} -#else void persistent_ram_zap(struct persistent_ram_zone *prz) { prz->buffer->start = 0; prz->buffer->size = 0; persistent_ram_update_header_ecc(prz); } -#endif /* CONFIG_PSTORE_RAMOOPS_RO */ static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size, struct persistent_ram_zone *prz, int memtype) -- 2.11.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox