Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1780604pxu; Sun, 6 Dec 2020 07:05:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXYKLFJbKfNm7ZSDN30EF/mvepQxvPPJPHumuE2K5Ye+UpwsBEnJPDBmYTraw1ShkukH+2 X-Received: by 2002:a17:906:13da:: with SMTP id g26mr964729ejc.285.1607267134644; Sun, 06 Dec 2020 07:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607267134; cv=none; d=google.com; s=arc-20160816; b=PKLP9Yk1pGV9iG8eH+hImPbNpToxt9T11yZnJn6vHBQo8pYSh9Br+zK+wWYzt+fuZH uVR7aY0D/IA7b4uRqkvvM/NTXSPn2eZMxWfBR0OyY/8TARIdYDdFtjAmxKtUytFbr9rd 7B4GSlxboyGas6HqgBOrzGoKwTGO2QiC5upkdhnITw+ttaEQDFUwkpoO4VRuXr82t/f7 STXzN8YGelNXZFv9f7+uHfxoN9GpVkNOm3TG3vW+wpNKymwkdPz4qpQR+mYsxVvm9Rwv R4XDxpbbLar8f6vKx3TbgAR7O0TjhiN1822i1R6aVFStAHN4nUzz8k1DLEuC2DLrlaBb Ufog== 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:dkim-signature; bh=7GSF7/q8MnFUXWw+PCnNRKUNyaVuIobqjrVeLl4q8oM=; b=AHHs2Yl4rp0kvcG/VMROr1ljDr7xYar3ohRnWpcUFUt/RRJZgBXnGKjxL7qpoY9ZGt AOeO8qgzZuoFIJgqkdtR5zSda023M0nWvhLglKxCavvpbcKX9dvH0U+yb+GSGFg20/7W M++eKP5OwSLzeT/N1UVZJ0TJiC+7Bdu0ExETMDg7mUj9eego5d2emd5Z1agyY4FQRMbE lZfTUhtJQwmgr54dLDZ/1XsHD2WhPArjUGh3xYSXfBJlftrkwg0Tx2Dzx3AJaamhx7Gz 2gPkyOG9OnouELN36DvlieCOpXPZW8kIkgWc/CwrIYzruLJq7ynt0JRt6RABZl7RmxkG hTdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kOCuOXb6; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si4893669ejc.310.2020.12.06.07.05.09; Sun, 06 Dec 2020 07:05:34 -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; dkim=pass header.i=@linaro.org header.s=google header.b=kOCuOXb6; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726209AbgLFPDY (ORCPT + 99 others); Sun, 6 Dec 2020 10:03:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbgLFPDX (ORCPT ); Sun, 6 Dec 2020 10:03:23 -0500 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62255C0613D1 for ; Sun, 6 Dec 2020 07:02:43 -0800 (PST) Received: by mail-lf1-x141.google.com with SMTP id 23so1332294lfg.10 for ; Sun, 06 Dec 2020 07:02:43 -0800 (PST) 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=7GSF7/q8MnFUXWw+PCnNRKUNyaVuIobqjrVeLl4q8oM=; b=kOCuOXb6USjnRhIr8MASK53UanhDGAkTbTLq+CMMz9gJEM8JM9hA0ztutFWH+lj2A0 E6N+5OvSsKYRqaHiZ2E7LhWLorYl3f0VgYsS2wIM1WP8YjNxOHtNiV629gR/Y5L+syWm QnhTHsPmYHsEeuEZkzOf5Yf1ru8aE7EG4XvI8txPrwFJai3W47QdEIspB0Qob/UX76zP lcyhRaIRYT7MYFjxFy9FmUkBJssgaG/wRKcn75pN90/JHyZtA0MRqoE2+gcSKzzbZa3l ZP14VTynl2nyYdugXgVwtsRwfsGdn7J6ivYbwPPSOTOCOVmL3OK81ED+wHhF4+MoeYXZ Hyzw== 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=7GSF7/q8MnFUXWw+PCnNRKUNyaVuIobqjrVeLl4q8oM=; b=qeXFigfeVAvpUjzm8udWghBToAa0QhJSn5LTQnz3xthGsgpkwBpuzsJFgaCG/H4QqA oa6P9yDIn5Htb5+3BKKFEO1n7UF2EYTef3y0XuCEU+rvO7Tc6dQoqGFL6JPpOq8Jdw46 nANQWlZgUpDc4HjxptLJLsx0N9Ybhj6FnZQJLkab0Wsm1FyS5+RXCA2SDuGt8dnvtwN7 xZCJ0gZmxR9AuRPTPisjKkxye9p+NXTZh1V2TcN3tPjxOkM6LpMuCEPScM1eKcpLIH7+ 5D+9BhhCI4KyrahlWcyqMXB1bCzgdW90qg/8D8X68PZcZkqcqh+T2cSroBK48Hx3dgDq +GRw== X-Gm-Message-State: AOAM533LvuT6y0sdmNlf5KITSDzpNErgIS9g6kxkdG9B3/AJMTxyagQT BPP5+8OUVmeuvutXxvsQmoTmWUVI67j/YBuBw4QKIg== X-Received: by 2002:a19:ad41:: with SMTP id s1mr6982448lfd.571.1607266961278; Sun, 06 Dec 2020 07:02:41 -0800 (PST) MIME-Version: 1.0 References: <1606728979-44259-1-git-send-email-luojiaxing@huawei.com> <20201130112250.GK4077@smile.fi.intel.com> <63f7dcc4-a924-515a-2fea-31ec80f3353e@huawei.com> <20201205221522.ifjravnir5bzmjff@mobilestation> In-Reply-To: <20201205221522.ifjravnir5bzmjff@mobilestation> From: Linus Walleij Date: Sun, 6 Dec 2020 16:02:30 +0100 Message-ID: Subject: Re: [PATCH v1] gpio: dwapb: mask/unmask IRQ when disable/enable it To: Serge Semin Cc: luojiaxing , Thomas Gleixner , Jason Cooper , Marc Zyngier , Andy Shevchenko , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Linuxarm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 5, 2020 at 11:15 PM Serge Semin wrote: > Hmm, that sounds like a problem, but the explanation is a bit unclear > to me. AFAICS you are saying that the only callbacks which are > called during the IRQ request/release are the irq_enable(), right? If > so then the only reason why we haven't got a problem reported due to > that so far is that the IRQs actually unmasked by default. What we usually do in cases like that (and I have discussed this with tglx in the past I think) is to simply mask off all IRQs in probe(). Then they will be unmasked when requested by drivers. See e.g. gpio-pl061 that has this line in probe(): writeb(0, pl061->base + GPIOIE); /* disable irqs */ Yours, Linus Walleij