Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp838457rwd; Thu, 15 Jun 2023 02:48:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7jmYPHLOEwktLrOBFru/tYsMvG5ouO46h7gHsuv3S10uZNWN0M/rEgAPdOiF+mpMquivBQ X-Received: by 2002:a05:6a00:194f:b0:643:8496:e41c with SMTP id s15-20020a056a00194f00b006438496e41cmr5785857pfk.20.1686822488061; Thu, 15 Jun 2023 02:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686822488; cv=none; d=google.com; s=arc-20160816; b=bgrmkXbAUh6Ffy5nJ2+kQx72QkK3wV8PSPS5JpLCn2Upw6frlZV1eYwoEQrlzlT1T4 ajif3oFy8pstQFo3Ec/IDvmQa3kzGeqEDF8LLYxHFTKNqv1yjV0wALMW6KczS4hlqbAx 5RAwSQJXvy/TVeXEzNZuuoJVPqEOjzPUCsBI3kH9fDUaxC9ddqsdAdP+fHoAyvhDyX1+ 2shmDgJ5lgxiLs5KpMAoKji6u6j4NnTG9Dbij4jpe4LFv5TTkNJTdfemmL+UOyrlvJsv ASl3cxGoNfOk2ompRYt9aXUwq9Kvz20ytr8r+8kvqjii1AYp5r/aiTGyVQc+agl18g8z 7LIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Vd3XjDzmUe73ZuEdGcgumOJixHYQv0tOK9gi8yJS85g=; b=h0H1217LE0VJiiVD847HjGwF5iqyxkhKlpDYFQB+BNthBuH76pv3K8+36h2VCDAyZ9 NscbAvrPZltX03VfeEs/h70Ex94t36FkaxH2HtCRcsGVt5wwlQ3fsUoLDOb4bR/ffPle ZaeeWjKKC3bafpO+fUQCeG+VDXolbmdoXdmr2WJHmzW4Uv+rg8SmPefKq/ikeuVF8wtS 79I30SDil5WzdU7QOie0fu4E3coVoDbxSCygQdzpdntJjsadx9woIBR3xnur0eeBQ7go xtQGznXqzUh8OHalFzc8nP7pqWGsJ6iUX9qpsSeEums65W2g9IWfuqqySZmMLI3y31xO 1tRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t184-20020a6381c1000000b0054ff67d6664si1186082pgd.52.2023.06.15.02.47.54; Thu, 15 Jun 2023 02:48:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241398AbjFOJ24 (ORCPT + 99 others); Thu, 15 Jun 2023 05:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244584AbjFOJ2f (ORCPT ); Thu, 15 Jun 2023 05:28:35 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9FCBD1FC2; Thu, 15 Jun 2023 02:28:34 -0700 (PDT) Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1q9jHN-0005NH-00; Thu, 15 Jun 2023 11:28:33 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id DCCC8C02FB; Thu, 15 Jun 2023 11:11:12 +0200 (CEST) Date: Thu, 15 Jun 2023 11:11:12 +0200 From: Thomas Bogendoerfer To: Rob Herring Cc: Damien Le Moal , Sergey Shtylyov , 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 Message-ID: <20230615091112.GA8680@alpha.franken.de> References: <20230614173633.2430653-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614173633.2430653-1-robh@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 > --- > 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 -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]