From patchwork Mon Feb 18 14:34:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 158618 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2563498jaa; Mon, 18 Feb 2019 06:34:26 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia6KG+qxh8JclaztnKaqU/zxKL0nfcwLzAGGVscA/5m9wOawkZpseKIzaYK0XEFHJt0eEZp X-Received: by 2002:a17:902:4503:: with SMTP id m3mr25591192pld.35.1550500466453; Mon, 18 Feb 2019 06:34:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550500466; cv=none; d=google.com; s=arc-20160816; b=PLmebQri5L1vs+NQ9BGZ4DzsMC5hnb94Iii0mx6ghmWsVeQ3Era6yWnkFN3BUxbrdv f2e4YC2Xm20zhq8yIVej4GR2bg+eEGUPGm9HUGsWlJybL57lQHyqU2x3/Yo9pIk+A8jm Xeuc0uDpRU4ccj7J9PRKrBnXlFy/uDjCkzIHP3PMt1fI7x4jg6kNTRe1a3LX/d9mdRzV cDhcrN25jc1+2H8RY37WBDzf1lgDnMy0xf0yomt4d85eaWjzfSZo2hVIdTd327DoOPsu vS6Yv6YeWFsc+hqa8DIHcPwwv76rnG46gEsvaJNjkQxxyiW4+1UJo9HkEXsKksDIRDMi 03yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=GKmKSK++ZTckAT+rhCOuz9rRPp8JbCiv/m1dcvvAsoo=; b=YH2GtxRNbyhkcXr5rGrvP5lkg8L4n5WeLFOWFKR+EZDr1shOPcNKCQF133/MnkwDGY YKwYIcEDlwMZgjj+sbnrEE4C6OM5v9Xl9ZfyUXVToXnyZl7sNB8fcRyd/MURahS3FlfU PObKZJdBD8RhwGRnh3zwuYT+ofbxmi3VbfKV2vL6mBBe2o/9iG0jWwLmt0maI921ta2+ /uF0V2KlZIljrQpwu9i36CImoue0gjtBzypUhmyja81mZvWVKD+QUviodlLIRdiBwzXT fDuvtPZKE7SFB5ZHZHMrEBRbWHrZLCGHREH1+0rP9xBbLWJALw3pkGA2L0/3vA1yU9Sf ERdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=loKTZIdk; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si12953854pgk.56.2019.02.18.06.34.26; Mon, 18 Feb 2019 06:34:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=loKTZIdk; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388313AbfBROeY (ORCPT + 3 others); Mon, 18 Feb 2019 09:34:24 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:59675 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388998AbfBROeV (ORCPT ); Mon, 18 Feb 2019 09:34:21 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190218143420euoutp02ecc0a63455498a6aa600e3526a2f1881~Ee-QinBTX1529115291euoutp02I; Mon, 18 Feb 2019 14:34:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190218143420euoutp02ecc0a63455498a6aa600e3526a2f1881~Ee-QinBTX1529115291euoutp02I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550500460; bh=GKmKSK++ZTckAT+rhCOuz9rRPp8JbCiv/m1dcvvAsoo=; h=From:To:Cc:Subject:Date:References:From; b=loKTZIdkaJyvJrcPdIrYbGW5Ab+DYpiGF/4LWw6XnlRpE1RHOK8KBpRl5WREkWX79 7dnjbuzh/wYD2gC7kBhldifiyzlNziTklCjCKv3sBHPAsARVTRTYUcxcMx3AJ0Thlu DbWPyDcr6qDfi4olPCFSPMrWvbrAf73q25rC//cE= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190218143419eucas1p207d5e62493254efff4d2544ca3aaeba0~Ee-QDklhz1462014620eucas1p2Q; Mon, 18 Feb 2019 14:34:19 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id FE.90.04294.B62CA6C5; Mon, 18 Feb 2019 14:34:19 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190218143418eucas1p2c14f23300e00f5a09e40a87c6a264777~Ee-POlRAb0529305293eucas1p23; Mon, 18 Feb 2019 14:34:18 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-f2-5c6ac26b90de Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 10.8B.04284.A62CA6C5; Mon, 18 Feb 2019 14:34:18 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PN400ECCLT2NV10@eusync1.samsung.com>; Mon, 18 Feb 2019 14:34:18 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Joonyoung Shim , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz , Seung-Woo Kim Subject: [PATCH 0/4] Odroid XU3/4: add system suspend/resume support Date: Mon, 18 Feb 2019 15:34:08 +0100 Message-id: <20190218143412.6865-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42LZduzned3sQ1kxBm+/ilhsnLGe1eL6l+es Fi/uXWSxOH9+A7vFjPP7mCzWHrkLZE1+yebA7rFpVSebR9+WVYwenzfJBTBHcdmkpOZklqUW 6dslcGUsazjMVrBJqOLjx9usDYwT+bsYOTkkBEwk5t1cw9bFyMUhJLCCUeJgy1smCOczo8TL V6vYYKqez/jJCpFYxiix9tkPZgingUni05OZYFVsAoYSXW+7wGwRAVWJz20L2EGKmAW6mCTa dk5nBUkIC7hIvPzyF8xmASra+3kKM4jNK2Aj0bFuFivEOnmJ1RsOgG2QELjLKvH2eQ/UHS4S n9qWQRXJSHR2HGSCKGpmlGifMYsdwulhlNg6ZwdUh7XE4eMXwTqYBfgkJm2bDjSWAyjOK9HR JgRR4iHRt+AE2BVCArES7/buZZvAKL6AkWEVo3hqaXFuemqxUV5quV5xYm5xaV66XnJ+7iZG YASd/nf8yw7GXX+SDjEKcDAq8fAuWJ4VI8SaWFZcmXuIUYKDWUmE99QBoBBvSmJlVWpRfnxR aU5q8SFGaQ4WJXHeaoYH0UIC6YklqdmpqQWpRTBZJg5OqQZGjU/TrsdfFHO8ntZapfbV1/f1 DdOSABO/ep5Dke2TghIXLuKyYttbPkMoyH/lc45KNT4H069bIh5LFulnyb3rv9vQ7sBgq/vs oA9nVdKD0pti+r8P8D7fxLfL4pKDo980xeo/jftXa373Wh76b7fJ7+aFTF+fh8wrsWg6HXFm 4Zl7BkV3bBqUWIozEg21mIuKEwF1iIH5nAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGJMWRmVeSWpSXmKPExsVy+t/xy7pZh7JiDF49k7HYOGM9q8X1L89Z LV7cu8hicf78BnaLGef3MVmsPXIXyJr8ks2B3WPTqk42j74tqxg9Pm+SC2CO4rJJSc3JLEst 0rdL4MpY1nCYrWCTUMXHj7dZGxgn8ncxcnJICJhIPJ/xk7WLkYtDSGAJo8TWu3PYIJwmJomv L04zgVSxCRhKdL3tYgOxRQRUJT63LWAHKWIW6GGSuP/pEQtIQljAReLll7+sIDYLUNHez1OY QWxeARuJjnWzWCHWyUus3nCAeQIj1wJGhlWMIqmlxbnpucWGesWJucWleel6yfm5mxiBvt92 7OfmHYyXNgYfYhTgYFTi4V2wPCtGiDWxrLgy9xCjBAezkgjvqQNAId6UxMqq1KL8+KLSnNTi Q4zSHCxK4rznDSqjhATSE0tSs1NTC1KLYLJMHJxSDYyFz19vmCa2PHyuZMT+ucyf7r8UZdeo zJvkzZU0mZ3LRf3Mn//p7w6bO1/xbPCRuWNv0p/z1/90w8SfVtHP/sisTuHP+LTris5vpcZv ydyPuWemLA6zP3h+Sur6Debflzp8qDmhvi1YTfSbetOapvVh1teetZ70/XY+eeai+7KNIf57 p87vnRWvxFKckWioxVxUnAgA231XZ/kBAAA= X-CMS-MailID: 20190218143418eucas1p2c14f23300e00f5a09e40a87c6a264777 CMS-TYPE: 201P X-CMS-RootMailID: 20190218143418eucas1p2c14f23300e00f5a09e40a87c6a264777 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Dear All, This patchset is a result of my recent works on fixing system suspend/resume on Exynos5422-based Odroid XU3/XU4 boards running under secure firmware. The initial work has been done some time ago by Joonyoung Shim, who noticed the missing secure monitor calls during suspend/resume operation. However that was not enough to make suspend/resume stable. Typically 1 out of 10 cycles ended in a freeze during suspend. Also enabling performance events in kernel configuration mysteriously broke suspend/resume operation. The first issue (random freeze) has been recently fixed by Stuart Menefy in Exynos MultiCore Timer patches initially posted in the "Resuscitate Exynos 5260 support" thread: https://patchwork.kernel.org/patch/10804959/ https://patchwork.kernel.org/patch/10804961/ The second issue turned out to be ralated to the incorrect debug status control register (DSCR) state in the system resume. The last patch provides a workaround for that issues. This patchset has been tested on top of linux-next from 20190218 on the following boards: - Odroid XU3 (Exynos5422, secure firmware) - Odroid XU3-lite (Exynos5422, secure firmware, no ARM PMU available) - Odroid XU4 (Exynos5422, secure firmware) - Odroid HC1 (Exynos5422, secure firmware) - Chromebook2 Peach-Pit (Exynos5420, no secure firmware) - Chromebook2 Peach-Pi (Exynos5800, no secure firmware) On all above boards the system suspend/resume works fine now. There are a few minor issues in some device drivers that triggers kernel warning during the suspend/resume cycle, but they are not critical for the stability. Most of them has been reported to respective maintainers so far. Best regards Marek Szyprowski Samsung R&D Institute Poland Patch summary: Marek Szyprowski (4): ARM: exynos: Move Exynos542x CPU state reset to pm_prepare() ARM: exynos: Add Exynos SMC values for secure memory write ARM: exynos: Add CPU state management for Exynos542x under secure firmware ARM: exynos: Fix undefined instruction during Exynos5422 resume arch/arm/mach-exynos/common.h | 1 + arch/arm/mach-exynos/exynos.c | 3 +++ arch/arm/mach-exynos/smc.h | 7 ++++++ arch/arm/mach-exynos/suspend.c | 39 ++++++++++++++++++++++++++++++---- 4 files changed, 46 insertions(+), 4 deletions(-) -- 2.17.1