Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3686256ybd; Tue, 25 Jun 2019 06:51:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5YVYGzul5Ht3K9jHO/T4PHp28EXJT6VwwuFIYlcuV4J/0/P/3G36v0xnEEyvC6mdNGCME X-Received: by 2002:a17:90a:dd45:: with SMTP id u5mr31236343pjv.109.1561470684449; Tue, 25 Jun 2019 06:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561470684; cv=none; d=google.com; s=arc-20160816; b=GE1RRlapCu9aEJVs9URALVkP2ddnxzeW40yCYAIKB4u/HOIza55QfsJNhjyIwKWNsP B4Ax1SS1mJW2scEiGz1c1RSA/f7jcvDgJBEnV4BobpEMntQ7/kf7ZARoQwf314d+78lO BJ1Px0jC+EawWKpInmkvMRtw3ZIk4n1pgCBHtFDWXp8Xk2af+JmrUjrDYIyDg53MVrBF c4TPpS++qzigQt1MRSa2nCTi99YMRBkBlAFQm46qBnkM76JyqZqUhIj5isR6vLFIaC1b qOcLORHXL8tnAabaqKEA5Lw6uZ31CofFQPVaFldT/ybmV7DkCtbKCmV2RuCZ1nBVjaGX KC1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NFgue3oKymAnPLqWEpKiFYxZqxdbMA1mAsgv3rYLpoE=; b=xl4u45fyiZ12N8alOujRBIGR6P3hs20T8HKbxJBp/GHXaUFqNwphJ/4kRGgl3pA8bt hf9z5X4R1AM0lAhr/r1eDdZD+7DcN5LoM+MK4zegvEyid0n8CkGSlFN7ItEHhIFURR0t rh7teHhSM53Oi9/CAGr+B+GXH9RjGHUKuCF6XJtO1ksgbGiz5FQWEJCl2fLijW6dwKwY +btqww7fhq/Fp+b+Sy3RSTqIXamrwvCKKp6BGIJ1Xq3EmvVXo5atsT+VJals5c+oGkVe kSBXJDOf4FUWIPFqDsiaF97drg7LGLpfzLgAv+oD9CcxbqhGIjzPBgAwrn6f3cV/eaE6 w/Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PdLfNuRX; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si2777977pjw.102.2019.06.25.06.51.08; Tue, 25 Jun 2019 06:51:24 -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=@linaro.org header.s=google header.b=PdLfNuRX; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726892AbfFYNvE (ORCPT + 99 others); Tue, 25 Jun 2019 09:51:04 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:33520 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726486AbfFYNvE (ORCPT ); Tue, 25 Jun 2019 09:51:04 -0400 Received: by mail-lf1-f66.google.com with SMTP id y17so12714443lfe.0 for ; Tue, 25 Jun 2019 06:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NFgue3oKymAnPLqWEpKiFYxZqxdbMA1mAsgv3rYLpoE=; b=PdLfNuRX8o0MT8u/xnGoKn1MWuT+NeXfGGOEg8LQPuO8qtlaH+6/U/Se7HOmQPGW/t nhuOnnNj/Ur1cPp9pkrCWbCm946AeCXnyEcwO8F6uGppaYNGrImtYwVg4eqyZuYx4nw4 VzpiyXCGGe1cmSCebquOcabusXBnFKLKt/BvnEHk5Iq9Ksp049DCVXNqpV90gE4KpAF6 jIdbmoHFwr2O+yKyF5xOQ6KSyCo6vEP2VXoqEQKBLLqYGiyMWASrpQRYV9T68FD2svRX SLceTYFCOde44PwxP8DvJvoE815KPjsYOzE1qmOXi23IUTqltqJQloZd9osx4M9Eh944 IQWw== 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; bh=NFgue3oKymAnPLqWEpKiFYxZqxdbMA1mAsgv3rYLpoE=; b=BK87E4ugL5354K5n0q0U95Rgo6B51kI/gHkzDIs6BAcv46pABe92wIvTvUBU3NpfiI O4Vj4L4MsywJKla9p/p37Ae9DemiKa/qJTv2tXpCFLDvRZrfS5cikrDCIUnnvOO1AHpq W9kEZnlessn1viHrYtaRYFNAgAzneacJ59o1jM4RH+fMAyMZbw9HgCyGASPXBk3NjiOZ U5vCkEaT+xlv6l7oRJ18tjes6pQTyKPQuFipSkJfKEMX3Hxyh3C489gicOES18ALaVmM N/GB8z9cp8nTdih8eigLc2XIO+MrJOPN+p+4BYbV9zRsMrfyzZcd5+tl5almJz1o9/0P KG5A== X-Gm-Message-State: APjAAAUkRmodTOKUkmxJi2NX116vqMOJRyaLa+UzuhTpnl14GWVC9kGR 8w01X1Q6QV2YOQ4zP1kpZQ4xAzTJ9GVNgZzHejz5lQ== X-Received: by 2002:ac2:50c4:: with SMTP id h4mr25254433lfm.61.1561470662286; Tue, 25 Jun 2019 06:51:02 -0700 (PDT) MIME-Version: 1.0 References: <20190429035515.73611-1-drinkcat@chromium.org> <20190429035515.73611-2-drinkcat@chromium.org> In-Reply-To: <20190429035515.73611-2-drinkcat@chromium.org> From: Linus Walleij Date: Tue, 25 Jun 2019 15:50:50 +0200 Message-ID: Subject: Re: [PATCH 1/2] pinctrl: mediatek: Ignore interrupts that are wake only during resume To: Nicolas Boichat Cc: "moderated list:ARM/Mediatek SoC support" , Sean Wang , Matthias Brugger , "open list:GPIO SUBSYSTEM" , Linux ARM , "linux-kernel@vger.kernel.org" , Chuanjia Liu , Evan Green , Stephen Boyd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 29, 2019 at 5:55 AM Nicolas Boichat wrote: > Before suspending, mtk-eint would set the interrupt mask to the > one in wake_mask. However, some of these interrupts may not have a > corresponding interrupt handler, or the interrupt may be disabled. > > On resume, the eint irq handler would trigger nevertheless, > and irq/pm.c:irq_pm_check_wakeup would be called, which would > try to call irq_disable. However, if the interrupt is not enabled > (irqd_irq_disabled(&desc->irq_data) is true), the call does nothing, > and the interrupt is left enabled in the eint driver. > > Especially for level-sensitive interrupts, this will lead to an > interrupt storm on resume. > > If we detect that an interrupt is only in wake_mask, but not in > cur_mask, we can just mask it out immediately (as mtk_eint_resume > would do anyway at a later stage in the resume sequence, when > restoring cur_mask). > > Fixes: bf22ff45bed ("genirq: Avoid unnecessary low level irq function calls") > Signed-off-by: Nicolas Boichat Patch applied for fixes. Hm a late ACK made me miss this, sorry. Yours, Linus Walleij