stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	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 4.9 20/63] MIPS: jazz: fix 64bit build
Date: Mon, 25 Feb 2019 22:11:20 +0100	[thread overview]
Message-ID: <20190225195037.262030530@linuxfoundation.org> (raw)
In-Reply-To: <20190225195035.713274200@linuxfoundation.org>

4.9-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 <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 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




  parent reply	other threads:[~2019-02-25 22:04 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 21:11 [PATCH 4.9 00/63] 4.9.161-stable review Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 01/63] mac80211: Free mpath object when rhashtable insertion fails Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 02/63] libceph: handle an empty authorize reply Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 03/63] ceph: avoid repeatedly adding inode to mdsc->snap_flush_list Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 04/63] numa: change get_mempolicy() to use nr_node_ids instead of MAX_NUMNODES Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 05/63] proc, oom: do not report alien mms when setting oom_score_adj Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 06/63] KEYS: allow reaching the keys quotas exactly Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 07/63] mfd: ti_am335x_tscadc: Use PLATFORM_DEVID_AUTO while registering mfd cells Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 08/63] mfd: twl-core: Fix section annotations on {,un}protect_pm_master Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 09/63] mfd: db8500-prcmu: Fix some section annotations Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 10/63] mfd: mt6397: Do not call irq_domain_remove if PMIC unsupported Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 11/63] mfd: ab8500-core: Return zero in get_register_interruptible() Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 12/63] mfd: qcom_rpm: write fw_version to CTRL_REG Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 13/63] mfd: wm5110: Add missing ASRC rate register Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 14/63] mfd: mc13xxx: Fix a missing check of a register-read failure Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 15/63] qed: Fix qed_ll2_post_rx_buffer_notify_fw() by adding a write memory barrier Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 16/63] net: hns: Fix use after free identified by SLUB debug Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 17/63] MIPS: ath79: Enable OF serial ports in the default config Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 18/63] scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 19/63] scsi: isci: initialize shost fully before calling scsi_add_host() Greg Kroah-Hartman
2019-02-25 21:11 ` Greg Kroah-Hartman [this message]
2019-02-25 21:11 ` [PATCH 4.9 21/63] net: stmmac: Fix PCI module removal leak Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 22/63] isdn: i4l: isdn_tty: Fix some concurrency double-free bugs Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 23/63] atm: he: fix sign-extension overflow on large shift Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 24/63] leds: lp5523: fix a missing check of return value of lp55xx_read Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 25/63] mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 26/63] net/mlx5e: Fix wrong (zero) TX drop counter indication for representor Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 27/63] isdn: avm: Fix string plus integer warning from Clang Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 28/63] net: ethernet: stmmac: change dma descriptors to __le32 Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 29/63] RDMA/srp: Rework SCSI device reset handling Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 30/63] KEYS: user: Align the payload buffer Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 31/63] KEYS: always initialize keyring_index_key::desc_len Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 32/63] batman-adv: fix uninit-value in batadv_interface_tx() Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 33/63] net/packet: fix 4gb buffer limit due to overflow check Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 34/63] team: avoid complex list operations in team_nl_cmd_options_set() Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 35/63] sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach() Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 36/63] sctp: call gso_reset_checksum when computing checksum in sctp_gso_segment Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 37/63] net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 38/63] parisc: Fix ptrace syscall number modification Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 39/63] ARCv2: Enable unaligned access in early ASM code Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 40/63] ARC: U-boot: check arguments paranoidly Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 41/63] ARC: define ARCH_SLAB_MINALIGN = 8 Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 42/63] hpet: Make cmd parameter of hpet_ioctl_common() unsigned Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 43/63] clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 44/63] netpoll: Fix device name check in netpoll_setup() Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 45/63] tracing: Use cpumask_available() to check if cpumask variable may be used Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 46/63] x86/boot: Disable the address-of-packed-member compiler warning Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 47/63] drm/i915: Consistently use enum pipe for PCH transcoders Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 48/63] drm/i915: Fix enum pipe vs. enum transcoder for the PCH transcoder Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 49/63] kbuild: move cc-option and cc-disable-warning after incl. arch Makefile Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 50/63] kbuild: clang: fix build failures with sparse check Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 51/63] kbuild: clang: remove crufty HOSTCFLAGS Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 52/63] kbuild: clang: disable unused variable warnings only when constant Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 53/63] kbuild: set no-integrated-as before incl. arch Makefile Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 54/63] kbuild: add -no-integrated-as Clang option unconditionally Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 55/63] irqchip/gic-v3: Convert arm64 GIC accessors to {read,write}_sysreg_s Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 56/63] mm/zsmalloc.c: change stat type parameter to int Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 57/63] mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 58/63] Revert "bridge: do not add port to router list when receives query with source 0.0.0.0" Greg Kroah-Hartman
2019-02-25 21:11 ` [PATCH 4.9 59/63] netfilter: nf_tables: fix flush after rule deletion in the same batch Greg Kroah-Hartman
2019-02-25 21:12 ` [PATCH 4.9 60/63] pinctrl: max77620: Use define directive for max77620_pinconf_param values Greg Kroah-Hartman
2019-02-25 21:12 ` [PATCH 4.9 61/63] phy: tegra: remove redundant self assignment of map Greg Kroah-Hartman
2019-02-25 21:12 ` [PATCH 4.9 62/63] sched/sysctl: Fix attributes of some extern declarations Greg Kroah-Hartman
2019-02-25 21:12 ` [PATCH 4.9 63/63] kbuild: consolidate Clang compiler flags Greg Kroah-Hartman
2019-02-26  8:33 ` [PATCH 4.9 00/63] 4.9.161-stable review Naresh Kamboju
2019-02-26 12:23 ` Jon Hunter
2019-02-26 15:06 ` shuah
2019-02-26 17:41 ` Guenter Roeck
2019-02-26 18:18   ` Guenter Roeck

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=20190225195037.262030530@linuxfoundation.org \
    --to=gregkh@linuxfoundation.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=sashal@kernel.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;
as well as URLs for NNTP newsgroup(s).