Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp36317imc; Fri, 15 Mar 2019 14:19:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV7M6LSIBIxDUIBeQM3DSgaSEYHGoCijav3Rn3utlFaUpYfiOo6bUFp6ja/W7VklO0HH8m X-Received: by 2002:a17:902:28ea:: with SMTP id f97mr6396745plb.203.1552684794331; Fri, 15 Mar 2019 14:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552684794; cv=none; d=google.com; s=arc-20160816; b=toWgwfXXs6OPO9LIS55t77QNF1gMo8BCM2UT6AagNQoL7oW4fXx4UTCG50zIPwYist oTLeLHkYbgLP+V+Ddh4RAOBsSJEfPIMwnkObUi083xNSCFRKqVnaw5dKYxZL8T+k6vRv G96u8Q0pd/SA4eDKa7ngnktDG0E9mXnFmzT2StvwB8ynkJ0zdnm1NRa0lKXyXWIW05/A JtEuT3vaO/nBuAkovCB91052KPsvCWemCGII6KXeJWo6NN5Zw6J3PO1WSfVYZdalu8JC 3UKQlH7yp4na8gDIFf/aIgONgD+xIqxDTfa6QaXfWfkqx65siXJA4ARMQcIoomO3Fj+M olKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qhaACbu283jkmNCTeYJ352N38Gmocor9TOUev/P1Zxo=; b=SYq1XSC/jv7bxbta9GWfpqol9v4wY0gZlMsKiYX7OVA2iB4zlAjlGMfnvWW0gxDu3U iDSoxVqk4hctGcvByEPp1lyOBIq+LKJCKvEW+yBsw75J2wkC6W3R0qy82bk2JvkxCBu9 T8MCdXcV+ds6aUDMU4M1osKeZfH1rbl1ZVjCmt5Jno0QgDq64iNhbus7bdmdhOwLmq/f nPP3DQPvjp8ytxFiXRINHH2QSLaxJ94/BQDkZa2hJtu04SFupGzr3489V48fVfqB1AoO jZ81AXO5fptG9oWym3YZdxwBVaMXR9uBz6/9+k+P9PSTGa1gGUTTQcWdpgTD34vCmQCh SV6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=J4O1Tlmq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20si2682621pgf.324.2019.03.15.14.19.38; Fri, 15 Mar 2019 14:19:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@google.com header.s=20161025 header.b=J4O1Tlmq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726404AbfCOVSz (ORCPT + 99 others); Fri, 15 Mar 2019 17:18:55 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44665 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbfCOVSy (ORCPT ); Fri, 15 Mar 2019 17:18:54 -0400 Received: by mail-pf1-f195.google.com with SMTP id a3so7169070pff.11 for ; Fri, 15 Mar 2019 14:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qhaACbu283jkmNCTeYJ352N38Gmocor9TOUev/P1Zxo=; b=J4O1Tlmq/BXgbPVMHDNJJMAYHav4mH5MGqH8IaBrbeqzUMPqk3Bg1BV4D//AJicu4b 03+ySXf8AvPo4jl+noQGo7/+snZeHY40XwEiV5+nHZBSlcWrGywfelTjw/0XkDnj9ev9 Z1dbuS23AOzM135myhVZRe0B/Moh83NQvEXuGRa1wB/oNMKQvwIM1WXxPSxomn9+Ctd/ 3uyGGUsIkc+ZUVwtNwBhSCOAchc2MrrUtlV+uAzy2weVQe64FL6G+71CR2xOaPNiAkvV Bj/3lPDOHvMsw4MlFZ+VcLpxiMRasyH/qnwDt32SSur7+P7RDHL2+mQ1erDgUGIVdh66 2sbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qhaACbu283jkmNCTeYJ352N38Gmocor9TOUev/P1Zxo=; b=SmJqRFap9ui3r+6AjaHwI+Q3M8bg2dwCe1BomTgUSp3qPyYwSWrRdpHH6aOE2YieFk czd5IC3Apz3rBrbbeyDaWnZagPkNdmjMk/hsYdHw3WmJEzLK6GHDJF4V+jXoE8sBXO/Z f0H6jPROnASwsaRpgLB3E0nzzQGhljtG+ATPcN3wTtm6LijUzq1boXwUwUswKNReM9h5 s41Ws8OLPhylo0TtT0qGiUxiT0KKZhrvSBMgDmdFTqAO2NN2Y2oqCr7UuQdVkLtmpWRi P0gvvQdRhTANPM5gyiZ9vZlEOreTub45eHpvipRyOl3rGP9uHpvPi9VUj76LJZpDrV39 ps+g== X-Gm-Message-State: APjAAAVTUer2D2vUOPu/eJrKJOrZR7Z++xU387ExQlPtZCpt6RZXAh9K lqSMqt6rmVIBHQkPBFqu+hx/CA== X-Received: by 2002:a17:902:9b98:: with SMTP id y24mr6383746plp.167.1552684732828; Fri, 15 Mar 2019 14:18:52 -0700 (PDT) Received: from google.com ([2620:15c:202:1:c562:226a:6d78:2ae4]) by smtp.gmail.com with ESMTPSA id m20sm9590418pfj.142.2019.03.15.14.18.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Mar 2019 14:18:50 -0700 (PDT) Date: Fri, 15 Mar 2019 14:18:45 -0700 From: Benson Leung To: Stephen Boyd Cc: Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, Enric Balletbo i Serra , Evan Green , Benson Leung , Guenter Roeck , bleung@google.com Subject: Re: [PATCH] rtc: cros-ec: Fail suspend/resume if wake IRQ can't be configured Message-ID: <20190315211845.GA165708@google.com> References: <20190315185112.97699-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <20190315185112.97699-1-swboyd@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Stephen, On Fri, Mar 15, 2019 at 11:51:12AM -0700, Stephen Boyd wrote: > If we encounter a failure during suspend where this RTC was programmed > to wakeup the system from suspend, but that wakeup couldn't be > configured because the system didn't support wakeup interrupts, we'll > run into the following warning: >=20 > Unbalanced IRQ 166 wake disable > WARNING: CPU: 7 PID: 3071 at kernel/irq/manage.c:669 irq_set_irq_wake+0x= 108/0x278 >=20 > This happens because the suspend process isn't aborted when the RTC > fails to configure the wakeup IRQ. Instead, we continue suspending the > system and then another suspend callback fails the suspend process and > "unwinds" the previously suspended drivers by calling their resume > callbacks. When we get back to resuming this RTC driver, we'll call > disable_irq_wake() on an IRQ that hasn't been configured for wake. >=20 > Let's just fail suspend/resume here if we can't configure the system to > wake and the user has chosen to wakeup with this device. This fixes this > warning and makes the code more robust in case there are systems out > there that can't wakeup from suspend on this line but the user has > chosen to do so. >=20 > Cc: Enric Balletbo i Serra > Cc: Evan Green > Cc: Benson Leung > Cc: Guenter Roeck > Signed-off-by: Stephen Boyd Acked-By: Benson Leung --=20 Benson Leung Staff Software Engineer Chrome OS Kernel Google Inc. bleung@google.com Chromium OS Project bleung@chromium.org --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6gYDF28Li+nEiKLaHwn1ewov5lgFAlyMFrMACgkQHwn1ewov 5liCbQ//csr76yg/XYgehOEgHVm4eOYVsF7AYJ2B/pdlWtCl+vXh95VOX5AeaUlt L67dOSZ6HBE3Z/4dh5qQcec4+l7SMsqR0GhW4kv/aaPB7oJuCWpIz9MGa3tjhMec NgnwzdXoV4Rrbq5I9Bd4uX9MNGw2DC15BhFTureDEd/TNpAPHB3a3T48mNdMqMcS xldgkcCvesf/o87bl33NotOu4QGhK4T0EdKVKOrX+oYlA1DkF+TpEx43LvRnuIhM hOuLNW8ocJQycJJVq8TQHvl7BmMGAPyTs3b5vg17MI7Uq+27Q9w6vK/wDWmfjC7L PPBlYQw+lAEW96wMCtG3eqahEEx0ULVlnNuwgxIhXCfiYSFLdawPrYGfaeDl7wl8 DXXjOwGCZqF0WRsp/aOf81kXrclpunAuQlePTnq1Nv6jq2i2fXw4yPi9895eoJaF qUjHlxEX9nyxeaR7n/8uWhJBDTxrKZZKdL4sXJqIOvJbk/cJe1xcRoi41zxwlUhk qA3RYdF5o2+KM7YmB+Y1X0l4H5epSrkA/DJKHueDhuehIW6IWrP7mUv44hN2Lkff bzW8JmzQy8ilitQs91oJ7J9i8HnoVmKnUdZj8/LHM+EqRQg/pCJJuOdRK1LorLhL NzbtXLZLzoHy2Rsz8YMTj2NUDVNju8UFanPiR5uvr4M7VXZroLg= =dNaK -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu--