Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3464307ybb; Mon, 23 Mar 2020 01:20:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuI6wWS3oU5vbrhirSEFVcy2ZVmPaujMy3Olz1m0cT1k+SHKuoGSSrP1DUoLXUaMav92/fY X-Received: by 2002:a05:6808:609:: with SMTP id y9mr15404868oih.118.1584951652318; Mon, 23 Mar 2020 01:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584951652; cv=none; d=google.com; s=arc-20160816; b=YCAzunsHq15Ll7K4ia/ZzDheyGwUR8cxD9uW++wKQDYA776DJYzd95oHZCNkG2BL/8 lmPgZpMDoQINuApvADv5TEAO4b0jj15uodSosOO5lzTUoBVl6lU1ojfj35YvipumDhvd m4E1Uins01HGqCtLzUxPmsIkIb9DJ9hG+PQuZzsQeNYK5OLLuZOWhqwdTJm8ctOBTZ7a VOOQ/WoLZV8pNY4piRjSRGpuxleudUdp7r5RGENCqXXsgxgF+y6MQFZCdGvBeTjnBk1G u2d0upfoPn6oGkHUWKu7LsyQvTrB74vAVsRgNZare5xzNyLvRZlkXpdi/iIi7s/ERAWL 5Jmw== 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:cc:to:from; bh=buO6twEmW2okWQ8goFQaGYzxz9SlaJnSuImXfVIDcQ4=; b=k1Qtoy3vt51wTdbF8mHZ7nTsiwVRue1aIqKonWIac4i11vIk8eyEtFohR2x43uKfBX sEhdxG3X3iYceGkQt4dPYYMJLgNc2nYn4jvun36lg/mClot6fPCtgVeFlJ5ynEp2tWyl OfrxGulT36drWwbMTcyajxJVOgvPX7iJXbYofiKA+9YEhluKLMO1JYCnYot9dr7pF5E6 H+oMM5DkSPFkgsvovo+ivHo7jam5R7vNB1bR+GwLLRXmWM8E3WqZMXKkmAGltyDEksp8 rP3ff/KyKk/RJOgoYRugEZxIURA2xYiLgcjSlQvTvzaZG60M1z4AuFHOHQmzrkyQF+FE wFVg== 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 m81si7125257oig.190.2020.03.23.01.20.40; Mon, 23 Mar 2020 01:20:52 -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; 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 S1727529AbgCWIUU (ORCPT + 99 others); Mon, 23 Mar 2020 04:20:20 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:42475 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727516AbgCWIUT (ORCPT ); Mon, 23 Mar 2020 04:20:19 -0400 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGIJd-0003c0-0a; Mon, 23 Mar 2020 09:20:09 +0100 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jGIJb-0008Ge-3C; Mon, 23 Mar 2020 09:20:07 +0100 From: Ahmad Fatoum To: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Lucas Stach , Rouven Czerwinski , Ahmad Fatoum Cc: stable@vger.kernel.org, Clemens Gruber , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y Date: Mon, 23 Mar 2020 09:19:33 +0100 Message-Id: <20200323081933.31497-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: afa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 512a928affd5 ("ARM: imx: build v7_cpu_resume() unconditionally") introduced an unintended linker error for i.MX6 configurations that have ARM_CPU_SUSPEND=n which can happen if neither CONFIG_PM, CONFIG_CPU_IDLE, nor ARM_PSCI_FW are selected. Fix this by having v7_cpu_resume() compiled only when cpu_resume() it calls is available as well. The C declaration for the function remains unguarded to avoid future code inadvertently using a stub and introducing a regression to the bug the original commit fixed. Cc: Fixes: 512a928affd5 ("ARM: imx: build v7_cpu_resume() unconditionally") Reported-by: Clemens Gruber Signed-off-by: Ahmad Fatoum --- arch/arm/mach-imx/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 03506ce46149..e7364e6c8c6b 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -91,8 +91,10 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o endif +ifeq ($(CONFIG_ARM_CPU_SUSPEND),y) AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a obj-$(CONFIG_SOC_IMX6) += resume-imx6.o +endif obj-$(CONFIG_SOC_IMX6) += pm-imx6.o obj-$(CONFIG_SOC_IMX1) += mach-imx1.o -- 2.25.1