Re: [kvm-unit-tests PATCH 2/2] s390x: add test for SIGP STORE_ADTL_STATUS order

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

 



On Wed, 2022-04-06 at 15:31 +0200, Claudio Imbrenda wrote:
> > diff --git a/s390x/adtl-status.c b/s390x/adtl-status.c
> > new file mode 100644
> > index 000000000000..c3ecdbc35a9d
> > 
[...]
> > +static void restart_write_vector(void)
> > +{
> > +       uint8_t *vec_reg;
> > +       /* vlm handles at most 16 registers at a time */
> > +       uint8_t *vec_reg_16_31 = &expected_vec_contents[16][0];
> > +       uint64_t cr0, cr0_mask = ~(1ULL << CTL0_VECTOR);
> 
> cr0_mask can be const, and you can use ~BIT_ULL(CTL0_VECTOR)

I don't think so, since ng in the inline ASM will store its result
there.

BIT_ULL is much better, thanks. I tend to forget about that.

> 
> > +       int one = 1;
> 
> one can also be const, although I wonder if this can just become an
> constant in the asm statement

Yes, right, thanks. Should work with mvhi.




[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