From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397AbbCRJrx (ORCPT ); Wed, 18 Mar 2015 05:47:53 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:38017 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754074AbbCRJrt (ORCPT ); Wed, 18 Mar 2015 05:47:49 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfec7f4-b7f126d000001e9a-13-550949313235 Content-transfer-encoding: 8BIT Message-id: <1426672064.30793.3.camel@AMDC1943> Subject: Re: [PATCH v2] ARM: EXYNOS: Fix failed second suspend on Exynos4 From: Krzysztof Kozlowski To: Kukjin Kim Cc: Arnd Bergmann , Olof Johansson , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Szyprowski , stable@vger.kernel.org, BartlomiejZolnierkiewicz Date: Wed, 18 Mar 2015 10:47:44 +0100 In-reply-to: <1426669047.29565.9.camel@AMDC1943> References: <1426069206-13667-1-git-send-email-k.kozlowski@samsung.com> <1426069765.30407.7.camel@AMDC1943> <55086CE0.6080905@kernel.org> <1426669047.29565.9.camel@AMDC1943> X-Mailer: Evolution 3.10.4-0ubuntu2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFLMWRmVeSWpSXmKPExsVy+t/xy7qGnpyhBq/W8lv8nXSM3WLjjPWs Fv2PXzNbbHp8jdXi8q45bBYzzu9jslh75C67xanrn9ksFmx8xOjA6fH71yRGj02rOtk8Ni+p 97hyoonVo2/LKkaPz5vkAtiiuGxSUnMyy1KL9O0SuDKuvOhgLPgnUnFu1wv2BsZXAl2MnBwS AiYSq5c+YIewxSQu3FvP1sXIxSEksJRR4teJ9awgCV4BQYkfk++xdDFycDALyEscuZQNEmYW UJeYNG8RM0T9Z0aJtWtmMkPU60v0XL4EZgsLeErM2/eIDcRmEzCW2Lx8CRvIHBEBRYnNCxRA epkFVjJJXNm8COwIFgFViTn3trOA2JwCBhL7j39nhViwkVHi+65zYM0SAsoSjf1uExgFZiE5 bxbCebOQnLeAkXkVo2hqaXJBcVJ6rqFecWJucWleul5yfu4mRkj4f9nBuPiY1SFGAQ5GJR5e hx8coUKsiWXFlbmHGCU4mJVEeEWB0SPEm5JYWZValB9fVJqTWnyIkYmDU6qBUW6xSdEXFq14 eZU8nXBtKfa3+rdsd/lU3ThscO6W6Yb0t6LSAmp9Ny9G/UoRTV+lEy3BWhqV4jqx54lljGTV 2rh3wWr/J8TeqeiY+37xdpPlSy+/WPQlcmU/s+yi9etceoLYvt2ZuliF3VHkykbl+3t9+76a TZjsNmdO7oNL9kxzQrNjJ/HWKrEUZyQaajEXFScCAPJWjY1dAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On śro, 2015-03-18 at 09:57 +0100, Krzysztof Kozlowski wrote: > On śro, 2015-03-18 at 03:05 +0900, Kukjin Kim wrote: > > On 03/11/15 19:29, Krzysztof Kozlowski wrote: > > > On śro, 2015-03-11 at 11:20 +0100, Krzysztof Kozlowski wrote: > > >> On Exynos4412 boards (Trats2, Odroid U3) after enabling L2 cache in > > >> 56b60b8bce4a ("ARM: 8265/1: dts: exynos4: Add nodes for L2 cache > > >> controller") the second suspend to RAM failed. First suspend worked fine > > >> but the next one hang just after powering down of secondary CPUs (system > > >> consumed energy as it would be running but was not responsive). > > >> > > >> The issue was caused by enabling delayed reset assertion for CPU0 just > > >> after issuing power down of cores. This was introduced for Exynos4 in > > >> 13cfa6c4f7fa ("ARM: EXYNOS: Fix CPU idle clock down after CPU off"). > > >> > > >> The whole behavior is not well documented but after checking with vendor > > >> code this should be done like this (on Exynos4): > > >> 1. Enable delayed reset assertion when system is running (for all CPUs). > > >> 2. Disable delayed reset assertion before suspending the system. > > >> This can be done after powering off secondary CPUs. > > >> 3. Re-enable the delayed reset assertion when system is resumed. > > >> > > >> Signed-off-by: Krzysztof Kozlowski > > >> Fixes: 13cfa6c4f7fa ("ARM: EXYNOS: Fix CPU idle clock down after CPU off") > > >> Cc: > > >> Tested-by: Bartlomiej Zolnierkiewicz > > >> Tested-by: Chanwoo Choi (...) > > > > > And please make sure your updates don't hurt other exynos5 stuff. Any > > tests on exynos5 platforms would be helpful. > > > > And I don't think the fix should be sent to 'stable' because I can't see > > the 'add node for L2$ controller' in v3.19...looks applied from v4.0-rc... > > You're right. git-describe gave me 3.19-rc1 but this was tag for the > specific commit, not for merge-commit. The stable can be removed if this > comes during this RC-cycle. Actually the "fixes" tag is for commit introducing wrong usage of "use_delayed_reset_assertion" which was merged for 3.19. Although mentioned bug (failed second to RAM) is observable only after enabling L2 cache, the fix is for original commit. I have also other proposal: what about reverting the commit 13cfa6c4f7fa ("ARM: EXYNOS: Fix CPU idle clock down after CPU off")? It will introduce minor issue (CPU idle clock down will stop to work after CPU hot unplug) but the main problem with suspend to RAM will be fixed. Best regards, Krzysztof