[Skiboot] [PATCH 05/12] fixup_spira remove incorrect endian conversion

Oliver O'Halloran oohall at gmail.com
Tue Oct 1 13:56:04 AEST 2019


On Sun, 2019-09-29 at 17:46 +1000, Nicholas Piggin wrote:
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
>  hdata/memory.c | 3 ++-
>  hdata/spira.c  | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hdata/memory.c b/hdata/memory.c
> index 9af7ae71d..2a199ae83 100644
> --- a/hdata/memory.c
> +++ b/hdata/memory.c
> @@ -135,7 +135,8 @@ static bool add_address_range(struct dt_node *root,
>  	      "on Chip 0x%x mattr: 0x%x pattr: 0x%x status:0x%x\n",
>  	      (long long)be64_to_cpu(arange->start),
>  	      (long long)be64_to_cpu(arange->end),

> -	      chip_id, arange->mirror_attr, mem_type, mem_status);
> +	      chip_id, (int)be32_to_cpu(arange->mirror_attr),

Is that int cast needed?

> +	      mem_type, mem_status);
>  
>  	/* reg contains start and length */
>  	reg[0] = cleanup_addr(be64_to_cpu(arange->start));
> diff --git a/hdata/spira.c b/hdata/spira.c
> index b0e8b88d1..40524e87e 100644
> --- a/hdata/spira.c
> +++ b/hdata/spira.c
> @@ -1652,7 +1652,7 @@ static void add_npus(void)
>  static void fixup_spira(void)
>  {
>  #if !defined(TEST)
> -	spiras = (struct spiras *)CPU_TO_BE64(SPIRA_HEAP_BASE);
> +	spiras = (struct spiras *)SPIRA_HEAP_BASE;
>  #endif
>  
>  	/* Validate SPIRA-S signature */



More information about the Skiboot mailing list