From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 1/4] x86/hvm: Centralize and simplify the RTC IRQ logic. Date: Thu, 28 Mar 2013 13:42:33 +0000 Message-ID: <20130328134233.GG23950@ocelot.phlegethon.org> References: <1364476936-15824-1-git-send-email-tim@xen.org> <1364476936-15824-2-git-send-email-tim@xen.org> <515446C6.1060907@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <515446C6.1060907@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: "suravee.suthikulpanit@amd.com" , "JBeulich@suse.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org At 13:33 +0000 on 28 Mar (1364477638), Andrew Cooper wrote: > On 28/03/2013 13:22, Tim Deegan wrote: > > Signed-off-by: Tim Deegan > > --- > > xen/arch/x86/hvm/rtc.c | 43 ++++++++++++++++++++++--------------------- > > 1 file changed, 22 insertions(+), 21 deletions(-) > > > > diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c > > index c1e09d8..368d3c8 100644 > > --- a/xen/arch/x86/hvm/rtc.c > > +++ b/xen/arch/x86/hvm/rtc.c > > @@ -50,14 +50,26 @@ static void rtc_set_time(RTCState *s); > > static inline int from_bcd(RTCState *s, int a); > > static inline int convert_hour(RTCState *s, int hour); > > > > -static void rtc_toggle_irq(RTCState *s) > > +static void rtc_update_irq(RTCState *s) > > { > > struct domain *d = vrtc_domain(s); > > + uint8_t irqf; > > > > ASSERT(spin_is_locked(&s->lock)); > > - s->hw.cmos_data[RTC_REG_C] |= RTC_IRQF; > > - hvm_isa_irq_deassert(d, RTC_IRQ); > > - hvm_isa_irq_assert(d, RTC_IRQ); > > + > > + /* IRQ is raised if any of the sources is raised & enabled */ > > s/sources is/sources are/ No, thanks. :P Tim.