Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2901245pxb; Tue, 12 Jan 2021 01:05:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWeNmJJdzoqeI5E7sq6koNvoWZwe023Ap7DDt9Ka60+hPq1dHwEVSehtqec75/cc3Rzg+Y X-Received: by 2002:a50:9ea4:: with SMTP id a33mr2537526edf.70.1610442355946; Tue, 12 Jan 2021 01:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610442355; cv=none; d=google.com; s=arc-20160816; b=I/rourNr3Qnn+jVl0rapvl6Ao3b5NVdkjdgRZVKrnIYsN+ZBqP7+VQLJ9ttouSs95y GJ2Dd8afHHonL3aTEPGc78IgJv8gu9tEHc1OL/PDRqZx6AbBGFDMAXyt2LbjpCXxMI2h W3kGs+6fPvI1TTdJcjRLV59HjPRemt3rAvwft23wZv/scgNjJA6jLoMkA+HpOZurxkdv 06uyzlRZlm2axRR2sTX/9yjD5qUevSzqe8PG2on1Iz5mn/IZoSJmPzWSuWfn0yYSwcEY kbBizYa+L6SzZF6BklSb9XaS0QIh6fpSk4pxphgCxsI/G6lLxt6HONHA5oIGKm5Nhp7P CBBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=yMb1cZ3Zjh+trIGJGvuoYn1Lc2qjjK+R1PZs667eZgw=; b=RkL3ka7brpGpls+X6KY0WudDgeigwpT+jaDqtinJfr/Kv6XegZQlu7dMyXso/WLY6R putba6uAG2VgbHN+8q0yqruP2LKsL272eEdZ5GHEFkWC+N6cwa5VWeNZ8tucjKCf+Maw w91+yz5ux2GnC3mgLoDl/wfo7tXz54MCLM4lO3mb+ihABU1Nv98uw8ene0WpSU+s3/P8 cBmlAZF2+5XnTiLo4AVdkXSlMFJAAQh+vl3saVuAQZJp470AYpYcruWUabB6p5ZLsuDR iLcmWwV/HNP1LSKX++JnPBVveGIbt9m87Oyh2bKQG1I8ZPuSPsVC1+UAnNo/qkGGsYby RYgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si1043047edj.409.2021.01.12.01.05.32; Tue, 12 Jan 2021 01:05:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389783AbhAKRuP (ORCPT + 99 others); Mon, 11 Jan 2021 12:50:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388804AbhAKRuP (ORCPT ); Mon, 11 Jan 2021 12:50:15 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C970C061786 for ; Mon, 11 Jan 2021 09:49:35 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1kz1Jr-0006fa-0Q; Mon, 11 Jan 2021 18:49:31 +0100 Subject: Re: [PATCH 1/1] ARM: imx: build suspend-imx6.S with arm instruction set To: Max Krummenacher Cc: Max Krummenacher , Lucas Stach , linux-arm-kernel@lists.infradead.org, Fabio Estevam , Rouven Czerwinski , linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Sascha Hauer , Russell King , Shawn Guo , NXP Linux Team References: <20210111151704.26296-1-max.krummenacher@toradex.com> <20210111151704.26296-2-max.krummenacher@toradex.com> From: Ahmad Fatoum Message-ID: Date: Mon, 11 Jan 2021 18:49:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20210111151704.26296-2-max.krummenacher@toradex.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.01.21 16:17, Max Krummenacher wrote: > When the kernel is configured to use the Thumb-2 instruction set > "suspend-to-memory" fails to resume. Observed on a Colibri iMX6ULL > (i.MX 6ULL) and Apalis iMX6 (i.MX 6Q). > > It looks like the CPU resumes unconditionally in ARM instruction mode > and then chokes on the presented Thumb-2 code it should execute. > > Fix this by using the arm instruction set for all code in > suspend-imx6.S. > > Signed-off-by: Max Krummenacher > > --- > > arch/arm/mach-imx/suspend-imx6.S | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/mach-imx/suspend-imx6.S b/arch/arm/mach-imx/suspend-imx6.S > index 1eabf2d2834be..e06f946b75b96 100644 > --- a/arch/arm/mach-imx/suspend-imx6.S > +++ b/arch/arm/mach-imx/suspend-imx6.S > @@ -67,6 +67,7 @@ > #define MX6Q_CCM_CCR 0x0 > > .align 3 > + .arm You had a return to thumb at the end of this subroutine in the cover letter, yet here it's omitted. Why? > > .macro sync_l2_cache > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |