[patch V3 16/37] sparc/mm/highmem: Switch to generic kmap atomic

2020-11-04 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 --- V3: Remove the kmap types cruft --- arch/sparc/Kconfig |1 arch/sparc/include/asm/highmem.h|8 +- arch/sparc/i

[patch V3 33/37] highmem: Remove kmap_atomic_prot()

2020-11-04 Thread Thomas Gleixner
No more users. Signed-off-by: Thomas Gleixner --- V3: New patch --- include/linux/highmem-internal.h | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) --- a/include/linux/highmem-internal.h +++ b/include/linux/highmem-internal.h @@ -87,16 +87,11 @@ static inline void

[patch V3 13/37] mips/mm/highmem: Switch to generic kmap atomic

2020-11-04 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 --- V3: Remove the kmap types cruft --- arch/mips/Kconfig |1 arch/mips/include/asm/fixmap.h |4 - arch/mips/include/asm

[patch V3 17/37] xtensa/mm/highmem: Switch to generic kmap atomic

2020-11-04 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 --- V3: Remove the kmap types cruft --- arch/xtensa/Kconfig |1 arch/xtensa/include/asm/fixmap.h |4 +-- arch/xtensa

[patch V3 21/37] Documentation/io-mapping: Remove outdated blurb

2020-11-04 Thread Thomas Gleixner
The implementation details in the documentation are outdated and not really helpful. Remove them. Signed-off-by: Thomas Gleixner --- V3: New patch --- Documentation/driver-api/io-mapping.rst | 22 -- 1 file changed, 22 deletions(-) --- a/Documentation/driver-api/io

[patch V3 11/37] csky/mm/highmem: Switch to generic kmap atomic

2020-11-04 Thread Thomas Gleixner
No reason having the same code in every architecture. Signed-off-by: Thomas Gleixner Cc: linux-c...@vger.kernel.org --- V3: Does not compile with gcc 10 --- arch/csky/Kconfig |1 arch/csky/include/asm/fixmap.h |4 +- arch/csky/include/asm/highmem.h |6 ++- arch/csky

[patch V3 09/37] arc/mm/highmem: Use generic kmap atomic implementation

2020-11-04 Thread Thomas Gleixner
ot fit. Randomly failing at runtime is not a really good option. Signed-off-by: Thomas Gleixner Cc: Vineet Gupta Cc: linux-snps-...@lists.infradead.org --- V3: Make it actually more correct. --- arch/arc/Kconfig |1 arch/arc/include/asm/highmem.h| 26 ++

[patch V3 00/37] mm/highmem: Preemptible variant of kmap_atomic & friends

2020-11-04 Thread Thomas Gleixner
Following up to the discussion in: https://lore.kernel.org/r/20200914204209.256266...@linutronix.de and the second version of this: https://lore.kernel.org/r/20201029221806.189523...@linutronix.de this series provides a preemptible variant of kmap_atomic & related interfaces. This is achie

[patch V3 23/37] sched: Make migrate_disable/enable() independent of RT

2020-11-04 Thread Thomas Gleixner
. Making it available independent of RT allows to provide a preemptible variant of kmap_atomic() and makes the code more consistent in general. FIXME: Rework the comment in preempt.h Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar

[patch V3 32/37] drm/vmgfx: Replace kmap_atomic()

2020-11-04 Thread Thomas Gleixner
pages and the return was bogus anyway as it would have left preemption and pagefaults disabled. Signed-off-by: Thomas Gleixner Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org --- V3: New patch --- drivers/gpu/drm/vmwgfx

[patch V3 37/37] io-mapping: Remove io_mapping_map_atomic_wc()

2020-11-04 Thread Thomas Gleixner
No more users. Get rid of it and remove the traces in documentation. Signed-off-by: Thomas Gleixner --- V3: New patch --- Documentation/driver-api/io-mapping.rst | 22 +--- include/linux/io-mapping.h | 42 +--- 2 files changed, 9

[patch V3 36/37] drm/i915: Replace io_mapping_map_atomic_wc()

2020-11-04 Thread Thomas Gleixner
None of these mapping requires the side effect of disabling pagefaults and preemption. Use io_mapping_map_local_wc() instead, and clean up gtt_user_read() and gtt_user_write() to use a plain copy_from_user() as the local maps are not disabling pagefaults. Signed-off-by: Thomas Gleixner Cc: Jani

[patch V3 30/37] highmem: Remove kmap_atomic_pfn()

2020-11-04 Thread Thomas Gleixner
No more users. Signed-off-by: Thomas Gleixner --- V3: New patch --- include/linux/highmem-internal.h | 12 1 file changed, 12 deletions(-) --- a/include/linux/highmem-internal.h +++ b/include/linux/highmem-internal.h @@ -99,13 +99,6 @@ static inline void *kmap_atomic(struct p

[tip: core/rcu] drm/i915: Cleanup PREEMPT_COUNT leftovers

2020-10-10 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 5d35c1c982ffaaccd1ec974e96e7a5244bbadaa1 Gitweb: https://git.kernel.org/tip/5d35c1c982ffaaccd1ec974e96e7a5244bbadaa1 Author:Thomas Gleixner AuthorDate:Mon, 14 Sep 2020 19:35:03 +02:00

Re: [PATCH tip/core/rcu 11/15] drm/i915: Cleanup PREEMPT_COUNT leftovers

2020-10-02 Thread Thomas Gleixner
On Thu, Oct 01 2020 at 10:17, Joonas Lahtinen wrote: > Quoting paul...@kernel.org (2020-09-29 02:30:58) >> CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be >> removed. Cleanup the leftovers before doing so. > > Change looks fine: > > Reviewed-by: Joonas Lahtinen > > Are you looking

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-25 Thread Thomas Gleixner
On Thu, Sep 24 2020 at 08:32, Steven Rostedt wrote: > On Thu, 24 Sep 2020 08:57:52 +0200 > Thomas Gleixner wrote: > >> > Now as for migration disabled nesting, at least now we would have >> > groupings of this, and perhaps the theorists can handle that. I mean, >

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-24 Thread Thomas Gleixner
On Wed, Sep 23 2020 at 11:52, Steven Rostedt wrote: > On Wed, 23 Sep 2020 10:40:32 +0200 > pet...@infradead.org wrote: > >> However, with migrate_disable() we can have each task preempted in a >> migrate_disable() region, worse we can stack them all on the _same_ CPU >> (super ridiculous odds, sure

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-24 Thread Thomas Gleixner
On Wed, Sep 23 2020 at 17:12, Steven Rostedt wrote: > On Wed, 23 Sep 2020 22:55:54 +0200 > Then scratch the idea of having anonymous local_lock() and just bring > local_lock in directly? Then have a kmap local lock, which would only > block those that need to do a kmap. That's still going to end u

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-24 Thread Thomas Gleixner
On Wed, Sep 23 2020 at 12:19, peterz wrote: > On Mon, Sep 21, 2020 at 09:27:57PM +0200, Thomas Gleixner wrote: >> Alternatively this could of course be solved with per CPU page tables >> which will come around some day anyway I fear. > > Previously (with PTI) we looked at mak

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-24 Thread Thomas Gleixner
On Wed, Sep 23 2020 at 10:40, peterz wrote: > Right, so I'm concerned. migrate_disable() wrecks pretty much all > Real-Time scheduler theory we have, and PREEMPRT_RT bringing it in is > somewhat ironic. It's even more ironic that the approach of PREEMPT_RT has been 'pragmatic ignorance of theory'

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-24 Thread Thomas Gleixner
On Mon, Sep 21 2020 at 21:27, Thomas Gleixner wrote: > On Mon, Sep 21 2020 at 09:24, Linus Torvalds wrote: >> On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: >> Maybe we really *could* call this new kmap functionality something >> like "kmap_percpu()" (

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-22 Thread Thomas Gleixner
On Mon, Sep 21 2020 at 09:24, Linus Torvalds wrote: > On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: >> >> If a task is migrated to a different CPU then the mapping address will >> change which will explode in colourful ways. > > Right you are. > > Mayb

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-22 Thread Thomas Gleixner
On Sun, Sep 20 2020 at 10:42, Linus Torvalds wrote: > On Sun, Sep 20, 2020 at 10:40 AM Thomas Gleixner wrote: >> >> I think the more obvious solution is to split the whole exercise: >> >> schedule() >> prepare_switch() >> unmap() >&g

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-21 Thread Thomas Gleixner
On Sun, Sep 20 2020 at 09:57, Linus Torvalds wrote: > On Sun, Sep 20, 2020 at 1:49 AM Thomas Gleixner wrote: > Btw, looking at the stack code, Ithink your new implementation of it > is a bit scary: > >static inline int kmap_atomic_idx_push(void) >{ &

[patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-21 Thread Thomas Gleixner
First of all, sorry for the horribly big Cc list! Following up to the discussion in: https://lore.kernel.org/r/20200914204209.256266...@linutronix.de this provides a preemptible variant of kmap_atomic & related interfaces. This is achieved by: - Consolidating all kmap atomic implementations

[patch RFC 02/15] highmem: Provide generic variant of kmap_atomic*

2020-09-21 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 --- include/linux/highmem.h | 87 --- mm

[patch RFC 09/15] nds32/mm/highmem: Switch to generic kmap atomic

2020-09-21 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 --- Note: Completely untested --- arch/nds32/Kconfig.cpu |1 arch/nds32/include/asm/highmem.h | 21 + arch/nds32

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-21 Thread Thomas Gleixner
On Sat, Sep 19 2020 at 10:18, Linus Torvalds wrote: > On Sat, Sep 19, 2020 at 2:50 AM Thomas Gleixner wrote: >> >> this provides a preemptible variant of kmap_atomic & related >> interfaces. This is achieved by: > > Ack. This looks really nice, even apart from t

[patch RFC 15/15] mm/highmem: Provide kmap_temporary*

2020-09-21 Thread Thomas Gleixner
s can be invoked from both preemptible and atomic context. A wholesale conversion of kmap_atomic to be fully preemptible is not possible because some of the usage sites might rely on the preemption disable for serialization or per CPUness. Needs to be done on a case by case basis. Signed-off-by: T

[patch RFC 08/15] mips/mm/highmem: Switch to generic kmap atomic

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Thomas Bogendoerfer Cc: linux-m...@vger.kernel.org --- Note: Completely untested --- arch/mips/Kconfig |1 arch/mips/include/asm/highmem.h |4 +- arch/mips/mm/highmem.c | 77 arch/mips

[patch RFC 05/15] ARM: highmem: Switch to generic kmap atomic

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Russell King Cc: Arnd Bergmann Cc: linux-arm-ker...@lists.infradead.org --- Note: Completely untested --- arch/arm/Kconfig |1 arch/arm/include/asm/highmem.h | 30 +++--- arch/arm/mm/Makefile |1 arch/arm/mm/highmem.c

[patch RFC 13/15] mm/highmem: Remove the old kmap_atomic cruft

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner --- include/linux/highmem.h | 65 ++-- mm/highmem.c| 28 +--- 2 files changed, 28 insertions(+), 65 deletions(-) --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -94,27 +94,6

[patch RFC 14/15] sched: highmem: Store temporary kmaps in task struct

2020-09-21 Thread Thomas Gleixner
Instead of storing the map per CPU provide and use per task storage. That prepares for temporary 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. Signed-off-by: Thomas

[patch RFC 06/15] csky/mm/highmem: Switch to generic kmap atomic

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Guo Ren Cc: linux-c...@vger.kernel.org --- Note: Completely untested --- arch/csky/Kconfig |1 arch/csky/include/asm/highmem.h |4 +- arch/csky/mm/highmem.c | 75 3 files changed, 5

[patch RFC 07/15] microblaze/mm/highmem: Switch to generic kmap atomic

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Michal Simek --- Note: Completely untested --- arch/microblaze/Kconfig |1 arch/microblaze/include/asm/highmem.h |6 ++ arch/microblaze/mm/Makefile |1 arch/microblaze/mm/highmem.c | 78

[patch RFC 04/15] arc/mm/highmem: Use generic kmap atomic implementation

2020-09-21 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 --- Note: Completely untested --- arch/arc/Kconfig |1 arch/arc/include/asm/highmem.h |8 ++- arch/arc

[patch RFC 11/15] sparc/mm/highmem: Switch to generic kmap atomic

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org --- Note: Completely untested --- arch/sparc/Kconfig |1 arch/sparc/include/asm/highmem.h |7 +- arch/sparc/mm/Makefile |3 - arch/sparc/mm/highmem.c

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-21 Thread Thomas Gleixner
On Sun, Sep 20 2020 at 08:41, Thomas Gleixner wrote: > On Sat, Sep 19 2020 at 10:18, Linus Torvalds wrote: >> Maybe I've missed something. Is it because the new interface still >> does "pagefault_disable()" perhaps? >> >> But does it even need the pagef

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-21 Thread Thomas Gleixner
On Sat, Sep 19 2020 at 12:37, Daniel Vetter wrote: > On Sat, Sep 19, 2020 at 12:35 PM Daniel Vetter wrote: >> I think it should be the case, but I want to double check: Will >> copy_*_user be allowed within a kmap_temporary section? This would >> allow us to ditch an absolute pile of slowpaths. >

[patch RFC 03/15] x86/mm/highmem: Use generic kmap atomic implementation

2020-09-21 Thread Thomas Gleixner
Convert X86 to the generic kmap atomic implementation. Make the iomap_atomic() naming convention consistent while at it. Signed-off-by: Thomas Gleixner --- arch/x86/Kconfig |3 +- arch/x86/include/asm/fixmap.h |1 arch/x86/include/asm/highmem.h | 12 ++-- arch/x86

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-21 Thread Thomas Gleixner
On Sun, Sep 20 2020 at 10:23, Daniel Vetter wrote: > On Sun, Sep 20, 2020 at 08:23:26AM +0200, Thomas Gleixner wrote: >> On Sat, Sep 19 2020 at 12:37, Daniel Vetter wrote: >> > On Sat, Sep 19, 2020 at 12:35 PM Daniel Vetter wrote: >> >> I think it should be the ca

[patch RFC 12/15] xtensa/mm/highmem: Switch to generic kmap atomic

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- Note: Completely untested --- arch/xtensa/Kconfig |1 arch/xtensa/include/asm/highmem.h |9 +++ arch/xtensa/mm/highmem.c | 44

[patch RFC 10/15] powerpc/mm/highmem: Switch to generic kmap atomic

2020-09-21 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-...@lists.ozlabs.org --- Note: Completely untested --- arch/powerpc/Kconfig |1 arch/powerpc/include/asm/highmem.h |6 ++- arch/powerpc/mm/Makefile

[patch RFC 01/15] mm/highmem: Un-EXPORT __kmap_atomic_idx()

2020-09-21 Thread Thomas Gleixner
Nothing in modules can use that. Signed-off-by: Thomas Gleixner --- 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 *get_pkm atomic_long_t _totalhigh_pages __read_mostly; EXPORT_SYMBOL

Re: [patch 00/13] preempt: Make preempt count unconditional

2020-09-16 Thread Thomas Gleixner
On Tue, Sep 15 2020 at 10:35, Linus Torvalds wrote: > On Tue, Sep 15, 2020 at 1:39 AM Thomas Gleixner wrote: >> >> OTOH, having a working 'preemptible()' or maybe better named >> 'can_schedule()' check makes tons of sense to make decisions about >&

[patch 06/13] locking/bitspinlock: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner --- include/linux/bit_spinlock.h |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/include/linux/bit_spinlock.h +++ b/include/linux

[patch 04/13] lockdep: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon --- include/linux/lockdep.h |6 ++ lib/Kconfig.debug |1 - 2 files changed, 2

[patch 02/13] preempt: Make preempt count unconditional

2020-09-15 Thread Thomas Gleixner
ity of the kernel consistent accross the various preemption models. Enable CONFIG_PREEMPT_COUNT unconditionally. Follow up changes will remove the #ifdeffery and remove the config option at the end. Signed-off-by: Thomas Gleixner --- kernel/Kconfig.preempt |3 +-- 1 file changed, 1 inser

[patch 00/13] preempt: Make preempt count unconditional

2020-09-15 Thread Thomas Gleixner
Folks! While working on various preempt count related things, I stumbled (again) over the inconsistency of our preempt count handling. The handling of preempt_count() is inconsistent accross kernel configurations. On kernels which have PREEMPT_COUNT=n preempt_disable/enable() and the lock/unlock

[patch 07/13] uaccess: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner --- include/linux/uaccess.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h

[patch 10/13] xtensa: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- arch/xtensa/kernel/entry.S |2 +- 1 file changed, 1 insertion(+), 1

[patch 03/13] preempt: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc

Re: [patch 00/13] preempt: Make preempt count unconditional

2020-09-15 Thread Thomas Gleixner
On Mon, Sep 14 2020 at 13:59, Linus Torvalds wrote: > On Mon, Sep 14, 2020 at 1:45 PM Thomas Gleixner wrote: >> >> Recently merged code does: >> >> gfp = preemptible() ? GFP_KERNEL : GFP_ATOMIC; >> >> Looks obviously correct, except for the fact t

[patch 09/13] ARM: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- arch/arm/include/asm/assembler.h | 11 --- arch/arm/kernel/iwmmxt.S

[patch 08/13] sched: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc

[patch 05/13] mm/pagemap: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: linux...@kvack.org --- include/linux/pagemap.h |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/include/linux

[patch 12/13] rcutorture: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Shuah Khan Cc: r...@vger.ker

[patch 01/13] lib/debug: Remove pointless ARCH_NO_PREEMPT dependencies

2020-09-15 Thread Thomas Gleixner
to prevent the enablement of CONFIG_DEBUG_ATOMIC_SLEEP on such architectures. Remove the dependencies, which affects ALPHA, HEXAGON, M68K and UM. Signed-off-by: Thomas Gleixner Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-al...@vger.kernel.org Cc: Jeff Dike Cc: Richard

[patch 13/13] preempt: Remove PREEMPT_COUNT from Kconfig

2020-09-15 Thread Thomas Gleixner
All conditionals and irritations are gone. Signed-off-by: Thomas Gleixner --- kernel/Kconfig.preempt |3 --- 1 file changed, 3 deletions(-) --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -74,8 +74,5 @@ config PREEMPT_RT endchoice -config PREEMPT_COUNT - def_bool y

[patch 11/13] drm/i915: Clenaup PREEMPT_COUNT leftovers

2020-09-15 Thread Thomas Gleixner
CONFIG_PREEMPT_COUNT is now unconditionally enabled and will be removed. Cleanup the leftovers before doing so. Signed-off-by: Thomas Gleixner Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: intel-...@lists.freedesktop.org Cc: dri-devel

[BUG] drm/ttm: Warning during suspend/freeze

2020-08-17 Thread Thomas Gleixner
Suspending or freezing a KVM guest triggers the following warning reliably on current mainline: [56691.550343] printk: Suspending console(s) (use no_console_suspend to debug) [56691.578735] WARNING: CPU: 37 PID: 462 at drivers/gpu/drm/ttm/ttm_tt.c:51 ttm_tt_create+0xb6/0xe0 [ttm] [56692.795234] M

Re: [PATCH] drm/i915: Remove redundant user_access_end() from __copy_from_user() error path

2019-08-09 Thread Thomas Gleixner
On Fri, 9 Aug 2019, Sedat Dilek wrote: > On Fri, Aug 9, 2019 at 1:03 AM Nick Desaulniers > wrote: > > > > On Thu, Aug 8, 2019 at 1:22 PM Thomas Gleixner wrote: > > > > tglx just picked up 2 other patches of mine, bumping just in case he's > > >

Re: [PATCH] drm/i915: Remove redundant user_access_end() from __copy_from_user() error path

2019-08-08 Thread Thomas Gleixner
On Thu, 8 Aug 2019, Nick Desaulniers wrote: > On Tue, Aug 6, 2019 at 5:59 AM Josh Poimboeuf wrote: > > > Gentle ping... > > > Thomas and Chris: Will someone of you pick this up? > > > As "objtool: Improve UACCESS coverage" [1] went trough tip tree I > > > highly appreciate to do so with this one.

Re: [PATCH] drm/i810: Use CONFIG_PREEMPTION

2019-07-29 Thread Thomas Gleixner
On Sat, 27 Jul 2019, Daniel Vetter wrote: > On Fri, Jul 26, 2019 at 10:25 PM Thomas Gleixner wrote: > > > > CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by > > CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same > > functionality which toda

[PATCH] drm/i810: Use CONFIG_PREEMPTION

2019-07-29 Thread Thomas Gleixner
-off-by: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -394,7 +394,7 @@ config

Re: [PATCH] drm/i915: Remove redundant user_access_end() from __copy_from_user() error path

2019-07-26 Thread Thomas Gleixner
On Fri, 26 Jul 2019, Chris Wilson wrote: > Quoting Thomas Gleixner (2019-07-25 22:55:45) > > On Thu, 25 Jul 2019, Josh Poimboeuf wrote: > > > > > Objtool reports: > > > > > > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: > >

Re: [PATCH] drm/i915: Remove redundant user_access_end() from __copy_from_user() error path

2019-07-25 Thread Thomas Gleixner
d() in its error path adds an extra unnecessary CLAC. > > Fixes: 0b2c8f8b6b0c ("i915: fix missing user_access_end() in page fault > exception case") > Reported-by: Thomas Gleixner > Reported-by: Sedat Dilek > Acked-by: Peter Zijlstra (Intel) > Tested-by: Nick

Re: [PATCH v2] gpu/drm_memory: fix a few warnings

2019-07-08 Thread Thomas Gleixner
On Mon, 8 Jul 2019, Qian Cai wrote: > On Mon, 2019-07-08 at 15:21 -0400, Ilia Mirkin wrote: > > > -/** > > > +// SPDX-License-Identifier: MIT > > > +/* > > >   * \file drm_memory.c > > >   * Memory management wrappers for DRM > > >   * > > > @@ -12,25 +13,6 @@ > > >   * Copyright 1999 Precision Ins

[patch V3 13/29] btrfs: ref-verify: Simplify stack trace retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner Reviewed-by: Johannes Thumshirn Acked-by: David Sterba Cc: Chris Mason Cc: Josef Bacik Cc: linux-bt...@vger.kernel.org --- fs/btrfs/ref-verify.c | 15

[patch V3 03/29] lib/stackdepot: Provide functions which operate on plain storage arrays

2019-04-26 Thread Thomas Gleixner
The struct stack_trace indirection in the stack depot functions is a truly pointless excercise which requires horrible code at the callsites. Provide interfaces based on plain storage arrays. Signed-off-by: Thomas Gleixner Acked-by: Alexander Potapenko --- V3: Fix kernel-doc --- include/linux

[patch V3 14/29] dm bufio: Simplify stack trace retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner Cc: dm-de...@redhat.com Cc: Mike Snitzer Cc: Alasdair Kergon --- drivers/md/dm-bufio.c | 15 ++- 1 file changed, 6 insertions(+), 9

[patch V3 10/29] mm/page_owner: Simplify stack trace handling

2019-04-26 Thread Thomas Gleixner
pointer in the stack_trace struct so it points to the depot storage. Signed-off-by: Thomas Gleixner Cc: linux...@kvack.org Cc: Mike Rapoport Cc: David Rientjes Cc: Andrew Morton --- mm/page_owner.c | 79 +++- 1 file changed, 28 insertions

[patch V3 07/29] mm/slub: Simplify stack trace retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner Acked-by: Christoph Lameter Cc: Andrew Morton Cc: Pekka Enberg Cc: linux...@kvack.org Cc: David Rientjes --- mm/slub.c | 12 1 file

[patch V3 06/29] latency_top: Simplify stack trace handling

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner --- kernel/latencytop.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) --- a/kernel/latencytop.c +++ b/kernel/latencytop.c

[patch V3 02/29] stacktrace: Provide helpers for common stack trace operations

2019-04-26 Thread Thomas Gleixner
r all use cases a storage array and the number of valid stack trace entries in the array is sufficient. Provide helper functions which avoid the struct stack_trace indirection so the usage sites can be cleaned up. Signed-off-by: Thomas Gleixner --- V3: Fix kernel doc. --- include/linux/stacktr

[patch V3 29/29] x86/stacktrace: Use common infrastructure

2019-04-26 Thread Thomas Gleixner
Replace the stack_trace_save*() functions with the new arch_stack_walk() interfaces. Signed-off-by: Thomas Gleixner Cc: linux-a...@vger.kernel.org --- arch/x86/Kconfig |1 arch/x86/kernel/stacktrace.c | 116 +++ 2 files changed, 20

[patch V3 25/29] livepatch: Simplify stack trace retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace by using the storage array based interfaces. Signed-off-by: Thomas Gleixner Acked-by: Miroslav Benes --- kernel/livepatch/transition.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) --- a/kernel/livepatch

[patch V3 00/29] stacktrace: Consolidate stack trace usage

2019-04-26 Thread Thomas Gleixner
This is an update to V2 which can be found here: https://lkml.kernel.org/r/20190418084119.056416...@linutronix.de Changes vs. V2: - Fixed the kernel-doc issue pointed out by Mike - Removed the '-1' oddity from the tracer - Restricted the tracer nesting to 4 - Restored the lockdep ma

[patch V3 17/29] lockdep: Remove unused trace argument from print_circular_bug()

2019-04-26 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner --- kernel/locking/lockdep.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -1522,10 +1522,9 @@ static inline int class_equal(struct loc } static noinline int

[patch V3 26/29] stacktrace: Remove obsolete functions

2019-04-26 Thread Thomas Gleixner
No more users of the struct stack_trace based interfaces. Remove them. Remove the macro stubs for !CONFIG_STACKTRACE as well as they are pointless because the storage on the call sites is conditional on CONFIG_STACKTRACE already. No point to be 'smart'. Signed-off-by: Thoma

[patch V3 20/29] tracing: Simplify stacktrace retrieval in histograms

2019-04-26 Thread Thomas Gleixner
The indirection through struct stack_trace is not necessary at all. Use the storage array based interface. Signed-off-by: Thomas Gleixner Tested-by: Tom Zanussi Reviewed-by: Tom Zanussi Acked-by: Steven Rostedt (VMware) --- kernel/trace/trace_events_hist.c | 12 +++- 1 file changed

[patch V3 19/29] lockdep: Simplify stack trace handling

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace by using the storage array based interfaces and storing the information is a small lockdep specific data structure. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) --- include/linux/lockdep.h |9 +-- kernel/locking

[patch V3 05/29] proc: Simplify task stack retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner Reviewed-by: Alexey Dobriyan Cc: Andrew Morton --- fs/proc/base.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) --- a/fs/proc

[patch V3 27/29] lib/stackdepot: Remove obsolete functions

2019-04-26 Thread Thomas Gleixner
No more users of the struct stack_trace based interfaces. Signed-off-by: Thomas Gleixner Acked-by: Alexander Potapenko --- include/linux/stackdepot.h |4 lib/stackdepot.c | 20 2 files changed, 24 deletions(-) --- a/include/linux/stackdepot.h +++ b

[patch V3 23/29] tracing: Simplify stack trace retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace by using the storage array based interfaces. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) --- kernel/trace/trace.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) --- a

[patch V3 11/29] fault-inject: Simplify stacktrace retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner Cc: Akinobu Mita --- lib/fault-inject.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) --- a/lib/fault-inject.c +++ b/lib/fault

[patch V3 09/29] mm/kasan: Simplify stacktrace handling

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace by using the storage array based interfaces. Signed-off-by: Thomas Gleixner Acked-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: kasan-...@googlegroups.com Cc: linux...@kvack.org --- mm/kasan/common.c | 30

[patch V3 18/29] lockdep: Remove save argument from check_prev_add()

2019-04-26 Thread Thomas Gleixner
There is only one caller which hands in save_trace as function pointer. Signed-off-by: Thomas Gleixner --- kernel/locking/lockdep.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2158,8 +2158,7

[patch V3 08/29] mm/kmemleak: Simplify stacktrace handling

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace by using the storage array based interfaces. Signed-off-by: Thomas Gleixner Acked-by: Catalin Marinas Cc: linux...@kvack.org --- mm/kmemleak.c | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) --- a/mm

[patch V3 12/29] dma/debug: Simplify stracktrace retrieval

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: io...@lists.linux-foundation.org Cc: Robin Murphy Cc: Marek Szyprowski --- kernel/dma/debug.c | 14 ++ 1

[patch V3 24/29] tracing: Remove the last struct stack_trace usage

2019-04-26 Thread Thomas Gleixner
Simplify the stack retrieval code by using the storage array based interface. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) --- kernel/trace/trace_stack.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) --- a/kernel/trace

[patch V3 04/29] backtrace-test: Simplify stack trace handling

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace by using the storage array based interfaces. Signed-off-by: Thomas Gleixner --- kernel/backtracetest.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) --- a/kernel/backtracetest.c +++ b/kernel/backtracetest.c @@ -48,19

[patch V3 22/29] tracing: Make ftrace_trace_userstack() static and conditional

2019-04-26 Thread Thomas Gleixner
It's only used in trace.c and there is absolutely no point in compiling it in when user space stack traces are not supported. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt --- kernel/trace/trace.c | 14 -- kernel/trace/trace.h |8 2 files chang

[patch V3 16/29] drm: Simplify stacktrace handling

2019-04-26 Thread Thomas Gleixner
pointer in the stack_trace struct so it points to the depot storage. Signed-off-by: Thomas Gleixner Acked-by: Daniel Vetter Cc: intel-...@lists.freedesktop.org Cc: Joonas Lahtinen Cc: Maarten Lankhorst Cc: dri-devel@lists.freedesktop.org Cc: David Airlie Cc: Jani Nikula Cc: Rodrigo Vivi

[patch V3 01/29] tracing: Cleanup stack trace code

2019-04-26 Thread Thomas Gleixner
which are only used in trace_stack.c static. - Simplify the enable/disable logic. - Rename stack_trace_print() as it's using the stack_trace_ namespace. Free the name up for stack trace related functions. Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt --- V3: Remove the -1 ini

[patch V3 15/29] dm persistent data: Simplify stack trace handling

2019-04-26 Thread Thomas Gleixner
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. This results in less storage space and indirection. Signed-off-by: Thomas Gleixner Cc: dm-de...@redhat.com Cc: Mike Snitzer Cc: Alasdair Kergon --- drivers/md/persistent-data/dm-block

[patch V3 21/29] tracing: Use percpu stack trace buffer more intelligently

2019-04-26 Thread Thomas Gleixner
conditional execution pathes. Signed-off-by: Thomas Gleixner Cc: Steven Rostedt --- V3: Limit to 4 nest levels and increase size per level. --- kernel/trace/trace.c | 77 +-- 1 file changed, 39 insertions(+), 38 deletions(-) --- a/kernel/trace/trace.c

[patch V3 28/29] stacktrace: Provide common infrastructure

2019-04-26 Thread Thomas Gleixner
duplicated code and allows to implement better filtering than 'skip number of entries' in the future without touching any architecture specific code. Signed-off-by: Thomas Gleixner Cc: linux-a...@vger.kernel.org --- V3: Fix kernel doc --- include/linux/stacktrace.h | 39

Re: [patch V2 18/29] lockdep: Move stack trace logic into check_prev_add()

2019-04-25 Thread Thomas Gleixner
On Wed, 24 Apr 2019, Peter Zijlstra wrote: > On Thu, Apr 18, 2019 at 10:41:37AM +0200, Thomas Gleixner wrote: > > There is only one caller of check_prev_add() which hands in a zeroed struct > > stack trace and a function pointer to save_stack(). Inside check_prev_add() > > t

[patch V2 00/29] stacktrace: Consolidate stack trace usage

2019-04-18 Thread Thomas Gleixner
This is an update to V1: https://lkml.kernel.org/r/20190410102754.387743...@linutronix.de Struct stack_trace is a sinkhole for input and output parameters which is largely pointless for most usage sites. In fact if embedded into other data structures it creates indirections and extra storage ove

<    1   2   3   >