Re: [PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Will Deacon
Hi Jiri, On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > There is code duplicated over all architecture's headers for > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > and comparison of the result. > > Remove this duplication and leave up to the arches only

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-26 Thread Will Deacon
On Mon, Jun 26, 2017 at 02:02:31PM +0200, Jiri Slaby wrote: > On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > > On Wed, 21 Jun 2017, Jiri Slaby wrote: > >> diff --git a/arch/arm64/include/asm/futex.h > >> b/arch/arm64/include/asm/futex.h > >> index f32b42e8725d..5bb2fd4674e7 100644 > >> ---

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-18 Thread Will Deacon
On Wed, May 17, 2017 at 10:01:29AM +0200, Jiri Slaby wrote: > On 05/15/2017, 03:16 PM, Will Deacon wrote: > > Whilst I think this is a good idea, the code in question actually results > > in undefined behaviour per the C spec and is reported by UBSAN. > > Hi, yes, I know -- t

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-25 Thread Will Deacon
On Mon, May 22, 2017 at 11:11:33PM +0200, Thomas Gleixner wrote: > On Mon, 15 May 2017, Will Deacon wrote: > > On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > > > There is code duplicated over all architecture's headers for > > > futex_atomic_op_inuser. Na

Re: [PATCH v2 1/1] futex: remove duplicated code and fix UB

2017-08-24 Thread Will Deacon
t;s390/uaccess: > remove pointless access_ok() checks") as access_ok there returns true. > We introduce it back to the helper for the sake of simplicity (it gets > optimized away anyway). For arm64 and the core code: Reviewed-by: Will Deacon <will.dea...@arm.com> Although one minor thing

Re: [PATCH v2 6/9] kbuild: consolidate Devicetree dtb build rules

2018-09-06 Thread Will Deacon
y be > dtc. > > This change enables support 'dtbs_install' on some arches which were > missing the target. > > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: Vineet Gupta > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Yoshinori Sato > Cc: M

Re: Patch "asm-generic/bitops/lock.h: Rewrite using atomic_fetch_" causes kernel crash

2018-08-31 Thread Will Deacon
On Fri, Aug 31, 2018 at 12:30:50AM +, Vineet Gupta wrote: > On 08/30/2018 01:45 PM, Peter Zijlstra wrote: > >> > >> Indeed this is the mother of all issues, I tried and system is clearly > >> hosed with > >> and works after. > >> What's amazing is the commit 4aef66c8ae9 which introduced it is

Re: Patch "asm-generic/bitops/lock.h: Rewrite using atomic_fetch_" causes kernel crash

2018-08-30 Thread Will Deacon
On Wed, Aug 29, 2018 at 09:16:43PM +, Vineet Gupta wrote: > On 08/29/2018 11:33 AM, Eugeniy Paltsev wrote: > > Hi Guys, > > Since v4.19-rc1 we are getting a serious regression on platforms with ARC > > architecture. > > The kernel have become unstable and spontaneously crashes on LTP tests >

Re: Patch "asm-generic/bitops/lock.h: Rewrite using atomic_fetch_" causes kernel crash

2018-08-30 Thread Will Deacon
On Thu, Aug 30, 2018 at 11:44:11AM +0200, Peter Zijlstra wrote: > On Wed, Aug 29, 2018 at 09:16:43PM +, Vineet Gupta wrote: > > On 08/29/2018 11:33 AM, Eugeniy Paltsev wrote: > > > Hi Guys, > > > Since v4.19-rc1 we are getting a serious regression on platforms with ARC > > > architecture. > >

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Will Deacon
CPU may handle not-aligend normal data access, > still atomic instructions fail and typically raise an exception > leaving us dead in the water. > > This came-up during lengthly discussion here: > http://lists.infradead.org/pipermail/linux-snps-arc/2018-July/004022.html > > Signed-off-b

Re: [PATCH 2/4] mm: speed up mremap by 500x on large regions (v2)

2018-10-29 Thread Will Deacon
On Fri, Oct 26, 2018 at 02:11:48PM -0700, Joel Fernandes wrote: > My thinking is to take it slow and get the patch in in its current state, > since it improves x86. Then as a next step, look into why the arm64 tlb > flushes are that expensive and look into optimizing that. On arm64 I am > testing

Re: [PATCH v4 4/6] arm64: Utilize phys_initrd_start/phys_initrd_size

2018-11-15 Thread Will Deacon
etions(-) Looks ok to me: Acked-by: Will Deacon Will ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH v4 1/4] kgdb: Remove irq flags from roundup

2018-11-14 Thread Will Deacon
s(). > > Nobody used those flags. Anyone who wanted to temporarily turn on > interrupts just did local_irq_enable() and local_irq_disable() without > looking at them. So we can definitely remove the flags. > > Signed-off-by: Douglas Anderson > --- Acked-by: Will Deacon I'

Re: [PATCH v4 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-14 Thread Will Deacon
On Mon, Nov 12, 2018 at 10:26:56AM -0800, Douglas Anderson wrote: > When I had lockdep turned on and dropped into kgdb I got a nice splat > on my system. Specifically it hit: > DEBUG_LOCKS_WARN_ON(current->hardirq_context) > > Specifically it looked like this: > sysrq: SysRq : DEBUG >

Re: Patch "asm-generic/bitops/lock.h: Rewrite using atomic_fetch_" causes kernel crash

2018-08-30 Thread Will Deacon
On Thu, Aug 30, 2018 at 04:17:13PM +0200, Peter Zijlstra wrote: > On Thu, Aug 30, 2018 at 11:53:17AM +, Eugeniy Paltsev wrote: > > I can see crashes with LLSC enabled in both SMP running on 4 cores > > and SMP running on 1 core. > > So you're running on LL/SC enabled hardware; that would make

Re: Patch "asm-generic/bitops/lock.h: Rewrite using atomic_fetch_" causes kernel crash

2018-08-30 Thread Will Deacon
Hi Eugeniy, On Thu, Aug 30, 2018 at 11:53:17AM +, Eugeniy Paltsev wrote: > On Thu, 2018-08-30 at 10:51 +0100, Will Deacon wrote: > > On Thu, Aug 30, 2018 at 11:44:11AM +0200, Peter Zijlstra wrote: > > > On Wed, Aug 29, 2018 at 09:16:43PM +, Vineet Gupta wrote: > >

Re: [PATCH 3/3] bitops.h: set_mask_bits() to return old value

2019-01-14 Thread Will Deacon
tp://lkml.kernel.org/g/20150807110955.gh16...@twins.programming.kicks-ass.net > Suggested-by: Peter Zijlstra > Cc: Miklos Szeredi > Cc: Ingo Molnar > Cc: Jani Nikula > Cc: Chris Wilson > Cc: Andrew Morton > Cc: Will Deacon > Signed-off-by: Vineet Gupta > --- > inc

Re: [PATCH v5 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()

2018-11-27 Thread Will Deacon
ic void kgdb_call_nmi_hook(void *ignored) > -{ > - kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); > -} > - > -void kgdb_roundup_cpus(void) > -{ > - local_irq_enable(); > - smp_call_function(kgdb_call_nmi_hook, NULL, 0); > - local_irq_disable(); > -} > - Acked-by: Will Deacon Will ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

2019-07-02 Thread Will Deacon
On Mon, Jul 01, 2019 at 08:05:51PM +, Vineet Gupta wrote: > On 5/31/19 1:21 AM, Peter Zijlstra wrote: > > On Thu, May 30, 2019 at 11:22:42AM -0700, Vineet Gupta wrote: > >> Had an interesting lunch time discussion with our hardware architects > >> pertinent to > >> "minimal guarantees

Re: [PATCH 19/26] arm64: remove __iounmap

2019-08-19 Thread Will Deacon
ions(-) Not sure why we did it like this... Acked-by: Will Deacon Will

Re: [PATCH 19/26] arm64: remove __iounmap

2019-08-31 Thread Will Deacon
Hi Christoph, On Fri, Aug 30, 2019 at 06:05:15PM +0200, Christoph Hellwig wrote: > On Mon, Aug 19, 2019 at 08:36:02AM +0100, Will Deacon wrote: > > On Sat, Aug 17, 2019 at 09:32:46AM +0200, Christoph Hellwig wrote: > > > No need to indirect iounmap for arm64. > > > >

Re: [PATCH 2/2] mm/thp: Rename pmd_mknotpresent() as pmd_mknotvalid()

2020-04-20 Thread Will Deacon
On Fri, Mar 20, 2020 at 10:24:17AM +0530, Anshuman Khandual wrote: > pmd_present() is expected to test positive after pmdp_mknotpresent() as the > PMD entry still points to a valid huge page in memory. pmdp_mknotpresent() > implies that given PMD entry is just invalidated from MMU perspective

Re: [PATCH 2/2] mm/thp: Rename pmd_mknotpresent() as pmd_mknotvalid()

2020-04-21 Thread Will Deacon
On Tue, Apr 21, 2020 at 04:57:26AM +0530, Anshuman Khandual wrote: > > > On 04/21/2020 02:33 AM, Will Deacon wrote: > > On Fri, Mar 20, 2020 at 10:24:17AM +0530, Anshuman Khandual wrote: > >> pmd_present() is expected to test positive after pmdp_mknotpresent() as the >

Re: Flushing transparent hugepages

2020-08-18 Thread Will Deacon
On Tue, Aug 18, 2020 at 04:07:36PM +0100, Matthew Wilcox wrote: > For example, arm64 seems confused in this scenario: > > void flush_dcache_page(struct page *page) > { > if (test_bit(PG_dcache_clean, >flags)) > clear_bit(PG_dcache_clean, >flags); > } > > ... > > void

Re: [PATCH v2] arch: consolidate pm_power_off callback

2021-01-12 Thread Will Deacon
On Sun, Dec 27, 2020 at 03:01:28PM +0100, Enrico Weigelt, metux IT consult wrote: > Move the pm_power_off callback into one global place and also add an > function for conditionally calling it (when not NULL), in order to remove > code duplication in all individual archs. > > Reported-by: kernel

Re: [PATCH 00/11] ARC atomics update

2021-08-06 Thread Will Deacon
to make type safe > > >>ARC: cmpxchg/xchg: implement relaxed variants (LLSC config only) > > >>ARC: atomic_cmpxchg/atomic_xchg: implement relaxed variants > > >> > > >> Will Deacon (1): > > >>ARC: switch to generic bitops > &

Re: [RFC] bitops/non-atomic: make @nr unsigned to avoid any DIV

2021-08-06 Thread Will Deacon
ineet Gupta > --- > This is an RFC for feeback, I understand this impacts every arch, > but as of now it is only buld/run tested on ARC. > --- > --- > include/asm-generic/bitops/non-atomic.h | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) Acked-by: Will D