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

Re: [Minios-devel] [UNIKRAFT PATCHv3 5/7] plat/common: Find and register IRQ for arch_timer





On 24/09/2019 10:40, Justin He (Arm Technology China) wrote:
So you may want to think for a different name. Maybe {read,
write}_sysreg()? I
haven't suggested get because the counterpart 'put' does not seem suitable
here.

I would prefer to choose what freebsd did:
#ifdef __arm__
#define get_el0(x)      cp15_## x ##_get()
#define get_el1(x)      cp15_## x ##_get()
#define set_el0(x, val) cp15_## x ##_set(val)
#define set_el1(x, val) cp15_## x ##_set(val)
#else /* __aarch64__ */
#define get_el0(x)      READ_SPECIALREG(x ##_el0)
#define get_el1(x)      READ_SPECIALREG(x ##_el1)
#define set_el0(x, val) WRITE_SPECIALREG(x ##_el0, val)
#define set_el1(x, val) WRITE_SPECIALREG(x ##_el1, val)
#endif

What do you think?

I am ok with that.

Cheers,

--
Julien Grall

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.