Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1875114pxb; Fri, 5 Feb 2021 03:47:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIeyC7Pk35bJWJz4yS+jJh9OWuFugMgUfeC0TSXnER40fMgBJ5yxtwAZTLezb1VA2Aysop X-Received: by 2002:a17:906:1f45:: with SMTP id d5mr3830524ejk.76.1612525635569; Fri, 05 Feb 2021 03:47:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612525635; cv=none; d=google.com; s=arc-20160816; b=xk+zxrEZ4GZtv9abjaRpd8P7HLfH0fpFiQ3OjKV8mOXyT1Inp4Pjq7lrrDpB5brk1i sJXSUMCyKuLc3h9Dncm8+bClgXlvSlBmrIr4jDnay2ikwDSEIwmNxwf7ANGWyM58FKei HLwRNMWpG7Nxv/JTdXlVV7VwCnYGLiPBdyLGMZkjgijP83p8fv9LcusdpDU0mL3S4xDr r/ePCwRstm/5QaxNof4FjKavPE5Ti0S6rARWbn0a6oeUktIjarHIqgItv33zJz5rdjN7 6gY0MVL6fFBPkbm4mW24OxjQ4aCLEvxUYNEkL5gKvPLjkcb4F8xpI48+2AAPlkR7nvHZ koxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=NG/1iPUah+H6WhNf9boN9t9IDEupczqgQLzvBmP8PPo=; b=J0oVSRrdb+snnMpqlRsa3KCGEnfxDAr4JFi5++h17GCqd7Y7aDI2aRUUcB9lUqVyej EffSY57CYnLOqfGv5BFPbnjBZWXIfLJd+SyRFuTz0y00fxLEecoRoMlSPwMC9DbI0dv0 dJ26dQG8IFqsrio9gzqkbBxCXu4nrxAIwGrZpirN4NOdzVpo83PdrT5KVcgEJ9l10s0H VmKWJ3309uEBlcdIvSMBZgmOgga16H1Y1eCJy5MH03211LLz+9AnTEN6X+15fKvKKnh+ EVSbk3ixFjeqC/bSehn8KXWHtyq04/CluA5RX3I/w+9ty+Bt96AUEuQPBWBSoJLOZ2qo CEWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g26si5084601edy.55.2021.02.05.03.46.50; Fri, 05 Feb 2021 03:47:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231920AbhBELns convert rfc822-to-8bit (ORCPT + 99 others); Fri, 5 Feb 2021 06:43:48 -0500 Received: from mail-oi1-f169.google.com ([209.85.167.169]:37111 "EHLO mail-oi1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231580AbhBELkX (ORCPT ); Fri, 5 Feb 2021 06:40:23 -0500 Received: by mail-oi1-f169.google.com with SMTP id y199so5093064oia.4 for ; Fri, 05 Feb 2021 03:40:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hUf+h3vOzAlkwsnLcgANOENSBC1Dag9FWwATuaUP+yw=; b=qNvfQHPI2KAps5flodyMLy7b8UgSbsPiMRZnp3un1/8Z/aZDjtKQvupfGmenCGpbUl KT0B2NJTQRmAwMKm01fDsWkHTP2wWgGL4kVklAqSA/wa6CsW8eMoM2QpLD24JxovNiUY LKCd2NAWuzgLVptqUhFmFJ6vF8ik/xnCVV+ATpmMiYRzgk9SOKVTOMV8mSBcsVGKhXiv 8RVDDVw3a7DTKAQ4smIlADbqN4gaKgPkAK9TR5Ngg5OEEV5g2OGu6hTn5l9NHINrakuA 6uer02QhQbbtaO1i5lqJEkCxEY68ZnPdYTnkMLXHOzr8TNPyrNtXKuB0Scevq4SjxZlu pLoQ== X-Gm-Message-State: AOAM531Xmwix9eF8x1/MAYjjOE9X5dhBz2zI1wFAfuPBc3h+c1tT20Du 1DkwSSnXP738+2OJjjuwvFJgEii8ZEtcb9SQltQ= X-Received: by 2002:aca:d14:: with SMTP id 20mr2771628oin.157.1612525182315; Fri, 05 Feb 2021 03:39:42 -0800 (PST) MIME-Version: 1.0 References: <20210129082726.19406-1-ruifeng.zhang0110@gmail.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 5 Feb 2021 12:39:28 +0100 Message-ID: Subject: Re: [PATCH] RFC syscore: add suspend type to syscore To: Ruifeng Zhang Cc: "Rafael J. Wysocki" , Greg KH , ruifeng.zhang1@unisoc.com, Linux Kernel Mailing List , Chunyan Zhang , ke.wang@unisoc.com, nianfu.bai@unisoc.com, orson.zhai@unisoc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 5, 2021 at 11:28 AM Ruifeng Zhang wrote: > > Rafael J. Wysocki 于2021年2月4日周四 下午9:38写道: > > > > On Thu, Feb 4, 2021 at 10:07 AM Ruifeng Zhang > > wrote: > > > > > > Greg KH 于2021年1月29日周五 下午4:53写道: > > > > > > > > On Fri, Jan 29, 2021 at 04:27:26PM +0800, Ruifeng Zhang wrote: > > > > > From: Ruifeng Zhang > > > > > > > > > > Suspend type contains s2ram and s2idle, but syscore is only > > > > > available for S2RAM. > > > > > > > > Who else needs this? > > > In the s2idle suspend and resume, some vendors want to do some > > > things, for example the vendor implemented the watchdog driver. > > > > Do that in the platform operations then. > > > > Adding the syscore stuff to the suspend-to-idle flow is not an option, sorry. > Excause me, I really still want to know the reason. The conditions to run syscore operations are: with one CPU online and with disabled interrupts on that CPU. They are not satisfied in the suspend-to-idle flow. Moreover, none of the existing syscore operations need to be executed for suspend-to-idle except for the timekeeping suspend, but this is done for a special reason. > My requirement is that the watchdog need disable when the system s2idle. > If don't, the watchdog will bark when system resume. So disabled it from s2idle_ops->prepare() or suspend_ops->prepare_late() if device suspend is too early for you.