These fields are wider than a single byte; stick to cpu_to_leXX() for consistency with other field settings in this function.
Signed-off-by: Laszlo Ersek lersek@redhat.com --- src/acpi.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/acpi.c b/src/acpi.c index 119d1c1..8bbc92b 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -367,8 +367,9 @@ build_madt(void) intsrcovr->type = APIC_XRUPT_OVERRIDE; intsrcovr->length = sizeof(*intsrcovr); intsrcovr->source = 0; - intsrcovr->gsi = 2; - intsrcovr->flags = 0; /* conforms to bus specifications */ + intsrcovr->gsi = cpu_to_le32(2); + intsrcovr->flags = cpu_to_le16(0); + /* conforms to bus specifications */ intsrcovr++; } for (i = 1; i < 16; i++) { @@ -379,8 +380,9 @@ build_madt(void) intsrcovr->type = APIC_XRUPT_OVERRIDE; intsrcovr->length = sizeof(*intsrcovr); intsrcovr->source = i; - intsrcovr->gsi = i; - intsrcovr->flags = 0xd; /* active high, level triggered */ + intsrcovr->gsi = cpu_to_le32(i); + intsrcovr->flags = cpu_to_le16(0xd); + /* active high, level triggered */ intsrcovr++; }
@@ -388,7 +390,7 @@ build_madt(void) local_nmi->type = APIC_LOCAL_NMI; local_nmi->length = sizeof(*local_nmi); local_nmi->processor_id = 0xff; /* all processors */ - local_nmi->flags = 0; + local_nmi->flags = cpu_to_le16(0); local_nmi->lint = 1; /* LINT1 */ local_nmi++;