pci: Add cacheline and MWI helpers from Linux
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 1 Nov 2017 18:09:09 +0000 (14:09 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Nov 2017 15:46:55 +0000 (10:46 -0500)
commit47bba679f91a315b6b7e8d96c7b9eb73dc3919fe
treea8122689dbeae6e19f677376d763f498885c9e51
parente8fe4b103e449d10befe7d887a8c8e4dce357d42
pci: Add cacheline and MWI helpers from Linux

These were copied and ported from commit 569dbb88e80d ("Linux 4.13").

They are simple enough that we can use them too.  We weren't doing anything
with memory-write-invalidate, but it's a performance helper.  Eventually,
we might end up porting all of Linux's PCI infrastructure.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/pci.c
kern/arch/x86/pci.h
kern/drivers/net/bnx2x/bnx2x_dev.c
kern/drivers/net/etherigbe.c