[PATCH v2] powerpc: Fix compile issue with force DAWR

Christophe Leroy christophe.leroy at c-s.fr
Tue May 14 17:06:17 AEST 2019



Le 14/05/2019 à 08:55, Michael Neuling a écrit :
> 
[...]


> 
>>>>> +
>>>>> +static ssize_t dawr_write_file_bool(struct file *file,
>>>>> +				    const char __user *user_buf,
>>>>> +				    size_t count, loff_t *ppos)
>>>>> +{
>>>>> +	struct arch_hw_breakpoint null_brk = {0, 0, 0};
>>>>> +	size_t rc;
>>>>> +
>>>>> +	/* Send error to user if they hypervisor won't allow us to write
>>>>> DAWR */
>>>>> +	if ((!dawr_force_enable) &&
>>>>> +	    (firmware_has_feature(FW_FEATURE_LPAR)) &&
>>>>> +	    (set_dawr(&null_brk) != H_SUCCESS))
>>>>
>>>> The above is not real clear.
>>>> set_dabr() returns 0, H_SUCCESS is not used there.
>>>
>>> It pseries_set_dawr() will return a hcall number.
>>
>> Right, then it maybe means set_dawr() should be fixes ?
> 
> Sorry, I don't understand this.

I meant set_dawr() should be fixed:

As the above test hide value 0 by using H_SUCCESS for the test, in order 
to ease understanding, set_dawr() should return H_SUCCESS instead of 
return 0;

Christophe

> 
>>> This code hasn't changed. I'm just moving it.
>>
>> Right, but could be an improvment for another patch.
>> As far as I remember you are the one who wrote that code at first place,
>> arent't you ?
> 
> Yep, classic crap Mikey code :-)
> 
> Mikey
> 


More information about the Linuxppc-dev mailing list