From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com. [2607:f8b0:4864:20::433]) by gmr-mx.google.com with ESMTPS id q18si712180pgv.5.2020.12.11.10.12.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 10:12:24 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id w6so7496066pfu.1 for ; Fri, 11 Dec 2020 10:12:24 -0800 (PST) MIME-Version: 1.0 References: <20201210192536.118432146@linutronix.de> <20201210194044.157283633@linutronix.de> In-Reply-To: <20201210194044.157283633@linutronix.de> From: Andy Shevchenko Date: Fri, 11 Dec 2020 20:12:07 +0200 Message-ID: Subject: Re: [patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc Content-Type: text/plain; charset="UTF-8" To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Marc Zyngier , Linus Walleij , Lee Jones , linux-arm Mailing List , "James E.J. Bottomley" , Helge Deller , afzal mohammed , linux-parisc@vger.kernel.org, Russell King , Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , linux-s390@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , intel-gfx , dri-devel , Tvrtko Ursulin , "open list:GPIO SUBSYSTEM" , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com, Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , linux-pci , Karthikeyan Mitran , Hou Zhiqiang , Tariq Toukan , "David S. Miller" , Jakub Kicinski , netdev , "open list:HFI1 DRIVER" , Saeed Mahameed , Leon Romanovsky , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , xen-devel@lists.xenproject.org List-ID: On Thu, Dec 10, 2020 at 9:57 PM Thomas Gleixner wrote: > > First of all drivers have absolutely no business to dig into the internals > of an irq descriptor. That's core code and subject to change. All of this > information is readily available to /proc/interrupts in a safe and race > free way. > > Remove the inspection code which is a blatant violation of subsystem > boundaries and racy against concurrent modifications of the interrupt > descriptor. > > Print the irq line instead so the information can be looked up in a sane > way in /proc/interrupts. ... > - seq_printf(s, "%3i: %6i %4i", > + seq_printf(s, "%3i: %6i %4i %4i\n", Seems different specifiers, I think the intention was something like seq_printf(s, "%3i: %4i %6i %4i\n", > line, > + line + irq_first, > num_interrupts[line], > num_wake_interrupts[line]); -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52CF3C433FE for ; Fri, 11 Dec 2020 18:12:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1208D23106 for ; Fri, 11 Dec 2020 18:12:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1208D23106 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E7A86E423; Fri, 11 Dec 2020 18:12:25 +0000 (UTC) Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D7796E423; Fri, 11 Dec 2020 18:12:24 +0000 (UTC) Received: by mail-pf1-x42b.google.com with SMTP id c12so7462067pfo.10; Fri, 11 Dec 2020 10:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q/1zdMH3DpxGtZ8QgtITmolgonObU/7AjOPUuWKrWNo=; b=Pm8buLXst2LcV9x4pk4vIxyybuwSbvL97o6tQP/6i0ZC0zOJ6xhhPvOmmJHnVFkhgw sQfgcxJImHA+DnVZbZxb64zhatDbthp68cZ4iRaEqM/K8XSe9UZnfE94uYtkDbOOpabu L1rj/JPmJET4DAk/lcrawpEkrx9i3ul2i6qGlaQuFoK2UkPf+SMWdOeOPPS8QAdKSG2Q g24KIZVw1nm3kfJCayecl50J7bltlRshvQcWiGMUSmazoa8KfAW/iwqyejRvRxGzsh3A q/OBzRHzggVvK36H+lQNs9ICk+Z16dfzwLBUVGvlOwEUqmBMnCQtHV8wDQuwIxn+Jo8v 0Yfw== 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=q/1zdMH3DpxGtZ8QgtITmolgonObU/7AjOPUuWKrWNo=; b=QunE3bD9NAcWsWXHmdDgkaczIo1HAEwO3DKSRpwq50Dz22w0zyzvRT+5oWJFLGDvD/ 3gYluqKMIOXwZWge8kMllBzbMa5EHfPJilFZcQURIYz7mCZ1KntLObu1ghncElLt7xg9 C1FSoddi6WV1bcYF90/wbQU9U4+V0GTkx9GQtb372s0eheDh7PElxa/R8P+UtvGAzNZo yDaZLAgtkk9YpTBeU3IDJOgQxWkWvttmL7HXv9Mc46gjJsiFthKwT/GRUn90cUVzlTvN 89XIlIZSKZrir1vJxtuEgx16FJgFByy7w2DFONVLvzIjskf2jpkO1AN1uZx4MMSnJ/Lr Z2UQ== X-Gm-Message-State: AOAM5323rbtw0cRyveGTodJK3polgF+718Z+T/vsJcAJLFTVwUxwAnvY AR9K00eXhCFFyoIj9iPORFn8kdHSw3LztQkum0w= X-Google-Smtp-Source: ABdhPJzPNFm8swDHOmLl35eT5h+YQB676NTtT2BWFgfALxfYZ8r2UnWa+iJwNQSLiKZOMQcPIak2nNSo7eC4Ue1vtXA= X-Received: by 2002:a63:4002:: with SMTP id n2mr13054398pga.4.1607710343875; Fri, 11 Dec 2020 10:12:23 -0800 (PST) MIME-Version: 1.0 References: <20201210192536.118432146@linutronix.de> <20201210194044.157283633@linutronix.de> In-Reply-To: <20201210194044.157283633@linutronix.de> From: Andy Shevchenko Date: Fri, 11 Dec 2020 20:12:07 +0200 Message-ID: Subject: Re: [patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc To: Thomas Gleixner X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Karthikeyan Mitran , Peter Zijlstra , Catalin Marinas , dri-devel , Chris Wilson , "James E.J. Bottomley" , netdev , afzal mohammed , Michal Simek , linux-s390@vger.kernel.org, Lorenzo Pieralisi , Dave Jiang , xen-devel@lists.xenproject.org, Leon Romanovsky , "open list:HFI1 DRIVER" , Marc Zyngier , Helge Deller , Russell King , Christian Borntraeger , linux-pci , Jakub Kicinski , intel-gfx , Wambui Karuga , Allen Hubbe , Juergen Gross , Will Deacon , Tvrtko Ursulin , Heiko Carstens , "open list:GPIO SUBSYSTEM" , Stefano Stabellini , Rodrigo Vivi , Bjorn Helgaas , Lee Jones , linux-arm Mailing List , Boris Ostrovsky , David Airlie , linux-parisc@vger.kernel.org, Pankaj Bharadiya , Hou Zhiqiang , LKML , Tariq Toukan , Jon Mason , linux-ntb@googlegroups.com, Saeed Mahameed , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Dec 10, 2020 at 9:57 PM Thomas Gleixner wrote: > > First of all drivers have absolutely no business to dig into the internals > of an irq descriptor. That's core code and subject to change. All of this > information is readily available to /proc/interrupts in a safe and race > free way. > > Remove the inspection code which is a blatant violation of subsystem > boundaries and racy against concurrent modifications of the interrupt > descriptor. > > Print the irq line instead so the information can be looked up in a sane > way in /proc/interrupts. ... > - seq_printf(s, "%3i: %6i %4i", > + seq_printf(s, "%3i: %6i %4i %4i\n", Seems different specifiers, I think the intention was something like seq_printf(s, "%3i: %4i %6i %4i\n", > line, > + line + irq_first, > num_interrupts[line], > num_wake_interrupts[line]); -- With Best Regards, Andy Shevchenko _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34A72C4167B for ; Fri, 11 Dec 2020 18:12:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB9A323106 for ; Fri, 11 Dec 2020 18:12:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB9A323106 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB5036E40C; Fri, 11 Dec 2020 18:12:25 +0000 (UTC) Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D7796E423; Fri, 11 Dec 2020 18:12:24 +0000 (UTC) Received: by mail-pf1-x42b.google.com with SMTP id c12so7462067pfo.10; Fri, 11 Dec 2020 10:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q/1zdMH3DpxGtZ8QgtITmolgonObU/7AjOPUuWKrWNo=; b=Pm8buLXst2LcV9x4pk4vIxyybuwSbvL97o6tQP/6i0ZC0zOJ6xhhPvOmmJHnVFkhgw sQfgcxJImHA+DnVZbZxb64zhatDbthp68cZ4iRaEqM/K8XSe9UZnfE94uYtkDbOOpabu L1rj/JPmJET4DAk/lcrawpEkrx9i3ul2i6qGlaQuFoK2UkPf+SMWdOeOPPS8QAdKSG2Q g24KIZVw1nm3kfJCayecl50J7bltlRshvQcWiGMUSmazoa8KfAW/iwqyejRvRxGzsh3A q/OBzRHzggVvK36H+lQNs9ICk+Z16dfzwLBUVGvlOwEUqmBMnCQtHV8wDQuwIxn+Jo8v 0Yfw== 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=q/1zdMH3DpxGtZ8QgtITmolgonObU/7AjOPUuWKrWNo=; b=QunE3bD9NAcWsWXHmdDgkaczIo1HAEwO3DKSRpwq50Dz22w0zyzvRT+5oWJFLGDvD/ 3gYluqKMIOXwZWge8kMllBzbMa5EHfPJilFZcQURIYz7mCZ1KntLObu1ghncElLt7xg9 C1FSoddi6WV1bcYF90/wbQU9U4+V0GTkx9GQtb372s0eheDh7PElxa/R8P+UtvGAzNZo yDaZLAgtkk9YpTBeU3IDJOgQxWkWvttmL7HXv9Mc46gjJsiFthKwT/GRUn90cUVzlTvN 89XIlIZSKZrir1vJxtuEgx16FJgFByy7w2DFONVLvzIjskf2jpkO1AN1uZx4MMSnJ/Lr Z2UQ== X-Gm-Message-State: AOAM5323rbtw0cRyveGTodJK3polgF+718Z+T/vsJcAJLFTVwUxwAnvY AR9K00eXhCFFyoIj9iPORFn8kdHSw3LztQkum0w= X-Google-Smtp-Source: ABdhPJzPNFm8swDHOmLl35eT5h+YQB676NTtT2BWFgfALxfYZ8r2UnWa+iJwNQSLiKZOMQcPIak2nNSo7eC4Ue1vtXA= X-Received: by 2002:a63:4002:: with SMTP id n2mr13054398pga.4.1607710343875; Fri, 11 Dec 2020 10:12:23 -0800 (PST) MIME-Version: 1.0 References: <20201210192536.118432146@linutronix.de> <20201210194044.157283633@linutronix.de> In-Reply-To: <20201210194044.157283633@linutronix.de> From: Andy Shevchenko Date: Fri, 11 Dec 2020 20:12:07 +0200 Message-ID: To: Thomas Gleixner Subject: Re: [Intel-gfx] [patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Karthikeyan Mitran , Peter Zijlstra , Catalin Marinas , Linus Walleij , dri-devel , Chris Wilson , "James E.J. Bottomley" , netdev , afzal mohammed , Michal Simek , Rob Herring , linux-s390@vger.kernel.org, Lorenzo Pieralisi , Dave Jiang , xen-devel@lists.xenproject.org, Leon Romanovsky , "open list:HFI1 DRIVER" , Marc Zyngier , Helge Deller , Russell King , Christian Borntraeger , linux-pci , Jakub Kicinski , intel-gfx , Wambui Karuga , Allen Hubbe , Juergen Gross , Will Deacon , Heiko Carstens , "open list:GPIO SUBSYSTEM" , Stefano Stabellini , Bjorn Helgaas , Lee Jones , linux-arm Mailing List , Boris Ostrovsky , David Airlie , linux-parisc@vger.kernel.org, Hou Zhiqiang , LKML , Tariq Toukan , Jon Mason , linux-ntb@googlegroups.com, Saeed Mahameed , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Dec 10, 2020 at 9:57 PM Thomas Gleixner wrote: > > First of all drivers have absolutely no business to dig into the internals > of an irq descriptor. That's core code and subject to change. All of this > information is readily available to /proc/interrupts in a safe and race > free way. > > Remove the inspection code which is a blatant violation of subsystem > boundaries and racy against concurrent modifications of the interrupt > descriptor. > > Print the irq line instead so the information can be looked up in a sane > way in /proc/interrupts. ... > - seq_printf(s, "%3i: %6i %4i", > + seq_printf(s, "%3i: %6i %4i %4i\n", Seems different specifiers, I think the intention was something like seq_printf(s, "%3i: %4i %6i %4i\n", > line, > + line + irq_first, > num_interrupts[line], > num_wake_interrupts[line]); -- With Best Regards, Andy Shevchenko _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com. [2607:f8b0:4864:20::433]) by gmr-mx.google.com with ESMTPS id q18si712180pgv.5.2020.12.11.10.12.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 10:12:24 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id w6so7496066pfu.1 for ; Fri, 11 Dec 2020 10:12:24 -0800 (PST) MIME-Version: 1.0 References: <20201210192536.118432146@linutronix.de> <20201210194044.157283633@linutronix.de> In-Reply-To: <20201210194044.157283633@linutronix.de> From: Andy Shevchenko Date: Fri, 11 Dec 2020 20:12:07 +0200 Message-ID: Subject: Re: [patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc Content-Type: text/plain; charset="UTF-8" To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Marc Zyngier , Linus Walleij , Lee Jones , linux-arm Mailing List , "James E.J. Bottomley" , Helge Deller , afzal mohammed , linux-parisc@vger.kernel.org, Russell King , Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , linux-s390@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , intel-gfx , dri-devel , Tvrtko Ursulin , "open list:GPIO SUBSYSTEM" , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com, Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , linux-pci , Karthikeyan Mitran , Hou Zhiqiang , Tariq Toukan , "David S. Miller" , Jakub Kicinski , netdev , "open list:HFI1 DRIVER" , Saeed Mahameed , Leon Romanovsky , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , xen-devel@lists.xenproject.org List-ID: On Thu, Dec 10, 2020 at 9:57 PM Thomas Gleixner wrote: > > First of all drivers have absolutely no business to dig into the internals > of an irq descriptor. That's core code and subject to change. All of this > information is readily available to /proc/interrupts in a safe and race > free way. > > Remove the inspection code which is a blatant violation of subsystem > boundaries and racy against concurrent modifications of the interrupt > descriptor. > > Print the irq line instead so the information can be looked up in a sane > way in /proc/interrupts. ... > - seq_printf(s, "%3i: %6i %4i", > + seq_printf(s, "%3i: %6i %4i %4i\n", Seems different specifiers, I think the intention was something like seq_printf(s, "%3i: %4i %6i %4i\n", > line, > + line + irq_first, > num_interrupts[line], > num_wake_interrupts[line]); -- With Best Regards, Andy Shevchenko