Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55FBAC64ED6 for ; Tue, 28 Feb 2023 01:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbjB1BUg (ORCPT ); Mon, 27 Feb 2023 20:20:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjB1BUc (ORCPT ); Mon, 27 Feb 2023 20:20:32 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 113F92685F for ; Mon, 27 Feb 2023 17:20:26 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 2D15B24E1ED; Tue, 28 Feb 2023 09:20:18 +0800 (CST) Received: from EXMBX162.cuchost.com (172.16.6.72) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 28 Feb 2023 09:20:17 +0800 Received: from EXMBX066.cuchost.com (172.16.7.66) by EXMBX162.cuchost.com (172.16.6.72) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 28 Feb 2023 09:20:17 +0800 Received: from EXMBX066.cuchost.com ([fe80::5947:9245:907e:339f]) by EXMBX066.cuchost.com ([fe80::5947:9245:907e:339f%17]) with mapi id 15.00.1497.044; Tue, 28 Feb 2023 09:20:17 +0800 From: JeeHeng Sia To: Alexandre Ghiti , "paul.walmsley@sifive.com" , "palmer@dabbelt.com" , "aou@eecs.berkeley.edu" CC: "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Leyfoon Tan , Mason Huo Subject: RE: [PATCH v4 4/4] RISC-V: Add arch functions to support hibernation/suspend-to-disk Thread-Topic: [PATCH v4 4/4] RISC-V: Add arch functions to support hibernation/suspend-to-disk Thread-Index: AQHZRZ0zqkG7/pRhhEiAX6gFjug0Aa7dheoAgASUe8CAAKk7AIAA1DjA Date: Tue, 28 Feb 2023 01:20:17 +0000 Message-ID: References: <20230221023523.1498500-1-jeeheng.sia@starfivetech.com> <20230221023523.1498500-5-jeeheng.sia@starfivetech.com> <4119a2dd-e598-ec22-0872-e352898fa660@ghiti.fr> <74bf1f43091345fcb59119d4d53e20bb@EXMBX066.cuchost.com> <5a6523ad-4234-f0b5-accb-77c543122593@ghiti.fr> In-Reply-To: <5a6523ad-4234-f0b5-accb-77c543122593@ghiti.fr> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [202.188.176.82] x-yovoleruleagent: yovoleflag Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogQWxleGFuZHJlIEdoaXRp IDxhbGV4QGdoaXRpLmZyPg0KPiBTZW50OiBUdWVzZGF5LCAyOCBGZWJydWFyeSwgMjAyMyA0OjMy IEFNDQo+IFRvOiBKZWVIZW5nIFNpYSA8amVlaGVuZy5zaWFAc3RhcmZpdmV0ZWNoLmNvbT47IHBh dWwud2FsbXNsZXlAc2lmaXZlLmNvbTsgcGFsbWVyQGRhYmJlbHQuY29tOyBhb3VAZWVjcy5iZXJr ZWxleS5lZHUNCj4gQ2M6IGxpbnV4LXJpc2N2QGxpc3RzLmluZnJhZGVhZC5vcmc7IGxpbnV4LWtl cm5lbEB2Z2VyL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