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

[PATCH v2 1/2] xen/kexec: Remove use of TRUE/FALSE


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
  • Date: Wed, 11 Aug 2021 13:31:34 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 11 Aug 2021 12:32:23 +0000
  • Ironport-hdrordr: A9a23:j9dgbqpEV4v1NQiFn5gA3YUaV5oReYIsimQD101hICG8cqSj9v xG+85rrCMc6QxhI03I9urwW5VoLUmyyXcx2/h0AV7AZniBhILLFvAB0WKK+VSJcEeSmtK1l5 0QFJSWYOeAdWSS5vyb3ODXKbgdKaG8gcWVuds=
  • Ironport-sdr: 0Pr+/cXMiNF+ductPW+UauNj+pLbwi+9Quh/Ktpe1IXnqZVPorHwVoA3nTd1jbH6rlvbJMgOMb zd/CuEpGoRoJGgqReD7rlzpBR1NtrVserPTme3xNaiUKYTR5wd0DoNCKzrpUVfFrUEdVp+i4jx 6rBDM+x1eCGQkFJPHX5UYEt1sbCWLZ/1HUPaAzrb61s+bBMXQ1240oG2WpTGJOhUlMLJ4GKvgu eGfuXfdsXYQBFIAvCf7oAOmH29E1DreBPSsIZHGcGjsepbBw7561IV0FI4UMGqt1QgUyg7QQ5S /j8fTwDPnhcEoAkrw3NHZNsm
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Whilst fixing this, also changed bool_t to bool, and use __read_mostly.

Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>

v2:
 *Use __read_mostly
---
 xen/common/kexec.c      | 6 +++---
 xen/include/xen/kexec.h | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index ebeee6405a..c63db618a7 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -35,7 +35,7 @@
 #include <compat/kexec.h>
 #endif
 
-bool_t kexecing = FALSE;
+bool __read_mostly kexecing;
 
 /* Memory regions to store the per cpu register state etc. on a crash. */
 typedef struct { Elf_Note * start; size_t size; } crash_note_range_t;
@@ -383,7 +383,7 @@ void kexec_crash(enum crash_reason reason)
     if ( !test_bit(KEXEC_IMAGE_CRASH_BASE + pos, &kexec_flags) )
         return;
 
-    kexecing = TRUE;
+    kexecing = true;
 
     if ( kexec_common_shutdown() != 0 )
         return;
@@ -399,7 +399,7 @@ static long kexec_reboot(void *_image)
 {
     struct kexec_image *image = _image;
 
-    kexecing = TRUE;
+    kexecing = true;
 
     kexec_common_shutdown();
     machine_reboot_kexec(image);
diff --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h
index 9f7a912e97..e66eb6a8e5 100644
--- a/xen/include/xen/kexec.h
+++ b/xen/include/xen/kexec.h
@@ -17,7 +17,7 @@ typedef struct xen_kexec_reserve {
 extern xen_kexec_reserve_t kexec_crash_area;
 extern paddr_t kexec_crash_area_limit;
 
-extern bool_t kexecing;
+extern bool kexecing;
 
 void set_kexec_crash_area_size(u64 system_ram);
 
@@ -81,7 +81,7 @@ void vmcoreinfo_append_str(const char *fmt, ...)
 #else /* !CONFIG_KEXEC */
 
 #define crashinfo_maxaddr_bits 0
-#define kexecing 0
+#define kexecing false
 
 static inline void kexec_early_calculations(void) {}
 static inline void kexec_crash(enum crash_reason reason)
-- 
2.25.1




 


Rackspace

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