hyperv/vmbus: Change tx_evtflags type to u_long to match vmbus_evtflags
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6745
This commit is contained in:
parent
5c785643de
commit
51a9a000ee
@ -37,12 +37,16 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <machine/atomic.h>
|
||||
#include <machine/bus.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
|
||||
#include <dev/hyperv/vmbus/hv_vmbus_priv.h>
|
||||
#include <dev/hyperv/vmbus/vmbus_reg.h>
|
||||
#include <dev/hyperv/vmbus/vmbus_var.h>
|
||||
|
||||
static int vmbus_channel_create_gpadl_header(
|
||||
@ -65,11 +69,11 @@ vmbus_channel_set_event(hv_vmbus_channel *channel)
|
||||
if (channel->offer_msg.monitor_allocated) {
|
||||
struct vmbus_softc *sc = vmbus_get_softc();
|
||||
hv_vmbus_monitor_page *monitor_page;
|
||||
uint32_t chanid = channel->offer_msg.child_rel_id;
|
||||
|
||||
/* Each uint32_t represents 32 channels */
|
||||
synch_set_bit((channel->offer_msg.child_rel_id & 31),
|
||||
((uint32_t *)sc->vmbus_tx_evtflags
|
||||
+ ((channel->offer_msg.child_rel_id >> 5))));
|
||||
atomic_set_long(
|
||||
&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
|
||||
1UL << (chanid & VMBUS_EVTFLAG_MASK));
|
||||
|
||||
monitor_page = sc->vmbus_mnf2;
|
||||
synch_set_bit(channel->monitor_bit,
|
||||
|
@ -353,12 +353,10 @@ hv_vmbus_set_event(hv_vmbus_channel *channel)
|
||||
{
|
||||
struct vmbus_softc *sc = vmbus_get_softc();
|
||||
int ret = 0;
|
||||
uint32_t child_rel_id = channel->offer_msg.child_rel_id;
|
||||
uint32_t chanid = channel->offer_msg.child_rel_id;
|
||||
|
||||
/* Each uint32_t represents 32 channels */
|
||||
|
||||
synch_set_bit(child_rel_id & 31,
|
||||
(((uint32_t *)sc->vmbus_tx_evtflags + (child_rel_id >> 5))));
|
||||
atomic_set_long(&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
|
||||
1UL << (chanid & VMBUS_EVTFLAG_MASK));
|
||||
ret = hv_vmbus_signal_event(channel->signal_event_param);
|
||||
|
||||
return (ret);
|
||||
|
@ -340,7 +340,7 @@ vmbus_dma_alloc(struct vmbus_softc *sc)
|
||||
if (evtflags == NULL)
|
||||
return ENOMEM;
|
||||
sc->vmbus_rx_evtflags = (u_long *)evtflags;
|
||||
sc->vmbus_tx_evtflags = evtflags + (PAGE_SIZE / 2);
|
||||
sc->vmbus_tx_evtflags = (u_long *)(evtflags + (PAGE_SIZE / 2));
|
||||
sc->vmbus_evtflags = evtflags;
|
||||
|
||||
sc->vmbus_mnf1 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0,
|
||||
|
@ -66,6 +66,7 @@ CTASSERT(sizeof(struct vmbus_message) == VMBUS_MSG_SIZE);
|
||||
#define VMBUS_EVTFLAG_SHIFT 5
|
||||
#endif
|
||||
#define VMBUS_EVTFLAG_LEN (1 << VMBUS_EVTFLAG_SHIFT)
|
||||
#define VMBUS_EVTFLAG_MASK (VMBUS_EVTFLAG_LEN - 1)
|
||||
#define VMBUS_EVTFLAGS_SIZE 256
|
||||
|
||||
struct vmbus_evtflags {
|
||||
|
@ -63,7 +63,7 @@ struct vmbus_pcpu_data {
|
||||
|
||||
struct vmbus_softc {
|
||||
void (*vmbus_event_proc)(struct vmbus_softc *, int);
|
||||
void *vmbus_tx_evtflags;
|
||||
u_long *vmbus_tx_evtflags;
|
||||
/* event flags to host */
|
||||
void *vmbus_mnf2; /* monitored by host */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user