[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
- Date: Fri, 11 Dec 2020 20:12:07 +0200
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, linux-arm Mailing List <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, afzal mohammed <afzal.mohd.ma@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@xxxxxxxxx>, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>, Wambui Karuga <wambui.karugax@xxxxxxxxx>, intel-gfx <intel-gfx@xxxxxxxxxxxxxxxxxxxxx>, dri-devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>, "open list:GPIO SUBSYSTEM" <linux-gpio@xxxxxxxxxxxxxxx>, Jon Mason <jdmason@xxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Allen Hubbe <allenbh@xxxxxxxxx>, linux-ntb@xxxxxxxxxxxxxxxx, Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Michal Simek <michal.simek@xxxxxxxxxx>, linux-pci <linux-pci@xxxxxxxxxxxxxxx>, Karthikeyan Mitran <m.karthikeyan@xxxxxxxxxxxxxx>, Hou Zhiqiang <Zhiqiang.Hou@xxxxxxx>, Tariq Toukan <tariqt@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, netdev <netdev@xxxxxxxxxxxxxxx>, "open list:HFI1 DRIVER" <linux-rdma@xxxxxxxxxxxxxxx>, Saeed Mahameed <saeedm@xxxxxxxxxx>, Leon Romanovsky <leon@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 11 Dec 2020 18:12:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Dec 10, 2020 at 9:57 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> 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
|