linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Colberg, Peter" <peter.colberg@intel.com>
To: "yilun.xu@linux.intel.com" <yilun.xu@linux.intel.com>
Cc: "Xu, Yilun" <yilun.xu@intel.com>,
	"linux-fpga@vger.kernel.org" <linux-fpga@vger.kernel.org>,
	"mdf@kernel.org" <mdf@kernel.org>, "Wu, Hao" <hao.wu@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"russ.weight@linux.dev" <russ.weight@linux.dev>,
	"Pagani, Marco" <marpagan@redhat.com>,
	"trix@redhat.com" <trix@redhat.com>,
	"matthew.gerlach@linux.intel.com"
	<matthew.gerlach@linux.intel.com>
Subject: Re: [RFC PATCH v2 2/9] fpga: dfl: migrate AFU DMA region management driver to dfl_feature_dev_data
Date: Thu, 19 Sep 2024 21:03:04 +0000	[thread overview]
Message-ID: <798f35f297ab05a7af2550b48476cbfcc9bfe42b.camel@intel.com> (raw)
In-Reply-To: <Zid4/GH1hL5YRboH@yilunxu-OptiPlex-7050>

On Tue, 2024-04-23 at 17:01 +0800, Xu Yilun wrote:
> On Tue, Apr 09, 2024 at 07:39:35PM -0400, Peter Colberg wrote:
> > This change separates out most of the symbol name changes required by this
> > patch series for the file: drivers/fpga/dfl-afu-dma-region.c. 
> 
> > This is done
> > to split a single monolithic change into multiple, smaller patches at the
> > request of the maintainer.
> 
> This sentence provides no useful info.

I have removed this sentence and described the restructuring into
logical, self-contained patches in the changelog of the v3 series.

> 
> > 
> > Signed-off-by: Peter Colberg <peter.colberg@intel.com>
> > ---
> > v2:
> > - Split monolithic patch into series at request of maintainer
> > - Reorder local variables in afu_dma_unpin_pages() to reverse Christmas
> >   tree order.
> > ---
> >  drivers/fpga/dfl-afu-dma-region.c | 119 +++++++++++++++---------------
> >  1 file changed, 61 insertions(+), 58 deletions(-)
> > 
> > diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl-afu-dma-region.c
> > index 02b60fde0430..fb45e51b12af 100644
> > --- a/drivers/fpga/dfl-afu-dma-region.c
> > +++ b/drivers/fpga/dfl-afu-dma-region.c
> > @@ -16,26 +16,26 @@
> >  
> >  #include "dfl-afu.h"
> >  
> > -void afu_dma_region_init(struct dfl_feature_platform_data *pdata)
> > +void afu_dma_region_init(struct dfl_feature_dev_data *fdata)
> >  {
> > -	struct dfl_afu *afu = dfl_fpga_pdata_get_private(pdata);
> > +	struct dfl_afu *afu = dfl_fpga_fdata_get_private(fdata);
> >  
> >  	afu->dma_regions = RB_ROOT;
> >  }
> >  
> >  /**
> >   * afu_dma_pin_pages - pin pages of given dma memory region
> > - * @pdata: feature device platform data
> > + * @fdata: feature dev data
> >   * @region: dma memory region to be pinned
> >   *
> >   * Pin all the pages of given dfl_afu_dma_region.
> >   * Return 0 for success or negative error code.
> >   */
> > -static int afu_dma_pin_pages(struct dfl_feature_platform_data *pdata,
> > +static int afu_dma_pin_pages(struct dfl_feature_dev_data *fdata,
> >  			     struct dfl_afu_dma_region *region)
> >  {
> >  	int npages = region->length >> PAGE_SHIFT;
> > -	struct device *dev = &pdata->dev->dev;
> > +	struct device *dev = &fdata->dev->dev;
> >  	int ret, pinned;
> >  
> >  	ret = account_locked_vm(current->mm, npages, true);
> > @@ -73,17 +73,17 @@ static int afu_dma_pin_pages(struct dfl_feature_platform_data *pdata,
> >  
> >  /**
> >   * afu_dma_unpin_pages - unpin pages of given dma memory region
> > - * @pdata: feature device platform data
> > + * @fdata: feature dev data
> >   * @region: dma memory region to be unpinned
> >   *
> >   * Unpin all the pages of given dfl_afu_dma_region.
> >   * Return 0 for success or negative error code.
> >   */
> > -static void afu_dma_unpin_pages(struct dfl_feature_platform_data *pdata,
> > +static void afu_dma_unpin_pages(struct dfl_feature_dev_data *fdata,
> >  				struct dfl_afu_dma_region *region)
> >  {
> >  	long npages = region->length >> PAGE_SHIFT;
> > -	struct device *dev = &pdata->dev->dev;
> > +	struct device *dev = &fdata->dev->dev;
> >  
> >  	unpin_user_pages(region->pages, npages);
> >  	kfree(region->pages);
> > @@ -133,20 +133,21 @@ static bool dma_region_check_iova(struct dfl_afu_dma_region *region,
> >  
> >  /**
> >   * afu_dma_region_add - add given dma region to rbtree
> > - * @pdata: feature device platform data
> > + * @fdata: feature dev data
> >   * @region: dma region to be added
> >   *
> >   * Return 0 for success, -EEXIST if dma region has already been added.
> >   *
> > - * Needs to be called with pdata->lock heold.
> > + * Needs to be called with fdata->lock held.
> >   */
> > -static int afu_dma_region_add(struct dfl_feature_platform_data *pdata,
> > +static int afu_dma_region_add(struct dfl_feature_dev_data *fdata,
> >  			      struct dfl_afu_dma_region *region)
> >  {
> > -	struct dfl_afu *afu = dfl_fpga_pdata_get_private(pdata);
> > +	struct dfl_afu *afu = dfl_fpga_fdata_get_private(fdata);
> > +	struct device *dev = &fdata->dev->dev;
> 
> Don't introduce any other unnecessary changes in the big
> symbol replacement patch.  People could read over all the same
> replacements quickly, even if they are massive. But if there are
> some other changes in between...

I have moved the addition of local `dev` pointers into a separate patch
"fpga: dfl: afu: define local pointer to feature device".

> 
> >  	struct rb_node **new, *parent = NULL;
> >  
> > -	dev_dbg(&pdata->dev->dev, "add region (iova = %llx)\n",
> > +	dev_dbg(dev, "add region (iova = %llx)\n",
> >  		(unsigned long long)region->iova);

Thanks,
Peter


  reply	other threads:[~2024-09-19 21:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 23:39 [RFC PATCH v2 0/9] fpga: dfl: fix kernel warning on port release/assign for SRIOV Peter Colberg
2024-04-09 23:39 ` [RFC PATCH v2 1/9] fpga: dfl: alias dfl_feature_dev_data to dfl_feature_platform_data Peter Colberg
2024-04-09 23:39 ` [RFC PATCH v2 2/9] fpga: dfl: migrate AFU DMA region management driver to dfl_feature_dev_data Peter Colberg
2024-04-23  9:01   ` Xu Yilun
2024-09-19 21:03     ` Colberg, Peter [this message]
2024-04-09 23:39 ` [RFC PATCH v2 3/9] fpga: dfl: migrate AFU MMIO " Peter Colberg
2024-04-09 23:56   ` Colberg, Peter
2024-04-23 14:22     ` Xu Yilun
2024-09-19 21:22       ` Colberg, Peter
2024-04-09 23:39 ` [RFC PATCH v2 4/9] fpga: dfl: migrate FPGA Management Engine " Peter Colberg
2024-04-23  9:38   ` Xu Yilun
2024-09-19 21:35     ` Colberg, Peter
2024-04-09 23:39 ` [RFC PATCH v2 5/9] fpga: dfl: migrate FME partial reconfiguration " Peter Colberg
2024-04-09 23:39 ` [RFC PATCH v2 6/9] fpga: dfl: migrate Accelerated Function Unit " Peter Colberg
2024-04-23 14:31   ` Xu Yilun
2024-09-19 21:39     ` Colberg, Peter
2024-04-09 23:39 ` [RFC PATCH v2 7/9] fpga: dfl: migrate DFL support header " Peter Colberg
2024-04-09 23:39 ` [RFC PATCH v2 8/9] fpga: dfl: migrate dfl_get_feature_by_id() " Peter Colberg
2024-04-23 15:16   ` Xu Yilun
2024-09-19 21:42     ` Colberg, Peter
2024-04-09 23:39 ` [RFC PATCH v2 9/9] fpga: dfl: fix kernel warning on port release/assign for SRIOV Peter Colberg
2024-04-23 15:36   ` Xu Yilun
2024-06-12 22:16     ` Colberg, Peter
2024-06-14  2:44       ` Xu Yilun
2024-09-19 21:49         ` Colberg, Peter
2024-04-23  8:27 ` [RFC PATCH v2 0/9] " Xu Yilun
2024-09-19 21:52   ` Colberg, Peter

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=798f35f297ab05a7af2550b48476cbfcc9bfe42b.camel@intel.com \
    --to=peter.colberg@intel.com \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marpagan@redhat.com \
    --cc=matthew.gerlach@linux.intel.com \
    --cc=mdf@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    --cc=yilun.xu@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).