summary refs log tree commit diff stats
path: root/include/standard-headers/linux/input-event-codes.h
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-06-04 14:55:02 +0800
committerSong Gao <gaosong@loongson.cn>2025-06-10 11:55:51 +0800
commit095e6fcf624e9778ca455d3e654bfd7a2f43d653 (patch)
tree372fbcb67526a46b76be5e6cb5e57cc644c784ff /include/standard-headers/linux/input-event-codes.h
parent9c55c03c05c1899521ff0c991b9296633d759890 (diff)
downloadfocaccia-qemu-095e6fcf624e9778ca455d3e654bfd7a2f43d653.tar.gz
focaccia-qemu-095e6fcf624e9778ca455d3e654bfd7a2f43d653.zip
hw/intc/loongarch_pch: Convert to little endian with ID register
With PCH ID register, it is defined as union type as follows:
union LoongArchPIC_ID {
    struct {
        uint8_t _reserved_0[3];
        uint8_t id;
        uint8_t version;
        uint8_t _reserved_1;
        uint8_t irq_num;
        uint8_t _reserved_2;
    } QEMU_PACKED desc;
    uint64_t data;
}

And with pch driver in virt machine irq_number is parsed with little
endian method:
  vec_count = ((readq(priv->base) >> 48) & 0xff) + 1

So the value of ID register should be converted to little endian.
With this patch, linux kernel passes to run on S390 big endian host
machine with TCG method.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20250604065502.1114098-3-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'include/standard-headers/linux/input-event-codes.h')
0 files changed, 0 insertions, 0 deletions