From: Ian Campbell Subject: Re: [PATCH 3/7] mini-os: Moved events code under arch Date: Fri, 6 Jun 2014 14:57:40 +0100 Message-ID: <1402063060.1313.53.camel@kazak.uk.xensource.com> References: <538D9161.6090402@linaro.org> <1401897998-29569-1-git-send-email-talex5@gmail.com> <1401897998-29569-4-git-send-email-talex5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WsueO-0006GG-Tl for xen-devel@lists.xenproject.org; Fri, 06 Jun 2014 13:57:45 +0000 In-Reply-To: <1401897998-29569-4-git-send-email-talex5@gmail.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: Thomas Leonard Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-06-04 at 17:06 +0100, Thomas Leonard wrote: > void init_events(void) > { > int i; > -#if defined(__x86_64__) > - asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); > - wrmsrl(0xc0000101, &cpu0_pda); /* 0xc0000101 is MSR_GS_BASE */ > - cpu0_pda.irqcount = -1; > - cpu0_pda.irqstackptr = (void*) (((unsigned long)irqstack + 2 * STACK_SIZE) > - & ~(STACK_SIZE - 1)); > -#endif > + > /* initialize event handler */ > for ( i = 0; i < NR_EVS; i++ ) > { > ev_actions[i].handler = default_handler; > mask_evtchn(i); > } > + > + arch_init_events(); I haven't actually validated that the code which has moved is unchanged, I will take it on trust if you write in the commit message that this is all code motion. As well as the code motion this also changes the ordering of the arch setup and this other loop. If that is deliberate please can you mention it in the commit log as an exception to the pure code motion statement. Other than that and the placement of prototypes (which as discussed should be in a header) this looks good to me. Ian.