Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp712505imj; Wed, 13 Feb 2019 16:18:24 -0800 (PST) X-Google-Smtp-Source: AHgI3IZEbkbt7ZaqHz438645IjHJ7pr0A4DpaQClZVaeeo8w1/kqJSsKftW3BkEC5iqj5kQv9I57 X-Received: by 2002:a63:1753:: with SMTP id 19mr842985pgx.439.1550103504278; Wed, 13 Feb 2019 16:18:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550103504; cv=none; d=google.com; s=arc-20160816; b=yK4rcuvUFv4WWYg4m5+AzVZddjPxnAn1C66iuCwCdIzhEadkmZwXIVMbh6iaDsPEq/ j1+BthEghnb0IHsTJFVQ1P9e08c5P4oIRSTU1xl9aF1P2TV58VVivAEkvDRGnTOZILr2 sf5bZxnP168fjRbo3QjLafmTiEL53DlNVlbcB5Zdoxack7KS2eaL8BlP62XNUXKnK/wQ V7Sp34S7Tg9yerJOiDmSTYoCuHF+wa7TR5L8/awsiNPA7Fgmw/2dyswQeTr3gqa2/OD2 rvScG3S4Pi2NWElc6hgCBIZMF1vVSgk7ZPeZ30KBW5jFid6GA4xshTk7noTsgkNm4Pa1 bFkg== 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=s0yY8+Yfcg/LFGp5WwBtX387Qm9YCSOBjsuIINjJVNI=; b=tEBsGaAReg4K18i941eqh2Lq9AoGanqu+gBetuYw2qBOhNkEPkKN2Qlkgln5MzGhH0 rPGiEPmwBTLrnSRlkM1QjGGqmINKJRV6MYOyIuf4eNxsvbhy15Y7geDEgnZx+Um2cRJ5 hkEDD/ashTAwpc+fMx06/xVRByDQZ0WVoCTcuk7idqadacOxZzkCdAAgaanRmhskhliM pqvRa3bI3fom7bO7h/BUl6mZ20hOd6OZ4AWLZ47EUKOuA8tuyrZBZiKuqH1Y6rKyzZDC R2Z+IxhiK8FvA022ii5rcbuih5ffxDiA4cLpvaPhx7uIAdjpRopkOpr3BEwNbP3l5KXl xmHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G7FS5ZVd; 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 f128si816853pfb.30.2019.02.13.16.18.08; Wed, 13 Feb 2019 16:18:24 -0800 (PST) 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=G7FS5ZVd; 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 S2389760AbfBMSpx (ORCPT + 99 others); Wed, 13 Feb 2019 13:45:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:44468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394105AbfBMSpu (ORCPT ); Wed, 13 Feb 2019 13:45:50 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 08EC4222D3; Wed, 13 Feb 2019 18:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550083549; bh=426XqMy+aqxeG31basksK2ToBZJEk0JL2P7tGiJ9pAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G7FS5ZVdI3IaTmq1V5S56Ja+hGxRp2RbkdqyE3RftQt5PJ+Hn5DMLYxIzbQ28Oi3e qDvOAF8vDr/L5fgl/KdtCFGceaqXVySRVgM0BdNLIcG8W9hSDNl13bmBv4mV+vFLUh j/kr/758LMcU8qZ17ry+PtqcDLS9UUuhQi7UBirY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Pisati , Marc Gonzalez , Pavel Machek , Arnd Bergmann Subject: [PATCH 4.20 30/50] ARM: tango: Improve ARCH_MULTIPLATFORM compatibility Date: Wed, 13 Feb 2019 19:38:35 +0100 Message-Id: <20190213183658.149938740@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213183655.747168774@linuxfoundation.org> References: <20190213183655.747168774@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marc Gonzalez commit d0f9f16788e15d9eb40f68b047732d49658c5a3a upstream. Calling platform-specific code unconditionally blows up when running an ARCH_MULTIPLATFORM kernel on a different platform. Don't do it. Reported-by: Paolo Pisati Signed-off-by: Marc Gonzalez Acked-by: Pavel Machek Cc: stable@vger.kernel.org # v4.8+ Fixes: a30eceb7a59d ("ARM: tango: add Suspend-to-RAM support") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-tango/pm.c | 6 ++---- arch/arm/mach-tango/pm.h | 7 +++++++ arch/arm/mach-tango/setup.c | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) --- a/arch/arm/mach-tango/pm.c +++ b/arch/arm/mach-tango/pm.c @@ -3,6 +3,7 @@ #include #include #include "smc.h" +#include "pm.h" static int tango_pm_powerdown(unsigned long arg) { @@ -24,10 +25,7 @@ static const struct platform_suspend_ops .valid = suspend_valid_only_mem, }; -static int __init tango_pm_init(void) +void __init tango_pm_init(void) { suspend_set_ops(&tango_pm_ops); - return 0; } - -late_initcall(tango_pm_init); --- /dev/null +++ b/arch/arm/mach-tango/pm.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifdef CONFIG_SUSPEND +void __init tango_pm_init(void); +#else +#define tango_pm_init NULL +#endif --- a/arch/arm/mach-tango/setup.c +++ b/arch/arm/mach-tango/setup.c @@ -2,6 +2,7 @@ #include #include #include "smc.h" +#include "pm.h" static void tango_l2c_write(unsigned long val, unsigned int reg) { @@ -15,4 +16,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango .dt_compat = tango_dt_compat, .l2c_aux_mask = ~0, .l2c_write_sec = tango_l2c_write, + .init_late = tango_pm_init, MACHINE_END