[PATCH 3/3] swiotlb: remove swiotlb_nr_tbl

2021-03-18 Thread Christoph Hellwig
All callers just use it to check if swiotlb is active at all, for which they can just use is_swiotlb_active. In the longer run drivers need to stop using is_swiotlb_active as well, but let's do the simple step first. Signed-off-by: Christoph Hellwig ---

swiotlb cleanups v3

2021-03-18 Thread Christoph Hellwig
Hi Konrad, this series contains a bunch of swiotlb cleanups, mostly to reduce the amount of internals exposed to code outside of swiotlb.c, which should helper to prepare for supporting multiple different bounce buffer pools. Changes since v2: - fix a bisetion hazard that did not allocate the

[PATCH 08/10] crypto: vmx: Source headers are not good kernel-doc candidates

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/vmx/vmx.c:23: warning: expecting prototype for Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead Cc: "Breno Leitão" Cc: Nayna Jain Cc: Paulo Flabiano Smorigo Cc: Michael Ellerman Cc:

[PATCH 2/3] swiotlb: dynamically allocate io_tlb_default_mem

2021-03-18 Thread Christoph Hellwig
Instead of allocating ->list and ->orig_addr separately just do one dynamic allocation for the actual io_tlb_mem structure. This simplifies a lot of the initialization code, and also allows to just check io_tlb_default_mem to see if swiotlb is in use. Signed-off-by: Christoph Hellwig ---

[PATCH 1/3] swiotlb: move global variables into a new io_tlb_mem structure

2021-03-18 Thread Christoph Hellwig
From: Claire Chang Added a new struct, io_tlb_mem, as the IO TLB memory pool descriptor and moved relevant global variables into that struct. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang [hch: rebased] Signed-off-by: Christoph Hellwig ---

Re: Advice needed on SMP regression after cpu_core_mask change

2021-03-18 Thread Srikar Dronamraju
* Daniel Henrique Barboza [2021-03-17 10:00:34]: > Hello, > > Patch 4bce545903fa ("powerpc/topology: Update topology_core_cpumask") > introduced > a regression in both upstream and RHEL downstream kernels [1]. The assumption > made > in the commit: > > "Further analysis shows that

Re: Advice needed on SMP regression after cpu_core_mask change

2021-03-18 Thread Daniel Henrique Barboza
On 3/18/21 10:42 AM, Srikar Dronamraju wrote: * Daniel Henrique Barboza [2021-03-17 10:00:34]: Hello, Patch 4bce545903fa ("powerpc/topology: Update topology_core_cpumask") introduced a regression in both upstream and RHEL downstream kernels [1]. The assumption made in the commit:

Re: [PATCH 1/2] audit: add support for the openat2 syscall

2021-03-18 Thread Christian Brauner
On Thu, Mar 18, 2021 at 11:48:45AM +0100, Christian Brauner wrote: > [+Cc Aleksa, the author of openat2()] > > and a comment below. :) > > On Wed, Mar 17, 2021 at 09:47:17PM -0400, Richard Guy Briggs wrote: > > The openat2(2) syscall was added in kernel v5.6 with commit fddb5d430ad9 > > ("open:

Re: [PATCH 1/2] audit: add support for the openat2 syscall

2021-03-18 Thread Richard Guy Briggs
On 2021-03-18 11:48, Christian Brauner wrote: > [+Cc Aleksa, the author of openat2()] Ah! Thanks for pulling in Aleksa. I thought I caught everyone... > and a comment below. :) Same... > On Wed, Mar 17, 2021 at 09:47:17PM -0400, Richard Guy Briggs wrote: > > The openat2(2) syscall was added

Re: [PATCH v2 4/6] mm/mremap: Use mmu gather interface instead of flush_tlb_range

2021-03-18 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of March 15, 2021 9:38 pm: > Some architectures do have the concept of page walk cache and only mmu gather > interface supports flushing them. A fast mremap that involves moving page > table pages instead of copying pte entries should flush page walk cache

Re: [PATCH 07/10] MIPS: disable CONFIG_IDE in bigsur_defconfig

2021-03-18 Thread Sergei Shtylyov
Hi! On 3/18/21 7:57 AM, Christoph Hellwig wrote: > bigsur_defconfig enables CONFIG_IDE for the tc86c001 ide driver, which > is a Toshiba plug in card that does not make much sense to use on bigsur ^ for Else that doesn't make much sense. :-) > platforms. For all other ATA cards libata

Re: [PATCH v2 4/6] mm/mremap: Use mmu gather interface instead of flush_tlb_range

2021-03-18 Thread kernel test robot
Hi "Aneesh, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on kselftest/next v5.12-rc3 next-20210317] [cannot apply to hnaz-linux-mm/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

[PATCH] pseries: prevent free CPU ids to be reused on another node

2021-03-18 Thread Laurent Dufour
When a CPU is hot added, the CPU ids are taken from the available mask from the lower possible set. If that set of values was previously used for CPU attached to a different node, this seems to application like if these CPUs have migrated from a node to another one which is not expected in real

Re: [PATCH 1/2] audit: add support for the openat2 syscall

2021-03-18 Thread Christian Brauner
[+Cc Aleksa, the author of openat2()] and a comment below. :) On Wed, Mar 17, 2021 at 09:47:17PM -0400, Richard Guy Briggs wrote: > The openat2(2) syscall was added in kernel v5.6 with commit fddb5d430ad9 > ("open: introduce openat2(2) syscall") > > Add the openat2(2) syscall to the audit

[PATCH v3 00/10] Rid W=1 warnings in Crypto

2021-03-18 Thread Lee Jones
This is set 1 of 2 sets required to fully clean Crypto. v2: No functional changes since v1. v3: Description change and additional struct header fix Lee Jones (10): crypto: hisilicon: sec_drv: Supply missing description for 'sec_queue_empty()'s 'queue' param crypto: bcm: Fix a whole host

Re: [PATCH 1/1] hotplug-cpu.c: show 'last online CPU' error in dlpar_cpu_remove()

2021-03-18 Thread Daniel Henrique Barboza
Ping On 3/5/21 2:38 PM, Daniel Henrique Barboza wrote: Of all the reasons that dlpar_cpu_remove() can fail, the 'last online CPU' is one that can be caused directly by the user offlining CPUs in a partition/virtual machine that has hotplugged CPUs. Trying to reclaim a hotplugged CPU can fail if

Re: [PATCH] powerpc/numa: Fix topology_physical_package_id() on pSeries

2021-03-18 Thread Daniel Henrique Barboza
On 3/18/21 4:28 AM, Cédric Le Goater wrote: Also we've been using it for several years and I don't think we should risk breaking anything by changing the value now. I guess we can leave it that way. Please read the commit log of the second patch (not tagged as a v2 ...). But we should

Re: [PATCH 08/10] MIPS: disable CONFIG_IDE in malta*_defconfig

2021-03-18 Thread Sergei Shtylyov
On 3/18/21 7:57 AM, Christoph Hellwig wrote: > Various malta defconfigs enable CONFIG_IDE for the tc86c001 ide driver, > hich is a Toshiba plug in card that does not make much sense to use on ^ which is for > bigsur platforms. For all other ATA cards libata support is already ^ Malta. >

[PATCH 09/10] crypto: nx: nx-aes-cbc: Repair some kernel-doc problems

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'tfm' not described in 'cbc_aes_nx_set_key' drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'in_key' not described in 'cbc_aes_nx_set_key'

Re: [PATCH 1/2] audit: add support for the openat2 syscall

2021-03-18 Thread Richard Guy Briggs
On 2021-03-18 11:52, Christian Brauner wrote: > On Thu, Mar 18, 2021 at 11:48:45AM +0100, Christian Brauner wrote: > > On Wed, Mar 17, 2021 at 09:47:17PM -0400, Richard Guy Briggs wrote: > > > The openat2(2) syscall was added in kernel v5.6 with commit fddb5d430ad9 > > > ("open: introduce

[PATCH] powerpc/embedded6xx: Remove CONFIG_MV64X60

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") moved the last selector of CONFIG_MV64X60. As it is not a user selectable config, it can be removed. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/embedded6xx/Kconfig | 5 - drivers/i2c/busses/Kconfig

Re: [PATCH] powerpc/embedded6xx: Remove CONFIG_MV64X60

2021-03-18 Thread Wolfram Sang
On Thu, Mar 18, 2021 at 05:25:07PM +, Christophe Leroy wrote: > Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") > moved the last selector of CONFIG_MV64X60. > > As it is not a user selectable config, it can be removed. > > Signed-off-by: Christophe Leroy Acked-by:

[PATCH v2] powerpc/qspinlock: Use generic smp_cond_load_relaxed

2021-03-18 Thread Davidlohr Bueso
49a7d46a06c3 (powerpc: Implement smp_cond_load_relaxed()) added busy-waiting pausing with a preferred SMT priority pattern, lowering the priority (reducing decode cycles) during the whole loop slowpath. However, data shows that while this pattern works well with simple spinlocks, queued spinlocks

Re: [PATCH] net: marvell: Remove reference to CONFIG_MV64X60

2021-03-18 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 18 Mar 2021 17:25:08 + (UTC) you wrote: > Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") > removed last selector of CONFIG_MV64X60. > > As it is not a user selectable config item, all

[PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings

2021-03-18 Thread kernel test robot
From: kernel test robot arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci

Re: [PATCH 01/10] alpha: use libata instead of the legacy ide driver

2021-03-18 Thread Måns Rullgård
Christoph Hellwig writes: > On Thu, Mar 18, 2021 at 05:54:55AM +, Al Viro wrote: >> On Thu, Mar 18, 2021 at 05:56:57AM +0100, Christoph Hellwig wrote: >> > Switch the alpha defconfig from the legacy ide driver to libata. >> >> Umm... I don't have an IDE alpha box in a usable shape (fans on

[PATCH] watchdog: Remove MV64x60 watchdog driver

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed the last selector of CONFIG_MV64X60. Therefore CONFIG_MV64X60_WDT cannot be selected anymore and can be removed. Signed-off-by: Christophe Leroy --- drivers/watchdog/Kconfig | 4 - drivers/watchdog/Makefile

[PATCH] net: marvell: Remove reference to CONFIG_MV64X60

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed last selector of CONFIG_MV64X60. As it is not a user selectable config item, all references to it are stale. Remove them. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/marvell/Kconfig | 4 ++--

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

2021-03-18 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

[PATCH 1/1] powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs

2021-03-18 Thread Leonardo Bras
Currently both iommu_alloc_coherent() and iommu_free_coherent() align the desired allocation size to PAGE_SIZE, and gets system pages and IOMMU mappings (TCEs) for that value. When IOMMU_PAGE_SIZE < PAGE_SIZE, this behavior may cause unnecessary TCEs to be created for mapping the whole system

Re: [PATCH 08/10] MIPS: disable CONFIG_IDE in malta*_defconfig

2021-03-18 Thread Thomas Bogendoerfer
On Thu, Mar 18, 2021 at 05:57:04AM +0100, Christoph Hellwig wrote: > arch/mips/configs/malta_kvm_guest_defconfig | 3 --- that file is gone in mips-next. I could take all MIPS patches into mips-next, if you want... Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not

Re: [PATCH] watchdog: Remove MV64x60 watchdog driver

2021-03-18 Thread Guenter Roeck
On 3/18/21 10:25 AM, Christophe Leroy wrote: > Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") > removed the last selector of CONFIG_MV64X60. > > Therefore CONFIG_MV64X60_WDT cannot be selected anymore and > can be removed. > > Signed-off-by: Christophe Leroy Reviewed-by:

Re: [PATCH 01/10] alpha: use libata instead of the legacy ide driver

2021-03-18 Thread Måns Rullgård
Måns Rullgård writes: > Christoph Hellwig writes: > >> On Thu, Mar 18, 2021 at 05:54:55AM +, Al Viro wrote: >>> On Thu, Mar 18, 2021 at 05:56:57AM +0100, Christoph Hellwig wrote: >>> > Switch the alpha defconfig from the legacy ide driver to libata. >>> >>> Umm... I don't have an IDE

Re: [PATCH 3/3] powerpc/qspinlock: Use generic smp_cond_load_relaxed

2021-03-18 Thread Davidlohr Bueso
On Tue, 16 Mar 2021, Nicholas Piggin wrote: One request, could you add a comment in place that references smp_cond_load_relaxed() so this commit can be found again if someone looks at it? Something like this /* * smp_cond_load_relaxed was found to have performance problems if * implemented

Re: [RFC PATCH 7/8] powerpc/purgatory: drop .machine specifier

2021-03-18 Thread Nicholas Piggin
Excerpts from Segher Boessenkool's message of February 26, 2021 1:58 am: > On Thu, Feb 25, 2021 at 02:10:05PM +1100, Daniel Axtens wrote: >> It's ignored by future versions of llvm's integrated assembler (by not -11). >> I'm not sure what it does for us in gas. > > It enables all insns that exist

Re: [RFC PATCH 8/8] powerpc/64/asm: don't reassign labels

2021-03-18 Thread Nicholas Piggin
Excerpts from Daniel Axtens's message of February 26, 2021 10:28 am: > Segher Boessenkool writes: > >> On Thu, Feb 25, 2021 at 02:10:06PM +1100, Daniel Axtens wrote: >>> The assembler really does not like us reassigning things to the same >>> label: >>> >>> :7:9: error: invalid reassignment of

Re: [PATCH v9 1/8] powerpc/mm: Implement set_memory() routines

2021-03-18 Thread Michael Ellerman
Jordan Niethe writes: > From: Russell Currey > > The set_memory_{ro/rw/nx/x}() functions are required for STRICT_MODULE_RWX, > and are generally useful primitives to have. This implementation is > designed to be completely generic across powerpc's many MMUs. > > It's possible that this could be

Re: [PATCH] powerpc/mm: Revert "powerpc/mm: Remove DEBUG_VM_PGTABLE support on powerpc"

2021-03-18 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > This reverts commit 675bceb097e6 ("powerpc/mm: Remove DEBUG_VM_PGTABLE > support on powerpc") > > All the related issues are fixed by the series > https://lore.kernel.org/linux-mm/20200902114222.181353-1-aneesh.ku...@linux.ibm.com Was that series merged? If so this

Re: [RFC PATCH 3/8] powerpc/head-64: do less gas-specific stuff with sections

2021-03-18 Thread Nicholas Piggin
Excerpts from Daniel Axtens's message of February 25, 2021 1:10 pm: > Reopening the section without specifying the same flags breaks > the llvm integrated assembler. Don't do it: just specify all the > flags all the time. I don't have a problem with this but llvm might want to track the issue if

Re: remove the legacy ide driver

2021-03-18 Thread Finn Thain
On Thu, 18 Mar 2021, Christoph Hellwig wrote: > Hi all, > > we've been trying to get rid of the legacy ide driver for a while now, > and finally scheduled a removal for 2021, which is three month old now. > > In general distros and most defconfigs have switched to libata long ago, > but there

Re: [RFC PATCH 6/8] powerpc/mm/book3s64/hash: drop pre 2.06 tlbiel for clang

2021-03-18 Thread Nicholas Piggin
Excerpts from Daniel Axtens's message of February 25, 2021 1:10 pm: > The llvm integrated assembler does not recognise the ISA 2.05 tlbiel > version. Eventually do this more smartly. The whole thing with TLBIE and TLBIEL in this file seems a bit too clever. We should have PPC_TLBIE* macros for

Re: [RFC PATCH 4/8] powerpc/ppc_asm: use plain numbers for registers

2021-03-18 Thread Nicholas Piggin
Excerpts from Daniel Axtens's message of February 26, 2021 10:12 am: > Segher Boessenkool writes: > >> On Thu, Feb 25, 2021 at 02:10:02PM +1100, Daniel Axtens wrote: >>> This is dumb but makes the llvm integrated assembler happy. >>> https://github.com/ClangBuiltLinux/linux/issues/764 >> >>>

[for-stable-4.19 PATCH 1/2] vmlinux.lds.h: Create section for protection against instrumentation

2021-03-18 Thread Nicolas Boichat
From: Thomas Gleixner commit 655389433e7efec589838b400a2a652b3ffa upstream. Some code pathes, especially the low level entry code, must be protected against instrumentation for various reasons: - Low level entry code can be a fragile beast, especially on x86. - With NO_HZ_FULL RCU state

Re: [PATCH 04/10] MIPS: disable CONFIG_IDE in sb1250_swarm_defconfig

2021-03-18 Thread Maciej W. Rozycki
On Thu, 18 Mar 2021, Christoph Hellwig wrote: > sb1250_swarm_defconfig enables CONFIG_IDE but no actual host controller > driver, so just drop CONFIG_IDE, CONFIG_BLK_DEV_IDECD and > CONFIG_BLK_DEV_IDETAPE as they are useless. Actually BLK_DEV_PLATFORM would handle the SWARM's platform driver as

[for-stable-4.19 PATCH 0/2] Backport patches to fix KASAN+LKDTM with recent clang on ARM64

2021-03-18 Thread Nicolas Boichat
Backport 2 patches that are required to make KASAN+LKDTM work with recent clang (patch 2/2 has a complete description). Tested on our chromeos-4.19 branch. Patch 1/2 is context conflict only, and 2/2 is a clean backport. These patches have been merged to 5.4 stable already. We might need to

Re: [PATCH 00/36] [Set 4] Rid W=1 warnings in SCSI

2021-03-18 Thread Martin K. Petersen
Lee, > This set is part of a larger effort attempting to clean-up W=1 kernel > builds, which are currently overwhelmingly riddled with niggly little > warnings. Applied to 5.13/scsi-staging, thanks! I fixed a few little things. -- Martin K. Petersen Oracle Linux Engineering

Re: [RFC PATCH 2/8] powerpc: check for support for -Wa, -m{power4, any}

2021-03-18 Thread Nicholas Piggin
Excerpts from Daniel Axtens's message of February 25, 2021 1:10 pm: > LLVM's integrated assembler does not like either -Wa,-mpower4 > or -Wa,-many. So just don't pass them if they're not supported. > > Signed-off-by: Daniel Axtens > --- > arch/powerpc/Makefile | 4 +++- > 1 file changed, 3

Re: remove the legacy ide driver

2021-03-18 Thread Christoph Hellwig
On Fri, Mar 19, 2021 at 12:43:48PM +1100, Finn Thain wrote: > A few months ago I wrote another patch to move some more platforms away > from macide but it has not been tested yet. That is not to say you should > wait. However, my patch does have some changes that are missing from your > patch

Re: [PATCH 01/10] alpha: use libata instead of the legacy ide driver

2021-03-18 Thread Al Viro
On Thu, Mar 18, 2021 at 05:56:57AM +0100, Christoph Hellwig wrote: > Switch the alpha defconfig from the legacy ide driver to libata. Umm... I don't have an IDE alpha box in a usable shape (fans on CPU module shat themselves), and it would take a while to resurrect it, but I remember the joy it

Re: [PATCH 01/10] alpha: use libata instead of the legacy ide driver

2021-03-18 Thread Christoph Hellwig
On Thu, Mar 18, 2021 at 05:54:55AM +, Al Viro wrote: > On Thu, Mar 18, 2021 at 05:56:57AM +0100, Christoph Hellwig wrote: > > Switch the alpha defconfig from the legacy ide driver to libata. > > Umm... I don't have an IDE alpha box in a usable shape (fans on > CPU module shat themselves),

Re: [PATCH] powerpc/numa: Fix topology_physical_package_id() on pSeries

2021-03-18 Thread Cédric Le Goater
> Also we've been using it for several years and I don't think we should > risk breaking anything by changing the value now. I guess we can leave it that way. Please read the commit log of the second patch (not tagged as a v2 ...). But we should remove ibm,chip-id from QEMU since the property

Re: [PATCH 01/10] alpha: use libata instead of the legacy ide driver

2021-03-18 Thread John Paul Adrian Glaubitz
Hi Al! On 3/18/21 6:54 AM, Al Viro wrote: > On Thu, Mar 18, 2021 at 05:56:57AM +0100, Christoph Hellwig wrote: >> Switch the alpha defconfig from the legacy ide driver to libata. > > Umm... I don't have an IDE alpha box in a usable shape (fans on > CPU module shat themselves), and it would take