[PATCH 1/5] powerpc: Print MSR TM bits in oops message

Michael Neuling mikey at neuling.org
Tue Nov 17 21:01:35 AEDT 2015


On Mon, 2015-11-16 at 20:27 +1100, Michael Ellerman wrote:
> On Fri, 2015-11-13 at 15:57 +1100, Michael Neuling wrote:
> 
> > Print the MSR TM bits in oops messages.  This appends them to the
> > end
> > like this:
> >  MSR: 8000000502823031 <SF,VEC,VSX,FP,ME,IR,DR,LE,TM[TE]>
> > 
> > You get the TM[] only if at least one TM MSR bit is set.  Inside
> > the
> > TM[], E means Enabled (bit 32), S means Suspended (bit 33), and T
> > means Transactional (bit 34)
> 
> Can you duplicate this into a comment in printtmbits() or on the bit
> definitions, so that I don't have to look up the commit to find the
> explanation.

Ok.

> > +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> > +static struct regbit msr_tm_bits[] = {
> > +	{MSR_TS_T,	"T"},
> > +	{MSR_TS_S,	"S"},
> > +	{MSR_TM,	"E"},
> > +	{0,		NULL}
> > +};
> > +static void printtmbits(unsigned long val)
> 
> I realise you followed the lead here with the naming, but can you
> call it
> print_tm_bits() please. MY EYES!

Ok, I've change the rest too -> print_msr_bits(), print_tm_bits(),
print_bits()

> 
> > +{
> > +	if (val & (MSR_TM | MSR_TS_S | MSR_TS_T)) {
> > +		printk(",TM[");
> > +		printbits(val, msr_tm_bits, "");
> > +		printk("]");
> 
> I suspect all these individual printks are going to behave badly if
> we have
> multiple cpus crashing simultaneously. But I won't make you fix that
> here. We
> should look at it sometime though.

Seems anton failed at this one a while back, and since I'm mortal I
might skip this one :-)

Mikey


More information about the Linuxppc-dev mailing list