more arm build fixes
Subsystems (28)
cover more arm build fixes
Hi subsystem maintainers,
Here is another set of patches that resulted from build testing on linux-next. Please apply directly into your trees if you agree, or let me know if I made a mistake.
I can take whatever remains through the arm-soc tree if you prefer that or I don't hear back.
Arnd
Arnd Bergmann (21):
ARM: topology: export cpu_topology
ARM: default machine descriptor for multiplatform
ARM: shmobile: don't call irqchip_init unconditionally
ARM: orion5x: include linux/cpu.h
atm: he: use mdelay instead of large udelay constants
ALSA: ali5451: use mdelay instead of large udelay constants oss/dmabuf: use dma_map_single
drm/nouveau: use mdelay instead of large udelay constants
drm: export drm_vm_open_locked
[SCSI] nsp32: use mdelay instead of large udelay constants
irqdomain: export irq_domain_add_simple
irqchip: s3c24xx: add missing __init annotations
iommu: tegra: print dma_addr_t using %lld
cpufreq: pxa2xx: initialize variables
thermal: cooling: avoid uninitialied used gcc warning
OF: remove #ifdef from linux/of_platform.h
X.509: do not emit any informational output
USB: ehci-msm: USB_MSM_OTG needs USB_PHY
USB: lpc32xx: ISP1301 needs USB_PHY
USB: OMAP: ISP1301 needs USB_PHY
USB: OHCI: avoid conflicting platform drivers
arch/arm/Kconfig | 1 - arch/arm/configs/lpc32xx_defconfig | 1 + arch/arm/configs/msm_defconfig | 1 + arch/arm/configs/omap1_defconfig | 1 + arch/arm/kernel/devtree.c | 7 ++ arch/arm/kernel/setup.c | 11 +- arch/arm/kernel/topology.c | 1 + arch/arm/mach-orion5x/common.c | 1 + arch/arm/mach-shmobile/intc-r8a7740.c | 13 +- drivers/atm/he.c | 2 +- drivers/cpufreq/pxa2xx-cpufreq.c | 5 +- drivers/gpu/drm/drm_vm.c | 1 + drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 +- drivers/iommu/tegra-gart.c | 3 +- drivers/iommu/tegra-smmu.c | 2 +- drivers/irqchip/irq-s3c24xx.c | 4 +- drivers/scsi/nsp32.c | 2 +- drivers/thermal/cpu_cooling.c | 17 +-- drivers/usb/gadget/Kconfig | 2 + drivers/usb/host/Kconfig | 1 + drivers/usb/host/ohci-hcd.c | 136 ++++++++++++++++++--- drivers/usb/phy/Makefile | 2 +- include/linux/of_platform.h | 13 +- kernel/irq/irqdomain.c | 1 + lib/build_OID_registry | 2 - sound/oss/dmabuf.c | 3 +- sound/pci/ali5451/ali5451.c | 8 +- 27 files changed, 187 insertions(+), 57 deletions(-)
Signature · 25 lines
1.8.1.2 Cc: "James E.J. Bottomley" <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: David Airlie <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Grant Likely <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Inki Dae <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Rob Herring <[email protected]> Cc: Russell King <[email protected]> Cc: Simon Horman <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected]
PATCH 1/21 ARM: topology: export cpu_topology
The cpu_topology symbol is required by any driver using the topology interfaces, which leads to a couple of build errors:
ERROR: "cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined!
ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined!
ERROR: "cpu_topology" [drivers/block/mtip32xx/mtip32xx.ko] undefined!
The obvious solution is to export this symbol.
--- arch/arm/kernel/topology.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/kernel/topology.c +1 -0
@@ -200,6 +200,7 @@ static inline void update_cpu_power(unsigned int cpuid, unsigned int mpidr) {}* cpu topology table */ struct cputopo_arm cpu_topology[NR_CPUS ]; +EXPORT_SYMBOL_GPL (cpu_topology);const struct cpumask *cpu_coregroup_mask (int cpu) {
Signature · 1 line
1.8.1.2
Re: [PATCH 01/21] ARM: topology: export cpu_topology
Quoted 5 lines · Arnd Bergmann
The
cpu_topologysymbol is required by any driver using the topology interfaces, which leads to a couple of build errors:ERROR: "
cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined!
ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined!
Are these first two in mainline?
Quoted 18 lines
ERROR: "
cpu_topology" [drivers/block/mtip32xx/mtip32xx.ko] undefined!The obvious solution is to export this symbol.
Signed-off-by Arnd Bergmann <[email protected]>Cc Russell King <[email protected]>Cc Will Deacon <[email protected]>Cc Nicolas Pitre <[email protected]>Cc Vincent Guittot <[email protected]>--- arch/arm/kernel/topology.c | 1 + 1 file changed, 1 insertion(+)arch/arm/kernel/topology.c +0
-0
arch/arm/kernel/topology.c static inline void update_cpu_power(unsigned int cpuid, unsigned int mpidr) {} · line 203
Quoted 4 lines
arch/arm/kernel/topology.c +1
-0@@ -200,6 +200,7 @@ static inline void update_cpu_power(unsigned int cpuid, unsigned int mpidr) {}* cpu topology table */ struct cputopo_arm cpu_topology[NR_CPUS ]; +EXPORT_SYMBOL_GPL (cpu_topology);
Make sense:
Probably best to put it in the patch system.
Will
Re: [PATCH 01/21] ARM: topology: export cpu_topology
Quoted 8 lines · Will Deacon
Quoted 5 lines · Arnd Bergmann
The
cpu_topologysymbol is required by any driver using the topology interfaces, which leads to a couple of build errors:ERROR: "
cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined!
ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined!Are these first two in mainline?
I think they are both newly added in linux-next.
Arnd
PATCH 2/21 ARM: default machine descriptor for multiplatform
In reply to Arnd BergmannSince we now have default implementations for init_time and init_irq, the init_machine callback is the only one that is not yet optional, but since simple DT based platforms all have the same of_platform_populate function call in there, we can consolidate them as well, and then actually boot with a completely empty machine_desc. Unofortunately we cannot just default to an empty init_machine: We cannot call of_platform_populate before init_machine because that does not work in case of auxdata, and we cannot call it after init_machine either because the machine might need to run code after adding the devices.
To take the final step, this adds support for booting without defining any machine_desc whatsoever.
For the case that CONFIG_MULTIPLATFORM is enabled, it adds a global machine descriptor that never matches any machine but is used as a fallback if nothing else matches. We assume that without CONFIG_MULTIPLATFORM, we only want to boot on the systems that the kernel is built for, so we still retain the build-time warning for missing machine descriptors and the run-time warning when the platform does not match in that case.
In the case that we run on a multiplatform kernel and the machine provides a fully populated device tree, we attempt to keep booting, hoping that no machine specific callbacks are necessary.
Finally, this also removes the misguided "select ARCH_VEXPRESS" that was only added to avoid a build error for allnoconfig kernels.
--- arch/arm/Kconfig | 1 - arch/arm/kernel/devtree.c | 7 +++++++ arch/arm/kernel/setup.c | 11 ++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-)
arch/arm/Kconfig +0 -1
@@ -890,7 +890,6 @@ config ARCH_MULTI_V7 bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)" default y select ARCH_MULTI_V6_V7 - select ARCH_VEXPRESS select CPU_V7 config ARCH_MULTI_V6_V7
arch/arm/kernel/devtree.c +7 -0
@@ -180,6 +180,13 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)unsigned long dt_root;const char *model; +#ifdef CONFIG_ARCH_MULTIPLATFORM + DT_MACHINE_START(GENERIC_DT, "Generic DT based system") +MACHINE_END + + mdesc_best = (struct machine_desc *)&__mach_desc_GENERIC_DT; +#endif +if (!dt_phys)return NULL ;
arch/arm/kernel/setup.c +10 -1
@@ -18,6 +18,7 @@#include <linux/bootmem.h> #include <linux/seq_file.h> #include <linux/screen_info.h> +#include <linux/of_platform.h> #include <linux/init.h> #include <linux/kexec.h> #include <linux/of_fdt.h>
@@ -672,9 +673,17 @@ struct screen_info screen_info = {static int __init customize_machine (void ) { -/* customizes platform devices, or adds new ones */ +/* +* customizes platform devices, or adds new ones +* On DT based machines, we fall back to populating the +* machine from the device tree, if no callback is provided, +* otherwise we would always need an init_machine callback. +*/ if (machine_desc->init_machine) machine_desc->init_machine (); +else +of_platform_populate (NULL , of_default_bus_match_table, +NULL ,NULL );return 0 ; }arch_initcall (customize_machine);
Signature · 1 line
1.8.1.2
PATCH 3/21 ARM: shmobile: don't call irqchip_init unconditionally
In reply to Arnd BergmannThe irqchip_init function is only available when building with CONFIG_OF enabled, which causes this build failure for bonito_defconfig:
arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of':
:(.init.text+0x580): undefined reference to `irqchip_init'
This makes both the OF and the ATAGS portion of the driver conditional, which avoids the build error and also results in smaller object code if not both are enabled, without the need for an #ifdef.
--- arch/arm/mach-shmobile/intc-r8a7740.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/intc-r8a7740.c +11 -2
@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();r8a7740_init_irq_common (); }void __init r8a7740_init_irq (void ) { -void __iomem *gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); -void __iomem *gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 ); +void __iomem *gic_dist_base; +void __iomem *gic_cpu_base; + +if (!IS_ENABLED (CONFIG_ATAGS )) +return ; + + gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); + gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 );/* initialize the Generic Interrupt Controller PL390 r0p0 */ gic_init (0 ,29 , gic_dist_base, gic_cpu_base);
Signature · 1 line
1.8.1.2
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Quoted 25 lines · Arnd Bergmann
The
irqchip_initfunction is only available when building withCONFIG_OFenabled, which causes this build failure forbonito_defconfig:
arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of':
:(.init.text+0x580): undefined reference to `irqchip_init'This makes both the OF and the ATAGS portion of the driver conditional, which avoids the build error and also results in smaller object code if not both are enabled, without the need for an #ifdef.
Signed-off-by Arnd Bergmann <[email protected]>Cc Bastian Hecht <[email protected]>Cc Simon Horman <[email protected]>Cc Kuninori Morimoto <[email protected]>--- arch/arm/mach-shmobile/intc-r8a7740.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)arch/arm/mach-shmobile/intc-r8a7740.c +0
-0
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 58
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +
In other parts of the shmobile I believe that such code is guarded by #ifdef CONFIG_OF and I believe not guarding this code in some way was an oversight.
The above change seems fine to me.
Quoted 9 lines
arch/arm/mach-shmobile/intc-r8a7740.c +1
-2irqchip_init ();r8a7740_init_irq_common (); }void __init r8a7740_init_irq (void ) { -void __iomem *gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); -void __iomem *gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 ); +void __iomem *gic_dist_base;
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 75
Quoted 10 lines
arch/arm/mach-shmobile/intc-r8a7740.c +7
-0+void __iomem *gic_cpu_base; + +if (!IS_ENABLED (CONFIG_ATAGS )) +return ; + + gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); + gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 );/* initialize the Generic Interrupt Controller PL390 r0p0 */ gic_init (0 ,29 , gic_dist_base, gic_cpu_base);
This one seems broken as the armadillo800eva board currently uses it to initialise GIC even if CONFIG_ATAGS is not defined.
I did test the above change on the armadillo800eva board with the above change and CONFIG_ATAGS disabled, the result was a boot failure. With the change reverted booting seems fine.
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Hello Simon and Arnd,
2013/4/26 Simon Horman <[email protected]>:
Quoted 27 lines · Arnd Bergmann
Quoted 26 lines
The
irqchip_initfunction is only available when building withCONFIG_OFenabled, which causes this build failure forbonito_defconfig:
arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of':
:(.init.text+0x580): undefined reference to `irqchip_init'This makes both the OF and the ATAGS portion of the driver conditional, which avoids the build error and also results in smaller object code if not both are enabled, without the need for an #ifdef.
Signed-off-by Arnd Bergmann <[email protected]>Cc Bastian Hecht <[email protected]>Cc Simon Horman <[email protected]>Cc Kuninori Morimoto <[email protected]>--- arch/arm/mach-shmobile/intc-r8a7740.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)arch/arm/mach-shmobile/intc-r8a7740.c +0
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)
Quoted 9 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 58
Quoted 5 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +In other parts of the shmobile I believe that such code is guarded by #ifdef
CONFIG_OFand I believe not guarding this code in some way was an oversight.
Yes, sorry, I haven't thought about the dependency of irqchip_init and CONFIG_OF.
Quoted 25 lines
The above change seems fine to me.
Quoted 9 lines
arch/arm/mach-shmobile/intc-r8a7740.c +1
-2irqchip_init ();r8a7740_init_irq_common (); }void __init r8a7740_init_irq (void ) { -void __iomem *gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); -void __iomem *gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 ); +void __iomem *gic_dist_base;arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 75
Quoted 10 lines
arch/arm/mach-shmobile/intc-r8a7740.c +7
-0+void __iomem *gic_cpu_base; + +if (!IS_ENABLED (CONFIG_ATAGS )) +return ; + + gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); + gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 );/* initialize the Generic Interrupt Controller PL390 r0p0 */ gic_init (0 ,29 , gic_dist_base, gic_cpu_base);This one seems broken as the armadillo800eva board currently uses it to initialise GIC even if
CONFIG_ATAGSis not defined.
Quoted 3 lines
I did test the above change on the armadillo800eva board with the above change and
CONFIG_ATAGSdisabled, the result was a boot failure. With the change reverted booting seems fine.
CONFIG_ATAGS and CONFIG_ARM_APPENDED_DTB are two ways to pass the device tree information, right?
So we run into trouble when we use the later but disable the first. Is there a reason why you wanted to avoid using two times just "if (!IS_ENABLED(CONFIG_OF))", Arnd?
Thanks,
Bastian
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionallyA
Quoted 9 lines · Bastian Hecht
Quoted 6 lines
This one seems broken as the armadillo800eva board currently uses it to initialise GIC even if
CONFIG_ATAGSis not defined.I did test the above change on the armadillo800eva board with the above change and
CONFIG_ATAGSdisabled, the result was a boot failure. With the change reverted booting seems fine.
CONFIG_ATAGSandCONFIG_ARM_APPENDED_DTBare two ways to pass the device tree information, right?
No, the two are methods alternative methods for booting from a legacy boot loader. CONFIG_ATAGS is the old boot method without a DT, using a board file and a MACHINE_START() macro. ARM_APPENDED_DTB means you have a DT linked into the kernel but pass ATAGS to the kernel which uses the passed data to modify the DT.
Quoted 3 lines
So we run into trouble when we use the later but disable the first. Is there a reason why you wanted to avoid using two times just "if (!IS_ENABLED(CONFIG_OF))", Arnd?
I incorrectly assumed that the second one was only used without DT, since it uses hardcoded MMIO locations rather than using of_iomap().
Arnd
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
In reply to Simon HormanQuoted 16 lines · Simon Horman
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 58
Quoted 11 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +In other parts of the shmobile I believe that such code is guarded by #ifdef
CONFIG_OFand I believe not guarding this code in some way was an oversight.
Quoted 1 line
The above change seems fine to me.
Ok. The change that broke the code is only present in linux-next from one of your trees, but is not in arm-soc. Could you include the change in your tree, either by folding into one of your patches or adapting my patch appropriately?
Quoted 7 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 75
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0+ + gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); + gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 );/* initialize the Generic Interrupt Controller PL390 r0p0 */ gic_init (0 ,29 , gic_dist_base, gic_cpu_base);
Quoted 6 lines
This one seems broken as the armadillo800eva board currently uses it to initialise GIC even if
CONFIG_ATAGSis not defined.I did test the above change on the armadillo800eva board with the above change and
CONFIG_ATAGSdisabled, the result was a boot failure. With the change reverted booting seems fine.
Yes, I see my mistake now. The second change was clearly wrong as this function is also used for DT boards, not for ATAGS boards.
Arnd
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Quoted 17 lines · Arnd Bergmann
Quoted 16 lines · Simon Horman
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 58
Quoted 11 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +In other parts of the shmobile I believe that such code is guarded by #ifdef
CONFIG_OFand I believe not guarding this code in some way was an oversight.
Quoted 6 lines
Quoted 1 line
The above change seems fine to me.
Ok. The change that broke the code is only present in linux-next from one of your trees, but is not in arm-soc. Could you include the change in your tree, either by folding into one of your patches or adapting my patch appropriately?
Yes, or of course. I'll queue-up your patch with
the second hunk (below) removed.
Quoted 19 lines
Quoted 7 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 75
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0+ + gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); + gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 );/* initialize the Generic Interrupt Controller PL390 r0p0 */ gic_init (0 ,29 , gic_dist_base, gic_cpu_base);Quoted 6 lines
This one seems broken as the armadillo800eva board currently uses it to initialise GIC even if
CONFIG_ATAGSis not defined.I did test the above change on the armadillo800eva board with the above change and
CONFIG_ATAGSdisabled, the result was a boot failure. With the change reverted booting seems fine.Yes, I see my mistake now. The second change was clearly wrong as this function is also used for DT boards, not for ATAGS boards.
Arnd
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Quoted 20 lines · Simon Horman
Quoted 19 lines · Arnd Bergmann
Quoted 17 lines · Simon Horman
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 58
Quoted 11 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +In other parts of the shmobile I believe that such code is guarded by #ifdef
CONFIG_OFand I believe not guarding this code in some way was an oversight.The above change seems fine to me.
Quoted 26 lines
Quoted 4 lines
Ok. The change that broke the code is only present in linux-next from one of your trees, but is not in arm-soc. Could you include the change in your tree, either by folding into one of your patches or adapting my patch appropriately?
Yes, or of course. I'll queue-up your patch with
the second hunk (below) removed.Quoted 18 lines
Quoted 7 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 64
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0+ + gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); + gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 );/* initialize the Generic Interrupt Controller PL390 r0p0 */ gic_init (0 ,29 , gic_dist_base, gic_cpu_base);Quoted 6 lines
This one seems broken as the armadillo800eva board currently uses it to initialise GIC even if
CONFIG_ATAGSis not defined.I did test the above change on the armadillo800eva board with the above change and
CONFIG_ATAGSdisabled, the result was a boot failure. With the change reverted booting seems fine.Yes, I see my mistake now. The second change was clearly wrong as this function is also used for DT boards, not for ATAGS boards.
Arnd
I have queued-up the following in the soc-r8a7740 branch of the renesas tree and will push it shortly. It should subsequently arrive in linux-next.
Quoted 1 line
From
ea19ad39e1d2b095fe867103fdf7c8dd8240a832Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Thu, 25 Apr 2013 19:28:46 +0200
Subject: [PATCH] ARM: shmobile: don't call irqchip_init unconditionally
The irqchip_init function is only available when building with CONFIG_OF enabled, which causes this build failure for bonito_defconfig:
arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of':
:(.init.text+0x580): undefined reference to `irqchip_init'
This makes the OF portion of the driver conditional, which avoids the build error and also results in smaller object code OF is disabled, without the need for an #ifdef.
--- arch/arm/mach-shmobile/intc-r8a7740.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-shmobile/intc-r8a7740.c +3 -0
@@ -53,6 +53,9 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();r8a7740_init_irq_common (); }
Signature · 1 line
1.8.2.1
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
In reply to Arnd BergmannQuoted 25 lines · Arnd Bergmann
The
irqchip_initfunction is only available when building withCONFIG_OFenabled, which causes this build failure forbonito_defconfig:
arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of':
:(.init.text+0x580): undefined reference to `irqchip_init'This makes both the OF and the ATAGS portion of the driver conditional, which avoids the build error and also results in smaller object code if not both are enabled, without the need for an #ifdef.
Signed-off-by Arnd Bergmann <[email protected]>Cc Bastian Hecht <[email protected]>Cc Simon Horman <[email protected]>Cc Kuninori Morimoto <[email protected]>--- arch/arm/mach-shmobile/intc-r8a7740.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)arch/arm/mach-shmobile/intc-r8a7740.c +0
-0
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 59
Quoted 7 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();
Why not have an empty irqchip_init? I'd guess we'll need this on other platforms and your default mach.
Rob
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Quoted 27 lines · Rob Herring
Quoted 26 lines · Arnd Bergmann
The
irqchip_initfunction is only available when building withCONFIG_OFenabled, which causes this build failure forbonito_defconfig:
arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of':
:(.init.text+0x580): undefined reference to `irqchip_init'This makes both the OF and the ATAGS portion of the driver conditional, which avoids the build error and also results in smaller object code if not both are enabled, without the need for an #ifdef.
Signed-off-by Arnd Bergmann <[email protected]>Cc Bastian Hecht <[email protected]>Cc Simon Horman <[email protected]>Cc Kuninori Morimoto <[email protected]>--- arch/arm/mach-shmobile/intc-r8a7740.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)arch/arm/mach-shmobile/intc-r8a7740.c +0
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)
Quoted 9 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 59
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();Why not have an empty
irqchip_init? I'd guess we'll need this on other platforms and your default mach.
Thanks, I think that could work.
I will see about making it so.
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Quoted 16 lines · Simon Horman
Quoted 6 lines
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +0
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)Quoted 9 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 59
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();Why not have an empty
irqchip_init? I'd guess we'll need this on other platforms and your default mach.
Quoted 3 lines
Thanks, I think that could work.
I will see about making it so.
Ping
Linux-next is still broken for me. There is also anothe shmobile build bug, I'll send a separate patch for that, which also needs to go into your tree.
Arnd
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Hi,
2013/5/8 Arnd Bergmann <[email protected]>:
Quoted 17 lines · Simon Horman
Quoted 16 lines
Quoted 15 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 59
Quoted 12 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();Why not have an empty
irqchip_init? I'd guess we'll need this on other platforms and your default mach.
Quoted 5 lines
Quoted 3 lines
Thanks, I think that could work.
I will see about making it so.
Ping
I have sent out a patch adding an empty irqchip_init() when CONFIG_IRQCHIP is not set with the subject
[PATCH] irqchip: Add irqchip_init dummy function
Quoted 2 lines
Linux-next is still broken for me. There is also anothe shmobile build bug, I'll send a separate patch for that, which also needs to go into your tree.
Oh thanks Arnd for this fix!
Cheers,
Bastian
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Quoted 6 lines · Bastian Hecht
2013/5/8 Arnd Bergmann <[email protected]>:
I have sent out a patch adding an empty
irqchip_init()whenCONFIG_IRQCHIPis not set with the subject
[PATCH] irqchip: Addirqchip_initdummy function
Ah, I missed that one. Is it already in linux-next?
Arnd
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
In reply to Bastian HechtQuoted 22 lines · Bastian Hecht
Hi,
2013/5/8 Arnd Bergmann <[email protected]>:
Quoted 19 lines · Simon Horman
Quoted 18 lines
Quoted 6 lines
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +0
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)Quoted 9 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 59
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();Why not have an empty
irqchip_init? I'd guess we'll need this on other platforms and your default mach.Thanks, I think that could work.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
I will see about making it so.
Ping
I have sent out a patch adding an empty
irqchip_init()whenCONFIG_IRQCHIPis not set with the subject
[PATCH] irqchip: Addirqchip_initdummy function
Thanks.
Quoted 2 lines
Quoted 2 lines
Linux-next is still broken for me. There is also anothe shmobile build bug, I'll send a separate patch for that, which also needs to go into your tree.
Sorry about that. I though I had pushed your fix (the first hunk of the patch that started this thread), but it seems that I did not.
Quoted 5 lines
Oh thanks Arnd for this fix!
Cheers,
Bastian
Re: [PATCH 03/21] ARM: shmobile: don't call irqchip_init unconditionally
Quoted 31 lines · Simon Horman
Quoted 22 lines · Bastian Hecht
Hi,
2013/5/8 Arnd Bergmann <[email protected]>:
Quoted 19 lines · Simon Horman
Quoted 18 lines
Quoted 6 lines
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +0
-0@@ -53,14 +53,23 @@ static void __init r8a7740_init_irq_common(void)Quoted 9 lines
arch/arm/mach-shmobile/intc-r8a7740.c static void __init r8a7740_init_irq_common(void) · line 59
Quoted 6 lines
arch/arm/mach-shmobile/intc-r8a7740.c +3
-0void __init r8a7740_init_irq_of (void ) { +if (!IS_ENABLED (CONFIG_OF )) +return ; +irqchip_init ();Why not have an empty
irqchip_init? I'd guess we'll need this on other platforms and your default mach.Thanks, I think that could work.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
I will see about making it so.
Ping
I have sent out a patch adding an empty
irqchip_init()whenCONFIG_IRQCHIPis not set with the subject
[PATCH] irqchip: Addirqchip_initdummy function
Quoted 7 lines
Thanks.
Quoted 2 lines
Quoted 2 lines
Linux-next is still broken for me. There is also anothe shmobile build bug, I'll send a separate patch for that, which also needs to go into your tree.
Sorry about that. I though I had pushed your fix (the first hunk of the patch that started this thread), but it seems that I did not.
Sorry once again for the delay in addressing this. I have pushed a refreshed next branch which includes both Bastian's fix for irqchip_init() and the patch that Arnd posted relating to symbol renames.
These changes should appear in linux-next in the not to distant future.
PATCH 4/21 ARM: orion5x: include linux/cpu.h
In reply to Arnd BergmannThe linux/cpu.h header is no longer implictly included in this file, so we need to an #include statement to avoid this build warning:
arch/arm/mach-orion5x/common.c:339:3: error: implicit declaration of function 'cpu_idle_poll_ctrl' [-Werror=implicit-function-declaration]
--- arch/arm/mach-orion5x/common.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-orion5x/common.c +1 -0
@@ -19,6 +19,7 @@#include <linux/ata_platform.h> #include <linux/delay.h> #include <linux/clk-provider.h> +#include <linux/cpu.h> #include <net/dsa.h> #include <asm/page.h> #include <asm/setup.h>
Signature · 1 line
1.8.1.2
Re: [PATCH 04/21] ARM: orion5x: include linux/cpu.h
Quoted 4 lines · Arnd Bergmann
The
linux/cpu.hheader is no longer implictly included in this file, so we need to an #include statement to avoid this build warning:
Quoted 8 lines
arch/arm/mach-orion5x/common.c:339:3: error: implicit declaration of function 'cpu_idle_poll_ctrl' [-Werror=implicit-function-declaration]Signed-off-by Arnd Bergmann <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>--- arch/arm/mach-orion5x/common.c | 1 + 1 file changed, 1 insertion(+)
I imagine it's easiest for you to take this through a branch you already have set up, so have it.
thx,
Jason.
Re: [PATCH 04/21] ARM: orion5x: include linux/cpu.h
Quoted 14 lines · Jason Cooper
Quoted 4 lines · Arnd Bergmann
The
linux/cpu.hheader is no longer implictly included in this file, so we need to an #include statement to avoid this build warning:Quoted 8 lines
arch/arm/mach-orion5x/common.c:339:3: error: implicit declaration of function 'cpu_idle_poll_ctrl' [-Werror=implicit-function-declaration]Signed-off-by Arnd Bergmann <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>--- arch/arm/mach-orion5x/common.c | 1 + 1 file changed, 1 insertion(+)
Quoted 4 lines
Acked-by Jason Cooper <[email protected]>I imagine it's easiest for you to take this through a branch you already have set up, so have it.
s/have it/have at it/ :)
thx,
Jason.
PATCH 5/21 atm: he: use mdelay instead of large udelay constants
In reply to Arnd BergmannARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
--- drivers/atm/he.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/atm/he.c +1 -1
@@ -1055,7 +1055,7 @@ static int he_start(struct atm_dev *dev)he_writel (he_dev,0x0 ,RESET_CNTL );he_writel (he_dev,0xff ,RESET_CNTL ); -udelay (16 *1000 );/* 16 ms */ +mdelay (16 );/* 16 ms */ status =he_readl (he_dev,RESET_CNTL );if ((status &BOARD_RST_STATUS ) ==0 ) {hprintk ("reset failed\n" );
Signature · 1 line
1.8.1.2
RE: [PATCH 05/21] atm: he: use mdelay instead of large udelay constants
Quoted 2 lines
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
...
drivers/atm/he.c static int he_start(struct atm_dev *dev) · line 1059
Quoted 7 lines
drivers/atm/he.c +1
-1@@ -1055,7 +1055,7 @@ static int he_start(struct atm_dev *dev)he_writel (he_dev,0x0 ,RESET_CNTL );he_writel (he_dev,0xff ,RESET_CNTL ); -udelay (16 *1000 );/* 16 ms */ +mdelay (16 );/* 16 ms */ status =he_readl (he_dev,RESET_CNTL );
16ms seems a long time to spin.
I'd have thought a sleep would be more appropriate. Since this looks like timing a hardware reset pulse it can't matter if it is somewhat longer.
David
Re: [PATCH 05/21] atm: he: use mdelay instead of large udelay constants
Quoted 7 lines · On Fri, 26 Apr 2013 09:21:59 +0100 "David Laight" <[email protected]>…
Quoted 2 lines
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
...
Quoted 4 lines
drivers/atm/he.c +0
-0@@ -1055,7 +1055,7 @@ static int he_start(struct atm_dev *dev)he_writel (he_dev,0x0 ,RESET_CNTL );he_writel (he_dev,0xff ,RESET_CNTL );
Quoted 8 lines
drivers/atm/he.c static int he_start(struct atm_dev *dev) · line 1059
Quoted 3 lines
drivers/atm/he.c +1
-1-udelay (16 *1000 );/* 16 ms */ +mdelay (16 );/* 16 ms */ status =he_readl (he_dev,RESET_CNTL );16ms seems a long time to spin.
I'd have thought a sleep would be more appropriate. Since this looks like timing a hardware reset pulse it can't matter if it is somewhat longer.
Yes, I wrote this bit some time ago when I was less wise. The programmer's guide doesn't say how long to sleep, so the value isn't critical. It just has to be "long enough". An msleep() would be fine here.
PATCH v2 5/21 atm: he: use msleep instead of large udelay constants
Quoted 1 line
From
a0ddf082821b064cc2d6a9bb90861f9b81a559a5Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Thu, 14 Mar 2013 15:21:36 +0100
Subject: [PATCH] atm: he: use mdelay instead of large udelay constants
ARM cannot handle udelay for more than 2 miliseconds, and it is rather bad style to block the cpu for 16ms anyway, so let's use msleep instead.
---
drivers/atm/he.c +1 -1
@@ -1055,7 +1055,7 @@ static int he_start(struct atm_dev *dev)he_writel (he_dev,0x0 ,RESET_CNTL );he_writel (he_dev,0xff ,RESET_CNTL ); -udelay (16 *1000 );/* 16 ms */ +msleep (16 );/* 16 ms */ status =he_readl (he_dev,RESET_CNTL );if ((status &BOARD_RST_STATUS ) ==0 ) {hprintk ("reset failed\n" );
Re: [PATCH v2 05/21] atm: he: use msleep instead of large udelay constants
From: Arnd Bergmann <[email protected]>
Date: Mon, 29 Apr 2013 15:13:26 +0200
Quoted 10 lines
From
a0ddf082821b064cc2d6a9bb90861f9b81a559a5Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Thu, 14 Mar 2013 15:21:36 +0100
Subject: [PATCH] atm: he: use mdelay instead of large udelay constantsARM cannot handle udelay for more than 2 miliseconds, and it is rather bad style to block the cpu for 16ms anyway, so let's use msleep instead.
Signed-off-by Arnd Bergmann <[email protected]>
Applied, thanks.
PATCH 6/21 ALSA: ali5451: use mdelay instead of large udelay constants
In reply to Arnd BergmannARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
--- sound/pci/ali5451/ali5451.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/pci/ali5451/ali5451.c +4 -4
@@ -451,10 +451,10 @@ static int snd_ali_reset_5451(struct snd_ali *codec)if (pci_dev) {pci_read_config_dword (pci_dev,0x7c , &dwVal);pci_write_config_dword (pci_dev,0x7c , dwVal |0x08000000 ); -udelay (5000 ); +mdelay (5 );pci_read_config_dword (pci_dev,0x7c , &dwVal);pci_write_config_dword (pci_dev,0x7c , dwVal &0xf7ffffff ); -udelay (5000 ); +mdelay (5 ); } pci_dev = codec->pci;
@@ -463,14 +463,14 @@ static int snd_ali_reset_5451(struct snd_ali *codec)udelay (500 );pci_read_config_dword (pci_dev,0x44 , &dwVal);pci_write_config_dword (pci_dev,0x44 , dwVal &0xfffbffff ); -udelay (5000 ); +mdelay (5 ); wCount =200 ;while (wCount--) { wReg =snd_ali_codec_peek (codec,0 ,AC97_POWERDOWN );if ((wReg &0x000f ) ==0x000f )return 0 ; -udelay (5000 ); +mdelay (5 ); }/* non-fatal if you have a non PM capable codec */
Signature · 1 line
1.8.1.2
Takashi Iwai
AppliedRe: [PATCH 06/21] ALSA: ali5451: use mdelay instead of large udelay constants
At Thu, 25 Apr 2013 19:28:49 +0200,
Quoted 7 lines · Arnd Bergmann
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
Signed-off-by Arnd Bergmann <[email protected]>Cc Takashi Iwai <[email protected]>
Thanks, applied to sound git tree.
Takashi
Quoted 41 lines
--- sound/pci/ali5451/ali5451.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)sound/pci/ali5451/ali5451.c +4
-4@@ -451,10 +451,10 @@ static int snd_ali_reset_5451(struct snd_ali *codec)if (pci_dev) {pci_read_config_dword (pci_dev,0x7c , &dwVal);pci_write_config_dword (pci_dev,0x7c , dwVal |0x08000000 ); -udelay (5000 ); +mdelay (5 );pci_read_config_dword (pci_dev,0x7c , &dwVal);pci_write_config_dword (pci_dev,0x7c , dwVal &0xf7ffffff ); -udelay (5000 ); +mdelay (5 ); } pci_dev = codec->pci;@@ -463,14 +463,14 @@ static int snd_ali_reset_5451(struct snd_ali *codec)udelay (500 );pci_read_config_dword (pci_dev,0x44 , &dwVal);pci_write_config_dword (pci_dev,0x44 , dwVal &0xfffbffff ); -udelay (5000 ); +mdelay (5 ); wCount =200 ;while (wCount--) { wReg =snd_ali_codec_peek (codec,0 ,AC97_POWERDOWN );if ((wReg &0x000f ) ==0x000f )return 0 ; -udelay (5000 ); +mdelay (5 ); }/* non-fatal if you have a non PM capable codec */ Signature · 1 line
1.8.1.2
PATCH 7/21 oss/dmabuf: use dma_map_single
In reply to Arnd BergmannThe virt_to_bus/bus_to_virt functions have been deprecated for as long as I can remember, and they are used in very few remaining instances, usually in obscure ISA device drivers. The OSS sound drivers are the only ones that are still used on the ARM architecture, and only on some of the earliest StrongARM machines.
The problem for converting the OSS subsystem to use dma_map_single instead is that the caller of virt_to_bus does not have a device pointer, since the subsystem has never been ported to use the common device infrastructure.
--- sound/oss/dmabuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/oss/dmabuf.c +2 -1
@@ -114,7 +114,7 @@ static int sound_alloc_dmap(struct dma_buffparms *dmap) } } dmap->raw_buf = start_addr; - dmap->raw_buf_phys =virt_to_bus (start_addr); + dmap->raw_buf_phys =dma_map_single (NULL , start_addr, dmap->buffsize,DMA_BIDIRECTIONAL );for (page =virt_to_page (start_addr); page <=virt_to_page (end_addr); page++)SetPageReserved (page);
@@ -139,6 +139,7 @@ static void sound_free_dmap(struct dma_buffparms *dmap)for (page =virt_to_page (start_addr); page <=virt_to_page (end_addr); page++)ClearPageReserved (page); +dma_unmap_single (NULL , dmap->raw_buf_phys, dmap->buffsize,DMA_BIDIRECTIONAL );free_pages ((unsigned long ) dmap->raw_buf, sz); dmap->raw_buf =NULL ; }
Signature · 1 line
1.8.1.2
Re: [PATCH 07/21] oss/dmabuf: use dma_map_single
At Thu, 25 Apr 2013 19:28:50 +0200,
Quoted 13 lines · Arnd Bergmann
The virt_to_bus/bus_to_virt functions have been deprecated for as long as I can remember, and they are used in very few remaining instances, usually in obscure ISA device drivers. The OSS sound drivers are the only ones that are still used on the ARM architecture, and only on some of the earliest StrongARM machines.
The problem for converting the OSS subsystem to use
dma_map_singleinstead is that the caller ofvirt_to_busdoes not have a device pointer, since the subsystem has never been ported to use the common device infrastructure.
Quoted 4 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>
Applied now, but the only problem is that it's difficult to test it :) Let's see.
Thanks!
Takashi
Quoted 28 lines
--- sound/oss/dmabuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)sound/oss/dmabuf.c +2
-1@@ -114,7 +114,7 @@ static int sound_alloc_dmap(struct dma_buffparms *dmap) } } dmap->raw_buf = start_addr; - dmap->raw_buf_phys =virt_to_bus (start_addr); + dmap->raw_buf_phys =dma_map_single (NULL , start_addr, dmap->buffsize,DMA_BIDIRECTIONAL );for (page =virt_to_page (start_addr); page <=virt_to_page (end_addr); page++)SetPageReserved (page);@@ -139,6 +139,7 @@ static void sound_free_dmap(struct dma_buffparms *dmap)for (page =virt_to_page (start_addr); page <=virt_to_page (end_addr); page++)ClearPageReserved (page); +dma_unmap_single (NULL , dmap->raw_buf_phys, dmap->buffsize,DMA_BIDIRECTIONAL );free_pages ((unsigned long ) dmap->raw_buf, sz); dmap->raw_buf =NULL ; }Signature · 1 line
1.8.1.2
PATCH 8/21 drm/nouveau: use mdelay instead of large udelay constants
In reply to Arnd BergmannARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
--- drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c +2 -1
@@ -51,7 +51,8 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval)const u32 doff = (or *0x800 );int load = -EINVAL ;nv_wr32 (priv,0x61a00c + doff,0x00100000 | loadval); -udelay (9500 ); +mdelay (9 ); +udelay (500 );nv_wr32 (priv,0x61a00c + doff,0x80000000 ); load = (nv_rd32 (priv,0x61a00c + doff) &0x38000000 ) >>27 ;nv_wr32 (priv,0x61a00c + doff,0x00000000 );
Signature · 1 line
1.8.1.2
PATCH 9/21 drm: export drm_vm_open_locked
In reply to Arnd BergmannThe EXYNOS DRM driver uses drm_vm_open_locked in its mmap() function, and it can be built as a loadable module, which currently fails. This exports the symbol from the DRM core to avoid
ERROR: "drm_vm_open_locked" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined!
--- drivers/gpu/drm/drm_vm.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_vm.c +1 -0
@@ -422,6 +422,7 @@ void drm_vm_open_locked(struct drm_device *dev,list_add (&vma_entry->head, &dev->vmalist); } } +EXPORT_SYMBOL_GPL (drm_vm_open_locked);static void drm_vm_open (struct vm_area_struct *vma) {
Signature · 1 line
1.8.1.2
Re: [PATCH 09/21] drm: export drm_vm_open_locked
2013/4/26 Arnd Bergmann <[email protected]>
Quoted 23 lines
The EXYNOS DRM driver uses
drm_vm_open_lockedin itsmmap()function, and it can be built as a loadable module, which currently fails. This exports the symbol from the DRM core to avoidERROR: "
drm_vm_open_locked" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined!Signed-off-by Arnd Bergmann <[email protected]>Cc David Airlie <[email protected]>Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>--- drivers/gpu/drm/drm_vm.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/drm_vm.c +0
-0
drivers/gpu/drm/drm_vm.c void drm_vm_open_locked(struct drm_device *dev, · line 427
Quoted 6 lines
drivers/gpu/drm/drm_vm.c +1
-0@@ -422,6 +422,7 @@ void drm_vm_open_locked(struct drm_device *dev,list_add (&vma_entry->head, &dev->vmalist); } } +EXPORT_SYMBOL_GPL (drm_vm_open_locked);
Checked it out.
Thanks,
Inki Dae
static void drm_vm_open(struct vm_area_struct *vma)
Quoted 9 lines
drivers/gpu/drm/drm_vm.c +0
-1{ --1.8.1.2
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 10/21 nsp32: use mdelay instead of large udelay constants
In reply to Arnd BergmannARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
--- drivers/scsi/nsp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/nsp32.c +1 -1
@@ -2899,7 +2899,7 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data)* reset SCSI bus */ nsp32_write1 (base,SCSI_BUS_CONTROL ,BUSCTL_RST ); -udelay (RESET_HOLD_TIME ); +mdelay (RESET_HOLD_TIME /1000 );nsp32_write1 (base,SCSI_BUS_CONTROL ,0 );for (i =0 ; i <5 ; i++) { intrdat =nsp32_read2 (base,IRQ_STATUS );/* dummy read */
Signature · 1 line
1.8.1.2
Re: [PATCH 10/21] [SCSI] nsp32: use mdelay instead of large udelay constants
2013/4/25 Arnd Bergmann <[email protected]>
Quoted 4 lines
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
Quoted 25 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc GOTO Masanori <[email protected]>Cc YOKOTA Hiroshi <[email protected]>Cc "James E.J. Bottomley" <[email protected]>Cc linux-scsi at vger.kernel.org--- drivers/scsi/nsp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/nsp32.c +1
-2@@ -2899,7 +2899,7 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data)* reset SCSI bus */ nsp32_write1 (base,SCSI_BUS_CONTROL ,BUSCTL_RST ); -udelay (RESET_HOLD_TIME ); +mdelay (RESET_HOLD_TIME /1000 );nsp32_write1 (base,SCSI_BUS_CONTROL ,0 );for (i =0 ; i <5 ; i++) { intrdat =nsp32_read2 (base,IRQ_STATUS );/* dummy read */ --1.8.1.2
Re: [PATCH 10/21] [SCSI] nsp32: use mdelay instead of large udelay constants
Quoted 7 lines · Masanori Goto
2013/4/25 Arnd Bergmann <[email protected]>
Quoted 4 lines
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
Singed-off-by GOTO Masanori <[email protected]>
Thanks. I assume you mean "Acked-by", not "Singed-off" as in "burnt" or "Signed-off" as a notification that you have applied it to your own git tree.
I'll keep the patch with an your "Acked-by" line in my tree unless James wants to apply to the scsi tree.
Arnd
Masanori Goto
Acked-by GOTO MasanoriRe: [PATCH 10/21] [SCSI] nsp32: use mdelay instead of large udelay constants
Oops, you're absolutely correct. Thanks for the follow up! Please change it as follow as you mentioned:
Best regrads,
-- gotom
2013/4/29 Arnd Bergmann <[email protected]>:
Quoted 18 lines · Masanori Goto
Quoted 7 lines
2013/4/25 Arnd Bergmann <[email protected]>
Quoted 4 lines
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
Singed-off-by GOTO Masanori <[email protected]>Thanks. I assume you mean "Acked-by", not "Singed-off" as in "burnt" or "Signed-off" as a notification that you have applied it to your own git tree.
I'll keep the patch with an your "Acked-by" line in my tree unless James wants to apply to the scsi tree.
Arnd
James Bottomley
maintainerRe: [PATCH 10/21] [SCSI] nsp32: use mdelay instead of large udelay constants
In reply to Arnd BergmannQuoted 7 lines · Arnd Bergmann
Quoted 6 lines · Masanori Goto
2013/4/25 Arnd Bergmann <[email protected]>
Quoted 4 lines
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those.
Quoted 8 lines
Quoted 1 line
Singed-off-by GOTO Masanori <[email protected]>Thanks. I assume you mean "Acked-by", not "Singed-off" as in "burnt" or "Signed-off" as a notification that you have applied it to your own git tree.
I'll keep the patch with an your "Acked-by" line in my tree unless James wants to apply to the scsi tree.
I can, certainly. I'll be sending the first scsi set today, but I'll be doing another one for just before the close of the merge window.
Goto-san, while I have your attention, is the nsp_cs driver orphaned? I know it's not your driver, but you did once work with its author (YOKOTA Hiroshi <[email protected]>) and I'm trying to get some cleanup on the static functions in the header files.
Thanks,
James
PATCH 11/21 irqdomain: export irq_domain_add_simple
In reply to Arnd BergmannAll other irq_domain_add_* functions are exported already, and apparently this one got left out by mistake, which causes build errors for ARM allmodconfig kernels:
ERROR: "irq_domain_add_simple" [drivers/gpio/gpio-rcar.ko] undefined!
ERROR: "irq_domain_add_simple" [drivers/gpio/gpio-em.ko] undefined!
--- kernel/irq/irqdomain.c | 1 + 1 file changed, 1 insertion(+)
kernel/irq/irqdomain.c +1 -0
@@ -194,6 +194,7 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,/* A linear domain is the default */ return irq_domain_add_linear (of_node, size, ops, host_data); } +EXPORT_SYMBOL_GPL (irq_domain_add_simple);/** * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain.
Signature · 1 line
1.8.1.2
Re: [PATCH 11/21] irqdomain: export irq_domain_add_simple
Quoted 7 lines · Arnd Bergmann
All other irq_domain_add_* functions are exported already, and apparently this one got left out by mistake, which causes build errors for ARM allmodconfig kernels:
ERROR: "
irq_domain_add_simple" [drivers/gpio/gpio-rcar.ko] undefined!
ERROR: "irq_domain_add_simple" [drivers/gpio/gpio-em.ko] undefined!
Quoted 7 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Grant Likely <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Simon Horman <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Magnus Damm <[email protected]>
Grant, could consider taking this one?
Quoted 19 lines
--- kernel/irq/irqdomain.c | 1 + 1 file changed, 1 insertion(+)kernel/irq/irqdomain.c +1
-0@@ -194,6 +194,7 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,/* A linear domain is the default */ return irq_domain_add_linear (of_node, size, ops, host_data); } +EXPORT_SYMBOL_GPL (irq_domain_add_simple);/** * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. Signature · 1 line
1.8.1.2
Grant Likely
AppliedRe: [PATCH 11/21] irqdomain: export irq_domain_add_simple
Quoted 16 lines · Simon Horman
Quoted 7 lines · Arnd Bergmann
All other irq_domain_add_* functions are exported already, and apparently this one got left out by mistake, which causes build errors for ARM allmodconfig kernels:
ERROR: "
irq_domain_add_simple" [drivers/gpio/gpio-rcar.ko] undefined!
ERROR: "irq_domain_add_simple" [drivers/gpio/gpio-em.ko] undefined!Quoted 7 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Grant Likely <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Simon Horman <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Magnus Damm <[email protected]>
Quoted 4 lines
Acked-by Simon Horman <[email protected]>Grant, could consider taking this one?
Applied, thanks. I'll push out to Linus shortly.
g.
PATCH 12/21 irqchip: s3c24xx: add missing __init annotations
In reply to Arnd BergmannThe s3c24xx_init_intc and s3c2412_init_irq functions are only called at init time, and they call functions already marked __init, so they should be marked in the same way. This was reported as
WARNING: vmlinux.o(.text+0x19e0b4): Section mismatch in reference from the function s3c2412_init_irq() to the function .init.text:s3c24xx_init_intc.constprop.8() The function s3c2412_init_irq() references
the function __init s3c24xx_init_intc.constprop.8().
This is often because s3c2412_init_irq lacks a __init
annotation or the annotation of s3c24xx_init_intc.constprop.8 is wrong.
--- drivers/irqchip/irq-s3c24xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-s3c24xx.c +2 -2
@@ -535,7 +535,7 @@ static void s3c24xx_clear_intc(struct s3c_irq_intc *intc) } } -static struct s3c_irq_intc *s3c24xx_init_intc (struct device_node *np, +static struct s3c_irq_intc *__init s3c24xx_init_intc (struct device_node *np,struct s3c_irq_data *irq_data,struct s3c_irq_intc *parent,unsigned long address)
@@ -795,7 +795,7 @@ static struct s3c_irq_data init_s3c2412subint[32] = { { .type = S3C_IRQTYPE_LEVEL, .parent_irq = 21 }, /* CF */ }; -void s3c2412_init_irq (void ) +void __init s3c2412_init_irq (void ) {pr_info ("S3C2412: IRQ Support\n" );
Signature · 1 line
1.8.1.2
Re: [PATCH 12/21] irqchip: s3c24xx: add missing __init annotations
Am Donnerstag, 25. April 2013, 19:28:55 schrieb Arnd Bergmann:
Quoted 12 lines
The
s3c24xx_init_intcands3c2412_init_irqfunctions are only called at init time, and they call functions already marked__init, so they should be marked in the same way. This was reported asWARNING:
vmlinux.o(.text+0x19e0b4): Section mismatch in reference from the functions3c2412_init_irq()to the function .init.text:s3c24xx_init_intc.constprop.8() The functions3c2412_init_irq()references
the function__inits3c24xx_init_intc.constprop.8().
This is often becauses3c2412_init_irqlacks a__initannotation or the annotation of s3c24xx_init_intc.constprop.8 is wrong.
Quoted 3 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Kukjin Kim <[email protected]>
Yeah, it seems "someone" forgot these, thanks for catching this.
Quoted 25 lines
--- drivers/irqchip/irq-s3c24xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/irqchip/irq-s3c24xx.c +2
-2@@ -535,7 +535,7 @@ static void s3c24xx_clear_intc(struct s3c_irq_intc *intc) } } -static struct s3c_irq_intc *s3c24xx_init_intc (struct device_node *np, +static struct s3c_irq_intc *__init s3c24xx_init_intc (struct device_node *np,struct s3c_irq_data *irq_data,struct s3c_irq_intc *parent,unsigned long address)@@ -795,7 +795,7 @@ static struct s3c_irq_data init_s3c2412subint[32] = { { .type = S3C_IRQTYPE_LEVEL, .parent_irq = 21 }, /* CF */ }; -void s3c2412_init_irq (void ) +void __init s3c2412_init_irq (void ) {pr_info ("S3C2412: IRQ Support\n" );
PATCH 13/21 iommu: tegra: print dma_addr_t using %lld
In reply to Arnd BergmannThe code was recently changed to work for builds with a 64 bit dma_addr_t, but the printk unconditionally uses a format string for an "long" variable, which is always wrong as the dma_add_t is now either 'unsigned int' or 'unsigned long long' depending on configuration.
The easiest solution is to cast the variable to u64 and print it as a 64 bit value.
--- drivers/iommu/tegra-gart.c | 3 ++- drivers/iommu/tegra-smmu.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/iommu/tegra-gart.c +2 -1
@@ -295,7 +295,8 @@ static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain, pa = (pte &GART_PAGE_MASK );if (!pfn_valid (__phys_to_pfn (pa))) { -dev_err (gart->dev,"No entry for %08lx:%08x\n" , iova, pa); +dev_err (gart->dev,"No entry for %08llx:%pa\n" , + (u64 )iova, &pa);gart_dump_table (gart);return -EINVAL ; }
drivers/iommu/tegra-smmu.c +1 -1
@@ -772,7 +772,7 @@ static phys_addr_t smmu_iommu_iova_to_phys(struct iommu_domain *domain, pfn = *pte &SMMU_PFN_MASK ;WARN_ON (!pfn_valid (pfn));dev_dbg (as->smmu->dev, -"iova:%08lx pfn:%08lx asid:%d\n" , iova, pfn, as->asid); +"iova:%08llx pfn:%08lx asid:%d\n" , (u64 )iova, pfn, as->asid);spin_unlock_irqrestore (&as->lock, flags);return PFN_PHYS (pfn);
Signature · 1 line
1.8.1.2
RE: [PATCH 13/21] iommu: tegra: print dma_addr_t using %lld
Hi Arnd,
I already submitted a patch to fix this.
http://permalink.gmane.org/gmane.linux.kernel.iommu/2036
Regards
Varun
Quoted 57 lines
-----Original Message-----
From: Arnd Bergmann [mailto:arnd at arndb.de]
Sent: Thursday, April 25, 2013 10:59 PM
To: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org; Arnd Bergmann; Sethi Varun-B16395; Joerg Roedel
Subject: [PATCH 13/21] iommu: tegra: printdma_addr_tusing %lldThe code was recently changed to work for builds with a 64 bit
dma_addr_t, but the printk unconditionally uses a format string for an "long" variable, which is always wrong as thedma_add_tis now either 'unsigned int' or 'unsigned long long'
depending on configuration.The easiest solution is to cast the variable to u64 and print it as a 64 bit value.
Signed-off-by Arnd Bergmann <[email protected]>Cc Varun Sethi <[email protected]>Cc Joerg Roedel <[email protected]>--- drivers/iommu/tegra-gart.c | 3 ++- drivers/iommu/tegra-smmu.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)drivers/iommu/tegra-gart.c +2
-1@@ -295,7 +295,8 @@ static phys_addr_t gart_iommu_iova_to_phys(structiommu_domain *domain, pa = (pte &GART_PAGE_MASK );if (!pfn_valid (__phys_to_pfn (pa))) { -dev_err (gart->dev,"No entry for %08lx:%08x\n" , iova, pa); +dev_err (gart->dev,"No entry for %08llx:%pa\n" , + (u64 )iova, &pa);gart_dump_table (gart);return -EINVAL ;drivers/iommu/tegra-gart.c +0
-0}drivers/iommu/tegra-smmu.c +1
-1@@ -772,7 +772,7 @@ static phys_addr_t smmu_iommu_iova_to_phys(structiommu_domain *domain, pfn = *pte &SMMU_PFN_MASK ;WARN_ON (!pfn_valid (pfn));dev_dbg (as->smmu->dev, -"iova:%08lx pfn:%08lx asid:%d\n" , iova, pfn, as->asid); +"iova:%08llx pfn:%08lx asid:%d\n" , (u64 )iova, pfn, as->asid);spin_unlock_irqrestore (&as->lock, flags);return
PFN_PHYS(pfn);
--
1.8.1.2
PATCH 14/21 cpufreq: pxa2xx: initialize variables
In reply to Arnd Bergmanngcc-3.8 correctly found that the variables set by find_freq_tables() are not initialized if this function is called on something other than a pxa2xx or pxa3xx:
pxa2xx-cpufreq.c: In function 'pxa_verify_policy':
pxa2xx-cpufreq.c:272:6: warning: 'pxa_freqs_table' may be used uninitialized in this function [-Wmaybe-uninitialized] pxa2xx-cpufreq.c: In function 'pxa_set_target':
pxa2xx-cpufreq.c:345:23: warning: 'pxa_freq_settings' may be used uninitialized in this function [-Wmaybe-uninitialized]
Rather than adding a bogus initialization that would let us get a little further before crashing, add an explicit BUG(). We know that this code is designed to run on only these cpus, so this will fix the build warning and give a more helpful diagnostic if the code ever changes to run on other machines.
--- drivers/cpufreq/pxa2xx-cpufreq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/cpufreq/pxa2xx-cpufreq.c +3 -2
@@ -221,10 +221,11 @@ static void find_freq_tables(struct cpufreq_frequency_table **freq_table, *pxa_freqs = pxa255_turbo_freqs; *freq_table = pxa255_turbo_freq_table; } - } -if (cpu_is_pxa27x ()) { + }else if (cpu_is_pxa27x ()) { *pxa_freqs = pxa27x_freqs; *freq_table = pxa27x_freq_table; + }else { +BUG (); } }
Signature · 1 line
1.8.1.2
Re: [PATCH 14/21] cpufreq: pxa2xx: initialize variables
Quoted 15 lines · Arnd Bergmann
gcc-3.8 correctly found that the variables set by
find_freq_tables()are not initialized if this function is called on something other than a pxa2xx or pxa3xx:
pxa2xx-cpufreq.c: In function 'pxa_verify_policy':
pxa2xx-cpufreq.c:272:6: warning: 'pxa_freqs_table' may be used uninitialized in this function [-Wmaybe-uninitialized]pxa2xx-cpufreq.c: In function 'pxa_set_target':
pxa2xx-cpufreq.c:345:23: warning: 'pxa_freq_settings' may be used uninitialized in this function [-Wmaybe-uninitialized]Rather than adding a bogus initialization that would let us get a little further before crashing, add an explicit
BUG(). We know that this code is designed to run on only these cpus, so this will fix the build warning and give a more helpful diagnostic if the code ever changes to run on other machines.
Quoted 3 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Viresh Kumar <[email protected]>Cc Rafael J. Wysocki <[email protected]>
OK, applied.
Can you please CC future cpufreq changes to linux-pm at vger.kernel.org? That'd make the handling of them much easier.
Thanks,
Rafael
Quoted 12 lines
--- drivers/cpufreq/pxa2xx-cpufreq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/cpufreq/pxa2xx-cpufreq.c +0
-0@@ -221,10 +221,11 @@ static void find_freq_tables(struct cpufreq_frequency_table **freq_table, *pxa_freqs = pxa255_turbo_freqs; *freq_table = pxa255_turbo_freq_table; }
drivers/cpufreq/pxa2xx-cpufreq.c static void find_freq_tables(struct cpufreq_frequency_table **freq_table, · line 231
Quoted 10 lines
drivers/cpufreq/pxa2xx-cpufreq.c +3
-2- } -if (cpu_is_pxa27x ()) { + }else if (cpu_is_pxa27x ()) { *pxa_freqs = pxa27x_freqs; *freq_table = pxa27x_freq_table; + }else { +BUG (); } }
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
z siedziba w Gdansku
ul. Slowackiego 173
80-298 Gdansk
Sad Rejonowy Gdansk Polnoc w Gdansku,
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, numer KRS 101882
NIP 957-07-52-316
Kapital zakladowy 200.000 zl
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 14/21] cpufreq: pxa2xx: initialize variables
Quoted 9 lines · Rafael J. Wysocki
Quoted 3 lines · Arnd Bergmann
Signed-off-by Arnd Bergmann <[email protected]>Cc Viresh Kumar <[email protected]>Cc Rafael J. Wysocki <[email protected]>OK, applied.
Can you please CC future cpufreq changes to linux-pm at vger.kernel.org? That'd make the handling of them much easier.
Sure, I'll try to rembember next time. Thanks for applying it anyway.
Arnd
PATCH 15/21 thermal: cooling: avoid uninitialied used gcc warning
In reply to Arnd BergmannThe newly rewritten get_property() function causes a bogus warning from gcc-3.8, which cannot figure out that "level" is always initialized at the point where it gets evaluated:
drivers/thermal/cpu_cooling.c: In function 'get_property':drivers/thermal/cpu_cooling.c:189:37: warning: 'level' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (property == GET_FREQ && level == j) {
^Slightly rearranging the code makes this more obvious and avoids the warning.
--- drivers/thermal/cpu_cooling.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/thermal/cpu_cooling.c +9 -8
@@ -165,10 +165,6 @@ static int get_property(unsigned int cpu, unsigned long input,return 0 ; } -if (property ==GET_FREQ ) - level = descend ? input : (max_level - input -1 ); - -for (i =0 , j =0 ; table[i].frequency !=CPUFREQ_TABLE_END ; i++) {/* ignore invalid entry */ if (table[i].frequency ==CPUFREQ_ENTRY_INVALID )
@@ -186,10 +182,15 @@ static int get_property(unsigned int cpu, unsigned long input, *output = descend ? j : (max_level - j -1 );return 0 ; } -if (property ==GET_FREQ && level == j) { -/* get frequency by level */ - *output = freq; -return 0 ; + +if (property ==GET_FREQ ) { + level = descend ? input : (max_level - input -1 ); + +if (level == j) { +/* get frequency by level */ + *output = freq; +return 0 ; + } } j++; }
Signature · 1 line
1.8.1.2
Re: [PATCH 15/21] thermal: cooling: avoid uninitialied used gcc warning
Arnd,
Quoted 9 lines · Arnd Bergmann
The newly rewritten
get_property()function causes a bogus warning from gcc-3.8, which cannot figure out that "level" is always initialized at the point where it gets evaluated:
drivers/thermal/cpu_cooling.c: In function 'get_property':drivers/thermal/cpu_cooling.c:189:37: warning: 'level' may be used uninitialized in this function [-Wmaybe-uninitialized]if (property == GET_FREQ && level == j) { ^
Quoted 6 lines
Slightly rearranging the code makes this more obvious and avoids the warning.
Signed-off-by Arnd Bergmann <[email protected]>Cc Zhang Rui <[email protected]>Cc Amit Daniel kachhap <[email protected]>
Rui has merged a patch that removes this bogus compiler warning:
http://git.kernel.org/cgit/linux/kernel/git/rzhang/linux.git/commit/?h=next&id=4469b99743d296e24aefc5f8ed7df1bc9cfbbac8
Though, as not as elegant as your patch, it does the trick. :-)
Quoted 47 lines
--- drivers/thermal/cpu_cooling.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)drivers/thermal/cpu_cooling.c +9
-9@@ -165,10 +165,6 @@ static int get_property(unsigned int cpu, unsigned long input,return 0 ; } -if (property ==GET_FREQ ) - level = descend ? input : (max_level - input -1 ); - -for (i =0 , j =0 ; table[i].frequency !=CPUFREQ_TABLE_END ; i++) {/* ignore invalid entry */ if (table[i].frequency ==CPUFREQ_ENTRY_INVALID )@@ -186,10 +182,15 @@ static int get_property(unsigned int cpu, unsigned long input, *output = descend ? j : (max_level - j -1 );return 0 ; } -if (property ==GET_FREQ && level == j) { -/* get frequency by level */ - *output = freq; -return 0 ; + +if (property ==GET_FREQ ) { + level = descend ? input : (max_level - input -1 ); + +if (level == j) { +/* get frequency by level */ + *output = freq; +return 0 ; + } } j++; } --1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
Eduardo Bezerra Valentin
Re: [PATCH 15/21] thermal: cooling: avoid uninitialied used gcc warning
Quoted 4 lines · edubezval at gmail.com
Rui has merged a patch that removes this bogus compiler warning:
http://git.kernel.org/cgit/linux/kernel/git/rzhang/linux.git/commit/?h=next&id=4469b99743d296e24aefc5f8ed7df1bc9cfbbac8Though, as not as elegant as your patch, it does the trick. :-)
Ok, works for me.
Looking at the patch however tells me that it has the potential to hide real bugs if the code is ever changed to actually do an uninitialized access. It's not very likely in this case, but I generally recommend not to add any variables at declaration time unless the initialization is to a meaningful value that the code later uses.
Arnd
Zhang Rui
reviewerRe: [PATCH 15/21] thermal: cooling: avoid uninitialied used gcc warning
In reply to Arnd BergmannQuoted 9 lines · Arnd Bergmann
The newly rewritten
get_property()function causes a bogus warning from gcc-3.8, which cannot figure out that "level" is always initialized at the point where it gets evaluated:
drivers/thermal/cpu_cooling.c: In function 'get_property':drivers/thermal/cpu_cooling.c:189:37: warning: 'level' may be used uninitialized in this function [-Wmaybe-uninitialized]if (property == GET_FREQ && level == j) { ^
Quoted 6 lines
Slightly rearranging the code makes this more obvious and avoids the warning.
Signed-off-by Arnd Bergmann <[email protected]>Cc Zhang Rui <[email protected]>Cc Amit Daniel kachhap <[email protected]>
we already have a fix for this.
please refer to
https://patchwork.kernel.org/patch/2454891/
thanks for your patch, Arnd!
-rui
Quoted 39 lines
--- drivers/thermal/cpu_cooling.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)drivers/thermal/cpu_cooling.c +9
-8@@ -165,10 +165,6 @@ static int get_property(unsigned int cpu, unsigned long input,return 0 ; } -if (property ==GET_FREQ ) - level = descend ? input : (max_level - input -1 ); - -for (i =0 , j =0 ; table[i].frequency !=CPUFREQ_TABLE_END ; i++) {/* ignore invalid entry */ if (table[i].frequency ==CPUFREQ_ENTRY_INVALID )@@ -186,10 +182,15 @@ static int get_property(unsigned int cpu, unsigned long input, *output = descend ? j : (max_level - j -1 );return 0 ; } -if (property ==GET_FREQ && level == j) { -/* get frequency by level */ - *output = freq; -return 0 ; + +if (property ==GET_FREQ ) { + level = descend ? input : (max_level - input -1 ); + +if (level == j) { +/* get frequency by level */ + *output = freq; +return 0 ; + } } j++; }
PATCH 16/21 OF: remove #ifdef from linux/of_platform.h
In reply to Arnd BergmannA lot of code uses the functions from of_platform.h when built for devicetree-enabled platforms but can also be built without them. In order to avoid using #ifdef everywhere in drivers, this makes all the function declarations visible, which means we can use "if (IS_ENABLED(CONFIG_OF))" in driver code and get build coverage over the code but let the compiler drop the reference in the object code.
--- include/linux/of_platform.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
include/linux/of_platform.h +3 -10
@@ -14,7 +14,6 @@#include <linux/device.h> #include <linux/mod_devicetable.h> -#ifdef CONFIG_OF_DEVICE #include <linux/pm.h> #include <linux/of_device.h> #include <linux/platform_device.h>
@@ -82,7 +81,6 @@ extern struct platform_device *of_device_alloc(struct device_node *np, struct device *parent);extern struct platform_device *of_find_device_by_node (struct device_node *np); -#ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */ /* Platform devices and busses creation */ extern struct platform_device *of_platform_device_create(struct device_node *np, const char *bus_id,
@@ -91,17 +89,12 @@ extern struct platform_device *of_platform_device_create(struct device_node *np,extern int of_platform_bus_probe (struct device_node *root,const struct of_device_id *matches,struct device *parent); +#ifdef CONFIG_OF_ADDRESS extern int of_platform_populate (struct device_node *root,const struct of_device_id *matches,const struct of_dev_auxdata *lookup,struct device *parent); -#endif /* CONFIG_OF_ADDRESS */ - -#endif /* CONFIG_OF_DEVICE */ - -#if !defined(CONFIG_OF_ADDRESS ) -struct of_dev_auxdata ; -struct device_node ; +#else static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup,
@@ -109,6 +102,6 @@ static inline int of_platform_populate(struct device_node *root, {return -ENODEV ; } -#endif /* !CONFIG_OF_ADDRESS */ +#endif #endif /* _LINUX_OF_PLATFORM_H */
Signature · 1 line
1.8.1.2
PATCH 17/21 X.509: do not emit any informational output
In reply to Arnd BergmannWhen building a kernel using 'make -s', I expect to see an empty output, except for build warnings and errors. The build_OID_registry code always prints one line when run, which is not helpful to most people building the kernels, and which makes it harder to automatically check for build warnings.
Let's just remove the one line output.
--- lib/build_OID_registry | 2 -- 1 file changed, 2 deletions(-)
lib/build_OID_registry +0 -2
@@ -50,8 +50,6 @@ my @indices = (); my @lengths = (); my $total_length = 0; -print "Compiling ", $#names + 1, " OIDs\n"; - for (my $i = 0; $i <= $#names; $i++) { my $name = $names[$i]; my $oid = $oids[$i];
Signature · 1 line
1.8.1.2
PATCH 18/21 USB: ehci-msm: USB_MSM_OTG needs USB_PHY
In reply to Arnd BergmannThe Kconfig entry for USB_EHCI_MSM unconditionally selects USB_MSM_OTG, which is now only visible when USB_PHY is also enabled.
This adds an appropriate dependency and enables USB_PHY in the msm defconfig, avoiding the Kbuild warning:
warning: (USB_EHCI_MSM) selects USB_MSM_OTG which has unmet direct dependencies (USB_SUPPORT && USB_PHY && (USB || USB_GADGET) && ARCH_MSM)
--- arch/arm/configs/msm_defconfig | 1 + drivers/usb/host/Kconfig | 1 + 2 files changed, 2 insertions(+)
arch/arm/configs/msm_defconfig +1 -0
@@ -101,6 +101,7 @@ CONFIG_SND_DYNAMIC_MINORS=y CONFIG_SND_SOC=y CONFIG_HID_BATTERY_STRENGTH=y CONFIG_USB=y +CONFIG_USB_PHY=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_MON=y CONFIG_USB_EHCI_HCD=y
drivers/usb/host/Kconfig +1 -0
@@ -188,6 +188,7 @@ config USB_EHCI_HCD_AT91 config USB_EHCI_MSM tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" depends on ARCH_MSM + depends on USB_PHY select USB_EHCI_ROOT_HUB_TT select USB_MSM_OTG ---help---
Signature · 1 line
1.8.1.2
Greg Kroah-Hartman
maintainerRe: [PATCH 18/21] USB: ehci-msm: USB_MSM_OTG needs USB_PHY
Quoted 23 lines · Arnd Bergmann
The
Kconfigentry forUSB_EHCI_MSMunconditionally selectsUSB_MSM_OTG, which is now only visible whenUSB_PHYis also enabled.This adds an appropriate dependency and enables
USB_PHYin the msm defconfig, avoiding theKbuildwarning:warning: (
USB_EHCI_MSM) selectsUSB_MSM_OTGwhich has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& (USB ||USB_GADGET) &&ARCH_MSM)Signed-off-by Arnd Bergmann <[email protected]>Cc linux-usb at vger.kernel.orgCc Greg Kroah-Hartman <[email protected]>Cc Felipe Balbi <[email protected]>Cc Pavankumar Kondeti <[email protected]>--- arch/arm/configs/msm_defconfig | 1 + drivers/usb/host/Kconfig | 1 + 2 files changed, 2 insertions(+)arch/arm/configs/msm_defconfig +0
-0
arch/arm/configs/msm_defconfig CONFIG_SND_DYNAMIC_MINORS=y · line 107
Quoted 7 lines
arch/arm/configs/msm_defconfig +1
-0@@ -101,6 +101,7 @@ CONFIG_SND_DYNAMIC_MINORS=y CONFIG_SND_SOC=y CONFIG_HID_BATTERY_STRENGTH=y CONFIG_USB=y +CONFIG_USB_PHY=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_MON=y CONFIG_USB_EHCI_HCD=y
This part of the patch doesn't apply to my tree, so I can't take it.
drivers/usb/host/Kconfig config USB_EHCI_HCD_AT91 · line 194
Quoted 12 lines
drivers/usb/host/Kconfig +1
-0@@ -188,6 +188,7 @@ config USB_EHCI_HCD_AT91 config USB_EHCI_MSM tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" depends on ARCH_MSM + depends on USB_PHY select USB_EHCI_ROOT_HUB_TT select USB_MSM_OTG ---help---
But this does, and I'm guessing that it's the more important part, so I'll just edit it and only take this hunk, ok?
thanks,
greg k-h
Re: [PATCH 18/21] USB: ehci-msm: USB_MSM_OTG needs USB_PHY
Quoted 7 lines · Greg Kroah-Hartman
Quoted 7 lines
drivers/usb/host/Kconfig +0
-0@@ -188,6 +188,7 @@ config USB_EHCI_HCD_AT91 config USB_EHCI_MSM tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller"
Quoted 8 lines
drivers/usb/host/Kconfig config USB_EHCI_HCD_AT91 · line 194
Quoted 5 lines
drivers/usb/host/Kconfig +1
-0depends on ARCH_MSM + depends on USB_PHY select USB_EHCI_ROOT_HUB_TT select USB_MSM_OTG ---help---But this does, and I'm guessing that it's the more important part, so I'll just edit it and only take this hunk, ok?
Ok, thanks! Sorry for bothering you with the hand editing. I'll apply the defconfig change to arm-soc then.
Arnd
PATCH 19/21 USB: lpc32xx: ISP1301 needs USB_PHY
In reply to Arnd BergmannThe Kconfig entry for USB_LPC32XX unconditionally selects USB_ISP1301, which is now only visible when USB_PHY is also enabled.
This adds an appropriate dependency and enables USB_PHY in the msm defconfig, avoiding these build errors:
warning: (USB_LPC32XX) selects USB_ISP1301 which has unmet direct dependencies (USB_SUPPORT && USB_PHY && (USB || USB_GADGET) && I2C) drivers/built-in.o: In function `usb_hcd_nxp_probe':drivers/usb/host/ohci-nxp.c:224: undefined reference to `isp1301_get_client'drivers/built-in.o: In function `lpc32xx_udc_probe':drivers/usb/gadget/lpc32xx_udc.c:3071: undefined reference to `isp1301_get_client'
--- arch/arm/configs/lpc32xx_defconfig | 1 + drivers/usb/gadget/Kconfig | 1 + 2 files changed, 2 insertions(+)
arch/arm/configs/lpc32xx_defconfig +1 -0
@@ -146,6 +146,7 @@ CONFIG_SND_DEBUG_VERBOSE=y # CONFIG_SND_SPI is not set CONFIG_SND_SOC=y CONFIG_USB=y +CONFIG_USB_PHY=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y
drivers/usb/gadget/Kconfig +1 -0
@@ -144,6 +144,7 @@ config USB_AT91 config USB_LPC32XX tristate "LPC32XX USB Peripheral Controller" depends on ARCH_LPC32XX + depends on USB_PHY select USB_ISP1301 select USB_OTG_UTILS help
Signature · 1 line
1.8.1.2
Re: [PATCH 19/21] USB: lpc32xx: ISP1301 needs USB_PHY
Quoted 12 lines · Arnd Bergmann
The
Kconfigentry forUSB_LPC32XXunconditionally selectsUSB_ISP1301, which is now only visible whenUSB_PHYis also enabled.This adds an appropriate dependency and enables
USB_PHYin the msm defconfig, avoiding these build errors:warning: (
USB_LPC32XX) selectsUSB_ISP1301which has unmet direct dependencies (USB_SUPPORT&&USB_PHY&& (USB ||USB_GADGET) && I2C)drivers/built-in.o: In function `usb_hcd_nxp_probe':drivers/usb/host/ohci-nxp.c:224: undefined reference to `isp1301_get_client'drivers/built-in.o: In function `lpc32xx_udc_probe':drivers/usb/gadget/lpc32xx_udc.c:3071: undefined reference to `isp1301_get_client'
Quoted 5 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-usb at vger.kernel.orgCc Greg Kroah-Hartman <[email protected]>Cc Felipe Balbi <[email protected]>Cc Roland Stigge <[email protected]>
Quoted 29 lines
--- arch/arm/configs/lpc32xx_defconfig | 1 + drivers/usb/gadget/Kconfig | 1 + 2 files changed, 2 insertions(+)arch/arm/configs/lpc32xx_defconfig +1
-0@@ -146,6 +146,7 @@ CONFIG_SND_DEBUG_VERBOSE=y # CONFIG_SND_SPI is not set CONFIG_SND_SOC=y CONFIG_USB=y +CONFIG_USB_PHY=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=ydrivers/usb/gadget/Kconfig +1
-0@@ -144,6 +144,7 @@ config USB_AT91 config USB_LPC32XX tristate "LPC32XX USB Peripheral Controller" depends on ARCH_LPC32XX + depends on USB_PHY select USB_ISP1301 select USB_OTG_UTILS help
PATCH 20/21 USB: OMAP: ISP1301 needs USB_PHY
In reply to Arnd BergmannThe Kconfig entry for USB_OMAP unconditionally selects USB_ISP1301, which is now only visible when USB_PHY is also enabled.
This adds an appropriate dependency and enables USB_PHY in the omap1 defconfig, avoiding these build warnings:
warning: (USB_OHCI_HCD && USB_OMAP) selects ISP1301_OMAP which has unmet direct dependencies (USB_SUPPORT && USB_PHY && I2C && ARCH_OMAP_OTG)
Also fix a Makefile typo while we're at it.
--- arch/arm/configs/omap1_defconfig | 1 + drivers/usb/gadget/Kconfig | 1 + drivers/usb/phy/Makefile | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-)
arch/arm/configs/omap1_defconfig +1 -0
@@ -196,6 +196,7 @@ CONFIG_SND_SOC=y CONFIG_SND_OMAP_SOC=y # CONFIG_USB_HID is not set CONFIG_USB=y +CONFIG_USB_PHY=y CONFIG_USB_DEBUG=y CONFIG_USB_DEVICEFS=y # CONFIG_USB_DEVICE_CLASS is not set
drivers/usb/gadget/Kconfig +1 -0
@@ -196,6 +196,7 @@ config USB_FUSB300 config USB_OMAP tristate "OMAP USB Device Controller" depends on ARCH_OMAP1 + depends on USB_PHY select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG help Many Texas Instruments OMAP processors have flexible full
drivers/usb/phy/Makefile +1 -1
@@ -11,7 +11,7 @@ obj-$(CONFIG_USB_PHY) += phy.o obj-$(CONFIG_AB8500_USB) += phy-ab8500-usb.o phy-fsl-usb2-objs := phy-fsl-usb.o phy-fsm-usb.o obj-$(CONFIG_FSL_USB2_OTG) += phy-fsl-usb2.o -obj-$(CONFIG_ISP1301_OMAP) += phy-isp1301.omap.o +obj-$(CONFIG_ISP1301_OMAP) += phy-isp1301-omap.o obj-$(CONFIG_MV_U3D_PHY) += phy-mv-u3d-usb.o obj-$(CONFIG_NOP_USB_XCEIV) += phy-nop.o obj-$(CONFIG_OMAP_CONTROL_USB) += phy-omap-control.o
Signature · 1 line
1.8.1.2
PATCH 21/21 USB: OHCI: avoid conflicting platform drivers
In reply to Arnd BergmannLike the EHCI driver, OHCI supports a large number of different platform glue drivers by directly including them, which causes problems with conflicting macro definitions in some cases. As more ARM architecture specific back-ends are required to coexist in a single build, we should split those out into separate drivers. Unfortunately, the infrastructure for that is still under development, so to give us more time, this uses a separate *_PLATFORM_DRIVER macro for each ARM specific OHCI backend, just like we already do on PowerPC and some of the other ARM platforms.
In linux-3.10, only the SPEAr and CNS3xxx back-ends would actually conflict without this patch, but over time we would get more of them, so this is a way to avoid having to patch the driver every time it breaks. We should still split out all back-ends into separate loadable modules, but that work is only needed to improve code size and cleanliness after this patch, not for correctness.
While we're here, this fixes the incorrectly sorted error path for the OMAP1 and OMAP3 backends to ensure we always unregister the exact set of drivers that were registered before erroring out.
--- drivers/usb/host/ohci-hcd.c | 136 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 118 insertions(+), 18 deletions(-)
drivers/usb/host/ohci-hcd.c +118 -18
@@ -1102,12 +1102,12 @@ MODULE_LICENSE ("GPL");#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX )#include "ohci-s3c2410.c" -#define PLATFORM_DRIVER ohci_hcd_s3c2410_driver +#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif #ifdef CONFIG_USB_OHCI_EXYNOS #include "ohci-exynos.c" -#define PLATFORM_DRIVER exynos_ohci_driver +#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver#endif #ifdef CONFIG_USB_OHCI_HCD_OMAP1
@@ -1127,25 +1127,24 @@ MODULE_LICENSE ("GPL");#ifdef CONFIG_ARCH_EP93XX #include "ohci-ep93xx.c" -#define PLATFORM_DRIVER ohci_hcd_ep93xx_driver +#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif #ifdef CONFIG_ARCH_AT91 #include "ohci-at91.c" -#define PLATFORM_DRIVER ohci_hcd_at91_driver +#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver#endif #ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" -#define PLATFORM_DRIVER usb_hcd_nxp_driver +#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver#endif #ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" -#define PLATFORM_DRIVER ohci_hcd_da8xx_driver +#define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_PPC_OF #include "ohci-ppc-of.c" #define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver
@@ -1153,7 +1152,7 @@ MODULE_LICENSE ("GPL");#ifdef CONFIG_PLAT_SPEAR #include "ohci-spear.c" -#define PLATFORM_DRIVER spear_ohci_hcd_driver +#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver#endif #ifdef CONFIG_PPC_PS3
@@ -1199,7 +1198,14 @@ MODULE_LICENSE ("GPL"); !defined (SA1111_DRIVER ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (SM501_OHCI_DRIVER ) && \ - !defined(TMIO_OHCI_DRIVER) + !defined (TMIO_OHCI_DRIVER ) && \ + !defined (S3C2410_PLATFORM_DRIVER ) && \ + !defined (EXYNOS_PLATFORM_DRIVER ) && \ + !defined (EP93XX_PLATFORM_DRIVER ) && \ + !defined (AT91_PLATFORM_DRIVER ) && \ + !defined (NXP_PLATFORM_DRIVER ) && \ + !defined (DAVINCI_PLATFORM_DRIVER ) && \ + !defined(SPEAR_PLATFORM_DRIVER)#error "missing bus glue for ohci-hcd"#endif
@@ -1277,9 +1283,79 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif +#ifdef S3C2410_PLATFORM_DRIVER + retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); +if (retval <0 ) + goto error_s3c2410; +#endif + +#ifdef EXYNOS_PLATFORM_DRIVER + retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); +if (retval <0 ) + goto error_exynos; +#endif + +#ifdef EP93XX_PLATFORM_DRIVER + retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER ); +if (retval <0 ) + goto error_ep93xx; +#endif + +#ifdef AT91_PLATFORM_DRIVER + retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); +if (retval <0 ) + goto error_at91; +#endif + +#ifdef NXP_PLATFORM_DRIVER + retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); +if (retval <0 ) + goto error_nxp; +#endif + +#ifdef DAVINCI_PLATFORM_DRIVER + retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER ); +if (retval <0 ) + goto error_davinci; +#endif + +#ifdef SPEAR_PLATFORM_DRIVER + retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); +if (retval <0 ) + goto error_spear; +#endif +return retval;/* Error path */ +#ifdef SPEAR_PLATFORM_DRIVER +platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); + error_spear: +#endif +#ifdef DAVINCI_PLATFORM_DRIVER +platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); + error_davinci: +#endif +#ifdef NXP_PLATFORM_DRIVER +platform_driver_unregister (&NXP_PLATFORM_DRIVER ); + error_nxp: +#endif +#ifdef AT91_PLATFORM_DRIVER +platform_driver_unregister (&AT91_PLATFORM_DRIVER ); + error_at91: +#endif +#ifdef EP93XX_PLATFORM_DRIVER +platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); + error_ep93xx: +#endif +#ifdef EXYNOS_PLATFORM_DRIVER +platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); + error_exynos: +#endif +#ifdef S3C2410_PLATFORM_DRIVER +platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); + error_s3c2410: +#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1300,17 +1376,17 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef PLATFORM_DRIVER -platform_driver_unregister (&PLATFORM_DRIVER ); - error_platform: +#ifdef OMAP3_PLATFORM_DRIVER +platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); + error_omap3_platform:#endif #ifdef OMAP1_PLATFORM_DRIVER platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); error_omap1_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: +#ifdef PLATFORM_DRIVER +platform_driver_unregister (&PLATFORM_DRIVER ); + error_platform:#endif #ifdef PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver_unregister (&PS3_SYSTEM_BUS_DRIVER );
@@ -1329,6 +1405,27 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { +#ifdef SPEAR_PLATFORM_DRIVER +platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); +#endif +#ifdef DAVINCI_PLATFORM_DRIVER +platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); +#endif +#ifdef NXP_PLATFORM_DRIVER +platform_driver_unregister (&NXP_PLATFORM_DRIVER ); +#endif +#ifdef AT91_PLATFORM_DRIVER +platform_driver_unregister (&AT91_PLATFORM_DRIVER ); +#endif +#ifdef EP93XX_PLATFORM_DRIVER +platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); +#endif +#ifdef EXYNOS_PLATFORM_DRIVER +platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); +#endif +#ifdef S3C2410_PLATFORM_DRIVER +platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); +#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
@@ -1344,12 +1441,15 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef PLATFORM_DRIVER -platform_driver_unregister (&PLATFORM_DRIVER ); -#endif #ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif +#ifdef OMAP1_PLATFORM_DRIVER +platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); +#endif +#ifdef PLATFORM_DRIVER +platform_driver_unregister (&PLATFORM_DRIVER ); +#endif #ifdef PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver_unregister (&PS3_SYSTEM_BUS_DRIVER );#endif
Signature · 1 line
1.8.1.2