]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
functional cleanup for __attribute__((packed)) changes
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 Mar 2014 08:42:28 +0000 (09:42 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 14 Mar 2014 08:42:28 +0000 (09:42 +0100)
This is to separate the functional changes from the noop consistency changes.

* Pack struct cper_mce_record rather than creating a structure named __packed
* Remove unreferenced struct xgt_desc
* Use two u16's rather than two u32 16-bit bitfields

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Also drop now pointless (and always having been bogus) pack pragmas.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/mcheck/mce-apei.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/common/trace.c

index 337034122a798048f6e1aadc3b7ed3465eb9a21a..9488dbd37efdb6a2270ee906959ecff18e2e56cf 100644 (file)
@@ -44,7 +44,6 @@
        UUID_LE(0xfe08ffbe, 0x95e4, 0x4be7, 0xbc, 0x73, 0x40, 0x96,     \
                0x04, 0x4a, 0x38, 0xfc)
 
-#pragma pack(1)
 /*
  * CPER specification (in UEFI specification 2.3 appendix N) requires
  * byte-packed.
@@ -53,9 +52,7 @@ struct cper_mce_record {
        struct cper_record_header hdr;
        struct cper_section_descriptor sec_hdr;
        struct mce mce;
-} __packed;
-/* Reset to default packing */
-#pragma pack()
+} __attribute__((packed));
 
 int apei_write_mce(struct mce *m)
 {
index 9ffb4af709c48dc84c7e142eb7b8ae2585c0f90e..4b886e5d2d111b8ac47615d55d04523b0178f4d6 100644 (file)
@@ -670,11 +670,6 @@ void vmx_vmcs_exit(struct vcpu *v)
     }
 }
 
-struct xgt_desc {
-    unsigned short size;
-    unsigned long address __attribute__((packed));
-};
-
 static void vmx_set_host_env(struct vcpu *v)
 {
     unsigned int cpu = smp_processor_id();
index 41ddc336e18913651a71b2b4b59be54a3ddbc0f6..73ba57c91505da617fc1cdc57bafe86c927bebec 100644 (file)
@@ -643,7 +643,7 @@ static inline void insert_lost_records(struct t_buf *buf)
 {
     struct {
         u32 lost_records;
-        u32 did:16, vid:16;
+        u16 did, vid;
         u64 first_tsc;
     } __attribute__((packed)) ed;