[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 05/27] ARM: GICv3 ITS: introduce ITS command handling
Hi Shanker, On 16/03/17 15:05, Shanker Donthineni wrote: > Hi Andre, > > > On 03/16/2017 06:20 AM, Andre Przywara wrote: >> To be able to easily send commands to the ITS, create the respective >> wrapper functions, which take care of the ring buffer. >> The first two commands we implement provide methods to map a collection >> to a redistributor (aka host core) and to flush the command queue (SYNC). >> Start using these commands for mapping one collection to each host CPU. >> >> Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx> >> --- ... >> @@ -184,22 +326,59 @@ retry: >> return -EINVAL; >> } >> >> +/* >> + * Before an ITS gets initialized, it should be in a quiescent state, where >> + * all outstanding commands and transactions have finished. >> + * So if the ITS is already enabled, turn it off and wait for all >> outstanding >> + * operations to get processed by polling the QUIESCENT bit. >> + */ >> +static int gicv3_disable_its(struct host_its *hw_its) >> +{ >> + uint32_t reg; >> + s_time_t deadline = NOW() + MILLISECS(100); >> + >> + reg = readl_relaxed(hw_its->its_base + GITS_CTLR); >> + if ( (reg & GITS_CTLR_QUIESCENT) && !(reg & GITS_CTLR_ENABLE) ) > > nit: I prefer changing to 'if ( !(reg & GITS_CTLR_ENABLE) && (reg & > GITS_CTLR_QUIESCENT) ) ' because bit GITS_CTLR_QUIESCENT is not valid if ITS > hardware is in enabled state. Sure, makes sense. I will change this. Thanks for having a look! Cheers, Andre. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |