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: >> >>>

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/

[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 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-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

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 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 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 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 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 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

[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 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 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 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 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

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] 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 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

[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

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 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 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

[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 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] 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-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 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

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

[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 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 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 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 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

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 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 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

[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

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

[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

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

[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] 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 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 >>>

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 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

[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-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 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 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

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

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