Re: [PATCH v2 3/3] PCI: hv: Introduce hv_msi_entry
From: Boqun Feng <hidden>
Date: 2020-02-04 02:13:34
Also in:
linux-arm-kernel, linux-pci, lkml
From: Boqun Feng <hidden>
Date: 2020-02-04 02:13:34
Also in:
linux-arm-kernel, linux-pci, lkml
On Mon, Feb 03, 2020 at 03:41:52PM +0100, Thomas Gleixner wrote:
Boqun Feng [off-list ref] writes:quoted
/*diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 6b79515abb82..3bdaa3b6e68f 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h@@ -240,6 +240,11 @@ bool hv_vcpu_is_preempted(int vcpu); static inline void hv_apic_init(void) {} #endif +#define hv_set_msi_address_from_desc(msi_entry, msi_desc) \ +do { \ + (msi_entry)->address = (msi_desc)->msg.address_lo; \ +} while (0)Any reason why this needs to be a macro? inlines are preferrred. They
Making it an inline function will require #include <linux/msi.h> in mshyperv.h, which I was trying to avoid. But now it seems pointless. I will make it an inline in next version. Regards, Boqun
are typesafe and readable.
Thanks,
tglx