[haiku-commits] Re: r36559 - haiku/trunk/src/system/kernel/arch/x86

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 30 Apr 2010 23:06:50 +0200

On 2010-04-30 at 22:45:17 [+0200], François Revol <revol@xxxxxxx> wrote:
> Le Fri, 30 Apr 2010 21:37:19 +0200 (CEST), ingo_weinhold@xxxxxx a écrit
> :
> > Author: bonefish
> > Date: 2010-04-30 21:37:19 +0200 (Fri, 30 Apr 2010)
> > New Revision: 36559
> > Changeset: http://dev.haiku-os.org/changeset/36559/haiku
> >
> > Modified:
> >    haiku/trunk/src/system/kernel/arch/x86/arch_cpu.cpp
> > Log:
> > Added a third rendez-vous point for the call_all_cpus() MTRR
> > functions. This
> > fixes the problem that the CPU initiating the call could make the
> > next call
> > and reset sCpuRendezvous2 before the other CPUs have returned from
> > their
> > smp_cpu_rendezvous(). Probably virtually impossible on real hardware,
> > but I
> > could almost reliably reproduce it with qemu -smp 2 (would hang the
> > late boot
> > process without ability to enter KDL).
> 
> Couldn't it be interesting to have a synchronized version of
> call_all_cpus() that'd do this on its own ? It might be useful in more
> than 1 place maybe ?

There already is a call_all_cpus_sync() which ensures that the call has 
finished on all CPUs when it returns. It is implemented by first messaging 
the other CPUs synchronously (i.e. waiting for them to be done) and 
afterwards calling the function itself. This makes is unusable for this 
case, since setting the MTRRs itself is supposed to happen synchronously on 
all CPUs.

CU, Ingo

Other related posts: