Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins

2015-10-15 Thread Mark Rutland
On Wed, Oct 14, 2015 at 05:12:32PM +0200, Lars-Peter Clausen wrote: > On 10/14/2015 03:15 PM, Martin Kepplinger wrote: > [...] > > + if (irq1 > 0) > > + client->irq = irq1; > > You must not overwrite client->irq, that field is manged by the I2C core and

Re: [PATCHv3 03/11] arm64: Introduce helpers for page table levels

2015-10-15 Thread Mark Rutland
On Thu, Oct 15, 2015 at 10:35:38AM +0100, Suzuki K. Poulose wrote: > On 14/10/15 18:07, Mark Rutland wrote: > >On Wed, Oct 14, 2015 at 12:20:26PM +0100, Suzuki K. Poulose wrote: > > >>+ * Number of page-table levels required to address 'va_bits' wide > >>

Re: [PATCHv3 08/11] arm64: Check for selected granule support

2015-10-15 Thread Mark Rutland
> >>+#define id_aa64mmfr0_tgran_shift ID_AA64MMFR0_TGRAN64_SHIFT > >>+#define id_aa64mmfr0_tgran_on ID_AA64MMFR0_TGRAN64_ON > >>+ > >>+#else > >>+ > >>+#define id_aa64mmfr0_tgran_shift ID_AA64MMFR0_TGRAN4_SHIFT > >>+#define id_aa64mmfr0_tgran_on ID_AA64MMFR0_TGRAN4_ON

Re: [PATCHv3 08/11] arm64: Check for selected granule support

2015-10-15 Thread Mark Rutland
On Wed, Oct 14, 2015 at 04:13:47PM -0500, Jeremy Linton wrote: > On 10/14/2015 06:20 AM, Suzuki K. Poulose wrote: > > >+ * Checks if the selected granule size is supported by the CPU. > >+ * If it doesn't park the CPU > > The problem is when you park the boot CPU. > > I think for EFI there is a

Re: [PATCHv3 08/11] arm64: Check for selected granule support

2015-10-15 Thread Mark Rutland
On Thu, Oct 15, 2015 at 12:25:33PM +0100, Suzuki K. Poulose wrote: > On Thu, Oct 15, 2015 at 11:45:15AM +0100, Mark Rutland wrote: > > On Wed, Oct 14, 2015 at 04:13:47PM -0500, Jeremy Linton wrote: > > > On 10/14/2015 06:20 AM, Suzuki K. Poulose wrote: > > > > &

Re: [PATCHv3 03/11] arm64: Introduce helpers for page table levels

2015-10-15 Thread Mark Rutland
vel. > > > > Convert the existing users to the new helpers. More users > > to follow. > > > > Cc: Ard Biesheuvel > > Cc: Mark Rutland > > Cc: Catalin Marinas > > Cc: Will Deacon > > Cc: Marc Zyngier > > Signed-off-by: Suzuki K. P

Re: [PATCHv3 10/11] arm64: Add 16K page size support

2015-10-15 Thread Mark Rutland
Hi, > +config ARM64_16K_PAGES > + bool "16KB" > + help > + The system will use 16KB pages support. AArch32 emulation > + requires applications compiled with 16K(or multiple of 16K) > + aligned segments. Nit: missing space before '(' Nit: 'a multiple of' > @@ -503,6 +517

Re: [PATCHv3 08/11] arm64: Check for selected granule support

2015-10-15 Thread Mark Rutland
On Thu, Oct 15, 2015 at 09:47:53AM -0500, Jeremy Linton wrote: > On 10/15/2015 06:25 AM, Suzuki K. Poulose wrote: > >+/* > >+ * Check to see if the CPU supports the requested pagesize > >+ */ > >+asm volatile("mrs %0, ID_AA64MMFR0_EL1" : "=r" (aa64mmfr0_el1)); > >+aa64mmfr0_el1

Re: [PATCH v5 2/2] arm: perf: Add event descriptions

2015-10-15 Thread Mark Rutland
former > uses struct initialisation and ends up zeroing anything set previously. > > We should probably tidy all this up: > > * Remove armpmu_register and call perf_pmu_register directly from > arm_pmu_device_probe instead > > * Call armpmu_init immediately prior to arm_c

Re: [PATCH v5 2/2] arm: perf: Add event descriptions

2015-10-15 Thread Mark Rutland
On Thu, Oct 15, 2015 at 04:20:37PM +0100, Pawel Moll wrote: > On Thu, 2015-10-15 at 08:15 -0700, Drew Richardson wrote: > > On Thu, Oct 15, 2015 at 02:21:12PM +0100, Will Deacon wrote: > > > On Tue, Oct 13, 2015 at 08:36:45AM -0700, Drew Richardson wrote: > > > > Add additional information about th

Re: [PATCH v5 2/2] arm: perf: Add event descriptions

2015-10-15 Thread Mark Rutland
On Thu, Oct 15, 2015 at 09:31:46AM -0700, Drew Richardson wrote: > On Thu, Oct 15, 2015 at 04:41:26PM +0100, Mark Rutland wrote: > > On Thu, Oct 15, 2015 at 04:29:15PM +0100, Will Deacon wrote: > > > On Thu, Oct 15, 2015 at 08:15:06AM -0700, Drew Richardson wrote: > > >

Re: [PATCH] arm64: change to use memmove in efi-stub

2015-10-16 Thread Mark Rutland
Hi, On Fri, Oct 16, 2015 at 06:46:07PM +0800, yalin wang wrote: > Change to use memmove(), in case the dest address overlap with the > source address. This cannot happen, and memove would not be sufficient if it did. The destination is a region returned by EFI_BOOT_SERVICES.AllocatePages, which

Re: [RFC 1/2] Dcumentation: bridge: Add documentation for ps8640 DT properties

2015-10-16 Thread Mark Rutland
On Fri, Oct 16, 2015 at 08:15:08PM +0800, CK Hu wrote: > From: Jitao Shi > > Add documentation for DT properties supported by ps8640 > DSI-eDP converter. > > Signed-off-by: Jitao Shi > --- > .../devicetree/bindings/video/bridge/ps8640.txt| 48 > > 1 file changed, 48

Re: [RFC 2/2] drm/bridge: Add I2C based driver for ps8640 bridge

2015-10-16 Thread Mark Rutland
> + /* FIXME - use of_graph_get_port_by_id(np, 1) on newer kernels */ > + in_ep = of_graph_get_next_endpoint(np, NULL); Huh? > + edidp = of_get_property(np, "edid", &size); This property wasn't mentioned in the binding document. Please describe it. If it's from a more generic bindin

Re: [PATCH v3 1/3] tty: serial core: provide a method to search uart by phandle

2015-10-16 Thread Mark Rutland
On Fri, Oct 16, 2015 at 08:08:33PM +0200, H. Nikolaus Schaller wrote: > 1. add uart_ports to a search list as soon as they are registered > 2. provide a function to search an uart_port by phandle. This copies the >mechanism how devm_usb_get_phy_by_phandle() works > 3. add a bindings document ho

Re: [PATCHv4 07/12] arm64: Simplify NR_FIX_BTMAPS calculation

2015-10-16 Thread Mark Rutland
On Fri, Oct 16, 2015 at 06:06:16PM +0100, Suzuki K. Poulose wrote: > From: Mark Rutland > > Since NR_FIX_BTMAPS based on the fixed size of 256K, lets use > a formula to derive it for a given page size, rather than defining > for each page size. No need to respin, but I'

Re: [PATCH v2 1/2] arm64: cpufeature.h: resolve hidden header dependencies

2015-09-02 Thread Mark Rutland
ext patch of this series.) > > Signed-off-by: Yury Norov It would be worth mentioning that the cpu_feature() macro was moved as it depends on the include of for ilog2(). Otherwise this looks like a sensible cleanup/fix to me: Reviewed-by: Mark Rutland Mark. > --- > arch/arm64/incl

Re: [UPDATED] [PATCHv4 00/12] arm64: 16K translation granule support

2015-10-19 Thread Mark Rutland
ds a check to ensure the CPU supports the selected > granule size. > Patch 10 Adds the page size information to image header. > Patches 11-12 Adds the support for 16K page size FWIW, for the series: Acked-by: Mark Rutland Thanks, Mark. -- To unsubscribe from this list: send t

Re: [PATCH/RESEND] ARM: Remove __ref on hotplug cpu die path

2015-10-19 Thread Mark Rutland
ss dec hex filename >126835781470996 348904 14503478 dd4e36 before >126832741470996 348904 14503174 dd4d06 after > > presumably because now we don't have to jump to code in the > .ref.text section and/or the noinline marking is r

Re: [PATCH] EDAC: Add AMD Seattle SoC EDAC

2015-10-19 Thread Mark Rutland
Hi, Please Cc the devicetree list (devicet...@vger.kernel.org) when sending binding patches. I see you've added the people from the MAINTAINERS entry; the list should also be Cc'd. On Mon, Oct 19, 2015 at 02:23:17PM -0500, Brijesh Singh wrote: > Add support for the AMD Seattle SoC EDAC driver. >

Re: [PATCH V2 1/3] Documentation for system mmu in hi6220 platform.

2015-10-20 Thread Mark Rutland
On Tue, Oct 20, 2015 at 04:45:22PM +0800, Chen Feng wrote: > docs: iommu: Documentation for smmu in hi6220 SoC. > > Signed-off-by: Chen Feng > Signed-off-by: Yu Dongbin > --- > .../bindings/iommu/hisi,hi6220-iommu.txt | 52 > ++ > 1 file changed, 52 insertions(+)

Re: [PATCH] EDAC: Add AMD Seattle SoC EDAC

2015-10-20 Thread Mark Rutland
On Tue, Oct 20, 2015 at 11:44:46AM -0500, Brijesh Singh wrote: > Hi Mark, > > Thanks for review. > > -Brijesh > > On 10/19/2015 03:52 PM, Mark Rutland wrote: > > Hi, > > > > Please Cc the devicetree list (devicet...@vger.kernel.org) when sending >

Re: [PATCH] EDAC: Add AMD Seattle SoC EDAC

2015-10-20 Thread Mark Rutland
On Tue, Oct 20, 2015 at 06:57:44PM +0200, Borislav Petkov wrote: > On Tue, Oct 20, 2015 at 11:44:46AM -0500, Brijesh Singh wrote: > > > This second property doesn't describe the hardware in any way. It should > > > be runtime-configurable and dpesn't belong in the DT. > > > > > > Regardless, the b

Re: [PATCH] EDAC: Add AMD Seattle SoC EDAC

2015-10-20 Thread Mark Rutland
On Tue, Oct 20, 2015 at 07:36:39PM +0200, Borislav Petkov wrote: > On Tue, Oct 20, 2015 at 06:26:55PM +0100, Mark Rutland wrote: > > > Btw, how much of this is implementing generic A57 functionality? > > > > The driver is entirely A57 generic. > > > > &g

Re: [PATCH] power: qcom_smbb: Add otg regulator for control of vbus

2015-10-26 Thread Mark Rutland
On Thu, Oct 22, 2015 at 02:12:17PM -0700, Tim Bird wrote: > Add a regulator to control the OTG chargepath switch. The OTG > switch gets its power from pm8941_5vs1, and that should be expressed > as an usb_otg_in-supply property in the DT node for the charger driver. > The regulator name is "otg".

Re: [PATCH v2] EDAC: Add ARM64 EDAC

2015-10-26 Thread Mark Rutland
On Wed, Oct 21, 2015 at 03:41:37PM -0500, Brijesh Singh wrote: > Add support for Cortex A57 and A53 EDAC driver. > > Signed-off-by: Brijesh Singh > CC: robh...@kernel.org > CC: pawel.m...@arm.com > CC: mark.rutl...@arm.com > CC: ijc+devicet...@hellion.org.uk > CC: ga...@codeaurora.org > CC: dougt

Re: [PATCH v2 02/32] devicetree: bindings: scsi: HiSi SAS

2015-10-26 Thread Mark Rutland
On Mon, Oct 26, 2015 at 10:14:33PM +0800, John Garry wrote: > Add devicetree bindings for HiSilicon SAS driver. > > Signed-off-by: John Garry > --- > .../devicetree/bindings/scsi/hisilicon-sas.txt | 70 > ++ > 1 file changed, 70 insertions(+) > create mode 100644 Docume

Re: [PATCH v2 05/32] scsi: hisi_sas: scan device tree

2015-10-26 Thread Mark Rutland
> + sas_addr_prop = of_find_property(np, "sas-addr", NULL); > + if (!sas_addr_prop || (sas_addr_prop->length != SAS_ADDR_SIZE)) > + goto err_out; > + memcpy(hisi_hba->sas_addr, sas_addr_prop->value, SAS_ADDR_SIZE); This was not in the binding. What is this? Thanks, Mark.

Re: [PATCH] arm: kernel: utilize hrtimer based broadcast

2015-10-27 Thread Mark Rutland
On Fri, Jul 17, 2015 at 10:11:52AM +0100, Alison Wang wrote: > Hrtimer based broadcast is used on ARM platform. It can be > registered as the tick broadcast device in the absence of > a real external clock device. > > Signed-off-by: Alison Wang This looks sensible to me. FWIW:

Re: [PATCH v3 0/4] SysFS driver for QEMU fw_cfg device

2015-10-05 Thread Mark Rutland
On Sat, Oct 03, 2015 at 07:28:05PM -0400, Gabriel L. Somlo wrote: > From: "Gabriel Somlo" > > Allow access to QEMU firmware blobs, passed into the guest VM via > the fw_cfg device, through SysFS entries. Blob meta-data (e.g. name, > size, and fw_cfg key), as well as the raw binary blob data may b

[PATCHv4 05/18] atomics/treewide: make atomic64_inc_not_zero() optional

2018-06-21 Thread Mark Rutland
d in , and promotes its arguments to the requisite types, so we need not do this explicitly. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Acked-by: Palmer Dabbelt Reviewed-by: Will Deacon Cc: Boqun Feng --- arch/alp

[PATCHv4 00/18] atomics: API cleanups

2018-06-21 Thread Mark Rutland
.1076-1-mark.rutl...@arm.com [2] https://lkml.kernel.org/r/20180529154346.3168-1-mark.rutl...@arm.com [3] https://lkml.kernel.org/r/20180618101919.51973-1-mark.rutl...@arm.com [4] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/api-cleanup Mark Rutland (18): atomics/treewi

[PATCHv4 07/18] atomics: prepare for atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Arnd Bergmann Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Vineet Gupta Cc: Russell King Cc: Benjamin

[PATCHv4 16/18] atomics/treewide: make unconditional inc/dec ops optional

2018-06-21 Thread Mark Rutland
There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Acked-by: Palmer Dabbelt Reviewed-by: Will Deacon Cc: Boqun Feng --- arch/alpha/include/asm/atomic.h | 12 - arch/arc/include/asm/atomic.h

[PATCHv4 18/18] atomics/treewide: clean up andnot ifdeffery

2018-06-21 Thread Mark Rutland
o the standards ifdefs, as macro expansions rather than static inlines. * Removes trivial andnot implementations from architectures, where these are superseded by core code. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (

[PATCHv4 14/18] atomics/treewide: make atomic64_fetch_add_unless() optional

2018-06-21 Thread Mark Rutland
ff-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Boqun Feng --- arch/arm64/include/asm/atomic.h | 12 arch/ia64/include/asm/atomic.h| 15 --- arch/mips/include/asm/atomic.h| 24

[PATCHv4 17/18] atomics/treewide: make conditional inc/dec ops optional

2018-06-21 Thread Mark Rutland
this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Boqun Feng --- arch/alpha/include/asm/atomic.h | 1 + arch/arc/include/asm/atomic.h | 1 + arch/arm/include/asm/atomic.h | 1 + arch/arm64/include/asm/ato

[PATCHv4 15/18] atomics/treewide: make test ops optional

2018-06-21 Thread Mark Rutland
d-off-by: Mark Rutland Acked-by: Geert Uytterhoeven Acked-by: Peter Zijlstra (Intel) Acked-by: Palmer Dabbelt Reviewed-by: Will Deacon Cc: Boqun Feng --- arch/alpha/include/asm/atomic.h | 12 --- arch/arc/include/asm/atomic.h | 10 --- arch/arm/include/asm/

[PATCHv4 13/18] atomics/riscv: define atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
definition. No functional change is intended as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Acked-by Palmer Dabbelt Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Palmer Dabbelt Cc: Albert Ou --- arch/riscv/include/asm/atomic.h | 8 ++-- 1 file changed, 2

[PATCHv4 11/18] atomics/arm: define atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
definition. No functional change is intended as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Russell King --- arch/arm/include/asm/atomic.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions

[PATCHv4 09/18] atomics/alpha: define atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
definition. No functional change is intended as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner --- arch/alpha/include/asm/atomic.h | 23

[PATCHv4 10/18] atomics/arc: define atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
definition. No functional change is intended as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Vineet Gupta --- arch/arc/include/asm/atomic.h | 25 - 1 file changed, 12 insertions(+), 13

[PATCHv4 12/18] atomics/powerpc: define atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
definition. No functional change is intended as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Acked-by: Michael Ellerman Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Benjamin Herrenschmidt Cc: Paul Mackerras --- arch/powerpc/include/asm/atomic.h | 9

[PATCHv4 03/18] atomics/treewide: remove atomic_inc_not_zero_hint()

2018-06-21 Thread Mark Rutland
atomic64_t or atomic_long_t, and there is only one user in the kernel tree. Given all this, let's remove atomic_inc_not_zero_hint(), and migrate the existing user over to atomic_inc_not_zero(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Ack

[PATCHv4 08/18] atomics/generic: define atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
definition. No functional change is intended as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Arnd Bergmann --- include/asm-generic/atomic64.h | 3 ++- lib/atomic64.c | 12 ++-- 2 files

[PATCHv4 06/18] atomics/treewide: make atomic_fetch_add_unless() optional

2018-06-21 Thread Mark Rutland
s a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Acked-by: Peter Zijlstra (Intel) Acked-by: Palmer Dabbelt Reviewed-by: Will Deacon Cc: Boqun Feng Cc: Vineet Gupta --- arch/alpha/include/asm/atomic.h | 2 +- arch/a

[PATCHv4 04/18] atomics: make conditional ops return bool

2018-06-21 Thread Mark Rutland
is not changed. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Cc: Michael Ellerman Cc: Boqun Feng --- include/asm-generic/atomic-instrumented.h | 2 +- include/asm-generic/atomic64.h| 3 ++- include/linux/atomic.h

[PATCHv4 01/18] atomics/treewide: s/__atomic_add_unless/atomic_fetch_add_unless/

2018-06-21 Thread Mark Rutland
do sed -i '{s/\<__arch_atomic_add_unless\>/arch_atomic_fetch_add_unless/}' "${line%%:*}"; done Note that we do not have atomic{64,_long}_fetch_add_unless(), which will be introduced by later patches. There should be no functional change as a result of this patch.

[PATCHv4 02/18] atomics/treewide: remove redundant atomic_inc_not_zero() definitions

2018-06-21 Thread Mark Rutland
When atomic_inc_not_zero(v) isn't defined, will define it as falling back to atomic_add_unless((v), 1, 0), so there's no need for arch code to do so. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Peter Zijlstra (Intel) Acked-

Re: [PATCHv4 08/18] atomics/generic: define atomic64_fetch_add_unless()

2018-06-21 Thread Mark Rutland
On Thu, Jun 21, 2018 at 01:13:11PM +0100, Mark Rutland wrote: > - if (v->counter != u) { > + val = v->counter; > + if (val != u) > v->counter += a; > - ret = true; > } Ugh, I thought I had fixed this up and removed the trail

Re: KVM guest sometimes failed to boot because of kernel stack overflow if KPTI is enabled on a hisilicon ARM64 platform.

2018-06-22 Thread Mark Rutland
On Fri, Jun 22, 2018 at 09:18:27PM +0800, Wei Xu wrote: > [0.042462] Insufficient stack space to handle exception! > [0.042464] ESR: 0x9646 -- DABT (current EL) > [0.043781] FAR: 0x093a80e0 > [0.044239] Task stack: [0x093a8000..0x093ac000]

Re: [PATCH 1/7] atomics/tty: add missing atomic_long_t * cast

2018-06-22 Thread Mark Rutland
ut). > > > > So rework the whole thing to use atomic_long_t and its accessors > > directly. > > > > While there, fixup all the horrible comment styles. > > > > Cc: Peter Hurley > > Reported-by: Mark Rutland > > Signed-off-by: Peter Zijlstra (Intel) > > Looks good, I'll queue this up after 4.18-rc1 is out, thanks. Now that v4.18-rc1 is out, I thought I'd ping so that this doesn't get forgotten. Have a good weekend! Mark.

[PATCHv2 01/11] atomic/tty: Fix up atomic abuse in ldsem

2018-06-25 Thread Mark Rutland
very thin (the only difference is not changing *old on success, which most callers don't seem to care about). So rework the whole thing to use atomic_long_t and its accessors directly. While there, fixup all the horrible comment styles. Cc: Peter Hurley Reported-by: Mark Rutland Signed-o

[PATCHv2 07/11] atomics: add common header generation files

2018-06-25 Thread Mark Rutland
infrastructure is updated to cover the new scripts. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon --- MAINTAINERS | 1 + scripts/atomic/atomic-tbl

[PATCHv2 08/11] atomics: switch to generated fallbacks

2018-06-25 Thread Mark Rutland
tatic inline functions, with return type consistently on a separate line to try to keep each line at a sensible length. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon --- include/linux/atomic-fallb

[PATCHv2 11/11] arm64: use instrumented atomics

2018-06-25 Thread Mark Rutland
er of function names and macro definitions. Due to the way we call the LL/SC atomics via the LSE atomic wrappers, this requires adding an arch_ prefix to some arm64-specific atomic primitives. Some unusual whitespace in the cmpxchg wrappers is fixed up as part of the change. Signed-off-by: Mark Ru

[PATCHv2 00/11] atomics: generate atomic headers / instrument arm64

2018-06-25 Thread Mark Rutland
..@arm.com [3] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/generated Mark Rutland (10): atomics/x86: reduce arch_cmpxchg64*() instrumentation atomics: simplify cmpxchg() instrumentation atomics/treewide: instrument xchg() atomics: instrument cmpxchg_double*()

[PATCHv2 06/11] atomics/treewide: rework ordering barriers

2018-06-25 Thread Mark Rutland
ntial reliance on these elsewhere by ensuring each is undef'd at the end of . There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Cc: Andrea Parri --- arch/alpha/include/asm/atomic.h | 8 +++ ar

[PATCHv2 04/11] atomics/treewide: instrument xchg()

2018-06-25 Thread Mark Rutland
While we instrument atomic*() and cmpxchg(), we missed xchg(). Let's add instrumentation for xchg(), fixing up x86 to implement arch_xchg(). Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc:

[PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Mark Rutland
hould be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Dmitry Vyukov Cc: Peter Zijlstra Cc: Will Deacon --- include/asm-generic/atomic-instrumented.h | 100 +- 1 file changed, 15 insertions(+), 85 deletions(-) diff --

[PATCHv2 10/11] atomics: switch to generated instrumentation

2018-06-25 Thread Mark Rutland
tures to make use of the instrumented atomics. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Cc: Arnd Bergmann Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov --- include/asm-generic/atomic-instrumented.h | 1688 +

[PATCHv2 05/11] atomics: instrument cmpxchg_double*()

2018-06-25 Thread Mark Rutland
) again. We can revisit the issue if build failures reappear. Signed-off-by: Mark Rutland Cc: Arnd Bergmann Cc: Boqun Feng Cc: Dmitry Vyukov Cc: Peter Zijlstra Cc: Will Deacon --- include/asm-generic/atomic-instrumented.h | 21 - 1 file changed, 8 insertions(+), 13 deletions

[PATCHv2 02/11] atomics/x86: reduce arch_cmpxchg64*() instrumentation

2018-06-25 Thread Mark Rutland
write() arch_cmpxchg() Let's fix this up and call the arch_ equivalents, resulting in: cmpxchg64() kasan_check_write() arch_cmpxchg64() arch_cmpxchg() Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Peter Zi

[PATCHv2 09/11] atomics: switch to generated atomic-long

2018-06-25 Thread Mark Rutland
ons into the atomic_long_* API, bringing it into line with the atomic_* and atomic64_* APIs. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Cc: Arnd Bergmann --- include/asm-generic/atomic-long.h | 1171 ++--- 1 file change

Re: [PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Mark Rutland
On Mon, Jun 25, 2018 at 01:38:03PM +0200, Andrea Parri wrote: > On Mon, Jun 25, 2018 at 11:59:44AM +0100, Mark Rutland wrote: > > Currently we define some fairly verbose wrappers for the cmpxchg() > > family so that we can pass a pointer and size into kasan_check_write(). >

Re: [PATCHv2 06/11] atomics/treewide: rework ordering barriers

2018-06-25 Thread Mark Rutland
On Mon, Jun 25, 2018 at 11:59:47AM +0100, Mark Rutland wrote: > Currently architectures can override __atomic_op_*() to define the barriers > used before/after a relaxed atomic when used to build acquire/release/fence > variants. > > This has the unfortunate property of requiring t

Re: [PATCH] arm64: Clear the stack

2018-07-19 Thread Mark Rutland
Hi, On Tue, Jul 17, 2018 at 03:58:19PM -0700, Laura Abbott wrote: > On 07/03/2018 05:14 AM, Mark Rutland wrote: > > > It might be cleaner just to use on_accessible_stack and then another > > > function to get the top of stack. This also might just be > > > reimp

Re: [PATCH 1/2] arm64: Introduce current_stack_type

2018-07-19 Thread Mark Rutland
Hi Laura, On Wed, Jul 18, 2018 at 02:10:12PM -0700, Laura Abbott wrote: > > In preparation for enabling the stackleak plugin on arm64, > we need a way to get the bounds of the current stack. > Introduce a new primitive current_stack_type which is similar > to x86's get_stack_info. Utilize that to

Re: [PATCH 2/2] arm64: Clear the stack

2018-07-19 Thread Mark Rutland
On Wed, Jul 18, 2018 at 02:10:13PM -0700, Laura Abbott wrote: > > Implementation of stackleak based heavily on the x86 version > > Signed-off-by: Laura Abbott > --- > Since last time: Minor style cleanups. Re-wrote check_alloca to > correctly handle all stack types. While doing that, I also real

Re: [PATCH] ARM64: smp: Fix cpu_up() racing with sys_reboot

2018-07-19 Thread Mark Rutland
On Thu, Jul 19, 2018 at 03:18:46PM -0700, Venkata Narendra Kumar Gutta wrote: > Nothing stops a process from hotplugging in a CPU concurrently > with a sys_reboot() call. In such a situation we could have > ipi_cpu_stop() mark a cpu as 'offline' and _cpu_up() ignore the > fact that the CPU is not r

Re: [PATCH] ARM64: smp: BUG() if smp_send_reschedule() is called for an offline cpu

2018-07-19 Thread Mark Rutland
On Thu, Jul 19, 2018 at 03:12:49PM -0700, Venkata Narendra Kumar Gutta wrote: > Based on the 'commit <8b775be35e41b9f> ("ARM: smp: > BUG() if smp_send_reschedule() is called for an offline cpu")' This commit does not appear to exist in mainline. Which tree is it in? > Sending an IPI_RESCHEDULE to

Re: [PATCHv2 1/2] arm64: Add stack information to on_accessible_stack

2018-07-19 Thread Mark Rutland
; if (sp < low || sp >= high) return false; if (info) { info->low = low; info->high = high; info->type = STACK_TYPE_SDEI_NORMAL; } return true; } Otherwise, this all looks good to me. With that: Reviewed-by: Mark Rutland Thanks for working on this! Mark.

Re: [PATCHv2 2/2] arm64: Clear the stack

2018-07-19 Thread Mark Rutland
On Thu, Jul 19, 2018 at 04:28:06PM -0700, Laura Abbott wrote: > > Implementation of stackleak based heavily on the x86 version > > Signed-off-by: Laura Abbott Reviewed-by: Mark Rutlamd Thanks for working on this! Mark. > --- > v2: Convert to adjusted on_acessible_stack APIs. Fixed alloca ch

Re: UBSAN: Undefined behaviour in lib/radix-tree.c:123:14: member access within null pointer of type 'const struct radix_tree_node'

2018-07-20 Thread Mark Rutland
In-Reply-To: <19427cc3-3372-9b02-4b92-096fbe328...@molgen.mpg.de> On Fri, Jul 20, 2018 at 09:53:21AM +0200, Paul Menzel wrote: > Dear Linux folks, Hi, > Enabling the undefined behavior sanitizer and building GNU/Linux 4.18-rc5+ > (with some unrelated commits) with GCC 8.1.0 from Debian Sid/unsta

Re: [PATCHv4 00/12] atomics: generate atomic headers / instrument arm64

2018-07-23 Thread Mark Rutland
On Mon, Jul 16, 2018 at 12:30:05PM +0100, Mark Rutland wrote: > Hi Ingo, Sorry to ping, but are you happy to pick this up? Mark. > Are you happy to pick this series? Both Will and Peter are happy with v3, and > since then I've only made a minor cleanup to the commit messages for

Re: [PATCH v9 04/12] RISC-V: Init and Halt Code

2018-07-31 Thread Mark Rutland
On Mon, Jul 30, 2018 at 04:42:49PM -0700, Palmer Dabbelt wrote: > Sorry it took me an absurd amount of time to get back around to this... I'm > adding our mailing list, as we didn't even have one a year ago. No worries; we all get swamped with things. > I've included a few patches in line here,

Re: [RFC PATCH] perf/core: don't sample kernel regs upon skid

2018-08-02 Thread Mark Rutland
On Wed, Jul 11, 2018 at 06:59:28AM +0100, Mark Rutland wrote: > On Mon, Jul 09, 2018 at 06:42:29PM -0400, Boris Ostrovsky wrote: > > On 07/02/2018 12:02 PM, Mark Rutland wrote: > > > On Mon, Jul 02, 2018 at 05:46:55PM +0200, Peter Zijlstra wrote: > > >> On Mon, Ju

Re: Making KASAN compatible with VMAP_STACK

2018-07-23 Thread Mark Rutland
On Mon, Jul 23, 2018 at 09:40:36AM +0200, Dmitry Vyukov wrote: > On Sun, Jul 22, 2018 at 7:52 PM, Andy Lutomirski wrote: > > Hi all- > > > > It would be really nice to make KASAN compatible with VMAP_STACK. > > Both are valuable memory debugging features, and the fact that you > > can't use both i

Re: Making KASAN compatible with VMAP_STACK

2018-07-23 Thread Mark Rutland
On Mon, Jul 23, 2018 at 01:55:49PM +0200, Dmitry Vyukov wrote: > On Mon, Jul 23, 2018 at 1:18 PM, Mark Rutland wrote: > > On Mon, Jul 23, 2018 at 09:40:36AM +0200, Dmitry Vyukov wrote: > >> On Sun, Jul 22, 2018 at 7:52 PM, Andy Lutomirski wrote: > >> > Hi all- &g

Re: [PATCHv4 01/12] atomic/tty: Fix up atomic abuse in ldsem

2018-07-24 Thread Mark Rutland
On Tue, Jul 24, 2018 at 11:20:36AM +0200, Peter Zijlstra wrote: > On Tue, Jul 24, 2018 at 09:15:18AM +0200, Ingo Molnar wrote: > > > > * Mark Rutland wrote: > > > > > From: Peter Zijlstra > > > > > > Mark found ldsem_cmpxchg() needed an (a

Re: [PATCHv4 01/12] atomic/tty: Fix up atomic abuse in ldsem

2018-07-24 Thread Mark Rutland
On Tue, Jul 24, 2018 at 01:13:13PM +0200, Ingo Molnar wrote: > > * Mark Rutland wrote: > > > On Tue, Jul 24, 2018 at 11:20:36AM +0200, Peter Zijlstra wrote: > > > On Tue, Jul 24, 2018 at 09:15:18AM +0200, Ingo Molnar wrote: > > > > > > > > * Mar

Re: [PATCHv4 01/12] atomic/tty: Fix up atomic abuse in ldsem

2018-07-24 Thread Mark Rutland
On Tue, Jul 24, 2018 at 03:40:48PM +0200, Ingo Molnar wrote: > > * Mark Rutland wrote: > > > > Ok, then these bits will have to wait until Greg's tree goes upstream > > > in about two weeks. > > > > Ok. > > > > > Which patches can

[PATCHv5 00/21] arm64: invoke syscalls with pt_regs

2018-07-11 Thread Mark Rutland
://lkml.kernel.org/r/20180618120310.39527-1-mark.rutl...@arm.com [6] https://lkml.kernel.org/r/20180702110415.10465-1-mark.rutl...@arm.com Mark Rutland (21): arm64: consistently use unsigned long for thread flags arm64: move SCTLR_EL{1,2} assertions to arm64: kill config_sctlr_el1() arm6

[PATCHv5 01/21] arm64: consistently use unsigned long for thread flags

2018-07-11 Thread Mark Rutland
, let's make do_notify_resume take the flags as a 64-bit unsigned long. Signed-off-by: Mark Rutland Reviewed-by: Dave Martin Acked-by: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/signal.c b

[PATCHv5 04/21] arm64: kill change_cpacr()

2018-07-11 Thread Mark Rutland
before setting it; this is removed for clarity. Signed-off-by: Mark Rutland Reviewed-by: Dave Martin Acked-by: Catalin Marinas Cc: James Morse Cc: Will Deacon --- arch/arm64/kernel/fpsimd.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/arm64/kernel

[PATCHv5 07/21] arm64: introduce syscall_fn_t

2018-07-11 Thread Mark Rutland
In preparation for invoking arbitrary syscalls from C code, let's define a type for an arbitrary syscall, matching the parameter passing rules of the AAPCS. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will D

[PATCHv5 05/21] arm64: move sve_user_{enable,disable} to

2018-07-11 Thread Mark Rutland
initions contain a BUILD_BUG(), as we do for other stubs for which calls should always be optimized away when the relevant config option is not selected. At the same time, the include list of is sorted while adding . Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Reviewed-by: Dave Marti

[PATCHv5 06/21] arm64: remove sigreturn wrappers

2018-07-11 Thread Mark Rutland
path. This patch takes the same approach for arm64. Signed-off-by: Mark Rutland Tentatively-reviewed-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/unistd32.h | 4 ++-- arch/arm64/kernel/entry.S | 8 arch/arm64/kernel/entry32.S

[PATCHv5 15/21] kernel: add ksys_personality()

2018-07-11 Thread Mark Rutland
is implemented directly in , as we do for ksys_close() and friends. This helper is necessary to enable conversion of arm64's syscall handling to use pt_regs wrappers. Signed-off-by: Mark Rutland Reviewed-by: Dominik Brodowski Cc: Al Viro Cc: Christoph Hellwig Cc: Dave Martin --- include/

[PATCHv5 09/21] arm64: convert syscall trace logic to C

2018-07-11 Thread Mark Rutland
Currently syscall tracing is a tricky assembly state machine, which can be rather difficult to follow, and even harder to modify. Before we start fiddling with it for pt_regs syscalls, let's convert it to C. This is not intended to have any functional change. Signed-off-by: Mark Ru

[PATCHv5 16/21] kernel: add kcompat_sys_{f,}statfs64()

2018-07-11 Thread Mark Rutland
_sys_* counterparts, with the same calling convention. This is necessary to enable conversion of arm64's syscall handling to use pt_regs wrappers. Signed-off-by: Mark Rutland Reviewed-by: Dominik Brodowski Cc: Al Viro Cc: linux-fsde...@vger.kernel.org --- fs/statfs.c

[PATCHv5 14/21] arm64: drop alignment from syscall tables

2018-07-11 Thread Mark Rutland
right thing, and drop the alignemnt. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/sys.c | 6 +- arch/arm64/kernel/sys32.c | 6 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c

[PATCHv5 03/21] arm64: kill config_sctlr_el1()

2018-07-11 Thread Mark Rutland
Now that we have sysreg_clear_set(), we can consistently use this instead of config_sctlr_el1(). Signed-off-by: Mark Rutland Reviewed-by: Dave Martin Acked-by: Catalin Marinas Cc: James Morse Cc: Will Deacon --- arch/arm64/include/asm/sysreg.h | 10 -- arch/arm64/kernel

[PATCHv5 17/21] arm64: remove in-kernel call to sys_personality()

2018-07-11 Thread Mark Rutland
With pt_regs syscall wrappers, the calling convention for sys_personality() will change. Use ksys_personality(), which is functionally equivalent. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/sys.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCHv5 10/21] arm64: convert native/compat syscall entry to C

2018-07-11 Thread Mark Rutland
ck to CPACR_EL1 when SVE is actually enabled. Signed-off-by: Mark Rutland Reviewed-by: Catalin Marinas Reviewed-by: Dave Martin Cc: Will Deacon --- arch/arm64/include/asm/syscall.h | 4 arch/arm64/kernel/entry.S| 42 arch/arm64/kernel/sysc

[PATCHv5 12/21] arm64: don't reload GPRs after apply_ssbd

2018-07-11 Thread Mark Rutland
with this. GAS provides \@, which provides a unique value per macro invocation, which we can use to create a unique label. Signed-off-by: Mark Rutland Acked-by: Marc Zyngier Acked-by: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/entry.S | 20 +++- 1 file chang

[PATCHv5 08/21] arm64: convert raw syscall invocation to C

2018-07-11 Thread Mark Rutland
__sys_trace_return label. This only converts the invocation of the syscall. The rest of the syscall triage and tracing is left in assembly for now, and will be converted in subsequent patches. Signed-off-by: Mark Rutland Reviewed-by: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/Makefile

[PATCHv5 13/21] arm64: zero GPRs upon entry from EL0

2018-07-11 Thread Mark Rutland
We can zero GPRs x0 - x29 upon entry from EL0 to make it harder for userspace to control values consumed by speculative gadgets. We don't blat x30, since this is stashed much later, and we'll blat it before invoking C code. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Cc: W

[PATCHv5 02/21] arm64: move SCTLR_EL{1,2} assertions to

2018-07-11 Thread Mark Rutland
bits. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Cc: Dave Martin Cc: James Morse Cc: Will Deacon --- arch/arm64/include/asm/sysreg.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sys

[PATCHv5 19/21] arm64: use SYSCALL_DEFINE6() for mmap

2018-07-11 Thread Mark Rutland
We don't currently annotate our mmap implementation as a syscall, as we need to do to use pt_regs syscall wrappers. Let's mark it as a real syscall. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Dominik Brodowski Acked-b

<    1   2   3   4   5   6   7   8   9   10   >