qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] apb: Fix compiler warnings (large constants)
@ 2014-06-07 18:54 Stefan Weil
  2014-06-08 12:48 ` Mark Cave-Ayland
  2014-06-08 13:13 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Weil @ 2014-06-07 18:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Mark Cave-Ayland

Both constants need more than 32 bit.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 hw/pci-host/apb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
index 1497008..6fa2723 100644
--- a/hw/pci-host/apb.c
+++ b/hw/pci-host/apb.c
@@ -99,8 +99,8 @@ do { printf("IOMMU: " fmt , ## __VA_ARGS__); } while (0)
 #define IOMMU_TTE_DATA_SIZE     (1ULL << 61)
 #define IOMMU_TTE_DATA_W        (1ULL << 1)
 
-#define IOMMU_TTE_PHYS_MASK_8K  0x1ffffffe000
-#define IOMMU_TTE_PHYS_MASK_64K 0x1ffffff8000
+#define IOMMU_TTE_PHYS_MASK_8K  0x1ffffffe000ULL
+#define IOMMU_TTE_PHYS_MASK_64K 0x1ffffff8000ULL
 
 #define IOMMU_TSB_8K_OFFSET_MASK_8M    0x00000000007fe000ULL
 #define IOMMU_TSB_8K_OFFSET_MASK_16M   0x0000000000ffe000ULL
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] apb: Fix compiler warnings (large constants)
  2014-06-07 18:54 [Qemu-devel] [PATCH] apb: Fix compiler warnings (large constants) Stefan Weil
@ 2014-06-08 12:48 ` Mark Cave-Ayland
  2014-06-08 14:37   ` Stefan Weil
  2014-06-08 13:13 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Cave-Ayland @ 2014-06-08 12:48 UTC (permalink / raw)
  To: Stefan Weil, qemu-devel; +Cc: qemu-trivial

On 07/06/14 19:54, Stefan Weil wrote:

> Both constants need more than 32 bit.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>   hw/pci-host/apb.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
> index 1497008..6fa2723 100644
> --- a/hw/pci-host/apb.c
> +++ b/hw/pci-host/apb.c
> @@ -99,8 +99,8 @@ do { printf("IOMMU: " fmt , ## __VA_ARGS__); } while (0)
>   #define IOMMU_TTE_DATA_SIZE     (1ULL << 61)
>   #define IOMMU_TTE_DATA_W        (1ULL << 1)
>
> -#define IOMMU_TTE_PHYS_MASK_8K  0x1ffffffe000
> -#define IOMMU_TTE_PHYS_MASK_64K 0x1ffffff8000
> +#define IOMMU_TTE_PHYS_MASK_8K  0x1ffffffe000ULL
> +#define IOMMU_TTE_PHYS_MASK_64K 0x1ffffff8000ULL
>
>   #define IOMMU_TSB_8K_OFFSET_MASK_8M    0x00000000007fe000ULL
>   #define IOMMU_TSB_8K_OFFSET_MASK_16M   0x0000000000ffe000ULL

Gah yes, physical addresses in SPARC do lie outside the 32-bit range (I 
guess this showed up building with a 32-bit compiler?). Is it urgent 
enough to warrant me sending this as a separate pull request, or can it 
simply be queued via trivial?


ATB,

Mark.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] apb: Fix compiler warnings (large constants)
  2014-06-07 18:54 [Qemu-devel] [PATCH] apb: Fix compiler warnings (large constants) Stefan Weil
  2014-06-08 12:48 ` Mark Cave-Ayland
@ 2014-06-08 13:13 ` Michael Tokarev
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2014-06-08 13:13 UTC (permalink / raw)
  To: Stefan Weil, qemu-devel; +Cc: qemu-trivial, Mark Cave-Ayland

Applied to -trivial, thank you!

/mjt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] apb: Fix compiler warnings (large constants)
  2014-06-08 12:48 ` Mark Cave-Ayland
@ 2014-06-08 14:37   ` Stefan Weil
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2014-06-08 14:37 UTC (permalink / raw)
  To: Mark Cave-Ayland, qemu-devel; +Cc: qemu-trivial

Am 08.06.2014 14:48, schrieb Mark Cave-Ayland:
> On 07/06/14 19:54, Stefan Weil wrote:
> 
>> Both constants need more than 32 bit.
>>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>>   hw/pci-host/apb.c |    4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
>> index 1497008..6fa2723 100644
>> --- a/hw/pci-host/apb.c
>> +++ b/hw/pci-host/apb.c
>> @@ -99,8 +99,8 @@ do { printf("IOMMU: " fmt , ## __VA_ARGS__); } while
>> (0)
>>   #define IOMMU_TTE_DATA_SIZE     (1ULL << 61)
>>   #define IOMMU_TTE_DATA_W        (1ULL << 1)
>>
>> -#define IOMMU_TTE_PHYS_MASK_8K  0x1ffffffe000
>> -#define IOMMU_TTE_PHYS_MASK_64K 0x1ffffff8000
>> +#define IOMMU_TTE_PHYS_MASK_8K  0x1ffffffe000ULL
>> +#define IOMMU_TTE_PHYS_MASK_64K 0x1ffffff8000ULL
>>
>>   #define IOMMU_TSB_8K_OFFSET_MASK_8M    0x00000000007fe000ULL
>>   #define IOMMU_TSB_8K_OFFSET_MASK_16M   0x0000000000ffe000ULL
> 
> Gah yes, physical addresses in SPARC do lie outside the 32-bit range (I
> guess this showed up building with a 32-bit compiler?). Is it urgent
> enough to warrant me sending this as a separate pull request, or can it
> simply be queued via trivial?

It's not urgent, was detected by smatch (static code analyser), and is
already queued via trivial (thanks, Michael).

Cheers
Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-08 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-07 18:54 [Qemu-devel] [PATCH] apb: Fix compiler warnings (large constants) Stefan Weil
2014-06-08 12:48 ` Mark Cave-Ayland
2014-06-08 14:37   ` Stefan Weil
2014-06-08 13:13 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).