[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(
From: |
Leonid Bloch |
Subject: |
[Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad() |
Date: |
Mon, 30 May 2016 12:14:26 +0300 |
From: Dmitry Fleytman <address@hidden>
Replace legacy cpu_to_le64w()/le64_to_cpup()
calls with stq_le_p()/ldq_le_p().
Signed-off-by: Dmitry Fleytman <address@hidden>
Signed-off-by: Leonid Bloch <address@hidden>
---
include/hw/pci/pci.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index ef6ba51..ee238ad 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -468,13 +468,13 @@ pci_get_long(const uint8_t *config)
static inline void
pci_set_quad(uint8_t *config, uint64_t val)
{
- cpu_to_le64w((uint64_t *)config, val);
+ stq_le_p(config, val);
}
static inline uint64_t
pci_get_quad(const uint8_t *config)
{
- return le64_to_cpup((const uint64_t *)config);
+ return ldq_le_p(config);
}
static inline void
--
2.5.5
- [Qemu-devel] [PATCH v6 00/17] Introduce Intel 82574 GbE Controller Emulation (e1000e), Leonid Bloch, 2016/05/30
- [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(),
Leonid Bloch <=
- Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(), Michael S. Tsirkin, 2016/05/30
- Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(), Dmitry Fleytman, 2016/05/30
- Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(), Michael S. Tsirkin, 2016/05/30
- Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(), Dmitry Fleytman, 2016/05/30
- Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(), Michael S. Tsirkin, 2016/05/30
- Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(), Dmitry Fleytman, 2016/05/30
- Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad(), Michael S. Tsirkin, 2016/05/30
[Qemu-devel] [PATCH v6 04/17] pcie: Add support for PCIe CAP v1, Leonid Bloch, 2016/05/30
[Qemu-devel] [PATCH v6 03/17] pci: Introduce define for PM capability version 1.1, Leonid Bloch, 2016/05/30
[Qemu-devel] [PATCH v6 05/17] pcie: Introduce function for DSN capability creation, Leonid Bloch, 2016/05/30