|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/3] xen: drop in_atomic()
Currently there is only one user of in_atomic(), and that is in an
#ifdef 0 section. This has been so since Xen 4.1, so chances are
rather slim we suddenly want to enable it again.
Dropping in_atomic() will remove the last user of preempt_count()
in non-debug builds enabling further optimizations.
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
xen/arch/x86/hvm/hvm.c | 16 ----------------
xen/common/preempt.c | 5 -----
xen/include/xen/preempt.h | 2 --
3 files changed, 23 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 8993c2aa57..7b36765b97 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3185,22 +3185,6 @@ static enum hvm_translation_result __hvm_copy(
ASSERT(is_hvm_vcpu(v));
- /*
- * XXX Disable for 4.1.0: PV-on-HVM drivers will do grant-table ops
- * such as query_size. Grant-table code currently does copy_to/from_guest
- * accesses under the big per-domain lock, which this test would disallow.
- * The test is not needed until we implement sleeping-on-waitqueue when
- * we access a paged-out frame, and that's post 4.1.0 now.
- */
-#if 0
- /*
- * If the required guest memory is paged out, this function may sleep.
- * Hence we bail immediately if called from atomic context.
- */
- if ( in_atomic() )
- return HVMTRANS_unhandleable;
-#endif
-
while ( todo > 0 )
{
enum hvm_translation_result res;
diff --git a/xen/common/preempt.c b/xen/common/preempt.c
index 3b4178fd44..20913e20d3 100644
--- a/xen/common/preempt.c
+++ b/xen/common/preempt.c
@@ -25,11 +25,6 @@
DEFINE_PER_CPU(unsigned int, __preempt_count);
-bool_t in_atomic(void)
-{
- return preempt_count() || in_irq() || !local_irq_is_enabled();
-}
-
#ifndef NDEBUG
void ASSERT_NOT_IN_ATOMIC(void)
{
diff --git a/xen/include/xen/preempt.h b/xen/include/xen/preempt.h
index bef83135a1..f715ca09bc 100644
--- a/xen/include/xen/preempt.h
+++ b/xen/include/xen/preempt.h
@@ -26,8 +26,6 @@ DECLARE_PER_CPU(unsigned int, __preempt_count);
preempt_count()--; \
} while (0)
-bool_t in_atomic(void);
-
#ifndef NDEBUG
void ASSERT_NOT_IN_ATOMIC(void);
#else
--
2.16.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |