Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp863265imw; Fri, 8 Jul 2022 13:13:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sgcra3/+CXjWcUCejSFLelktGdwpevSS/1i1YGtao2Q4m8cGcF5Hj0WsM3KnPhbN8ENnbm X-Received: by 2002:a17:907:2c44:b0:72a:f118:e6af with SMTP id hf4-20020a1709072c4400b0072af118e6afmr5359414ejc.294.1657311218973; Fri, 08 Jul 2022 13:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657311218; cv=none; d=google.com; s=arc-20160816; b=nULptqA0waQk73ynkOZ04ylTGryLPDen6Tfyvl7DGlTdU7A95HjSQjRMiM7ZLkiByU 8neqYuEjtYH6TXH0d+2u029YPKbIRneDYnF3PtPW0yoHJH51tKtlJVVnVAsNJwI7VUQx JN87X3HxEUt58SmI1GJpX2DO8Rrjro0IsuHvNvcvz6I2We49vwbrKau3uXO2U6tbmF/c 9+nKsD8IM9fKIKBPn8Foow9YILC/OIHnNbqSC/roFpXKZX3ywj7ghGlIx3YY5g3ye3J9 14ivWyIn9BTkyyBZBILymbcgQUzFhI+0Mh5kynS/ubDn/x4dZuj9KkmlowciSmGI6wle 98hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=1tWvLnk25eVFmRuWXyIo+J+soKWBo63spsgNtK5YUIQ=; b=D17cvY9a8muUlkYufFIk9+RyPl1OH4mows7LThCx71q7ceKn1tARkJ3Dq7ovbdHIf6 h+kzCXzmZOfnfQYYk3U3rcWVSsTaSRyXs8x8BbF1c4UioMbCfvgva3elaDm3H2ite8Rh 0tYYGaIz+TP8yLoTV6dgmqxLaHpabKwPMg0GdbKuqb5OJiSVgsuyWTTEDTQFODVUOUed UD7DcXcYnLw1Fxa4XHFJrJ/HLJzQ8n8EvT4cHey6TsMnbg+hkcTScmUccZUz27kJHKQz YcLse39lhonENE5A+/uNkshJJKDRm5BaPWdFBo/jMX4n5iudyBiKOyV0uX4tEEXuoAXU 4o6g== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e33-20020a056402332100b0043a256a05c5si24221657eda.548.2022.07.08.13.13.08; Fri, 08 Jul 2022 13:13:38 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239923AbiGHThw (ORCPT + 99 others); Fri, 8 Jul 2022 15:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239515AbiGHThu (ORCPT ); Fri, 8 Jul 2022 15:37:50 -0400 Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C5BF6B247; Fri, 8 Jul 2022 12:37:50 -0700 (PDT) Received: by mail-yb1-f179.google.com with SMTP id n74so9770917yba.3; Fri, 08 Jul 2022 12:37:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1tWvLnk25eVFmRuWXyIo+J+soKWBo63spsgNtK5YUIQ=; b=YEIuMvqrCWh9avfsBKVkeH2FW/O+6w97DxyT3T2h6qjSu06Gj/u8bYU6LvnQFZgqEf xZ9xPh/nKRlnJdYlep0x0RLmKBmnv0iwV/ifXDoGmdIJOnBVpuzXshRVA5NyrWbqPzuB UZ9KY3c92yr4rbBJPNehlD51Je5+hK/OzlN90kyIomwWTbMUPutwFyhhTTMgxlMPs6Se 5r2Tmm9iSIx3Y8Xk4WyGsHim4gWql8LMMBuPY42XtWxWnN/O5rvLysnC5xoqFTE5RcXU ataJgWHidWh1yj/DQpcM0MtAGVdylJ3tFcWvLT6mO1HOBg6IGYbmXiHhYWvDq5mi57w5 kRZg== X-Gm-Message-State: AJIora9c06N3Vr9gZBf6S1Qmkyh+eLBevWcgwDhJ+wUZc/ophDFW9a9M LksCBJ+UQrJZmiv1Nna5vAUq4CGJ4GZd0IvQ0vcQM7dJza8= X-Received: by 2002:a05:6902:1108:b0:66e:a9b1:3e48 with SMTP id o8-20020a056902110800b0066ea9b13e48mr5593293ybu.153.1657309069484; Fri, 08 Jul 2022 12:37:49 -0700 (PDT) MIME-Version: 1.0 References: <20220608153120.303070-1-ulf.hansson@linaro.org> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 8 Jul 2022 21:37:38 +0200 Message-ID: Subject: Re: [PATCH] PM: runtime: Extend support for wakeirq for force_suspend|resume To: Tony Lindgren , Ulf Hansson Cc: "Rafael J . Wysocki" , Linux PM , "Rafael J . Wysocki" , Chunfeng Yun , Axe Yang , Chaotian Jing , Geert Uytterhoeven , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Tue, Jun 14, 2022 at 1:16 PM Tony Lindgren wrote: > > * Ulf Hansson [220608 15:26]: > > A driver that makes use of pm_runtime_force_suspend|resume() to support > > system suspend/resume, currently needs to manage the wakeirq support > > itself. To avoid the boilerplate code in the driver's system suspend/resume > > callbacks in particular, let's extend pm_runtime_force_suspend|resume() to > > deal with the wakeirq. > > Looks good to me: > > Reviewed-by: Tony Lindgren Applied (as 5.20 material), but there is still a quite fundamental problem with pm_runtime_force_suspend|resume() which is using RPM_GET_CALLBACK() in these functions, because that macro returns a middle-layer PM-runtime callback, so any bus type or PM domain implementing meaningful generic power management ends up calling its own PM-runtime callback from its system-wide PM callback which is super-confusing at best. Another problem with them is that they are generally not suitable for devices that can wake up the system from sleep.