Re: [PATCH] staging: gasket: formatting fixes

2018-11-16 Thread Todd Poynor
> /* Release all coherent memory. */ > -void gasket_free_coherent_memory_all( > - struct gasket_dev *gasket_dev, u64 index) > +void gasket_free_coherent_memory_all(struct gasket_dev *gasket_dev, u64 > index) > { > if (!gasket_dev->page_table[index]) > return; > -- > 2.17.1 > Acked-by: Todd Poynor Thanks!

Re: [PATCH] staging: gasket: formatting fixes

2018-11-16 Thread Todd Poynor
> /* Release all coherent memory. */ > -void gasket_free_coherent_memory_all( > - struct gasket_dev *gasket_dev, u64 index) > +void gasket_free_coherent_memory_all(struct gasket_dev *gasket_dev, u64 > index) > { > if (!gasket_dev->page_table[index]) > return; > -- > 2.17.1 > Acked-by: Todd Poynor Thanks!

RFC: staging: gasket: re-implement using UIO

2018-11-06 Thread Todd Poynor
On Mon, Sep 10, 2018 at 8:28 AM Ahmed S. Darwish wrote: > > The gasket in-kernel framework, recently introduced under staging, > re-implements what is already long-time provided by the UIO > subsystem, with extra PCI BAR remapping and MSI conveniences. > > Before moving it out of staging, make

RFC: staging: gasket: re-implement using UIO

2018-11-06 Thread Todd Poynor
On Mon, Sep 10, 2018 at 8:28 AM Ahmed S. Darwish wrote: > > The gasket in-kernel framework, recently introduced under staging, > re-implements what is already long-time provided by the UIO > subsystem, with extra PCI BAR remapping and MSI conveniences. > > Before moving it out of staging, make

[PATCH 2/3] staging: gasket: remove debug logs in page table mapping calls

2018-10-16 Thread Todd Poynor
From: Todd Poynor Remove very noisy debug logs that also contain typos and incorrect output formats. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 24 -- 1 file changed, 24 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c

[PATCH 3/3] staging: gasket: page_table: add mapping flags

2018-10-16 Thread Todd Poynor
From: Nick Ewalt This allows for more precise dma_direction in the dma_map_page requests. Also leaves room for adding more flags later. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket.h| 33 drivers/staging/gasket/gasket_ioctl.c

[PATCH 0/3] staging: gasket: add DMA direction flags a.o.

2018-10-16 Thread Todd Poynor
From: Todd Poynor Add flags to page mapping ioctls that specify DMA directions other than bi-directional, avoiding unnecessary cache maintenance for read-only or write-only buffers. Remove some spammy / unhelpful / inaccurately formatted debug logs. Nick Ewalt (1): staging: gasket

[PATCH 2/3] staging: gasket: remove debug logs in page table mapping calls

2018-10-16 Thread Todd Poynor
From: Todd Poynor Remove very noisy debug logs that also contain typos and incorrect output formats. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 24 -- 1 file changed, 24 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c

[PATCH 3/3] staging: gasket: page_table: add mapping flags

2018-10-16 Thread Todd Poynor
From: Nick Ewalt This allows for more precise dma_direction in the dma_map_page requests. Also leaves room for adding more flags later. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket.h| 33 drivers/staging/gasket/gasket_ioctl.c

[PATCH 0/3] staging: gasket: add DMA direction flags a.o.

2018-10-16 Thread Todd Poynor
From: Todd Poynor Add flags to page mapping ioctls that specify DMA directions other than bi-directional, avoiding unnecessary cache maintenance for read-only or write-only buffers. Remove some spammy / unhelpful / inaccurately formatted debug logs. Nick Ewalt (1): staging: gasket

[PATCH 1/3] staging: gasket: remove debug logs for callback invocation

2018-10-16 Thread Todd Poynor
From: Todd Poynor Debug logs for device-specific callback invocation aren't very useful, remove. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers

[PATCH 1/3] staging: gasket: remove debug logs for callback invocation

2018-10-16 Thread Todd Poynor
From: Todd Poynor Debug logs for device-specific callback invocation aren't very useful, remove. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers

Re: [PATCH 01/11] staging: gasket: core: debug log updates

2018-10-15 Thread Todd Poynor
On Mon, Oct 15, 2018 at 12:34 AM Greg Kroah-Hartman wrote: > > On Sun, Oct 14, 2018 at 09:59:17PM -0700, Todd Poynor wrote: > > From: Todd Poynor > > > > Add debug logs for device enable/disable events, > > Why? > > What is going to need this? As one o

Re: [PATCH 01/11] staging: gasket: core: debug log updates

2018-10-15 Thread Todd Poynor
On Mon, Oct 15, 2018 at 12:34 AM Greg Kroah-Hartman wrote: > > On Sun, Oct 14, 2018 at 09:59:17PM -0700, Todd Poynor wrote: > > From: Todd Poynor > > > > Add debug logs for device enable/disable events, > > Why? > > What is going to need this? As one o

Re: [PATCH v3] staging: gasket: Fix sparse "incorrect type in assignment" warnings.

2018-10-15 Thread Todd Poynor
base; > + u8 *virt_base; > > /* Physical base address. */ > ulong phys_base; > -- > 2.9.5 Reviewed-by: Todd Poynor Thanks!

Re: [PATCH v3] staging: gasket: Fix sparse "incorrect type in assignment" warnings.

2018-10-15 Thread Todd Poynor
base; > + u8 *virt_base; > > /* Physical base address. */ > ulong phys_base; > -- > 2.9.5 Reviewed-by: Todd Poynor Thanks!

Re: [PATCH 00/11] staging: gasket: fixes

2018-10-15 Thread Todd Poynor
On Mon, Oct 15, 2018 at 12:33 AM Greg Kroah-Hartman wrote: > > On Sun, Oct 14, 2018 at 09:59:16PM -0700, Todd Poynor wrote: > > From: Todd Poynor > > > > Various fixes for gasket/apex drivers. > > For some reason you seem to have ignored/missed this patch: >

Re: [PATCH 00/11] staging: gasket: fixes

2018-10-15 Thread Todd Poynor
On Mon, Oct 15, 2018 at 12:33 AM Greg Kroah-Hartman wrote: > > On Sun, Oct 14, 2018 at 09:59:16PM -0700, Todd Poynor wrote: > > From: Todd Poynor > > > > Various fixes for gasket/apex drivers. > > For some reason you seem to have ignored/missed this patch: >

[PATCH 07/11] staging: gasket: page_table: fix comment in components_to_dev_address

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Comments in components_to_dev_address() describing examples are inconsistent, fix these to be accurate. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 07/11] staging: gasket: page_table: fix comment in components_to_dev_address

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Comments in components_to_dev_address() describing examples are inconsistent, fix these to be accurate. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 04/11] staging: gasket: page_table: remove unnecessary PTE status set to free

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Remove unnecessary ptes[i].status update in gasket_perform_unmapping. The vaaue will be cleared in the following memset. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 11/11] staging: gasket: Update device virtual address comment

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Add that number of page table entries and extended address bit offset are configurable. Update example virtual address format to be more consistent with typical usage. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 14

[PATCH 02/11] staging: gasket: page table: return valid error code on map fail

2018-10-14 Thread Todd Poynor
From: Todd Poynor Return -EINVAL on mapping failures, instead of -1, which triggers a checkpatch error. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c

[PATCH 08/11] staging: gasket: page_table: simplify gasket_components_to_dev_address

2018-10-14 Thread Todd Poynor
-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c index ec9359576ea7c

[PATCH 04/11] staging: gasket: page_table: remove unnecessary PTE status set to free

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Remove unnecessary ptes[i].status update in gasket_perform_unmapping. The vaaue will be cleared in the following memset. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 11/11] staging: gasket: Update device virtual address comment

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Add that number of page table entries and extended address bit offset are configurable. Update example virtual address format to be more consistent with typical usage. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 14

[PATCH 02/11] staging: gasket: page table: return valid error code on map fail

2018-10-14 Thread Todd Poynor
From: Todd Poynor Return -EINVAL on mapping failures, instead of -1, which triggers a checkpatch error. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c

[PATCH 08/11] staging: gasket: page_table: simplify gasket_components_to_dev_address

2018-10-14 Thread Todd Poynor
-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c index ec9359576ea7c

[PATCH 01/11] staging: gasket: core: debug log updates

2018-10-14 Thread Todd Poynor
From: Todd Poynor Add debug logs for device enable/disable events, remove logs for callbacks (the called functions can generate their own logs if needed). Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff

[PATCH 09/11] staging: gasket: apex: fix sysfs_show

2018-10-14 Thread Todd Poynor
From: Nick Ewalt sysfs_show was incorrectly extracting the sysfs_attribute_type from the gasket_sysfs_attribute. This prevented dispatch from working properly. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 2 +- 1 file changed, 1 insertion

[PATCH 03/11] staging: gasket: page table: remove dead code in coherent mem alloc

2018-10-14 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory() has some unnecessary code related to out of memory checking that will never hit the condition checked, remove. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions

[PATCH 06/11] staging: gasket: page table: fixup error path allocating coherent mem

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Correctly clean up data structure state in gasket_alloc_coherent_memory error path, to ensure no double free on the stale pointer value. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 +- 1 file changed, 5

[PATCH 00/11] staging: gasket: fixes

2018-10-14 Thread Todd Poynor
From: Todd Poynor Various fixes for gasket/apex drivers. Nick Ewalt (8): staging: gasket: page_table: remove unnecessary PTE status set to free staging: gasket: page_table: rearrange gasket_page_table_entry staging: gasket: page table: fixup error path allocating coherent mem staging

[PATCH 01/11] staging: gasket: core: debug log updates

2018-10-14 Thread Todd Poynor
From: Todd Poynor Add debug logs for device enable/disable events, remove logs for callbacks (the called functions can generate their own logs if needed). Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff

[PATCH 09/11] staging: gasket: apex: fix sysfs_show

2018-10-14 Thread Todd Poynor
From: Nick Ewalt sysfs_show was incorrectly extracting the sysfs_attribute_type from the gasket_sysfs_attribute. This prevented dispatch from working properly. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 2 +- 1 file changed, 1 insertion

[PATCH 03/11] staging: gasket: page table: remove dead code in coherent mem alloc

2018-10-14 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory() has some unnecessary code related to out of memory checking that will never hit the condition checked, remove. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions

[PATCH 06/11] staging: gasket: page table: fixup error path allocating coherent mem

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Correctly clean up data structure state in gasket_alloc_coherent_memory error path, to ensure no double free on the stale pointer value. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 +- 1 file changed, 5

[PATCH 00/11] staging: gasket: fixes

2018-10-14 Thread Todd Poynor
From: Todd Poynor Various fixes for gasket/apex drivers. Nick Ewalt (8): staging: gasket: page_table: remove unnecessary PTE status set to free staging: gasket: page_table: rearrange gasket_page_table_entry staging: gasket: page table: fixup error path allocating coherent mem staging

[PATCH 10/11] staging: gasket: sysfs: fix attribute release comment

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Comments for gasket_sysfs_get_attr() incorrectly describe reference release procedure. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 05/11] staging: gasket: page_table: rearrange gasket_page_table_entry

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Rearrange gasket_page_table entry to reduce padding slop. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/gasket

[PATCH 10/11] staging: gasket: sysfs: fix attribute release comment

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Comments for gasket_sysfs_get_attr() incorrectly describe reference release procedure. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 05/11] staging: gasket: page_table: rearrange gasket_page_table_entry

2018-10-14 Thread Todd Poynor
From: Nick Ewalt Rearrange gasket_page_table entry to reduce padding slop. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/gasket

[PATCH 00/10] staging: gasket: Apex uncloaks, plus fixes

2018-09-17 Thread Todd Poynor
From: Todd Poynor Add a description of the Gasket framework device Apex (it's a Google Edge TPU machine learning accelerator soon to be released), plus a handful of fixes. Nick Ewalt (7): staging: gasket: fix DMA direction for extended page tables staging: gasket: fix data page unmap DMA

[PATCH 00/10] staging: gasket: Apex uncloaks, plus fixes

2018-09-17 Thread Todd Poynor
From: Todd Poynor Add a description of the Gasket framework device Apex (it's a Google Edge TPU machine learning accelerator soon to be released), plus a handful of fixes. Nick Ewalt (7): staging: gasket: fix DMA direction for extended page tables staging: gasket: fix data page unmap DMA

[PATCH 01/10] staging: gasket: Kconfig: describe Apex as an Edge TPU device

2018-09-17 Thread Todd Poynor
From: Todd Poynor Add a brief description and URL for more information on the Apex device, an Edge TPU (Tensorflow Processing Unit) machine learning accelerator. Signed-off-by: Todd Poynor --- drivers/staging/gasket/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 01/10] staging: gasket: Kconfig: describe Apex as an Edge TPU device

2018-09-17 Thread Todd Poynor
From: Todd Poynor Add a brief description and URL for more information on the Apex device, an Edge TPU (Tensorflow Processing Unit) machine learning accelerator. Signed-off-by: Todd Poynor --- drivers/staging/gasket/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 07/10] staging: gasket: fix gasket_free_coherent_memory metadata frees

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Free gasket_coherent_page_entries metadata memory, update data structures accordingly. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/gasket

[PATCH 10/10] staging: gasket: page_table: handle failed dma_map_page

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Handle dma_map_page failing in gasket_alloc_extended_subtable: free memory, don't add invalid page table entry. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH 06/10] staging: gasket: page_table: don't unmap coherent pages

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Only call dma_unmap_page if there was an associated dma_map_page call. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket

[PATCH 07/10] staging: gasket: fix gasket_free_coherent_memory metadata frees

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Free gasket_coherent_page_entries metadata memory, update data structures accordingly. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/gasket

[PATCH 10/10] staging: gasket: page_table: handle failed dma_map_page

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Handle dma_map_page failing in gasket_alloc_extended_subtable: free memory, don't add invalid page table entry. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH 06/10] staging: gasket: page_table: don't unmap coherent pages

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Only call dma_unmap_page if there was an associated dma_map_page call. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket

[PATCH 08/10] staging: gasket: cleanup if dma_map_page fails in gasket_perform_mapping

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Previously pages would have never been unmapped in this case. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 33 +- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/drivers/staging

[PATCH 08/10] staging: gasket: cleanup if dma_map_page fails in gasket_perform_mapping

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Previously pages would have never been unmapped in this case. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 33 +- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/drivers/staging

[PATCH 04/10] staging: gasket: fix DMA direction for extended page tables

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Extended page tables should be mapped as DMA_TO_DEVICE, not bi-directional. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/gasket

[PATCH 02/10] staging: gasket: interrupt: remove PCI-MSIX-specific status check

2018-09-17 Thread Todd Poynor
From: Todd Poynor Devices not using MSIX don't use the msix_initialized field, so don't require it to be set in the interrupt system status check. The general check for interrupts configured that follows can cover both MSIX and device-managed interrupts. Signed-off-by: Todd Poynor --- drivers

[PATCH 03/10] staging: gasket: page table: use GFP_KERNEL for dma_alloc_coherent

2018-09-17 Thread Todd Poynor
From: Todd Poynor Flags should be specified for dma_alloc_coherent() call. Use GFP_KERNEL, it's fine to sleep here. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket

[PATCH 05/10] staging: gasket: fix data page unmap DMA direction

2018-09-17 Thread Todd Poynor
From: Nick Ewalt The DMA direction supplied to dma_unmap_page should match the corresponding dma_map_page call, which is mapped bi-directional. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 04/10] staging: gasket: fix DMA direction for extended page tables

2018-09-17 Thread Todd Poynor
From: Nick Ewalt Extended page tables should be mapped as DMA_TO_DEVICE, not bi-directional. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/gasket

[PATCH 02/10] staging: gasket: interrupt: remove PCI-MSIX-specific status check

2018-09-17 Thread Todd Poynor
From: Todd Poynor Devices not using MSIX don't use the msix_initialized field, so don't require it to be set in the interrupt system status check. The general check for interrupts configured that follows can cover both MSIX and device-managed interrupts. Signed-off-by: Todd Poynor --- drivers

[PATCH 03/10] staging: gasket: page table: use GFP_KERNEL for dma_alloc_coherent

2018-09-17 Thread Todd Poynor
From: Todd Poynor Flags should be specified for dma_alloc_coherent() call. Use GFP_KERNEL, it's fine to sleep here. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket

[PATCH 05/10] staging: gasket: fix data page unmap DMA direction

2018-09-17 Thread Todd Poynor
From: Nick Ewalt The DMA direction supplied to dma_unmap_page should match the corresponding dma_map_page call, which is mapped bi-directional. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 09/10] staging: gasket: page_table: use total_entries for max ext lvl0 page idx

2018-09-17 Thread Todd Poynor
From: Nick Ewalt The maximum number of entries in the page table is configurable at initialization time and should be used in gasket_extended_lvl0_page_idx. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion

[PATCH 09/10] staging: gasket: page_table: use total_entries for max ext lvl0 page idx

2018-09-17 Thread Todd Poynor
From: Nick Ewalt The maximum number of entries in the page table is configurable at initialization time and should be used in gasket_extended_lvl0_page_idx. Signed-off-by: Nick Ewalt Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion

Re: [GIT PULL] Staging/IIO driver patches for 4.19-rc1

2018-08-28 Thread Todd Poynor
On Tue, Aug 28, 2018 at 3:38 AM Ahmed S. Darwish wrote: >[...] > On Sat, 18 Aug 2018 17:57:24 +0200, Greg KH wrote: > [...] > > addition of some new IIO drivers. Also added was a "gasket" driver from > > Google that needs loads of work and the erofs filesystem. > > > > Why are we adding __a

Re: [GIT PULL] Staging/IIO driver patches for 4.19-rc1

2018-08-28 Thread Todd Poynor
On Tue, Aug 28, 2018 at 3:38 AM Ahmed S. Darwish wrote: >[...] > On Sat, 18 Aug 2018 17:57:24 +0200, Greg KH wrote: > [...] > > addition of some new IIO drivers. Also added was a "gasket" driver from > > Google that needs loads of work and the erofs filesystem. > > > > Why are we adding __a

Re: [PATCH 01/16] MAINTAINERS: Switch a maintainer for drivers/staging/gasket

2018-08-10 Thread Todd Poynor
ese so I suggested he send an Acked-by as well, can drop that. > > > On Thu, Aug 9, 2018 at 8:20 PM, Todd Poynor wrote: > > > From: Todd Poynor > > > > > > Todd Poynor takes over for John Joseph. > > > > > > Signed-off-by: John Joseph >

Re: [PATCH 01/16] MAINTAINERS: Switch a maintainer for drivers/staging/gasket

2018-08-10 Thread Todd Poynor
ese so I suggested he send an Acked-by as well, can drop that. > > > On Thu, Aug 9, 2018 at 8:20 PM, Todd Poynor wrote: > > > From: Todd Poynor > > > > > > Todd Poynor takes over for John Joseph. > > > > > > Signed-off-by: John Joseph >

[PATCH 05/16] staging: gasket: core: remove ftrace-style debug logs

2018-08-09 Thread Todd Poynor
From: Todd Poynor Remove debug logs that only indicate the name of the entered function, in favor of using ftrace for function tracing style logs. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/gasket

[PATCH 02/16] staging: gasket: core: remove debug log that could crash

2018-08-09 Thread Todd Poynor
From: Todd Poynor A debug log in gasket_alloc_dev() is issued regardless of whether the device pointer used returned success or error. The log isn't that useful anyway, remove it. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH 00/16] staging: gasket: return of the son of cleanups

2018-08-09 Thread Todd Poynor
From: Todd Poynor Remove extraneous memory barriers, refactor PCI-specific code in prep for platform devices in the near future, general cleanups, and make de facto maintainership official. Todd Poynor (16): MAINTAINERS: Switch a maintainer for drivers/staging/gasket staging: gasket: core

[PATCH 07/16] staging: gasket: page table: remove unnecessary NULL check

2018-08-09 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory remove unnecessary NULL check for coherent_pages. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b

[PATCH 03/16] staging: gasket: core: fix line continuation indent in gasket_alloc_dev

2018-08-09 Thread Todd Poynor
From: Todd Poynor Previous cleanups missed a case of multi-line function call with line continuation parameters not aligned per kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 00/16] staging: gasket: return of the son of cleanups

2018-08-09 Thread Todd Poynor
From: Todd Poynor Remove extraneous memory barriers, refactor PCI-specific code in prep for platform devices in the near future, general cleanups, and make de facto maintainership official. Todd Poynor (16): MAINTAINERS: Switch a maintainer for drivers/staging/gasket staging: gasket: core

[PATCH 07/16] staging: gasket: page table: remove unnecessary NULL check

2018-08-09 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory remove unnecessary NULL check for coherent_pages. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b

[PATCH 03/16] staging: gasket: core: fix line continuation indent in gasket_alloc_dev

2018-08-09 Thread Todd Poynor
From: Todd Poynor Previous cleanups missed a case of multi-line function call with line continuation parameters not aligned per kernel style. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 05/16] staging: gasket: core: remove ftrace-style debug logs

2018-08-09 Thread Todd Poynor
From: Todd Poynor Remove debug logs that only indicate the name of the entered function, in favor of using ftrace for function tracing style logs. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/gasket

[PATCH 02/16] staging: gasket: core: remove debug log that could crash

2018-08-09 Thread Todd Poynor
From: Todd Poynor A debug log in gasket_alloc_dev() is issued regardless of whether the device pointer used returned success or error. The log isn't that useful anyway, remove it. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH 13/16] staging: gasket: core: rename lookup_internal_desc to be PCI-specific

2018-08-09 Thread Todd Poynor
From: Todd Poynor Rename lookup_internal_desc() to lookup_pci_internal_desc() to reflect use for PCI devices only, in prep for non-PCI devices in the future. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 11/16] staging: gasket: core: factor out generic device add code from PCI code

2018-08-09 Thread Todd Poynor
From: Todd Poynor Split out generic gasket device add code from the code for adding a PCI gasket device, in prep for other gasket device types in the future. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 76 ++-- 1 file changed, 48 insertions

[PATCH 12/16] staging: gasket: core: factor out generic device remove code from PCI

2018-08-09 Thread Todd Poynor
From: Todd Poynor Separate code for generic parts of gasket device removal sequence from the PCI device removal code, in prep for non-PCI devices later. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[PATCH 06/16] staging: gasket: remove gasket_exit()

2018-08-09 Thread Todd Poynor
From: Todd Poynor Remove now-empty gasket_exit() function. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 0fe5b86b294c8..aee819f379e9a

[PATCH 13/16] staging: gasket: core: rename lookup_internal_desc to be PCI-specific

2018-08-09 Thread Todd Poynor
From: Todd Poynor Rename lookup_internal_desc() to lookup_pci_internal_desc() to reflect use for PCI devices only, in prep for non-PCI devices in the future. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 11/16] staging: gasket: core: factor out generic device add code from PCI code

2018-08-09 Thread Todd Poynor
From: Todd Poynor Split out generic gasket device add code from the code for adding a PCI gasket device, in prep for other gasket device types in the future. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 76 ++-- 1 file changed, 48 insertions

[PATCH 12/16] staging: gasket: core: factor out generic device remove code from PCI

2018-08-09 Thread Todd Poynor
From: Todd Poynor Separate code for generic parts of gasket device removal sequence from the PCI device removal code, in prep for non-PCI devices later. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[PATCH 06/16] staging: gasket: remove gasket_exit()

2018-08-09 Thread Todd Poynor
From: Todd Poynor Remove now-empty gasket_exit() function. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 0fe5b86b294c8..aee819f379e9a

[PATCH 08/16] staging: gasket: page table: use dma_mapping_error for error detection

2018-08-09 Thread Todd Poynor
From: Todd Poynor gasket_perform_mapping() call dma_mapping_error() to determine if mapping failed. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b

[PATCH 14/16] staging: gasket: interrupt: refactor PCI MSIX-specific handler code

2018-08-09 Thread Todd Poynor
From: Todd Poynor Split interrupt handler into PCI MSIX-specific and generic functions, for adding non-MSIX handlers in the future. Move MSIX init code together,, out of generic init path. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_interrupt.c | 48

[PATCH 08/16] staging: gasket: page table: use dma_mapping_error for error detection

2018-08-09 Thread Todd Poynor
From: Todd Poynor gasket_perform_mapping() call dma_mapping_error() to determine if mapping failed. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b

[PATCH 14/16] staging: gasket: interrupt: refactor PCI MSIX-specific handler code

2018-08-09 Thread Todd Poynor
From: Todd Poynor Split interrupt handler into PCI MSIX-specific and generic functions, for adding non-MSIX handlers in the future. Move MSIX init code together,, out of generic init path. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_interrupt.c | 48

[PATCH 16/16] staging: gasket: interrupt: remove unimplemented interrupt types

2018-08-09 Thread Todd Poynor
From: Todd Poynor Interrupt types PCI_MSI and PLATFORM_WIRE are unused and unimplemented. Remove these. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 11 drivers/staging/gasket/gasket_interrupt.c | 34 +-- 2 files changed, 1 insertion

[PATCH 16/16] staging: gasket: interrupt: remove unimplemented interrupt types

2018-08-09 Thread Todd Poynor
From: Todd Poynor Interrupt types PCI_MSI and PLATFORM_WIRE are unused and unimplemented. Remove these. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 11 drivers/staging/gasket/gasket_interrupt.c | 34 +-- 2 files changed, 1 insertion

[PATCH 04/16] staging: gasket: core: remove kobj_name param from gasket_alloc_dev

2018-08-09 Thread Todd Poynor
From: Todd Poynor gasket_alloc_dev can retrieve the device name from the parent parameter, a separate parameter isn't needed for this. Rename the variable to better reflect its meaning, as the name of the parent device for which a gasket device is being allocated. Signed-off-by: Todd Poynor

[PATCH 01/16] MAINTAINERS: Switch a maintainer for drivers/staging/gasket

2018-08-09 Thread Todd Poynor
From: Todd Poynor Todd Poynor takes over for John Joseph. Signed-off-by: John Joseph Signed-off-by: Todd Poynor --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index af64fe0f0b41f..f3466b5c50482 100644 --- a/MAINTAINERS +++ b

[PATCH 15/16] staging: gasket: interrupt: simplify interrupt init parameters

2018-08-09 Thread Todd Poynor
From: Todd Poynor Pass the gasket driver descriptor to the interrupt init function, rather than exploding out separate parameters from various fields of that structure. This allows us to make more localized changes to the types of interrupts supported (MSIX vs. wire, etc.) without affecting

[PATCH 09/16] staging: gasket: core: switch to relaxed memory-mapped I/O

2018-08-09 Thread Todd Poynor
From: Todd Poynor Use of readl() is deprecated; readl_relaxed() with appropriate memory barriers is preferred. Switch to relaxed reads and writes for better performance as well. Memory barriers required for I/O vs. normal memory access on Apex devices have already been explicitly coded

[PATCH 10/16] staging: gasket: page table: remove extraneous memory barriers

2018-08-09 Thread Todd Poynor
From: Todd Poynor Some explicit memory barriers in the page table code are not necessary, either because: (a) The barrier follows a non-relaxed MMIO access that already performs a read or write memory barrier. (b) The barrier follows DMA API calls for which the device-visible effects of IOMMU

[PATCH 04/16] staging: gasket: core: remove kobj_name param from gasket_alloc_dev

2018-08-09 Thread Todd Poynor
From: Todd Poynor gasket_alloc_dev can retrieve the device name from the parent parameter, a separate parameter isn't needed for this. Rename the variable to better reflect its meaning, as the name of the parent device for which a gasket device is being allocated. Signed-off-by: Todd Poynor

[PATCH 01/16] MAINTAINERS: Switch a maintainer for drivers/staging/gasket

2018-08-09 Thread Todd Poynor
From: Todd Poynor Todd Poynor takes over for John Joseph. Signed-off-by: John Joseph Signed-off-by: Todd Poynor --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index af64fe0f0b41f..f3466b5c50482 100644 --- a/MAINTAINERS +++ b

[PATCH 15/16] staging: gasket: interrupt: simplify interrupt init parameters

2018-08-09 Thread Todd Poynor
From: Todd Poynor Pass the gasket driver descriptor to the interrupt init function, rather than exploding out separate parameters from various fields of that structure. This allows us to make more localized changes to the types of interrupts supported (MSIX vs. wire, etc.) without affecting

  1   2   3   4   5   6   7   8   >