Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp662169ybh; Tue, 10 Mar 2020 06:05:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsRHWwTl/LpmXwqLdkcN8d68k2ahwHQWZ48i3iEf3FXJ3LIkeHKAZ74RwBeBdDBc6ma+12X X-Received: by 2002:a05:6830:451:: with SMTP id d17mr5251503otc.184.1583845533489; Tue, 10 Mar 2020 06:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583845533; cv=none; d=google.com; s=arc-20160816; b=cHY9EGVK8gZDhC85Qp6y44t1QjaIoaycPv4HQnrfM31cBt6JgcAaQd2Tjzj+P7umMG x7jG4Mefzja4A1QhxvG5Ls8D+M9TxnB+CIANoOrzs7I/CCWSt84NCBj7XL2426TtORXN efRdNw5rsWVacBslRFz2yzx/8FEnBEpUbHD7SVRB7WNfxOtHPPqJG0hd6GDC+JIxP5n1 HJzbiAyZL+r06fgtYJGPsuW2hIrLCOdhuD53X5rRQdbf6ZzX2oSIIM/2FfCPRcIRJLpy UISmka+Yd8oqcxKFyTajcmQU8bt0UkjhtekNO3UChSQTQyv/Cx4h5AOe94ECxlSyRd+4 Rd8Q== 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=goSbc9kT8ztMlF5ZBF8gFwI1ZwZT5JLx+asnrQFGpQA=; b=SAIFG5yGy5n13+1IRxbYCMjj7nUYaLuHMmAj6RafFm0tBc+nyMkr1V/laKjuPB5pYe yHCo9z5tpLoJirkelPV2p9Gjq8PFo6n9H5whJmaV0CycrpmxlqM6NxFJb2gu8xMqQZuk lOGI4xUWoTDQwp4CcYftL1phkOXlvh6dB/VUMMXVeHWEb2DwM384t4NuEVldEZ8T0kgu tdo/r3pPE6Pd2CFCKy8bIP0WjgWD0LSo9fvUl6HpD8a7IZXJ68RaztqE/UWM7JpHq9DE deiaV6W37duX70L7PBgrKivS32BVYtq+EeqdXOUkBQN71cS3vQboRCZVpmHAFHSdZWP/ 6/pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w73M4vL0; 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 h3si5722514oie.105.2020.03.10.06.05.10; Tue, 10 Mar 2020 06:05:33 -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=w73M4vL0; 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 S1730606AbgCJNDd (ORCPT + 99 others); Tue, 10 Mar 2020 09:03:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:48104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729134AbgCJNDZ (ORCPT ); Tue, 10 Mar 2020 09:03:25 -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 03CEC20409; Tue, 10 Mar 2020 13:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583845404; bh=b2skDpvrPgPj6Xui4z2yZFFBz2z91dVTcftzBEEU42o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w73M4vL0nvxZR5MXufwsJ7qeXZMBdyeYKQJkE0LQBhjnNoBtOW93Z4eK7GimPfhBV ZSk816u/RWaHiWryhGitp1jlONthHNhckbq7ChL56DPc04SlX8+ZNInCP/2tfzoWA7 OYW0lePQ6cgmsaO299wh9XliuLh4yhOrKb3ErgJk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Stach , Ahmad Fatoum , Rouven Czerwinski , Shawn Guo Subject: [PATCH 5.5 171/189] ARM: imx: build v7_cpu_resume() unconditionally Date: Tue, 10 Mar 2020 13:40:08 +0100 Message-Id: <20200310123657.154373551@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123639.608886314@linuxfoundation.org> References: <20200310123639.608886314@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Ahmad Fatoum commit 512a928affd51c2dc631401e56ad5ee5d5dd68b6 upstream. This function is not only needed by the platform suspend code, but is also reused as the CPU resume function when the ARM cores can be powered down completely in deep idle, which is the case on i.MX6SX and i.MX6UL(L). Providing the static inline stub whenever CONFIG_SUSPEND is disabled means that those platforms will hang on resume from cpuidle if suspend is disabled. So there are two problems: - The static inline stub masks the linker error - The function is not available where needed Fix both by just building the function unconditionally, when CONFIG_SOC_IMX6 is enabled. The actual code is three instructions long, so it's arguably ok to just leave it in for all i.MX6 kernel configurations. Fixes: 05136f0897b5 ("ARM: imx: support arm power off in cpuidle for i.mx6sx") Signed-off-by: Lucas Stach Signed-off-by: Ahmad Fatoum Signed-off-by: Rouven Czerwinski Signed-off-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-imx/Makefile | 2 ++ arch/arm/mach-imx/common.h | 4 ++-- arch/arm/mach-imx/resume-imx6.S | 24 ++++++++++++++++++++++++ arch/arm/mach-imx/suspend-imx6.S | 14 -------------- 4 files changed, 28 insertions(+), 16 deletions(-) --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -91,6 +91,8 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7 obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o endif +AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a +obj-$(CONFIG_SOC_IMX6) += resume-imx6.o obj-$(CONFIG_SOC_IMX6) += pm-imx6.o obj-$(CONFIG_SOC_IMX1) += mach-imx1.o --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -109,17 +109,17 @@ void imx_cpu_die(unsigned int cpu); int imx_cpu_kill(unsigned int cpu); #ifdef CONFIG_SUSPEND -void v7_cpu_resume(void); void imx53_suspend(void __iomem *ocram_vbase); extern const u32 imx53_suspend_sz; void imx6_suspend(void __iomem *ocram_vbase); #else -static inline void v7_cpu_resume(void) {} static inline void imx53_suspend(void __iomem *ocram_vbase) {} static const u32 imx53_suspend_sz; static inline void imx6_suspend(void __iomem *ocram_vbase) {} #endif +void v7_cpu_resume(void); + void imx6_pm_ccm_init(const char *ccm_compat); void imx6q_pm_init(void); void imx6dl_pm_init(void); --- /dev/null +++ b/arch/arm/mach-imx/resume-imx6.S @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright 2014 Freescale Semiconductor, Inc. + */ + +#include +#include +#include +#include +#include "hardware.h" + +/* + * The following code must assume it is running from physical address + * where absolute virtual addresses to the data section have to be + * turned into relative ones. + */ + +ENTRY(v7_cpu_resume) + bl v7_invalidate_l1 +#ifdef CONFIG_CACHE_L2X0 + bl l2c310_early_resume +#endif + b cpu_resume +ENDPROC(v7_cpu_resume) --- a/arch/arm/mach-imx/suspend-imx6.S +++ b/arch/arm/mach-imx/suspend-imx6.S @@ -327,17 +327,3 @@ resume: ret lr ENDPROC(imx6_suspend) - -/* - * The following code must assume it is running from physical address - * where absolute virtual addresses to the data section have to be - * turned into relative ones. - */ - -ENTRY(v7_cpu_resume) - bl v7_invalidate_l1 -#ifdef CONFIG_CACHE_L2X0 - bl l2c310_early_resume -#endif - b cpu_resume -ENDPROC(v7_cpu_resume)