Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156900878
D6497.id16776.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6497.id16776.diff
View Options
Index: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
+++ head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
@@ -186,12 +186,11 @@
return (FILTER_HANDLED);
}
-u_long *hv_vmbus_intr_cpu[MAXCPU];
-
void
hv_vector_handler(struct trapframe *trap_frame)
{
- int cpu;
+ struct vmbus_softc *sc = vmbus_get_softc();
+ int cpu = curcpu;
/*
* Disable preemption.
@@ -201,8 +200,7 @@
/*
* Do a little interrupt counting.
*/
- cpu = PCPU_GET(cpuid);
- (*hv_vmbus_intr_cpu[cpu])++;
+ (*VMBUS_SC_PCPU_GET(sc, intr_cnt, cpu))++;
hv_vmbus_isr(trap_frame);
@@ -400,7 +398,7 @@
CPU_FOREACH(j) {
snprintf(buf, sizeof(buf), "cpu%d:hyperv", j);
- intrcnt_add(buf, &hv_vmbus_intr_cpu[j]);
+ intrcnt_add(buf, VMBUS_SC_PCPU_PTR(sc, intr_cnt, j));
for (i = 0; i < 2; i++)
setup_args.page_buffers[2 * j + i] = NULL;
Index: head/sys/dev/hyperv/vmbus/vmbus_var.h
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_var.h
+++ head/sys/dev/hyperv/vmbus/vmbus_var.h
@@ -33,6 +33,7 @@
struct vmbus_pcpu_data {
int event_flag_cnt; /* # of event flags */
+ u_long *intr_cnt;
} __aligned(CACHE_LINE_SIZE);
struct vmbus_softc {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 5:16 AM (18 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33234065
Default Alt Text
D6497.id16776.diff (1 KB)
Attached To
Mode
D6497: hyperv/vmbus: Move vmbus interrupt counter into vmbus softc
Attached
Detach File
Event Timeline
Log In to Comment