Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106330597
D30598.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
D30598.diff
View Options
diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c
--- a/sys/x86/xen/xen_intr.c
+++ b/sys/x86/xen/xen_intr.c
@@ -707,16 +707,6 @@
panic("unable to rebind xen IPI: %d", error);
isrc->xi_port = bind_ipi.port;
- isrc->xi_cpu = 0;
- xen_intr_port_to_isrc[bind_ipi.port] = isrc;
-
- error = xen_intr_assign_cpu(&isrc->xi_intsrc,
- cpu_apic_ids[cpu]);
- if (error)
- panic("unable to bind xen IPI to CPU#%d: %d",
- cpu, error);
-
- evtchn_unmask_port(bind_ipi.port);
#else
panic("Resume IPI event channel on UP");
#endif
@@ -737,18 +727,39 @@
panic("unable to rebind xen VIRQ#%d: %d", isrc->xi_virq, error);
isrc->xi_port = bind_virq.port;
- isrc->xi_cpu = 0;
- xen_intr_port_to_isrc[bind_virq.port] = isrc;
+}
+
+static void
+xen_intr_rebind_isrc(struct xenisrc *isrc)
+{
+#ifdef SMP
+ u_int cpu = isrc->xi_cpu;
+ int error;
+#endif
+
+ switch (isrc->xi_type) {
+ case EVTCHN_TYPE_IPI:
+ xen_rebind_ipi(isrc);
+ break;
+ case EVTCHN_TYPE_VIRQ:
+ xen_rebind_virq(isrc);
+ break;
+ default:
+ return;
+ }
+
+ xen_intr_port_to_isrc[isrc->xi_port] = isrc;
#ifdef SMP
+ isrc->xi_cpu = 0;
error = xen_intr_assign_cpu(&isrc->xi_intsrc,
cpu_apic_ids[cpu]);
if (error)
- panic("unable to bind xen VIRQ#%d to CPU#%d: %d",
- isrc->xi_virq, cpu, error);
+ panic("%s(): unable to rebind Xen channel %u to vCPU%u: %d",
+ __func__, isrc->xi_port, cpu, error);
#endif
- evtchn_unmask_port(bind_virq.port);
+ evtchn_unmask_port(isrc->xi_port);
}
/**
@@ -789,16 +800,7 @@
isrc = (struct xenisrc *)intr_lookup_source(vector);
if (isrc != NULL) {
isrc->xi_port = INVALID_EVTCHN;
- switch (isrc->xi_type) {
- case EVTCHN_TYPE_IPI:
- xen_rebind_ipi(isrc);
- break;
- case EVTCHN_TYPE_VIRQ:
- xen_rebind_virq(isrc);
- break;
- default:
- break;
- }
+ xen_intr_rebind_isrc(isrc);
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 29, 7:52 PM (7 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15632634
Default Alt Text
D30598.diff (1 KB)
Attached To
Mode
D30598: xen/intr: merge parts of resume functionality into new function
Attached
Detach File
Event Timeline
Log In to Comment