Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Sherry Sun <sherry.sun@nxp.com>
Cc: hch@infradead.org, sudeep.dutt@intel.com,
	ashutosh.dixit@intel.com, arnd@arndb.de,
	gregkh@linuxfoundation.org, kishon@ti.com,
	lorenzo.pieralisi@arm.com, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-imx@nxp.com
Subject: Re: [PATCH V3 2/4] misc: vop: do not allocate and reassign the used ring
Date: Fri, 23 Oct 2020 10:26:50 +0100
Message-ID: <20201023092650.GB29066@infradead.org> (raw)
In-Reply-To: <20201022050638.29641-3-sherry.sun@nxp.com>

On Thu, Oct 22, 2020 at 01:06:36PM +0800, Sherry Sun wrote:
> We don't need to allocate and reassign the used ring here and remove the
> used_address_updated flag.Since RC has allocated the entire vring,
> including the used ring. Simply add the corresponding offset can get the
> used ring address.

Someone needs to verify this vs the existing intel implementations.

> -	used = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
> -					get_order(vdev->used_size[index]));
> +	used = va + PAGE_ALIGN(sizeof(struct vring_desc) * le16_to_cpu(config.num) +

This adds an over 80 char line.

> +	vdev->used[index] = config.address + PAGE_ALIGN(sizeof(struct vring_desc) * le16_to_cpu(config.num) +

Again.


  parent reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  5:06 [PATCH V3 0/4] Change vring space from nomal memory to dma coherent memory Sherry Sun
2020-10-22  5:06 ` [PATCH V3 1/4] misc: vop: change the way of allocating vring and device page Sherry Sun
2020-10-22  7:58   ` kernel test robot
2020-10-23  9:25   ` Christoph Hellwig
2020-10-26  2:54     ` Sherry Sun
2020-10-22  5:06 ` [PATCH V3 2/4] misc: vop: do not allocate and reassign the used ring Sherry Sun
2020-10-22  8:53   ` kernel test robot
2020-10-23  9:26   ` Christoph Hellwig [this message]
2020-10-26  3:04     ` Sherry Sun
2020-10-27  6:28       ` gregkh
2020-10-22  5:06 ` [PATCH V3 3/4] misc: vop: simply return the saved dma address instead of virt_to_phys Sherry Sun
2020-10-22  5:06 ` [PATCH V3 4/4] misc: vop: mapping kernel memory to user space as noncached Sherry Sun
2020-10-23  9:28   ` Christoph Hellwig

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=20201023092650.GB29066@infradead.org \
    --to=hch@infradead.org \
    --cc=arnd@arndb.de \
    --cc=ashutosh.dixit@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=sherry.sun@nxp.com \
    --cc=sudeep.dutt@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

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git