Displaying 20 results from an estimated 40 matches for "nrpage".
Did you mean:
  nrpages
  
2020 Apr 29
0
[PATCH 1/5] swiotlb: Introduce concept of swiotlb_pool
...e, VTD_PAGE_SIZE);
cfb94a372f2d4e Lu Baolu     2019-09-06  3948  	struct dmar_domain *domain;
cfb94a372f2d4e Lu Baolu     2019-09-06  3949  	struct intel_iommu *iommu;
cfb94a372f2d4e Lu Baolu     2019-09-06  3950  	unsigned long iova_pfn;
cfb94a372f2d4e Lu Baolu     2019-09-06  3951  	unsigned long nrpages;
cfb94a372f2d4e Lu Baolu     2019-09-06  3952  	phys_addr_t tlb_addr;
cfb94a372f2d4e Lu Baolu     2019-09-06  3953  	int prot = 0;
cfb94a372f2d4e Lu Baolu     2019-09-06  3954  	int ret;
cfb94a372f2d4e Lu Baolu     2019-09-06  3955  
a11bfde9c77df1 Joerg Roedel 2020-02-17  3956  	if (unlikely(atta...
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api.
While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here:
https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg
This issue is most likely in the i915 driver and is most likely caused by the
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api.
While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here:
https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg
This issue is most likely in the i915 driver and is most likely caused by the
2010 Aug 05
0
[GIT PULL] x86/mm for 2.6.36
...AGE_MASK;
+	phys_addr &= PHYSICAL_PAGE_MASK;
 	size = PAGE_ALIGN(last_addr+1) - phys_addr;
 
 	retval = reserve_memtype(phys_addr, (u64)phys_addr + size,
@@ -613,7 +611,7 @@ void __init early_iounmap(void __iomem *addr, unsigned long size)
 		return;
 	}
 	offset = virt_addr & ~PAGE_MASK;
-	nrpages = PAGE_ALIGN(offset + size - 1) >> PAGE_SHIFT;
+	nrpages = PAGE_ALIGN(offset + size) >> PAGE_SHIFT;
 
 	idx = FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*slot;
 	while (nrpages > 0) {
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 5d0e67f..e5d5e2c 100644
--- a/arch/x86/mm/kmmio.c...
2020 Aug 18
3
[PATCH V2 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...;
+}
+
+static void intel_iommu_flush_iotlb_range(struct iommu_domain *domain, unsigned
+		long iova, size_t size,
+		struct page *freelist)
+{
+	struct dmar_domain *dmar_domain = to_dmar_domain(domain);
+	unsigned long start_pfn, last_pfn;
+	unsigned long iova_pfn = IOVA_PFN(iova);
+	unsigned long nrpages;
+	int iommu_id;
+
+	nrpages = aligned_nrpages(iova, size);
+	start_pfn = mm_to_dma_pfn(iova_pfn);
+	last_pfn = start_pfn + nrpages - 1;
 
 	for_each_domain_iommu(iommu_id, dmar_domain)
 		iommu_flush_iotlb_psi(g_iommus[iommu_id], dmar_domain,
-				      start_pfn, npages, !freelist, 0);
+...
2020 Aug 18
3
[PATCH V2 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...;
+}
+
+static void intel_iommu_flush_iotlb_range(struct iommu_domain *domain, unsigned
+		long iova, size_t size,
+		struct page *freelist)
+{
+	struct dmar_domain *dmar_domain = to_dmar_domain(domain);
+	unsigned long start_pfn, last_pfn;
+	unsigned long iova_pfn = IOVA_PFN(iova);
+	unsigned long nrpages;
+	int iommu_id;
+
+	nrpages = aligned_nrpages(iova, size);
+	start_pfn = mm_to_dma_pfn(iova_pfn);
+	last_pfn = start_pfn + nrpages - 1;
 
 	for_each_domain_iommu(iommu_id, dmar_domain)
 		iommu_flush_iotlb_psi(g_iommus[iommu_id], dmar_domain,
-				      start_pfn, npages, !freelist, 0);
+...
2019 Dec 21
0
[PATCH 4/8] iommu: Handle freelists when using deferred flushing in iommu drivers
...;
+}
+
+static void intel_iommu_flush_iotlb_range(struct iommu_domain *domain,
+		unsigned long iova, size_t size,
+		struct page *freelist)
+{
+	struct dmar_domain *dmar_domain = to_dmar_domain(domain);
+	unsigned long start_pfn, last_pfn;
+	unsigned long iova_pfn = IOVA_PFN(iova);
+	unsigned long nrpages;
+	int iommu_id;
+
+	nrpages = aligned_nrpages(iova, size);
+	start_pfn = mm_to_dma_pfn(iova_pfn);
+	last_pfn = start_pfn + nrpages - 1;
 
 	for_each_domain_iommu(iommu_id, dmar_domain)
 		iommu_flush_iotlb_psi(g_iommus[iommu_id], dmar_domain,
-				      start_pfn, npages, !freelist, 0);
+...
2020 Aug 17
1
[PATCH 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...;
+}
+
+static void intel_iommu_flush_iotlb_range(struct iommu_domain *domain, unsigned
+		long iova, size_t size,
+		struct page *freelist)
+{
+	struct dmar_domain *dmar_domain = to_dmar_domain(domain);
+	unsigned long start_pfn, last_pfn;
+	unsigned long iova_pfn = IOVA_PFN(iova);
+	unsigned long nrpages;
+	int iommu_id;
+
+	nrpages = aligned_nrpages(iova, size);
+	start_pfn = mm_to_dma_pfn(iova_pfn);
+	last_pfn = start_pfn + nrpages - 1;
 
 	for_each_domain_iommu(iommu_id, dmar_domain)
 		iommu_flush_iotlb_psi(g_iommus[iommu_id], dmar_domain,
-				      start_pfn, npages, !freelist, 0);
+...
2020 Aug 18
0
[PATCH V2 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...sh_iotlb_range(struct iommu_domain *domain, unsigned
> +		long iova, size_t size,
> +		struct page *freelist)
> +{
> +	struct dmar_domain *dmar_domain = to_dmar_domain(domain);
> +	unsigned long start_pfn, last_pfn;
> +	unsigned long iova_pfn = IOVA_PFN(iova);
> +	unsigned long nrpages;
> +	int iommu_id;
> +
> +	nrpages = aligned_nrpages(iova, size);
> +	start_pfn = mm_to_dma_pfn(iova_pfn);
> +	last_pfn = start_pfn + nrpages - 1;
>   
>   	for_each_domain_iommu(iommu_id, dmar_domain)
>   		iommu_flush_iotlb_psi(g_iommus[iommu_id], dmar_domain,
> -...
2012 Jun 26
6
[PATCH] Add a page cache-backed balloon device driver.
...offsetof(struct virtio_balloon_config, num_pages),
+			      &v, sizeof(v));
+	return v;
+}
+
+static inline s64 towards_target(struct virtio_balloon *vb)
+{
+	struct address_space *mapping = the_inode.inode.i_mapping;
+	u32 v = config_pages(vb);
+
+	return (s64)v - (mapping ? mapping->nrpages : 0);
+}
+
+static void update_balloon_size(struct virtio_balloon *vb)
+{
+	struct address_space *mapping = the_inode.inode.i_mapping;
+	__le32 actual = cpu_to_le32((mapping ? mapping->nrpages : 0));
+
+	vb->vdev->config->set(vb->vdev,
+			      offsetof(struct virtio_balloon_config...
2012 Jun 26
6
[PATCH] Add a page cache-backed balloon device driver.
...offsetof(struct virtio_balloon_config, num_pages),
+			      &v, sizeof(v));
+	return v;
+}
+
+static inline s64 towards_target(struct virtio_balloon *vb)
+{
+	struct address_space *mapping = the_inode.inode.i_mapping;
+	u32 v = config_pages(vb);
+
+	return (s64)v - (mapping ? mapping->nrpages : 0);
+}
+
+static void update_balloon_size(struct virtio_balloon *vb)
+{
+	struct address_space *mapping = the_inode.inode.i_mapping;
+	__le32 actual = cpu_to_le32((mapping ? mapping->nrpages : 0));
+
+	vb->vdev->config->set(vb->vdev,
+			      offsetof(struct virtio_balloon_config...
2012 Jul 25
0
No subject
...;> +
> >> +static inline s64 towards_target(struct virtio_balloon *vb)
> >> +{
> >> +     struct address_space *mapping = the_inode.inode.i_mapping;
> >> +     u32 v = config_pages(vb);
> >> +
> >> +     return (s64)v - (mapping ? mapping->nrpages : 0);
> >> +}
> >> +
> >> +static void update_balloon_size(struct virtio_balloon *vb)
> >> +{
> >> +     struct address_space *mapping = the_inode.inode.i_mapping;
> >> +     __le32 actual = cpu_to_le32((mapping ? mapping->nrpages : 0));
>...
2012 Jul 25
0
No subject
...;> +
> >> +static inline s64 towards_target(struct virtio_balloon *vb)
> >> +{
> >> +     struct address_space *mapping = the_inode.inode.i_mapping;
> >> +     u32 v = config_pages(vb);
> >> +
> >> +     return (s64)v - (mapping ? mapping->nrpages : 0);
> >> +}
> >> +
> >> +static void update_balloon_size(struct virtio_balloon *vb)
> >> +{
> >> +     struct address_space *mapping = the_inode.inode.i_mapping;
> >> +     __le32 actual = cpu_to_le32((mapping ? mapping->nrpages : 0));
>...
2019 Dec 21
0
[PATCH 2/8] iommu/vt-d: Use default dma_direct_* mapping functions for direct mapped devices
...order = get_order(size);
 
@@ -3673,9 +3639,6 @@ static void intel_unmap_sg(struct device *dev, struct scatterlist *sglist,
 	struct scatterlist *sg;
 	int i;
 
-	if (iommu_no_mapping(dev))
-		return dma_direct_unmap_sg(dev, sglist, nelems, dir, attrs);
-
 	for_each_sg(sglist, sg, nelems, i) {
 		nrpages += aligned_nrpages(sg_dma_address(sg), sg_dma_len(sg));
 	}
@@ -3699,8 +3662,6 @@ static int intel_map_sg(struct device *dev, struct scatterlist *sglist, int nele
 	struct intel_iommu *iommu;
 
 	BUG_ON(dir == DMA_NONE);
-	if (iommu_no_mapping(dev))
-		return dma_direct_map_sg(dev, sglist, nelems,...
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
NOTE: These two patches are identical to first two patches of the V8 patch-set,
but are rebased to
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
NOTE: These two patches are identical to first two patches of the V8 patch-set,
but are rebased to
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
Changes since v7:
- Rebased to
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
This patch-set introduces a new virtio type "rproc_serial" for communicating
with remote processors over shared memory. The driver depends on the
the remoteproc framework. As preparation for introducing "rproc_serial"
I've done a refactoring of the transmit buffer handling.
Changes since v7:
- Rebased to
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
I thought rebasing rproc_serial to linux-next was going to be trivial.
But when starting the merge I realized that I had to refactor the
the patches from  Masami Hiramatsu. The splice support has the same issue
as I faced, with different type of buffers in the out_vq.
So I ended up refactoring the splice functionality. The code
size
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
I thought rebasing rproc_serial to linux-next was going to be trivial.
But when starting the merge I realized that I had to refactor the
the patches from  Masami Hiramatsu. The splice support has the same issue
as I faced, with different type of buffers in the out_vq.
So I ended up refactoring the splice functionality. The code
size