[PATCH 1/6] powerpc: Add ppc_md.name to dump stack arch description

Nathan Lynch nathanl at linux.ibm.com
Thu Sep 29 06:35:09 AEST 2022


Michael Ellerman <mpe at ellerman.id.au> writes:
> @@ -588,6 +590,15 @@ static __init int add_pcspkr(void)
>  device_initcall(add_pcspkr);
>  #endif	/* CONFIG_PCSPKR_PLATFORM */
>  
> +static char ppc_hw_desc_buf[128] __initdata;
> +
> +struct seq_buf ppc_hw_desc __initdata = {
> +	.buffer = ppc_hw_desc_buf,
> +	.size = sizeof(ppc_hw_desc_buf),
> +	.len = 0,
> +	.readpos = 0,
> +};
> +
>  static __init void probe_machine(void)
>  {
>  	extern struct machdep_calls __machine_desc_start;
> @@ -628,6 +639,9 @@ static __init void probe_machine(void)
>  		for (;;);
>  	}
>  
> +	seq_buf_printf(&ppc_hw_desc,"machine:%s ", ppc_md.name);
> +	dump_stack_set_arch_desc(ppc_hw_desc.buffer);

At first I was confused by the seemingly unnecessary use of the seq_buf,
but after reading the rest of the series I see that this is the final
addition to a temporary buffer before setting the arch description
string. Looks OK to me.


More information about the Linuxppc-dev mailing list