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

Re: [Xen-devel] [PATCH 05 of 10] arm: More SMP bringup



On Thu, 2012-02-23 at 17:40 +0000, Tim Deegan wrote:
[...]
> +     /* Signal the next non-boot CPU to come and join us here */
> +     ldr   r0, =boot_gate         /* VA of gate */
> +     add   r0, r0, r10            /* PA of gate */
> +     mov   r1, #0                 /* (0 == unlocked) */
> +     str   r1, [r0]
> +     dsb
> +     isb
> +     sev

Here we have released the next CPU from the holding pen...

[...]
> +     /* Non-boot CPUs report that they've got this far */
> +     ldr   r0, =ready_cpus
> +     ldr   r1, [r0]               /* Read count of ready CPUs */
> +     add   r1, r1, #1             /* ++ */
> +     str   r1, [r0]               /* Writeback */
> +     dsb

... and here we do a non-atomic update of a shared variable.

What prevents the following CPU from catching us up and conflicting
here?

Would we be better signalling the next CPU after the increment instead?

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®.