[Skiboot] [PATCH] hw/imc: alway enable "imc_nest_chip" exports property

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Fri Dec 1 18:06:46 AEDT 2017



On Friday 01 December 2017 12:13 PM, Stewart Smith wrote:
> Madhavan Srinivasan <maddy at linux.vnet.ibm.com> writes:
>> imc_dt_update_nest_node() adds a "imc_nest_chip" property
>> to the "exports" node (under opal_node) to view nest counter
>> region. This comes handy when debugging ucode runtime
>> errors (like counter data update or control block update
>> so on...). And current code enables the property only if
>> the microcode is in running state at system boot. To aid
>> the debug of ucode not running/starting issues at boot,
>> enable the addition of "imc_nest_chip" property always.
>>
>> Fixes: 167e65d570a7c ('skiboot/hw/imc: Add nest_memory region to "exports" node')
>> Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
>> ---
>>   hw/imc.c | 61 +++++++++++++++++++++++++++++++++++++++----------------------
>>   1 file changed, 39 insertions(+), 22 deletions(-)
> Thanks, merged to master as of 938d1d9ed964686fc6f5f4fb7ae1bfd281593ed8.
>
> One comment on it:
>
>
>> diff --git a/hw/imc.c b/hw/imc.c
>> index 1db94ec6ac1b..ea8c59d62b11 100644
>> --- a/hw/imc.c
>> +++ b/hw/imc.c
>> @@ -307,6 +307,42 @@ static void check_imc_device_type(struct dt_node *dev)
>>   	return;
>>   }
>>
>> +static void imc_dt_exports_prop_add(struct dt_node *dev)
>> +{
>> +	struct dt_node *node;
>> +	struct proc_chip *chip;
>> +	const struct dt_property *type;
>> +	uint32_t offset = 0, size = 0;
>> +	uint64_t baddr;
>> +	char namebuf[32];
>> +
>> +
>> +	dt_for_each_compatible(dev, node, "ibm,imc-counters") {
>> +		type = dt_find_property(node, "type");
>> +		if (type && is_nest_node(node)) {
>> +			offset = dt_prop_get_u32(node, "offset");
>> +			size = dt_prop_get_u32(node, "size");
>> +		}
>> +	}
> This logic looks a bit suspicious, are you sure we end up with the right
> thing?

Yes.  ucode data area is fixed and shared by all the nest units.

Maddy



More information about the Skiboot mailing list