[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 08/17] plat/common: Add ukplat_lcpu_{enable, disable}_irq functions


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Wed, 4 Apr 2018 16:53:59 +0300
  • Cc: simon.kuenzer@xxxxxxxxx
  • Delivery-date: Wed, 04 Apr 2018 13:54:24 +0000
  • Ironport-phdr: 9a23:srIYWBwLz0ZhuFLXCy+O+j09IxM/srCxBDY+r6Qd2+oQIJqq85mqBkHD//Il1AaPAd2Araocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HdbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHolikJKjA3/mLQhMNygqJWuw6tqwBlzoLIeoyZKOZyc6XAdt0aX2pBWcNRWjRfD4O7dIsPE+sBPeBFpIf7ulsOtQa+DhSrCezzzT9InWP23aw80+g7FQHGwRQgH88VvXvIt9X5Lr8SUf2uw6XS1zXDaOpb1DHg44bLahAsueyAUL1tfcbLykQiFxnJgkuOpYHnJT+Y2PwBv3WU4uZ9T+6iiG4qpxtvrjWhyMogkJTFi40Lxl3C6C532pw6JceiR05+edOkFZxQuDyEOIZuWcMiRn1ouD49yr0bpZ63ZCgKx4ojxx7Yc/GHbY2I7QjiVOaVOzt3mGlldKinhxav6kes0Pf8Vs6s3FZLqCpKjMXMu2gQ2xHc98SLUPhw80e71TqRyQze6PtILE4smareMZEhw7owlpQJsUTEGy/7gFn5jKiNdkU4++io7f7rYrH7pp+EKo95kR3xMr80lsynHOQ3KRICX3Kc+eikzr3s4VX5QKlWjv0xiqTZtZHaJcIapq6+GA9Zy5ss5AihDzi41NQVhn0HLFNeeBKblIjlIV7PL+7+DfulhFSsijhrzejcPrL9GpXNMmTDkLD5cLZm6k5czQ0zzdZF65JXF7EOPvTzW07vu9zCFRI5NRK7zPrjCNpnzYwSQ3yAArLKeJ/V5FqJ4OMoOKyAaZEYvB75KuM5/Lj+gHl/nkUSLoez2p5CQ3ejAvVga2GEeWek1twGCnsLuEw6UfT3oFaZFyZObTCoWPRvtXkAFIu6ANKbFciWi7ub0XLjEw==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

These functions enable/disable interrupts without using the interrupt
enable flag of the CPU flags register. These are used by the CPU halting
functions.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 include/uk/plat/lcpu.h | 10 ++++++++++
 plat/xen/lcpu.c        | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/include/uk/plat/lcpu.h b/include/uk/plat/lcpu.h
index 5f5939d..de37e8b 100644
--- a/include/uk/plat/lcpu.h
+++ b/include/uk/plat/lcpu.h
@@ -49,6 +49,16 @@ __u8 ukplat_lcpu_count(void);
 #endif
 
 /**
+ * Enables interrupts
+ */
+void ukplat_lcpu_enable_irq(void);
+
+/**
+ * Disables interrupts
+ */
+void ukplat_lcpu_disable_irq(void);
+
+/**
  * Returns current interrupt flags and disables them
  * @return interrupt flags (Note that the format is unspecified)
  */
diff --git a/plat/xen/lcpu.c b/plat/xen/lcpu.c
index 476345b..eed89fb 100644
--- a/plat/xen/lcpu.c
+++ b/plat/xen/lcpu.c
@@ -44,6 +44,16 @@
 #include <uk/plat/lcpu.h>
 #include <uk/plat/time.h>
 
+void ukplat_lcpu_enable_irq(void)
+{
+       local_irq_enable();
+}
+
+void ukplat_lcpu_disable_irq(void)
+{
+       local_irq_disable();
+}
+
 unsigned long ukplat_lcpu_save_irqf(void)
 {
        unsigned long flags;
-- 
2.1.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.