Re: [oss-drivers] [PATCH 16/20] ethernet: netronome: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Simon Horman
On Mon, Aug 17, 2020 at 01:54:30PM +0530, Allen Pais wrote: > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly. > > Signed-off-by: Romain Pe

[PATCH v1 00/10] DDW indirect mapping

2020-08-17 Thread Leonardo Bras
This patchset must be applied on top of: http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=194179&state=%2A&archive=both As of today, if the biggest DDW that can be created can't map the whole partition, it's creation is skipped and the default DMA window ibm,dma-window" is used instea

[PATCH v1 01/10] powerpc/pseries/iommu: Replace hard-coded page shift

2020-08-17 Thread Leonardo Bras
Some functions assume IOMMU page size can only be 4K (pageshift == 12). Update them to accept any page size passed, so we can use 64K pages. In the process, some defines like TCE_SHIFT were made obsolete, and then removed. TCE_RPN_MASK was updated to generate a mask according to the pageshift used

[PATCH v1 02/10] powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE on iommu_*_coherent()

2020-08-17 Thread Leonardo Bras
Both iommu_alloc_coherent() and iommu_free_coherent() assume that once size is aligned to PAGE_SIZE it will be aligned to IOMMU_PAGE_SIZE. Update those functions to guarantee alignment with requested size using IOMMU_PAGE_ALIGN() before doing iommu_alloc() / iommu_free(). Also, on iommu_range_all

[PATCH v1 03/10] powerpc/kernel/iommu: Use largepool as a last resort when !largealloc

2020-08-17 Thread Leonardo Bras
As of today, doing iommu_range_alloc() only for !largealloc (npages <= 15) will only be able to use 3/4 of the available pages, given pages on largepool not being available for !largealloc. This could mean some drivers not being able to fully use all the available pages for the DMA window. Add p

[PATCH v1 04/10] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2020-08-17 Thread Leonardo Bras
Having a function to check if the iommu table has any allocation helps deciding if a tbl can be reset for using a new DMA window. It should be enough to replace all instances of !bitmap_empty(tbl...). iommu_table_in_use() skips reserved memory, so we don't need to worry about releasing it before

[PATCH v1 05/10] powerpc/pseries/iommu: Add iommu_pseries_alloc_table() helper

2020-08-17 Thread Leonardo Bras
Creates a helper to allow allocating a new iommu_table without the need to reallocate the iommu_group. This will be helpful for replacing the iommu_table for the new DMA window, after we remove the old one with iommu_tce_table_put(). Signed-off-by: Leonardo Bras --- arch/powerpc/platforms/pseri

[PATCH v1 06/10] powerpc/pseries/iommu: Add ddw_list_add() helper

2020-08-17 Thread Leonardo Bras
There are two functions adding DDW to the direct_window_list in a similar way, so create a ddw_list_add() to avoid duplicity and simplify those functions. Also, on enable_ddw(), add list_del() on out_free_window to allow removing the window from list if any error occurs. Signed-off-by: Leonardo B

[PATCH v1 07/10] powerpc/pseries/iommu: Allow DDW windows starting at 0x00

2020-08-17 Thread Leonardo Bras
enable_ddw() currently returns the address of the DMA window, which is considered invalid if has the value 0x00. Also, it only considers valid an address returned from find_existing_ddw if it's not 0x00. Changing this behavior makes sense, given the users of enable_ddw() only need to know if dire

[PATCH v1 08/10] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw()

2020-08-17 Thread Leonardo Bras
Code used to create a ddw property that was previously scattered in enable_ddw() is now gathered in ddw_property_create(), which deals with allocation and filling the property, letting it ready for of_property_add(), which now occurs in sequence. This created an opportunity to reorganize the secon

[PATCH v1 09/10] powerpc/pseries/iommu: Make use of DDW even if it does not map the partition

2020-08-17 Thread Leonardo Bras
As of today, if the biggest DDW that can be created can't map the whole partition, it's creation is skipped and the default DMA window "ibm,dma-window" is used instead. DDW is 16x bigger than the default DMA window, having the same amount of pages, but increasing the page size to 64k. Besides larg

[PATCH v1 10/10] powerpc/pseries/iommu: Rename "direct window" to "dma window"

2020-08-17 Thread Leonardo Bras
A previous change introduced the usage of DDW as a bigger indirect DMA mapping when the DDW available size does not map the whole partition. As most of the code that manipulates direct mappings was reused for indirect mappings, it's necessary to rename all names and debug/info messages to reflect

Re: [PATCH V6 0/2] powerpc/perf: Add support for perf extended regs in powerpc

2020-08-17 Thread Michael Ellerman
On Fri, 7 Aug 2020 06:04:59 -0400, Athira Rajeev wrote: > Patch set to add support for perf extended register capability in > powerpc. The capability flag PERF_PMU_CAP_EXTENDED_REGS, is used to > indicate the PMU which support extended registers. The generic code > define the mask of extended regis

Re: [PATCH 1/2] powerpc/kernel/cputable: cleanup the function declarations

2020-08-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 06:26:17 +0530, Madhavan Srinivasan wrote: > __machine_check_early_realmode_p*() are currently declared > as extern in cputable.c and because of this when compiled > with "C=1" (which enables semantic checker) produces these > warnings. > > CHECK arch/powerpc/kernel/mce_pow

Re: [PATCH] powerpc: Fix P10 PVR revision in /proc/cpuinfo for SMT4 cores

2020-08-17 Thread Michael Ellerman
On Mon, 3 Aug 2020 13:56:00 +1000, Michael Neuling wrote: > On POWER10 bit 12 in the PVR indicates if the core is SMT4 or > SMT8. Bit 12 is set for SMT4. > > Without this patch, /proc/cpuinfo on a SMT4 DD1 POWER10 looks like > this: > cpu : POWER10, altivec supported > revision

Re: [PATCH v4] selftests/powerpc: Fix pkey syscall redefinitions

2020-08-17 Thread Michael Ellerman
On Tue, 4 Aug 2020 23:01:37 +0530, Sandipan Das wrote: > On distros using older glibc versions, the pkey tests > encounter build failures due to redefinition of the > pkey syscall numbers. > > For compatibility, commit 743f3544fffb added a wrapper > for the gettid() syscall and included syscall.h

Re: [PATCH 1/2] powerpc/64s: remove PROT_SAO support

2020-08-17 Thread Shawn Anastasio
I'm a bit concerned about the removal of PROT_SAO. From what I can see, a feature like this would be extremely useful for emulating architectures with stronger memory models. QEMU's multi- threaded TCG project in particular looks like it would be a good candidate, since as far as I'm aware it is

[RFC PATCH 1/2] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-08-17 Thread Nicholas Piggin
The de facto (and apparently uncommented) standard for using an mm had, thanks to this code in sparc if nothing else, been that you must have a reference on mm_users *and that reference must have been obtained with mmget()*, i.e., from a thread with a reference to mm_users that had used the mm. Th

[RFC PATCH 2/2] powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm

2020-08-17 Thread Nicholas Piggin
Commit 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") added a mechanism to trim the mm_cpumask of a process under certain conditions. One of the assumptions is that mm_users would not be incremented via a reference outside the process context with mmget_not

[PATCH] powerpc/pseries/eeh: Fix dumb linebreaks

2020-08-17 Thread Oliver O'Halloran
These annoy me every time I see them. Why are they here? They're not even needed for 80cols compliance. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/pseries/eeh_pseries.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/platforms/pserie

[PATCH v2] soc: fsl: enable acpi support

2020-08-17 Thread Ran Wang
From: Peng Ma This patch enables ACPI support in RCPM driver. Signed-off-by: Peng Ma Signed-off-by: Ran Wang --- Change in v2: - Update acpi_device_id to fix conflict with other driver drivers/soc/fsl/rcpm.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dri

Re: [PATCH v2] powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory

2020-08-17 Thread Christoph Hellwig
On Mon, Aug 17, 2020 at 06:46:58PM -0300, Thiago Jung Bauermann wrote: > POWER secure guests (i.e., guests which use the Protection Execution > Facility) need to use SWIOTLB to be able to do I/O with the hypervisor, but > they don't need the SWIOTLB memory to be in low addresses since the > hypervi

<    1   2