[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 for 4.5] arm32: fix build after 063188f4b3
On Tue, 2014-10-14 at 13:43 +0100, Julien Grall wrote: > On 10/14/2014 10:15 AM, Ian Campbell wrote: > > On Mon, 2014-10-13 at 16:29 +0100, Julien Grall wrote: > > > >> +GLOBAL(do_smc) > > > >> +GLOBAL(do_smc) > > > > These should both be ENTRY. > > Why? Is it because GLOBAL should be used for variable and ENTRY for > function? Exactly. The practical difference is that ENTRY makes sure the code entry point is suitably aligned, but semantically ENTRY is the correct name. > >> +int do_smc(register_t function_id, ...); > > > > Are you sure that the variadic function calling convention is the same > > as for a regular function call? I'm not entirely clear having read > > AAPCS, it says they are marshalled according to "the standard base". > > All the parameters fits in a register, so the compiler will effectively > use the first registers to pass arguments. Does it? Even with variadic functions? It's not unheard of for an ABI to fallback to pushing things onto the stack for such cases, since it works out far easier in stdargs.h. > This may be an issue if the user decides to pass an uint64_t on ARM32. > > > I think it would probably be safer to declare this guy as taking 3-4 > > arguments and pass in 0 for the unused one. You could wrap in > > do_smc<N>() helpers if you really wanted. > > I will introduce helpers. It will be easier if we decide to extend the > number of parameters (SMC64 supports up to 5 parameters). Great. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |