Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5276794imm; Tue, 16 Oct 2018 07:53:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62x2loy/Bjkyh3F4bXpi3dwFfU0vWfkKJo5U7nvXJD1ktFmiycKnxjcIhkPVTK8r4s4SFwy X-Received: by 2002:a65:4301:: with SMTP id j1-v6mr4372089pgq.279.1539701629208; Tue, 16 Oct 2018 07:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539701629; cv=none; d=google.com; s=arc-20160816; b=ep5Z2F44q7xhykbex6wPOHcsqzmJyi50E1XvCXi2TWbYoxQDWlh84n/beycF0askvO 2RUcxRPgn/c6q7gxG/DLYmpcgjypXKqmyS4jHsk8/7zzXCzWtkY6O93kiZKYQlA4SR+Q O4a6B1EDWBvyjC3glAEhn+eFNn8nyyQK68/y3BJElTDIOQFPEdnH5GOpECmbftwABhd3 Q4Gi5Jwzqvmp/vmlgstbI5etPcsusB6rusEZMJIeGo+gFe4RgVDtdR54kXQ3zqt72l93 fjuJ3PIUc+WLlhW1tWTOc5PrmtiY2LVjDBBkXNAlVUd1iYOnBj1dyhEsT1T72rjGE2gx hgog== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=37Qi09KxJqGZ54e4qUKiYLmpxF1ojD0lbFLAZbLD9HM=; b=FaM5vOxsj5i4/6IOkcFEx+YeK5bv4c/iv2+R+A1SI7M6/QKGg2qoiPs2oXpYshOgMu D3RzrDiw92lORluEd0x3AROOtf7miue6+NqYhrLUikQzz4hDabcE4W07AkB7zfdBKzJf aXsgZkLr+TWX3gqD/l0R6DpR2k/Vl6jDgDiElXY2ewzdClC9qkvfQ6vskG3XoFvJs/H6 ls81SlhgOyx12HFAkyJec8b5LHQsQMza5yhoUe1vVS0eTSH7z/pPFxbJqB29bDnHbGir PqN9+k2Wnh/SyRmr24EodBm0yd2Ut1rsBGuD7pbCNxRI9aAV5boj5hnsB4QSx9dYXhuw zAAw== 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 r24-v6si13420991pgv.380.2018.10.16.07.53.33; Tue, 16 Oct 2018 07:53:49 -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 S1727149AbeJPWnc (ORCPT + 99 others); Tue, 16 Oct 2018 18:43:32 -0400 Received: from webbox1416.server-home.net ([77.236.96.61]:33143 "EHLO webbox1416.server-home.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeJPWnc (ORCPT ); Tue, 16 Oct 2018 18:43:32 -0400 Received: from imapserver.systec-electronic.com (unknown [212.185.67.146]) by webbox1416.server-home.net (Postfix) with ESMTPA id B3E2427A45D; Tue, 16 Oct 2018 16:52:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by imapserver.systec-electronic.com (Postfix) with ESMTP id 37F2B1A1B58; Tue, 16 Oct 2018 16:52:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at imapserver.systec-electronic.com Received: from imapserver.systec-electronic.com ([127.0.0.1]) by localhost (imapserver.systec-electronic.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UI6YKVfpJWY1; Tue, 16 Oct 2018 16:52:40 +0200 (CEST) Received: from ws-140106.localnet (ws-140106.systec.local [192.168.10.85]) by imapserver.systec-electronic.com (Postfix) with ESMTPA id 77B1A1A1B57; Tue, 16 Oct 2018 16:52:40 +0200 (CEST) From: Alexander Stein To: Claudiu.Beznea@microchip.com Cc: jonas@orbital-systems.com, linux-kernel@vger.kernel.org, sre@kernel.org, Nicolas.Ferre@microchip.com, alexandre.belloni@bootlin.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] power: reset: at91-reset: enable I-cache for at91sam9260_reset Date: Tue, 16 Oct 2018 16:52:40 +0200 Message-ID: <2351196.3BzoFE0xYq@ws-140106> In-Reply-To: <80993f04-c8ce-5a71-4f04-7edab5e1857b@microchip.com> References: <20181007125815.8392-1-jonas@threetimestwo.org> <80993f04-c8ce-5a71-4f04-7edab5e1857b@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, October 16, 2018, 3:30:24 PM CEST Claudiu.Beznea@microchip.com wrote: > Hi Jonas, > > On 07.10.2018 15:57, Jonas Danielsson wrote: > > From: Jonas Danielsson > > > > This fixes a bug where our embedded system (AT91SAM9260 based) would > > hang at reboot. At the most we managed 16 boot loops without a hang. > > > > With this patch applied the problem has not been observed and the board > > has managed above 250 boot loops. > > > > The AT91SAM9260 datasheet tells us that with the instruction cache > > disabled all instructions are fetched from SDRAM. And we have an errata > > telling us we must power down the SDRAM before issuing cpu reset. > > > > This means we need the instruction cache enabled in at91sam9260_reset() > > At the moment it is being disabled in cpu_proc_fin() which is called from > > arch/arm/kernel/reboot.c. > > Are you using kexec reboot or implemented hibernate mode on this machine? > I'm seeing cpu_proc_fin() is called only in case of kexec reboot or > switching to hibernate mode. > > In case of normal reboot (e.g. reboot command) machine_restart() from > arch/arm/kernel/reboot.c is called. Please correct me if I'm wrong. Another location is cpu_reset() aka cpu_arm926_reset() in proc-arm926.S which also disables I-cache. But I can't track down a callstack ending there. Best regards, Alexander