Port-amd64 archive

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

Re: MSI/MSI-X implementation and interrupt handling on i386/amd64



Hi,

On 2019/09/22 22:41, Kimihiro Nonaka wrote:
Hi,

I updated jdolecek's patch.

https://gist.github.com/nonakap/05fb8d73a58cfe189128bb1f837d8203

Looks good to me.
I have wanted this, really. Could you commit it?


Thanks,

On Sat, Dec 15, 2018 at 3:55 AM Jaromír Doleček
<jaromir.dolecek%gmail.com@localhost> wrote:

Le mar. 11 déc. 2018 à 23:41, Jaromír Doleček
<jaromir.dolecek%gmail.com@localhost> a écrit :
I'm investigating an initial solution which will keep the
ipending+ilevel still as 64-bit quantity suitable for cmpxchg8b, using
4 bits for the ilevel and remaining 60 for ipending.

I have some intermediary code which compiles, but likely not yet works
(not tested yet):

https://www.netbsd.org/~jdolecek/x86_intr_cpu56.diff

I went for for 8/56 split for ilevel/ipending, because it makes the
coding way more convenient - no masks and shifts necessary, can fetch
ilevel with just 'movb' and then the whole thing with 'movq'.

In IDTVEC() I've replaced
   orl $(1 << num),CPUVAR(IPENDING)
with
   btsq $(num),CPUVAR(...)

since 'orq' doesn't support 64-bit immediate argument. For zeroing the
top 8bit for ipending I've used 'andq' with mask in register.

I've replaced the atomic_and_32() in intr.c with just membar_sync()
before and after, so that the code doesn't need 64-bit atomic ops. In
fact I'm not really convinced it's necessary at all - the code
disables all interrupts before executing this, so perhaps the
synchronization is not needed at all?

Jaromir

--
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>


Home | Main Index | Thread Index | Old Index