From patchwork Mon May 29 10:15:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Shuai X-Patchwork-Id: 100202 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1410600vqr; Mon, 29 May 2023 03:30:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5cNiIOe0oTuUpdRu4EUOFHNglzkXnveW5siZ/j63cOfbMzJY7JwkDvsbjfMfAC2s/iNX/D X-Received: by 2002:a05:6a20:7213:b0:10c:b9ed:6a38 with SMTP id y19-20020a056a20721300b0010cb9ed6a38mr7036150pzb.28.1685356229333; Mon, 29 May 2023 03:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685356229; cv=none; d=google.com; s=arc-20160816; b=YQinMz6CA6HKQknye3J9sufosCNY+0y75mpE4Wa2uTJbjAzICD7/kIvIYXpw4CB8Ih 6LDktT8MKt8dJ6GNYX+6SRq5c+AkVKoZC23Icejc14NKxRzeRxdaoSKFzUPPGS/GK7BX csdPEjjQxboEaCnyExRK7Yh1KHu3D3/9QFo2O5cwYdhpbqKh0qV8E9GBsqvG7CA1BNgT xy6HXoM6q/a6mmozI66XYOCgFBqJQY70iyJPvE4bDw/DpxCts08V7hfwCsI3K0stFwJQ JlroEpk6YiK1BtticS7OstBYDP9/GWVVHYeHiKDL2lFeI7tJTWlB2lpUrzgyvP8qp3lN SUiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=VszrG9j4mQgJJ1uJdgLdY3mav7ukQxS/AOZ8uvqy2RY=; b=0YWlx/QW08ZTrwIfKBGCz2x3x3UHXemRgpPPciZLN/ef8ptsTPXOrR471juzn31dj8 pSmUGgP92pyCEXCjLWkIWe2ir1t9psq3fEsyer6GlKroOa8WFWiqd5v7KalfMttGeWdt RErs+aBPHUWADvQUODHVUNHgfRGheUhou0H4e8kskL+fUvQ8zPU0aigHmvQglcJfYhpz dHK+wPNijYR3+0yz0Ac7obxvG9+dy2OvxhNE30DNmNnO0zuglq9t6LR1+lghQUIKpI13 CGR1vlPhX8YUBk91+KoQessmYcZ+Is8opVmY1D+xOtYigD4rfmo2ufMsCYbK8yeyBSTw 4QHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i188-20020a636dc5000000b00519b9bfd43dsi9071364pgc.480.2023.05.29.03.30.15; Mon, 29 May 2023 03:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231816AbjE2KPu (ORCPT + 99 others); Mon, 29 May 2023 06:15:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231986AbjE2KPt (ORCPT ); Mon, 29 May 2023 06:15:49 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.67.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C3CBC4 for ; Mon, 29 May 2023 03:15:47 -0700 (PDT) X-QQ-mid: bizesmtp84t1685355326tejjficc Received: from localhost.localdomain ( [221.226.144.218]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 29 May 2023 18:15:25 +0800 (CST) X-QQ-SSF: 01200000000000304000000A0000000 X-QQ-FEAT: q+EIYT+FhZoX3l1jn5qzJL6M/L6SLyhFd6WSXwZbekqfsXe4BK/504CJqpwHH IpLCLDhljGvBZdLZQPpV4TuS3K5Vgydh9hUyyHE0in0H2h0iDbvPLIkYWfRod6+709bClut 7U7WCHCspLZe5UE0Dl+RkckTmtarCPxWRO811vkH37tuNSukWQoGDh2WWWjWomL+kDVNe7P UXXyDvH6Tq63uzsMcZ2gyJmRn/TzefecAQfO+7CCaDf3YMX91crBfA4WwrHtAud+w/3rAIZ N4zYz1wsO1AXf6LltY5zPRq/VaJlJJGeALqkXPZTX2aTsjVodht05cMO8z65Ldp+fck1Q3g hC2ZTZYZJ3TUd/n3mJ3pfG7R7FUU9hGTlYYgAsT X-QQ-GoodBg: 0 X-BIZMAIL-ID: 13277533693592484538 From: Song Shuai To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, conor@kernel.org, suagrfillet@gmail.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Song Shuai Subject: [PATCH] riscv: Enable ARCH_SUSPEND_POSSIBLE for s2idle Date: Mon, 29 May 2023 18:15:24 +0800 Message-Id: <20230529101524.322076-1-songshuaishuai@tinylab.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767224093584226259?= X-GMAIL-MSGID: =?utf-8?q?1767224093584226259?= With this configuration opened, the basic platform-independent s2idle is provided by the sole "s2idle" string in `/sys/power/mem_sleep`. At the end of s2idle, harts will hit the `wfi` instruction or enter the SUSPENDED state through the sbi_cpuidle driver. The interrupt of possible wakeup devices will be kept to wake the system up. And platform-specific sleep states can be provided by future ACPI and SBI SUSP extension support. Signed-off-by: Song Shuai Reviewed-by: Andrew Jones --- arch/riscv/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 348c0fa1fc8c..4bb818035585 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -805,6 +805,9 @@ config ARCH_HIBERNATION_POSSIBLE config ARCH_HIBERNATION_HEADER def_bool HIBERNATION +config ARCH_SUSPEND_POSSIBLE + def_bool y + endmenu # "Power management options" menu "CPU Power Management"