public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>,
	Paul Burton <paul.burton@mips.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	James Hogan <jhogan@kernel.org>,
	linux-mips@vger.kernel.org, Sasha Levin <sashal@kernel.org>
Subject: [PATCH AUTOSEL 4.14 20/34] MIPS: jazz: fix 64bit build
Date: Tue, 12 Feb 2019 21:39:38 -0500	[thread overview]
Message-ID: <20190213023952.21311-20-sashal@kernel.org> (raw)
In-Reply-To: <20190213023952.21311-1-sashal@kernel.org>

From: Thomas Bogendoerfer <tbogendoerfer@suse.de>

[ 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 <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 d626a9a391cc..e3c3d9483e14 100644
--- a/arch/mips/jazz/jazzdma.c
+++ b/arch/mips/jazz/jazzdma.c
@@ -72,14 +72,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


  parent reply	other threads:[~2019-02-13  2:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13  2:39 [PATCH AUTOSEL 4.14 01/34] mfd: ti_am335x_tscadc: Use PLATFORM_DEVID_AUTO while registering mfd cells Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 02/34] pvcalls-back: set -ENOTCONN in pvcalls_conn_back_read Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 03/34] mfd: twl-core: Fix section annotations on {,un}protect_pm_master Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 04/34] mfd: db8500-prcmu: Fix some section annotations Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 05/34] mfd: mt6397: Do not call irq_domain_remove if PMIC unsupported Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 06/34] mfd: ab8500-core: Return zero in get_register_interruptible() Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 07/34] mfd: bd9571mwv: Add volatile register to make DVFS work Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 08/34] mfd: qcom_rpm: write fw_version to CTRL_REG Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 09/34] mfd: wm5110: Add missing ASRC rate register Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 10/34] mfd: tps65218: Use devm_regmap_add_irq_chip and clean up error path in probe() Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 11/34] mfd: mc13xxx: Fix a missing check of a register-read failure Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 12/34] xen/pvcalls: remove set but not used variable 'intf' Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 13/34] qed: Fix qed_chain_set_prod() for PBL chains with non power of 2 page count Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 14/34] qed: Fix qed_ll2_post_rx_buffer_notify_fw() by adding a write memory barrier Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 15/34] net: hns: Fix use after free identified by SLUB debug Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 16/34] MIPS: ath79: Enable OF serial ports in the default config Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 17/34] netfilter: nf_tables: fix leaking object reference count Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 18/34] scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 19/34] scsi: isci: initialize shost fully before calling scsi_add_host() Sasha Levin
2019-02-13  2:39 ` Sasha Levin [this message]
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 21/34] bpf: correctly set initial window on active Fast Open sender Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 22/34] net: stmmac: Fix PCI module removal leak Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 23/34] isdn: i4l: isdn_tty: Fix some concurrency double-free bugs Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 24/34] scsi: ufs: Fix system suspend status Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 25/34] scsi: qedi: Add ep_state for login completion on un-reachable targets Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 26/34] always clear the X2APIC_ENABLE bit for PV guest Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 27/34] drm/meson: add missing of_node_put Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 28/34] atm: he: fix sign-extension overflow on large shift Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 29/34] hwmon: (tmp421) Correct the misspelling of the tmp442 compatible attribute in OF device ID table Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 30/34] leds: lp5523: fix a missing check of return value of lp55xx_read Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 31/34] bpf: bpf_setsockopt: reset sock dst on SO_MARK changes Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 32/34] mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 33/34] net/mlx5e: Fix wrong (zero) TX drop counter indication for representor Sasha Levin
2019-02-13  2:39 ` [PATCH AUTOSEL 4.14 34/34] isdn: avm: Fix string plus integer warning from Clang Sasha Levin

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=20190213023952.21311-20-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=jhogan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paul.burton@mips.com \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.org \
    --cc=tbogendoerfer@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox