diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 6ad831b9d1b8..bd2dc34da789 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -549,6 +549,12 @@ static int ramoops_parse_dt(struct platform_device *pdev, return 0; } +void notrace ramoops_console_write_buf(const char *buf, size_t size) +{ + struct ramoops_context *cxt = &oops_cxt; + persistent_ram_write(cxt->cprz, buf, size); +} + static int ramoops_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index c668c861c96c..485cc8e3f7dd 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h @@ -71,6 +71,8 @@ void persistent_ram_free_old(struct persistent_ram_zone *prz); ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz, char *str, size_t len); +void ramoops_console_write_buf(const char *buf, size_t size); + /* * Ramoops platform data * @mem_size memory size for ramoops