Commit 2ab9391d authored by Tony Luck's avatar Tony Luck

[IA64] Avoid "u64 foo : 32;" for gcc3 vs. gcc4 compatibility

gcc3 thinks that a 32-bit field of a u64 type is itself a u64, so
should be printed with "%ld".  gcc4 thinks it needs just "%d".
Make both versions happy by avoiding this construct.
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent f1918005
...@@ -240,7 +240,7 @@ cache_info(char *page) ...@@ -240,7 +240,7 @@ cache_info(char *page)
} }
p += sprintf(p, p += sprintf(p,
"%s Cache level %lu:\n" "%s Cache level %lu:\n"
"\tSize : %lu bytes\n" "\tSize : %u bytes\n"
"\tAttributes : ", "\tAttributes : ",
cache_types[j+cci.pcci_unified], i+1, cache_types[j+cci.pcci_unified], i+1,
cci.pcci_cache_size); cci.pcci_cache_size);
...@@ -648,9 +648,9 @@ frequency_info(char *page) ...@@ -648,9 +648,9 @@ frequency_info(char *page)
if (ia64_pal_freq_ratios(&proc, &bus, &itc) != 0) return 0; if (ia64_pal_freq_ratios(&proc, &bus, &itc) != 0) return 0;
p += sprintf(p, p += sprintf(p,
"Processor/Clock ratio : %ld/%ld\n" "Processor/Clock ratio : %d/%d\n"
"Bus/Clock ratio : %ld/%ld\n" "Bus/Clock ratio : %d/%d\n"
"ITC/Clock ratio : %ld/%ld\n", "ITC/Clock ratio : %d/%d\n",
proc.num, proc.den, bus.num, bus.den, itc.num, itc.den); proc.num, proc.den, bus.num, bus.den, itc.num, itc.den);
return p - page; return p - page;
......
...@@ -188,7 +188,7 @@ ia64_init_itm (void) ...@@ -188,7 +188,7 @@ ia64_init_itm (void)
itc_freq = (platform_base_freq*itc_ratio.num)/itc_ratio.den; itc_freq = (platform_base_freq*itc_ratio.num)/itc_ratio.den;
local_cpu_data->itm_delta = (itc_freq + HZ/2) / HZ; local_cpu_data->itm_delta = (itc_freq + HZ/2) / HZ;
printk(KERN_DEBUG "CPU %d: base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, " printk(KERN_DEBUG "CPU %d: base freq=%lu.%03luMHz, ITC ratio=%u/%u, "
"ITC freq=%lu.%03luMHz", smp_processor_id(), "ITC freq=%lu.%03luMHz", smp_processor_id(),
platform_base_freq / 1000000, (platform_base_freq / 1000) % 1000, platform_base_freq / 1000000, (platform_base_freq / 1000) % 1000,
itc_ratio.num, itc_ratio.den, itc_freq / 1000000, (itc_freq / 1000) % 1000); itc_ratio.num, itc_ratio.den, itc_freq / 1000000, (itc_freq / 1000) % 1000);
......
...@@ -131,7 +131,7 @@ typedef u64 pal_cache_line_state_t; ...@@ -131,7 +131,7 @@ typedef u64 pal_cache_line_state_t;
#define PAL_CACHE_LINE_STATE_MODIFIED 3 /* Modified */ #define PAL_CACHE_LINE_STATE_MODIFIED 3 /* Modified */
typedef struct pal_freq_ratio { typedef struct pal_freq_ratio {
u64 den : 32, num : 32; /* numerator & denominator */ u32 den, num; /* numerator & denominator */
} itc_ratio, proc_ratio; } itc_ratio, proc_ratio;
typedef union pal_cache_config_info_1_s { typedef union pal_cache_config_info_1_s {
...@@ -152,10 +152,10 @@ typedef union pal_cache_config_info_1_s { ...@@ -152,10 +152,10 @@ typedef union pal_cache_config_info_1_s {
typedef union pal_cache_config_info_2_s { typedef union pal_cache_config_info_2_s {
struct { struct {
u64 cache_size : 32, /*cache size in bytes*/ u32 cache_size; /*cache size in bytes*/
alias_boundary : 8, /* 39-32 aliased addr u32 alias_boundary : 8, /* 39-32 aliased addr
* separation for max * separation for max
* performance. * performance.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment