Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108268792
D22716.id65343.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
D22716.id65343.diff
View Options
Index: sys/x86/x86/mp_x86.c
===================================================================
--- sys/x86/x86/mp_x86.c
+++ sys/x86/x86/mp_x86.c
@@ -1262,10 +1262,19 @@
u_int ipi_bitmap;
td = curthread;
+ ipi_bitmap = atomic_readandclear_int(&cpuid_to_pcpu[cpu]->
+ pc_ipi_bitmap);
+ if (ipi_bitmap & (1 << IPI_HARDCLOCK))
+ critical_enter();
td->td_intr_nesting_level++;
oldframe = td->td_intr_frame;
td->td_intr_frame = &frame;
- ipi_bitmap = atomic_readandclear_int(&cpuid_to_pcpu[cpu]->pc_ipi_bitmap);
+ if (ipi_bitmap & (1 << IPI_PREEMPT)) {
+#ifdef COUNT_IPIS
+ (*ipi_preempt_counts[cpu])++;
+#endif
+ sched_preempt(td);
+ }
if (ipi_bitmap & (1 << IPI_AST)) {
#ifdef COUNT_IPIS
(*ipi_ast_counts[cpu])++;
@@ -1273,23 +1282,15 @@
/* Nothing to do for AST */
}
if (ipi_bitmap & (1 << IPI_HARDCLOCK)) {
- critical_enter();
#ifdef COUNT_IPIS
(*ipi_hardclock_counts[cpu])++;
#endif
hardclockintr();
- critical_exit();
- }
-
- /* Run preempt after clock handlers since it may switch. */
- if (ipi_bitmap & (1 << IPI_PREEMPT)) {
-#ifdef COUNT_IPIS
- (*ipi_preempt_counts[cpu])++;
-#endif
- sched_preempt(td);
}
td->td_intr_frame = oldframe;
td->td_intr_nesting_level--;
+ if (ipi_bitmap & (1 << IPI_HARDCLOCK))
+ critical_exit();
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 7:22 AM (18 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16081144
Default Alt Text
D22716.id65343.diff (1 KB)
Attached To
Mode
D22716: x86: Restore the critical section around whole ipi_bitmap_handler() if hardclock IPI is delivered.
Attached
Detach File
Event Timeline
Log In to Comment