All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	"Nadav\ Haklai" <nadavh@marvell.com>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Antoine Tenart <antoine.tenart@bootlin.com>,
	Stefan Chulski <stefanc@marvell.com>, <stable@vger.kernel.org>
Subject: Re: [PATCH] platform-msi: Free descriptors in platform_msi_domain_free()
Date: Thu, 11 Oct 2018 11:17:23 +0200	[thread overview]
Message-ID: <20181011111723.32008d97@xps13> (raw)
In-Reply-To: <86k1moubgr.wl-marc.zyngier@arm.com>

Hi Marc,

Marc Zyngier <marc.zyngier@arm.com> wrote on Thu, 11 Oct 2018 09:36:04
+0100:

> Miquel,
> 
> On Fri, 28 Sep 2018 16:10:29 +0100,
> Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > 
> > Hi Marc,
> > 
> > [...]
> >   
> > > At that stage, you're better off just calling
> > > 
> > > 	list_del(&desc->list);
> > > 	free_msi_entry(desc);
> > > 
> > > I like this approach better as we only traverse the list once.  
> > 
> > Right.
> >   
> > >   
> > > >          }
> > > >   }    
> > > >   >   /**    
> > > > diff --git a/include/linux/msi.h b/include/linux/msi.h
> > > > index 5839d8062dfc..be8ec813dbfb 100644
> > > > --- a/include/linux/msi.h
> > > > +++ b/include/linux/msi.h
> > > > @@ -116,6 +116,8 @@ struct msi_desc {
> > > >          list_first_entry(dev_to_msi_list((dev)), struct msi_desc, list)
> > > >   #define for_each_msi_entry(desc, dev)  \
> > > >          list_for_each_entry((desc), dev_to_msi_list((dev)), list)
> > > > +#define for_each_msi_entry_safe(desc, tmp, dev)        \
> > > > +       list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list)    
> > > >   >   #ifdef CONFIG_PCI_MSI    
> > > >   #define first_pci_msi_entry(pdev)      first_msi_entry(&(pdev)->dev)    
> > > 
> > > If you repin this, I'll queue it right away.  
> > 
> > Let me test the new version to be sure I'm not breaking anything and
> > I'll send a v2.  
> 
> What is the status of this? Are you still planning to send a v2? I'd
> really like this fix to reach 4.19 before we put the last nail on it.

Sorry about that, I was sure I already sent the v2, now it's
done.

The changes in this v2 are that instead of creating a
platform_msi_domain_free_descs() helper that iterates over the list of 
descriptors, the descriptor itself is removed from the list and destroyed 
directly in platform_msi_domain_free(). The for_each_msi_entry() loop is
also transformed to use the "_safe" alternative.

Thanks,
Miquèl

      parent reply	other threads:[~2018-10-11 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 15:01 [PATCH] platform-msi: Free descriptors in platform_msi_domain_free() Miquel Raynal
2018-09-20 18:39 ` Marc Zyngier
2018-09-24 13:39   ` Miquel Raynal
2018-09-28  8:34     ` Marc Zyngier
2018-09-28 15:10       ` Miquel Raynal
     [not found]         ` <86k1moubgr.wl-marc.zyngier@arm.com>
2018-10-11  9:17           ` Miquel Raynal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181011111723.32008d97@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=marc.zyngier@arm.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=nadavh@marvell.com \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stefanc@marvell.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.