All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Rob Herring <robh@kernel.org>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	linux-ide@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds
Date: Thu, 15 Jun 2023 11:11:12 +0200	[thread overview]
Message-ID: <20230615091112.GA8680@alpha.franken.de> (raw)
In-Reply-To: <20230614173633.2430653-1-robh@kernel.org>

On Wed, Jun 14, 2023 at 11:36:31AM -0600, Rob Herring wrote:
> Test 32-bit builds have an error in cvmx_writeq_csr/cvmx_readq_csr:
> 
> arch/mips/include/asm/octeon/cvmx.h:282:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 
> As the default for allyesconfig/allmodconfig is 32-bit, fixing these
> functions for 32-bit is needed to enable Cavium Octeon drivers for
> COMPILE_TEST.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  arch/mips/include/asm/octeon/cvmx.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
> index 72e775bf31e6..2265a92995a8 100644
> --- a/arch/mips/include/asm/octeon/cvmx.h
> +++ b/arch/mips/include/asm/octeon/cvmx.h
> @@ -279,7 +279,7 @@ static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val)
>  
>  static inline void cvmx_writeq_csr(void __iomem *csr_addr, uint64_t val)
>  {
> -	cvmx_write_csr((__force uint64_t)csr_addr, val);
> +	cvmx_write_csr((__force uintptr_t)csr_addr, val);
>  }
>  
>  static inline void cvmx_write_io(uint64_t io_addr, uint64_t val)
> @@ -296,7 +296,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr)
>  
>  static inline uint64_t cvmx_readq_csr(void __iomem *csr_addr)
>  {
> -	return cvmx_read_csr((__force uint64_t) csr_addr);
> +	return cvmx_read_csr((__force uintptr_t) csr_addr);
>  }
>  
>  static inline void cvmx_send_single(uint64_t data)
> -- 
> 2.39.2

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      parent reply	other threads:[~2023-06-15  9:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 17:36 [PATCH 1/2] MIPS: octeon: Fix cvmx_writeq_csr/cvmx_readq_csr on 32-bit builds Rob Herring
2023-06-14 17:36 ` [PATCH 2/2] ata: octeon: Add compile test support Rob Herring
2023-06-15  0:45   ` Damien Le Moal
2023-06-16  2:08   ` Damien Le Moal
2023-06-21 16:51   ` Guenter Roeck
2023-06-22  0:57     ` Damien Le Moal
2023-06-22  3:01       ` Guenter Roeck
2023-06-22  4:26         ` Damien Le Moal
2023-06-22  5:10           ` Guenter Roeck
2023-06-22 13:41           ` Rob Herring
2023-06-22 21:52             ` Damien Le Moal
2023-06-15  9:11 ` Thomas Bogendoerfer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615091112.GA8680@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=s.shtylyov@omp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.