Re: [PATCH v2 1/1] x86/vector: Fix vector leak during CPU offline

2024-05-23 Thread Thomas Gleixner
On Wed, May 22 2024 at 15:02, Dongli Zhang wrote: > The absence of IRQD_MOVE_PCNTXT prevents immediate effectiveness of > interrupt affinity reconfiguration via procfs. Instead, the change is > deferred until the next instance of the interrupt being triggered on the > original CPU. > > When the

Re: [PATCH 1/1] x86/vector: Fix vector leak during CPU offline

2024-05-21 Thread Thomas Gleixner
On Wed, May 15 2024 at 12:51, Dongli Zhang wrote: > On 5/13/24 3:46 PM, Thomas Gleixner wrote: >> So yes, moving the invocation of irq_force_complete_move() before the >> irq_needs_fixup() call makes sense, but it wants this to actually work >> correctly: >> @

Re: [PATCH 1/1] x86/vector: Fix vector leak during CPU offline

2024-05-13 Thread Thomas Gleixner
On Mon, May 13 2024 at 10:43, Dongli Zhang wrote: > On 5/13/24 5:44 AM, Thomas Gleixner wrote: >> On Fri, May 10 2024 at 12:06, Dongli Zhang wrote: >> Any interrupt which is affine to an outgoing CPU is migrated and >> eventually pending moves are enfo

Re: [PATCH 1/1] x86/vector: Fix vector leak during CPU offline

2024-05-13 Thread Thomas Gleixner
On Fri, May 10 2024 at 12:06, Dongli Zhang wrote: > The absence of IRQD_MOVE_PCNTXT prevents immediate effectiveness of > interrupt affinity reconfiguration via procfs. Instead, the change is > deferred until the next instance of the interrupt being triggered on the > original CPU. > > When the

Re: [PATCH 1/1] genirq/cpuhotplug: retry with online CPUs on irq_do_set_affinity failure

2024-04-22 Thread Thomas Gleixner
On Mon, Apr 22 2024 at 16:09, Dongli Zhang wrote: > On 4/22/24 13:58, Thomas Gleixner wrote: >> On Thu, Apr 18 2024 at 18:33, Dongli Zhang wrote: > Would you mind suggesting if the below commit message is fine to you? > > > genirq/cpuhotplug: retry with cpu_online_mask whe

Re: [PATCH 1/1] genirq/cpuhotplug: retry with online CPUs on irq_do_set_affinity failure

2024-04-22 Thread Thomas Gleixner
On Thu, Apr 18 2024 at 18:33, Dongli Zhang wrote: > When a CPU is offline, its IRQs may migrate to other CPUs. For managed > IRQs, they are migrated, or shutdown (if all CPUs of the managed IRQ > affinity are offline). For regular IRQs, there will only be a > migration. Please write out

[PATCH] selftests/nolibc: libc-test: avoid -Wstringop-overflow warnings

2023-09-10 Thread Thomas Weißschuh
__nfds, int __timeout) |^~~~ Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c

Re: [PATCH V7 03/18] x86/pks: Add additional PKEY helper macros

2021-12-08 Thread Thomas Gleixner
Ira, On Tue, Dec 07 2021 at 16:51, Ira Weiny wrote: > On Thu, Nov 25, 2021 at 03:25:09PM +0100, Thomas Gleixner wrote: > > u32 pkey_update_pkval(u32 pkval, int pkey, u32 accessbits) > { > - int shift = pkey * PKR_BITS_PER_PKEY; > + int shift = P

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-12-07 Thread Thomas Gleixner
Ira, On Mon, Dec 06 2021 at 17:54, Ira Weiny wrote: > On Thu, Nov 25, 2021 at 03:12:47PM +0100, Thomas Gleixner wrote: >> > +.macro __call_ext_ptregs cfunc annotate_retpoline_safe:req >> > +#ifdef CONFIG_ARCH_ENABLE_SUPERVISOR_PKEYS >> > + /* add space for ex

Re: [PATCH V7 05/18] x86/pks: Add PKS setup code

2021-11-26 Thread Thomas Gleixner
On Thu, Nov 25 2021 at 16:15, Thomas Gleixner wrote: > On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > Aside of that, the function which set's up the init value is really > bogus. As you explained in the cover letter a kernel user has to: > >1) Claim an index in the enum >

Re: [PATCH V7 05/18] x86/pks: Add PKS setup code

2021-11-26 Thread Thomas Gleixner
On Fri, Nov 26 2021 at 11:11, taoyi ty wrote: > On 11/25/21 11:15 PM, Thomas Gleixner wrote: >>> +void setup_pks(void) >>> +{ >>> + if (!cpu_feature_enabled(X86_FEATURE_PKS)) >>> + return; >>> + >>> + write_pkrs(pkrs_init_value

Re: [PATCH V7 03/18] x86/pks: Add additional PKEY helper macros

2021-11-25 Thread Thomas Gleixner
On Thu, Nov 25 2021 at 15:25, Thomas Gleixner wrote: > On Tue, Aug 03 2021 at 21:32, ira weiny wrote: >> @@ -200,16 +200,14 @@ __setup("init_pkru=", setup_init_pkru); >> */ >> u32 update_pkey_val(u32 pk_reg, int pkey, unsigned int flags) >> { >> -

Re: [PATCH V7 07/18] x86/pks: Preserve the PKRS MSR on context switch

2021-11-25 Thread Thomas Gleixner
On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > @@ -658,6 +659,8 @@ __switch_to(struct task_struct *prev_p, struct > task_struct *next_p) > /* Load the Intel cache allocation PQR MSR. */ > resctrl_sched_in(); > > + pkrs_write_current(); This is invoked from switch_to() and

Re: [PATCH V7 05/18] x86/pks: Add PKS setup code

2021-11-25 Thread Thomas Gleixner
On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > +#ifdef CONFIG_ARCH_ENABLE_SUPERVISOR_PKEYS > + > +void setup_pks(void); pks_setup() > +#ifdef CONFIG_ARCH_ENABLE_SUPERVISOR_PKEYS > + > +static DEFINE_PER_CPU(u32, pkrs_cache); > +u32 __read_mostly pkrs_init_value; > + > +/* > + * write_pkrs()

Re: [PATCH V7 03/18] x86/pks: Add additional PKEY helper macros

2021-11-25 Thread Thomas Gleixner
On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > @@ -200,16 +200,14 @@ __setup("init_pkru=", setup_init_pkru); > */ > u32 update_pkey_val(u32 pk_reg, int pkey, unsigned int flags) > { > - int pkey_shift = pkey * PKR_BITS_PER_PKEY; > - > /* Mask out old bit values */ > - pk_reg

Re: [PATCH V7 02/18] x86/fpu: Refactor arch_set_user_pkey_access()

2021-11-25 Thread Thomas Gleixner
On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > +/* > + * Replace disable bits for @pkey with values from @flags > + * > + * Kernel users use the same flags as user space: > + * PKEY_DISABLE_ACCESS > + * PKEY_DISABLE_WRITE > + */ > +u32 update_pkey_val(u32 pk_reg, int pkey, unsigned int

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-11-25 Thread Thomas Gleixner
Ira, On Tue, Aug 03 2021 at 21:32, ira weiny wrote: > +/* > + * __call_ext_ptregs - Helper macro to call into C with extended pt_regs > + * @cfunc: C function to be called > + * > + * This will ensure that extended_ptregs is added and removed as needed > during > + * a call into C

Re: [PATCH V7 08/18] x86/entry: Preserve PKRS MSR across exceptions

2021-11-25 Thread Thomas Gleixner
On Fri, Nov 12 2021 at 16:50, Ira Weiny wrote: > On Tue, Aug 03, 2021 at 09:32:21PM -0700, 'Ira Weiny' wrote: >> From: Ira Weiny >> >> The PKRS MSR is not managed by XSAVE. It is preserved through a context >> switch but this support leaves exception handling code open to memory >> accesses

Re: [PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable

2021-04-20 Thread Thomas Bogendoerfer
On Tue, Apr 20, 2021 at 07:09:26PM +0300, Sergei Shtylyov wrote: > Hello! > > On 4/20/21 5:04 PM, Thomas Bogendoerfer wrote: > > > Add OF support for switching RB532 do device tree possible. > >I couldnb't parse that. :-) no wonder ;-) I'll rephrase in

[PATCH v2 2/2] dt-bindings: interrupt-controller: Add IDT 79RC3243x Interrupt Controller

2021-04-20 Thread Thomas Bogendoerfer
Document DT bindings for IDT 79RC3243x Interrupt Controller. Signed-off-by: Thomas Bogendoerfer --- .../interrupt-controller/idt,3243x-pic.yaml | 48 +++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/idt,3243x

[PATCH v2 1/2] irqchip: Add support for IDT 79rc3243x interrupt controller

2021-04-20 Thread Thomas Bogendoerfer
IDT 79rc3243x SoCs have rather simple interrupt controllers connected to the MIPS CPU interrupt lines. Each of them has room for up to 32 interrupts. Signed-off-by: Thomas Bogendoerfer --- drivers/irqchip/Kconfig| 5 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq

Re: [PATCH] irqchip: Add support for IDT 79rc3243x interrupt controller

2021-04-20 Thread Thomas Bogendoerfer
On Tue, Apr 20, 2021 at 06:34:59PM +0100, Marc Zyngier wrote: > On 2021-04-20 13:34, Thomas Bogendoerfer wrote: > > IDT 79rc3243x SoCs have rather simple interrupt controllers connected > > to the MIPS CPU interrupt lines. Each of them has room for up to > > 32 interrupts

Re: [signal] 4bad58ebc8: will-it-scale.per_thread_ops -3.3% regression

2021-04-20 Thread Thomas Gleixner
On Tue, Apr 20 2021 at 11:08, kernel test robot wrote: > FYI, we noticed a -3.3% regression of will-it-scale.per_thread_ops due to > commit: > > commit: 4bad58ebc8bc4f20d89cff95417c9b4674769709 ("signal: Allow tasks to > cache one sigqueue struct") >

Re: [PATCH] hrtimer: Update softirq_expires_next correctly after __hrtimer_get_next_event()

2021-04-20 Thread Thomas Gleixner
On Tue, Apr 20 2021 at 17:15, Lorenzo Colitti wrote: > On Fri, Apr 16, 2021 at 1:47 AM Thomas Gleixner wrote: >> Enable tracing and enable the following tracepoints: >> [...] > > Sorry for the delay. I had to learn a bit about how to use the tracing > infrastructure. I

[PATCH] ata: pata_rb532: Add OF support and make COMPILE_TESTable

2021-04-20 Thread Thomas Bogendoerfer
Add OF support for switching RB532 do device tree possible. By removing the not needed asm/mach-rc32434/rb.h include the driver could be compile tested now. Signed-off-by: Thomas Bogendoerfer --- drivers/ata/Kconfig | 2 +- drivers/ata/pata_rb532_cf.c | 11 +-- 2 files changed

[PATCH 2/2] dt-bindings: gpio: Add devicetree binding for IDT 79RC3243x GPIO controller

2021-04-20 Thread Thomas Bogendoerfer
Add YAML devicetree binding for IDT 79RC3243x GPIO controller Signed-off-by: Thomas Bogendoerfer --- .../bindings/gpio/gpio-idt3243x.yaml | 73 +++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-idt3243x.yaml diff --git

[PATCH 1/2] gpio: Add support for IDT 79RC3243x GPIO controller

2021-04-20 Thread Thomas Bogendoerfer
IDT 79RC3243x SoCs integrated a gpio controller, which handles up to 32 gpios. All gpios could be used as interrupt source. Signed-off-by: Thomas Bogendoerfer --- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile| 1 + drivers/gpio/gpio-idt3243x.c | 210

[PATCH] irqchip: Add support for IDT 79rc3243x interrupt controller

2021-04-20 Thread Thomas Bogendoerfer
IDT 79rc3243x SoCs have rather simple interrupt controllers connected to the MIPS CPU interrupt lines. Each of them has room for up to 32 interrupts. Signed-off-by: Thomas Bogendoerfer --- drivers/irqchip/Kconfig| 5 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq

Re: build failure of malta_qemu_32r6_defconfig

2021-04-20 Thread Thomas Bogendoerfer
On Sun, Apr 18, 2021 at 12:01:36AM +0100, Sudip Mukherjee wrote: > Hi Thomas, > > On Fri, Apr 9, 2021 at 1:17 PM Thomas Bogendoerfer > wrote: > > > > On Thu, Apr 08, 2021 at 09:42:11AM +0800, YunQiang Su wrote: > > > Sudip Mukherjee 于2021年4月8日周四 上午

Re: [PATCH] hrtimer: Update softirq_expires_next correctly after __hrtimer_get_next_event()

2021-04-20 Thread Thomas Gleixner
On Mon, Apr 19 2021 at 20:12, Maciej Żenczykowski wrote: > On Thu, Apr 15, 2021 at 9:47 AM Thomas Gleixner wrote: >> Run the test on a kernels with and without that commit and collect trace >> data for both. >> >> That should give me a pretty clear picture what's goin

Re: [PATCH v6] hrtimer: avoid retrigger_next_event IPI

2021-04-19 Thread Thomas Gleixner
On Mon, Apr 19 2021 at 16:39, Marcelo Tosatti wrote: > > +static void clock_was_set_force_reprogram_work(struct work_struct *work) > +{ > + clock_was_set(true); > +} > + > +static DECLARE_WORK(hrtimer_force_reprogram_work, > clock_was_set_force_reprogram_work); > + > + > static void

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-19 Thread Thomas Gleixner
On Mon, Apr 19 2021 at 03:36, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:1216f02e Add linux-next specific files for 20210415 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1032ba29d0 > kernel config:

[RESEND PATCH] drm/rockchip: dsi: move all lane config except LCDC mux to bind()

2021-04-18 Thread Thomas Hebb
turns on during initial rockchipdrm load as expected. Fixes: 2d4f7bdafd70 ("drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver") Signed-off-by: Thomas Hebb --- .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 36 ++- 1 file changed, 28 insertions(+), 8 deletion

[RESEND PATCH] drm/rockchip: dsi: remove extra component_del() call

2021-04-18 Thread Thomas Hebb
pi support") Cc: sta...@vger.kernel.org Signed-off-by: Thomas Hebb --- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index 24a71091759c.

Re: [PATCH] genirq/irqaction: Move dev_id and percpu_dev_id in a union

2021-04-18 Thread Thomas Gleixner
On Sat, Apr 10 2021 at 13:00, Marc Zyngier wrote: > dev_id and percpu_dev_id are mutually exclusive in struct irqaction, > as they conceptually represent the same thing, only in a per-cpu > fashion. > > Move them into an anonymous union, saving a few bytes on the way. The reason why they are not

[PATCH v6 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-18 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v6 net-next 10/10] dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs

2021-04-18 Thread Thomas Bogendoerfer
Add device tree bindings for ethernet controller integrated into IDT 79RC3243x SoCs. Signed-off-by: Thomas Bogendoerfer --- .../bindings/net/idt,3243x-emac.yaml | 73 +++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/idt

[PATCH v6 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-18 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 21 +++-- 1 file

[PATCH v6 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-18 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v6 net-next 05/10] net: korina: Use DMA API

2021-04-18 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git

[PATCH v6 net-next 07/10] net: korina: Add support for device tree

2021-04-18 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 20 +--- drivers/net/ethernet/korina.c | 32

[PATCH v6 net-next 04/10] net: korina: Remove nested helpers

2021-04-18 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net

[PATCH v6 net-next 03/10] net: korina: Remove not needed cache flushes

2021-04-18 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet

[PATCH v6 net-next 02/10] net: korina: Use devres functions

2021-04-18 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers

[PATCH v6 net-next 01/10] net: korina: Fix MDIO functions

2021-04-18 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 56 +++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v6 net-next 00/10] net: Korina improvements

2021-04-18 Thread Thomas Bogendoerfer
- fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) Thomas Bogendoerfer (10): net: korina: Fix MDIO functions net: korina: Use devres functions net: korina: Remove not needed cache flushes net: korina: Remove

Re: [PATCH 05/15] x86: Implement function_nocfi

2021-04-18 Thread Thomas Gleixner
On Sat, Apr 17 2021 at 17:11, Andy Lutomirski wrote: > On Sat, Apr 17, 2021 at 4:53 PM Thomas Gleixner wrote: >> which works for >> >> foo = function_nocfi(bar); > > I agree in general. But right now, we have, in asm/proto.h: > > void entry_SYSCALL_64(vo

Re: [PATCH 05/15] x86: Implement function_nocfi

2021-04-17 Thread Thomas Gleixner
On Sat, Apr 17 2021 at 16:19, Andy Lutomirski wrote: > On Fri, Apr 16, 2021 at 4:40 PM Kees Cook wrote: >> Okay, you're saying you want __builtin_gimme_body_p() to be a constant >> expression for the compiler, not inline asm? > > Yes. > > I admit that, in the trivial case where the asm code is

Re: [PATCH v8 clocksource 2/5] clocksource: Retry clock read if long delays detected

2021-04-17 Thread Thomas Gleixner
On Sat, Apr 17 2021 at 15:54, Paul E. McKenney wrote: > On Sat, Apr 17, 2021 at 02:24:23PM +0200, Thomas Gleixner wrote: >> I so wish we could just delete all of this horror instead of making it >> more horrible. > > Revisit deleting it in five years if there are no issu

Re: [PATCH] Fix set apic mode from x2apic enabled bit patch

2021-04-17 Thread Thomas Gleixner
Mike! On Sun, Apr 18 2021 at 00:39, Thomas Gleixner wrote: > If you can't come up with something sensible anytime soon before the > merge window opens then I'm simply going to revert 41e2da9b5e67 and you > can try again for the next cycle. so I just figured out that Boris wasted his

Re: [PATCH] Fix set apic mode from x2apic enabled bit patch

2021-04-17 Thread Thomas Gleixner
Mike! On Thu, Apr 15 2021 at 17:06, Mike Travis wrote: I'm slowly getting tired of the fact that every patch coming from you fails to comply with the minimal requirements of the documented procedures. $subject: [PATCH] Fix set apic mode from x2apic enabled bit patch Documentation clearly

Re: [PATCH v5] hrtimer: avoid retrigger_next_event IPI

2021-04-17 Thread Thomas Gleixner
On Sat, Apr 17 2021 at 18:24, Thomas Gleixner wrote: > On Fri, Apr 16 2021 at 13:13, Peter Xu wrote: >> On Fri, Apr 16, 2021 at 01:00:23PM -0300, Marcelo Tosatti wrote: >>> >>> +#define CLOCK_SET_BASES ((1U << HRTIMER_BASE_REALTIME) |

Re: [PATCH v5] hrtimer: avoid retrigger_next_event IPI

2021-04-17 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 13:13, Peter Xu wrote: > On Fri, Apr 16, 2021 at 01:00:23PM -0300, Marcelo Tosatti wrote: >> >> +#define CLOCK_SET_BASES ((1U << HRTIMER_BASE_REALTIME) |\ >> + (1U << HRTIMER_BASE_REALTIME_SOFT) | \ >> + (1U <<

Re: [PATCH v8 clocksource 3/5] clocksource: Check per-CPU clock synchronization when marked unstable

2021-04-17 Thread Thomas Gleixner
On Tue, Apr 13 2021 at 21:36, Paul E. McKenney wrote: Bah, hit send too quick. > + cpumask_clear(_ahead); > + cpumask_clear(_behind); > + preempt_disable(); Daft. > + testcpu = smp_processor_id(); > + pr_warn("Checking clocksource %s synchronization from CPU %d.\n", >

Re: [PATCH v8 clocksource 3/5] clocksource: Check per-CPU clock synchronization when marked unstable

2021-04-17 Thread Thomas Gleixner
On Tue, Apr 13 2021 at 21:36, Paul E. McKenney wrote: > diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c > index 1fc0962c89c0..97eeaf164296 100644 > --- a/arch/x86/kernel/kvmclock.c > +++ b/arch/x86/kernel/kvmclock.c > @@ -169,7 +169,7 @@ struct clocksource kvm_clock = { >

Re: [PATCH v8 clocksource 2/5] clocksource: Retry clock read if long delays detected

2021-04-17 Thread Thomas Gleixner
On Tue, Apr 13 2021 at 21:35, Paul E. McKenney wrote: > #define WATCHDOG_INTERVAL (HZ >> 1) > #define WATCHDOG_THRESHOLD (NSEC_PER_SEC >> 4) > +#define WATCHDOG_MAX_SKEW (NSEC_PER_SEC >> 6) That's ~15ms which is a tad large I'd say... > static void clocksource_watchdog_work(struct

Re: [PATCH 05/15] x86: Implement function_nocfi

2021-04-17 Thread Thomas Gleixner
On Sat, Apr 17 2021 at 01:02, Thomas Gleixner wrote: > On Fri, Apr 16 2021 at 15:37, Kees Cook wrote: > >> On Fri, Apr 16, 2021 at 03:20:17PM -0700, Andy Lutomirski wrote: >>> But obviously there is code that needs real function pointers. How >>> about mak

Re: [PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 23:37, Thomas Gleixner wrote: > On Fri, Apr 16 2021 at 13:38, Sami Tolvanen wrote: >> #ifdef CONFIG_STATIC_CALL_SELFTEST >> >> -static int func_a(int x) >> +int func_a(int x) >> { >> return x+1; >> } >>

Re: [PATCH 06/15] x86: Avoid CFI jump tables in IDT and entry points

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 16:56, Kees Cook wrote: > On Sat, Apr 17, 2021 at 12:26:56AM +0200, Thomas Gleixner wrote: >> Where is the analysis why excluding >> >> > +CFLAGS_REMOVE_idt.o := $(CC_FLAGS_CFI) >> > +CFLAGS_REMOVE_paravirt.o := $(

Re: [PATCH 05/15] x86: Implement function_nocfi

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 15:37, Kees Cook wrote: > On Fri, Apr 16, 2021 at 03:20:17PM -0700, Andy Lutomirski wrote: >> But obviously there is code that needs real function pointers. How >> about making this a first-class feature, or at least hacking around it >> more cleanly. For example, what

Re: [PATCH 06/15] x86: Avoid CFI jump tables in IDT and entry points

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 13:38, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces function addresses in C > code with jump table addresses. Fine. > To avoid referring to jump tables in entry code with PTI, What has this to do with PTI? > disable CFI for IDT and paravirt code,

Re: [PATCH 05/15] x86: Implement function_nocfi

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 14:49, Sami Tolvanen wrote: > On Fri, Apr 16, 2021 at 2:18 PM Borislav Petkov wrote: >> In file included from ./include/linux/ftrace.h:22:0, >> from ./include/linux/init_task.h:9, >> from init/init_task.c:2: >> ./include/linux/ftrace.h: In

Re: [PATCH v2] X86: Makefile: Replace -pg with CC_FLAGS_FTRACE

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 13:39, zhaoxiao wrote: > In preparation for x86 supporting ftrace built on other compiler > options, let's have the x86 Makefiles remove the $(CC_FLAGS_FTRACE) > flags, whatever these may be, rather than assuming '-pg'. s/let's have the/make the/ > There should be no

Re: [patch] x86/crash: fix crash_setup_memmap_entries() out-of-bounds access

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 17:13, Mike Galbraith wrote: > On Fri, 2021-04-16 at 16:44 +0200, Borislav Petkov wrote: >> On Fri, Apr 16, 2021 at 03:16:07PM +0200, Mike Galbraith wrote: >> > On Fri, 2021-04-16 at 14:16 +0200, Borislav Petkov wrote: >> > > >> > > Please be more verbose and structure your

Re: [PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 13:38, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler renames static functions. This > breaks static_call users using static functions, because the current > implementation assumes functions have stable names by hardcoding them > in inline assembly. Make the

Re: [PATCH v8 clocksource 2/5] clocksource: Retry clock read if long delays detected

2021-04-16 Thread Thomas Gleixner
On Tue, Apr 13 2021 at 21:35, Paul E. McKenney wrote: > #define WATCHDOG_INTERVAL (HZ >> 1) > #define WATCHDOG_THRESHOLD (NSEC_PER_SEC >> 4) Didn't we discuss that the threshold is too big ?

Re: [PATCH v8 clocksource 1/5] clocksource: Provide module parameters to inject delays in watchdog

2021-04-16 Thread Thomas Gleixner
On Tue, Apr 13 2021 at 21:35, Paul E. McKenney wrote: > > +static int inject_delay_freq; > +module_param(inject_delay_freq, int, 0644); > +static int inject_delay_run = 1; > +module_param(inject_delay_run, int, 0644); int? Can't we just make them 'unsigned int'? Negative values are not that

Re: [PATCH v5 net-next 10/10] dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs

2021-04-16 Thread Thomas Bogendoerfer
On Fri, Apr 16, 2021 at 12:29:46PM +0300, Sergei Shtylyov wrote: > On 16.04.2021 11:52, Thomas Bogendoerfer wrote: > > > Add device tree bindings for ethernet controller integrated into > > IDT 79RC3243x SoCs. > > > > Signed-off-by: Thomas Bogendoerfer > >

[PATCH] ccp: ccp - add support for Green Sardine

2021-04-16 Thread Rijo Thomas
From: Devaraj Rangasamy Add a new PCI device entry for Green Sardine APU. Signed-off-by: Devaraj Rangasamy Tested-by: Babulu Ellune Signed-off-by: Rijo Thomas --- drivers/crypto/ccp/sp-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/ccp/sp-pci.c b/drivers/crypto/ccp

Re: [PATCH] kernel:irq:manage: request threaded irq with a specified priority

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 12:57, chensong wrote: > On 2021/4/13 下午4:39, Thomas Gleixner wrote: >> It breaks because the system designer failed to assign proper priorities >> to the irq threads int_a, int_b and to the user space process task_a. > > yes, it's designers' responsibi

[PATCH v5 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-16 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v5 net-next 10/10] dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs

2021-04-16 Thread Thomas Bogendoerfer
Add device tree bindings for ethernet controller integrated into IDT 79RC3243x SoCs. Signed-off-by: Thomas Bogendoerfer --- .../bindings/net/idt,3243x-emac.yaml | 74 +++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/idt

[PATCH v5 net-next 07/10] net: korina: Add support for device tree

2021-04-16 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git

[PATCH v5 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-16 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v5 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-16 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 21 +++-- 1 file

[PATCH v5 net-next 05/10] net: korina: Use DMA API

2021-04-16 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git

[PATCH v5 net-next 04/10] net: korina: Remove nested helpers

2021-04-16 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net

[PATCH v5 net-next 02/10] net: korina: Use devres functions

2021-04-16 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers

[PATCH v5 net-next 03/10] net: korina: Remove not needed cache flushes

2021-04-16 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet

[PATCH v5 net-next 01/10] net: korina: Fix MDIO functions

2021-04-16 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 56 +++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v5 net-next 00/10] net: Korina improvements

2021-04-16 Thread Thomas Bogendoerfer
- fixed usage of of_get_mac_address for net-next Changes in v2: - added device tree support to get rid of idt_cpu_freq - fixed compile test on 64bit archs - fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) Thomas

[PATCH v4 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-16 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet

[PATCH v4 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-16 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 21 +++-- 1 file

[PATCH v4 net-next 07/10] net: korina: Add support for device tree

2021-04-16 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git

[PATCH v4 net-next 05/10] net: korina: Use DMA API

2021-04-16 Thread Thomas Bogendoerfer
Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 158 +- 1 file changed, 98 insertions(+), 60 deletions(-) diff --git

[PATCH v4 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-16 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9

[PATCH v4 net-next 04/10] net: korina: Remove nested helpers

2021-04-16 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net

[PATCH v4 net-next 02/10] net: korina: Use devres functions

2021-04-16 Thread Thomas Bogendoerfer
Simplify probe/remove code by using devm_ functions. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 64 --- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers

[PATCH v4 net-next 03/10] net: korina: Remove not needed cache flushes

2021-04-16 Thread Thomas Bogendoerfer
Descriptors are mapped uncached so there is no need to do any cache handling for them. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet

[PATCH v4 net-next 01/10] net: korina: Fix MDIO functions

2021-04-16 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/korina.c | 56 +++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net

[PATCH v4 net-next 00/10] net: Korina improvements

2021-04-16 Thread Thomas Bogendoerfer
support to get rid of idt_cpu_freq - fixed compile test on 64bit archs - fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) Thomas Bogendoerfer (10): net: korina: Fix MDIO functions net: korina: Use devres functions

Re: [PATCH v3 net-next 07/10] net: korina: Add support for device tree

2021-04-16 Thread Thomas Bogendoerfer
gt; You need to document this compatible somewhere under > Documentation/devicetree/binding checkpatch hinted to put it in an extra patch, it's patch 10 of this series and looking at my inbox it didn't get through :-(. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea.[ RFC1925, 2.3 ]

Re: [PATCH v2 0/8] MIPS: fixes for PCI legacy drivers (rt2880, rt3883)

2021-04-16 Thread Thomas Bogendoerfer
50 > arch/mips/pci/pci-rt3883.c | 10 ++- > 4 files changed, 35 insertions(+), 83 deletions(-) series applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea.[ RFC1925, 2.3 ]

Re: [PATCH] MIPS: Fix strnlen_user access check

2021-04-16 Thread Thomas Bogendoerfer
On Thu, Apr 15, 2021 at 11:26:40PM +0200, Thomas Bogendoerfer wrote: > Commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs") changed the access_ok > for strnlen_user to check the whole range, which broke some callers > of strndup_user(). Restore the old behaviour and just c

Re: [PATCH v3 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-16 Thread Thomas Bogendoerfer
On Fri, Apr 16, 2021 at 01:30:04AM +0200, Andrew Lunn wrote: > On Thu, Apr 15, 2021 at 01:06:43AM +0200, Thomas Bogendoerfer wrote: > > Get rid of access to struct korina_device by just passing the mac > > address via platform data and use drvdata for passing netdev to remo

[PATCH] MIPS: Fix strnlen_user access check

2021-04-15 Thread Thomas Bogendoerfer
Commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs") changed the access_ok for strnlen_user to check the whole range, which broke some callers of strndup_user(). Restore the old behaviour and just check the first byte. Fixes: 04324f44cb69 ("MIPS: Remove get_fs/set_fs") S

Re: [PATCH v3] hrtimer: avoid retrigger_next_event IPI

2021-04-15 Thread Thomas Gleixner
On Thu, Apr 15 2021 at 12:39, Marcelo Tosatti wrote: > +static bool need_reprogram_timer(struct hrtimer_cpu_base *cpu_base) > +{ > + unsigned int active = 0; > + > + if (cpu_base->softirq_activated) > + return true; > + > + active = cpu_base->active_bases &

Re: [PATCH] hrtimer: Update softirq_expires_next correctly after __hrtimer_get_next_event()

2021-04-15 Thread Thomas Gleixner
On Wed, Apr 14 2021 at 11:49, Lorenzo Colitti wrote: > On Wed, Apr 14, 2021 at 2:14 AM Greg KH wrote: >> To give context, the commit is now 46eb1701c046 ("hrtimer: Update >> softirq_expires_next correctly after __hrtimer_get_next_event()") and is >> attached below. >> >> The f_ncm.c driver is

[tip: sched/core] signal: Hand SIGQUEUE_PREALLOC flag to __sigqueue_alloc()

2021-04-15 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the sched/core branch of tip: Commit-ID: 69995ebbb9d3717306a165db88a1292b63f77a37 Gitweb: https://git.kernel.org/tip/69995ebbb9d3717306a165db88a1292b63f77a37 Author:Thomas Gleixner AuthorDate:Mon, 22 Mar 2021 10:19:42 +01:00

[tip: sched/core] signal: Allow tasks to cache one sigqueue struct

2021-04-15 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the sched/core branch of tip: Commit-ID: 4bad58ebc8bc4f20d89cff95417c9b4674769709 Gitweb: https://git.kernel.org/tip/4bad58ebc8bc4f20d89cff95417c9b4674769709 Author:Thomas Gleixner AuthorDate:Tue, 23 Mar 2021 22:05:39 +01:00

  1   2   3   4   5   6   7   8   9   10   >