.. | .. |
---|
301 | 301 | } |
---|
302 | 302 | } |
---|
303 | 303 | |
---|
304 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
| 304 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
305 | 305 | if (!prz_ok(prz)) { |
---|
306 | | - while (cxt->mcu_log_read_cnt < cxt->max_mcu_log_cnt && !prz) { |
---|
307 | | - prz = ramoops_get_next_prz(cxt->mcu_przs, &cxt->mcu_log_read_cnt, |
---|
308 | | - cxt->max_mcu_log_cnt, &record->id, |
---|
| 306 | + while (cxt->boot_log_read_cnt < cxt->max_boot_log_cnt && !prz) { |
---|
| 307 | + prz = ramoops_get_next_prz(cxt->boot_przs, &cxt->boot_log_read_cnt, |
---|
| 308 | + cxt->max_boot_log_cnt, &record->id, |
---|
309 | 309 | &record->type, |
---|
310 | | - PSTORE_TYPE_MCU_LOG, 0); |
---|
| 310 | + PSTORE_TYPE_BOOT_LOG, 0); |
---|
311 | 311 | if (!prz_ok(prz)) |
---|
312 | 312 | continue; |
---|
313 | 313 | } |
---|
.. | .. |
---|
320 | 320 | } |
---|
321 | 321 | |
---|
322 | 322 | size = persistent_ram_old_size(prz) - header_length; |
---|
323 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
324 | | - /* don't copy mcu log */ |
---|
325 | | - if (record->type == PSTORE_TYPE_MCU_LOG) |
---|
| 323 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
| 324 | + /* don't copy boot log */ |
---|
| 325 | + if (record->type == PSTORE_TYPE_BOOT_LOG) |
---|
326 | 326 | goto out; |
---|
327 | 327 | #endif |
---|
328 | 328 | /* ECC correction notice */ |
---|
.. | .. |
---|
529 | 529 | kfree(cxt->fprzs); |
---|
530 | 530 | cxt->max_ftrace_cnt = 0; |
---|
531 | 531 | } |
---|
532 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
533 | | - /* Free mcu log PRZs */ |
---|
534 | | - if (cxt->mcu_przs) { |
---|
535 | | - for (i = 0; i < cxt->max_mcu_log_cnt; i++) |
---|
536 | | - persistent_ram_free(cxt->mcu_przs[i]); |
---|
537 | | - kfree(cxt->mcu_przs); |
---|
538 | | - cxt->max_mcu_log_cnt = 0; |
---|
| 532 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
| 533 | + /* Free boot log PRZs */ |
---|
| 534 | + if (cxt->boot_przs) { |
---|
| 535 | + for (i = 0; i < cxt->max_boot_log_cnt; i++) |
---|
| 536 | + persistent_ram_free(cxt->boot_przs[i]); |
---|
| 537 | + kfree(cxt->boot_przs); |
---|
| 538 | + cxt->max_boot_log_cnt = 0; |
---|
539 | 539 | } |
---|
540 | 540 | #endif |
---|
541 | 541 | } |
---|
.. | .. |
---|
716 | 716 | parse_size("pmsg-size", pdata->pmsg_size); |
---|
717 | 717 | parse_size("ecc-size", pdata->ecc_info.ecc_size); |
---|
718 | 718 | parse_size("flags", pdata->flags); |
---|
719 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
720 | | - parse_size("mcu-log-size", pdata->mcu_log_size); |
---|
721 | | - parse_size("mcu-log-count", pdata->max_mcu_log_cnt); |
---|
| 719 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
| 720 | + parse_size("boot-log-size", pdata->boot_log_size); |
---|
| 721 | + parse_size("boot-log-count", pdata->max_boot_log_cnt); |
---|
722 | 722 | #endif |
---|
723 | 723 | #undef parse_size |
---|
724 | 724 | |
---|
.. | .. |
---|
760 | 760 | goto fail_out; |
---|
761 | 761 | } |
---|
762 | 762 | |
---|
763 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
| 763 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
764 | 764 | if (!pdata->mem_size || (!pdata->record_size && !pdata->console_size && |
---|
765 | | - !pdata->ftrace_size && !pdata->pmsg_size && !pdata->mcu_log_size)) { |
---|
| 765 | + !pdata->ftrace_size && !pdata->pmsg_size && !pdata->boot_log_size)) { |
---|
766 | 766 | pr_err("The memory size and the record/console size must be " |
---|
767 | 767 | "non-zero\n"); |
---|
768 | 768 | goto fail_out; |
---|
.. | .. |
---|
797 | 797 | cxt->dump_oops = pdata->dump_oops; |
---|
798 | 798 | cxt->flags = pdata->flags; |
---|
799 | 799 | cxt->ecc_info = pdata->ecc_info; |
---|
800 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
801 | | - cxt->mcu_log_size = pdata->mcu_log_size; |
---|
802 | | - cxt->max_mcu_log_cnt = pdata->max_mcu_log_cnt; |
---|
| 800 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
| 801 | + cxt->boot_log_size = pdata->boot_log_size; |
---|
| 802 | + cxt->max_boot_log_cnt = pdata->max_boot_log_cnt; |
---|
803 | 803 | #endif |
---|
804 | 804 | |
---|
805 | 805 | paddr = cxt->phys_addr; |
---|
806 | 806 | |
---|
807 | 807 | dump_mem_sz = cxt->size - cxt->console_size - cxt->ftrace_size |
---|
808 | 808 | - cxt->pmsg_size; |
---|
809 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
810 | | - dump_mem_sz -= cxt->mcu_log_size; |
---|
| 809 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
| 810 | + dump_mem_sz -= cxt->boot_log_size; |
---|
| 811 | +#endif |
---|
| 812 | + |
---|
| 813 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
| 814 | + err = ramoops_init_przs("boot_log", dev, cxt, &cxt->boot_przs, &paddr, |
---|
| 815 | + cxt->boot_log_size, -1, |
---|
| 816 | + &cxt->max_boot_log_cnt, 0, 0); |
---|
| 817 | + if (err) |
---|
| 818 | + goto fail_clear; |
---|
| 819 | + if (cxt->boot_log_size > 0) |
---|
| 820 | + for (i = 0; i < cxt->max_boot_log_cnt; i++) |
---|
| 821 | + pr_info("boot-log-%d\t0x%zx@%pa\n", i, cxt->boot_przs[i]->size, &cxt->boot_przs[i]->paddr); |
---|
811 | 822 | #endif |
---|
812 | 823 | |
---|
813 | 824 | err = ramoops_init_przs("dump", dev, cxt, &cxt->dprzs, &paddr, |
---|
.. | .. |
---|
848 | 859 | if (cxt->pmsg_size > 0) |
---|
849 | 860 | pr_info("pmsg\t0x%zx@%pa\n", cxt->mprz->size, &cxt->mprz->paddr); |
---|
850 | 861 | |
---|
851 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
852 | | - err = ramoops_init_przs("mcu_log", dev, cxt, &cxt->mcu_przs, &paddr, |
---|
853 | | - cxt->mcu_log_size, -1, |
---|
854 | | - &cxt->max_mcu_log_cnt, 0, 0); |
---|
855 | | - if (err) |
---|
856 | | - goto fail_clear; |
---|
857 | | - if (cxt->mcu_log_size > 0) |
---|
858 | | - for (i = 0; i < cxt->max_mcu_log_cnt; i++) |
---|
859 | | - pr_info("mcu-log-%d\t0x%zx@%pa\n", i, cxt->mcu_przs[i]->size, &cxt->mcu_przs[i]->paddr); |
---|
860 | | -#endif |
---|
861 | | - |
---|
862 | 862 | cxt->pstore.data = cxt; |
---|
863 | 863 | /* |
---|
864 | 864 | * Prepare frontend flags based on which areas are initialized. |
---|
.. | .. |
---|
875 | 875 | cxt->pstore.flags |= PSTORE_FLAGS_FTRACE; |
---|
876 | 876 | if (cxt->pmsg_size) |
---|
877 | 877 | cxt->pstore.flags |= PSTORE_FLAGS_PMSG; |
---|
878 | | -#ifdef CONFIG_PSTORE_MCU_LOG |
---|
879 | | - if (cxt->mcu_log_size) |
---|
880 | | - cxt->pstore.flags |= PSTORE_FLAGS_MCU_LOG; |
---|
| 878 | +#ifdef CONFIG_PSTORE_BOOT_LOG |
---|
| 879 | + if (cxt->boot_log_size) |
---|
| 880 | + cxt->pstore.flags |= PSTORE_FLAGS_BOOT_LOG; |
---|
881 | 881 | #endif |
---|
882 | 882 | |
---|
883 | 883 | /* |
---|