Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp574868img; Fri, 22 Mar 2019 04:20:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaGJU0JZiFQwd+V995Pa8pVz+ajy4ojCwRvs0arpT1Xmv59Sroc8SHOQPfrtvytZnwHKU2 X-Received: by 2002:a63:cc15:: with SMTP id x21mr8552173pgf.380.1553253655093; Fri, 22 Mar 2019 04:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553253655; cv=none; d=google.com; s=arc-20160816; b=xGw2LJsATUVsWOcqqaZjqRurjMBUtvZu/AsG45w9u6017/hExiOLg2wDSaEr+7eWXK Ynxmpkfp2beWOCrdUmGV/2Av8wEOWDh5vvHIxik6S8lTfRmQG/Xs5UdluLPBaZ5IOncR TK/+qm+33/72lCct+nYVYO/2A5x9iSVF//AcGL2rCpxz6SolztYzxMDU2cjRN7nl+1vO 3uOHSKTN8lXJgUdrX6Rzo3BBQIFUCIXlw53G5rm9T4lVSP1JYKOn0or/Cb78W6WITe0z cyGXngX7nE5JNdPsY2OCdAm1o1DKWOAk2L2abv7GfBM9RElelK3cUSiTOSMjH7tiY6NZ Ewtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vSsuV6KVr/ow4XXUaZ/RUXuG52qZBoPr6gth42TybM8=; b=e+jkoCmaJMdhgqtwIAGESludj6MUDXVD+ZinVjRDX3Y8UZ1CHX0Ubo2+xlQzGDRFli YdG96B+QTMBnoJEjthEHH3C913S/Qj6BHvkV5nTzkGUrAZmuVuFLnH0mSdCdHjnMV0nn a7o9XlyDPAJOTbGBJRiwRcS1eekFl8+VuHkJMNYAJK9vf/uYtT+VOpIUg+NOk80LYIQz 8HKY1h5Vt48QBfiCwHXEBlxb2StkQXcR961FF5nC0iqzw1wvJda3NYeSkm+j4gbHkr+m 7cP6FTckWaa8sU6RnMJCk+9NhsD2v/2m2XOL8BKA1AQE5uMYuwYTzdp1O5UF0Yg8GWsA i67Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jnKW3rJW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si6943397ply.103.2019.03.22.04.20.40; Fri, 22 Mar 2019 04:20:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jnKW3rJW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728255AbfCVLTy (ORCPT + 99 others); Fri, 22 Mar 2019 07:19:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:46224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728208AbfCVLTp (ORCPT ); Fri, 22 Mar 2019 07:19:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 25AC02190A; Fri, 22 Mar 2019 11:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253584; bh=n8Uypl4oWuRR4ENAz1iGCy8qlGQ66sIA1NJFHyeDwaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jnKW3rJWsZStxglk0d6GPsHZU/mAus3YGe4BU1chv6tlC1s5AifZZDjWfeuAQvNR5 +TnwKVsILhsGODfeBFn/wz1gfo56+YT1HQRHk+CRzpW5UouG2eYgXn/44q9MK8Bu7/ sOEVqf6onv4LAmaA55PrZoF3TFPs6NCJFHHtRKjw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , Paul Burton , Ralf Baechle , James Hogan , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH 3.18 013/134] MIPS: jazz: fix 64bit build Date: Fri, 22 Mar 2019 12:13:46 +0100 Message-Id: <20190322111211.056566988@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 41af167fbc0032f9d7562854f58114eaa9270336 ] 64bit JAZZ builds failed with linux-next/arch/mips/jazz/jazzdma.c: In function `vdma_init`: /linux-next/arch/mips/jazz/jazzdma.c:77:30: error: implicit declaration of function `KSEG1ADDR`; did you mean `CKSEG1ADDR`? [-Werror=implicit-function-declaration] pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl); ^~~~~~~~~ CKSEG1ADDR /linux-next/arch/mips/jazz/jazzdma.c:77:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl); ^ In file included from /linux-next/arch/mips/include/asm/barrier.h:11:0, from /linux-next/include/linux/compiler.h:248, from /linux-next/include/linux/kernel.h:10, from /linux-next/arch/mips/jazz/jazzdma.c:11: /linux-next/arch/mips/include/asm/addrspace.h:41:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] #define _ACAST32_ (_ATYPE_)(_ATYPE32_) /* widen if necessary */ ^ /linux-next/arch/mips/include/asm/addrspace.h:53:25: note: in expansion of macro `_ACAST32_` #define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) ^~~~~~~~~ /linux-next/arch/mips/jazz/jazzdma.c:84:44: note: in expansion of macro `CPHYSADDR` r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE, CPHYSADDR(pgtbl)); Using correct casts and CKSEG1ADDR when dealing with the pgtbl setup fixes this. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin --- arch/mips/jazz/jazzdma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index db6f5afff4ff1..ea897912bc712 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c @@ -71,14 +71,15 @@ static int __init vdma_init(void) get_order(VDMA_PGTBL_SIZE)); BUG_ON(!pgtbl); dma_cache_wback_inv((unsigned long)pgtbl, VDMA_PGTBL_SIZE); - pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl); + pgtbl = (VDMA_PGTBL_ENTRY *)CKSEG1ADDR((unsigned long)pgtbl); /* * Clear the R4030 translation table */ vdma_pgtbl_init(); - r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE, CPHYSADDR(pgtbl)); + r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE, + CPHYSADDR((unsigned long)pgtbl)); r4030_write_reg32(JAZZ_R4030_TRSTBL_LIM, VDMA_PGTBL_SIZE); r4030_write_reg32(JAZZ_R4030_TRSTBL_INV, 0); -- 2.19.1