Re: [RFC PATCH v2 10/14] kernel/watchdog: Add a function to obtain the watchdog_allowed_mask

2019-03-26 Thread Thomas Gleixner
On Wed, 27 Feb 2019, Ricardo Neri wrote: > > -struct cpumask watchdog_allowed_mask __read_mostly; > +static struct cpumask watchdog_allowed_mask __read_mostly; That hunk is correct. > struct cpumask watchdog_cpumask __read_mostly; > unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdo

Re: [PATCH 3/5] s390: Fix vDSO clock_getres()

2019-04-03 Thread Thomas Gleixner
On Wed, 3 Apr 2019, Martin Schwidefsky wrote: > On Mon, 1 Apr 2019 12:51:50 +0100 > Vincenzo Frascino wrote: > > > clock_getres in the vDSO library has to preserve the same behaviour > > of posix_get_hrtimer_res(). > > > > In particular, posix_get_hrtimer_res() does: > > sec = 0; > > n

Re: [PATCH 5/6 v3] syscalls: Remove start and number from syscall_get_arguments() args

2019-04-04 Thread Thomas Gleixner
ver used, simply rewrite it to return the first 6 > arguments of a system call. > > This should help out the performance of tracing system calls by ptrace, > ftrace and perf. > > Link: http://lkml.kernel.org/r/20161107213233.754809...@goodmis.org For x86: Reviewed-by: Thomas Gleixner

Re: [PATCH 6/6 v3] syscalls: Remove start and number from syscall_set_arguments() args

2019-04-04 Thread Thomas Gleixner
l_set_arguments(). But we are told that > there will be soon. But for now, at least make it consistent with > syscall_get_arguments(). > > Link: http://lkml.kernel.org/r/20190327222014.ga32...@altlinux.org For x86: Reviewed-by: Thomas Gleixner

Re: [PATCH v4 0/6] normalize IOMMU dma mode boot options

2019-04-07 Thread Thomas Gleixner
On Mon, 8 Apr 2019, Leizhen (ThunderTown) wrote: > > > > This will break systems using boot options as now, and I think > > this is unacceptable. If you want to do so, just introduce iommu.dma_mode > > on top of those iommu boot options with dma mode boot options unchanged, > > and iommu.dma_mode

Re: [PATCH RFC 1/5] cpu/speculation: Add 'cpu_spec_mitigations=' cmdline options

2019-04-10 Thread Thomas Gleixner
On Wed, 10 Apr 2019, Michael Ellerman wrote: > Josh Poimboeuf writes: > > > On Fri, Apr 05, 2019 at 06:01:36PM +0200, Borislav Petkov wrote: > >> Thinking about this more, we can shave off the first 4 chars and have it > >> be: > >> > >> spec_mitigations= > >> > >> I think it is painfully clear

Re: [PATCH 1/2] ASoC: mpc5200_dma: Fix invalid license ID

2019-04-15 Thread Thomas Gleixner
t; > Cc: Daniel Baluta > > Fixes: 1edfc2485d8dc ("ASoC: mpc5200_dma: Switch to SPDX identifier") > > Reported-by: Thomas Gleixner > > Signed-off-by: Andra Danciu > > --- > > sound/soc/fsl/mpc5200_dma.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH 1/2] ASoC: mpc5200_dma: Fix invalid license ID

2019-04-15 Thread Thomas Gleixner
On Mon, 15 Apr 2019, Daniel Baluta wrote: > On Mon, Apr 15, 2019 at 10:26 AM Daniel Baluta > wrote: > > On Mon, Apr 15, 2019 at 12:53 AM Fabio Estevam wrote: > > > On Sun, Apr 14, 2019 at 4:15 PM Andra Danciu > > > wrote: > > > > -// SPDX-License-Identifier: GPL > > > > +// SPDX-License-Identi

Re: [PATCH v2 5/5] arm64/speculation: Support 'mitigations=' cmdline option

2019-04-16 Thread Thomas Gleixner
On Fri, 12 Apr 2019, Josh Poimboeuf wrote: > Configure arm64 runtime CPU speculation bug mitigations in accordance > with the 'mitigations=' cmdline option. This affects Meltdown, Spectre > v2, and Speculative Store Bypass. > > The default behavior is unchanged. > > Signed-off-by: Josh Poimboeu

Re: [PATCH] kernel/crash: make parse_crashkernel()'s return value more indicant

2019-04-19 Thread Thomas Gleixner
On Fri, 19 Apr 2019, Pingfan Liu wrote: > At present, both return and crash_size should be checked to guarantee the > success of parse_crashkernel(). > Simplify the way by returning negative if fail, positive if success. In > case of failure, -EINVAL for bad syntax, -1 for the parsing results in >

Re: [PATCH] treewide: Rename "unencrypted" to "decrypted"

2020-03-17 Thread Thomas Gleixner
Borislav Petkov writes: > On Tue, Mar 17, 2020 at 01:35:12PM -0700, Dave Hansen wrote: >> On 3/17/20 4:18 AM, Borislav Petkov wrote: >> > Back then when the whole SME machinery started getting mainlined, it >> > was agreed that for simplicity, clarity and sanity's sake, the terms >> > denoting en

[patch V2 01/15] PCI/switchtec: Fix init_completion race condition with poll_wait()

2020-03-18 Thread Thomas Gleixner
Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver") Reported-by: Sebastian Andrzej Siewior Signed-off-by: Logan Gunthorpe Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200313183608.2646-1-log...@deltatee.com --- drivers/pci/switch/switchtec.c | 2

[patch V2 07/15] powerpc/ps3: Convert half completion to rcuwait

2020-03-18 Thread Thomas Gleixner
The PS3 notification interrupt and kthread use a hacked up completion to communicate. Since we're wanting to change the completion implementation and this is abuse anyway, replace it with a simple rcuwait since there is only ever the one waiter. AFAICT the kthread uses TASK_INTERRUPTIBLE to not in

[patch V2 00/15] Lock ordering documentation and annotation for lockdep

2020-03-18 Thread Thomas Gleixner
This is the second version of this work. The first one can be found here: https://lore.kernel.org/r/20200313174701.148376-1-bige...@linutronix.de Changes since V1: - Split the PCI/switchtec patch (picked up the fix from Logan) and reworked the change log. - Addressed Linus feedback v

[patch V2 06/15] rcuwait: Add @state argument to rcuwait_wait_event()

2020-03-18 Thread Thomas Gleixner
Extend rcuwait_wait_event() with a state variable so that it is not restricted to UNINTERRUPTIBLE waits. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Oleg Nesterov Cc: Davidlohr Bueso --- include/linux/rcuwait.h | 12 ++-- kernel/locking/percpu

[patch V2 09/15] timekeeping: Split jiffies seqlock

2020-03-18 Thread Thomas Gleixner
From: Thomas Gleixner seqlock consists of a sequence counter and a spinlock_t which is used to serialize the writers. spinlock_t is substituted by a "sleeping" spinlock on PREEMPT_RT enabled kernels which breaks the usage in the timekeeping code as the writers are executed in hard int

[patch V2 04/15] orinoco_usb: Use the regular completion interfaces

2020-03-18 Thread Thomas Gleixner
From: Thomas Gleixner The completion usage in this driver is interesting: - it uses a magic complete function which according to the comment was implemented by invoking complete() four times in a row because complete_all() was not exported at that time. - it uses an open coded wait

[patch V2 02/15] pci/switchtec: Replace completion wait queue usage for poll

2020-03-18 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The poll callback is using the completion wait queue and sticks it into poll_wait() to wake up pollers after a command has completed. This works to some extent, but cannot provide EPOLLEXCLUSIVE support because the waker side uses complete_all() which unconditiona

[patch V2 05/15] acpi: Remove header dependency

2020-03-18 Thread Thomas Gleixner
In order to avoid future header hell, remove the inclusion of proc_fs.h from acpi_bus.h. All it needs is a forward declaration of a struct. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner --- drivers/platform/x86/dell-smo8800.c |1 + drivers

[patch V2 03/15] usb: gadget: Use completion interface instead of open coding it

2020-03-18 Thread Thomas Gleixner
task itself and complete() wakes exactly one exlusive waiter. Replace the open coded implementation with the corresponding wait_for_completion*() functions. No functional change. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc

[patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-18 Thread Thomas Gleixner
From: Thomas Gleixner The kernel provides a variety of locking primitives. The nesting of these lock types and the implications of them on RT enabled kernels is nowhere documented. Add initial documentation. Signed-off-by: Thomas Gleixner --- V2: Addressed review comments from Randy

[patch V2 10/15] sched/swait: Prepare usage in completions

2020-03-18 Thread Thomas Gleixner
From: Thomas Gleixner As a preparation to use simple wait queues for completions: - Provide swake_up_all_locked() to support complete_all() - Make __prepare_to_swait() public available This is done to enable the usage of complete() within truly atomic contexts on a PREEMPT_RT enabled

[patch V2 11/15] completion: Use simple wait queues

2020-03-18 Thread Thomas Gleixner
From: Thomas Gleixner completion uses a wait_queue_head_t to enqueue waiters. wait_queue_head_t contains a spinlock_t to protect the list of waiters which excludes it from being used in truly atomic context on a PREEMPT_RT enabled kernel. The spinlock in the wait queue head cannot be replaced

Re: [patch V2 11/15] completion: Use simple wait queues

2020-03-18 Thread Thomas Gleixner
Joel, Joel Fernandes writes: > On Wed, Mar 18, 2020 at 09:43:13PM +0100, Thomas Gleixner wrote: >> The spinlock in the wait queue head cannot be replaced by a raw_spinlock >> because: >> >> - wait queues can have custom wakeup callbacks, which acquire other >&

Re: [PATCH -v2] treewide: Rename "unencrypted" to "decrypted"

2020-03-19 Thread Thomas Gleixner
Borislav Petkov writes: > On Thu, Mar 19, 2020 at 11:06:15AM +, Robin Murphy wrote: >> Let me add another vote from a native English speaker that "unencrypted" is >> the appropriate term to imply the *absence* of encryption, whereas >> "decrypted" implies the *reversal* of applied encryption.

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-19 Thread Thomas Gleixner
Paul, "Paul E. McKenney" writes: > On Wed, Mar 18, 2020 at 09:43:10PM +0100, Thomas Gleixner wrote: > > Mostly native-English-speaker services below, so please feel free to > ignore. The one place I made a substantive change, I marked it "@@@". > I only d

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-19 Thread Thomas Gleixner
Jonathan Corbet writes: > On Wed, 18 Mar 2020 21:43:10 +0100 > Thomas Gleixner wrote: >> Add initial documentation. > > ...time to add a a couple of nits...:) ...time Is that valid RST? >> +++ b/Documentation/locking/locktypes.rst >> @@ -0,0 +1,298 @@ &g

Re: [PATCH -v2] treewide: Rename "unencrypted" to "decrypted"

2020-03-19 Thread Thomas Gleixner
Borislav Petkov writes: > On Thu, Mar 19, 2020 at 06:25:49PM +0100, Thomas Gleixner wrote: >> TBH, I don't see how >> >> if (force_dma_decrypted(dev)) >> set_memory_encrypted((unsigned long)cpu_addr, 1 << page_order); >> >&

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-20 Thread Thomas Gleixner
"Paul E. McKenney" writes: > > - The soft interrupt related suffix (_bh()) still disables softirq >handlers. However, unlike non-PREEMPT_RT kernels (which disable >preemption to get this effect), PREEMPT_RT kernels use a per-CPU >lock to exclude softirq handlers. I've made that:

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-20 Thread Thomas Gleixner
"Paul E. McKenney" writes: > On Fri, Mar 20, 2020 at 08:51:44PM +0100, Thomas Gleixner wrote: >> "Paul E. McKenney" writes: >> > >> > - The soft interrupt related suffix (_bh()) still disables softirq >> >handlers. However, unlike non

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-21 Thread Thomas Gleixner
"Paul E. McKenney" writes: > On Fri, Mar 20, 2020 at 11:36:03PM +0100, Thomas Gleixner wrote: >> I agree that what I tried to express is hard to parse, but it's at least >> halfways correct :) > > Apologies! That is what I get for not looking it up in the

Re: [patch V2 07/15] powerpc/ps3: Convert half completion to rcuwait

2020-03-21 Thread Thomas Gleixner
Christoph Hellwig writes: > On Wed, Mar 18, 2020 at 09:43:09PM +0100, Thomas Gleixner wrote: >> The PS3 notification interrupt and kthread use a hacked up completion to >> communicate. Since we're wanting to change the completion implementation and >> this is abuse

[patch V3 20/20] lockdep: Add posixtimer context tracing bits

2020-03-21 Thread Thomas Gleixner
k is acquried. This will be removed once the split is completed. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner --- include/linux/irqflags.h | 12 kernel/time/posix-cpu-timers.c |6 +- 2 files changed, 17 insertions(+), 1 deletion(-) --- a/

[patch V3 00/20] Lock ordering documentation and annotation for lockdep

2020-03-21 Thread Thomas Gleixner
This is the third and hopefully final version of this work. The second one can be found here: https://lore.kernel.org/r/20200318204302.693307...@linutronix.de Changes since V2: - Included the arch/XXX fixups for the rcuwait changes (Sebastian) - Folded the init fix for the PS3 change (Se

[patch V3 12/20] powerpc/ps3: Convert half completion to rcuwait

2020-03-21 Thread Thomas Gleixner
From: Thomas Gleixner The PS3 notification interrupt and kthread use a hacked up completion to communicate. Since we're wanting to change the completion implementation and this is abuse anyway, replace it with a simple rcuwait since there is only ever the one waiter. AFAICT the kthread

[patch V3 07/20] csky: Remove mm.h from asm/uaccess.h

2020-03-21 Thread Thomas Gleixner
.h include. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Guo Ren Cc: linux-c...@vger.kernel.org --- V3: New patch --- arch/csky/include/asm/uaccess.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/csky/include/asm/uacces

[patch V3 06/20] nds32: Remove mm.h from asm/uaccess.h

2020-03-21 Thread Thomas Gleixner
linux/mm.h include. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen --- V3: New patch --- arch/nds32/include/asm/uaccess.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/nds32/include/asm/u

[patch V3 02/20] pci/switchtec: Replace completion wait queue usage for poll

2020-03-21 Thread Thomas Gleixner
changing the internal implementation of completions. Replace it with a regular wait queue and store the state in struct switchtec_user. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Logan Gunthorpe Acked-by: Peter Zijlstra (Intel) Acked-by: Bjorn Helgaas Cc

[patch V3 08/20] hexagon: Remove mm.h from asm/uaccess.h

2020-03-21 Thread Thomas Gleixner
linux/mm.h include. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Brian Cain Cc: linux-hexa...@vger.kernel.org --- V3: New patch --- arch/hexagon/include/asm/uaccess.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/hexagon/i

[patch V3 15/20] sched/swait: Prepare usage in completions

2020-03-21 Thread Thomas Gleixner
From: Thomas Gleixner As a preparation to use simple wait queues for completions: - Provide swake_up_all_locked() to support complete_all() - Make __prepare_to_swait() public available This is done to enable the usage of complete() within truly atomic contexts on a PREEMPT_RT enabled

[patch V3 04/20] orinoco_usb: Use the regular completion interfaces

2020-03-21 Thread Thomas Gleixner
From: Thomas Gleixner The completion usage in this driver is interesting: - it uses a magic complete function which according to the comment was implemented by invoking complete() four times in a row because complete_all() was not exported at that time. - it uses an open coded wait

[patch V3 14/20] timekeeping: Split jiffies seqlock

2020-03-21 Thread Thomas Gleixner
From: Thomas Gleixner seqlock consists of a sequence counter and a spinlock_t which is used to serialize the writers. spinlock_t is substituted by a "sleeping" spinlock on PREEMPT_RT enabled kernels which breaks the usage in the timekeeping code as the writers are executed in hard int

[patch V3 13/20] Documentation: Add lock ordering and nesting documentation

2020-03-21 Thread Thomas Gleixner
From: Thomas Gleixner The kernel provides a variety of locking primitives. The nesting of these lock types and the implications of them on RT enabled kernels is nowhere documented. Add initial documentation. Signed-off-by: Thomas Gleixner Cc: "Paul E . McKenney" Cc: Jonathan

[patch V3 05/20] acpi: Remove header dependency

2020-03-21 Thread Thomas Gleixner
From: Peter Zijlstra In order to avoid future header hell, remove the inclusion of proc_fs.h from acpi_bus.h. All it needs is a forward declaration of a struct. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver

[patch V3 19/20] lockdep: Annotate irq_work

2020-03-21 Thread Thomas Gleixner
irq context so lockdep knows that these can safely acquire a spinlock_t. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner --- include/linux/irq_work.h |2 ++ include/linux/irqflags.h | 13 + kernel/irq_work.c|2 ++ kernel/rcu/tree.c|

[patch V3 10/20] microblaze: Remove mm.h from asm/uaccess.h

2020-03-21 Thread Thomas Gleixner
linux/mm.h include. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Michal Simek --- V3; New patch --- arch/microblaze/include/asm/uaccess.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/microblaze/include/asm/uaccess

[patch V3 03/20] usb: gadget: Use completion interface instead of open coding it

2020-03-21 Thread Thomas Gleixner
From: Thomas Gleixner ep_io() uses a completion on stack and open codes the waiting with: wait_event_interruptible (done.wait, done.done); and wait_event (done.wait, done.done); This waits in non-exclusive mode for complete(), but there is no reason to do so because the completion can only

[patch V3 11/20] rcuwait: Add @state argument to rcuwait_wait_event()

2020-03-21 Thread Thomas Gleixner
From: Peter Zijlstra (Intel) Extend rcuwait_wait_event() with a state variable so that it is not restricted to UNINTERRUPTIBLE waits. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Davidlohr Bueso --- include/linux/rcuwait.h | 12

[patch V3 01/20] PCI/switchtec: Fix init_completion race condition with poll_wait()

2020-03-21 Thread Thomas Gleixner
Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver") Reported-by: Sebastian Andrzej Siewior Signed-off-by: Logan Gunthorpe Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Cc: Kurt Schwemmer Cc: linux-...@vger.kernel.org Link: https://lkml.kernel.

[patch V3 18/20] lockdep: Add hrtimer context tracing bits

2020-03-21 Thread Thomas Gleixner
to expire in hard interrupt context then the timer callback is not supposed to acquire a regular spinlock instead of a raw_spinlock in the expiry callback. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner --- include/linux/irqflags.h | 15 +++ include/li

[patch V3 09/20] ia64: Remove mm.h from asm/uaccess.h

2020-03-21 Thread Thomas Gleixner
.h include. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org --- V3: New patch --- arch/ia64/include/asm/uaccess.h | 1 - arch/ia64/kernel/process.c | 1 + arch/ia64/mm

[patch V3 16/20] completion: Use simple wait queues

2020-03-21 Thread Thomas Gleixner
From: Thomas Gleixner completion uses a wait_queue_head_t to enqueue waiters. wait_queue_head_t contains a spinlock_t to protect the list of waiters which excludes it from being used in truly atomic context on a PREEMPT_RT enabled kernel. The spinlock in the wait queue head cannot be replaced

[patch V3 17/20] lockdep: Introduce wait-type checks

2020-03-21 Thread Thomas Gleixner
compile failure with CONFIG_DEBUG_SPINLOCK + !CONFIG_LOCKDEP] [ tglx: Add the config option ] Requested-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner --- V2: Fix the LOCKDEP=y && LOCK_PROVE=n case

Re: [PATCH 2/5] csky: Remove mm.h from asm/uaccess.h

2020-03-21 Thread Thomas Gleixner
Guo Ren writes: > Tested and Acked by me. > > Queued for next pull request, thx Can we please route that with the rcuwait changes to avoid breakage unless you ship it to Linus right away? Thanks, tglx

Re: [patch V3 12/20] powerpc/ps3: Convert half completion to rcuwait

2020-03-21 Thread Thomas Gleixner
Thomas Gleixner writes: > From: Thomas Gleixner That's obviously bogus and wants to be: From: Peter Zijlstra (Intel)

Re: [patch V3 00/20] Lock ordering documentation and annotation for lockdep

2020-03-21 Thread Thomas Gleixner
Davidlohr Bueso writes: > On Sat, 21 Mar 2020, Thomas Gleixner wrote: > >>This is the third and hopefully final version of this work. The second one >>can be found here: > > Would you rather I send in a separate series with the kvm changes, or > should I just send a v

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-21 Thread Thomas Gleixner
Joel Fernandes writes: >> +rwlock_t >> + >> + >> +rwlock_t is a multiple readers and single writer lock mechanism. >> + >> +On a non PREEMPT_RT enabled kernel rwlock_t is implemented as a spinning >> +lock and the suffix rules of spinlock_t apply accordingly. The >> +implementation is fair

Re: [patch V3 13/20] Documentation: Add lock ordering and nesting documentation

2020-03-24 Thread Thomas Gleixner
Paul, "Paul E. McKenney" writes: > On Sat, Mar 21, 2020 at 12:25:57PM +0100, Thomas Gleixner wrote: > In the normal case where the task sleeps through the entire lock > acquisition, the sequence of events is as follows: > > state = UNINTERRUPTIBLE >

Documentation/locking/locktypes: Further clarifications and wordsmithing

2020-03-25 Thread Thomas Gleixner
ide of that the following updates are done: - Add pseudo code to document the spinlock state preserving mechanism on PREEMPT_RT - Wordsmith the bitspinlock and lock nesting sections Co-developed-by: Paul McKenney Signed-off-by: Paul McKenney Signed-off-by: Thomas Gleixner --- Docume

Re: passing NULL to clock_getres (VDSO): terminated by unexpected signal 11

2019-10-20 Thread Thomas Gleixner
On Sun, 20 Oct 2019, Christophe Leroy wrote: > Adding Thomas to the discussion as the commit is from him. > > Le 20/10/2019 à 11:53, Andreas Schwab a écrit : > > On Okt 20 2019, Christophe Leroy wrote: > > > > > Le 19/10/2019 à 21:18, Andreas Schwab a écrit : > > > > On Okt 19 2019, Christophe L

Re: passing NULL to clock_getres (VDSO): terminated by unexpected signal 11

2019-10-20 Thread Thomas Gleixner
On Sun, 20 Oct 2019, Andreas Schwab wrote: > On Okt 20 2019, Thomas Gleixner wrote: > > > clock_getres(NULL) is hardly valid. > > Of course not, it lacks a parameter. You know exactly what I mean. > > So special casing > > > > clock_getres(clock, NUL

Re: passing NULL to clock_getres (VDSO): terminated by unexpected signal 11

2019-10-20 Thread Thomas Gleixner
On Sun, 20 Oct 2019, Andreas Schwab wrote: > On Okt 20 2019, Thomas Gleixner wrote: > > > POSIX does not mention anything about the validity of the pointer handed to > > clock_getres(). > > Sure it does: "If the argument res is not NULL, the resolution of the > sp

[PATCH] lib/vdso: Make clock_getres() POSIX compliant again

2019-10-21 Thread Thomas Gleixner
eas Schwab Signed-off-by: Thomas Gleixner Cc: sta...@vger.kernel.org --- lib/vdso/gettimeofday.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) --- a/lib/vdso/gettimeofday.c +++ b/lib/vdso/gettimeofday.c @@ -214,9 +214,10 @@ int __cvdso_clock_getres_common(clockid_

Re: [RFC PATCH] powerpc/32: Switch VDSO to C implementation.

2019-10-21 Thread Thomas Gleixner
On Mon, 21 Oct 2019, Christophe Leroy wrote: > This is a tentative to switch powerpc/32 vdso to generic C implementation. > It will likely not work on 64 bits or even build properly at the moment. > > powerpc is a bit special for VDSO as well as system calls in the > way that it requires setting

Re: [RFC PATCH] powerpc/32: Switch VDSO to C implementation.

2019-10-26 Thread Thomas Gleixner
On Tue, 22 Oct 2019, Christophe Leroy wrote: > Le 22/10/2019 à 11:01, Christophe Leroy a écrit : > > Le 21/10/2019 à 23:29, Thomas Gleixner a écrit : > > > On Mon, 21 Oct 2019, Christophe Leroy wrote: > > > > > > > This is a tentative to switch powerpc/32 v

Re: [RFC PATCH] powerpc/32: Switch VDSO to C implementation.

2019-10-26 Thread Thomas Gleixner
On Sat, 26 Oct 2019, Christophe Leroy wrote: > Le 26/10/2019 à 17:53, Thomas Gleixner a écrit : > > > > > > gettimeofday:    vdso: 750 nsec/call > > > > > > > > > > > > gettimeofday:    vdso: 1533 nsec/call > &g

Re: [PATCH 03/23] y2038: vdso: change timeval to __kernel_old_timeval

2019-11-13 Thread Thomas Gleixner
ts us closer to removing the 'timeval' definition from the > kernel sources. > > Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Gleixner

Re: [PATCH 00/12] Convert cpu_up/down to device_online/offline

2019-11-18 Thread Thomas Gleixner
On Mon, 18 Nov 2019, Qais Yousef wrote: > I had to make an educated guess that you're probably the 'maintainer' of cpu > hotplug - but there's no explicit entry that says that. Please let me know if > I need to bring the attention of others too. :) > The series do have few rough edges to address

Re: move bus (PCI, PCMCIA, EISA, rapdio) config to drivers/

2018-10-14 Thread Thomas Gleixner
n needed) and then handles everything in the bus-specific > Kconfig file under drivers/. Nice cleanup. Acked-by: Thomas Gleixner

Re: [PATCH V4 2/15] KVM/MMU: Add tlb flush with range helper function

2018-10-14 Thread Thomas Gleixner
On Sun, 14 Oct 2018, Liran Alon wrote: > > On 13 Oct 2018, at 17:53, lantianyu1...@gmail.com wrote: > > > > From: Lan Tianyu > > > > This patch is to add wrapper functions for tlb_remote_flush_with_range > > callback. > > > > Signed-off-by: Lan Tianyu > > --- > > Change sicne V3: > > Rem

Re: remove asm-generic/ptrace.h v3

2019-06-24 Thread Thomas Gleixner
On Mon, 24 Jun 2019, Christoph Hellwig wrote: > > asm-generic/ptrace.h is a little weird in that it doesn't actually > implement any functionality, but it provided multiple layers of macros > that just implement trivial inline functions. We implement those > directly in the few architectures and

Re: [PATCH 4/5] x86: don't use asm-generic/ptrace.h

2019-06-24 Thread Thomas Gleixner
ellwig > Acked-by: Ingo Molnar > Acked-by: Oleg Nesterov Reviewed-by: Thomas Gleixner

Re: [PATCH 3/5] x86: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-06-25 Thread Thomas Gleixner
Hoan, On Tue, 25 Jun 2019, Hoan Tran OS wrote: Please use 'x86/Kconfig: ' as prefix. > This patch removes CONFIG_NODES_SPAN_OTHER_NODES as it's > enabled by default with NUMA. Please do not use 'This patch' in changelogs. It's pointless because we already know that this is a patch. See also Do

Re: [PATCH 3/5] x86: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-07-09 Thread Thomas Gleixner
Hoan, On Wed, 10 Jul 2019, Hoan Tran OS wrote: > On 6/25/19 3:45 PM, Thomas Gleixner wrote: > > On Tue, 25 Jun 2019, Hoan Tran OS wrote: > >> @@ -1567,15 +1567,6 @@ config X86_64_ACPI_NUMA > >>---help--- > >> Enable ACPI SRAT based node topology detect

Re: [PATCH 1/3] x86/Kconfig: Move ARCH_HAS_MEM_ENCRYPT to arch/Kconfig

2019-07-12 Thread Thomas Gleixner
On Fri, 12 Jul 2019, Thiago Jung Bauermann wrote: > powerpc and s390 are going to use this feature as well, so put it in a > generic location. > > Signed-off-by: Thiago Jung Bauermann Reviewed-by: Thomas Gleixner

Re: [PATCH 2/3] DMA mapping: Move SME handling to x86-specific files

2019-07-12 Thread Thomas Gleixner
On Fri, 12 Jul 2019, Thiago Jung Bauermann wrote: > diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_encrypt.h > index b310a9c18113..f2e399fb626b 100644 > --- a/include/linux/mem_encrypt.h > +++ b/include/linux/mem_encrypt.h > @@ -21,23 +21,11 @@ > > #else/* !CONFIG_ARCH_HAS_

Re: [PATCH v2 3/5] x86: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-07-15 Thread Thomas Gleixner
On Thu, 11 Jul 2019, Hoan Tran OS wrote: > Remove CONFIG_NODES_SPAN_OTHER_NODES as it's enabled > by default with NUMA. As I told you before this does not mention that the option is now enabled even for x86(32bit) configurations which did not enable it before and does not longer depend on X86_64_

Re: [PATCH] powerpc/irq: drop arch_early_irq_init()

2019-01-08 Thread Thomas Gleixner
ixes: 089fb442f301 ("powerpc: Use ARCH_IRQ_INIT_FLAGS") > > Cc: Thomas Gleixner > > Signed-off-by: Christophe Leroy Acked-by: Thomas Gleixner

Re: [RFC PATCH 12/23] kernel/watchdog: Introduce a struct for NMI watchdog operations

2018-06-13 Thread Thomas Gleixner
On Wed, 13 Jun 2018, Peter Zijlstra wrote: > On Wed, Jun 13, 2018 at 05:41:41PM +1000, Nicholas Piggin wrote: > > On Tue, 12 Jun 2018 17:57:32 -0700 > > Ricardo Neri wrote: > > > > > Instead of exposing individual functions for the operations of the NMI > > > watchdog, define a common interface t

Re: [RFC PATCH 03/23] genirq: Introduce IRQF_DELIVER_AS_NMI

2018-06-13 Thread Thomas Gleixner
On Wed, 13 Jun 2018, Julien Thierry wrote: > On 13/06/18 09:34, Peter Zijlstra wrote: > > On Tue, Jun 12, 2018 at 05:57:23PM -0700, Ricardo Neri wrote: > > > diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h > > > index 5426627..dbc5e02 100644 > > > --- a/include/linux/interrupt.h

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-13 Thread Thomas Gleixner
On Tue, 12 Jun 2018, Ricardo Neri wrote: > @@ -183,6 +184,8 @@ static irqreturn_t hardlockup_detector_irq_handler(int > irq, void *data) > if (!(hdata->flags & HPET_DEV_PERI_CAP)) > kick_timer(hdata); > > + pr_err("This interrupt should not have happened. Ensure delivery

Re: [RFC PATCH 20/23] watchdog/hardlockup/hpet: Rotate interrupt among all monitored CPUs

2018-06-13 Thread Thomas Gleixner
On Tue, 12 Jun 2018, Ricardo Neri wrote: > + /* There are no CPUs to monitor. */ > + if (!cpumask_weight(&hdata->monitored_mask)) > + return NMI_HANDLED; > + > inspect_for_hardlockups(regs); > > + /* > + * Target a new CPU. Keep trying until we find a monitored

Re: [RFC PATCH 03/23] genirq: Introduce IRQF_DELIVER_AS_NMI

2018-06-13 Thread Thomas Gleixner
On Wed, 13 Jun 2018, Julien Thierry wrote: > On 13/06/18 10:20, Thomas Gleixner wrote: > > Adding NMI delivery support at low level architecture irq chip level is > > perfectly fine, but the exposure of that needs to be restricted very > > much. Adding it to the gene

Re: [RFC PATCH 12/23] kernel/watchdog: Introduce a struct for NMI watchdog operations

2018-06-14 Thread Thomas Gleixner
On Thu, 14 Jun 2018, Nicholas Piggin wrote: > On Wed, 13 Jun 2018 18:31:17 -0700 > > I could look into creating the library for > > common code and relocate the hpet watchdog into arch/x86 for the hpet- > > specific parts. > > If you can investigate that approach, that would be appreciated. I hope

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-15 Thread Thomas Gleixner
On Thu, 14 Jun 2018, Ricardo Neri wrote: > On Wed, Jun 13, 2018 at 11:40:00AM +0200, Thomas Gleixner wrote: > > On Tue, 12 Jun 2018, Ricardo Neri wrote: > > > @@ -183,6 +184,8 @@ static irqreturn_t > > > hardlockup_detector_irq_handler(int irq, void *data)

Re: [RFC PATCH 20/23] watchdog/hardlockup/hpet: Rotate interrupt among all monitored CPUs

2018-06-15 Thread Thomas Gleixner
On Thu, 14 Jun 2018, Ricardo Neri wrote: > On Wed, Jun 13, 2018 at 11:48:09AM +0200, Thomas Gleixner wrote: > > On Tue, 12 Jun 2018, Ricardo Neri wrote: > > > + /* There are no CPUs to monitor. */ > > > + if (!cpumask_weight(&hdata->monitored_mask))

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-16 Thread Thomas Gleixner
On Fri, 15 Jun 2018, Ricardo Neri wrote: > On Fri, Jun 15, 2018 at 11:19:09AM +0200, Thomas Gleixner wrote: > > On Thu, 14 Jun 2018, Ricardo Neri wrote: > > > Alternatively, there could be a counter that skips reading the HPET status > > > register (and the detection

Re: [RFC PATCH 20/23] watchdog/hardlockup/hpet: Rotate interrupt among all monitored CPUs

2018-06-16 Thread Thomas Gleixner
On Fri, 15 Jun 2018, Ricardo Neri wrote: > On Fri, Jun 15, 2018 at 12:29:06PM +0200, Thomas Gleixner wrote: > > You have to consider two cases: > > > > 1) !remapped mode: > > > > That's reasonably simple because you just have to deal with the HPET >

Re: [RFC PATCH 03/23] genirq: Introduce IRQF_DELIVER_AS_NMI

2018-06-16 Thread Thomas Gleixner
On Fri, 15 Jun 2018, Ricardo Neri wrote: > On Fri, Jun 15, 2018 at 09:01:02AM +0100, Julien Thierry wrote: > > In my patches, I'm not sure there is much to adapt to your work as most of > > it is arch specific (although I wont say no to another pair of eyes looking > > at them). From what I've seen

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-20 Thread Thomas Gleixner
On Tue, 19 Jun 2018, Ricardo Neri wrote: > On Sat, Jun 16, 2018 at 03:24:49PM +0200, Thomas Gleixner wrote: > > The status register is useless in case of MSI. MSI is edge triggered > > > > The only register which gives you proper information is the counter > > re

Re: [PATCH] Documentation: Add powerpc options for spec_store_bypass_disable

2018-07-09 Thread Thomas Gleixner
stead. Happy to take > advice on how better to structure it if anyone has opinions. Looks good to me. Acked-by: Thomas Gleixner

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-30 Thread Thomas Gleixner
On Mon, 30 Jul 2018, Christoph Hellwig wrote: > There is nothing arch specific about PCI or dma-debug, so move this > call to common code just after registering the bus type. > > Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner

Re: [RFC PATCH] powerpc/32: Switch VDSO to C implementation.

2020-01-09 Thread Thomas Gleixner
Christophe! Christophe Leroy writes: > In do_hres(), I see: > > cycles = __arch_get_hw_counter(vd->clock_mode); > ns = vdso_ts->nsec; > last = vd->cycle_last; > if (unlikely((s64)cycles < 0)) > return -1; > > __arch_get

Re: [RFC PATCH v2 01/10] lib: vdso: ensure all arches have 32bit fallback

2020-01-10 Thread Thomas Gleixner
Andy Lutomirski writes: > On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy > wrote: >> >> In order to simplify next step which moves fallback call at arch >> level, ensure all arches have a 32bit fallback instead of handling >> the lack of 32bit fallback in the common code based >> on VDSO_HAS_3

Re: [RFC PATCH v2 05/10] lib: vdso: inline do_hres()

2020-01-10 Thread Thomas Gleixner
Arnd Bergmann writes: > On Mon, Dec 23, 2019 at 3:31 PM Christophe Leroy > wrote: >> >> do_hres() is called from several places, so GCC doesn't inline >> it at first. >> >> do_hres() takes a struct __kernel_timespec * parameter for >> passing the result. In the 32 bits case, this parameter corres

Re: [RFC PATCH v2 07/10] lib: vdso: don't use READ_ONCE() in __c_kernel_time()

2020-01-10 Thread Thomas Gleixner
Christophe Leroy writes: > > diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c > index 17b4cff6e5f0..5a17a9d2e6cd 100644 > --- a/lib/vdso/gettimeofday.c > +++ b/lib/vdso/gettimeofday.c > @@ -144,7 +144,7 @@ __cvdso_gettimeofday(const struct vdso_data *vd, struct > __kernel_old_timeva

Re: [RFC PATCH] powerpc/32: Switch VDSO to C implementation.

2020-01-10 Thread Thomas Gleixner
Christophe, Christophe Leroy writes: > On 01/09/2020 02:05 PM, Thomas Gleixner wrote: >> The reason why this is implemented in this way is that >> __arch_get_hw_counter() needs a way to express that the clocksource of >> the moment is not suitable for VDSO so that the

Re: [RFC PATCH v2 07/10] lib: vdso: don't use READ_ONCE() in __c_kernel_time()

2020-01-11 Thread Thomas Gleixner
Christophe Leroy writes: > > With READ_ONCE() the 64 bits are being read: > > Without the READ_ONCE() only 32 bits are read. That's the most optimal. > > Without READ_ONCE() but with a barrier() after the read, we should get > the same result but GCC (GCC 8.1) does less good: > > Assuming both pa

Re: [PATCH] lib: vdso: mark __cvdso_clock_getres() as static

2020-01-11 Thread Thomas Gleixner
Christophe Leroy writes: > When __cvdso_clock_getres() became __cvdso_clock_getres_common() > and a new __cvdso_clock_getres() was added, static qualifier was > forgotten. > > Fixes: 502a590a170b ("lib/vdso: Move fallback invocation to the callers") > Signed-off-by: Christophe Leroy I've already

Re: [PATCH] lib: vdso: mark __cvdso_clock_getres() as static

2020-01-13 Thread Thomas Gleixner
Christophe Leroy writes: > Is there a git tree with the latest VDSO status ? > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git?h=timers%2Fvdso > is 6 monthes old. Will push a new one later today. I'll let you know. Thanks, tglx

<    1   2   3   4   5   6   7   8   9   >