Re: [kvm-unit-tests PATCH v4 12/13] s390x: Add time functions to lib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04.01.19 09:42, Heiko Carstens wrote:
> On Thu, Jan 03, 2019 at 02:52:15PM +0100, Thomas Huth wrote:
>> On 2019-01-03 11:08, Janosch Frank wrote:
>>> +/*
>>> + * STCKE returns 16 bytes, which include the epoch, tod value and a
>>> + * programmable field. The value has to be trimmed to be able to work
>>> + * with it. As there's still some time to 2042, this code is not ready
>>> + * for multi epoch values.
>>> + */
>>> +static inline void stcke(char *tod)
>>> +{
>>> +	asm volatile(
>>> +		"	stcke	%[tod]\n"
>>> +		: [tod] "=Q" (tod)
>>> +		: : "cc");
>>> +}
>>
>> I'm not an inline-assembly wizzard, but the "=Q" constraint looks wrong
>> to me here. Are you sure that this is working as expected?
> 
> Yes, this is wrong. That's the reason why the kernel variant has the
> typedef + cast (see get_tod_clock_ext() in arch/s390/include/asm/timex.h).
> 
> The variant above tells the compiler that only a single byte is written to.
> 

Yep, was removed yesterday already.
If tests for multi epoch enablement come up they'll have to introduce it
again.

For now I'll keep #12 and #13 on hold until they are needed upstream, I
think there will not be huge conflicts in that area if the need to
upstream it arises later.

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux