Re: [PATCH] iommu/iova: Improve alloc_iova performance

2017-09-27 Thread David Woods
e: Adding Robin. Robin, can you please have a look? On Wed, Sep 20, 2017 at 11:28:19AM -0400, David Woods wrote: When allocating pages with alloc_iova() where limit_pfn > dma_32bit_pfn __alloc_and_insert_iova_range does a linear traversal of the tree to find a free block. In the worst case it ma

Re: [PATCH] iommu/iova: Improve alloc_iova performance

2017-09-27 Thread David Woods
e: Adding Robin. Robin, can you please have a look? On Wed, Sep 20, 2017 at 11:28:19AM -0400, David Woods wrote: When allocating pages with alloc_iova() where limit_pfn > dma_32bit_pfn __alloc_and_insert_iova_range does a linear traversal of the tree to find a free block. In the worst case it ma

[PATCH] iommu/iova: Improve alloc_iova performance

2017-09-20 Thread David Woods
due to the rb tree insert. Reviewed-by: Chris Metcalf <cmetc...@mellanox.com> Signed-off-by: David Woods <dwo...@mellanox.com> --- drivers/iommu/iova.c | 82 +++- include/linux/iova.h | 1 + 2 files changed, 56 insertions(+), 27 deletions

[PATCH] iommu/iova: Improve alloc_iova performance

2017-09-20 Thread David Woods
due to the rb tree insert. Reviewed-by: Chris Metcalf Signed-off-by: David Woods --- drivers/iommu/iova.c | 82 +++- include/linux/iova.h | 1 + 2 files changed, 56 insertions(+), 27 deletions(-) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iov

[PATCH v3 1/2] mmc: dw_mmc: Use device_property_read instead of of_property_read

2017-05-26 Thread David Woods
Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods <dwo...@mellanox.com> Reviewed-by: Chris Metcalf <cmetc...@mellanox.com> Cc: sta...@vger.linux.org --- drivers/mmc/host/d

[PATCH v3 1/2] mmc: dw_mmc: Use device_property_read instead of of_property_read

2017-05-26 Thread David Woods
Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf Cc: sta...@vger.linux.org --- drivers/mmc/host/dw_mmc.c | 24 1 file changed, 12 insertions

[PATCH v3 2/2] mmc: core: Use device_property_read instead of of_property_read

2017-05-26 Thread David Woods
Using the device_property interfaces allows mmc drivers to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods <dwo...@mellanox.com> Reviewed-by: Chris Metcalf <cmetc...@mellanox.com> Cc: sta...@vger.linux.org --- drivers/mmc/core

[PATCH v3 2/2] mmc: core: Use device_property_read instead of of_property_read

2017-05-26 Thread David Woods
Using the device_property interfaces allows mmc drivers to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf Cc: sta...@vger.linux.org --- drivers/mmc/core/host.c | 72 - 1 file

Re: [PATCH 2/2] mmc: core: Use device_property_read instead of of_property_read

2017-05-23 Thread David Woods
On 05/19/2017 04:23 AM, Ulf Hansson wrote: On 18 May 2017 at 00:17, David Woods <dwo...@mellanox.com> wrote: Using the device_property interfaces allows mmc drivers to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods <dwo...@mellanox.com> Review

Re: [PATCH 2/2] mmc: core: Use device_property_read instead of of_property_read

2017-05-23 Thread David Woods
On 05/19/2017 04:23 AM, Ulf Hansson wrote: On 18 May 2017 at 00:17, David Woods wrote: Using the device_property interfaces allows mmc drivers to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf Cc: sta...@vger.linux.org

[PATCH 2/2] mmc: core: Use device_property_read instead of of_property_read

2017-05-17 Thread David Woods
Using the device_property interfaces allows mmc drivers to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods <dwo...@mellanox.com> Reviewed-by: Chris Metcalf <cmetc...@mellanox.com> Cc: sta...@vger.linux.org --- drivers/mmc/core

[PATCH 2/2] mmc: core: Use device_property_read instead of of_property_read

2017-05-17 Thread David Woods
Using the device_property interfaces allows mmc drivers to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf Cc: sta...@vger.linux.org --- drivers/mmc/core/host.c | 72 - 1 file

[PATCH 1/2] mmc: dw_mmc: Use device_property_read instead of of_property_read

2017-05-17 Thread David Woods
Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods <dwo...@mellanox.com> Reviewed-by: Chris Metcalf <cmetc...@mellanox.com> Cc: sta...@vger.linux.org --- drivers/mmc/host/d

[PATCH 1/2] mmc: dw_mmc: Use device_property_read instead of of_property_read

2017-05-17 Thread David Woods
Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf Cc: sta...@vger.linux.org --- drivers/mmc/host/dw_mmc.c | 24 1 file changed, 12 insertions

Re: [PATCH] Use device_property_read instead of of_property_read in the dw_mmc driver

2017-05-17 Thread David Woods
On 05/15/2017 09:30 AM, Andy Shevchenko wrote: On Mon, May 15, 2017 at 12:36 PM, Ulf Hansson <ulf.hans...@linaro.org> wrote: On 25 April 2017 at 17:39, David Woods <dwo...@mellanox.com> wrote: Using the device_property interfaces allows the dw_mmc driver to work on platfor

Re: [PATCH] Use device_property_read instead of of_property_read in the dw_mmc driver

2017-05-17 Thread David Woods
On 05/15/2017 09:30 AM, Andy Shevchenko wrote: On Mon, May 15, 2017 at 12:36 PM, Ulf Hansson wrote: On 25 April 2017 at 17:39, David Woods wrote: Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Can you please split

[PATCH] Use device_property_read instead of of_property_read in the dw_mmc driver

2017-04-25 Thread David Woods
Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods <dwo...@mellanox.com> Reviewed-by: Chris Metcalf <cmetc...@mellanox.com> --- drivers/mmc/core/h

[PATCH] Use device_property_read instead of of_property_read in the dw_mmc driver

2017-04-25 Thread David Woods
Using the device_property interfaces allows the dw_mmc driver to work on platforms which run on either device tree or ACPI. Signed-off-by: David Woods Reviewed-by: Chris Metcalf --- drivers/mmc/core/host.c | 72 +++ drivers/mmc/host/dw_mmc.c | 24

Re: [PATCH v4] arm64: Add support for PTE contiguous bit.

2015-12-17 Thread David Woods
On 12/16/2015 07:50 AM, Steve Capper wrote: On 11 December 2015 at 21:02, David Woods wrote: The arm64 MMU supports a Contiguous bit which is a hint that the TTE is one of a set of contiguous entries which can be cached in a single TLB entry. Supporting this bit adds new intermediate huge

[PATCH v5] arm64: Add support for PTE contiguous bit.

2015-12-17 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods Reviewed-by: Chris Metcalf --- Version 5 cleans up issues building with STRICT_MM_TYPECHECKS defined pointed out by Steve Capper. arch/arm64/Kconfig | 3 - arch/arm64/include/asm

[PATCH v5] arm64: Add support for PTE contiguous bit.

2015-12-17 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods <dwo...@ezchip.com> Reviewed-by: Chris Metcalf <cmetc...@ezchip.com> --- Version 5 cleans up issues building with STRICT_MM_TYPECHECKS defined pointed out by Steve Capper. arch/a

Re: [PATCH v4] arm64: Add support for PTE contiguous bit.

2015-12-17 Thread David Woods
On 12/16/2015 07:50 AM, Steve Capper wrote: On 11 December 2015 at 21:02, David Woods <dwo...@ezchip.com> wrote: The arm64 MMU supports a Contiguous bit which is a hint that the TTE is one of a set of contiguous entries which can be cached in a single TLB entry. Supporting this bit ad

[PATCH v4] arm64: Add support for PTE contiguous bit.

2015-12-11 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods Reviewed-by: Chris Metcalf --- This version of the patch addresses all the comments I've received to date and is passing the libhugetlbfs tests. Catalin, assuming there are no further comments, can

[PATCH v4] arm64: Add support for PTE contiguous bit.

2015-12-11 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods <dwo...@ezchip.com> Reviewed-by: Chris Metcalf <cmetc...@ezchip.com> --- This version of the patch addresses all the comments I've received to date and is passing the libhugetlbfs tests. Catal

Re: [PATCH v3] arm64: Add support for PTE contiguous bit.

2015-11-20 Thread David Woods
On 11/20/2015 05:07 AM, yalin wang wrote: + +void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) +{ + size_t pgsize; + int i; + int ncontig = find_num_contig(mm, addr, ptep, pte, ); + unsigned long pfn; +

Re: [PATCH v3] arm64: Add support for PTE contiguous bit.

2015-11-20 Thread David Woods
On 11/20/2015 05:07 AM, yalin wang wrote: + +void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) +{ + size_t pgsize; + int i; + int ncontig = find_num_contig(mm, addr, ptep, pte, ); + unsigned long pfn; +

[PATCH v3] arm64: Add support for PTE contiguous bit.

2015-11-19 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods Reviewed-by: Chris Metcalf --- This patch should resolve the comments on v2 and is now based on on the arm64 next tree which includes 16K granule support. I've added definitions which should enable 2M and 1G

[PATCH v3] arm64: Add support for PTE contiguous bit.

2015-11-19 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods <dwo...@ezchip.com> Reviewed-by: Chris Metcalf <cmetc...@ezchip.com> --- This patch should resolve the comments on v2 and is now based on on the arm64 next tree which includes 16K granule support.

Re: [PATCH v2] arm64: Add support for PTE contiguous bit.

2015-11-18 Thread David Woods
On 10/20/2015 08:16 AM, Steve Capper wrote: On Mon, Oct 19, 2015 at 04:09:09PM -0400, David Woods wrote: >The arm64 MMU supports a Contiguous bit which is a hint that the TTE >is one of a set of contiguous entries which can be cached in a single >TLB entry. Supporting this bit

Re: [PATCH v2] arm64: Add support for PTE contiguous bit.

2015-11-18 Thread David Woods
On 10/20/2015 08:16 AM, Steve Capper wrote: On Mon, Oct 19, 2015 at 04:09:09PM -0400, David Woods wrote: >The arm64 MMU supports a Contiguous bit which is a hint that the TTE >is one of a set of contiguous entries which can be cached in a single >TLB entry. Supporting this bit

[PATCH v2] arm64: Add support for PTE contiguous bit.

2015-10-19 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods Reviewed-by: Chris Metcalf --- arch/arm64/Kconfig | 3 - arch/arm64/include/asm/hugetlb.h | 30 ++--- arch/arm64/include/asm/pgtable-hwdef.h | 20 arch/arm64/include/asm

Re: [PATCH] arm64: Add support for PTE contiguous bit.

2015-10-19 Thread David Woods
On 09/16/2015 10:06 AM, Steve Capper wrote: Hi David, Some initial comments below. Cheers, -- Steve On Tue, Sep 15, 2015 at 02:01:57PM -0400, David Woods wrote: >The arm64 MMU supports a Contiguous bit which is a hint that the TTE >is one of a set of contiguous entries which can be

[PATCH v2] arm64: Add support for PTE contiguous bit.

2015-10-19 Thread David Woods
the default huge page size for both 4KB and 64KB granules. Signed-off-by: David Woods <dwo...@ezchip.com> Reviewed-by: Chris Metcalf <cmetc...@ezchip.com> --- arch/arm64/Kconfig | 3 - arch/arm64/include/asm/hugetlb.h | 30 ++--- arch/arm64/include/asm/pgt

Re: [PATCH] arm64: Add support for PTE contiguous bit.

2015-10-19 Thread David Woods
On 09/16/2015 10:06 AM, Steve Capper wrote: Hi David, Some initial comments below. Cheers, -- Steve On Tue, Sep 15, 2015 at 02:01:57PM -0400, David Woods wrote: >The arm64 MMU supports a Contiguous bit which is a hint that the TTE >is one of a set of contiguous entries which can be

Re: [PATCH] arm64: Add support for PTE contiguous bit.

2015-09-21 Thread David Woods
wrote: On 15 September 2015 at 19:01, David Woods wrote: The arm64 MMU supports a Contiguous bit which is a hint that the TTE is one of a set of contiguous entries which can be cached in a single TLB entry. Supporting this bit adds new intermediate huge page sizes. The set of huge page sizes

Re: [PATCH] arm64: Add support for PTE contiguous bit.

2015-09-21 Thread David Woods
wrote: On 15 September 2015 at 19:01, David Woods <dwo...@ezchip.com> wrote: The arm64 MMU supports a Contiguous bit which is a hint that the TTE is one of a set of contiguous entries which can be cached in a single TLB entry. Supporting this bit adds new intermediate huge page sizes. T

[PATCH] arm64: Add support for PTE contiguous bit.

2015-09-15 Thread David Woods
is as follows. 4KB: 64KB 2MB 32MB 1GB 64KB: 2MB 512MB 16GB 4TB If the base page size is set to 64KB then 2MB pages are enabled by default. It is possible in the future to make 2MB the default huge page size for both 4KB and 64KB pages. Signed-off-by: David Woods Reviewed-by: Chris Metcalf

[PATCH] arm64: Add support for PTE contiguous bit.

2015-09-15 Thread David Woods
is as follows. 4KB: 64KB 2MB 32MB 1GB 64KB: 2MB 512MB 16GB 4TB If the base page size is set to 64KB then 2MB pages are enabled by default. It is possible in the future to make 2MB the default huge page size for both 4KB and 64KB pages. Signed-off-by: David Woods <dwo...@ezchip.com> Re