[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v7 15/20] xen/arm: move regpair_to_uint64() and uint64_to_regpair() to regs.h
Hi Jens, > On 22 Feb 2023, at 16:33, Jens Wiklander <jens.wiklander@xxxxxxxxxx> wrote: > > Moves the two helper functions regpair_to_uint64() and > uint64_to_regpair() from xen/arch/arm/tee/optee.c to the common arm > specific regs.h. This enables reuse of these functions in the FF-A > mediator in a subsequent patch. > > Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx> > Signed-off-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx> Please move Michal R-B after your signed off. With that fixed: Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx> Cheers Bertrand > --- > xen/arch/arm/include/asm/regs.h | 12 ++++++++++++ > xen/arch/arm/tee/optee.c | 11 ----------- > 2 files changed, 12 insertions(+), 11 deletions(-) > > diff --git a/xen/arch/arm/include/asm/regs.h b/xen/arch/arm/include/asm/regs.h > index 0693a681315f..aa39e83ee5f4 100644 > --- a/xen/arch/arm/include/asm/regs.h > +++ b/xen/arch/arm/include/asm/regs.h > @@ -60,6 +60,18 @@ static inline bool guest_mode(const struct cpu_user_regs > *r) > register_t get_user_reg(struct cpu_user_regs *regs, int reg); > void set_user_reg(struct cpu_user_regs *regs, int reg, register_t val); > > +static inline uint64_t regpair_to_uint64(register_t reg0, register_t reg1) > +{ > + return ((uint64_t)reg0 << 32) | (uint32_t)reg1; > +} > + > +static inline void uint64_to_regpair(register_t *reg0, register_t *reg1, > + uint64_t val) > +{ > + *reg0 = val >> 32; > + *reg1 = (uint32_t)val; > +} > + > #endif > > #endif /* __ARM_REGS_H__ */ > diff --git a/xen/arch/arm/tee/optee.c b/xen/arch/arm/tee/optee.c > index 9cb9f16d43cb..47027ecef47c 100644 > --- a/xen/arch/arm/tee/optee.c > +++ b/xen/arch/arm/tee/optee.c > @@ -268,17 +268,6 @@ static int optee_domain_init(struct domain *d) > return 0; > } > > -static uint64_t regpair_to_uint64(register_t reg0, register_t reg1) > -{ > - return ((uint64_t)reg0 << 32) | (uint32_t)reg1; > -} > - > -static void uint64_to_regpair(register_t *reg0, register_t *reg1, uint64_t > val) > -{ > - *reg0 = val >> 32; > - *reg1 = (uint32_t)val; > -} > - > static struct page_info *get_domain_ram_page(gfn_t gfn) > { > struct page_info *page; > -- > 2.34.1 >
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |