Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1548701 > unrolled thread
| Started by | kys@exchange.microsoft.com |
|---|---|
| First post | 2016-12-30 20:40 +0100 |
| Last post | 2016-12-30 20:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 16/18] Drivers: hv: vmbus: Define an API to retrieve virtual processor index kys@exchange.microsoft.com - 2016-12-30 20:40 +0100
| From | kys@exchange.microsoft.com |
|---|---|
| Date | 2016-12-30 20:40 +0100 |
| Subject | [PATCH 16/18] Drivers: hv: vmbus: Define an API to retrieve virtual processor index |
| Message-ID | <sUbbX-9d-13@gated-at.bofh.it> |
From: K. Y. Srinivasan <kys@microsoft.com> As part of cleaning up architecture specific code, define an API to retrieve the virtual procesor index. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> --- arch/x86/include/asm/mshyperv.h | 2 ++ drivers/hv/hv.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 1ea19a5..2d40bfc 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h @@ -149,6 +149,8 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type) #define hv_get_synic_state(val) rdmsrl(HV_X64_MSR_SCONTROL, val) #define hv_set_synic_state(val) wrmsrl(HV_X64_MSR_SCONTROL, val) +#define hv_get_vp_index(index) rdmsrl(HV_X64_MSR_VP_INDEX, index) + void hyperv_callback_vector(void); #ifdef CONFIG_TRACING #define trace_hyperv_callback_vector hyperv_callback_vector diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 3c9a819..9b2630b 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -306,7 +306,7 @@ int hv_synic_init(unsigned int cpu) * of cpuid and Linux' notion of cpuid. * This array will be indexed using Linux cpuid. */ - rdmsrl(HV_X64_MSR_VP_INDEX, vp_index); + hv_get_vp_index(vp_index); hv_context.vp_index[cpu] = (u32)vp_index; /* -- 1.7.4.1
Back to top | Article view | linux.kernel
csiph-web