fix 32-bit compilation
Subsystems (2)
cover fix 32-bit compilation
again... Is it time for a github mirror and travis-ci?
Andrew Jones (2):
pci: fix 32-bit compilation
lib/x86/apic: fix 32-bit compilation
lib/pci-edu.c | 4 ++-- lib/pci.c | 2 +- lib/x86/apic.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.9.3
PATCH 2/2 lib/x86/apic: fix 32-bit compilation
Use the proper name, as the improper one isn't defined... Also cleanup some trailing spaces.
--- lib/x86/apic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
lib/x86/apic.c +4 -4
@@ -120,8 +120,8 @@ uint8_t apic_get_tpr(void)#ifdef __x86_64__ asmvolatile ("mov %%cr8, %0" :"=r" (tpr));#else - tpr =apic_read (APIC_TPR ) >>4 ; -#endif + tpr =apic_read (APIC_TASKPRI ) >>4 ; +#endif return tpr; }
@@ -130,8 +130,8 @@ void apic_set_tpr(uint8_t tpr)#ifdef __x86_64__ asmvolatile ("mov %0, %%cr8" : :"r" ((unsigned long ) tpr));#else -apic_write (APIC_TPR , tpr <<4 ); -#endif +apic_write (APIC_TASKPRI , tpr <<4 ); +#endif }int enable_x2apic (void )
Signature · 1 line
2.9.3
PATCH 1/2 pci: fix 32-bit compilation
In reply to Andrew Jones--- lib/pci-edu.c | 4 ++-- lib/pci.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
lib/pci-edu.c +2 -2
@@ -48,9 +48,9 @@ void edu_dma(struct pci_edu_dev *dev, iova_t iova,assert (size <=EDU_DMA_SIZE_MAX );assert (dev_offset <EDU_DMA_SIZE_MAX ); -printf ("edu device DMA start %s addr %p size 0x%lu off 0x%x\n" , +printf ("edu device DMA start %s addr 0x%" PRIx64" size 0x%lu off 0x%x\n" , from_device ?"FROM" :"TO" , - (void *)iova, size, dev_offset); + iova, (ulong )size, dev_offset);if (from_device) { from = dev_offset +EDU_DMA_START ;
lib/pci.c +1 -1
@@ -67,7 +67,7 @@ bool pci_setup_msi(struct pci_dev *dev, uint64_t msi_addr, uint32_t msi_data)pci_config_writel (addr, offset +PCI_MSI_DATA_32 , msi_data);printf ("MSI: dev 0x%x init 32bit address: " , addr); } -printf ("addr=0x%lx, data=0x%x\n" , msi_addr, msi_data); +printf ("addr=0x%" PRIx64", data=0x%x\n" , msi_addr, msi_data); msi_control |=PCI_MSI_FLAGS_ENABLE ;pci_config_writew (addr, offset +PCI_MSI_FLAGS , msi_control);
Signature · 1 line
2.9.3
Re: [PATCH kvm-unit-tests 1/2] pci: fix 32-bit compilation
Quoted 2 lines · Andrew Jones
Cc Peter Xu <[email protected]>Signed-off-by Andrew Jones <[email protected]>
Quoted 37 lines
--- lib/pci-edu.c | 4 ++-- lib/pci.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)lib/pci-edu.c +2
-2@@ -48,9 +48,9 @@ void edu_dma(struct pci_edu_dev *dev, iova_t iova,assert (size <=EDU_DMA_SIZE_MAX );assert (dev_offset <EDU_DMA_SIZE_MAX ); -printf ("edu device DMA start %s addr %p size 0x%lu off 0x%x\n" , +printf ("edu device DMA start %s addr 0x%" PRIx64" size 0x%lu off 0x%x\n" , from_device ?"FROM" :"TO" , - (void *)iova, size, dev_offset); + iova, (ulong )size, dev_offset);if (from_device) { from = dev_offset +EDU_DMA_START ;lib/pci.c +1
-1@@ -67,7 +67,7 @@ bool pci_setup_msi(struct pci_dev *dev, uint64_t msi_addr, uint32_t msi_data)pci_config_writel (addr, offset +PCI_MSI_DATA_32 , msi_data);printf ("MSI: dev 0x%x init 32bit address: " , addr); } -printf ("addr=0x%lx, data=0x%x\n" , msi_addr, msi_data); +printf ("addr=0x%" PRIx64", data=0x%x\n" , msi_addr, msi_data); msi_control |=PCI_MSI_FLAGS_ENABLE ;pci_config_writew (addr, offset +PCI_MSI_FLAGS , msi_control);Signature · 1 line
2.9.3
-- peterx
Paolo Bonzini
maintainerQuoted 1 line · Andrew Jones
again... Is it time for a github mirror and travis-ci?
Uhm, yes it is. :(
Paolo
Quoted 10 lines
Andrew Jones (2):
pci: fix 32-bit compilation
lib/x86/apic: fix 32-bit compilationlib/pci-edu.c | 4 ++-- lib/pci.c | 2 +- lib/x86/apic.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-)
Re: [PATCH kvm-unit-tests 2/2] lib/x86/apic: fix 32-bit compilation
In reply to Andrew JonesQuoted 26 lines · Andrew Jones
Use the proper name, as the improper one isn't defined... Also cleanup some trailing spaces.
Cc Paolo Bonzini <[email protected]>Signed-off-by Andrew Jones <[email protected]>--- lib/x86/apic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)lib/x86/apic.c +2
-2@@ -120,8 +120,8 @@ uint8_t apic_get_tpr(void)#ifdef __x86_64__ asmvolatile ("mov %%cr8, %0" :"=r" (tpr));#else - tpr =apic_read (APIC_TPR ) >>4 ; -#endif + tpr =apic_read (APIC_TASKPRI ) >>4 ; +#endif return tpr; }
lib/x86/apic.c void apic_set_tpr(uint8_t tpr) · line 137
Quoted 10 lines
lib/x86/apic.c +2
-2@@ -130,8 +130,8 @@ void apic_set_tpr(uint8_t tpr)#ifdef __x86_64__ asmvolatile ("mov %0, %%cr8" : :"r" ((unsigned long ) tpr));#else -apic_write (APIC_TPR , tpr <<4 ); -#endif +apic_write (APIC_TASKPRI , tpr <<4 ); +#endif }int enable_x2apic (void )
Queued both, thanks and sorry.
Paolo