diff mbox

[v2,02/12] hdat: Add processor version check for hs service ntuple

Message ID 1477751795-20128-3-git-send-email-hegdevasant@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

Vasant Hegde Oct. 29, 2016, 2:36 p.m. UTC
Host services ntuple is deprecated on P9.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 hdata/spira.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stewart Smith Dec. 20, 2016, 3:34 a.m. UTC | #1
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
> Host services ntuple is deprecated on P9.
>
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  hdata/spira.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/hdata/spira.c b/hdata/spira.c
> index 592197e..59ffc1d 100644
> --- a/hdata/spira.c
> +++ b/hdata/spira.c
> @@ -1023,6 +1023,10 @@ static void hostservices_parse(void)
>  	unsigned int size;
>  	unsigned int ntuples_size;
>
> +	/* Deprecated on P9 */
> +	if (proc_gen >= proc_gen_p9)
> +		return;
> +

I'd prefer we print an error rather than failing silently.
Oliver O'Halloran Dec. 20, 2016, 4:05 a.m. UTC | #2
On Tue, Dec 20, 2016 at 2:34 PM, Stewart Smith
<stewart@linux.vnet.ibm.com> wrote:
> Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
>> Host services ntuple is deprecated on P9.
>>
>> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>> ---
>>  hdata/spira.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/hdata/spira.c b/hdata/spira.c
>> index 592197e..59ffc1d 100644
>> --- a/hdata/spira.c
>> +++ b/hdata/spira.c
>> @@ -1023,6 +1023,10 @@ static void hostservices_parse(void)
>>       unsigned int size;
>>       unsigned int ntuples_size;
>>
>> +     /* Deprecated on P9 */
>> +     if (proc_gen >= proc_gen_p9)
>> +             return;
>> +
>
> I'd prefer we print an error rather than failing silently.

Why? Ignoring a deprecated tuple is perfectly fine and the FSP/HB
sometimes populate the fields anyway.

>
> --
> Stewart Smith
> OPAL Architect, IBM.
>
Stewart Smith Dec. 20, 2016, 6:45 a.m. UTC | #3
Oliver O'Halloran <oohall@gmail.com> writes:
> On Tue, Dec 20, 2016 at 2:34 PM, Stewart Smith
> <stewart@linux.vnet.ibm.com> wrote:
>> Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
>>> Host services ntuple is deprecated on P9.
>>>
>>> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>>> ---
>>>  hdata/spira.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/hdata/spira.c b/hdata/spira.c
>>> index 592197e..59ffc1d 100644
>>> --- a/hdata/spira.c
>>> +++ b/hdata/spira.c
>>> @@ -1023,6 +1023,10 @@ static void hostservices_parse(void)
>>>       unsigned int size;
>>>       unsigned int ntuples_size;
>>>
>>> +     /* Deprecated on P9 */
>>> +     if (proc_gen >= proc_gen_p9)
>>> +             return;
>>> +
>>
>> I'd prefer we print an error rather than failing silently.
>
> Why? Ignoring a deprecated tuple is perfectly fine and the FSP/HB
> sometimes populate the fields anyway.

Ahhh, reality interferes - then I'm okay with no error/warning.
Stewart Smith Dec. 21, 2016, 4:33 a.m. UTC | #4
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
> Host services ntuple is deprecated on P9.
>
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  hdata/spira.c | 4 ++++
>  1 file changed, 4 insertions(+)

Merged to master as of d32b462b313273f5a2a4c7257ea05d86e6331925
diff mbox

Patch

diff --git a/hdata/spira.c b/hdata/spira.c
index 592197e..59ffc1d 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -1023,6 +1023,10 @@  static void hostservices_parse(void)
 	unsigned int size;
 	unsigned int ntuples_size;
 
+	/* Deprecated on P9 */
+	if (proc_gen >= proc_gen_p9)
+		return;
+
 	ntuples_size = sizeof(struct HDIF_array_hdr) + 
 		be32_to_cpu(spira.ntuples.array_hdr.ecnt) *
 		sizeof(struct spira_ntuple);