From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2066EC433DB for ; Mon, 11 Jan 2021 18:32:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4A862222D for ; Mon, 11 Jan 2021 18:32:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4A862222D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Date:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oV5jbnvLbO6eNYH52yjjTmG4YuErzIaZrQTHGDU170w=; b=Xo4UZldJsma2ftsB+uAzYRsmS ZUO/PKV7iSdwiR7BqPcVwzzwWth5gK29waYpCe9PwULDtvaT714Jc6JPkJlj4Tm+SEz8tgVWDfrzw PIrn61wcoUk02GYs2IZV7yCgjLoVNuQ9X32FKNOmBgt5Em8PZEQKjZIAFLiIt2uFqUsnoS2/lh19Y GuYCBbpW1fuCce8GmToJ4w59TeJeY7Owa9vENyZzhPltmVmOzdzczttxuuFNGRO1H6tl0zfNM7qk6 IGbkwDw7FCyZafo6whQIHdRGdwCUA+2FJcIgOqbLTMjIHmVJakwiFz5ppklQSVO3afcY3U3zROd79 1m0yzLjFA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz1y7-0001YN-Hd; Mon, 11 Jan 2021 18:31:07 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz1xw-0001Tj-Rm for linux-arm-kernel@lists.infradead.org; Mon, 11 Jan 2021 18:30:58 +0000 Received: by mail-wm1-x32c.google.com with SMTP id g185so162904wmf.3 for ; Mon, 11 Jan 2021 10:30:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=P9oFeHULbHnF3mpaSPkN9EJ0BKLTK0LDx5Zik7ys4lo=; b=oQZex2rjAa3eJHkEVIW3W/XqfY8EKPwW2ruwAROac7O4pWoH+ncg0b1MAC9unk89V1 mMvDptoHYrKqDaTvqa8kFm4MqOIHPcqwN9Phi9++Cp8N3NHpo51VpvB7BDsmQyg1PDnj /ZUa8Yfc9np74F2W1qAYVMCOMbV0e7ne6ueLksZMAk6hy6MQSqHisGBCluWvf6N2uMqu nlcxiFlFkmRtQ2L/ImoBYXbjIO9Ne6M6AE+qK9JyQT9Cpz7CMXDIIp9QV/FfkU7xW8Ri sPlD6CyXil22NX/DHWueIrw3CGJxJTF/O/XTr/V4AaxUGXWaR0Aj5zDkYsag4YDJKGjo 2nJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=P9oFeHULbHnF3mpaSPkN9EJ0BKLTK0LDx5Zik7ys4lo=; b=feCO0VRB5f7JKgNGkLsleOd3S0+Um37kwDQWaLUSf1CdB+FoljaWbYZJ8LfzhEcaqM B5EpWYsQpLMqBwvvqFcR/EtQjPeED9sVwLn2WucWv4CQRRJh9ifE5HHM9k+Pto3eJSKd dRpBL2VFRalWwnFgRenLR1GPI65xsKsjKcYpSYyckLfx6PasnDez4N1yOyL9nst8lUkQ P8bT2zW56zt6K8sipU6c70ZihWFyFBqAMOYbNSWduPnCTDzERB0rYSm9TBRIdpSVsxHB oV4UpwLh9Q8hAiOfVMRC2Uf15961HbXBWmXAp3BUT4T0qXRokaOQjR2aMyZX/Ef93ksz yPQA== X-Gm-Message-State: AOAM533XiFwQ+LHF1IRqL/l8cJhll/XshUGDgHFh8VEk5Hu2qSjuao1g 4E5ny8aI8Xs/82VJR7SV3FU= X-Google-Smtp-Source: ABdhPJxRVdr7zlJVRa/l1U+FQaFGoCVTfcrsn8wixh4Lc9T0xszv3XaRiS4MEYdIEC8lD0kXiCWExA== X-Received: by 2002:a7b:cb46:: with SMTP id v6mr119562wmj.19.1610389852982; Mon, 11 Jan 2021 10:30:52 -0800 (PST) Received: from Saturn.fritz.box ([81.221.211.103]) by smtp.googlemail.com with ESMTPSA id j10sm234244wmj.7.2021.01.11.10.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 10:30:52 -0800 (PST) Message-ID: <147692b37063057ce4128894db112caf9320b65b.camel@gmail.com> Subject: Re: [PATCH 1/1] ARM: imx: build suspend-imx6.S with arm instruction set From: Max Krummenacher To: Ahmad Fatoum Date: Mon, 11 Jan 2021 19:30:51 +0100 In-Reply-To: References: <20210111151704.26296-1-max.krummenacher@toradex.com> <20210111151704.26296-2-max.krummenacher@toradex.com> User-Agent: Evolution 3.34.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_133057_003342_0CD10908 X-CRM114-Status: GOOD ( 23.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rouven Czerwinski , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , linux-kernel@vger.kernel.org, Russell King , NXP Linux Team , Max Krummenacher , Fabio Estevam , linux-arm-kernel@lists.infradead.org, Lucas Stach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Resent due to gmail adding HTML, sorry for the noise. Am Montag, den 11.01.2021, 18:49 +0100 schrieb Ahmad Fatoum: > > 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? Now the whole subroutine is compiled for ARM and the return address has bit 0 set so that on jumping back to the caller the CPU will switch back to Thumb-2. Probably the return to Thumb-2 isn't needed in the cover letter solution and it would also work to finish the subroutine in ARM instruction set. However it looks strange to me if a function which begins with the ARM instruction set would come to the return in Thumb-2. > > > > > .macro sync_l2_cache > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel