Re: [PATCH] powerpc/32s: Setup the early hash table at all time.

2020-10-29 Thread Michael Ellerman
Andreas Schwab writes: > On Okt 01 2020, Christophe Leroy wrote: > >> At the time being, an early hash table is set up when >> CONFIG_KASAN is selected. >> >> There is nothing wrong with setting such an early hash table >> all the time, even if it is not used. This is a statically >> allocated

Re: [PATCH 02/29] powerpc/rtas: prevent suspend-related sys_rtas use on LE

2020-10-29 Thread Andrew Donnellan
On 30/10/20 12:17 pm, Nathan Lynch wrote: While drmgr has had work in some areas to make its RTAS syscall interactions endian-neutral, its code for performing partition migration via the syscall has never worked on LE. While it is able to complete ibm,suspend-me successfully, it crashes when

Re: [PATCH] powerpc: add support for TIF_NOTIFY_SIGNAL

2020-10-29 Thread Jens Axboe
On 10/29/20 6:48 PM, Michael Ellerman wrote: > Jens Axboe writes: >> Wire up TIF_NOTIFY_SIGNAL handling for powerpc. >> >> Cc: linuxppc-dev@lists.ozlabs.org >> Signed-off-by: Jens Axboe >> --- >> >> 5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting >> for details: >> >>

Re: [PATCH] ibmvfc: add new fields for version 2 of several MADs

2020-10-29 Thread Martin K. Petersen
Tyrel, > I'm going to have to ask that this patch be unstaged. Done! -- Martin K. Petersen Oracle Linux Engineering

[PATCH 26/29] powerpc/pseries/hibernation: perform post-suspend fixups later

2020-10-29 Thread Nathan Lynch
The pseries hibernate code calls post_mobility_fixup() which is sort of a dumping ground of fixups that need to run after resuming from suspend regardless of whether suspend was a hibernation or a migration. Calling post_mobility_fixup() from pseries_suspend_enable_irqs() runs this code early in

[PATCH 18/29] powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend ops

2020-10-29 Thread Nathan Lynch
There are three ways pseries_suspend_begin() can be reached: 1. When "mem" is written to /sys/power/state: kobj_attr_store() -> state_store() -> pm_suspend() -> suspend_devices_and_enter() -> pseries_suspend_begin() This never works because there is no way to supply a valid stream

[PATCH 29/29] powerpc/pseries/mobility: refactor node lookup during DT update

2020-10-29 Thread Nathan Lynch
In pseries_devicetree_update(), with each call to ibm,update-nodes the partition firmware communicates the node to be deleted or updated by placing its phandle in the work buffer. Each of delete_dt_node(), update_dt_node(), and add_dt_node() have duplicate lookups using the phandle value and

[PATCH 27/29] powerpc/pseries/hibernation: remove prepare_late() callback

2020-10-29 Thread Nathan Lynch
The pseries hibernate code no longer calls into the original join/suspend code in kernel/rtas.c, so pseries_prepare_late() and related code don't accomplish anything now. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/suspend.c | 25 1 file changed, 25

[PATCH 28/29] powerpc/rtas: remove unused rtas_suspend_me_data

2020-10-29 Thread Nathan Lynch
All code which used this type has been removed. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas-types.h | 8 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/include/asm/rtas-types.h b/arch/powerpc/include/asm/rtas-types.h index aa420561bc10..8df6235d64d1 100644

[PATCH 25/29] powerpc/pseries/hibernation: remove redundant cacheinfo update

2020-10-29 Thread Nathan Lynch
Partitions with cache nodes in the device tree can encounter the following warning on resume: CPU 0 already accounted in PowerPC,POWER9@0(Data) WARNING: CPU: 0 PID: 3177 at arch/powerpc/kernel/cacheinfo.c:197 cacheinfo_cpu_online+0x640/0x820 These calls to cacheinfo_cpu_offline/online have been

[PATCH 24/29] powerpc/rtas: remove unused rtas_suspend_last_cpu()

2020-10-29 Thread Nathan Lynch
rtas_suspend_last_cpu() is now unused, remove it and __rtas_suspend_last_cpu() which also becomes unused. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - arch/powerpc/kernel/rtas.c | 45 - 2 files changed, 46 deletions(-) diff --git

[PATCH 22/29] powerpc/rtas: remove rtas_suspend_cpu()

2020-10-29 Thread Nathan Lynch
rtas_suspend_cpu() no longer has users; remove it and __rtas_suspend_cpu() which now becomes unused as well. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - arch/powerpc/kernel/rtas.c | 52 - 2 files changed, 53 deletions(-) diff

[PATCH 23/29] powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me()

2020-10-29 Thread Nathan Lynch
rtas_suspend_last_cpu() and related code perform a lot of work that isn't relevant to the hibernation workflow. All other CPUs are offline when called so there is no need to place them in H_JOIN or prod them on resume, nor is there need for retries or operations on shared state. Call the

[PATCH 21/29] powerpc/machdep: remove suspend_disable_cpu()

2020-10-29 Thread Nathan Lynch
There are no users left of the suspend_disable_cpu() callback, remove it. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/machdep.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index

[PATCH 20/29] powerpc/pseries/hibernation: remove pseries_suspend_cpu()

2020-10-29 Thread Nathan Lynch
Since commit 48f6e7f6d948 ("powerpc/pseries: remove cede offline state for CPUs"), ppc_md.suspend_disable_cpu() is no longer used and all CPUs (save one) are placed into true offline state as opposed to H_JOIN. So pseries_suspend_cpu() is effectively unused; remove it. Signed-off-by: Nathan Lynch

[PATCH 17/29] powerpc/rtas: remove rtas_ibm_suspend_me_unsafe()

2020-10-29 Thread Nathan Lynch
rtas_ibm_suspend_me_unsafe() is now unused; remove it and rtas_percpu_suspend_me() which becomes unused as a result. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - arch/powerpc/kernel/rtas.c | 64 - 2 files changed, 65 deletions(-)

[PATCH 15/29] powerpc/pseries/mobility: retry partition suspend after error

2020-10-29 Thread Nathan Lynch
This is a mitigation for the relatively rare occurrence where a virtual IOA can be in a transient state that prevents the suspend/migration from succeeding, resulting in an error from ibm,suspend-me. If the join/suspend sequence returns an error, it is acceptable to retry as long as the VASI

[PATCH 19/29] powerpc/pseries/hibernation: pass stream id via function arguments

2020-10-29 Thread Nathan Lynch
There is no need for the stream id to be a file-global variable; pass it from hibernate_store() to pseries_suspend_begin() for the H_VASI_STATE call. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/suspend.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[PATCH 16/29] powerpc/rtas: dispatch partition migration requests to pseries

2020-10-29 Thread Nathan Lynch
sys_rtas() cannot call ibm,suspend-me directly in the same way it handles other inputs. Instead it must dispatch the request to code that can first perform the H_JOIN sequence before any call to ibm,suspend-me can succeed. Over time kernel/rtas.c has accreted a fair amount of platform-specific

[PATCH 14/29] powerpc/pseries/mobility: signal suspend cancellation to platform

2020-10-29 Thread Nathan Lynch
If we're returning an error to user space, use H_VASI_SIGNAL to send a cancellation request to the platform. This isn't strictly required but it communicates that Linux will not attempt to complete the suspend, which allows the various entities involved to promptly end the operation in progress.

[PATCH 13/29] powerpc/pseries/mobility: use stop_machine for join/suspend

2020-10-29 Thread Nathan Lynch
The partition suspend sequence as specified in the platform architecture requires that all active processor threads call H_JOIN, which: - suspends the calling thread until it is the target of an H_PROD; or - immediately returns H_CONTINUE, if the calling thread is the last to call H_JOIN.

[PATCH 12/29] powerpc/pseries/mobility: extract VASI session polling logic

2020-10-29 Thread Nathan Lynch
The behavior of rtas_ibm_suspend_me_unsafe() is to return -EAGAIN to the caller until the specified VASI suspend session state makes the transition from H_VASI_ENABLED to H_VASI_SUSPENDING. In the interest of separating concerns to prepare for a new implementation of the join/suspend sequence,

[PATCH 11/29] powerpc/pseries/mobility: use rtas_activate_firmware() on resume

2020-10-29 Thread Nathan Lynch
It's incorrect to abort post-suspend processing if ibm,activate-firmware isn't available. Use rtas_activate_firmware(), which logs this condition appropriately and allows us to proceed. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 15 +-- 1 file

[PATCH 10/29] powerpc/pseries/mobility: error message improvements

2020-10-29 Thread Nathan Lynch
- Convert printk(KERN_ERR) to pr_err(). - Include errno in property update failure message. - Remove reference to "Post-mobility" from device tree update message: with pr_err() it will have a "mobility:" prefix. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 7

[PATCH 09/29] powerpc/pseries/mobility: add missing break to default case

2020-10-29 Thread Nathan Lynch
update_dt_node() has a switch statement where the default case lacks a break statement. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/mobility.c

[PATCH 08/29] powerpc/pseries/mobility: don't error on absence of ibm, update-nodes

2020-10-29 Thread Nathan Lynch
Treat the absence of the ibm,update-nodes function as benign instead of reporting an error. If the platform does not provide that facility, it's not a problem for Linux. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 07/29] powerpc/hvcall: add token and codes for H_VASI_SIGNAL

2020-10-29 Thread Nathan Lynch
H_VASI_SIGNAL can be used by a partition to request cancellation of its migration. To be used in future changes. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/hvcall.h | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/include/asm/hvcall.h

[PATCH 05/29] powerpc/rtas: add rtas_ibm_suspend_me()

2020-10-29 Thread Nathan Lynch
Now that the name is available, provide a simple wrapper for ibm,suspend-me which returns both a Linux errno and optionally the actual RTAS status to the caller. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 + arch/powerpc/kernel/rtas.c | 57

[PATCH 00/29] partition suspend updates

2020-10-29 Thread Nathan Lynch
This series aims to improve the pseries-specific partition migration and hibernation implementation, part of which has been living in kernel/rtas.c. Most of that code is eliminated or moved to platforms/pseries, and the following major functional changes are made: - Use stop_machine() instead of

[PATCH 04/29] powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafe

2020-10-29 Thread Nathan Lynch
The pseries partition suspend sequence requires that all active CPUs call H_JOIN, which suspends all but one of them with interrupts disabled. The "chosen" CPU is then to call ibm,suspend-me to complete the suspend. Upon returning from ibm,suspend-me, the chosen CPU is to use H_PROD to wake the

[PATCH 06/29] powerpc/rtas: add rtas_activate_firmware()

2020-10-29 Thread Nathan Lynch
Provide a documented wrapper function for the ibm,activate-firmware service, which must be called after a partition migration or hibernation. If the function is absent or the call fails, the OS will continue to run normally with the current firmware, so there is no need to perform any recovery.

[PATCH 03/29] powerpc/rtas: complete ibm,suspend-me status codes

2020-10-29 Thread Nathan Lynch
We don't completely account for the possible return codes for ibm,suspend-me. Add definitions for these. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/rtas.h

[PATCH 02/29] powerpc/rtas: prevent suspend-related sys_rtas use on LE

2020-10-29 Thread Nathan Lynch
While drmgr has had work in some areas to make its RTAS syscall interactions endian-neutral, its code for performing partition migration via the syscall has never worked on LE. While it is able to complete ibm,suspend-me successfully, it crashes when attempting the subsequent ibm,update-nodes

[PATCH 01/29] powerpc/rtas: move rtas_call_reentrant() out of pseries guards

2020-10-29 Thread Nathan Lynch
rtas_call_reentrant() isn't platform-dependent; move it out of CONFIG_PPC_PSERIES-guarded code. Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c

Re: [PATCH] powerpc: add support for TIF_NOTIFY_SIGNAL

2020-10-29 Thread Michael Ellerman
Jens Axboe writes: > Wire up TIF_NOTIFY_SIGNAL handling for powerpc. > > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Jens Axboe > --- > > 5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting > for details: > >

Test Results: RE: [V2,03/18] highmem: Provide generic variant of kmap_atomic*

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2, 05/18] arc/mm/highmem: Use generic kmap atomic implementation

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2, 07/18] csky/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Re: [patch V2 00/18] mm/highmem: Preemptible variant of kmap_atomic & friends

2020-10-29 Thread Thomas Gleixner
On Thu, Oct 29 2020 at 16:11, Linus Torvalds wrote: > On Thu, Oct 29, 2020 at 3:32 PM Thomas Gleixner wrote: >> >> Though I wanted to share the current state of affairs before investigating >> that further. If there is consensus in going forward with this, I'll have a >> deeper look into this

Test Results: RE: [V2,06/18] ARM: highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,08/18] microblaze/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2, 09/18] mips/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,10/18] nds32/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,11/18] powerpc/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,12/18] sparc/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,13/18] xtensa/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,16/18] sched: highmem: Store local kmaps in task struct

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,14/18] mm/highmem: Remove the old kmap_atomic cruft

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,15/18] io-mapping: Cleanup atomic iomap

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Re: [PATCH 0/4] arch, mm: improve robustness of direct map manipulation

2020-10-29 Thread Edgecombe, Rick P
On Thu, 2020-10-29 at 10:12 +0200, Mike Rapoport wrote: > This series goal was primarily to separate dependincies and make it > clearer what DEBUG_PAGEALLOC and what SET_DIRECT_MAP are. As it > turned > out, there is also some lack of consistency between architectures > that > implement either of

Re: [PATCH 2/4] PM: hibernate: improve robustness of mapping pages in the direct map

2020-10-29 Thread Edgecombe, Rick P
On Thu, 2020-10-29 at 09:54 +0200, Mike Rapoport wrote: > __kernel_map_pages() on arm64 will also bail out if rodata_full is > false: > void __kernel_map_pages(struct page *page, int numpages, int enable) > { > if (!debug_pagealloc_enabled() && !rodata_full) > return; > >

Re: [patch V2 00/18] mm/highmem: Preemptible variant of kmap_atomic & friends

2020-10-29 Thread Linus Torvalds
On Thu, Oct 29, 2020 at 3:32 PM Thomas Gleixner wrote: > > > Though I wanted to share the current state of affairs before investigating > that further. If there is consensus in going forward with this, I'll have a > deeper look into this issue. Me likee. I think this looks like the right thing

Test Results: RE: [V2,17/18] mm/highmem: Provide kmap_local*

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Test Results: RE: [V2,18/18] io-mapping: Provide iomap_local variant

2020-10-29 Thread snowpatch
Thanks for your contribution, unfortunately we've found some issues. Your patch failed to apply to any branch.

Re: [PATCH 12/13] PCI: dwc: Move dw_pcie_setup_rc() to DWC common code

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:47 PM, Rob Herring wrote: > > All RC complex drivers must call dw_pcie_setup_rc(). The ordering of the > call shouldn't be too important other than being after any RC resets. > > There's a few calls of dw_pcie_setup_rc() left as drivers implementing > suspend/resume need it. > >

[patch V2 18/18] io-mapping: Provide iomap_local variant

2020-10-29 Thread Thomas Gleixner
Similar to kmap local provide a iomap local variant which only disables migration, but neither disables pagefaults nor preemption. Signed-off-by: Thomas Gleixner --- V2: Split out from the large combo patch and add the !IOMAP_ATOMIC variants --- include/linux/io-mapping.h | 34

[patch V2 17/18] mm/highmem: Provide kmap_local*

2020-10-29 Thread Thomas Gleixner
Now that the kmap atomic index is stored in task struct provide a preemptible variant. On context switch the maps of an outgoing task are removed and the map of the incoming task are restored. That's obviously slow, but highmem is slow anyway. The kmap_local.*() functions can be invoked from both

[patch V2 15/18] io-mapping: Cleanup atomic iomap

2020-10-29 Thread Thomas Gleixner
Switch the atomic iomap implementation over to kmap_local and stick the preempt/pagefault mechanics into the generic code similar to the kmap_atomic variants. Rename the x86 map function in preparation for a non-atomic variant. Signed-off-by: Thomas Gleixner --- V2: New patch to make review

[patch V2 14/18] mm/highmem: Remove the old kmap_atomic cruft

2020-10-29 Thread Thomas Gleixner
All users gone. Signed-off-by: Thomas Gleixner --- include/linux/highmem.h | 61 ++-- mm/highmem.c| 28 ++ 2 files changed, 27 insertions(+), 62 deletions(-) --- a/include/linux/highmem.h +++

[patch V2 16/18] sched: highmem: Store local kmaps in task struct

2020-10-29 Thread Thomas Gleixner
Instead of storing the map per CPU provide and use per task storage. That prepares for local kmaps which are preemptible. The context switch code is preparatory and not yet in use because kmap_atomic() runs with preemption disabled. Will be made usable in the next step. The context switch logic

[patch V2 13/18] xtensa/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- arch/xtensa/Kconfig |1 arch/xtensa/include/asm/highmem.h |9 +++ arch/xtensa/mm/highmem.c | 44

[patch V2 12/18] sparc/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org --- arch/sparc/Kconfig |1 arch/sparc/include/asm/highmem.h |7 +- arch/sparc/mm/Makefile |3 - arch/sparc/mm/highmem.c

[patch V2 11/18] powerpc/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig |1 arch/powerpc/include/asm/highmem.h |6 ++-

[patch V2 10/18] nds32/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
The mapping code is odd and looks broken. See FIXME in the comment. Signed-off-by: Thomas Gleixner Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen diff --git a/arch/nds32/Kconfig.cpu b/arch/nds32/Kconfig.cpu index f88a12fdf0f3..c7add11ea36e 100644 --- a/arch/nds32/Kconfig.cpu +++

[patch V2 09/18] mips/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: Thomas Bogendoerfer Cc: linux-m...@vger.kernel.org diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 8f328298f8cc..ed6b3de944a8 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2654,6

[patch V2 08/18] microblaze/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
No reason having the same code in every architecture. Signed-off-by: Thomas Gleixner Cc: Michal Simek diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index d262ac0c8714..186a0526564c 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -170,6 +170,7 @@ config

[patch V2 06/18] ARM: highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
No reason having the same code in every architecture. Signed-off-by: Thomas Gleixner Cc: Russell King Cc: Arnd Bergmann Cc: linux-arm-ker...@lists.infradead.org diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e00d94b16658..410235e350cc 100644 --- a/arch/arm/Kconfig +++

[patch V2 07/18] csky/mm/highmem: Switch to generic kmap atomic

2020-10-29 Thread Thomas Gleixner
No reason having the same code in every architecture. Signed-off-by: Thomas Gleixner Acked-by: Guo Ren Cc: linux-c...@vger.kernel.org --- arch/csky/Kconfig |1 arch/csky/include/asm/highmem.h |4 +- arch/csky/mm/highmem.c | 75

[patch V2 05/18] arc/mm/highmem: Use generic kmap atomic implementation

2020-10-29 Thread Thomas Gleixner
Adopt the map ordering to match the other architectures and the generic code. Signed-off-by: Thomas Gleixner Cc: Vineet Gupta Cc: linux-snps-...@lists.infradead.org --- arch/arc/Kconfig |1 arch/arc/include/asm/highmem.h |8 ++- arch/arc/mm/highmem.c | 44

[patch V2 03/18] highmem: Provide generic variant of kmap_atomic*

2020-10-29 Thread Thomas Gleixner
The kmap_atomic* interfaces in all architectures are pretty much the same except for post map operations (flush) and pre- and post unmap operations. Provide a generic variant for that. Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: linux...@kvack.org --- V2: Address review comments from

[patch V2 02/18] mm/highmem: Un-EXPORT __kmap_atomic_idx()

2020-10-29 Thread Thomas Gleixner
Nothing in modules can use that. Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: Andrew Morton Cc: linux...@kvack.org --- mm/highmem.c |2 -- 1 file changed, 2 deletions(-) --- a/mm/highmem.c +++ b/mm/highmem.c @@ -108,8 +108,6 @@ static inline wait_queue_head_t

[patch V2 01/18] sched: Make migrate_disable/enable() independent of RT

2020-10-29 Thread Thomas Gleixner
Now that the scheduler can deal with migrate disable properly, there is no real compelling reason to make it only available for RT. There are quite some code pathes which needlessly disable preemption in order to prevent migration and some constructs like kmap_atomic() enforce it implicitly.

[patch V2 04/18] x86/mm/highmem: Use generic kmap atomic implementation

2020-10-29 Thread Thomas Gleixner
Convert X86 to the generic kmap atomic implementation and make the iomap_atomic() naming convention consistent while at it. Signed-off-by: Thomas Gleixner Cc: x...@kernel.org --- arch/x86/Kconfig |3 +- arch/x86/include/asm/fixmap.h |1 arch/x86/include/asm/highmem.h |

[patch V2 00/18] mm/highmem: Preemptible variant of kmap_atomic & friends

2020-10-29 Thread Thomas Gleixner
Following up to the discussion in: https://lore.kernel.org/r/20200914204209.256266...@linutronix.de and the initial version of this: https://lore.kernel.org/r/20200919091751.06...@linutronix.de this series provides a preemptible variant of kmap_atomic & related interfaces. Now that

Re: [PATCH 11/13] PCI: dwc: Move dw_pcie_msi_init() into core

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:47 PM, Rob Herring wrote: > > The host drivers which call dw_pcie_msi_init() are all the ones using > the built-in MSI controller, so let's move it into the common DWC code. > > Cc: Kishon Vijay Abraham I > Cc: Lorenzo Pieralisi > Cc: Bjorn Helgaas > Cc: Jingoo Han Acked-by:

Re: [PATCH 10/13] PCI: dwc: Move link handling into common code

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:47 PM, Rob Herring wrote: > > All the DWC drivers do link setup and checks at roughly the same time. > Let's use the existing .start_link() hook (currently only used in EP > mode) and move the link handling to the core code. > > The behavior for a link down was inconsistent as some

Re: [PATCH 09/13] PCI: dwc: Rework MSI initialization

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:47 PM, Rob Herring wrote: > > There are 3 possible MSI implementations for the DWC host. The first is > using the built-in DWC MSI controller. The 2nd is a custom MSI > controller as part of the PCI host (keystone only). The 3rd is an > external MSI controller (typically GICv3

Re: [PATCH 08/13] PCI: dwc: Move MSI interrupt setup into DWC common code

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:47 PM, Rob Herring wrote: > > Platforms using the built-in DWC MSI controller all have a dedicated > interrupt with "msi" name or at index 0, so let's move setting up the > interrupt to the common DWC code. > > spear13xx and dra7xx are the 2 oddballs with muxed interrupts, so > we

Re: [PATCH 07/13] PCI: dwc: Drop the .set_num_vectors() host op

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:47 PM, Rob Herring wrote: > > There's no reason for the .set_num_vectors() host op. Drivers needing a > non-default value can just initialize pcie_port.num_vectors directly. > > Cc: Jingoo Han Acked-by: Jingoo Han Best regards, Jingoo Han > Cc: Gustavo Pimentel > Cc: Lorenzo

Re: [PATCH 05/13] PCI: dwc: Ensure all outbound ATU windows are reset

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:47 PM, Rob Herring wrote: > > The Layerscape driver clears the ATU registers which may have been > configured by the bootloader. Any driver could have the same issue > and doing it for all drivers doesn't hurt, so let's move it into the > common DWC code. > > Cc: Minghuan Lian >

Re: [PATCH 03/13] PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code

2020-10-29 Thread Jingoo Han
On 10/28/20, 4:46 PM, Rob Herring wrote: > > Most DWC drivers use the common register resource names "dbi", "dbi2", and > "addr_space", so let's move their setup into the DWC common code. > > This means 'dbi_base' in particular is setup later, but it looks like no > drivers touch DBI registers

Re: [PATCH] powerpc/32s: Setup the early hash table at all time.

2020-10-29 Thread Andreas Schwab
On Okt 01 2020, Christophe Leroy wrote: > At the time being, an early hash table is set up when > CONFIG_KASAN is selected. > > There is nothing wrong with setting such an early hash table > all the time, even if it is not used. This is a statically > allocated 256 kB table which lies in the init

Re: [PATCH 20/33] docs: ABI: testing: make the files compatible with ReST output

2020-10-29 Thread Jonathan Cameron
On Wed, 28 Oct 2020 15:23:18 +0100 Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > > Some files over there won't parse well by Sphinx. > > Fix them. > > Signed-off-by: Mauro Carvalho Chehab > Signed-off-by: Mauro Carvalho Chehab Query below... I'm going to guess a rebase

Re: [PATCH 1/3] powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()

2020-10-29 Thread Andreas Schwab
# # Automatically generated file; DO NOT EDIT. # Linux/powerpc 5.10.0-rc1 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc-4.9 (SUSE Linux) 4.9.3" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=40903 CONFIG_LD_VERSION=23501 CONFIG_CLANG_VERSION=0 CONFIG_CC_CAN_LINK=y CONFIG_CC_CAN_LINK_STATIC=y

Re: [PATCH v2 2/4] PM: hibernate: make direct map manipulations more explicit

2020-10-29 Thread Rafael J. Wysocki
On Thu, Oct 29, 2020 at 5:19 PM Mike Rapoport wrote: > > From: Mike Rapoport > > When DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP is enabled a page may be > not present in the direct map and has to be explicitly mapped before it > could be copied. > > On arm64 it is possible that a page would be

[PATCH v1 4/4] powernv/memtrace: don't abuse memory hot(un)plug infrastructure for memory allocations

2020-10-29 Thread David Hildenbrand
Let's use alloc_contig_pages() for allocating memory and remove the linear mapping manually via arch_remove_linear_mapping(). Mark all pages PG_offline, such that they will definitely not get touched - e.g., when hibernating. When freeing memory, try to revert what we did. The original idea was

[PATCH v1 3/4] powerpc/mm: remove linear mapping if __add_pages() fails in arch_add_memory()

2020-10-29 Thread David Hildenbrand
Let's revert what we did in case seomthing goes wrong and we return an error. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Rashmica Gupta Cc: Andrew Morton Cc: Mike Rapoport Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei Yang Signed-off-by: David Hildenbrand ---

[PATCH v1 2/4] powerpc/mm: print warning in arch_remove_linear_mapping()

2020-10-29 Thread David Hildenbrand
Let's print a warning similar to in arch_add_linear_mapping() instead of WARN_ON_ONCE() and eventually crashing the kernel. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Rashmica Gupta Cc: Andrew Morton Cc: Mike Rapoport Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei

[PATCH v1 1/4] powerpc/mm: factor out creating/removing linear mapping

2020-10-29 Thread David Hildenbrand
We want to stop abusing memory hotplug infrastructure in memtrace code to perform allocations and remove the linear mapping. Instead we will use alloc_contig_pages() and remove the identity mapping manually. Let's factor out creating/removing the linear mapping into arch_create_linear_mapping() /

[PATCH v1 0/4] powernv/memtrace: don't abuse memory hot(un)plug infrastructure for memory allocations

2020-10-29 Thread David Hildenbrand
powernv/memtrace is the only in-kernel user that rips out random memory it never added (doesn't own) in order to allocate memory without a linear mapping. Let's stop abusing memory hot(un)plug infrastructure for that - use alloc_contig_pages() for allocating memory and remove the linear mapping

[PATCH v2 4/4] arch, mm: make kernel_page_present() always available

2020-10-29 Thread Mike Rapoport
From: Mike Rapoport For architectures that enable ARCH_HAS_SET_MEMORY having the ability to verify that a page is mapped in the kernel direct map can be useful regardless of hibernation. Add RISC-V implementation of kernel_page_present(), update its forward declarations and stubs to be a part

[PATCH v2 3/4] arch, mm: restore dependency of __kernel_map_pages() of DEBUG_PAGEALLOC

2020-10-29 Thread Mike Rapoport
From: Mike Rapoport The design of DEBUG_PAGEALLOC presumes that __kernel_map_pages() must never fail. With this assumption is wouldn't be safe to allow general usage of this function. Moreover, some architectures that implement __kernel_map_pages() have this function guarded by #ifdef

[PATCH] powerpc: add support for TIF_NOTIFY_SIGNAL

2020-10-29 Thread Jens Axboe
Wire up TIF_NOTIFY_SIGNAL handling for powerpc. Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Jens Axboe --- 5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting for details: https://lore.kernel.org/io-uring/20201026203230.386348-1-ax...@kernel.dk/ As part of that work, I'm

[PATCH v2 2/4] PM: hibernate: make direct map manipulations more explicit

2020-10-29 Thread Mike Rapoport
From: Mike Rapoport When DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP is enabled a page may be not present in the direct map and has to be explicitly mapped before it could be copied. On arm64 it is possible that a page would be removed from the direct map using set_direct_map_invalid_noflush()

[PATCH v2 1/4] mm: introduce debug_pagealloc_map_pages() helper

2020-10-29 Thread Mike Rapoport
From: Mike Rapoport When CONFIG_DEBUG_PAGEALLOC is enabled, it unmaps pages from the kernel direct mapping after free_pages(). The pages than need to be mapped back before they could be used. Theese mapping operations use __kernel_map_pages() guarded with with debug_pagealloc_enabled(). The

[PATCH v2 0/4] arch, mm: improve robustness of direct map manipulation

2020-10-29 Thread Mike Rapoport
From: Mike Rapoport Hi, During recent discussion about KVM protected memory, David raised a concern about usage of __kernel_map_pages() outside of DEBUG_PAGEALLOC scope [1]. Indeed, for architectures that define CONFIG_ARCH_HAS_SET_DIRECT_MAP it is possible that __kernel_map_pages() would

Re: [PATCH] powerpc/smp: Move rcu_cpu_starting() earlier

2020-10-29 Thread Qian Cai
On Wed, 2020-10-28 at 17:31 -0700, Paul E. McKenney wrote: > On Thu, Oct 29, 2020 at 11:09:07AM +1100, Michael Ellerman wrote: > > Qian Cai writes: > > > The call to rcu_cpu_starting() in start_secondary() is not early enough > > > in the CPU-hotplug onlining process, which results in lockdep

Re: [PATCH 5/9] kprobes/ftrace: Add recursion protection to the ftrace callback

2020-10-29 Thread Steven Rostedt
On Thu, 29 Oct 2020 16:58:03 +0900 Masami Hiramatsu wrote: > Hi Steve, > > On Wed, 28 Oct 2020 07:52:49 -0400 > Steven Rostedt wrote: > > > From: "Steven Rostedt (VMware)" > > > > If a ftrace callback does not supply its own recursion protection and > > does not set the RECURSION_SAFE flag

Re: [PATCH 01/13] PCI: dwc/imx6: Drop setting PCI_MSI_FLAGS_ENABLE

2020-10-29 Thread Rob Herring
On Wed, Oct 28, 2020 at 7:21 PM Michael Ellerman wrote: > > Rob Herring writes: > > No other host driver sets the PCI_MSI_FLAGS_ENABLE bit, so it must not > > be necessary. If it is, a comment is needed. > > Yeah, but git blame directly points to: > > 75cb8d20c112 ("PCI: imx: Enable MSI from

Re: [PATCH] powerpc/smp: Move rcu_cpu_starting() earlier

2020-10-29 Thread Qian Cai
On Thu, 2020-10-29 at 11:09 +1100, Michael Ellerman wrote: > Qian Cai writes: > > The call to rcu_cpu_starting() in start_secondary() is not early enough > > in the CPU-hotplug onlining process, which results in lockdep splats as > > follows: > > Since when? For me, it is since the commit in

  1   2   >