Re: ARC: Use __force to suppress per-CPU cmpxchg complaints

2024-10-16 Thread Paul E. McKenney
On Tue, Oct 15, 2024 at 10:33:14PM -0700, Vineet Gupta wrote: > On 10/9/24 10:55, Paul E. McKenney wrote: > > Currently, the cast of the first argument to cmpxchg_emu_u8() drops the > > __percpu address-space designator, which results in sparse complaints > > when applying

ARC: Use __force to suppress per-CPU cmpxchg complaints

2024-10-09 Thread Paul E. McKenney
() semantics, which are plently well-defined on variables in general, whether per-CPU or otherwise. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202409251336.toc0tvwb-...@intel.com/ Signed-off-by: Paul E. McKenney Cc: Vineet Gupta Cc: diff --git a/arch/arc/include

Re: arch/arc/kernel/smp.c:267:18: sparse: sparse: cast removes address space '__percpu' of expression

2024-10-04 Thread Paul E. McKenney
On Mon, Sep 30, 2024 at 09:10:27AM -0700, Paul E. McKenney wrote: > On Wed, Sep 25, 2024 at 01:40:45PM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > master > > head: 684a64bf32b6e488004e0ad7f0d7e9

Re: arch/arc/kernel/smp.c:267:18: sparse: sparse: cast removes address space '__percpu' of expression

2024-09-30 Thread Paul E. McKenney
On Wed, Sep 25, 2024 at 01:40:45PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 684a64bf32b6e488004e0ad7f0d7e922798f65b6 > commit: f2519d4d4fc4d36f2b58c5614357de9f5b4032fc ARC: Emulate one-byte cmpxchg > date: 12

[PATCH v2 cmpxchg 2/3] ARC: Emulate one-byte cmpxchg

2024-08-21 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on arc. [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] [ paulmck: Apply feedback from Naresh Kamboju. ] [ paulmck: Apply kernel test robot feedback. ] [ paulmck: Apply feedback from Vineet Gupta. ] Signed-off-by: Paul E

[PATCH v2 cmpxchg 0/3] Provide emulation for one-byte cmpxchg() for v6.12

2024-08-21 Thread Paul E. McKenney
Hello! This series provides an emulation function for one-byte cmpxchg(), and uses it for the remaining architectures not supporting these in hardware and not providing emulation. The emulation is in terms of the fully ordered four-byte cmpxchg() that is supplied by all of these architectures. T

Re: [PATCH cmpxchg 2/3] ARC: Emulate one-byte cmpxchg

2024-08-06 Thread Paul E. McKenney
On Mon, Aug 05, 2024 at 09:44:39PM -0700, Vineet Gupta wrote: > > > On 8/5/24 21:28, Paul E. McKenney wrote: > > On Mon, Aug 05, 2024 at 06:27:57PM -0700, Vineet Gupta wrote: > >> Hi Paul, > >> > >> On 8/5/24 12:21, Paul E. McKenney wrote: > >>

Re: [PATCH cmpxchg 2/3] ARC: Emulate one-byte cmpxchg

2024-08-05 Thread Paul E. McKenney
On Mon, Aug 05, 2024 at 06:27:57PM -0700, Vineet Gupta wrote: > Hi Paul, > > On 8/5/24 12:21, Paul E. McKenney wrote: > > Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on arc. > > > > [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] > &g

Re: [PATCH cmpxchg 3/3] sh: Emulate one-byte cmpxchg

2024-08-05 Thread Paul E. McKenney
On Mon, Aug 05, 2024 at 10:13:38PM +0200, John Paul Adrian Glaubitz wrote: > On Mon, 2024-08-05 at 12:21 -0700, Paul E. McKenney wrote: > > Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on sh. > > > > [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ]

[PATCH cmpxchg 2/3] ARC: Emulate one-byte cmpxchg

2024-08-05 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on arc. [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] [ paulmck: Apply feedback from Naresh Kamboju. ] [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney Cc: Vineet Gupta Cc: Andi Shyti Cc

[PATCH cmpxchg 1/3] xtensa: Emulate one-byte cmpxchg

2024-08-05 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on xtensa. [ paulmck: Apply kernel test robot feedback. ] [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] [ Apply Geert Uytterhoeven feedback. ] Signed-off-by: Paul E. McKenney Tested-by: Yujie Liu Cc: Andi Shyti Cc

[PATCH cmpxchg 3/3] sh: Emulate one-byte cmpxchg

2024-08-05 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on sh. [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] [ paulmck: Apply feedback from Naresh Kamboju. ] [ Apply Geert Uytterhoeven feedback. ] Signed-off-by: Paul E. McKenney Cc: Andi Shyti Cc: Palmer Dabbelt Cc: Masami

[PATCH cmpxchg 0/3] Provide emulation for one-byte cmpxchg()

2024-08-05 Thread Paul E. McKenney
Hello! This series provides an emulation function for one-byte cmpxchg(), and uses it for the remaining architectures not supporting these in hardware and not providing emulation. The emulation is in terms of the fully ordered four-byte cmpxchg() that is supplied by all of these architectures. T

[PATCH v3 cmpxchg 1/4] ARC: Emulate one-byte cmpxchg

2024-06-04 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on arc. [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] [ paulmck: Apply feedback from Naresh Kamboju. ] [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney Cc: Vineet Gupta Cc: Andi Shyti Cc

[PATCH v2 cmpxchg 10/13] ARC: Emulate one-byte cmpxchg

2024-05-01 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on arc. [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] [ paulmck: Apply feedback from Naresh Kamboju. ] [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney Cc: Vineet Gupta Cc: Andi Shyti Cc

Re: [linux-next:master 4535/6266] arch/arc/include/asm/cmpxchg.h:73:27: error: implicit declaration of function 'cmpxchg_emu_u8'

2024-04-30 Thread Paul E. McKenney
On Tue, Apr 16, 2024 at 05:07:03AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > master > head: 6bd343537461b57f3efe5dfc5fc193a232dfef1e > commit: d4f26ed66a53be57567bf71d60e80a116cec34e1 [4535/6266] ARC: Emulate > one-byte cmpxc

Re: sh: arc: cmpxchg.h:50:12: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]

2024-04-16 Thread Paul E. McKenney
On Mon, Apr 15, 2024 at 04:17:01PM +0530, Naresh Kamboju wrote: > The arc and sh defconfig builds failed due to following build warnings / > errors > on the Linux next-20240415 with gcc-9 and gcc-11. > > Reported-by: Linux Kernel Functional Testing > > Following builds failed. > sh: > arc: > -

[PATCH cmpxchg 10/14] ARC: Emulate one-byte cmpxchg

2024-04-08 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on arc. [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] Signed-off-by: Paul E. McKenney Cc: Vineet Gupta Cc: Andi Shyti Cc: Andrzej Hajda Cc: Arnd Bergmann Cc: Palmer Dabbelt Cc: Arnd Bergmann Cc: --- arch/arc

Re: [PATCH RFC cmpxchg 3/8] ARC: Emulate one-byte and two-byte cmpxchg

2024-04-04 Thread Paul E. McKenney
On Thu, Apr 04, 2024 at 01:57:32PM +0200, Arnd Bergmann wrote: > On Tue, Apr 2, 2024, at 19:06, Paul E. McKenney wrote: > > On Tue, Apr 02, 2024 at 10:14:08AM +0200, Arnd Bergmann wrote: > >> On Mon, Apr 1, 2024, at 23:39, Paul E. McKenney wrote: > >> > Us

Re: [PATCH RFC cmpxchg 3/8] ARC: Emulate one-byte and two-byte cmpxchg

2024-04-02 Thread Paul E. McKenney
On Tue, Apr 02, 2024 at 10:06:14AM -0700, Paul E. McKenney wrote: > On Tue, Apr 02, 2024 at 10:14:08AM +0200, Arnd Bergmann wrote: > > On Mon, Apr 1, 2024, at 23:39, Paul E. McKenney wrote: > > > Use the new cmpxchg_emu_u8() and cmpxchg_emu_u16() to emulate one-byte > > >

Re: [PATCH RFC cmpxchg 3/8] ARC: Emulate one-byte and two-byte cmpxchg

2024-04-02 Thread Paul E. McKenney
On Tue, Apr 02, 2024 at 10:14:08AM +0200, Arnd Bergmann wrote: > On Mon, Apr 1, 2024, at 23:39, Paul E. McKenney wrote: > > Use the new cmpxchg_emu_u8() and cmpxchg_emu_u16() to emulate one-byte > > and two-byte cmpxchg() on arc. > > > > Signed-off-by: Paul E. McK

[PATCH RFC cmpxchg 3/8] ARC: Emulate one-byte and two-byte cmpxchg

2024-04-01 Thread Paul E. McKenney
Use the new cmpxchg_emu_u8() and cmpxchg_emu_u16() to emulate one-byte and two-byte cmpxchg() on arc. Signed-off-by: Paul E. McKenney Cc: Vineet Gupta Cc: Andi Shyti Cc: Andrzej Hajda Cc: Arnd Bergmann Cc: Palmer Dabbelt Cc: --- arch/arc/Kconfig | 1 + arch/arc/include/asm

Re: {standard input}:1727: Error: operand out of range (-132 is not between -128 and 127)

2023-08-15 Thread Paul E. McKenney
On Tue, Aug 15, 2023 at 07:34:04AM +, Liu, Yujie wrote: > Hi Paul, > > On Fri, 2023-08-11 at 08:41 -0700, Paul E. McKenney wrote: > > On Fri, Aug 11, 2023 at 01:02:12PM +0800, kernel test robot wrote: > > > tree:   > > > https://git.kernel.org/pub/scm/li

Re: [PATCH v3 00/51] cpuidle,rcu: Clean up the mess

2023-01-13 Thread Paul E. McKenney
I know Mark has been prodding that with something sharp. > > The last version was tested by a number of people and I'm hoping to not have > broken anything in the meantime ;-) > > > Changes since v2: 150 rcutorture hours on each of the default scenarios passed. This i

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-07-30 Thread Paul E. McKenney
On Sat, Jul 30, 2022 at 02:40:32AM -0700, Michel Lespinasse wrote: > On Fri, Jul 29, 2022 at 08:26:22AM -0700, Paul E. McKenney wrote:> Would you > be willing to try another shot in the dark, but untested > > this time? I freely admit that this is

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-07-29 Thread Paul E. McKenney
Or better yet, try the patch that Rafael proposed. ;-) Thanx, Paul On Fri, Jul 29, 2022 at 08:26:22AM -0700, Paul E. McKenney wrote: > On Fri, Jul 29, 2022 at 03:24:58AM -0700, Michel Lespinasse wrote: > > On Thu, Jul 28, 2022

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-07-29 Thread Paul E. McKenney
On Fri, Jul 29, 2022 at 03:24:58AM -0700, Michel Lespinasse wrote: > On Thu, Jul 28, 2022 at 10:20:53AM -0700, Paul E. McKenney wrote: > > On Mon, Jul 25, 2022 at 12:43:06PM -0700, Michel Lespinasse wrote: > > > On Wed, Jun 08, 2022 at 04:27:27PM +0200, Peter Zijlstra wro

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-07-28 Thread Paul E. McKenney
cessary to build the kernel with CONFIG_RCU_EQS_DEBUG=y to enable equivalent debugging. Could you please try your test with the -rce commit shown below applied? Thanx, Paul -------

Re: [PATCH 16/36] rcu: Fix rcu_idle_exit()

2022-06-14 Thread Paul E. McKenney
ove these calls. > > Signed-off-by: Peter Zijlstra (Intel) > Acked-by: Paul E. McKenney We have some fun conflicts between this series and Frederic's context-tracking series. But it looks like these can be resolved by: 1. A patch on top of Frederic's series that provides the

Re: single copy atomicity for double load/stores on 32-bit systems

2019-06-06 Thread Paul E. McKenney
On Thu, Jun 06, 2019 at 04:34:52PM +, David Laight wrote: > From: Paul E. McKenney > > Sent: 06 June 2019 10:44 > ... > > But m68k is !SMP-only, correct? If so, the only issues would be > > interactions with interrupt handlers and the like, and doesn't curren

Re: single copy atomicity for double load/stores on 32-bit systems

2019-06-06 Thread Paul E. McKenney
On Tue, Jun 04, 2019 at 09:41:04AM +0200, Geert Uytterhoeven wrote: > Hi Paul, > > On Mon, Jun 3, 2019 at 10:14 PM Paul E. McKenney > wrote: > > On Mon, Jun 03, 2019 at 06:08:35PM +, Vineet Gupta wrote: > > > On 5/31/19 1:21 AM, Peter Zijlstra wrote: > > &

Re: single copy atomicity for double load/stores on 32-bit systems

2019-06-03 Thread Paul E. McKenney
On Mon, Jun 03, 2019 at 06:08:35PM +, Vineet Gupta wrote: > On 5/31/19 1:21 AM, Peter Zijlstra wrote: > >> I'm not sure how to interpret "natural alignment" for the case of double > >> load/stores on 32-bit systems where the hardware and ABI allow for 4 byte > >> alignment (ARCv2 LDD/STD, ARM L

Re: single copy atomicity for double load/stores on 32-bit systems

2019-05-31 Thread Paul E. McKenney
On Fri, May 31, 2019 at 09:41:17AM +, David Laight wrote: > From: Vineet Gupta > > Sent: 30 May 2019 19:23 > ... > > While it seems reasonable form hardware pov to not implement such atomicity > > by > > default it seems there's an additional burden on application writers. They > > could > >

Re: single copy atomicity for double load/stores on 32-bit systems

2019-05-30 Thread Paul E. McKenney
On Thu, May 30, 2019 at 11:22:42AM -0700, Vineet Gupta wrote: > Hi Peter, > > Had an interesting lunch time discussion with our hardware architects > pertinent to > "minimal guarantees expected of a CPU" section of memory-barriers.txt > > > | (*) These guarantees apply only to properly aligned

[PATCH RFC 10/26] arc: Remove spin_unlock_wait() arch-specific definitions

2017-06-29 Thread Paul E. McKenney
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore removes the underlying arch-specific arch_spin_unlock_wait(). Signed-off-by: Paul E. McKenney Cc: Vineet Gupta Cc