Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp966968imu; Wed, 9 Jan 2019 09:15:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN7JlHGC4356eXRlBKWWVQCZiWwmBS8cV2Ds0sb6OfIqFwLHdv+4RNvF45ixuPJ7ankFLWH5 X-Received: by 2002:a63:3c58:: with SMTP id i24mr6240406pgn.284.1547054137657; Wed, 09 Jan 2019 09:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547054137; cv=none; d=google.com; s=arc-20160816; b=xr7Dd/Yr/6XKN6owy/B7JBv8NUiOYeHhg355L8ddIimLCqoTVm9quhn6QNEtyekPI2 ndK9dMfoJFArAfC1ABKWdnPGId26ZJbw+Hfir3baonpAjwFHTuJ3XLmbWaa/0L+9CugF cpDTRyFZnk5ISBqYqnc+Rjx/8jTm7deWfAMVO7RtI9CnlEy/ylidqVHGoFs/kvv0j7oT wfs0cKU1YhcTL20TYLy/GsEkowtY49/Yo6LjP/mc5aBg+LWZw6UpMj/gwEacFrntM4aS sWkeNy6Yg+OvzaJCqvsc5HtvvU+2IffyJSPjBFYU1MUeWAqbLmiRGr3S+0TWdtAj8Uzn d9FQ== 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 :message-id:date:subject:to:from; bh=QCNRe22kGZ+N6BEm+32PvZa3tj6K4zPHUUUqJMt3RXI=; b=YuUazdJKyWJw9B3g6oRuAS7lvm1iD4nkukBnUPprXC2fuASr8urhjrG9ZroRvGjhvk KF17fsNrIJInhE369B3WQtIgPI0TB6vDStVIPWAwG7wZXNGTCi/EqeNRkQ34/XwWAqrG DIwhcVehmXEMQxjcJVe+cjSLy3hNlAQ9HtkZREnRp6fCZKhecOCnyWzS/mH9HnqSYh5+ COSVB6L1A58SvkLAiwm/6UNaJK+NsNP+BSTTWcgJpZLon2ttZ+UUNHf8BM0RDvR9cUUc JCnX2yz+wwLq3cE3lofB7RYecCc6WNO4IhxktBd+5zlkJr1ELohsvmGFA2dIJH1HPgVM 3lrw== ARC-Authentication-Results: i=1; mx.google.com; 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 f127si67117281pfc.69.2019.01.09.09.15.20; Wed, 09 Jan 2019 09:15:37 -0800 (PST) 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; 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 S1726753AbfAIRMZ (ORCPT + 99 others); Wed, 9 Jan 2019 12:12:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:36066 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726419AbfAIRMY (ORCPT ); Wed, 9 Jan 2019 12:12:24 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 70E9AAF58; Wed, 9 Jan 2019 17:12:23 +0000 (UTC) From: Thomas Bogendoerfer To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] MIPS: jazz: fix 64bit build Date: Wed, 9 Jan 2019 18:12:16 +0100 Message-Id: <20190109171216.19992-1-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.13.7 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 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 --- 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 6256d35dbf4d..bedb5047aff3 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c @@ -74,14 +74,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.13.7