Random ARM randconfig fixes in drivers
Subsystems (24)
Arnd Bergmann
maintainercover Random ARM randconfig fixes in drivers
These are a bunch of fixes I had to do to get all randconfig configurations on ARM working. Most of these are really old bugs, but there are also some new ones. I don't think any of them require a backport to linux-stable.
I have checked that they are all still required on yesterday's linux-next kernel. Please apply on the appropriate trees unless there are objections.
Patch numbers are per subsystem, which I thought is less confusing than numbering them 1-22 when they are all totall independent.
Arnd Bergmann (22):
mdio_bus: fix devm_mdiobus_alloc_size export
phy: kona2: use 'select GENERIC_PHY' in Kconfig
phy: exynos: fix SATA phy license typo
dmaengine: omap: hide filter_fn for built-in drivers
dmaengine: sa11x0: remove broken #ifdef mtd/onenand: fix build warning for dma type
mtd: orion-nand: fix build error with ARMv4 clk/versatile: export symbols for impd1 bus/omap_l3: avoid sync initcall for modules bus/arm-cci: add dependency on OF && CPU_V7
watchdog: iop_wdt only builds for mach-iop13xx
mpilib: use 'static inline' for mpi-inline.h
ata: pata_at91 only works on sam9 i2c/nuc900: fix ancient build error
iio: always select ANON_INODES
iio:adc: at91 requires the input subsystem
pci: rcar host needs OF
input: fix ps2/serio module dependency
input: atmel-wm97xx: only build for AVR32
misc: atmel_pwm: only build for supported platforms
remoteproc: da8xx: don't select CMA on no-MMU
regulator: arizona-ldo1: add missing #include
drivers/ata/Kconfig | 2 +- drivers/bus/Kconfig | 2 +- drivers/bus/omap_l3_noc.c | 4 ++++ drivers/bus/omap_l3_smx.c | 4 ++++ drivers/clk/versatile/clk-icst.c | 1 + drivers/clk/versatile/clk-impd1.c | 2 ++ drivers/dma/sa11x0-dma.c | 4 ---- drivers/i2c/busses/i2c-nuc900.c | 2 +- drivers/iio/Kconfig | 1 + drivers/iio/adc/Kconfig | 1 + drivers/input/keyboard/Kconfig | 2 +- drivers/input/mouse/Kconfig | 2 +- drivers/input/touchscreen/Kconfig | 2 +- drivers/misc/Kconfig | 3 ++- drivers/mtd/nand/orion_nand.c | 5 +++++ drivers/mtd/onenand/samsung.c | 8 ++++---- drivers/net/phy/mdio_bus.c | 2 +- drivers/pci/host/Kconfig | 2 +- drivers/phy/Kconfig | 2 +- drivers/phy/phy-exynos5250-sata.c | 2 +- drivers/regulator/arizona-ldo1.c | 1 + drivers/remoteproc/Kconfig | 2 +- drivers/watchdog/Kconfig | 2 +- include/linux/omap-dma.h | 2 +- lib/mpi/mpi-inline.h | 2 +- lib/mpi/mpi-internal.h | 8 -------- 26 files changed, 39 insertions(+), 31 deletions(-)
Signature · 32 lines
1.8.3.2 Cc: bhelgaas at google.com Cc: dwmw2 at infradead.org Cc: dmitry.torokhov at gmail.com Cc: balbi at ti.com Cc: gregkh at linuxfoundation.org Cc: plagnioj at jcrosoft.com Cc: jic23 at kernel.org Cc: josh.wu at atmel.com Cc: kishon at ti.com Cc: linus.walleij at linaro.org Cc: broonie at kernel.org Cc: mturquette at linaro.org Cc: nicolas.ferre at atmel.com Cc: ohad at wizery.com Cc: linux at arm.linux.org.uk Cc: tony at atomide.com Cc: vinod.koul at intel.com Cc: wim at iguana.be Cc: wsa at the-dreams.de Cc: dmaengine at vger.kernel.org Cc: linux-i2c at vger.kernel.org Cc: linux-ide at vger.kernel.org Cc: linux-iio at vger.kernel.org Cc: linux-input at vger.kernel.org Cc: linux-mtd at lists.infradead.org Cc: linux-pci at vger.kernel.org Cc: linux-samsung-soc at vger.kernel.org Cc: linux-sh at vger.kernel.org Cc: linux-watchdog at vger.kernel.org Cc: netdev at vger.kernel.org
Arnd Bergmann
maintainerPATCH 1/1 mdio_bus: fix devm_mdiobus_alloc_size export
commit 6d48f44b7b2 "mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free" introduced a new function devm_mdiobus_alloc_size() but added an export for a different function devm_mdiobus_alloc(), which was obviously a simple mistake that leads to build error whenever this function is used from a loadable module:
ERROR: "devm_mdiobus_alloc_size" [drivers/net/ethernet/ti/davinci_mdio.ko] undefined!
--- drivers/net/phy/mdio_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/mdio_bus.c +1 -1
@@ -117,7 +117,7 @@ struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv)return bus; } -EXPORT_SYMBOL_GPL (devm_mdiobus_alloc); +EXPORT_SYMBOL_GPL (devm_mdiobus_alloc_size);/** * devm_mdiobus_free - Resource-managed mdiobus_free()
Signature · 1 line
1.8.3.2
Re: [PATCH] mdio_bus: fix devm_mdiobus_alloc_size export
Hi Arnd,
Quoted 7 lines · Arnd Bergmann
commit
6d48f44b7b2"mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free" introduced a new functiondevm_mdiobus_alloc_size()but added an export for a different functiondevm_mdiobus_alloc(), which was obviously a simple mistake that leads to build error whenever this function is used from a loadable module:ERROR: "
devm_mdiobus_alloc_size" [drivers/net/ethernet/ti/davinci_mdio.ko] undefined!
Sorry for that, and thanks a lot for the fix.
Quoted 18 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Florian Fainelli <[email protected]>Cc Sergei Shtylyov <[email protected]>Cc Lad, Prabhakar <[email protected]>Cc David S. Miller <[email protected]>--- drivers/net/phy/mdio_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/phy/mdio_bus.c +0
-0
drivers/net/phy/mdio_bus.c struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv) · line 123
Quoted 8 lines
drivers/net/phy/mdio_bus.c +1
-1@@ -117,7 +117,7 @@ struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv)return bus; } -EXPORT_SYMBOL_GPL (devm_mdiobus_alloc); +EXPORT_SYMBOL_GPL (devm_mdiobus_alloc_size);/** * devm_mdiobus_free - Resource-managed mdiobus_free()
Regards,
-grygorii
Re: [PATCH] mdio_bus: fix devm_mdiobus_alloc_size export
In reply to Arnd BergmannQuoted 8 lines · Arnd Bergmann
commit
6d48f44b7b2"mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free" introduced a new functiondevm_mdiobus_alloc_size()but added an export for a different functiondevm_mdiobus_alloc(), which was obviously a simple mistake that leads to build error whenever this function is used from a loadable module:ERROR: "
devm_mdiobus_alloc_size" [drivers/net/ethernet/ti/davinci_mdio.ko] undefined!
Quoted 7 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Florian Fainelli <[email protected]>Cc Sergei Shtylyov <[email protected]>Cc Lad, Prabhakar <[email protected]>Cc David S. Miller <[email protected]>Cc netdev at vger.kernel.org
Thanks,
--Prabhakar Lad
Quoted 20 lines
--- drivers/net/phy/mdio_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/phy/mdio_bus.c +1
-2@@ -117,7 +117,7 @@ struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv)return bus; } -EXPORT_SYMBOL_GPL (devm_mdiobus_alloc); +EXPORT_SYMBOL_GPL (devm_mdiobus_alloc_size);/** * devm_mdiobus_free - Resource-managed mdiobus_free() -- 1.8.3.2
Re: [PATCH] mdio_bus: fix devm_mdiobus_alloc_size export
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
Date: Thu, 8 May 2014 16:46:52 +0200
Quoted 9 lines
commit
6d48f44b7b2"mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free" introduced a new functiondevm_mdiobus_alloc_size()but added an export for a different functiondevm_mdiobus_alloc(), which was obviously a simple mistake that leads to build error whenever this function is used from a loadable module:ERROR: "
devm_mdiobus_alloc_size" [drivers/net/ethernet/ti/davinci_mdio.ko] undefined!Signed-off-by Arnd Bergmann <[email protected]>
Applied to net-next, thanks Arnd.
Arnd Bergmann
maintainerPATCH 1/2 phy: kona2: use 'select GENERIC_PHY' in Kconfig
In reply to Arnd BergmannAll other phy drivers use 'select', while this one is the only one to use 'depends on'. This is not a bug, just slightly inconsistent, so let's change it to do things the same way as everyone else.
We may also want to turn GENERIC_PHY into a silent option that only ever gets turned on if another driver needs it.
--- drivers/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/Kconfig +1 -1
@@ -89,8 +89,8 @@ config PHY_EXYNOS_DP_VIDEO config BCM_KONA_USB2_PHY tristate "Broadcom Kona USB2 PHY Driver" - depends on GENERIC_PHY depends on HAS_IOMEM + select GENERIC_PHY help Enable this to support the Broadcom Kona USB 2.0 PHY.
Signature · 1 line
1.8.3.2
Arnd Bergmann
maintainerPATCH 1/2 dmaengine: omap: hide filter_fn for built-in drivers
In reply to Arnd BergmannIt is not possible to reference the omap_dma_filter_fn filter function from a built-in driver if the dmaengine driver itself is a loadable module, which is a valid configuration otherwise.
This provides only the dummy alternative if the function is referenced by a built-in driver to allow a successful build. The filter function is only required by ATAGS based platforms, which will continue to be broken after this change for the bogus configuration. When booting from DT, with the dma channels correctly listed there, it will work fine.
--- include/linux/omap-dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/omap-dma.h +1 -1
@@ -10,7 +10,7 @@struct dma_chan ; -#if defined(CONFIG_DMA_OMAP ) || defined(CONFIG_DMA_OMAP_MODULE ) +#if defined(CONFIG_DMA_OMAP ) || (defined(CONFIG_DMA_OMAP_MODULE ) && defined(MODULE ))bool omap_dma_filter_fn (struct dma_chan *,void *);#else static inline bool omap_dma_filter_fn (struct dma_chan *c,void *d)
Signature · 1 line
1.8.3.2
Arnd Bergmann
maintainerPATCH 1/2 mtd/onenand: fix build warning for dma type
The samsung onenand driver passes around a dma address token through a void pointer, which is incorrect and leads to warnings like this one:
onenand/samsung.c:548:2: warning: passing argument 1 of '__fswab32' makes integer from pointer without a cast [enabled by default]
writel(src, base + S5PC110_DMA_SRC_ADDR);
^
This patch makes it use dma_addr_t here, which is more appropriate.
--- drivers/mtd/onenand/samsung.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/onenand/samsung.c +4 -4
@@ -537,9 +537,9 @@ static int onenand_write_bufferram(struct mtd_info *mtd, int area,return 0 ; } -static int (*s5pc110_dma_ops)(void *dst,void *src,size_t count,int direction); +static int (*s5pc110_dma_ops)(dma_addr_t dst,dma_addr_t src,size_t count,int direction); -static int s5pc110_dma_poll (void *dst,void *src,size_t count,int direction) +static int s5pc110_dma_poll (dma_addr_t dst,dma_addr_t src,size_t count,int direction) {void __iomem *base = onenand->dma_addr;int status;
@@ -605,7 +605,7 @@ static irqreturn_t s5pc110_onenand_irq(int irq, void *data)return IRQ_HANDLED ; } -static int s5pc110_dma_irq (void *dst,void *src,size_t count,int direction) +static int s5pc110_dma_irq (dma_addr_t dst,dma_addr_t src,size_t count,int direction) {void __iomem *base = onenand->dma_addr;int status;
@@ -686,7 +686,7 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,dev_err (dev,"Couldn't map a %d byte buffer for DMA\n" , count); goto normal; } - err =s5pc110_dma_ops ((void *) dma_dst, (void *) dma_src, + err =s5pc110_dma_ops (dma_dst, dma_src, count,S5PC110_DMA_DIR_READ );if (page_dma)
Signature · 1 line
1.8.3.2
Re: [PATCH 1/2] mtd/onenand: fix build warning for dma type
Quoted 8 lines · Arnd Bergmann
The samsung onenand driver passes around a dma address token through a void pointer, which is incorrect and leads to warnings like this one:
onenand/samsung.c:548:2: warning: passing argument 1 of '__fswab32' makes integer from pointer without a cast [enabled by default]
writel(src, base + S5PC110_DMA_SRC_ADDR);
^
Quoted 7 lines
This patch makes it use
dma_addr_there, which is more appropriate.Signed-off-by Arnd Bergmann <[email protected]>Cc Kyungmin Park <[email protected]>Cc David Woodhouse <[email protected]>Cc Brian Norris <[email protected]>Cc linux-mtd at lists.infradead.org
Pushed this one to l2-mtd.git. Thanks!
I think the second MTD patch is still under discussion, right? I'll follow up there if necessary.
Brian
Arnd Bergmann
maintainerPATCH 1/2 iio: always select ANON_INODES
In reply to Arnd BergmannWithout ANON_INODES, we get this build error:
drivers/built-in.o: In function `iio_event_getfd':
:(.text+0x14bf18): undefined reference to `anon_inode_getfd'
All other users explicitly select this symbol, so we should do the same thing here.
--- drivers/iio/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/iio/Kconfig +1 -0
@@ -4,6 +4,7 @@ menuconfig IIO tristate "Industrial I/O support" + select ANON_INODES help The industrial I/O subsystem provides a unified framework for drivers for many different types of embedded sensors using a
Signature · 1 line
1.8.3.2
Re: [PATCH 1/2] iio: always select ANON_INODES
Quoted 11 lines · Arnd Bergmann
Without
ANON_INODES, we get this build error:
drivers/built-in.o: In function `iio_event_getfd':
:(.text+0x14bf18): undefined reference to `anon_inode_getfd'All other users explicitly select this symbol, so we should do the same thing here.
Signed-off-by Arnd Bergmann <[email protected]>Cc Jonathan Cameron <[email protected]>
Applied to the togreg branch of iio.git.
Thanks,
Quoted 17 lines
--- drivers/iio/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/iio/Kconfig +1
-0@@ -4,6 +4,7 @@ menuconfig IIO tristate "Industrial I/O support" + select ANON_INODES help The industrial I/O subsystem provides a unified framework for drivers for many different types of embedded sensors using a
Arnd Bergmann
maintainerPATCH 1/2 input: fix ps2/serio module dependency
In reply to Arnd BergmannThe ps2 mouse and keyboard drivers use the "serio" framework that they correctly select in Kconfig, and that in turn depends on the i8042 driver, which is also allowed to be disabled for architectures that don't have an i8042.
However, Kconfig also allows i8042 to be built as a module while the serio framework is built-in, which causes this link error:
drivers/built-in.o: In function `ps2_begin_command':
:(.text+0x26b6cc): undefined reference to i8042_check_port_owner' :(.text+0x26b6d4): undefined reference to i8042_lock_chip' drivers/built-in.o: In function `ps2_end_command':
:(.text+0x26b734): undefined reference to i8042_check_port_owner' :(.text+0x26b73c): undefined reference to i8042_unlock_chip'
On x86, a specific 'select SERIO_I8042' takes care of it, but not on the other architecture that potentially have a u8042.
This patch changes the Kconfig logic to ensure that whenever there is an i8042, it does get used for the serio driver, avoiding the link error above.
--- drivers/input/keyboard/Kconfig | 2 +- drivers/input/mouse/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/keyboard/Kconfig +1 -1
@@ -71,7 +71,7 @@ config KEYBOARD_ATKBD default y select SERIO select SERIO_LIBPS2 - select SERIO_I8042 if X86 + select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIO select SERIO_GSCPS2 if GSC help Say Y here if you want to use a standard AT or PS/2 keyboard. Usually
drivers/input/mouse/Kconfig +1 -1
@@ -17,7 +17,7 @@ config MOUSE_PS2 default y select SERIO select SERIO_LIBPS2 - select SERIO_I8042 if X86 + select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIO select SERIO_GSCPS2 if GSC help Say Y here if you have a PS/2 mouse connected to your system. This
Signature · 1 line
1.8.3.2
Dmitry Torokhov
maintainerRe: [PATCH 1/2] input: fix ps2/serio module dependency
Hi Arnd,
drivers/input/keyboard/Kconfig config KEYBOARD_ATKBD · line 74
Quoted 6 lines · Arnd Bergmann
drivers/input/keyboard/Kconfig +1
-1@@ -71,7 +71,7 @@ config KEYBOARD_ATKBD default y select SERIO select SERIO_LIBPS2 - select SERIO_I8042 if X86 + select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIO
x86 also selects ARCH_MIGHT_HAVE_PC_SERIO so shouldn't this be
select SERIO_I8042 if ARCH_MIGHT_HAVE_PC_SERIO
?
I can fix it up on my side if you agree.
Thanks.
Signature · 1 line
Dmitry
Arnd Bergmann
maintainerRe: [PATCH 1/2] input: fix ps2/serio module dependency
Quoted 12 lines · On Thursday 08 May 2014 08:59:31 Dmitry Torokhov wrote:
Hi Arnd,
drivers/input/keyboard/Kconfig config KEYBOARD_ATKBD · line 74
Quoted 6 lines · Arnd Bergmann
drivers/input/keyboard/Kconfig +1
-1@@ -71,7 +71,7 @@ config KEYBOARD_ATKBD default y select SERIO select SERIO_LIBPS2 - select SERIO_I8042 if X86 + select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIOx86 also selects
ARCH_MIGHT_HAVE_PC_SERIOso shouldn't this be
Quoted 5 lines
select
SERIO_I8042ifARCH_MIGHT_HAVE_PC_SERIO?
I can fix it up on my side if you agree.
Yes, sounds good, thanks!
Arnd
Arnd Bergmann
maintainerPATCH 1/1 clk/versatile: export symbols for impd1
In reply to Arnd BergmannThe impd1 code on mach-integrator can be a loadable module, so we have to export icst_clk_register, integrator_impd1_clk_init and integrator_impd1_clk_exit.
--- drivers/clk/versatile/clk-icst.c | 1 + drivers/clk/versatile/clk-impd1.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/clk/versatile/clk-icst.c +1 -0
@@ -160,3 +160,4 @@ struct clk *icst_clk_register(struct device *dev,return clk; } +EXPORT_SYMBOL_GPL (icst_clk_register);
drivers/clk/versatile/clk-impd1.c +2 -0
@@ -133,6 +133,7 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id)for (i =0 ; i <ARRAY_SIZE (imc->clks); i++)clkdev_add (imc->clks[i]); } +EXPORT_SYMBOL_GPL (integrator_impd1_clk_init);void integrator_impd1_clk_exit (unsigned int id) {
@@ -155,3 +156,4 @@ void integrator_impd1_clk_exit(unsigned int id)kfree (imc->vco2name);kfree (imc->vco1name); } +EXPORT_SYMBOL_GPL (integrator_impd1_clk_exit);
Signature · 1 line
1.8.3.2
Re: [PATCH] clk/versatile: export symbols for impd1
Quoted 7 lines · Arnd Bergmann
The impd1 code on mach-integrator can be a loadable module, so we have to export
icst_clk_register,integrator_impd1_clk_initandintegrator_impd1_clk_exit.Signed-off-by Arnd Bergmann <[email protected]>Cc Mike Turquette <[email protected]>Cc Linus Walleij <[email protected]>
Yours,
Linus Walleij
Re: [PATCH] clk/versatile: export symbols for impd1
In reply to Arnd BergmannQuoting Arnd Bergmann (2014-05-08 07:56:16)
Quoted 7 lines
The impd1 code on mach-integrator can be a loadable module, so we have to export
icst_clk_register,integrator_impd1_clk_initandintegrator_impd1_clk_exit.Signed-off-by Arnd Bergmann <[email protected]>Cc Mike Turquette <[email protected]>Cc Linus Walleij <[email protected]>
Taken into clk-next.
Thanks!
Mike
Quoted 34 lines
--- drivers/clk/versatile/clk-icst.c | 1 + drivers/clk/versatile/clk-impd1.c | 2 ++ 2 files changed, 3 insertions(+)drivers/clk/versatile/clk-icst.c +1
-0@@ -160,3 +160,4 @@ struct clk *icst_clk_register(struct device *dev,return clk; } +EXPORT_SYMBOL_GPL (icst_clk_register);drivers/clk/versatile/clk-impd1.c +2
-0@@ -133,6 +133,7 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id)for (i =0 ; i <ARRAY_SIZE (imc->clks); i++)clkdev_add (imc->clks[i]); } +EXPORT_SYMBOL_GPL (integrator_impd1_clk_init);void integrator_impd1_clk_exit (unsigned int id) {@@ -155,3 +156,4 @@ void integrator_impd1_clk_exit(unsigned int id)kfree (imc->vco2name);kfree (imc->vco1name); } +EXPORT_SYMBOL_GPL (integrator_impd1_clk_exit);Signature · 1 line
1.8.3.2
Arnd Bergmann
maintainerPATCH 1/1 bus/omap_l3: avoid sync initcall for modules
In reply to Arnd BergmannThe postcore_initcall_sync() macro is only defined for built-in code, but the omap_l3 bus code can be built as a module, which currently causes a build failure.
This works around the problem by using #ifdef MODULE to decide whether to use a regular module_init() function or not.
--- drivers/bus/omap_l3_noc.c | 4 ++++ drivers/bus/omap_l3_smx.c | 4 ++++ 2 files changed, 8 insertions(+)
drivers/bus/omap_l3_noc.c +4 -0
@@ -257,7 +257,11 @@ static int __init omap4_l3_init(void) {return platform_driver_register (&omap4_l3_driver); } +#ifdef MODULE +module_init (omap4_l3_init); +#else postcore_initcall_sync (omap4_l3_init); +#endif static void __exit omap4_l3_exit(void) {
drivers/bus/omap_l3_smx.c +4 -0
@@ -288,7 +288,11 @@ static int __init omap3_l3_init(void) {return platform_driver_probe (&omap3_l3_driver, omap3_l3_probe); } +#ifdef MODULE +module_init (omap3_l3_init); +#else postcore_initcall_sync (omap3_l3_init); +#endif static void __exit omap3_l3_exit(void) {
Signature · 1 line
1.8.3.2
Tony Lindgren
maintainerRe: [PATCH] bus/omap_l3: avoid sync initcall for modules
Quoted 38 lines · Arnd Bergmann
The
postcore_initcall_sync()macro is only defined for built-in code, but theomap_l3bus code can be built as a module, which currently causes a build failure.This works around the problem by using #ifdef MODULE to decide whether to use a regular
module_init()function or not.Signed-off-by Arnd Bergmann <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Felipe Balbi <[email protected]>--- drivers/bus/omap_l3_noc.c | 4 ++++ drivers/bus/omap_l3_smx.c | 4 ++++ 2 files changed, 8 insertions(+)drivers/bus/omap_l3_noc.c +4
-0@@ -257,7 +257,11 @@ static int __init omap4_l3_init(void) {return platform_driver_register (&omap4_l3_driver); } +#ifdef MODULE +module_init (omap4_l3_init); +#else postcore_initcall_sync (omap4_l3_init); +#endif static void __exit omap4_l3_exit(void) {drivers/bus/omap_l3_smx.c +0
-0@@ -288,7 +288,11 @@ static int __init omap3_l3_init(void) {
drivers/bus/omap_l3_smx.c static int __init omap3_l3_init(void) · line 298
Quoted 10 lines
drivers/bus/omap_l3_smx.c +4
-0return platform_driver_probe (&omap3_l3_driver, omap3_l3_probe); } +#ifdef MODULE +module_init (omap3_l3_init); +#else postcore_initcall_sync (omap3_l3_init); +#endif static void __exit omap3_l3_exit(void) {
How about instead let's add this into include/linux/module.h like we have for other initcalls:
#define postcore_initcall(fn) module_init(fn)
There may be others missing too from there. BTW, this driver might be few of the drivers that actually might need to be initialized early for debugging to catch bad access from other drivers.
Regards,
Tony
Arnd Bergmann
maintainerRe: [PATCH] bus/omap_l3: avoid sync initcall for modules
Quoted 10 lines · On Monday 12 May 2014 15:20:07 Tony Lindgren wrote:
How about instead let's add this into
include/linux/module.hlike we have for other initcalls:#define
postcore_initcall(fn)module_init(fn)There may be others missing too from there. BTW, this driver might be few of the drivers that actually might need to be initialized early for debugging to catch bad access from other drivers.
There is a comment above those defines saying:
/* Don't use these in loadable modules, but some people do... */
so I'm not sure if adding more would be appreciated.
Arnd
Tony Lindgren
maintainerRe: [PATCH] bus/omap_l3: avoid sync initcall for modules
Quoted 4 lines · Arnd Bergmann
Quoted 3 lines · On Monday 12 May 2014 15:20:07 Tony Lindgren wrote:
How about instead let's add this into
include/linux/module.hlike we have for other initcalls:
I mean include/linux/init.h naturally..
Quoted 7 lines
Quoted 6 lines
#define
postcore_initcall(fn)module_init(fn)There may be others missing too from there. BTW, this driver might be few of the drivers that actually might need to be initialized early for debugging to catch bad access from other drivers.
Quoted 7 lines
There is a comment above those defines saying:
/* Don't use these in loadable modules, but some people do... */
so I'm not sure if adding more would be appreciated.
Arnd
Well "some" in that comment is probably an understatement :)
$ git grep _initcall drivers/ | wc -l 737
I did not look what percentage has tristate in the Kconfig, but that might keep some people from making loadable drivers.
Greg, is the following patch something you may want to consider picking up?
Regards,
Tony
8< ---------------------------
From: Tony Lindgren <[email protected]>
Date: Tue, 13 May 2014 09:05:26 -0700
Subject: [PATCH] init.h: Update initcall_sync variants to fix build errors
We are getting randconfig build errors on device drivers with tristate Kconfig option if they are using custom initcall levels. Rather than add ifdeffery into the drivers, let's add the missing initcall_sync variants.
As the comment in init.h has kept people from updating the list of initcalls that can be just module_init when the driver is loaded as a loadable module, let's also update the comment a bit to describe valid use cases custom initcall levels.
While most drivers should nowadays use just regular module_init because of the deferred probe, we do have quite a few custom initcall levels left that we cannot remove until tested properly.
There are also still few valid cases where a custom initcall level might make sense that I'm aware of.
For example a bus snooping driver can provide information about invalid bus access and is handy loader early when built in. But there's no hard dependency to have it necessarily built in and a loadable module is a valid option.
Another example is a driver implementing a Linux framework like pinctrl framework. That driver may be needed early on some platforms because of legacy reasons, while it can be just a regular module_init on most platforms.
include/linux/init.h +13 -1
@@ -297,16 +297,28 @@ void __init parse_early_options(char *cmdline);#else /* MODULE */ -/* Don't use these in loadable modules, but some people do... */ +/* +* In most cases loadable modules do not need custom +* initcall levels. There are still some valid cases where +* a driver may be needed early if built in, and does not +* matter when built as a loadable module. Like bus +* snooping debug drivers. +*/ #define early_initcall (fn) module_init(fn)#define core_initcall (fn) module_init(fn) +#define core_initcall_sync (fn) module_init(fn)#define postcore_initcall (fn) module_init(fn) +#define postcore_initcall_sync (fn) module_init(fn)#define arch_initcall (fn) module_init(fn)#define subsys_initcall (fn) module_init(fn) +#define subsys_initcall_sync (fn) module_init(fn)#define fs_initcall (fn) module_init(fn) +#define fs_initcall_sync (fn) module_init(fn)#define rootfs_initcall (fn) module_init(fn)#define device_initcall (fn) module_init(fn) +#define device_initcall_sync (fn) module_init(fn)#define late_initcall (fn) module_init(fn) +#define late_initcall_sync (fn) module_init(fn)#define console_initcall (fn) module_init(fn)#define security_initcall (fn) module_init(fn)
Greg KH
maintainerRe: [PATCH] bus/omap_l3: avoid sync initcall for modules
Quoted 25 lines · Tony Lindgren
Quoted 4 lines · Arnd Bergmann
Quoted 3 lines · On Monday 12 May 2014 15:20:07 Tony Lindgren wrote:
How about instead let's add this into
include/linux/module.hlike we have for other initcalls:I mean
include/linux/init.hnaturally..Quoted 7 lines
Quoted 6 lines
#define
postcore_initcall(fn)module_init(fn)There may be others missing too from there. BTW, this driver might be few of the drivers that actually might need to be initialized early for debugging to catch bad access from other drivers.
Quoted 7 lines
There is a comment above those defines saying:
/* Don't use these in loadable modules, but some people do... */
so I'm not sure if adding more would be appreciated.
Arnd
Well "some" in that comment is probably an understatement :)
Quoted 8 lines
$ git grep _initcall drivers/ | wc -l 737I did not look what percentage has tristate in the
Kconfig, but that might keep some people from making loadable drivers.Greg, is the following patch something you may want to consider picking up?
Sure, is this needed to fix issues in 3.15-final, or is 3.16-rc1 ok?
thanks,
greg k-h
Arnd Bergmann
maintainerRe: [PATCH] bus/omap_l3: avoid sync initcall for modules
Quoted 10 lines · On Wednesday 14 May 2014 10:39:31 Greg KH wrote:
Quoted 7 lines · Tony Lindgren
* Arnd Bergmann <[email protected]> [140513 08:13]:
I did not look what percentage has tristate in the
Kconfig, but that might keep some people from making loadable drivers.Greg, is the following patch something you may want to consider picking up?
Sure, is this needed to fix issues in 3.15-final, or is 3.16-rc1 ok?
I don't think anyone cares about it outside of randconfig builds, so 3.16-rc1 is ok.
Arnd
Tony Lindgren
maintainerRe: [PATCH] bus/omap_l3: avoid sync initcall for modules
Quoted 7 lines · Arnd Bergmann
Quoted 6 lines · On Wednesday 14 May 2014 10:39:31 Greg KH wrote:
Quoted 5 lines · Tony Lindgren
* Arnd Bergmann <[email protected]> [140513 08:13]:
I did not look what percentage has tristate in the
Kconfig, but that might keep some people from making loadable drivers.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Greg, is the following patch something you may want to consider picking up?
Sure, is this needed to fix issues in 3.15-final, or is 3.16-rc1 ok?
I don't think anyone cares about it outside of randconfig builds, so 3.16-rc1 is ok.
Yeah thanks.
Tony
Arnd Bergmann
maintainerPATCH 1/1 bus/arm-cci: add dependency on OF && CPU_V7
In reply to Arnd BergmannThe arm-cci code uses device tree helpers for initialization that don't work on kernels built without CONFIG_OF. Further, it contains an inline assembly in cci_enable_port_for_self() that uses ARMv7 instructions and fails to build when targetting other ARM instruction set versions.
This works around both issues by limiting the scope of the Kconfig symbol to platforms that can actually build this driver cleanly.
--- drivers/bus/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/Kconfig +1 -1
@@ -37,7 +37,7 @@ config OMAP_INTERCONNECT config ARM_CCI bool "ARM CCI driver support" - depends on ARM + depends on ARM && OF && CPU_V7 help Driver supporting the CCI cache coherent interconnect for ARM platforms.
Signature · 1 line
1.8.3.2
Re: [PATCH] bus/arm-cci: add dependency on OF && CPU_V7
Quoted 22 lines · Arnd Bergmann
The arm-cci code uses device tree helpers for initialization that don't work on kernels built without
CONFIG_OF. Further, it contains an inline assembly incci_enable_port_for_self()that uses ARMv7 instructions and fails to build when targetting other ARM instruction set versions.This works around both issues by limiting the scope of the
Kconfigsymbol to platforms that can actually build this driver cleanly.Signed-off-by Arnd Bergmann <[email protected]>Cc Shawn Guo <[email protected]>Cc Lorenzo Pieralisi <[email protected]>--- drivers/bus/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/bus/Kconfig +0
-0
drivers/bus/Kconfig config OMAP_INTERCONNECT · line 43
Quoted 8 lines
drivers/bus/Kconfig +1
-1@@ -37,7 +37,7 @@ config OMAP_INTERCONNECT config ARM_CCI bool "ARM CCI driver support" - depends on ARM + depends on ARM && OF && CPU_V7 help Driver supporting the CCI cache coherent interconnect for ARM platforms.
The dependency on CPU_V7 will need reworking, since we might want to enable the driver on arm64 platforms too (eg CCI PMUs), other than that:
Arnd Bergmann
maintainerPATCH 1/1 watchdog: iop_wdt only builds for mach-iop13xx
In reply to Arnd BergmannAll three iop variants we support in Linux (iop32x, iop33x and iop13xx) seem to have support for the watchdog hardware, but this driver fails to build for the first two of these because it uses the IOP13XX_WDTCR_IB_RESET macro that is only defined for iop13xx.
This clarifies the dependency in Kconfig to avoid randconfig build errors. It is unlikely that anyone will ever miss support for this driver on the ancient iop3xx platforms, so we don't need to bother trying to fix it properly.
--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -1
@@ -272,7 +272,7 @@ config PNX4008_WATCHDOG config IOP_WATCHDOG tristate "IOP Watchdog" - depends on PLAT_IOP + depends on ARCH_IOP13XX select WATCHDOG_NOWAYOUT if (ARCH_IOP32X || ARCH_IOP33X) help Say Y here if to include support for the watchdog timer
Signature · 1 line
1.8.3.2
Re: [PATCH] watchdog: iop_wdt only builds for mach-iop13xx
Quoted 6 lines · Arnd Bergmann
All three iop variants we support in Linux (iop32x, iop33x and iop13xx) seem to have support for the watchdog hardware, but this driver fails to build for the first two of these because it uses the
IOP13XX_WDTCR_IB_RESETmacro that is only defined for iop13xx.
Quoted 8 lines
This clarifies the dependency in
Kconfigto avoid randconfig build errors. It is unlikely that anyone will ever miss support for this driver on the ancient iop3xx platforms, so we don't need to bother trying to fix it properly.Signed-off-by Arnd Bergmann <[email protected]>Cc Wim Van Sebroeck <[email protected]>Cc linux-watchdog at vger.kernel.org
Re: [PATCH] watchdog: iop_wdt only builds for mach-iop13xx
In reply to Arnd BergmannHi Arnd,
Quoted 23 lines
All three iop variants we support in Linux (iop32x, iop33x and iop13xx) seem to have support for the watchdog hardware, but this driver fails to build for the first two of these because it uses the
IOP13XX_WDTCR_IB_RESETmacro that is only defined for iop13xx.This clarifies the dependency in
Kconfigto avoid randconfig build errors. It is unlikely that anyone will ever miss support for this driver on the ancient iop3xx platforms, so we don't need to bother trying to fix it properly.Signed-off-by Arnd Bergmann <[email protected]>Cc Wim Van Sebroeck <[email protected]>--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/Kconfig +0
-0
drivers/watchdog/Kconfig config PNX4008_WATCHDOG · line 278
Quoted 8 lines
drivers/watchdog/Kconfig +1
-1@@ -272,7 +272,7 @@ config PNX4008_WATCHDOG config IOP_WATCHDOG tristate "IOP Watchdog" - depends on PLAT_IOP + depends on ARCH_IOP13XX select WATCHDOG_NOWAYOUT if (ARCH_IOP32X || ARCH_IOP33X) help Say Y here if to include support for the watchdog timer
Patch has been added to linux-watchdog-next.
Kind regards,
Wim.
Arnd Bergmann
maintainerPATCH 1/1 mpilib: use 'static inline' for mpi-inline.h
In reply to Arnd BergmannFour functions of mpilib are defined as 'extern inline' at the moment, which is generally not the correct way to do inline functions using gcc.
While this is usually harmless, it shows up as a warning in combination with the CONFIG_PROFILE_ALL_BRANCHES, resulting in very many lines like:
/git/arm-soc/lib/mpi/mpi-inline.h:70:182: warning: '______f' is static but declared in inline function 'mpihelp_add' which is not static [enabled by default]
Using static inline makes the code behave as expected and gets rid of the warning
--- lib/mpi/mpi-inline.h | 2 +- lib/mpi/mpi-internal.h | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-)
lib/mpi/mpi-inline.h +1 -1
@@ -30,7 +30,7 @@#define G10_MPI_INLINE_H #ifndef G10_MPI_INLINE_DECL -#define G10_MPI_INLINE_DECL extern inline +#define G10_MPI_INLINE_DECL static inline#endif G10_MPI_INLINE_DECL mpi_limb_t
lib/mpi/mpi-internal.h +0 -8
@@ -168,20 +168,12 @@ void mpi_rshift_limbs(MPI a, unsigned int count);int mpi_lshift_limbs (MPI a,unsigned int count);/*-- mpihelp-add.c --*/ -mpi_limb_t mpihelp_add_1 (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr, -mpi_size_t s1_size,mpi_limb_t s2_limb);mpi_limb_t mpihelp_add_n (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_ptr_t s2_ptr,mpi_size_t size); -mpi_limb_t mpihelp_add (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_size_t s1_size, -mpi_ptr_t s2_ptr,mpi_size_t s2_size);/*-- mpihelp-sub.c --*/ -mpi_limb_t mpihelp_sub_1 (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr, -mpi_size_t s1_size,mpi_limb_t s2_limb);mpi_limb_t mpihelp_sub_n (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_ptr_t s2_ptr,mpi_size_t size); -mpi_limb_t mpihelp_sub (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_size_t s1_size, -mpi_ptr_t s2_ptr,mpi_size_t s2_size);/*-- mpihelp-cmp.c --*/ int mpihelp_cmp (mpi_ptr_t op1_ptr,mpi_ptr_t op2_ptr,mpi_size_t size);
Signature · 1 line
1.8.3.2
Re: [PATCH] mpilib: use 'static inline' for mpi-inline.h
Quoted 3 lines · On Thu, 8 May 2014 16:56:20 +0200 Arnd Bergmann <[email protected]> wrote:
Four functions of mpilib are defined as 'extern inline' at the moment, which is generally not the correct way to do inline functions using gcc.
I think clang would appreciate this too.
-- Steve
Quoted 56 lines
While this is usually harmless, it shows up as a warning in combination with the
CONFIG_PROFILE_ALL_BRANCHES, resulting in very many lines like:/git/arm-soc/lib/mpi/mpi-inline.h:70:182: warning: '
______f' is static but declared in inline function 'mpihelp_add' which is not static [enabled by default]Using static inline makes the code behave as expected and gets rid of the warning
Signed-off-by Arnd Bergmann <[email protected]>Cc Steven Rostedt <[email protected]>Cc Dmitry Kasatkin <[email protected]>--- lib/mpi/mpi-inline.h | 2 +- lib/mpi/mpi-internal.h | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-)lib/mpi/mpi-inline.h +1
-1@@ -30,7 +30,7 @@#define G10_MPI_INLINE_H #ifndef G10_MPI_INLINE_DECL -#define G10_MPI_INLINE_DECL extern inline +#define G10_MPI_INLINE_DECL static inline#endif G10_MPI_INLINE_DECL mpi_limb_tlib/mpi/mpi-internal.h +0
-8@@ -168,20 +168,12 @@ void mpi_rshift_limbs(MPI a, unsigned int count);int mpi_lshift_limbs (MPI a,unsigned int count);/*-- mpihelp-add.c --*/ -mpi_limb_t mpihelp_add_1 (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr, -mpi_size_t s1_size,mpi_limb_t s2_limb);mpi_limb_t mpihelp_add_n (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_ptr_t s2_ptr,mpi_size_t size); -mpi_limb_t mpihelp_add (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_size_t s1_size, -mpi_ptr_t s2_ptr,mpi_size_t s2_size);/*-- mpihelp-sub.c --*/ -mpi_limb_t mpihelp_sub_1 (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr, -mpi_size_t s1_size,mpi_limb_t s2_limb);mpi_limb_t mpihelp_sub_n (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_ptr_t s2_ptr,mpi_size_t size); -mpi_limb_t mpihelp_sub (mpi_ptr_t res_ptr,mpi_ptr_t s1_ptr,mpi_size_t s1_size, -mpi_ptr_t s2_ptr,mpi_size_t s2_size);/*-- mpihelp-cmp.c --*/ int mpihelp_cmp (mpi_ptr_t op1_ptr,mpi_ptr_t op2_ptr,mpi_size_t size);
Re: [PATCH] mpilib: use 'static inline' for mpi-inline.h
Quoted 7 lines · Steven Rostedt
Quoted 3 lines · On Thu, 8 May 2014 16:56:20 +0200 Arnd Bergmann <[email protected]> wrote:
Four functions of mpilib are defined as 'extern inline' at the moment, which is generally not the correct way to do inline functions using gcc.
I think clang would appreciate this too.
Indeed. Saves me writing the same patch. :)
Behan
Signature · 2 lines
Behan Webster behanw at converseincode.com
Arnd Bergmann
maintainerPATCH 1/1 ata: pata_at91 only works on sam9
In reply to Arnd BergmannThe smc driver used by pata_at91 is at91sam9 specific, so building this driver on another at91 platform results in this error:
ERROR: "sam9_smc_configure" [drivers/ata/pata_at91.ko] undefined!
ERROR: "sam9_smc_write_mode" [drivers/ata/pata_at91.ko] undefined!
ERROR: "sam9_smc_read_mode" [drivers/ata/pata_at91.ko] undefined!
This patch changes the Kconfig dependency to ensure it always works.
--- drivers/ata/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +1 -1
@@ -824,7 +824,7 @@ config PATA_AT32 config PATA_AT91 tristate "PATA support for AT91SAM9260" - depends on ARM && ARCH_AT91 + depends on ARM && SOC_AT91SAM9 help This option enables support for IDE devices on the Atmel AT91SAM9260 SoC.
Signature · 1 line
1.8.3.2
Tejun Heo
AppliedRe: [PATCH] ata: pata_at91 only works on sam9
Quoted 7 lines · Arnd Bergmann
The smc driver used by
pata_at91is at91sam9 specific, so building this driver on another at91 platform results in this error:ERROR: "
sam9_smc_configure" [drivers/ata/pata_at91.ko] undefined!
ERROR: "sam9_smc_write_mode" [drivers/ata/pata_at91.ko] undefined!
ERROR: "sam9_smc_read_mode" [drivers/ata/pata_at91.ko] undefined!
Quoted 7 lines
This patch changes the
Kconfigdependency to ensure it always works.Signed-off-by Arnd Bergmann <[email protected]>Cc Tejun Heo <[email protected]>Cc linux-ide at vger.kernel.orgCc Jean-Christophe Plagniol-Villard <[email protected]>Cc Nicolas Ferre <[email protected]>
Applied to libata/for-3.15-fixes.
Thanks.
Signature · 1 line
tejun
Arnd Bergmann
maintainerPATCH 1/1 i2c/nuc900: fix ancient build error
In reply to Arnd BergmannAs far as I can tell, this driver must have produced this error for as long as it has been merged into the mainline kernel, but it was never part of the normal build tests:
drivers/i2c/busses/i2c-nuc900.c: In function 'nuc900_i2c_probe':drivers/i2c/busses/i2c-nuc900.c:601:17: error: request for member 'apbfreq' in something not a structure or union
ret = (i2c->clk.apbfreq)/(pdata->bus_freq * 5) - 1;
^This is an attempt to get the driver to build and possibly work correctly, although I do wonder whether we should just remove it, as it has clearly never worked.
--- drivers/i2c/busses/i2c-nuc900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-nuc900.c +1 -1
@@ -598,7 +598,7 @@ static int nuc900_i2c_probe(struct platform_device *pdev)clk_get_rate (i2c->clk); - ret = (i2c->clk.apbfreq)/(pdata->bus_freq *5 ) -1 ; + ret =clk_get_rate (i2c->clk)/(pdata->bus_freq *5 ) -1 ;writel (ret &0xffff , i2c->regs +DIVIDER );/* find the IRQ for this unit (note, this relies on the init call to
Signature · 1 line
1.8.3.2
Re: [PATCH] i2c/nuc900: fix ancient build error
"[PATCH] NUC900: patch for implement clk_get_rate"
https://lkml.org/lkml/2010/6/15/147
This patch would have fixed the apbfreq not being a real struct member and would also explain why clk_get_rate is called without using it's return value in the line above what you have.
Quoted 1 line
From 2010, so it got dropped somewhere and ignored/abandoned
Re: [PATCH] i2c/nuc900: fix ancient build error
In reply to Arnd BergmannQuoted 4 lines · Arnd Bergmann
As far as I can tell, this driver must have produced this error for as long as it has been merged into the mainline kernel, but it was never part of the normal build tests:
Quoted 8 lines
drivers/i2c/busses/i2c-nuc900.c: In function 'nuc900_i2c_probe':drivers/i2c/busses/i2c-nuc900.c:601:17: error: request for member 'apbfreq' in something not a structure or unionret = (i2c->clk.apbfreq)/(pdata->bus_freq * 5) - 1; ^This is an attempt to get the driver to build and possibly work correctly, although I do wonder whether we should just remove it, as it has clearly never worked.
I'd go for removing. For this platform, the last patch which was not a generic cleanup seems to be from late 2011?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140514/0bdd9c84/attachment.sig>
Arnd Bergmann
maintainerRe: [PATCH] i2c/nuc900: fix ancient build error
Quoted 10 lines · On Wednesday 14 May 2014 18:27:25 Wolfram Sang wrote:
Quoted 9 lines · Arnd Bergmann
As far as I can tell, this driver must have produced this error for as long as it has been merged into the mainline kernel, but it was never part of the normal build tests:
drivers/i2c/busses/i2c-nuc900.c: In function 'nuc900_i2c_probe':drivers/i2c/busses/i2c-nuc900.c:601:17: error: request for member 'apbfreq' in something not a structure or unionret = (i2c->clk.apbfreq)/(pdata->bus_freq * 5) - 1; ^
Quoted 6 lines
Quoted 3 lines
This is an attempt to get the driver to build and possibly work correctly, although I do wonder whether we should just remove it, as it has clearly never worked.
I'd go for removing. For this platform, the last patch which was not a generic cleanup seems to be from late 2011?
Ah, you mean removing the entire platform? I guess we could do that as well, but I was really thinking of just removing the i2c driver.
For the moment, I'd leave this up to Wan ZongShun. He has in the past at least replied to emails about the platform, even though there hasn't been any new development.
Arnd
Re: [PATCH] i2c/nuc900: fix ancient build error
Quoted 4 lines
For the moment, I'd leave this up to Wan ZongShun. He has in the past at least replied to emails about the platform, even though there hasn't been any new development.
Agreed. Let's wait for his response. If there is none, I'll think about removing the driver.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140514/6c685e81/attachment.sig>
Re: [PATCH] i2c/nuc900: fix ancient build error
Quoted 8 lines · Wolfram Sang
Quoted 4 lines
For the moment, I'd leave this up to Wan ZongShun. He has in the past at least replied to emails about the platform, even though there hasn't been any new development.
Agreed. Let's wait for his response. If there is none, I'll think about removing the driver.
Wan ZongShun, final call before this driver gets removed next week.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140521/b4c03acf/attachment.sig>
Arnd Bergmann
maintainerPATCH 2/2 dmaengine: sa11x0: remove broken #ifdef
In reply to Arnd BergmannThe sa11x0_dma_pm_ops unconditionally reference sa11x0_dma_resume and sa11x0_dma_suspend, which currently breaks if CONFIG_PM_SLEEP is disabled.
There is probably a better way to remove the reference in this case, but the safe choice is to have the suspend/resume code always built in the driver.
--- drivers/dma/sa11x0-dma.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/dma/sa11x0-dma.c +0 -4
@@ -113,11 +113,9 @@ struct sa11x0_dma_phy {struct sa11x0_dma_desc *txd_load;unsigned sg_done;struct sa11x0_dma_desc *txd_done; -#ifdef CONFIG_PM_SLEEP u32 dbs[2 ];u32 dbt[2 ];u32 dcsr; -#endif };struct sa11x0_dma_dev {
@@ -984,7 +982,6 @@ static int sa11x0_dma_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int sa11x0_dma_suspend (struct device *dev) {struct sa11x0_dma_dev *d =dev_get_drvdata (dev);
@@ -1054,7 +1051,6 @@ static int sa11x0_dma_resume(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops sa11x0_dma_pm_ops = { .suspend_noirq = sa11x0_dma_suspend,
Signature · 1 line
1.8.3.2
Re: [PATCH 2/2] dmaengine: sa11x0: remove broken #ifdef
Quoted 7 lines · Arnd Bergmann
The
sa11x0_dma_pm_opsunconditionally referencesa11x0_dma_resumeandsa11x0_dma_suspend, which currently breaks ifCONFIG_PM_SLEEPis disabled.There is probably a better way to remove the reference in this case, but the safe choice is to have the suspend/resume code always built in the driver.
Maybe you could create a macro in pm.h for *_noirq version of suspend/resume? However, like we discussed with Vinod it's much better to use suspend_late/resume_early for DMAC device drivers, though I have no idea if it works for sa11x0.
Quoted 42 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Russell King <[email protected]>Cc dmaengine at vger.kernel.orgCc Vinod Koul <[email protected]>Cc Dan Williams <[email protected]>--- drivers/dma/sa11x0-dma.c | 4 ---- 1 file changed, 4 deletions(-)drivers/dma/sa11x0-dma.c +0
-4@@ -113,11 +113,9 @@ struct sa11x0_dma_phy {struct sa11x0_dma_desc *txd_load;unsigned sg_done;struct sa11x0_dma_desc *txd_done; -#ifdef CONFIG_PM_SLEEP u32 dbs[2 ];u32 dbt[2 ];u32 dcsr; -#endif };struct sa11x0_dma_dev {@@ -984,7 +982,6 @@ static int sa11x0_dma_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int sa11x0_dma_suspend (struct device *dev) {struct sa11x0_dma_dev *d =dev_get_drvdata (dev);@@ -1054,7 +1051,6 @@ static int sa11x0_dma_resume(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops sa11x0_dma_pm_ops = { .suspend_noirq = sa11x0_dma_suspend,
Signature · 12 lines
Andy Shevchenko <[email protected]> Intel Finland Oy --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH 2/2] dmaengine: sa11x0: remove broken #ifdef
Quoted 5 lines · Andriy
Quoted 4 lines · Arnd Bergmann
The
sa11x0_dma_pm_opsunconditionally referencesa11x0_dma_resumeandsa11x0_dma_suspend, which currently breaks ifCONFIG_PM_SLEEPis disabled.
Quoted 8 lines
Quoted 3 lines
There is probably a better way to remove the reference in this case, but the safe choice is to have the suspend/resume code always built in the driver.
Maybe you could create a macro in
pm.hfor*_noirqversion of suspend/resume? However, like we discussed with Vinod it's much better to use suspend_late/resume_early for DMAC device drivers, though I have no idea if it works for sa11x0.
It should work as the guidance is not client/controller specfic. But I think thats not the point here as the fix is not related to how suspend is implemented..
Signature · 1 line
~Vinod
Quoted 48 lines
Quoted 43 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Russell King <[email protected]>Cc dmaengine at vger.kernel.orgCc Vinod Koul <[email protected]>Cc Dan Williams <[email protected]>--- drivers/dma/sa11x0-dma.c | 4 ---- 1 file changed, 4 deletions(-)drivers/dma/sa11x0-dma.c +0
-4@@ -113,11 +113,9 @@ struct sa11x0_dma_phy {struct sa11x0_dma_desc *txd_load;unsigned sg_done;struct sa11x0_dma_desc *txd_done; -#ifdef CONFIG_PM_SLEEP u32 dbs[2 ];u32 dbt[2 ];u32 dcsr; -#endif };struct sa11x0_dma_dev {@@ -984,7 +982,6 @@ static int sa11x0_dma_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int sa11x0_dma_suspend (struct device *dev) {struct sa11x0_dma_dev *d =dev_get_drvdata (dev);@@ -1054,7 +1051,6 @@ static int sa11x0_dma_resume(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops sa11x0_dma_pm_ops = { .suspend_noirq = sa11x0_dma_suspend,Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Arnd Bergmann
maintainerPATCH 2/2 mtd: orion-nand: fix build error with ARMv4
In reply to Arnd Bergmannorion_nand_read_buf uses an inline assembly with the "ldrd" instruction, which is only available from ARMv5 upwards. This used to be fine, since all users have an ARMv5 or ARMv7 CPU, but now we can also build a multiplatform kernel with ARMv4 support enabled in addition to the "kirkwood" (mvebu) platform.
This provides an alternative to call the readsl() function that is supposed to have the same effect and is also optimized for performance.
This patch is untested, and it would be worthwhile to check if there is any performance impact, especially in case the readsl version is actually faster.
--- drivers/mtd/nand/orion_nand.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mtd/nand/orion_nand.c +5 -0
@@ -56,6 +56,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) *buf++ =readb (io_base); len--; } +#if __LINUX_ARM_ARCH__ >=5 buf64 = (uint64_t *)buf;while (i < len/8 ) {/*
@@ -68,6 +69,10 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) asmvolatile ("ldrd\t%0, [%1]" :"=&r" (x) :"r" (io_base)); buf64[i++] = x; } +#else +readsl (io_base, buf, len/8 ); + i = len /8 *8 ; +#endif i *=8 ;while (i < len) buf[i++] =readb (io_base);
Signature · 1 line
1.8.3.2
Re: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 36 lines · Arnd Bergmann
orion_nand_read_bufuses an inline assembly with the "ldrd" instruction, which is only available from ARMv5 upwards. This used to be fine, since all users have an ARMv5 or ARMv7 CPU, but now we can also build a multiplatform kernel with ARMv4 support enabled in addition to the "kirkwood" (mvebu) platform.This provides an alternative to call the
readsl()function that is supposed to have the same effect and is also optimized for performance.This patch is untested, and it would be worthwhile to check if there is any performance impact, especially in case the readsl version is actually faster.
Signed-off-by Arnd Bergmann <[email protected]>Cc David Woodhouse <[email protected]>Cc Brian Norris <[email protected]>Cc Jingoo Han <[email protected]>Cc linux-mtd at lists.infradead.org--- drivers/mtd/nand/orion_nand.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mtd/nand/orion_nand.c +1
-0@@ -56,6 +56,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) *buf++ =readb (io_base); len--; } +#if __LINUX_ARM_ARCH__ >=5 buf64 = (uint64_t *)buf;while (i < len/8 ) {/*
drivers/mtd/nand/orion_nand.c static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) · line 73
Quoted 5 lines
drivers/mtd/nand/orion_nand.c +2
-0@@ -68,6 +69,10 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) asmvolatile ("ldrd\t%0, [%1]" :"=&r" (x) :"r" (io_base)); buf64[i++] = x; } +#else +readsl (io_base, buf, len/8 );
I gave this a try in order to answer Arnd's performance question. First of all, the patch seems wrong. I guess it's because readsl reads 4-bytes pieces, instead of 8-bytes.
This patch below is tested (but not completely, see below) and works:
drivers/mtd/nand/orion_nand.c +9 -0
@@ -52,6 +52,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)uint64_t *buf64;int i =0 ; +#if __LINUX_ARM_ARCH__ >=5 while (len && (unsigned long )buf &7 ) { *buf++ =readb (io_base); len--;
@@ -69,6 +70,14 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) buf64[i++] = x; } i *=8 ; +#else +while (len && (unsigned long )buf &3 ) { + *buf++ =readb (io_base); + len--; + } +readsl (io_base, buf, len/4 ); + i = (len /4 *4 ) *4 ; +#endif while (i < len) buf[i++] =readb (io_base); }
However, all the reads are nicely aligned (in both the buffer and the length) which means the only 'read' performed in the readsl() one.
In other words, the patch is still half-untested. Therefore, and given this is meant only to coherce a build, maybe we'd rather just loop over readb and stay on the safe side?
And now, answering Arnd's question:
# Using ldrd
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 5.90s user 0m 0.22s sys 0m 5.67s
# Using readsl
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 6.39s user 0m 0.17s sys 0m 6.20s
So I'd say, let's stick to the ldrd magic.
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com
Re: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 11 lines · Ezequiel Garcia
drivers/mtd/nand/orion_nand.c +1
-0@@ -52,6 +52,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)uint64_t *buf64;int i =0 ; +#if __LINUX_ARM_ARCH__ >=5 while (len && (unsigned long )buf &7 ) { *buf++ =readb (io_base); len--;
drivers/mtd/nand/orion_nand.c static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) · line 79
Quoted 10 lines
drivers/mtd/nand/orion_nand.c +7
-0@@ -69,6 +70,14 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) buf64[i++] = x; } i *=8 ; +#else +while (len && (unsigned long )buf &3 ) { + *buf++ =readb (io_base); + len--; + } +readsl (io_base, buf, len/4 ); + i = (len /4 *4 ) *4 ;
Why multiply by 4 twice? "i" is supposed to be the number of bytes read, right?
BTW, Arnd's version should just need s/8/4/g to make it work.
drivers/mtd/nand/orion_nand.c static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) · line 83
Quoted 4 lines
drivers/mtd/nand/orion_nand.c +1
-0+#endif while (i < len) buf[i++] =readb (io_base); }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Arnd Bergmann
maintainerRe: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
In reply to Ezequiel GarciaQuoted 3 lines · On Friday 09 May 2014 15:45:05 Ezequiel Garcia wrote:
On 08 May 04:56 PM, Arnd Bergmann wrote:
I gave this a try in order to answer Arnd's performance question.
Thanks a lot for testing!
Quoted 3 lines
First of all,
the patch seems wrong. I guess it's because readsl reads 4-bytes pieces, instead of 8-bytes.
Oops. I guess I was thinking of a 64-bit system and didn't even notice the difference between 4 and 8 byte accesses here. I wonder where I have my mind sometimes.
Quoted 3 lines
In other words, the patch is still half-untested. Therefore, and given this is meant only to coherce a build, maybe we'd rather just loop over readb and stay on the safe side?
I guess that would be equal to calling memcpy_fromio().
Quoted 8 lines
And now, answering Arnd's question:
# Using ldrd
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 5.90s user 0m 0.22s sys 0m 5.67s
Quoted 7 lines
# Using readsl
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 6.39s user 0m 0.17s sys 0m 6.20sSo I'd say, let's stick to the ldrd magic.
Ok, that is a noticeable difference. For scale, what is the size of that partition? If this is something that actually affects people, it might be worth also trying memcpy(), which should be better at saturating the bus, but might be wrong here (if alignment the alignment requirements on the external bus are stricter than what memcpy does) or it might not make a difference at all if the code is already ideal.
Arnd
Re: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
In reply to Ezequiel GarciaQuoted 5 lines · Ezequiel Garcia
I gave this a try in order to answer Arnd's performance question. First of all, the patch seems wrong. I guess it's because readsl reads 4-bytes pieces, instead of 8-bytes.
This patch below is tested (but not completely, see below) and works:
Compilers are better now, I think you can just ditch the weirdness:
uint64_t *from;uint64_t *to;
void foo()
{
for (unsigned int I = 0; I != 1000; I++)
*to++ = *from;
}Using even gcc 4.6.3 gives good code:
(v6)
.L2:
ldrd r2, [ip]
strd r2, [r1], #8
cmp r1, r0(v4)
.L2:
ldmia ip, {r0-r1}
stmia r3!, {r0-r1}
cmp r3, r2For correctness this v4 version does require that the cpu executes the ldmia reads in increasing address order, and never in any other order. AFAIK the periphal is just a simple fifo that basically ignores the address.
memcpy_fromio is not as good since it will never align if the buffer is unaligned, while this version does.
The below gives:
c8: ea000002 b d8 <orion_nand_read_buf+0x84> cc: e5dc0000 ldrb r0, [ip] d0: e7c30001 strb r0, [r3, r1] d4: e2811001 add r1, r1, #1 d8: e1510002 cmp r1, r2
Which looks the same as the asm version to me.
drivers/mtd/nand/orion_nand.c +6 -9
@@ -95,16 +95,13 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) } buf64 = (uint64_t *)buf;while (i < len/8 ) { -/* -* Since GCC has no proper constraint (PR 43518) -* force x variable to r2/r3 registers as ldrd instruction -* requires first register to be even. -*/ - registeruint64_t x asm ("r2" ); - - asmvolatile ("ldrd\t%0, [%1]" :"=&r" (x) :"r" (io_base)); - buf64[i++] = x; +#ifdef CONFIG_64BIT + buf64[i++] =readq_relaxed (io_base); +#else + buf64[i++] = *(const volatile u64 __force *)io_base; +#endif } + i *=8 ;while (i < len) buf[i++] =readb (io_base);
Re: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 9 lines · Jason Gunthorpe
Quoted 6 lines
I gave this a try in order to answer Arnd's performance question. First of all, the patch seems wrong. I guess it's because readsl reads 4-bytes pieces, instead of 8-bytes.
This patch below is tested (but not completely, see below) and works:
Compilers are better now, I think you can just ditch the weirdness:
[..]
Quoted 11 lines
The below gives:
c8: ea000002 b d8 <orion_nand_read_buf+0x84> cc: e5dc0000 ldrb r0, [ip] d0: e7c30001 strb r0, [r3, r1] d4: e2811001 add r1, r1, #1 d8: e1510002 cmp r1, r2Which looks the same as the asm version to me.
Nice! It wasn't really needed but since I have the board here:
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 5.82s user 0m 0.20s sys 0m 5.60s
Jason: Care to submit a proper patch?
Quoted 1 line · Arnd Bergmann
Ok, that is a noticeable difference. For scale, what is the size of that partition?
The board is Openblocks A6, running mainline.
# cat /proc/mtd dev: size erasesize name mtd0: 00090000 00004000 "uboot" mtd1: 00044000 00004000 "env" mtd2: 00024000 00004000 "test" mtd3: 00400000 00004000 "conf" mtd4: 01d20000 00004000 "linux" mtd5: 01dec000 00004000 "user"
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com
Arnd Bergmann
maintainerRe: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 12 lines · On Friday 09 May 2014 19:09:15 Ezequiel Garcia wrote:
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 5.82s user 0m 0.20s sys 0m 5.60sJason: Care to submit a proper patch?
Quoted 1 line · Arnd Bergmann
Ok, that is a noticeable difference. For scale, what is the size of that partition?
The board is Openblocks A6, running mainline.
Quoted 8 lines
# cat /proc/mtd dev: size erasesize name mtd0: 00090000 00004000 "uboot" mtd1: 00044000 00004000 "env" mtd2: 00024000 00004000 "test" mtd3: 00400000 00004000 "conf" mtd4: 01d20000 00004000 "linux" mtd5: 01dec000 00004000 "user"
Ok, so it takes 5.6 seconds in kernel mode to access 31MB, which comes down to 5.60MB/s. That isn't very fast compared to the time the CPU should take for those instructions, so I'm surprised it actually makes any difference at all.
There isn't a usable slave DMA engine in Armada XP by chance?
Arnd
Re: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 22 lines · Arnd Bergmann
Quoted 12 lines · On Friday 09 May 2014 19:09:15 Ezequiel Garcia wrote:
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 5.82s user 0m 0.20s sys 0m 5.60sJason: Care to submit a proper patch?
Quoted 1 line · Arnd Bergmann
Ok, that is a noticeable difference. For scale, what is the size of that partition?
The board is Openblocks A6, running mainline.
Quoted 8 lines
# cat /proc/mtd dev: size erasesize name mtd0: 00090000 00004000 "uboot" mtd1: 00044000 00004000 "env" mtd2: 00024000 00004000 "test" mtd3: 00400000 00004000 "conf" mtd4: 01d20000 00004000 "linux" mtd5: 01dec000 00004000 "user"
Quoted 7 lines
Ok, so it takes 5.6 seconds in kernel mode to access 31MB, which comes down to 5.60MB/s. That isn't very fast compared to the time the CPU should take for those instructions, so I'm surprised it actually makes any difference at all.
There isn't a usable slave DMA engine in Armada XP by chance?
The Openblocks A6 is a Kirkwood, not Armada XP.
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com
Re: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
In reply to Ezequiel GarciaQuoted 23 lines · Ezequiel Garcia
Quoted 9 lines · Jason Gunthorpe
Quoted 6 lines
I gave this a try in order to answer Arnd's performance question. First of all, the patch seems wrong. I guess it's because readsl reads 4-bytes pieces, instead of 8-bytes.
This patch below is tested (but not completely, see below) and works:
Compilers are better now, I think you can just ditch the weirdness:
[..]
Quoted 11 lines
The below gives:
c8: ea000002 b d8 <orion_nand_read_buf+0x84> cc: e5dc0000 ldrb r0, [ip] d0: e7c30001 strb r0, [r3, r1] d4: e2811001 add r1, r1, #1 d8: e1510002 cmp r1, r2Which looks the same as the asm version to me.
Quoted 8 lines
Nice! It wasn't really needed but since I have the board here:
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 5.82s user 0m 0.20s sys 0m 5.60sJason: Care to submit a proper patch?
Sure, but did anyone (Arnd?) have thoughts on a better way to do this:
+#ifdef CONFIG_64BIT
+ buf64[i++] = readq_relaxed(io_base);
+#else
+ buf64[i++] = *(const volatile u64 __force *)io_base;
+#endif
IMHO, readq should exist on any platform that can issue a 64 bit bus transaction, and I expect many ARM's qualify.
Quoted 6 lines · Arnd Bergmann
Ok, so it takes 5.6 seconds in kernel mode to access 31MB, which comes down to 5.60MB/s. That isn't very fast compared to the time the CPU should take for those instructions, so I'm surprised it actually makes any difference at all.
Likely, what is happening is that the bus interface is holding off returning the read data until it complets the bus cycles, then the response travels to the CPU which turns around another.
This creates a dead time where the bus isn't do anything.
The larger bus transfer the CPU can do the less percentage of time the turnaround takes as overhead.
If the cpu could pipeline two reads then it could be highest-possible, but I guess the memory ordering for the mapping prevents that??
Regarding DMA, who knows if the interface can handle a burst transfer..
Jason
Arnd Bergmann
maintainerRe: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 41 lines · On Tuesday 13 May 2014 14:55:48 Jason Gunthorpe wrote:
Quoted 23 lines · Ezequiel Garcia
Quoted 9 lines · Jason Gunthorpe
Quoted 6 lines
I gave this a try in order to answer Arnd's performance question. First of all, the patch seems wrong. I guess it's because readsl reads 4-bytes pieces, instead of 8-bytes.
This patch below is tested (but not completely, see below) and works:
Compilers are better now, I think you can just ditch the weirdness:
[..]
Quoted 11 lines
The below gives:
c8: ea000002 b d8 <orion_nand_read_buf+0x84> cc: e5dc0000 ldrb r0, [ip] d0: e7c30001 strb r0, [r3, r1] d4: e2811001 add r1, r1, #1 d8: e1510002 cmp r1, r2Which looks the same as the asm version to me.
Quoted 8 lines
Nice! It wasn't really needed but since I have the board here:
# time nanddump /dev/mtd5 -f /dev/null -q real 0m 5.82s user 0m 0.20s sys 0m 5.60sJason: Care to submit a proper patch?
Sure, but did anyone (Arnd?) have thoughts on a better way to do this:
drivers/mtd/nand/orion_nand.c +5
-0+#ifdef CONFIG_64BIT + buf64[i++] =readq_relaxed (io_base); +#else + buf64[i++] = *(const volatile u64 __force *)io_base; +#endif
Quoted 2 lines
IMHO, readq should exist on any platform that can issue a 64 bit bus transaction, and I expect many ARM's qualify.
Well, the original problem happened specifically for the case that doesn't have a 64-bit bus transaction (building for ARMv4). If we define readq_relaxed, it has to be an inline assembly, in order to work for drivers that require an atomic transaction, so that would have the same problem. We are a bit inconsistent here though: most 32-bit architectures have no readq, parisc has one that does two 32-bit accesses, sh relies on the compiler, and tile apparently has a native instruction.
It seems reasonable to replace the inline assembly in this driver with a new function as a cleanup, but then how do you want to solve the case of building a combined armv4/v5 kernel?
Arnd
Re: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 19 lines · Arnd Bergmann
Quoted 10 lines
Sure, but did anyone (Arnd?) have thoughts on a better way to do this:
drivers/mtd/nand/orion_nand.c +5
-0+#ifdef CONFIG_64BIT + buf64[i++] =readq_relaxed (io_base); +#else + buf64[i++] = *(const volatile u64 __force *)io_base; +#endif IMHO, readq should exist on any platform that can issue a 64 bit bus transaction, and I expect many ARM's qualify.
Well, the original problem happened specifically for the case that doesn't have a 64-bit bus transaction (building for ARMv4). If we define
readq_relaxed, it has to be an inline assembly, in order to work for drivers that require an atomic transaction, so that would have the same problem. We are a bit inconsistent here though: most 32-bit architectures have no readq, parisc has one that does two 32-bit accesses, sh relies on the compiler, and tile apparently has a native instruction.
Quoted 3 lines
It seems reasonable to replace the inline assembly in this driver with a new function as a cleanup, but then how do you want to solve the case of building a combined armv4/v5 kernel?
Provide two helper functions, one for v4, one for v5, and call them through a function pointer that's set up during driver probe?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Arnd Bergmann
maintainerRe: [PATCH 2/2] mtd: orion-nand: fix build error with ARMv4
Quoted 20 lines · On Wednesday 14 May 2014 14:35:28 Geert Uytterhoeven wrote:
Quoted 19 lines · Arnd Bergmann
Quoted 10 lines
Sure, but did anyone (Arnd?) have thoughts on a better way to do this:
drivers/mtd/nand/orion_nand.c +5
-0+#ifdef CONFIG_64BIT + buf64[i++] =readq_relaxed (io_base); +#else + buf64[i++] = *(const volatile u64 __force *)io_base; +#endif IMHO, readq should exist on any platform that can issue a 64 bit bus transaction, and I expect many ARM's qualify.
Well, the original problem happened specifically for the case that doesn't have a 64-bit bus transaction (building for ARMv4). If we define
readq_relaxed, it has to be an inline assembly, in order to work for drivers that require an atomic transaction, so that would have the same problem. We are a bit inconsistent here though: most 32-bit architectures have no readq, parisc has one that does two 32-bit accesses, sh relies on the compiler, and tile apparently has a native instruction.
Quoted 6 lines
Quoted 3 lines
It seems reasonable to replace the inline assembly in this driver with a new function as a cleanup, but then how do you want to solve the case of building a combined armv4/v5 kernel?
Provide two helper functions, one for v4, one for v5, and call them through a function pointer that's set up during driver probe?
No, that won't help. It's a compile-time problem only: This driver is never actually used on ARMv4, but if we build a kernel that supports both ARMv4 and later, gcc passes -march=armv4 to the assembler, which barfs on an invalid instruction. It would be fine to make that error message just go away because we know it will only be used on CPUs that do have this instruction.
Arnd
Arnd Bergmann
maintainerPATCH 1/1 pci: rcar host needs OF
In reply to Arnd BergmannThe pci-rcar driver is enabled for compile tests, and this has now shown that the driver cannot build without CONFIG_OF, following the inclusion of f8f2fe7355fb "PCI: rcar: Use new OF interrupt mapping when possible":
drivers/built-in.o: In function `rcar_pci_map_irq':
:(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'
--- drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/Kconfig +1 -1
@@ -27,7 +27,7 @@ config PCI_TEGRA config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) help Say Y here if you want internal PCI support on R-Car Gen2 SoC. There are 3 internal PCI controllers available with a single
Signature · 1 line
1.8.3.2
Re: [PATCH] pci: rcar host needs OF
Quoted 23 lines · Arnd Bergmann
The pci-rcar driver is enabled for compile tests, and this has now shown that the driver cannot build without
CONFIG_OF, following the inclusion off8f2fe7355fb"PCI: rcar: Use new OF interrupt mapping when possible":
drivers/built-in.o: In function `rcar_pci_map_irq':
:(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'Signed-off-by Arnd Bergmann <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-pci at vger.kernel.orgCc linux-sh at vger.kernel.org--- drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/host/Kconfig +0
-0
drivers/pci/host/Kconfig config PCI_TEGRA · line 33
Quoted 8 lines
drivers/pci/host/Kconfig +1
-1@@ -27,7 +27,7 @@ config PCI_TEGRA config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) help Say Y here if you want internal PCI support on R-Car Gen2 SoC. There are 3 internal PCI controllers available with a single
This driver /should/ be able to be built for just the platform case so it sounds like f8f2fe7355fb stopped this but no-one has yet to notice.
Signature · 2 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius
Re: [PATCH] pci: rcar host needs OF
Quoted 25 lines · Ben Dooks
Quoted 24 lines · Arnd Bergmann
The pci-rcar driver is enabled for compile tests, and this has now shown that the driver cannot build without
CONFIG_OF, following the inclusion off8f2fe7355fb"PCI: rcar: Use new OF interrupt mapping when possible":
drivers/built-in.o: In function `rcar_pci_map_irq':
:(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'Signed-off-by Arnd Bergmann <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-pci at vger.kernel.orgCc linux-sh at vger.kernel.org--- drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/host/Kconfig +0
-0@@ -27,7 +27,7 @@ config PCI_TEGRA
Quoted 12 lines
drivers/pci/host/Kconfig config PCI_TEGRA · line 33
Quoted 8 lines
drivers/pci/host/Kconfig +1
-1config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) help Say Y here if you want internal PCI support on R-Car Gen2 SoC. There are 3 internal PCI controllers available with a singleThis driver /should/ be able to be built for just the platform case so it sounds like
f8f2fe7355fbstopped this but no-one has yet to notice.
You mean include/linux/of_pci.h should provide a dummy version of of_irq_parse_and_map_pci() returning 0 in case OF=n?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Arnd Bergmann
maintainerRe: [PATCH] pci: rcar host needs OF
Quoted 39 lines · On Thursday 08 May 2014 17:16:32 Geert Uytterhoeven wrote:
Quoted 25 lines · Ben Dooks
Quoted 24 lines · Arnd Bergmann
The pci-rcar driver is enabled for compile tests, and this has now shown that the driver cannot build without
CONFIG_OF, following the inclusion off8f2fe7355fb"PCI: rcar: Use new OF interrupt mapping when possible":
drivers/built-in.o: In function `rcar_pci_map_irq':
:(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'Signed-off-by Arnd Bergmann <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-pci at vger.kernel.orgCc linux-sh at vger.kernel.org--- drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/host/Kconfig +0
-0@@ -27,7 +27,7 @@ config PCI_TEGRAQuoted 12 lines
drivers/pci/host/Kconfig config PCI_TEGRA · line 33
Quoted 8 lines
drivers/pci/host/Kconfig +1
-1config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) help Say Y here if you want internal PCI support on R-Car Gen2 SoC. There are 3 internal PCI controllers available with a singleThis driver /should/ be able to be built for just the platform case so it sounds like
f8f2fe7355fbstopped this but no-one has yet to notice.
Quoted 2 lines
You mean
include/linux/of_pci.hshould provide a dummy version ofof_irq_parse_and_map_pci()returning 0 in case OF=n?
Good idea, I'll give this patch some testing in the randconfig builder, replacing the one above.
Arnd
include/linux/of_pci.h +3 -1
@@ -7,7 +7,6 @@struct pci_dev ;struct of_phandle_args ;int of_irq_parse_pci (const struct pci_dev *pdev,struct of_phandle_args *out_irq); -int of_irq_parse_and_map_pci (const struct pci_dev *dev,u8 slot,u8 pin);struct device_node ; struct device_node *of_pci_find_child_device(struct device_node *parent,
@@ -19,11 +18,14 @@ int of_pci_parse_bus_range(struct device_node *node, struct resource *res);int of_pci_msi_chip_add (struct msi_chip *chip);void of_pci_msi_chip_remove (struct msi_chip *chip);struct msi_chip *of_pci_find_msi_chip_by_node (struct device_node *of_node); +int of_irq_parse_and_map_pci (const struct pci_dev *dev,u8 slot,u8 pin);#else static inline int of_pci_msi_chip_add (struct msi_chip *chip) {return -EINVAL ; }static inline void of_pci_msi_chip_remove (struct msi_chip *chip) { }static inline struct msi_chip *of_pci_find_msi_chip_by_node (struct device_node *of_node) {return NULL ; } +static inline int +of_irq_parse_and_map_pci (const struct pci_dev *dev,u8 slot,u8 pin) {return 0 ; }#endif #endif
Arnd Bergmann
maintainerRe: [PATCH] pci: rcar host needs OF
Quoted 17 lines · On Thursday 08 May 2014 17:21:54 Arnd Bergmann wrote:
Quoted 16 lines · On Thursday 08 May 2014 17:16:32 Geert Uytterhoeven wrote:
Quoted 14 lines · Ben Dooks
Review config PCI_TEGRA · line 33
Quoted 10 lines
(quoted diff) +1
-1@@ -27,7 +27,7 @@ config PCI_TEGRA config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) help Say Y here if you want internal PCI support on R-Car Gen2 SoC. There are 3 internal PCI controllers available with a singleThis driver /should/ be able to be built for just the platform case so it sounds like
f8f2fe7355fbstopped this but no-one has yet to notice.
Quoted 5 lines
Quoted 2 lines
You mean
include/linux/of_pci.hshould provide a dummy version ofof_irq_parse_and_map_pci()returning 0 in case OF=n?Good idea, I'll give this patch some testing in the randconfig builder, replacing the one above.
The first version was flawed, I submitted a new patch "[PATCH] of/irq:
provide int of_irq_parse_and_map_pci wrapper" now.
Arnd
Bjorn Helgaas
maintainerRe: [PATCH] pci: rcar host needs OF
In reply to Arnd BergmannQuoted 5 lines · Arnd Bergmann
The pci-rcar driver is enabled for compile tests, and this has now shown that the driver cannot build without
CONFIG_OF, following the inclusion off8f2fe7355fb"PCI: rcar: Use new OF interrupt mapping when possible":
Quoted 8 lines
drivers/built-in.o: In function `rcar_pci_map_irq':
:(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'Signed-off-by Arnd Bergmann <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-pci at vger.kernel.orgCc linux-sh at vger.kernel.org
If I understand correctly, this patch was superceded by this one:
"[PATCH] of/irq: provide int of_irq_parse_and_map_pci wrapper"
and you aren't expecting me to do anything. Let me know if otherwise.
Quoted 20 lines
--- drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/host/Kconfig +1
-1@@ -27,7 +27,7 @@ config PCI_TEGRA config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) help Say Y here if you want internal PCI support on R-Car Gen2 SoC. There are 3 internal PCI controllers available with a singleSignature · 1 line
1.8.3.2
Re: [PATCH] pci: rcar host needs OF
Quoted 15 lines · Bjorn Helgaas
Quoted 5 lines · Arnd Bergmann
The pci-rcar driver is enabled for compile tests, and this has now shown that the driver cannot build without
CONFIG_OF, following the inclusion off8f2fe7355fb"PCI: rcar: Use new OF interrupt mapping when possible":Quoted 8 lines
drivers/built-in.o: In function `rcar_pci_map_irq':
:(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'Signed-off-by Arnd Bergmann <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-pci at vger.kernel.orgCc linux-sh at vger.kernel.org
Quoted 5 lines
If I understand correctly, this patch was superceded by this one:
"[PATCH] of/irq: provide int
of_irq_parse_and_map_pciwrapper"and you aren't expecting me to do anything. Let me know if otherwise.
Yes, right. I checked that the build error was resolved by the above mentioned patch.
Best regards,
Jingoo Han
Quoted 21 lines
Quoted 21 lines
--- drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/host/Kconfig +1
-2@@ -27,7 +27,7 @@ config PCI_TEGRA config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) help Say Y here if you want internal PCI support on R-Car Gen2 SoC. There are 3 internal PCI controllers available with a single --1.8.3.2
Arnd Bergmann
maintainerPATCH 2/2 iio:adc: at91 requires the input subsystem
In reply to Arnd BergmannBuilding the at91 adc driver with CONFIG_INPUT disabled results in this build error:
ERROR: "input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!
To make sure we can build random configurations, this turns on CONFIG_INPUT whenever CONFIG_AT91_ADC is enabled.
--- drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/iio/adc/Kconfig +1 -0
@@ -110,6 +110,7 @@ config AD799X config AT91_ADC tristate "Atmel AT91 ADC" depends on ARCH_AT91 + depends on INPUT select IIO_BUFFER select IIO_TRIGGERED_BUFFER select SYSFS
Signature · 1 line
1.8.3.2
Re: [PATCH 2/2] iio:adc: at91 requires the input subsystem
Hi,
Quoted 10 lines · Arnd Bergmann
Building the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!
Quoted 3 lines
To make sure we can build random configurations, this turns on
CONFIG_INPUTwheneverCONFIG_AT91_ADCis enabled.
I'm wondering wether we should make part of the driver compile only if CONFIG_INPUT is defined. Maybe some user will want to use the ADC and not have any input on their board.
What do you think ?
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Re: [PATCH 2/2] iio:adc: at91 requires the input subsystem
Quoted 17 lines · Alexandre Belloni
Hi,
Quoted 10 lines · Arnd Bergmann
Building the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!Quoted 3 lines
To make sure we can build random configurations, this turns on
CONFIG_INPUTwheneverCONFIG_AT91_ADCis enabled.
Quoted 6 lines
I'm wondering wether we should make part of the driver compile only if
CONFIG_INPUTis defined. Maybe some user will want to use the ADC and not have any input on their board.What do you think ?
This typically just leads to more build errors. E.g. if INPUT is defined as a module, but AT91_ADC is build in. I think it is very rare to see a configuration without INPUT set, other then a randconfig.
- Lars
Re: [PATCH 2/2] iio:adc: at91 requires the input subsystem
In reply to Arnd BergmannOn 08/05/2014 16:56, Arnd Bergmann :
Quoted 10 lines
Building the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!
Quoted 2 lines
To make sure we can build random configurations, this turns on
CONFIG_INPUTwheneverCONFIG_AT91_ADCis enabled.
Isn't it a "select" instead of "depends" that is required then?
Quoted 22 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-iio at vger.kernel.orgCc Josh Wu <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Maxime Ripard <[email protected]>--- drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/iio/adc/Kconfig +1
-0@@ -110,6 +110,7 @@ config AD799X config AT91_ADC tristate "Atmel AT91 ADC" depends on ARCH_AT91 + depends on INPUT select IIO_BUFFER select IIO_TRIGGERED_BUFFER select SYSFS
Signature · 1 line
Nicolas Ferre
Arnd Bergmann
maintainerPATCH v2 2/2 iio:adc: at91 requires the input subsystem
Quoted 11 lines · On Friday 09 May 2014 12:01:48 Nicolas Ferre wrote:
On 08/05/2014 16:56, Arnd Bergmann :
Quoted 10 lines
Building the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!
Quoted 4 lines
Quoted 2 lines
To make sure we can build random configurations, this turns on
CONFIG_INPUTwheneverCONFIG_AT91_ADCis enabled.Isn't it a "select" instead of "depends" that is required then?
It seems I fixed the patch at some point but didn't update the message.
In general, we should not mix 'depends on' and 'select' for the same symbol, since that causes extra confusion.
In case of CONFIG_INPUT, almost all the users do 'depends on INPUT', with a few exceptions that seem to be done in error.
Updated patch below.
Arnd
8<----
Quoted 1 line
From
4679d63b24a681d9c6afcfdde266bae0f940e90bMon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Wed, 9 Apr 2014 17:18:10 +0200
Subject: [PATCH] [SUBMITTED] iio:adc: at91 requires the input subsystem
Building the at91 adc driver with CONFIG_INPUT disabled results in this build error:
ERROR: "input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!
To make sure we can build random configurations, this adds a Kconfig dependency on CONFIG_INPUT, as we do for other similar drivers.
drivers/iio/adc/Kconfig +1 -0
@@ -110,6 +110,7 @@ config AD799X config AT91_ADC tristate "Atmel AT91 ADC" depends on ARCH_AT91 + depends on INPUT select IIO_BUFFER select IIO_TRIGGERED_BUFFER select SYSFS
Re: [PATCH v2 2/2] iio:adc: at91 requires the input subsystem
On 09/05/2014 13:43, Arnd Bergmann :
Quoted 17 lines · On Friday 09 May 2014 12:01:48 Nicolas Ferre wrote:
Quoted 11 lines
On 08/05/2014 16:56, Arnd Bergmann :
Quoted 10 lines
Building the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!Quoted 4 lines
Quoted 2 lines
To make sure we can build random configurations, this turns on
CONFIG_INPUTwheneverCONFIG_AT91_ADCis enabled.Isn't it a "select" instead of "depends" that is required then?
Quoted 7 lines
It seems I fixed the patch at some point but didn't update the message.
In general, we should not mix 'depends on' and 'select' for the same symbol, since that causes extra confusion.
In case of
CONFIG_INPUT, almost all the users do 'depends on INPUT', with a few exceptions that seem to be done in error.
Ok, that makes sense.
Quoted 1 line
Updated patch below.
Thanks Arnd.
Quoted 19 lines
Arnd
8<----
Quoted 1 line
From
4679d63b24a681d9c6afcfdde266bae0f940e90bMon Sep 17 00:00:00 2001From: Arnd Bergmann <[email protected]>
Date: Wed, 9 Apr 2014 17:18:10 +0200
Subject: [PATCH] [SUBMITTED] iio:adc: at91 requires the input subsystemBuilding the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!
Quoted 8 lines
To make sure we can build random configurations, this adds a
Kconfigdependency onCONFIG_INPUT, as we do for other similar drivers.Signed-off-by Arnd Bergmann <[email protected]>Cc linux-iio at vger.kernel.orgCc Josh Wu <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Maxime Ripard <[email protected]>
Bye,
Quoted 16 lines
drivers/iio/adc/Kconfig +1
-0@@ -110,6 +110,7 @@ config AD799X config AT91_ADC tristate "Atmel AT91 ADC" depends on ARCH_AT91 + depends on INPUT select IIO_BUFFER select IIO_TRIGGERED_BUFFER select SYSFS
Signature · 1 line
Nicolas Ferre
Re: [PATCH v2 2/2] iio:adc: at91 requires the input subsystem
Quoted 55 lines · Nicolas Ferre
On 09/05/2014 13:43, Arnd Bergmann :
Quoted 17 lines · On Friday 09 May 2014 12:01:48 Nicolas Ferre wrote:
Quoted 11 lines
On 08/05/2014 16:56, Arnd Bergmann :
Quoted 10 lines
Building the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!Quoted 4 lines
Quoted 2 lines
To make sure we can build random configurations, this turns on
CONFIG_INPUTwheneverCONFIG_AT91_ADCis enabled.Isn't it a "select" instead of "depends" that is required then?
Quoted 7 lines
It seems I fixed the patch at some point but didn't update the message.
In general, we should not mix 'depends on' and 'select' for the same symbol, since that causes extra confusion.
In case of
CONFIG_INPUT, almost all the users do 'depends on INPUT', with a few exceptions that seem to be done in error.Ok, that makes sense.
Quoted 1 line
Updated patch below.
Thanks Arnd.
Quoted 22 lines
Arnd
8<----
Quoted 1 line
From
4679d63b24a681d9c6afcfdde266bae0f940e90bMon Sep 17 00:00:00 2001From: Arnd Bergmann <[email protected]>
Date: Wed, 9 Apr 2014 17:18:10 +0200
Subject: [PATCH] [SUBMITTED] iio:adc: at91 requires the input subsystemBuilding the at91 adc driver with
CONFIG_INPUTdisabled results in this build error:ERROR: "
input_event" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined!
ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined!To make sure we can build random configurations, this adds a
Kconfigdependency onCONFIG_INPUT, as we do for other similar drivers.
Quoted 9 lines
Quoted 5 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Josh Wu <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Maxime Ripard <[email protected]>Acked-by Nicolas Ferre <[email protected]>
Applied to the togreg branch of iio.git. Thanks,
Jonathan
Quoted 20 lines
Bye,
Quoted 16 lines
drivers/iio/adc/Kconfig +1
-0@@ -110,6 +110,7 @@ config AD799X config AT91_ADC tristate "Atmel AT91 ADC" depends on ARCH_AT91 + depends on INPUT select IIO_BUFFER select IIO_TRIGGERED_BUFFER select SYSFS
Arnd Bergmann
maintainerPATCH 2/2 input: atmel-wm97xx: only build for AVR32
In reply to Arnd BergmannBuilding this driver on ARM/at91 always gives us this error message:
drivers/input/touchscreen/atmel-wm97xx.c:63:2: error: #error Unknown CPU, this driver only supports AT32AP700X CPUs.
Clearly this configuration is not meant to work, so let's just prevent it in Kconfig. If we ever want to use it on another platform, we should also pass proper resources for GPIO, IRQ and memory, which are hardcoded to AT32AP700X at the moment.
--- drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/Kconfig +1 -1
@@ -640,7 +640,7 @@ config TOUCHSCREEN_WM9713 config TOUCHSCREEN_WM97XX_ATMEL tristate "WM97xx Atmel accelerated touch" - depends on TOUCHSCREEN_WM97XX && (AVR32 || ARCH_AT91) + depends on TOUCHSCREEN_WM97XX && AVR32 help Say Y here for support for streaming mode with WM97xx touchscreens on Atmel AT91 or AVR32 systems with an AC97C module.
Signature · 1 line
1.8.3.2
Re: [PATCH 2/2] input: atmel-wm97xx: only build for AVR32
On 08/05/2014 16:56, Arnd Bergmann :
Quoted 8 lines
Building this driver on ARM/at91 always gives us this error message:
drivers/input/touchscreen/atmel-wm97xx.c:63:2: error: #error Unknown CPU, this driver only supports AT32AP700X CPUs.Clearly this configuration is not meant to work, so let's just prevent it in
Kconfig. If we ever want to use it on another platform, we should also pass proper resources for GPIO, IRQ and memory, which are hardcoded to AT32AP700X at the moment.
Yes it seems so:
Quoted 23 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Mark Brown <[email protected]>Cc Liam Girdwood <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc linux-input at vger.kernel.org--- drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/touchscreen/Kconfig +1
-1@@ -640,7 +640,7 @@ config TOUCHSCREEN_WM9713 config TOUCHSCREEN_WM97XX_ATMEL tristate "WM97xx Atmel accelerated touch" - depends on TOUCHSCREEN_WM97XX && (AVR32 || ARCH_AT91) + depends on TOUCHSCREEN_WM97XX && AVR32 help Say Y here for support for streaming mode with WM97xx touchscreens on Atmel AT91 or AVR32 systems with an AC97C module.
Signature · 1 line
Nicolas Ferre
Arnd Bergmann
maintainerPATCH 1/1 misc: atmel_pwm: only build for supported platforms
In reply to Arnd BergmannThere is architecture code in mach-at91 that depends on the CONFIG_ATMEL_PWM symbol in order to call the soc-specific at91_add_device_pwm function. While all of this is about code that will be removed in the future, using DT probing and the PWM framework, we currently get a build failure:
arch/arm/mach-at91/built-in.o: In function `at91_pwm_leds':arch/arm/mach-at91/leds.c:88: undefined reference to `at91_add_device_pwm'
This patch ensures we only try to build this driver on platforms on which it will build and work.
--- drivers/misc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/misc/Kconfig +2 -1
@@ -53,7 +53,8 @@ config AD525X_DPOT_SPI config ATMEL_PWM tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45 help This option enables device driver support for the PWM channels on certain Atmel processors. Pulse Width Modulation is used for
Signature · 1 line
1.8.3.2
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
On 08/05/2014 16:56, Arnd Bergmann :
Quoted 6 lines
There is architecture code in mach-at91 that depends on the
CONFIG_ATMEL_PWMsymbol in order to call the soc-specificat91_add_device_pwmfunction. While all of this is about code that will be removed in the future, using DT probing and the PWM framework, we currently get a build failure:
Quoted 8 lines
arch/arm/mach-at91/built-in.o: In function `at91_pwm_leds':arch/arm/mach-at91/leds.c:88: undefined reference to `at91_add_device_pwm'This patch ensures we only try to build this driver on platforms on which it will build and work.
Signed-off-by Arnd Bergmann <[email protected]>Cc Greg Kroah-Hartman <[email protected]>
Thanks,
Quoted 19 lines
--- drivers/misc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/misc/Kconfig +2
-1@@ -53,7 +53,8 @@ config AD525X_DPOT_SPI config ATMEL_PWM tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45 help This option enables device driver support for the PWM channels on certain Atmel processors. Pulse Width Modulation is used for
Signature · 1 line
Nicolas Ferre
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
Quoted 10 lines · Nicolas Ferre
On 08/05/2014 16:56, Arnd Bergmann :
Quoted 9 lines
There is architecture code in mach-at91 that depends on the
CONFIG_ATMEL_PWMsymbol in order to call the soc-specificat91_add_device_pwmfunction. While all of this is about code that will be removed in the future, using DT probing and the PWM framework, we currently get a build failure:
arch/arm/mach-at91/built-in.o: In function `at91_pwm_leds':arch/arm/mach-at91/leds.c:88: undefined reference to `at91_add_device_pwm'
Quoted 7 lines
Quoted 5 lines
This patch ensures we only try to build this driver on platforms on which it will build and work.
Signed-off-by Arnd Bergmann <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Acked-by Nicolas Ferre <[email protected]>
It seems this one just landed in linux-next (in next-20140528).
Quoted 11 lines
drivers/misc/Kconfig config AD525X_DPOT_SPI · line 57
Quoted 11 lines
drivers/misc/Kconfig +2
-1@@ -53,7 +53,8 @@ config AD525X_DPOT_SPI config ATMEL_PWM tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45
Symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not seem to exist in next-20140528. Should these perhaps be SOC_AT91SAM9263, SOC_AT91SAM9RL, and SOC_AT91SAM9G45 and/or ARCH_AT91SAM9263, ARCH_AT91SAM9RL, and ARCH_AT91SAM9G45?
Quoted 4 lines
drivers/misc/Kconfig config AD525X_DPOT_SPI · line 60
Quoted 4 lines
drivers/misc/Kconfig +0
-0help This option enables device driver support for the PWM channels on certain Atmel processors. Pulse Width Modulation is used for
Paul Bolle
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
Hi,
Quoted 11 lines · Paul Bolle
Quoted 5 lines
drivers/misc/Kconfig config AD525X_DPOT_SPI · line 57
Quoted 5 lines
config
ATMEL_PWMdrivers/misc/Kconfig +2
-1tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45Symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not seem to exist in next-20140528. Should these perhaps be
SOC_AT91SAM9263,SOC_AT91SAM9RL, andSOC_AT91SAM9G45and/orARCH_AT91SAM9263,ARCH_AT91SAM9RL, andARCH_AT91SAM9G45?
I wouldn't bother too much fixing that, this will definitely be remove in 3.17. I was too late for 3.16 because my series was waiting on another patch set.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
Quoted 12 lines · Alexandre Belloni
Quoted 10 lines · Paul Bolle
Quoted 5 lines
drivers/misc/Kconfig config AD525X_DPOT_SPI · line 57
Quoted 5 lines
config
ATMEL_PWMdrivers/misc/Kconfig +2
-1tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45Symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not seem to exist in next-20140528. Should these perhaps be
SOC_AT91SAM9263,SOC_AT91SAM9RL, andSOC_AT91SAM9G45and/orARCH_AT91SAM9263,ARCH_AT91SAM9RL, andARCH_AT91SAM9G45?
Quoted 2 lines
I wouldn't bother too much fixing that, this will definitely be remove in 3.17.
Are you talking about: 1) the problem this patch tried to fix; or 2) the problem it created?
Quoted 2 lines
I was too late for 3.16 because my series was waiting on another patch set.
We're already too late to fix stuff for v3.16-rc1 (which will probably only be released about three to four weeks from now)? Is that correct?
Paul Bolle
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
Quoted 13 lines · Paul Bolle
Quoted 12 lines · Alexandre Belloni
Quoted 10 lines · Paul Bolle
Quoted 5 lines
drivers/misc/Kconfig config AD525X_DPOT_SPI · line 57
Quoted 5 lines
config
ATMEL_PWMdrivers/misc/Kconfig +2
-1tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45Symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not seem to exist in next-20140528. Should these perhaps be
SOC_AT91SAM9263,SOC_AT91SAM9RL, andSOC_AT91SAM9G45and/orARCH_AT91SAM9263,ARCH_AT91SAM9RL, andARCH_AT91SAM9G45?
Quoted 6 lines
Quoted 2 lines
I wouldn't bother too much fixing that, this will definitely be remove in 3.17.
Are you talking about: 1) the problem this patch tried to fix; or 2) the problem it created?
I'm removing the whole atmel_pwm driver so the CONFIG_ATMEL_PWM symbol will be gone.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
Quoted 17 lines · Alexandre Belloni
Quoted 16 lines · Paul Bolle
Quoted 14 lines · Alexandre Belloni
Quoted 10 lines · Paul Bolle
Quoted 5 lines
drivers/misc/Kconfig config AD525X_DPOT_SPI · line 57
Quoted 5 lines
config
ATMEL_PWMdrivers/misc/Kconfig +2
-1tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45Symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not seem to exist in next-20140528. Should these perhaps be
SOC_AT91SAM9263,SOC_AT91SAM9RL, andSOC_AT91SAM9G45and/orARCH_AT91SAM9263,ARCH_AT91SAM9RL, andARCH_AT91SAM9G45?I wouldn't bother too much fixing that, this will definitely be remove in 3.17.
Quoted 6 lines
Quoted 3 lines
Are you talking about: 1) the problem this patch tried to fix; or 2) the problem it created?
I'm removing the whole
atmel_pwmdriver so theCONFIG_ATMEL_PWMsymbol will be gone.
So the patch we're discussing here will never be included in a release?
Paul Bolle
Greg Kroah-Hartman
maintainerRe: [PATCH] misc: atmel_pwm: only build for supported platforms
Quoted 18 lines · Paul Bolle
Quoted 17 lines · Alexandre Belloni
Quoted 16 lines · Paul Bolle
Quoted 14 lines · Alexandre Belloni
Quoted 10 lines · Paul Bolle
Quoted 5 lines
Review
Quoted 5 lines
config
ATMEL_PWM(quoted diff) +2
-1tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45Symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not seem to exist in next-20140528. Should these perhaps be
SOC_AT91SAM9263,SOC_AT91SAM9RL, andSOC_AT91SAM9G45and/orARCH_AT91SAM9263,ARCH_AT91SAM9RL, andARCH_AT91SAM9G45?I wouldn't bother too much fixing that, this will definitely be remove in 3.17.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Are you talking about: 1) the problem this patch tried to fix; or 2) the problem it created?
I'm removing the whole
atmel_pwmdriver so theCONFIG_ATMEL_PWMsymbol will be gone.So the patch we're discussing here will never be included in a release?
So, should I just remove it right now? I like deleting files :)
thanks,
greg k-h
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
Quoted 3 lines · Greg Kroah-Hartman
Quoted 1 line · Paul Bolle
So the patch we're discussing here will never be included in a release?
As it hit linux-next, I guess it will be in 3.16
Quoted 2 lines
So, should I just remove it right now? I like deleting files :)
I also like doing that, let me resend my series, rebased on linux-next because of the dependency on the PWM tree. Then I will let you and Nicolas decide what you want to do with it.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
In reply to Greg Kroah-HartmanGreg,
Quoted 23 lines · Greg Kroah-Hartman
Quoted 22 lines · Paul Bolle
Quoted 21 lines · Alexandre Belloni
Quoted 19 lines · Paul Bolle
Quoted 12 lines · Alexandre Belloni
Quoted 10 lines · Paul Bolle
Quoted 5 lines
Review
Quoted 5 lines
config
ATMEL_PWM(quoted diff) +2
-1tristate "Atmel AT32/AT91 PWM support" - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) + depends on HAVE_CLK + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45Symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not seem to exist in next-20140528. Should these perhaps be
SOC_AT91SAM9263,SOC_AT91SAM9RL, andSOC_AT91SAM9G45and/orARCH_AT91SAM9263,ARCH_AT91SAM9RL, andARCH_AT91SAM9G45?Quoted 2 lines
I wouldn't bother too much fixing that, this will definitely be remove in 3.17.
Are you talking about: 1) the problem this patch tried to fix; or 2) the problem it created?
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
I'm removing the whole
atmel_pwmdriver so theCONFIG_ATMEL_PWMsymbol will be gone.So the patch we're discussing here will never be included in a release?
So, should I just remove it right now? I like deleting files :)
This has landed unchanged in v3.16-rc1. Should I submit the trivial patch to remove these pointless references to the unknown symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45?
Thanks,
Paul Bolle
Re: [PATCH] misc: atmel_pwm: only build for supported platforms
Hi,
Quoted 4 lines · Paul Bolle
This has landed unchanged in v3.16-rc1. Should I submit the trivial patch to remove these pointless references to the unknown symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45?
Because of dependencies, the pull request was delayed until after 3.16-rc1. It has been resent and this should be solved for 3.16-rc2:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/264181.html
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 misc: atmel_pwm: fix Kconfig symbols
AT91 symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not exist and this patch change them their correct ARCH_* version.
These symbols are chosen instead of the SOC_* one because this driver is not converted to DT.
Anyway, the ATMEL_PWM symbol and the associated driver will be removed soon during the move to the PWM sub-system.
---
Guys,
The rework is delayed to 3.17. So, in the meantime, I send this little patch as a fix for 3.16.
Bye,
drivers/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/Kconfig +1 -1
@@ -54,7 +54,7 @@ config AD525X_DPOT_SPI config ATMEL_PWM tristate "Atmel AT32/AT91 PWM support" depends on HAVE_CLK - depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45 + depends on AVR32 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 help This option enables device driver support for the PWM channels on certain Atmel processors. Pulse Width Modulation is used for
Signature · 1 line
1.8.2.2
Re: [PATCH] misc: atmel_pwm: fix Kconfig symbols
Quoted 9 lines · Nicolas Ferre
AT91 symbols AT91SAM9263, AT91SAM9RL, and AT91SAM9G45 do not exist and this patch change them their correct ARCH_* version.
These symbols are chosen instead of the SOC_* one because this driver is not converted to DT.
Anyway, theATMEL_PWMsymbol and the associated driver will be removed soon during the move to the PWM sub-system.Reported-by Paul Bolle <[email protected]>Signed-off-by Nicolas Ferre <[email protected]>
Quoted 32 lines
---
Guys,The rework is delayed to 3.17. So, in the meantime, I send this little patch as a fix for 3.16.
Bye,
drivers/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/Kconfig +1
-1@@ -54,7 +54,7 @@ config AD525X_DPOT_SPI config ATMEL_PWM tristate "Atmel AT32/AT91 PWM support" depends on HAVE_CLK - depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45 + depends on AVR32 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 help This option enables device driver support for the PWM channels on certain Atmel processors. Pulse Width Modulation is used forSignature · 7 lines
1.8.2.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Arnd Bergmann
maintainerPATCH 1/1 remoteproc: da8xx: don't select CMA on no-MMU
In reply to Arnd BergmannWe can only use CMA on systems that have an MMU, because of the requirement to use memory migration. NOMMU systems are rather constrained to start with, but it seems reasonable to assume that DMA allocations can still succeed in the constrained case for remoteproc on NOMMU, so this patch changes the da8xx implementation to not rely on CMA when the MMU is disabled.
--- drivers/remoteproc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/Kconfig +1 -1
@@ -44,7 +44,7 @@ config STE_MODEM_RPROC config DA8XX_REMOTEPROC tristate "DA8xx/OMAP-L13x remoteproc support" depends on ARCH_DAVINCI_DA8XX - select CMA + select CMA if MMU select REMOTEPROC select RPMSG help
Signature · 1 line
1.8.3.2
Re: [PATCH] remoteproc: da8xx: don't select CMA on no-MMU
Hi Arnd,
Quoted 8 lines · Arnd Bergmann
We can only use CMA on systems that have an MMU, because of the requirement to use memory migration. NOMMU systems are rather constrained to start with, but it seems reasonable to assume that DMA allocations can still succeed in the constrained case for remoteproc on NOMMU, so this patch changes the da8xx implementation to not rely on CMA when the MMU is disabled.
Quoted 4 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Ohad Ben-Cohen <[email protected]>Cc Robert Tivy <[email protected]>---
Would you like me to pick this via the remoteproc tree or are you planning to route this set elsewhere anyway?
Thanks,
Ohad.
Arnd Bergmann
maintainerRe: [PATCH] remoteproc: da8xx: don't select CMA on no-MMU
Quoted 10 lines · On Monday 12 May 2014 16:09:56 Ohad Ben-Cohen wrote:
Quoted 8 lines · Arnd Bergmann
We can only use CMA on systems that have an MMU, because of the requirement to use memory migration. NOMMU systems are rather constrained to start with, but it seems reasonable to assume that DMA allocations can still succeed in the constrained case for remoteproc on NOMMU, so this patch changes the da8xx implementation to not rely on CMA when the MMU is disabled.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Ohad Ben-Cohen <[email protected]>Cc Robert Tivy <[email protected]>---
Would you like me to pick this via the remoteproc tree or are you planning to route this set elsewhere anyway?
I'd prefer if you could pick it up into your tree.
Arnd
Re: [PATCH] remoteproc: da8xx: don't select CMA on no-MMU
Quoted 1 line · Arnd Bergmann
I'd prefer if you could pick it up into your tree.
Sure thing.
Thanks,
Ohad.
Arnd Bergmann
maintainerPATCH 1/1 regulator: arizona-ldo1: add missing #include
In reply to Arnd Bergmanncommit 2cce4be9e6b8 "regulator: arizona-ldo1: Add processing of init_data from device tree" added a call to of_get_child_by_name() but did not add an #include to the header file declaring that function.
I got a build error when doing randconfig testing on this, which is fixed by this patch to include of.h.
drivers/regulator/arizona-ldo1.c:192:2: error: implicit declaration of function 'of_get_child_by_name' [-Werror=implicit-function-declaration] drivers/regulator/arizona-ldo1.c:193:2: error: implicit declaration of function 'of_parse_phandle' [-Werror=implicit-function-declaration] drivers/regulator/arizona-ldo1.c:213:2: error: implicit declaration of function 'of_node_put' [-Werror=implicit-function-declaration]
--- drivers/regulator/arizona-ldo1.c | 1 + 1 file changed, 1 insertion(+)
drivers/regulator/arizona-ldo1.c +1 -0
@@ -16,6 +16,7 @@#include <linux/init.h> #include <linux/bitops.h> #include <linux/err.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h>
Signature · 1 line
1.8.3.2
Re: [PATCH] regulator: arizona-ldo1: add missing #include
Quoted 7 lines · Arnd Bergmann
commit
2cce4be9e6b8"regulator: arizona-ldo1: Add processing ofinit_datafrom device tree" added a call toof_get_child_by_name()but did not add an #include to the header file declaring that function.I got a build error when doing randconfig testing on this, which is fixed by this patch to include
of.h.
Quoted 8 lines
drivers/regulator/arizona-ldo1.c:192:2: error: implicit declaration of function 'of_get_child_by_name' [-Werror=implicit-function-declaration]drivers/regulator/arizona-ldo1.c:193:2: error: implicit declaration of function 'of_parse_phandle' [-Werror=implicit-function-declaration]drivers/regulator/arizona-ldo1.c:213:2: error: implicit declaration of function 'of_node_put' [-Werror=implicit-function-declaration]Signed-off-by Arnd Bergmann <[email protected]>Cc Charles Keepax <[email protected]>Cc Mark Brown <[email protected]>---
Thanks, yeah seems that is getting implicitly through another header included in my config. Will need a similar fix for arizona-micsupp, I will get one out for that.
Thanks,
Charles
Re: [PATCH 1/2] dmaengine: omap: hide filter_fn for built-in drivers
In reply to Arnd BergmannQuoted 4 lines · Arnd Bergmann
It is not possible to reference the
omap_dma_filter_fnfilter function from a built-in driver if the dmaengine driver itself is a loadable module, which is a valid configuration otherwise.
Quoted 8 lines
This provides only the dummy alternative if the function is referenced by a built-in driver to allow a successful build. The filter function is only required by ATAGS based platforms, which will continue to be broken after this change for the bogus configuration. When booting from DT, with the dma channels correctly listed there, it will work fine.
Signed-off-by Arnd Bergmann <[email protected]>
Quoted 3 lines
Vinod Koul
AppliedRe: [PATCH 1/2] dmaengine: omap: hide filter_fn for built-in drivers
In reply to Arnd BergmannQuoted 10 lines · Arnd Bergmann
It is not possible to reference the
omap_dma_filter_fnfilter function from a built-in driver if the dmaengine driver itself is a loadable module, which is a valid configuration otherwise.This provides only the dummy alternative if the function is referenced by a built-in driver to allow a successful build. The filter function is only required by ATAGS based platforms, which will continue to be broken after this change for the bogus configuration. When booting from DT, with the dma channels correctly listed there, it will work fine.
Applied, both thanks
Signature · 1 line
~Vinod
Arnd Bergmann
maintainerPATCH 2/2 phy: exynos: fix SATA phy license typo
In reply to Arnd BergmannIf the license string doesn't match exactly, the module refuses to load.
--- drivers/phy/phy-exynos5250-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-exynos5250-sata.c +1 -1
@@ -246,6 +246,6 @@ static struct platform_driver exynos_sata_phy_driver = {module_platform_driver (exynos_sata_phy_driver);MODULE_DESCRIPTION ("Samsung SerDes PHY driver" ); -MODULE_LICENSE ("GPL V2" ); +MODULE_LICENSE ("GPL v2" );MODULE_AUTHOR ("Girish K S <[email protected]>" );MODULE_AUTHOR ("Yuvaraj C D <[email protected]>" );
Signature · 1 line
1.8.3.2
Re: [PATCH 2/2] phy: exynos: fix SATA phy license typo
Quoted 16 lines · Arnd Bergmann
If the license string doesn't match exactly, the module refuses to load.
Signed-off-by Arnd Bergmann <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Kukjin Kim <[email protected]>Cc linux-samsung-soc at vger.kernel.org--- drivers/phy/phy-exynos5250-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/phy/phy-exynos5250-sata.c +0
-0
drivers/phy/phy-exynos5250-sata.c static struct platform_driver exynos_sata_phy_driver = { · line 251
Quoted 7 lines
drivers/phy/phy-exynos5250-sata.c +1
-1@@ -246,6 +246,6 @@ static struct platform_driver exynos_sata_phy_driver = {module_platform_driver (exynos_sata_phy_driver);MODULE_DESCRIPTION ("Samsung SerDes PHY driver" ); -MODULE_LICENSE ("GPL V2" ); +MODULE_LICENSE ("GPL v2" );MODULE_AUTHOR ("Girish K S <[email protected]>" );MODULE_AUTHOR ("Yuvaraj C D <[email protected]>" );
A bit of grepping the tree showed me
Documentation/blackfin/gptimers-example.c:83:MODULE_LICENSE("BSD");
drivers/dma/dma-jz4740.c:617:MODULE_LICENSE("GPLv2");
drivers/input/misc/sirfsoc-onkey.c:216:MODULE_LICENSE("GPLv2");
drivers/pci/host/pci-mvebu.c:1042:MODULE_LICENSE("GPLv2");
drivers/pci/host/pci-tegra.c:1719:MODULE_LICENSE("GPLv2");
drivers/power/reset/restart-poweroff.c:65:MODULE_LICENSE("GPLv2");It seems these need to be changed too. But, except for dma-jz4740.c, these are all files that can't be built as (part of) a module. Which explains why no one noticed. Maybe I'll submit some trivial patches, in a few days, to clean this up.
Paul Bolle
Guenter Roeck
maintainerQuoted 9 lines · Arnd Bergmann
These are a bunch of fixes I had to do to get all randconfig configurations on ARM working. Most of these are really old bugs, but there are also some new ones. I don't think any of them require a backport to linux-stable.
I have checked that they are all still required on yesterday's linux-next kernel. Please apply on the appropriate trees unless there are objections.
Is this series of patches also going to fix arm:allmodconfig ?
Thanks,
Guenter
Arnd Bergmann
maintainerQuoted 11 lines · Guenter Roeck
Quoted 9 lines · Arnd Bergmann
These are a bunch of fixes I had to do to get all randconfig configurations on ARM working. Most of these are really old bugs, but there are also some new ones. I don't think any of them require a backport to linux-stable.
I have checked that they are all still required on yesterday's linux-next kernel. Please apply on the appropriate trees unless there are objections.
Is this series of patches also going to fix arm:allmodconfig ?
Possibly, I haven't checked in a while. I'm unfortunately sitting on about 200 other patches in the same branch, which together fix all build errors in any configuration I encountered.
I should really do some allmodconfig/allnoconfig/allyesconfig builds without my series again, and prioritize sending out the ones required for that.
Arnd