[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 3/4] arm: traps: handle PSCI calls inside `vsmc.c`
Hi, On 06/30/2017 10:13 PM, Stefano Stabellini wrote: On Thu, 22 Jun 2017, Volodymyr Babchuk wrote:+ } + return false; +} + +/* helper function for checking arm mode 32/64 bit */ +static inline int psci_mode_check(struct domain *d, register_t fid) +{ + return !( is_64bit_domain(d)^( (fid & PSCI_0_2_64BIT) >> 30 ) ); +} + +/* PSCI 2.0 interface */ +static bool handle_ssc(struct cpu_user_regs *regs) +{ + register_t fid = get_user_reg(regs, 0); + + switch ( ARM_SMCCC_FUNC_NUM(fid) ) + { + case ARM_SMCCC_FUNC_NUM(PSCI_0_2_FN_PSCI_VERSION):As we are not using the PSCI_0_2_FN64_* definitions anymore, it would make sense to add a comment in psci.h on top of them to explain why they are not used (the function number is the same as the 32-bit counterpart). Well they are not unused (see arch/arm/psci.c). But I think it is quite confusing to use ARM_SMCC_FUNC_NUM(PSCI_0_2_PSCI_VERSION) to extract the function number from the 32-bit version. It would be much better macro for the function number (i.e abstracting 0, 1, 2,...). Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |