Vasant Hegde <hegdevas...@linux.vnet.ibm.com> writes: > PowerNV platform is capable of capturing host memory region when system > crashes (because of host/firmware). We have new OPAL API to register > memory region to be capture when system crashes. > > This patch adds support for new API and also registers kernel log > buffer.
I think we do need a way to un-register regions, and I think this may be important around kexec - unless the log buffer is in exactly the same place, there's a window where we could dump some random memory contents as kernel log buffer, probably causing some poor support person to scratch their head for a good long while. > +void __init opal_dump_region_init(void) > +{ > + void *addr; > + uint64_t size; > + int rc; > + > + /* Register kernel log buffer */ > + addr = get_log_buf_addr(); > + size = get_log_buf_len(); > + rc = add_dump_region_entry(DUMP_REGION_LOG_BUF, addr, size); > + if (rc) > + pr_warn("DUMP: Failed to register kernel log buffer. " > + "rc = %d\n", rc); This is what's going to be printed in kernel log when running on OPAL firmware that doesn't support that call. Does this include the first GA release on POWER8 systems? If so, we probably want a nicer log message pointing to the fact that firmware is too old to support that function. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/