diff mbox series

[kvm-unit-tests,3/3] arm/arm64: Change dcache_line_size to ulong

Message ID 20201014191444.136782-4-drjones@redhat.com (mailing list archive)
State New, archived
Headers show
Series A few miscellaneous fixes | expand

Commit Message

Andrew Jones Oct. 14, 2020, 7:14 p.m. UTC
dcache_line_size is treated like a long in assembly, so make it one.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 lib/arm/asm/processor.h   | 2 +-
 lib/arm/setup.c           | 2 +-
 lib/arm64/asm/processor.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Thomas Huth Oct. 15, 2020, 8:30 a.m. UTC | #1
On 14/10/2020 21.14, Andrew Jones wrote:
> dcache_line_size is treated like a long in assembly, so make it one.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  lib/arm/asm/processor.h   | 2 +-
>  lib/arm/setup.c           | 2 +-
>  lib/arm64/asm/processor.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h
> index e26ef89000a8..273366d1fe1c 100644
> --- a/lib/arm/asm/processor.h
> +++ b/lib/arm/asm/processor.h
> @@ -89,6 +89,6 @@ static inline u32 get_ctr(void)
>  	return read_sysreg(CTR);
>  }
>  
> -extern u32 dcache_line_size;
> +extern unsigned long dcache_line_size;
>  
>  #endif /* _ASMARM_PROCESSOR_H_ */
> diff --git a/lib/arm/setup.c b/lib/arm/setup.c
> index 78562e47c01c..ea714d064afa 100644
> --- a/lib/arm/setup.c
> +++ b/lib/arm/setup.c
> @@ -42,7 +42,7 @@ static struct mem_region __initial_mem_regions[NR_INITIAL_MEM_REGIONS + 1];
>  struct mem_region *mem_regions = __initial_mem_regions;
>  phys_addr_t __phys_offset, __phys_end;
>  
> -u32 dcache_line_size;
> +unsigned long dcache_line_size;
>  
>  int mpidr_to_cpu(uint64_t mpidr)
>  {
> diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h
> index 02665b84cc7e..6ee7c1260b6b 100644
> --- a/lib/arm64/asm/processor.h
> +++ b/lib/arm64/asm/processor.h
> @@ -115,7 +115,7 @@ static inline u64 get_ctr(void)
>  	return read_sysreg(ctr_el0);
>  }
>  
> -extern u32 dcache_line_size;
> +extern unsigned long dcache_line_size;
>  
>  #endif /* !__ASSEMBLY__ */
>  #endif /* _ASMARM64_PROCESSOR_H_ */
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
Paolo Bonzini Oct. 31, 2020, 2:32 p.m. UTC | #2
On 15/10/20 10:30, Thomas Huth wrote:
> On 14/10/2020 21.14, Andrew Jones wrote:
>> dcache_line_size is treated like a long in assembly, so make it one.
>>
>> Signed-off-by: Andrew Jones <drjones@redhat.com>
>> ---
>>  lib/arm/asm/processor.h   | 2 +-
>>  lib/arm/setup.c           | 2 +-
>>  lib/arm64/asm/processor.h | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h
>> index e26ef89000a8..273366d1fe1c 100644
>> --- a/lib/arm/asm/processor.h
>> +++ b/lib/arm/asm/processor.h
>> @@ -89,6 +89,6 @@ static inline u32 get_ctr(void)
>>  	return read_sysreg(CTR);
>>  }
>>  
>> -extern u32 dcache_line_size;
>> +extern unsigned long dcache_line_size;
>>  
>>  #endif /* _ASMARM_PROCESSOR_H_ */
>> diff --git a/lib/arm/setup.c b/lib/arm/setup.c
>> index 78562e47c01c..ea714d064afa 100644
>> --- a/lib/arm/setup.c
>> +++ b/lib/arm/setup.c
>> @@ -42,7 +42,7 @@ static struct mem_region __initial_mem_regions[NR_INITIAL_MEM_REGIONS + 1];
>>  struct mem_region *mem_regions = __initial_mem_regions;
>>  phys_addr_t __phys_offset, __phys_end;
>>  
>> -u32 dcache_line_size;
>> +unsigned long dcache_line_size;
>>  
>>  int mpidr_to_cpu(uint64_t mpidr)
>>  {
>> diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h
>> index 02665b84cc7e..6ee7c1260b6b 100644
>> --- a/lib/arm64/asm/processor.h
>> +++ b/lib/arm64/asm/processor.h
>> @@ -115,7 +115,7 @@ static inline u64 get_ctr(void)
>>  	return read_sysreg(ctr_el0);
>>  }
>>  
>> -extern u32 dcache_line_size;
>> +extern unsigned long dcache_line_size;
>>  
>>  #endif /* !__ASSEMBLY__ */
>>  #endif /* _ASMARM64_PROCESSOR_H_ */
>>
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

Queued all three, thanks.

Paolo
Andrew Jones Nov. 11, 2020, 3:06 p.m. UTC | #3
On Sat, Oct 31, 2020 at 03:32:45PM +0100, Paolo Bonzini wrote:
> 
> Queued all three, thanks.
>

Hi Paolo,

Can you please push these?

Thanks,
drew
diff mbox series

Patch

diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h
index e26ef89000a8..273366d1fe1c 100644
--- a/lib/arm/asm/processor.h
+++ b/lib/arm/asm/processor.h
@@ -89,6 +89,6 @@  static inline u32 get_ctr(void)
 	return read_sysreg(CTR);
 }
 
-extern u32 dcache_line_size;
+extern unsigned long dcache_line_size;
 
 #endif /* _ASMARM_PROCESSOR_H_ */
diff --git a/lib/arm/setup.c b/lib/arm/setup.c
index 78562e47c01c..ea714d064afa 100644
--- a/lib/arm/setup.c
+++ b/lib/arm/setup.c
@@ -42,7 +42,7 @@  static struct mem_region __initial_mem_regions[NR_INITIAL_MEM_REGIONS + 1];
 struct mem_region *mem_regions = __initial_mem_regions;
 phys_addr_t __phys_offset, __phys_end;
 
-u32 dcache_line_size;
+unsigned long dcache_line_size;
 
 int mpidr_to_cpu(uint64_t mpidr)
 {
diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h
index 02665b84cc7e..6ee7c1260b6b 100644
--- a/lib/arm64/asm/processor.h
+++ b/lib/arm64/asm/processor.h
@@ -115,7 +115,7 @@  static inline u64 get_ctr(void)
 	return read_sysreg(ctr_el0);
 }
 
-extern u32 dcache_line_size;
+extern unsigned long dcache_line_size;
 
 #endif /* !__ASSEMBLY__ */
 #endif /* _ASMARM64_PROCESSOR_H_ */