Date: Mon, 8 Jan 2024 16:21:26 +0100 From: =?UTF-8?Q?Bojan_Novkovi=C4=87?= <bnovkov@freebsd.org> To: himanshu@thechauhan.dev Cc: freebsd-riscv@freebsd.org Subject: Re: Calling a function on other CPUs in an SMP machine Message-ID: <CA%2B=MDrGxL19tenSwXXGNNr3iEhomgeo49isGdq90NoFPW%2B1Wew@mail.gmail.com> In-Reply-To: <9992B290-04CA-485C-A79B-5CDFC8AA917D@fer.hr> References: <7A8DC6C8-9582-455C-B05D-9F24838A9070@thechauhan.dev> <9992B290-04CA-485C-A79B-5CDFC8AA917D@fer.hr>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000000254be060e70c185 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 8, 2024 at 3:49=E2=80=AFPM Himanshu Chauhan <himanshu@thechauha= n.dev> wrote: > What is the best way to call a function (like a per-cpu setup function fr= om a driver) on remote CPUs in an SMP machine? > > The 'smp_rendezvous{_cpu}' functions in 'sys/smp.h' are what you are looking for. They are not listed in the manpages, but you can find more information about them in 'kern/subr_smp.c'. Bojan --0000000000000254be060e70c185 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Mon, Jan 8, 2024 at 3:49=E2=80=AFPM=C2= =A0Himanshu Chauhan <<a href=3D"mailto:himanshu@thechauhan.dev" target= =3D"_blank">himanshu@thechauhan.dev</a>> wrote:</div><div class=3D"gmail= _quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex= ;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u> <div dir=3D"auto"></div><pre><div dir=3D"auto">What is the best way to call= a function (like a per-cpu setup function from a driver) on remote CPUs in= an SMP machine?<br></div></pre></blockquote><div>The 'smp_rendezvous{_= cpu}' functions in 'sys/smp.h' are what you are looking for. <b= r></div><div>They are not listed in the manpages, but you can find more inf= ormation about them in 'kern/subr_smp.c'.</div><div><br></div><div>= Bojan<br></div></div></div> --0000000000000254be060e70c185--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B=MDrGxL19tenSwXXGNNr3iEhomgeo49isGdq90NoFPW%2B1Wew>