[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/7] mini-os: Moved events code under arch



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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.