From patchwork Fri Jul 7 07:59:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 9829727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 01DFD602BD for ; Fri, 7 Jul 2017 08:00:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E733928602 for ; Fri, 7 Jul 2017 08:00:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBDCD2860D; Fri, 7 Jul 2017 08:00:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4E04428602 for ; Fri, 7 Jul 2017 08:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=sdaGT0DJIFgW+EMv0XK7xufpDTa5xh8o8dE1PVXx56w=; b=EMP Fmy1vGEV2IisdhzPZ6ObFCmGNOfbfYqFyEjAzSRBB8N2o6Ew0Te2iZJW3jNY8areRRYcEaWtvPGGw 32xAx5gme98Ww342C0GufX1hDCxiGY//AT55GD+90l/nlyb6v+yNpGajY0BiAj7EJ25dA0+znKF1C KFQHXtyMwAxdkBvV5bKvz4/FEA64KViFut9wNH1HSLTzWmuwjYoFLoyV6RFXKXfXWxnYzRwmZueW8 anSieWkdK6TrCS7pE8CMG4WU+XnY9nWLpgjPxNmhDvgDTUj+YJgWXRjavJD3S36xpN2yTiUD9ZMcs plZpmR0N3r6mJgoMcFzdCkDydCfWR7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dTOBE-0001C3-0k; Fri, 07 Jul 2017 08:00:00 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dTOBA-00019P-Ul for linux-arm-kernel@lists.infradead.org; Fri, 07 Jul 2017 07:59:58 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 4270B207FF; Fri, 7 Jul 2017 09:59:34 +0200 (CEST) Received: from localhost (83.146.29.93.rev.sfr.net [93.29.146.83]) by mail.free-electrons.com (Postfix) with ESMTPSA id 13E83207FF; Fri, 7 Jul 2017 09:59:34 +0200 (CEST) From: Gregory CLEMENT To: Chris Packham , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT Subject: [PATCH] ARM: mvebu: use __pa_symbol in the mv98dx3236 platform SMP code Date: Fri, 7 Jul 2017 09:59:28 +0200 Message-Id: <20170707075928.2938-1-gregory.clement@free-electrons.com> X-Mailer: git-send-email 2.13.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170707_005957_169431_1D6ADE63 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As we already did for Armada XP switch from virt_to_phys() to __pa_symbol(). The reason for it was well explained by Mark Rutland so let's quote him: "virt_to_phys() is intended to operate on the linear/direct mapping of RAM. __pa_symbol() is intended to operate on the kernel mapping, which may not be in the linear/direct mapping on all architectures. e.g. arm64 and x86_64 map the kernel image and RAM separately. On 32-bit ARM the kernel image mapping is tied to the linear/direct mapping, so that works, but as it's semantically wrong (and broken for generic code), the DEBUG_VIRTUAL checks complain." Fixes: db88977894ab ("arm: mvebu: support for SMP on 98DX3336 SoC") Cc: Signed-off-by: Gregory CLEMENT Reviewed-by: Florian Fainelli Tested-by: Chris Packham --- Hi Chris, with this patch I don't expect any regression, hover it would be nice if you can test it. Thanks, Gregory arch/arm/mach-mvebu/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index e62273aacb43..4ffbbd217e82 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c @@ -211,7 +211,7 @@ static int mv98dx3236_resume_set_cpu_boot_addr(int hw_cpu, void *boot_addr) return PTR_ERR(base); writel(0, base + MV98DX3236_CPU_RESUME_CTRL_REG); - writel(virt_to_phys(boot_addr), base + MV98DX3236_CPU_RESUME_ADDR_REG); + writel(__pa_symbol(boot_addr), base + MV98DX3236_CPU_RESUME_ADDR_REG); iounmap(base);