* [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64
@ 2012-03-02 22:30 Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 1/6] w64: Fix size of ram_addr_t Stefan Weil
` (6 more replies)
0 siblings, 7 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-02 22:30 UTC (permalink / raw)
To: qemu-devel
These patches are a step towards full 64 bit support for w64.
The patches 4 and 5 are optional.
Please apply this series.
Thanks,
Stefan Weil
[PATCH 1/6] w64: Fix size of ram_addr_t
[PATCH 2/6] tcg: Rearrange definitions and include statements
[PATCH 3/6] w64: Fix data type of parameters for flush_icache_range
[PATCH 4/6] w64: Change data type of parameters for
[PATCH 5/6] cache-utils: Change data type of parameters for
[PATCH 6/6] w64: fix type casts when calling flush_icache_range
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 1/6] w64: Fix size of ram_addr_t
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
@ 2012-03-02 22:30 ` Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 2/6] tcg: Rearrange definitions and include statements Stefan Weil
` (5 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-02 22:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
ram_addr_t must be large enough to address any address of the host.
For hosts with sizeof(unsigned long) == sizeof(void *), this patch
changes nothing. All currently supported hosts fall into this category.
For w64 hosts, sizeof(unsigned long) is 4 while sizeof(void *) is 8,
so the use of uintptr_t is needed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
cpu-common.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpu-common.h b/cpu-common.h
index a40c57d..dca5175 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -28,9 +28,9 @@ typedef uint64_t ram_addr_t;
# define RAM_ADDR_MAX UINT64_MAX
# define RAM_ADDR_FMT "%" PRIx64
#else
-typedef unsigned long ram_addr_t;
-# define RAM_ADDR_MAX ULONG_MAX
-# define RAM_ADDR_FMT "%lx"
+typedef uintptr_t ram_addr_t;
+# define RAM_ADDR_MAX UINTPTR_MAX
+# define RAM_ADDR_FMT "%" PRIxPTR
#endif
/* memory API */
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 2/6] tcg: Rearrange definitions and include statements
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 1/6] w64: Fix size of ram_addr_t Stefan Weil
@ 2012-03-02 22:30 ` Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 3/6] w64: Fix data type of parameters for flush_icache_range Stefan Weil
` (4 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-02 22:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
This change makes tcg_target_ulong available in tcg-target.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
tcg/tcg.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 5c28239..cc223ea 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -32,9 +32,6 @@
# error Unknown pointer size for tcg target
#endif
-#include "tcg-target.h"
-#include "tcg-runtime.h"
-
#if TCG_TARGET_REG_BITS == 32
typedef int32_t tcg_target_long;
typedef uint32_t tcg_target_ulong;
@@ -49,6 +46,9 @@ typedef uint64_t tcg_target_ulong;
#error unsupported
#endif
+#include "tcg-target.h"
+#include "tcg-runtime.h"
+
#if TCG_TARGET_NB_REGS <= 32
typedef uint32_t TCGRegSet;
#elif TCG_TARGET_NB_REGS <= 64
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 3/6] w64: Fix data type of parameters for flush_icache_range
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 1/6] w64: Fix size of ram_addr_t Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 2/6] tcg: Rearrange definitions and include statements Stefan Weil
@ 2012-03-02 22:30 ` Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 4/6] w64: Change " Stefan Weil
` (3 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-02 22:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
flush_icache_range takes two address parameters which must be large
enough to address any address of the host.
For hosts with sizeof(unsigned long) == sizeof(void *), this patch
changes nothing. All currently supported hosts fall into this category.
For w64 hosts, sizeof(unsigned long) is 4 while sizeof(void *) is 8,
so the use of tcg_target_ulong is needed for i386 and tci (the tcg
targets which work with w64).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
tcg/i386/tcg-target.h | 3 ++-
tcg/tci/tcg-target.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index adbb036..c3cfe05 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -123,6 +123,7 @@ typedef enum {
# define TCG_AREG0 TCG_REG_EBP
#endif
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
}
diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h
index 03e0fd1..81fcc0f 100644
--- a/tcg/tci/tcg-target.h
+++ b/tcg/tci/tcg-target.h
@@ -157,7 +157,8 @@ void tci_disas(uint8_t opc);
unsigned long tcg_qemu_tb_exec(CPUState *env, uint8_t *tb_ptr);
#define tcg_qemu_tb_exec tcg_qemu_tb_exec
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
}
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 4/6] w64: Change data type of parameters for flush_icache_range
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
` (2 preceding siblings ...)
2012-03-02 22:30 ` [Qemu-devel] [PATCH 3/6] w64: Fix data type of parameters for flush_icache_range Stefan Weil
@ 2012-03-02 22:30 ` Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 5/6] cache-utils: " Stefan Weil
` (2 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-02 22:30 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Weil, Alexander Graf, Blue Swirl, Aurelien Jarno,
Richard Henderson
The TCG targets i386 and tci needed a change of the function
prototype for w64.
This change is currently not needed for the other TCG targets,
but it can be applied to avoid code differences.
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Andrzej Zaborowski <balrogg@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
tcg/arm/tcg-target.h | 3 ++-
tcg/hppa/tcg-target.h | 4 +++-
tcg/ia64/tcg-target.h | 3 ++-
tcg/mips/tcg-target.h | 3 ++-
tcg/s390/tcg-target.h | 3 ++-
tcg/sparc/tcg-target.h | 3 ++-
6 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
index 0035b47..f90b834 100644
--- a/tcg/arm/tcg-target.h
+++ b/tcg/arm/tcg-target.h
@@ -81,7 +81,8 @@ enum {
TCG_AREG0 = TCG_REG_R6,
};
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
#if QEMU_GNUC_PREREQ(4, 1)
__builtin___clear_cache((char *) start, (char *) stop);
diff --git a/tcg/hppa/tcg-target.h b/tcg/hppa/tcg-target.h
index 7f3c4cc..d4bf6fe 100644
--- a/tcg/hppa/tcg-target.h
+++ b/tcg/hppa/tcg-target.h
@@ -107,7 +107,9 @@ typedef enum {
/* Note: must be synced with dyngen-exec.h */
#define TCG_AREG0 TCG_REG_R17
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
start &= ~31;
while (start <= stop) {
diff --git a/tcg/ia64/tcg-target.h b/tcg/ia64/tcg-target.h
index c388089..0631b9f 100644
--- a/tcg/ia64/tcg-target.h
+++ b/tcg/ia64/tcg-target.h
@@ -146,7 +146,8 @@ typedef enum {
/* Guest base is supported */
#define TCG_TARGET_HAS_GUEST_BASE
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
start = start & ~(32UL - 1UL);
stop = (stop + (32UL - 1UL)) & ~(32UL - 1UL);
diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h
index 477bc38..d3c804d 100644
--- a/tcg/mips/tcg-target.h
+++ b/tcg/mips/tcg-target.h
@@ -108,7 +108,8 @@ typedef enum {
#include <sys/cachectl.h>
#endif
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
cacheflush ((void *)start, stop-start, ICACHE);
}
diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h
index e4cd641..d12f90b 100644
--- a/tcg/s390/tcg-target.h
+++ b/tcg/s390/tcg-target.h
@@ -100,6 +100,7 @@ enum {
TCG_AREG0 = TCG_REG_R10,
};
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
}
diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h
index c3fe131..ee2274d 100644
--- a/tcg/sparc/tcg-target.h
+++ b/tcg/sparc/tcg-target.h
@@ -134,7 +134,8 @@ typedef enum {
#define TCG_AREG0 TCG_REG_G6
#endif
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(tcg_target_ulong start,
+ tcg_target_ulong stop)
{
unsigned long p;
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 5/6] cache-utils: Change data type of parameters for flush_icache_range
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
` (3 preceding siblings ...)
2012-03-02 22:30 ` [Qemu-devel] [PATCH 4/6] w64: Change " Stefan Weil
@ 2012-03-02 22:30 ` Stefan Weil
2012-03-02 22:39 ` Alexander Graf
2012-03-05 18:57 ` Alexander Graf
2012-03-02 22:30 ` [Qemu-devel] [PATCH 6/6] w64: fix type casts when calling flush_icache_range Stefan Weil
2012-03-04 11:27 ` [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Blue Swirl
6 siblings, 2 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-02 22:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil, Alexander Graf
The TCG targets i386 and tci needed a change of the function
prototype for w64.
This change is currently not needed here, but it can be applied
to avoid code differences.
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
cache-utils.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cache-utils.h b/cache-utils.h
index 0b65907..04a6e2e 100644
--- a/cache-utils.h
+++ b/cache-utils.h
@@ -12,7 +12,7 @@ extern struct qemu_cache_conf qemu_cache_conf;
void qemu_cache_utils_init(char **envp);
/* mildly adjusted code from tcg-dyngen.c */
-static inline void flush_icache_range(unsigned long start, unsigned long stop)
+static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
{
unsigned long p, start1, stop1;
unsigned long dsize = qemu_cache_conf.dcache_bsize;
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 6/6] w64: fix type casts when calling flush_icache_range
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
` (4 preceding siblings ...)
2012-03-02 22:30 ` [Qemu-devel] [PATCH 5/6] cache-utils: " Stefan Weil
@ 2012-03-02 22:30 ` Stefan Weil
2012-03-04 11:27 ` [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Blue Swirl
6 siblings, 0 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-02 22:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
tcg/tcg.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 351a0a3..cd2db3c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -253,8 +253,8 @@ void tcg_prologue_init(TCGContext *s)
s->code_buf = code_gen_prologue;
s->code_ptr = s->code_buf;
tcg_target_qemu_prologue(s);
- flush_icache_range((unsigned long)s->code_buf,
- (unsigned long)s->code_ptr);
+ flush_icache_range((tcg_target_ulong)s->code_buf,
+ (tcg_target_ulong)s->code_ptr);
}
void tcg_set_frame(TCGContext *s, int reg,
@@ -2176,8 +2176,9 @@ int tcg_gen_code(TCGContext *s, uint8_t *gen_code_buf)
tcg_gen_code_common(s, gen_code_buf, -1);
/* flush instruction cache */
- flush_icache_range((unsigned long)gen_code_buf,
- (unsigned long)s->code_ptr);
+ flush_icache_range((tcg_target_ulong)gen_code_buf,
+ (tcg_target_ulong)s->code_ptr);
+
return s->code_ptr - gen_code_buf;
}
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 5/6] cache-utils: Change data type of parameters for flush_icache_range
2012-03-02 22:30 ` [Qemu-devel] [PATCH 5/6] cache-utils: " Stefan Weil
@ 2012-03-02 22:39 ` Alexander Graf
2012-03-05 18:57 ` Alexander Graf
1 sibling, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2012-03-02 22:39 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-devel
On 02.03.2012, at 23:30, Stefan Weil wrote:
> The TCG targets i386 and tci needed a change of the function
> prototype for w64.
>
> This change is currently not needed here, but it can be applied
> to avoid code differences.
Both 4 and 5 look reasonable to me.
Alex
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
` (5 preceding siblings ...)
2012-03-02 22:30 ` [Qemu-devel] [PATCH 6/6] w64: fix type casts when calling flush_icache_range Stefan Weil
@ 2012-03-04 11:27 ` Blue Swirl
6 siblings, 0 replies; 15+ messages in thread
From: Blue Swirl @ 2012-03-04 11:27 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-devel
Thanks, applied all.
On Fri, Mar 2, 2012 at 22:30, Stefan Weil <sw@weilnetz.de> wrote:
> These patches are a step towards full 64 bit support for w64.
> The patches 4 and 5 are optional.
>
> Please apply this series.
>
> Thanks,
> Stefan Weil
>
> [PATCH 1/6] w64: Fix size of ram_addr_t
> [PATCH 2/6] tcg: Rearrange definitions and include statements
> [PATCH 3/6] w64: Fix data type of parameters for flush_icache_range
> [PATCH 4/6] w64: Change data type of parameters for
> [PATCH 5/6] cache-utils: Change data type of parameters for
> [PATCH 6/6] w64: fix type casts when calling flush_icache_range
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 5/6] cache-utils: Change data type of parameters for flush_icache_range
2012-03-02 22:30 ` [Qemu-devel] [PATCH 5/6] cache-utils: " Stefan Weil
2012-03-02 22:39 ` Alexander Graf
@ 2012-03-05 18:57 ` Alexander Graf
2012-03-05 20:07 ` Stefan Weil
1 sibling, 1 reply; 15+ messages in thread
From: Alexander Graf @ 2012-03-05 18:57 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-devel
On 03/02/2012 11:30 PM, Stefan Weil wrote:
> The TCG targets i386 and tci needed a change of the function
> prototype for w64.
>
> This change is currently not needed here, but it can be applied
> to avoid code differences.
>
> Cc: Alexander Graf<agraf@suse.de>
> Signed-off-by: Stefan Weil<sw@weilnetz.de>
> ---
> cache-utils.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/cache-utils.h b/cache-utils.h
> index 0b65907..04a6e2e 100644
> --- a/cache-utils.h
> +++ b/cache-utils.h
> @@ -12,7 +12,7 @@ extern struct qemu_cache_conf qemu_cache_conf;
> void qemu_cache_utils_init(char **envp);
>
> /* mildly adjusted code from tcg-dyngen.c */
> -static inline void flush_icache_range(unsigned long start, unsigned long stop)
> +static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
Ugh, this causes compilation breakage:
CC cache-utils.o
In file included from cache-utils.c:1:
cache-utils.h:15: error: expected ‘)’ before ‘start’
make: *** [cache-utils.o] Error 1
because cache-utils.c doesn't include anything that would define
uintptr_t. Any idea how to fix this?
Alex
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 5/6] cache-utils: Change data type of parameters for flush_icache_range
2012-03-05 18:57 ` Alexander Graf
@ 2012-03-05 20:07 ` Stefan Weil
2012-03-05 20:15 ` Alexander Graf
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Weil @ 2012-03-05 20:07 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel
Am 05.03.2012 19:57, schrieb Alexander Graf:
> On 03/02/2012 11:30 PM, Stefan Weil wrote:
>> The TCG targets i386 and tci needed a change of the function
>> prototype for w64.
>>
>> This change is currently not needed here, but it can be applied
>> to avoid code differences.
>>
>> Cc: Alexander Graf<agraf@suse.de>
>> Signed-off-by: Stefan Weil<sw@weilnetz.de>
>> ---
>> cache-utils.h | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/cache-utils.h b/cache-utils.h
>> index 0b65907..04a6e2e 100644
>> --- a/cache-utils.h
>> +++ b/cache-utils.h
>> @@ -12,7 +12,7 @@ extern struct qemu_cache_conf qemu_cache_conf;
>> void qemu_cache_utils_init(char **envp);
>>
>> /* mildly adjusted code from tcg-dyngen.c */
>> -static inline void flush_icache_range(unsigned long start, unsigned
>> long stop)
>> +static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
>
> Ugh, this causes compilation breakage:
>
> CC cache-utils.o
> In file included from cache-utils.c:1:
> cache-utils.h:15: error: expected ‘)’ before ‘start’
> make: *** [cache-utils.o] Error 1
>
> because cache-utils.c doesn't include anything that would define
> uintptr_t. Any idea how to fix this?
>
>
> Alex
#include <stdint.h>
Cheers,
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH] cache-utils: Add missing include file for uintptr_t
2012-03-05 20:15 ` Alexander Graf
@ 2012-03-05 20:15 ` Stefan Weil
2012-03-06 23:51 ` Alexander Graf
2012-03-11 16:08 ` Blue Swirl
0 siblings, 2 replies; 15+ messages in thread
From: Stefan Weil @ 2012-03-05 20:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Blue Swirl, Stefan Weil, Alexander Graf
Commit 021ecd8b9db37927059f5d3234b51ed766706437 breaks the build for
PPC hosts because it uses uintptr_t without the necessary include file.
uintptr_t is defined in stdint.h, so add this include.
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
Hi Alex,
could you please test whether my patch fixes the build problem?
Thanks,
Stefan
cache-utils.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cache-utils.h b/cache-utils.h
index 04a6e2e..2c57f78 100644
--- a/cache-utils.h
+++ b/cache-utils.h
@@ -2,6 +2,9 @@
#define QEMU_CACHE_UTILS_H
#if defined(_ARCH_PPC)
+
+#include <stdint.h> /* uintptr_t */
+
struct qemu_cache_conf {
unsigned long dcache_bsize;
unsigned long icache_bsize;
--
1.7.9
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 5/6] cache-utils: Change data type of parameters for flush_icache_range
2012-03-05 20:07 ` Stefan Weil
@ 2012-03-05 20:15 ` Alexander Graf
2012-03-05 20:15 ` [Qemu-devel] [PATCH] cache-utils: Add missing include file for uintptr_t Stefan Weil
0 siblings, 1 reply; 15+ messages in thread
From: Alexander Graf @ 2012-03-05 20:15 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-devel@nongnu.org
On 05.03.2012, at 21:07, Stefan Weil <sw@weilnetz.de> wrote:
> Am 05.03.2012 19:57, schrieb Alexander Graf:
>> On 03/02/2012 11:30 PM, Stefan Weil wrote:
>>> The TCG targets i386 and tci needed a change of the function
>>> prototype for w64.
>>>
>>> This change is currently not needed here, but it can be applied
>>> to avoid code differences.
>>>
>>> Cc: Alexander Graf<agraf@suse.de>
>>> Signed-off-by: Stefan Weil<sw@weilnetz.de>
>>> ---
>>> cache-utils.h | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/cache-utils.h b/cache-utils.h
>>> index 0b65907..04a6e2e 100644
>>> --- a/cache-utils.h
>>> +++ b/cache-utils.h
>>> @@ -12,7 +12,7 @@ extern struct qemu_cache_conf qemu_cache_conf;
>>> void qemu_cache_utils_init(char **envp);
>>>
>>> /* mildly adjusted code from tcg-dyngen.c */
>>> -static inline void flush_icache_range(unsigned long start, unsigned long stop)
>>> +static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
>>
>> Ugh, this causes compilation breakage:
>>
>> CC cache-utils.o
>> In file included from cache-utils.c:1:
>> cache-utils.h:15: error: expected ‘)’ before ‘start’
>> make: *** [cache-utils.o] Error 1
>>
>> because cache-utils.c doesn't include anything that would define uintptr_t. Any idea how to fix this?
>>
>>
>> Alex
>
>
> #include <stdint.h>
Mind to send a patch? ;)
Alex
>
> Cheers,
> Stefan
>
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] cache-utils: Add missing include file for uintptr_t
2012-03-05 20:15 ` [Qemu-devel] [PATCH] cache-utils: Add missing include file for uintptr_t Stefan Weil
@ 2012-03-06 23:51 ` Alexander Graf
2012-03-11 16:08 ` Blue Swirl
1 sibling, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2012-03-06 23:51 UTC (permalink / raw)
To: Stefan Weil; +Cc: Blue Swirl, qemu-devel
On 05.03.2012, at 21:15, Stefan Weil wrote:
> Commit 021ecd8b9db37927059f5d3234b51ed766706437 breaks the build for
> PPC hosts because it uses uintptr_t without the necessary include file.
>
> uintptr_t is defined in stdint.h, so add this include.
>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>
> Hi Alex,
>
> could you please test whether my patch fixes the build problem?
Yup, that one fixes it :). Thanks!
Alex
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] cache-utils: Add missing include file for uintptr_t
2012-03-05 20:15 ` [Qemu-devel] [PATCH] cache-utils: Add missing include file for uintptr_t Stefan Weil
2012-03-06 23:51 ` Alexander Graf
@ 2012-03-11 16:08 ` Blue Swirl
1 sibling, 0 replies; 15+ messages in thread
From: Blue Swirl @ 2012-03-11 16:08 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-devel, Alexander Graf
Thanks, applied.
On Mon, Mar 5, 2012 at 20:15, Stefan Weil <sw@weilnetz.de> wrote:
> Commit 021ecd8b9db37927059f5d3234b51ed766706437 breaks the build for
> PPC hosts because it uses uintptr_t without the necessary include file.
>
> uintptr_t is defined in stdint.h, so add this include.
>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>
> Hi Alex,
>
> could you please test whether my patch fixes the build problem?
>
> Thanks,
> Stefan
>
>
> cache-utils.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/cache-utils.h b/cache-utils.h
> index 04a6e2e..2c57f78 100644
> --- a/cache-utils.h
> +++ b/cache-utils.h
> @@ -2,6 +2,9 @@
> #define QEMU_CACHE_UTILS_H
>
> #if defined(_ARCH_PPC)
> +
> +#include <stdint.h> /* uintptr_t */
> +
> struct qemu_cache_conf {
> unsigned long dcache_bsize;
> unsigned long icache_bsize;
> --
> 1.7.9
>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-03-11 16:09 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 22:30 [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 1/6] w64: Fix size of ram_addr_t Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 2/6] tcg: Rearrange definitions and include statements Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 3/6] w64: Fix data type of parameters for flush_icache_range Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 4/6] w64: Change " Stefan Weil
2012-03-02 22:30 ` [Qemu-devel] [PATCH 5/6] cache-utils: " Stefan Weil
2012-03-02 22:39 ` Alexander Graf
2012-03-05 18:57 ` Alexander Graf
2012-03-05 20:07 ` Stefan Weil
2012-03-05 20:15 ` Alexander Graf
2012-03-05 20:15 ` [Qemu-devel] [PATCH] cache-utils: Add missing include file for uintptr_t Stefan Weil
2012-03-06 23:51 ` Alexander Graf
2012-03-11 16:08 ` Blue Swirl
2012-03-02 22:30 ` [Qemu-devel] [PATCH 6/6] w64: fix type casts when calling flush_icache_range Stefan Weil
2012-03-04 11:27 ` [Qemu-devel] [PATCH 0/6] w64: Improve compilation with MinGW-w64 Blue Swirl
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).