Re: [PATCH 2/2] ARM: Wrap '--pic-veneer' with ld-option

2018-12-05 Thread Stefan Agner
On 05.12.2018 19:41, Nick Desaulniers wrote: > On Wed, Dec 5, 2018 at 10:40 AM Ard Biesheuvel > wrote: >> >> On Wed, 5 Dec 2018 at 19:36, Nathan Chancellor >> wrote: >> > >> > On Wed, Dec 05, 2018 at 09:09:56AM +0100, Ard Biesheuvel wrote: >> > > (+ Arnd) >> > > >> > > On Wed, 5 Dec 2018 at

[PATCH v4 3/3] PCI: imx6: limit DBI register length

2018-12-04 Thread Stefan Agner
(0x1406) at 0xb6ea7000 ... [ 100.056423] PC is at dw_pcie_read+0x50/0x84 [ 100.060790] LR is at dw_pcie_rd_own_conf+0x44/0x48 ... Signed-off-by: Stefan Agner Reviewed-by: Lucas Stach --- Changes in v3: - Rebase on pci/dwc Changes in v4: - Rebase on pci/dwc drivers/pci/controller/dwc

[PATCH v4 1/3] PCI: dwc: allow to limit registers set length

2018-12-04 Thread Stefan Agner
Add length to the struct dw_pcie and check that the accessors dw_pcie_(rd|wr)_conf() do not read/write beyond that point. Suggested-by: Trent Piepho Signed-off-by: Stefan Agner --- Changes in v4: - Move length check to dw_pcie_rd_conf .../pci/controller/dwc/pcie-designware-host.c| 16

[PATCH v4 2/3] PCI: imx6: introduce drvdata

2018-12-04 Thread Stefan Agner
Introduce driver data struct. This will simplify handling of device specific differences. Signed-off-by: Stefan Agner Reviewed-by: Lucas Stach --- Changes in v2: - Split drvdata introduction in a separate patch - Use an array instead of individual struct imx6_pcie_drvdata declarations Changes

[PATCH v2 2/2] pci: imx6: support kernels built in Thumb-2 mode

2018-12-04 Thread Stefan Agner
ted. Link: https://lore.kernel.org/linux-pci/20181126161645.8177-1-ste...@agner.ch/ Signed-off-by: Stefan Agner --- Changes since v1: - Added Thumb-2 32-bit instruction support (tested by inserting .w instructions in arch/arm/include/asm/io.h) - Avoid dereferencing if fault happened in user mode

[PATCH v2 1/2] pci: imx6: avoid dereferencing program counter from user mode

2018-12-04 Thread Stefan Agner
The custom fault handler is currently only meant to handle kernel mode bus faults. Exit in case the abort happened in user mode. Signed-off-by: Stefan Agner --- drivers/pci/controller/dwc/pci-imx6.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pci

Re: [PATCH] pci: imx6: support kernels built in Thumb-2 mode

2018-11-29 Thread Stefan Agner
On 28.11.2018 20:35, Robin Murphy wrote: > On 28/11/2018 17:53, Stefan Agner wrote: >> On 28.11.2018 17:16, Robin Murphy wrote: >>> Hi Stefan, >>> >>> On 28/11/2018 13:25, Stefan Agner wrote: >>>> Add a fault handler which handles reads in Th

Re: [PATCH] pci: imx6: support kernels built in Thumb-2 mode

2018-11-29 Thread Stefan Agner
On 28.11.2018 19:01, Russell King - ARM Linux wrote: > On Wed, Nov 28, 2018 at 02:25:54PM +0100, Stefan Agner wrote: >> Add a fault handler which handles reads in Thumb-2 mode. Install >> the appropriate handler depending on which mode the kernel has >> been built. This avoid

Re: [PATCH v3 2/2] PCI: imx6: limit DBI register length

2018-11-28 Thread Stefan Agner
On 28.11.2018 18:50, Lucas Stach wrote: > Am Mittwoch, den 28.11.2018, 18:36 +0100 schrieb Stefan Agner: >> On 28.11.2018 13:19, Stefan Agner wrote: >> > On 21.11.2018 14:47, Leonard Crestez wrote: >> > > On 11/20/2018 11:28 PM, Trent Piepho wrote: >> >

Re: [PATCH] pci: imx6: support kernels built in Thumb-2 mode

2018-11-28 Thread Stefan Agner
On 28.11.2018 17:16, Robin Murphy wrote: > Hi Stefan, > > On 28/11/2018 13:25, Stefan Agner wrote: >> Add a fault handler which handles reads in Thumb-2 mode. Install >> the appropriate handler depending on which mode the kernel has >> been built. This avoids an "

Re: [PATCH v3 2/2] PCI: imx6: limit DBI register length

2018-11-28 Thread Stefan Agner
On 28.11.2018 13:19, Stefan Agner wrote: > On 21.11.2018 14:47, Leonard Crestez wrote: >> On 11/20/2018 11:28 PM, Trent Piepho wrote: >>> On Tue, 2018-11-20 at 21:42 +0100, Stefan Agner wrote: >>>> On 20.11.2018 20:13, Trent Piepho wrote: >> >>>

[PATCH] pci: imx6: support kernels built in Thumb-2 mode

2018-11-28 Thread Stefan Agner
ink: https://lore.kernel.org/linux-pci/20181126161645.8177-1-ste...@agner.ch/ Signed-off-by: Stefan Agner --- FWIW, I found this manual helpful to write the code below: http://hermes.wings.cs.wisc.edu/files/Thumb-2SupplementReferenceManual.pdf#page=43=100,0,66 -- Stefan drivers/pci/controller/dwc/

Re: [PATCH v2 3/3] PCI: imx6: limit DBI register length

2018-11-28 Thread Stefan Agner
On 28.11.2018 02:28, Andrey Smirnov wrote: > On Tue, Nov 27, 2018 at 5:12 PM Fabio Estevam wrote: >> >> Hi Andrey, >> >> On Tue, Nov 27, 2018 at 10:57 PM Andrey Smirnov >> wrote: >> >> > Could this be a regression? Prior to 415b6185c541 ("PCI: imx6: Fix >> > config read timeout handling") all of

Re: [PATCH v3 2/2] PCI: imx6: limit DBI register length

2018-11-28 Thread Stefan Agner
On 21.11.2018 14:47, Leonard Crestez wrote: > On 11/20/2018 11:28 PM, Trent Piepho wrote: >> On Tue, 2018-11-20 at 21:42 +0100, Stefan Agner wrote: >>> On 20.11.2018 20:13, Trent Piepho wrote: > >>>> It also seems to me that this doesn't need to be in the internal

Re: [PATCH v3 2/2] PCI: imx6: limit DBI register length

2018-11-20 Thread Stefan Agner
On 20.11.2018 20:13, Trent Piepho wrote: > On Tue, 2018-11-20 at 18:19 +, Leonard Crestez wrote: >> On Tue, 2018-11-20 at 17:56 +0100, Stefan Agner wrote: >> > Define the length of the DBI registers. This makes sure that >> > the kernel does not access registers

[PATCH v3 2/2] PCI: imx6: limit DBI register length

2018-11-20 Thread Stefan Agner
(0x1406) at 0xb6ea7000 ... [ 100.056423] PC is at dw_pcie_read+0x50/0x84 [ 100.060790] LR is at dw_pcie_rd_own_conf+0x44/0x48 ... Signed-off-by: Stefan Agner Reviewed-by: Lucas Stach --- Changes in v3: - Rebase on pci/dwc drivers/pci/controller/dwc/pci-imx6.c | 5 - 1 file

[PATCH v3 1/2] PCI: imx6: introduce drvdata

2018-11-20 Thread Stefan Agner
Introduce driver data struct. This will simplify handling of device specific differences. Signed-off-by: Stefan Agner Reviewed-by: Lucas Stach --- Changes in v2: - Split drvdata introduction in a separate patch - Use an array instead of individual struct imx6_pcie_drvdata declarations Changes

[PATCH v2 1/3] PCI: dwc: allow to limit registers set length

2018-11-20 Thread Stefan Agner
Add length to the struct dw_pcie and check that the accessors dw_pcie_(rd|wr)_own_conf() do not read/write beyond that point. Signed-off-by: Stefan Agner --- drivers/pci/controller/dwc/pcie-designware-host.c | 4 drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 5

[PATCH v2 3/3] PCI: imx6: limit DBI register length

2018-11-20 Thread Stefan Agner
(0x1406) at 0xb6ea7000 ... [ 100.056423] PC is at dw_pcie_read+0x50/0x84 [ 100.060790] LR is at dw_pcie_rd_own_conf+0x44/0x48 ... Signed-off-by: Stefan Agner --- drivers/pci/controller/dwc/pci-imx6.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci

[PATCH v2 2/3] PCI: imx6: introduce drvdata

2018-11-20 Thread Stefan Agner
Introduce driver data struct. This will simplify handling of device specific differences. Signed-off-by: Stefan Agner --- Changes in v2: - Split drvdata introduction in a separate patch - Use an array instead of individual struct imx6_pcie_drvdata declarations drivers/pci/controller/dwc/pci

Re: [PATCH 2/2] PCI: imx6: limit DBI register length

2018-11-20 Thread Stefan Agner
On 20.11.2018 14:03, Leonard Crestez wrote: > From: Stefan Agner >> On 20.11.2018 11:22, Leonard Crestez wrote: >> > On Mon, 2018-11-19 at 10:41 +0100, Stefan Agner wrote: >> >> Define the length of the DBI registers. This makes sure that >> >> t

Re: [PATCH 2/2] PCI: imx6: limit DBI register length

2018-11-20 Thread Stefan Agner
On 20.11.2018 11:22, Leonard Crestez wrote: > On Mon, 2018-11-19 at 10:41 +0100, Stefan Agner wrote: >> Define the length of the DBI registers. This makes sure that >> the kernel does not access registers beyond that point, avoiding >> the following abort on a i.MX 6Quad: &g

Re: [PATCH v2 2/4] iio: adc: add STMPE ADC driver using IIO framework

2018-11-19 Thread Stefan Agner
On 19.11.2018 11:25, Philippe Schenker wrote: > From: Stefan Agner > > This adds an ADC driver for the STMPE device using the industrial > input/output interface. The driver supports raw reading of values. > The driver depends on the MFD STMPE driver. If the touchscreen > bl

Re: [PATCH v2 1/4] mfd: stmpe: Move ADC related defines to header of mfd

2018-11-19 Thread Stefan Agner
On 19.11.2018 11:25, Philippe Schenker wrote: > Move defines that are ADC related to the header of the overlying mfd, > so they can be used from multiple sub-devices. Looks good to me: Reviewed-by: Stefan Agner > > Signed-off-by: Philippe Schenker > --- > > Changes in v

Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"

2018-11-19 Thread Stefan Agner
s/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++-- > drivers/gpu/drm/etnaviv/etnaviv_drv.c| 4 ++-- > drivers/gpu/drm/mxsfb/mxsfb_drv.c| 4 ++-- For mxsfb: Acked-by: Stefan Agner -- Stefan > drivers/gpu/drm/rcar-du/rcar_du_drv.c| 2 +- > drivers/gpu/drm

[PATCH] PCI: dwc: layerscape: constify driver data

2018-11-19 Thread Stefan Agner
Constify driver data since they don't get changed at runtime. Signed-off-by: Stefan Agner --- drivers/pci/controller/dwc/pci-layerscape.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci

[PATCH 2/2] PCI: imx6: limit DBI register length

2018-11-19 Thread Stefan Agner
(0x1406) at 0xb6ea7000 ... [ 100.056423] PC is at dw_pcie_read+0x50/0x84 [ 100.060790] LR is at dw_pcie_rd_own_conf+0x44/0x48 ... Signed-off-by: Stefan Agner --- drivers/pci/controller/dwc/pci-imx6.c | 51 +++ 1 file changed, 37 insertions(+), 14 deletions

[PATCH 1/2] PCI: dwc: allow to limit registers set length

2018-11-19 Thread Stefan Agner
Add length to the struct dw_pcie and check that the accessors dw_pcie_(rd|wr)_own_conf() do not read/write beyond that point. Signed-off-by: Stefan Agner --- drivers/pci/controller/dwc/pcie-designware-host.c | 4 drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 5

Re: [PATCH] PCI: dwc: Limit config space size for i.MX6

2018-11-15 Thread Stefan Agner
On 14.11.2018 20:44, Trent Piepho wrote: > On Wed, 2018-11-14 at 16:49 +0100, Stefan Agner wrote: >> On 19.10.2018 13:13, Stefan Agner wrote: >> > Reading the full 4k config space through sysfs leads to an >> > external abort. Testing on a platform showed that the upp

[PATCH 1/3] serial: imx: fix error handling in console_setup

2018-11-14 Thread Stefan Agner
The ipg clock only needs to be unprepared in case preparing per clock fails. The ipg clock has already disabled at the point. Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check") Signed-off-by: Stefan Agner --- drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 inser

[PATCH 3/3] serial: imx: avoid crash when un/re-binding serial console device

2018-11-14 Thread Stefan Agner
If the device used as a serial console gets un/re-binded, then register_console() will call imx_uart_setup_console() again. Drop __init so that imx_uart_setup_console() can be safely called at runtime. Signed-off-by: Stefan Agner --- This addresses a kernel panic seen when unbinding/rebinding

[PATCH 2/3] serial: imx: unprepare console clocks on remove

2018-11-14 Thread Stefan Agner
-by: Stefan Agner --- drivers/tty/serial/imx.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 313c3b1900a8..757c91e5105a 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2085,7

Re: [PATCH] PCI: dwc: Limit config space size for i.MX6

2018-11-14 Thread Stefan Agner
On 14.11.2018 17:20, Lucas Stach wrote: > Am Mittwoch, den 14.11.2018, 16:49 +0100 schrieb Stefan Agner: >> On 19.10.2018 13:13, Stefan Agner wrote: >> > Reading the full 4k config space through sysfs leads to an >> > external abort. Testing on a platform showed that

Re: [PATCH] PCI: dwc: Limit config space size for i.MX6

2018-11-14 Thread Stefan Agner
On 19.10.2018 13:13, Stefan Agner wrote: > Reading the full 4k config space through sysfs leads to an > external abort. Testing on a platform showed that the upper > limit is 512. Limit config space to 512. Any comment on this patch? Since other devices use similar quirks, I guess the

Re: [PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list

2018-11-07 Thread Stefan Agner
On 06.11.2018 05:49, Nicolas Pitre wrote: > On Tue, 6 Nov 2018, Stefan Agner wrote: > >> On 16.10.2018 22:43, Nicolas Pitre wrote: >> > Subject: [PATCH] ARM: remove naked function usage >> > >> > Convert page copy functions not to rely on the naked funct

Re: [PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list

2018-11-05 Thread Stefan Agner
On 16.10.2018 22:43, Nicolas Pitre wrote: > On Tue, 16 Oct 2018, Russell King - ARM Linux wrote: > >> On Tue, Oct 16, 2018 at 10:00:19AM +0200, Linus Walleij wrote: >> > On Tue, Oct 16, 2018 at 12:16 AM Stefan Agner wrote: >> > >> > > When functions inc

Re: [PATCH] kbuild: consolidate Clang compiler flags

2018-11-05 Thread Stefan Agner
On 05.11.2018 03:48, Masahiro Yamada wrote: > Add basic options for Clang such as --target, --prefix, --gcc-toolchain, > -no-integrated-as to a single variable CLANG_FLAGS. > > Signed-off-by: Masahiro Yamada > --- > > Makefile | 13 ++--- > 1 file changed, 6 insertions(+), 7

[PATCH] PCI: dwc: Limit config space size for i.MX6

2018-10-19 Thread Stefan Agner
Reading the full 4k config space through sysfs leads to an external abort. Testing on a platform showed that the upper limit is 512. Limit config space to 512. Signed-off-by: Stefan Agner --- I observed this on a Apalis iMX6 which uses the i.MX 6Quad without any PCIe device connected

Re: [PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list

2018-10-16 Thread Stefan Agner
On 16.10.2018 22:43, Nicolas Pitre wrote: > On Tue, 16 Oct 2018, Russell King - ARM Linux wrote: > >> On Tue, Oct 16, 2018 at 10:00:19AM +0200, Linus Walleij wrote: >> > On Tue, Oct 16, 2018 at 12:16 AM Stefan Agner wrote: >> > >> > > When functions inc

Re: [PATCH 2/2] ARM: copypage: do not use naked functions

2018-10-16 Thread Stefan Agner
On 16.10.2018 10:33, Russell King - ARM Linux wrote: > On Mon, Oct 15, 2018 at 07:27:43PM -0400, Nicolas Pitre wrote: >> It's hard to see what that commit was actually fixing, but the operands >> usage is wrong as explained already. Maybe the generated code has been >> OK for all those years but

Re: [PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list

2018-10-15 Thread Stefan Agner
On 16.10.2018 00:46, Russell King - ARM Linux wrote: > On Tue, Oct 16, 2018 at 12:39:54AM +0200, Stefan Agner wrote: >> On 16.10.2018 00:23, Russell King - ARM Linux wrote: >> > On Tue, Oct 16, 2018 at 12:16:29AM +0200, Stefan Agner wrote: >> >> When functions incomi

Re: [PATCH 2/2] ARM: copypage: do not use naked functions

2018-10-15 Thread Stefan Agner
On 16.10.2018 00:41, Russell King - ARM Linux wrote: > On Mon, Oct 15, 2018 at 06:35:33PM -0400, Nicolas Pitre wrote: >> On Tue, 16 Oct 2018, Stefan Agner wrote: >> >> > GCC documentation says naked functions should only use basic ASM >> > syntax. The extended A

Re: [PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list

2018-10-15 Thread Stefan Agner
On 16.10.2018 00:23, Russell King - ARM Linux wrote: > On Tue, Oct 16, 2018 at 12:16:29AM +0200, Stefan Agner wrote: >> When functions incoming parameters are not in input operands list gcc >> 4.5 does not load the parameters into registers before calling this >> function bu

[PATCH 2/2] ARM: copypage: do not use naked functions

2018-10-15 Thread Stefan Agner
s. Tested with qemu versatileab machine and versatile_defconfig and qemu mainstone machine using pxa_defconfig compiled with GCC 7.2.1 and Clang 7.0. Link: https://github.com/ClangBuiltLinux/linux/issues/90 Reported-by: Joel Stanley Signed-off-by: Stefan Agner --- arch/arm/mm/copypage-fa.c | 17

[PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list

2018-10-15 Thread Stefan Agner
Signed-off-by: Stefan Agner --- arch/arm/mm/copypage-fa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/copypage-fa.c b/arch/arm/mm/copypage-fa.c index d130a5ece5d5..ec6501308c60 100644 --- a/arch/arm/mm/copypage-fa.c +++ b/arch/arm/mm/copypage-fa.c @@ -

[PATCH v2] ARM: error out if compiling ARMv6 using Clang before 8.0

2018-10-15 Thread Stefan Agner
-by: Russell King Signed-off-by: Stefan Agner Link: https://github.com/ClangBuiltLinux/linux/issues/55 --- include/linux/compiler-clang.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index b1ce500fe8b3..9df8713bef38 100644

Re: [PATCH] ARM: disable ARMv6 for Clang older than 8.0

2018-10-01 Thread Stefan Agner
On 01.10.2018 18:53, Russell King - ARM Linux wrote: > On Sun, Sep 30, 2018 at 04:48:20PM -0700, Joe Perches wrote: >> On Mon, 2018-10-01 at 00:22 +0200, Stefan Agner wrote: >> > The kernel passes the ArmV6K architecture to the compiler when >> > using the multi plat

[PATCH] ARM: disable ARMv6 for Clang older than 8.0

2018-09-30 Thread Stefan Agner
-off-by: Stefan Agner Link: https://github.com/ClangBuiltLinux/linux/issues/55 --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e8cd55a5b04c..8da160757381 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -671,6 +671,7

Re: [PATCH v2] ARM: dts: Add support for Liebherr's BK4 device (vf610 based)

2018-09-28 Thread Stefan Agner
On 28.09.2018 00:18, Lukasz Majewski wrote: > This commit adds DTS support for BK4 device from Liebherr. It > uses vf610 SoC from NXP. > > Signed-off-by: Lukasz Majewski Reviewed-by: Stefan Agner -- Stefan > --- > Changes for v2: > > - Rename enet_ext and audio_ext o

[PATCH v2] ARM: use choice for kernel unwinders

2018-09-25 Thread Stefan Agner
, and clang is not able to generate the required prologue. Make the FRAME_POINTER config symbol depending on !clang. Suggested-by: Arnd Bergmann Signed-off-by: Stefan Agner --- arch/arm/Kconfig.debug | 44 +++--- lib/Kconfig.debug | 6 +++--- 2 files changed

Re: [PATCH] ARM: dts: Add support for Liebherr's BK4 device (vf610 based)

2018-09-21 Thread Stefan Agner
On 21.09.2018 08:27, Lukasz Majewski wrote: > This commit adds DTS support for BK4 device from Liebherr. It > uses vf610 SoC from NXP. > > Signed-off-by: Lukasz Majewski > --- > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/vf610-bk4.dts | 504 >

Re: [PATCH 2/2] pinctrl: tegra: move probe to __init section

2018-09-20 Thread Stefan Agner
On 20.09.2018 08:16, Linus Walleij wrote: > On Tue, Sep 18, 2018 at 6:24 PM Stefan Agner wrote: > >> The Tegra pinctrl drivers are always built-in. This allows to use >> platform_driver_probe() and mark several functions as __init. >> This allows the kernel to free about

Re: [PATCH v2 2/2] Compiler Attributes: naked can be shared

2018-09-20 Thread Stefan Agner
On 19.09.2018 16:00, Miguel Ojeda wrote: > On Wed, Sep 19, 2018 at 11:14 PM, Greg Kroah-Hartman > wrote: >> On Tue, Sep 18, 2018 at 08:56:04PM +0200, Miguel Ojeda wrote: >>> Hi Greg, >>> >> >>> Since Linus/Andrew/you >>> didn't comment on whether you wanted or not this for 4.19, we are >>>

[PATCH 1/2] pinctrl: tegra: do not export tegra_pinctrl_probe

2018-09-18 Thread Stefan Agner
No user of tegra_pinctrl_probe can be built as a module, hence exporting the symbol is not necessary. Drop EXPORT_SYMBOL_GPL. Signed-off-by: Stefan Agner --- drivers/pinctrl/tegra/pinctrl-tegra.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers

[PATCH 2/2] pinctrl: tegra: move probe to __init section

2018-09-18 Thread Stefan Agner
The Tegra pinctrl drivers are always built-in. This allows to use platform_driver_probe() and mark several functions as __init. This allows the kernel to free about 1KiB of memory if Tegra pinctrl drivers are not used. Signed-off-by: Stefan Agner --- drivers/pinctrl/tegra/pinctrl-tegra.c| 6

Re: [PATCH 2/2] Compiler Attributes: naked can be shared

2018-09-18 Thread Stefan Agner
On 18.09.2018 09:06, Miguel Ojeda wrote: > On Tue, Sep 18, 2018 at 9:30 AM, Greg Kroah-Hartman > wrote: >> On Mon, Sep 17, 2018 at 08:19:50PM -0700, Stefan Agner wrote: >>> On 13.09.2018 16:59, Miguel Ojeda wrote: >>> > The naked attribute is supported by at least

Re: [PATCH 2/2] Compiler Attributes: naked can be shared

2018-09-17 Thread Stefan Agner
cc.h so that the definition > is shared by all compilers. > > This also fixes Clang support for ARM32 --- 815f0ddb346c > ("include/linux/compiler*.h: make compiler-*.h mutually exclusive"). > > Cc: Stefan Agner > Cc: Rasmus Villemoes > Cc: Eli Friedman > Cc:

Re: [PATCH 1/2] Compiler Attributes: naked was fixed in gcc 4.6

2018-09-17 Thread Stefan Agner
rted version is 4.6, > we can clean it up. > > See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290 > and https://godbolt.org/z/h6NMIL > > Cc: Stefan Agner > Cc: Rasmus Villemoes > Cc: Eli Friedman > Cc: Christopher Li > Cc: Kees Cook > Cc: Ingo Molnar >

Re: [PATCH] kbuild: allow to use GCC toolchain not in Clang search path

2018-09-17 Thread Stefan Agner
On 17.09.2018 20:06, Masahiro Yamada wrote: > Hi Stefan, > > 2018-09-18 11:31 GMT+09:00 Stefan Agner : >> When using a GCC cross toolchain which is not in a compiled in >> Clang search path, Clang reverts to the system assembler and >> linker. This leads to assembler

[PATCH] kbuild: allow to use GCC toolchain not in Clang search path

2018-09-17 Thread Stefan Agner
-off-by: Stefan Agner --- Nick, I removed your Reviewed-by since I had to change variable assignment slightly... Makefile | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4d5c883a98e5..d5de2db4b549 100644 --- a/Makefile +++ b/Makefile @@ -495,13

Re: [PATCH] iio: adc: max9611: Avoid implicit enum conversion warning

2018-09-17 Thread Stefan Agner
pe of the variable 'gain_selectors' to int so that Clang >> > > understands this is expected behavior. >> > > >> > > Reported-by: Nick Desaulniers >> > > Signed-off-by: Nathan Chancellor >> > How does this interact with the patch that Stefan

Re: [PATCH 4.18 082/197] block: dont warn for flush on read-only device

2018-09-16 Thread Stefan Agner
y on-media data by itself. > > Reported-by: Stefan Agner > Fixes: 721c7fc701c7 ("block: fail op_is_write() requests to read-only > partitions") > Signed-off-by: Jens Axboe > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- >

Re: [PATCH v4 06/13] Compiler Attributes: naked can be shared

2018-09-10 Thread Stefan Agner
On 08.09.2018 14:24, Miguel Ojeda wrote: > The naked attribute is supported by at least gcc >= 4.6 (for ARM, > which is the only current user), gcc >= 8 (for x86), clang >= 3.1 > and icc >= 13. See https://godbolt.org/z/350Dyc > > Therefore, move it out of compiler-gcc.h so that the definition >

Re: [PATCH v4 05/13] Compiler Attributes: naked was fixed in gcc 4.6

2018-09-10 Thread Stefan Agner
Hi, On 08.09.2018 14:24, Miguel Ojeda wrote: > Commit 9c695203a7dd ("compiler-gcc.h: gcc-4.5 needs noclone > and noinline on __naked functions") added noinline and noclone > as a workaround for a gcc 4.5 bug, which was resolved in 4.6.0. > > Since now the minimum gcc supported version is 4.6, >

[PATCH] include/linux/compiler-clang.h: define __naked

2018-09-10 Thread Stefan Agner
Signed-off-by: Stefan Agner --- include/linux/compiler-clang.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index b1ce500fe8b3..a593e3ac0720 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -2

[PATCH] ARM: dts: imx6q-apalis: mux RESET_MOCI# signal

2018-09-06 Thread Stefan Agner
as a GPIO by default not muxing it explicitly worked fine in practise. Signed-off-by: Stefan Agner --- arch/arm/boot/dts/imx6q-apalis-eval.dts | 2 ++ arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 2 ++ arch/arm/boot/dts/imx6q-apalis-ixora.dts | 2 ++ arch/arm/boot/dts/imx6qdl-apalis.dtsi

Re: [PATCH] HID: core: fix NULL pointer dereference

2018-09-04 Thread Stefan Agner
Addresses-Coverity-ID: 1473081 ("Dereference after null check") > Fixes: b2dd9f2e5a8a ("HID: core: fix memory leak on probe") > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Stefan Agner -- Stefan > --- > drivers/hid/hid-core.c | 3 ++- > 1 file changed, 2 insert

[PATCH] HID: core: fix memory leak on probe

2018-08-28 Thread Stefan Agner
The dynamically allocted collection stack does not get freed in all situations. Make sure to also free the collection stack when using the parser in hid_open_report(). Fixes: 08a8a7cf1459 ("HID: core: do not upper bound the collection stack") Signed-off-by: Stefan Agner --- Found wit

[PATCH] HID: input: fix leaking custom input node name

2018-08-28 Thread Stefan Agner
Make sure to free the custom input node name on disconnect. Cc: sta...@vger.kernel.org # v4.18+ Fixes: c554bb045511 ("HID: input: append a suffix matching the application") Signed-off-by: Stefan Agner --- Found with kmemleak, after unplugging a Logitech Unifying receiver: unreferen

[PATCH] tty: serial: lpuart: avoid leaking struct tty_struct

2018-08-28 Thread Stefan Agner
() and .set_termios() callback, it is safe to assume the tty instance is valid. Cc: sta...@vger.kernel.org # v4.9+ Fixes: 5887ad43ee02 ("tty: serial: fsl_lpuart: Use cyclic DMA for Rx") Signed-off-by: Stefan Agner --- This fixes a memory leak observable when opening/closing the tty in a loop. Th

[PATCH] ARM: wire up io_pgetevents syscall

2018-08-27 Thread Stefan Agner
Wire up the new io_pgetevents syscall for ARM. Signed-off-by: Stefan Agner --- arch/arm/tools/syscall.tbl | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index fbc74b5fa3ed..8edf93b4490f 100644 --- a/arch/arm/tools/syscall.tbl +++ b

[PATCH] bpf: fix build error with clang

2018-08-27 Thread Stefan Agner
resolving hweight_long at compile time. Since SK_FL_PROTO_MASK is a constant, we can use the interface for known constant arguments which works fine with clang. Fixes: 2dbb9b9e6df6 ("bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT") Signed-off-by: Stefan Agner --- net/core/filter.c | 2 +- 1 file

[PATCH] ARM: ftrace: remove old mcount support

2018-08-26 Thread Stefan Agner
Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") raised the minimum GCC version to 4.6. Old mcount is only required for GCC versions older than 4.4.0. Hence old mcount support can be dropped too. Signed-off-by: Stefan Agner --- Besides cleaning up code it also

Re: [PATCH] ARM: use choice for kernel unwinders

2018-08-22 Thread Stefan Agner
On 22.08.2018 12:02, Arnd Bergmann wrote: > On Wed, Aug 22, 2018 at 12:24 AM Stefan Agner wrote: >> >> While in theory multiple unwinders could be compiled in, it does >> not make sense in practise. Use a choice to make the unwinder >> selection mutually exclusive a

[PATCH] ARM: use choice for kernel unwinders

2018-08-21 Thread Stefan Agner
, and clang is not able to generate the required prologue. Make the FRAME_POINTER config symbol depending on !clang. Suggested-by: Arnd Bergmann Signed-off-by: Stefan Agner --- arch/arm/Kconfig.debug | 43 ++ 1 file changed, 27 insertions(+), 16 deletions

Re: [PATCH v2] ASoC: tegra: probe deferral error reporting

2018-08-18 Thread Stefan Agner
t;> goto err_clk_put; >> } > > Thanks, looks good to me. However, I wonder why we don't request the > 'sync_gpio' in the probe like we do for the reset? Otherwise ... The comment in tegra20_ac97_codec_warm_reset() is probably the reason: /* * although sync line is driven by the DAC pad group warm reset using * the controller cmd is not working, have to toggle sync line * manually. */ I guess the GPIO need to be freed so that the DAC pad group can use the sync line? > > Acked-by: Jon Hunter Also looks good to me: Reviewed-by: Stefan Agner -- Stefan

Re: [PATCH v2] clk: tegra: probe deferral error reporting

2018-08-18 Thread Stefan Agner
On 14.08.2018 11:18, Marcel Ziswiler wrote: > From: Marcel Ziswiler > > Actually report the error code from devm_regulator_get() which may as > well just be a probe deferral. > > Signed-off-by: Marcel Ziswiler Reviewed-by: Stefan Agner > > --- > > Changes in

Warning when using eMMC and partprobe: generic_make_request: Trying to write to read-only block-device

2018-08-14 Thread Stefan Agner
Hi, Using Linux 4.18 on a i.MX 6Q I see the following warning during boot-up: [ 23.928916] [ cut here ] [ 23.933795] WARNING: CPU: 1 PID: 527 at block/blk-core.c:2161 generic_make_request_checks+0x868/0xa18 [ 23.943306] generic_make_request: Trying to write to

Re: [PATCH] gcc-plugins: require GCC

2018-08-13 Thread Stefan Agner
On 13.08.2018 22:18, Kees Cook wrote: > On Mon, Aug 13, 2018 at 1:10 PM, Kees Cook wrote: >> On Mon, Aug 13, 2018 at 12:38 AM, Masahiro Yamada >> wrote: >>> 2018-08-11 18:48 GMT+09:00 Stefan Agner : >>>> Unsurprisingly GCC plugins require GCC as a compiler

Re: [PATCH] ARM: drop experimental mark for ARM stack unwinding

2018-08-11 Thread Stefan Agner
On 11.08.2018 18:57, Russell King - ARM Linux wrote: > On Sat, Aug 11, 2018 at 12:31:27PM +0200, Stefan Agner wrote: >> ARM stack unwinding is upstream since 2009 and has been proven >> working well. At this time it is the preferred stack unwinding >> support since it also

[PATCH] ARM: drop experimental mark for ARM stack unwinding

2018-08-11 Thread Stefan Agner
ARM stack unwinding is upstream since 2009 and has been proven working well. At this time it is the preferred stack unwinding support since it also supports Thumb 2. Do not scare people and drop the EXPERIMENTAL mark. Signed-off-by: Stefan Agner --- arch/arm/Kconfig.debug | 2 +- 1 file changed

[PATCH] ARM: require GCC for FRAME_POINTER

2018-08-11 Thread Stefan Agner
on clang, and clang is not able to generate the required prologue. Make the FRAME_POINTER config symbol dependent on GCC. Suggested-by: Arnd Bergmann Signed-off-by: Stefan Agner --- arch/arm/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig.debug b/arch

[PATCH] gcc-plugins: require GCC

2018-08-11 Thread Stefan Agner
Unsurprisingly GCC plugins require GCC as a compiler. This avoids GCC plugins being selectable when using clang. Signed-off-by: Stefan Agner --- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 1aa59063f1fd..8c693a837ed7 100644

[PATCH] iio: adc: max9611: explicitly cast gain_selectors

2018-08-11 Thread Stefan Agner
conversion from enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion] *csa_gain = gain_selectors[i]; ~ ^ Signed-off-by: Stefan Agner --- drivers/iio

Re: [PATCH v1 1/2] pinctrl: tegra: Move drivers registration to arch_init level

2018-08-06 Thread Stefan Agner
On 06.08.2018 15:38, Dmitry Osipenko wrote: > On Monday, 6 August 2018 16:03:01 MSK Stefan Agner wrote: >> On 04.08.2018 16:01, Dmitry Osipenko wrote: >> > On Friday, 3 August 2018 20:24:56 MSK Linus Walleij wrote: >> >> On Thu, Aug 2, 2018 at 1:31 PM Stefan Agne

Re: [PATCH v1 1/2] pinctrl: tegra: Move drivers registration to arch_init level

2018-08-06 Thread Stefan Agner
On 04.08.2018 16:01, Dmitry Osipenko wrote: > On Friday, 3 August 2018 20:24:56 MSK Linus Walleij wrote: >> On Thu, Aug 2, 2018 at 1:31 PM Stefan Agner wrote: >> > A while back at least using those init lists were not well received even >> > for GPIO/pinct

[PATCH 2/3] mtd: rawnand: vf610_nfc: explicitly disable interrupts first

2018-08-06 Thread Stefan Agner
Explicitly disable all interrupts on probe. This should be the default state, but the bootloader could leave the device in any state. No issues have been observed so far, but it is still worth fixing it. Signed-off-by: Stefan Agner --- drivers/mtd/nand/raw/vf610_nfc.c | 9 + 1 file

[PATCH 1/3] mtd: rawnand: vf610_nfc: align IRQ bit naming

2018-08-06 Thread Stefan Agner
Rename the IRQ DONE clear bit to align with other IRQ bits. Signed-off-by: Stefan Agner --- drivers/mtd/nand/raw/vf610_nfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index d5a22fc96878

[PATCH 3/3] mtd: rawnand: vf610_nfc: handle only idle interrupts

2018-08-06 Thread Stefan Agner
adverse effects. Signed-off-by: Stefan Agner Tested-by: Stefan Agner --- drivers/mtd/nand/raw/vf610_nfc.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index 52e7811c0bde

Re: [PATCH v1 1/2] pinctrl: tegra: Move drivers registration to arch_init level

2018-08-02 Thread Stefan Agner
them loaded early. It avoids unnecessary EPROBE_DEFER and hence probably even boots faster. And in this case it even resolves real world issues. This should definitely go in, at least as a stop gap solution. Acked-by: Stefan Agner -- Stefan > > Signed-off-by: Dmitry Osipenko > --

Re: [PATCH v2] drm/mxsfb: Fix runtime PM for unpowering lcdif block

2018-08-02 Thread Stefan Agner
On 02.08.2018 12:17, Philipp Zabel wrote: > On Tue, 2018-07-31 at 12:17 +, Leonard Crestez wrote: >> On Tue, 2018-07-31 at 13:54 +0200, Philipp Zabel wrote: >> > On Tue, 2018-07-17 at 13:48 +0300, Leonard Crestez wrote: >> > > Adding lcdif nodes to a power domain currently does work, it

Re: [PATCH] net: fec: check DMA addressing limitations

2018-08-02 Thread Stefan Agner
On 02.08.2018 04:00, Andy Duan wrote: > From: Stefan Agner Sent: 2018年8月1日 19:45 >> Check DMA addressing limitations as suggested by the DMA API how-to. >> This does not fix a particular issue seen but is considered good style. >> >> Signed-off-by: Stefan Agner >

Re: [PATCH 2/2] ARM: tegra: readd gpio-ranges properties

2018-08-01 Thread Stefan Agner
On 01.08.2018 22:51, Dmitry Osipenko wrote: > On Thursday, 26 July 2018 18:40:25 MSK Stefan Agner wrote: >> The properties have been commented out to prevent a regression a >> while ago. The first regression should be resolved by >> commit 44af7927316e ("spi: Map SPI O

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-31 Thread Stefan Agner
On 31.07.2018 18:29, Robin Murphy wrote: > On 31/07/18 16:53, Stefan Agner wrote: >> On 31.07.2018 14:32, Robin Murphy wrote: >>> On 31/07/18 09:19, Stefan Agner wrote: >>>> On 30.07.2018 16:38, Robin Murphy wrote: >>>>> On 28/07/18 17:58, Guenter Roec

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-31 Thread Stefan Agner
On 31.07.2018 14:32, Robin Murphy wrote: > On 31/07/18 09:19, Stefan Agner wrote: >> On 30.07.2018 16:38, Robin Murphy wrote: >>> On 28/07/18 17:58, Guenter Roeck wrote: >>>> On Fri, Jul 27, 2018 at 04:04:48PM +0200, Christoph Hellwig wrote: >>>>

[PATCH] fs: ubifs: introduce Kconfig symbol for xattr support

2018-07-31 Thread Stefan Agner
Allow to disable extended attribute support. This aids in reliability testing, especially since some xattr related bugs have surfaced. Also an embedded system might not need it, so this allows for a slightly smaller kernel (about 4KiB). Signed-off-by: Stefan Agner --- fs/ubifs/Kconfig | 15

Re: [PATCH v2 03/10] mmc: tegra: Power on the calibration pad

2018-07-31 Thread Stefan Agner
On 26.07.2018 14:26, Aapo Vienamo wrote: > Automatic pad drive strength calibration is performed on a separate pad > identical to the ones used for driving the actual bus. Power on the > calibration pad during the calibration procedure and power it off > afterwards to save power. > >

Re: [PATCH v2 00/10] Tegra SDHCI update the pad autocal procedure

2018-07-31 Thread Stefan Agner
On 30.07.2018 17:43, Aapo Vienamo wrote: > On Mon, 30 Jul 2018 17:07:59 +0200 > Ulf Hansson wrote: > >> On 26 July 2018 at 14:26, Aapo Vienamo wrote: >> > Hi all, >> > >> > Update the tegra_sdhci_pad_autocalib() pad drive strength calibration >> > procedure to match the ones specified in the

Re: [PATCH v2 03/10] mmc: tegra: Reconfigure pad voltages during voltage switching

2018-07-31 Thread Stefan Agner
On 27.07.2018 10:44, Aapo Vienamo wrote: > On Thu, 26 Jul 2018 15:33:11 +0200 > Stefan Agner wrote: > >> On 26.07.2018 14:19, Aapo Vienamo wrote: >> > Parse the pinctrl state and nvidia,only-1-8-v properties from the device >> > tree and implement pad voltage

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-31 Thread Stefan Agner
On 30.07.2018 16:38, Robin Murphy wrote: > On 28/07/18 17:58, Guenter Roeck wrote: >> On Fri, Jul 27, 2018 at 04:04:48PM +0200, Christoph Hellwig wrote: >>> On Fri, Jul 27, 2018 at 03:18:14PM +0200, Krzysztof Kozlowski wrote: On 27 July 2018 at 15:11, Krzysztof Kozlowski wrote: > Hi,

  1   2   3   4   5   6   7   8   9   10   >