Skip to contentSkip to conversation

ARM build fixes for 3.10

PATCH Applied Arnd Bergmann 17 participants 58 messages Apr 23, 2013 – Apr 29, 2013

Subsystems (23)
DRM drivers Arm (32-bit) USB Sound +19 more subsystems
lore
Share & tools
lore

Arnd Bergmann

author maintainer
#0 lore raw

cover ARM build fixes for 3.10

Hi everyone,

This is a set of bug fixes for build errors and warnings I am seeing in the various defconfigs and/or allmodconfig builds on linux-next. The majority of these showed up because we now include a lot more platforms in allmodconfig than we used to.

Please apply to appropriate maintainer trees or provide feedback, I can take care of the rest sending those through arm-soc that I get no feedback on.

Arnd

Arnd Bergmann (21):
Turn off -Wmaybe-uninitialized when building with -Os
ARM: compressed/head.S: work around new binutils warning
ARM: use optimized do_div only for EABI
ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally
ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7
ARM: tegra: call cpu_do_idle from C code
ARM: tegra: unify tegra_idle_device definitions
ASoC: ux500: forward declare msp_i2s_platform_data spi/sirf: fix MODULE_DEVICE_TABLE
ssb: fix alignment of struct bcma_device_id drm/tilcdc: use only a single module device table
mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE
misc: mark spear13xx-pcie-gadget as broken
staging: nvec: allow modular build
staging: comedi/dawboard2000: use mdelay for large delays staging/zsmalloc: don't use pgtable-mapping from modules tty/serial/sirf: fix MODULE_DEVICE_TABLE
usb: phy: tegra: don't call into tegra-ehci directly
usb: phy: don't mark usb_bind_phy as __init
MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly
mtd: omap2: allow bulding as a module

 Makefile                                      |  2 +-
 arch/arm/boot/compressed/Makefile             |  2 +-
 arch/arm/boot/compressed/head.S               | 12 ++++++++++++
 arch/arm/include/asm/div64.h                  |  2 +-
 arch/arm/kvm/Kconfig                          |  6 +++---
 arch/arm/mach-omap2/Kconfig                   |  5 +++++
 arch/arm/mach-tegra/cpuidle-tegra114.c        |  5 ++---
 arch/arm/mach-tegra/cpuidle-tegra20.c         |  4 +---
 arch/arm/mach-tegra/cpuidle-tegra30.c         |  4 +---
 arch/arm/mach-tegra/cpuidle.c                 |  2 ++
 arch/arm/mach-tegra/cpuidle.h                 |  4 ++++
 arch/arm/mach-tegra/pm.c                      |  5 +++++
 arch/arm/mach-tegra/sleep-tegra20.S           |  2 +-
 drivers/gpu/drm/tilcdc/tilcdc_panel.c         |  1 -
 drivers/gpu/drm/tilcdc/tilcdc_slave.c         |  1 -
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c        |  1 -
 drivers/mfd/ab8500-gpadc.c                    |  2 +-
 drivers/misc/Kconfig                          |  2 +-
 drivers/mmc/host/sdhci-tegra.c                |  2 +-
 drivers/mtd/nand/Kconfig                      |  2 +-
 drivers/spi/spi-sirf.c                        |  2 +-
 drivers/staging/comedi/drivers/daqboard2000.c | 14 +++++++-------
 drivers/staging/nvec/Kconfig                  | 10 +++++-----
 drivers/staging/zsmalloc/zsmalloc-main.c      |  2 +-
 drivers/tty/serial/sirfsoc_uart.c             |  2 +-
 drivers/usb/host/ehci-tegra.c                 | 10 +++++-----
 drivers/usb/otg/otg.c                         |  2 +-
 drivers/usb/phy/tegra_usb_phy.c               | 13 +++++++++----
 include/linux/mod_devicetable.h               |  5 +++--
 include/linux/usb/tegra_usb_phy.h             | 10 +++++-----
 sound/soc/ux500/ux500_msp_i2s.h               |  1 +
 31 files changed, 82 insertions(+), 55 deletions(-)
Signature · 21 lines
1.8.1.2

Cc: Alan Stern <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Chris Ball <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Russell King <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
author maintainer
#1 lore raw

PATCH 1/21 Turn off -Wmaybe-uninitialized when building with -Os

gcc-4.7 and higher add a lot of false positive warnings about potential uses of uninitialized warnings, but only when optimizing for size (-Os). This is the default when building allyesconfig, which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.

In order to avoid getting a lot of patches that initialize such variables and accidentally hide real errors along the way, let's just turn off this warning on the respective gcc versions when building with size optimizations. The -Wmaybe-uninitialized option was introduced in the same gcc version (4.7) that is now causing the false positives, so there is no effect on older compilers.

A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE, we might now see /fewer/ warnings about possibly uninitialized warnings than with -O2, but that is still much better than seeing warnings known to be bogus.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 46263d8..dc87b2e 100644
@@ -571,7 +571,7 @@ endif # $(dot-config)
 all: vmlinux
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS	+= -Os
+KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
 else
 KBUILD_CFLAGS	+= -O2
 endif
Signature · 1 line
1.8.1.2
author maintainer
#2 lore raw

PATCH 2/21 ARM: compressed/head.S: work around new binutils warning

In reply to Arnd Bergmann

In August 2012, Matthew Gretton-Dann checked a change into binutils labelled "Error on obsolete & warn on deprecated registers", apparently as part of ARMv8 support. Apparently, this was supposed to emit the message "Warning: This coprocessor register access is deprecated in ARMv8" when using certain mcr/mrc instructions and building for ARMv8. Unfortunately, the message that is actually emitted appears to be '(null)', which is less helpful in comparison.

Even more unfortunately, this is biting us on every single kernel build with a new gas, because arch/arm/boot/compressed/head.S and some other files in that directory are built with -march=all since kernel commit 80cec14a8 "[ARM] Add -march=all to assembly file build in arch/arm/boot/compressed" back in v2.6.28.

This patch reverts Russell's nice solution and replaces it with a more complex one that sprinkles .arch statements inside of the head.S file in functions that are executed in different architecture levels, which seems to solve the original problem just as well, and gets rid of the new one, too.

Without this patch, building anything results in:

arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:565: Warning: (null) arch/arm/boot/compressed/head.S:676: Warning: (null) arch/arm/boot/compressed/head.S:698: Warning: (null) arch/arm/boot/compressed/head.S:722: Warning: (null) arch/arm/boot/compressed/head.S:726: Warning: (null) arch/arm/boot/compressed/head.S:957: Warning: (null) arch/arm/boot/compressed/head.S:996: Warning: (null) arch/arm/boot/compressed/head.S:997: Warning: (null) arch/arm/boot/compressed/head.S:1027: Warning: (null) arch/arm/boot/compressed/head.S:1035: Warning: (null) arch/arm/boot/compressed/head.S:1046: Warning: (null) arch/arm/boot/compressed/head.S:1060: Warning: (null) arch/arm/boot/compressed/head.S:1092: Warning: (null) arch/arm/boot/compressed/head.S:1094: Warning: (null) arch/arm/boot/compressed/head.S:1095: Warning: (null) arch/arm/boot/compressed/head.S:1102: Warning: (null) arch/arm/boot/compressed/head.S:1134: Warning: (null)

Cc Matthew Gretton-Dann <[email protected]>
Cc Russell King <[email protected]>
---
 arch/arm/boot/compressed/Makefile |  2 +-
 arch/arm/boot/compressed/head.S   | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
arch/arm/boot/compressed/Makefile +1 -1
index afed28e..27f3604 100644
@@ -121,7 +121,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
 endif
 
 ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
-asflags-y := -Wa,-march=all -DZIMAGE
+asflags-y := -DZIMAGE
 
 # Supply kernel BSS size to the decompressor via a linker symbol.
 KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \
arch/arm/boot/compressed/head.S +12 -0
index fe4d9c3..3b0b21a 100644
@@ -548,6 +548,7 @@ cache_on:	mov	r3, #8			@ cache_on function
  * to cover all 32bit address and cacheable and bufferable.
  */
 __armv4_mpu_cache_on:
+		.arch armv4
 		mov	r0, #0x3f		@ 4G, the whole
 		mcr	p15, 0, r0, c6, c7, 0	@ PR7 Area Setting
 		mcr 	p15, 0, r0, c6, c7, 1
@@ -655,6 +656,7 @@ ENDPROC(__setup_mmu)
 @ Enable unaligned access on v6, to allow better code generation
 @ for the decompressor C code:
 __armv6_mmu_cache_on:
+		.arch armv6
 		mrc	p15, 0, r0, c1, c0, 0	@ read SCTLR
 		bic	r0, r0, #2		@ A (no unaligned access fault)
 		orr	r0, r0, #1 << 22	@ U (v6 unaligned access model)
@@ -663,11 +665,13 @@ __armv6_mmu_cache_on:
 
 __arm926ejs_mmu_cache_on:
 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
+		.arch armv5
 		mov	r0, #4			@ put dcache in WT mode
 		mcr	p15, 7, r0, c15, c0, 0
 #endif
 
 __armv4_mmu_cache_on:
+		.arch armv4
 		mov	r12, lr
 #ifdef CONFIG_MMU
 		mov	r6, #CB_BITS | 0x12	@ U
@@ -688,6 +692,7 @@ __armv4_mmu_cache_on:
 		mov	pc, r12
 
 __armv7_mmu_cache_on:
+		.arch armv7-a
 		mov	r12, lr
 #ifdef CONFIG_MMU
 		mrc	p15, 0, r11, c0, c1, 4	@ read ID_MMFR0
@@ -1031,6 +1036,7 @@ cache_clean_flush:
 		mov	r3, #16
 		b	call_cache_fn
 
+		.arch armv4
 __armv4_mpu_cache_flush:
 		mov	r2, #1
 		mov	r3, #0
@@ -1056,6 +1062,7 @@ __fa526_cache_flush:
 		mov	pc, lr
 
 __armv6_mmu_cache_flush:
+		.arch armv6
 		mov	r1, #0
 		mcr	p15, 0, r1, c7, c14, 0	@ clean+invalidate D
 		mcr	p15, 0, r1, c7, c5, 0	@ invalidate I+BTB
@@ -1063,6 +1070,7 @@ __armv6_mmu_cache_flush:
 		mcr	p15, 0, r1, c7, c10, 4	@ drain WB
 		mov	pc, lr
 
+		.arch armv7-a
 __armv7_mmu_cache_flush:
 		mrc	p15, 0, r10, c0, c1, 5	@ read ID_MMFR1
 		tst	r10, #0xf << 16		@ hierarchical cache (ARMv7)
@@ -1123,6 +1131,7 @@ iflush:
 		mcr	p15, 0, r10, c7, c5, 4	@ ISB
 		mov	pc, lr
 
+		.arch armv5
 __armv5tej_mmu_cache_flush:
 1:		mrc	p15, 0, r15, c7, c14, 3	@ test,clean,invalidate D cache
 		bne	1b
@@ -1130,6 +1139,7 @@ __armv5tej_mmu_cache_flush:
 		mcr	p15, 0, r0, c7, c10, 4	@ drain WB
 		mov	pc, lr
 
+		.arch armv4
 __armv4_mmu_cache_flush:
 		mov	r2, #64*1024		@ default: 32K dcache size (*2)
 		mov	r11, #32		@ default: 32 byte line size
@@ -1168,6 +1178,8 @@ __armv3_mpu_cache_flush:
 		mcr	p15, 0, r1, c7, c0, 0	@ invalidate whole cache v3
 		mov	pc, lr
 
+		.arch armv4
+
 /*
  * Various debugging routines for printing hex characters and
  * memory, which again must be relocatable.
Signature · 1 line
1.8.1.2
author maintainer
#3 lore raw

PATCH 3/21 ARM: use optimized do_div only for EABI

In reply to Arnd Bergmann

In OABI configurations, some uses of the do_div function cause gcc to run out of registers. To work around that, we can force the use of the out-of-line version for configurations that build a OABI kernel.

Without this patch, building netx_defconfig results in:

net/core/pktgen.c: In function 'pktgen_if_show':
net/core/pktgen.c:682:2775: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' net/core/pktgen.c:682:3153: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' net/core/pktgen.c:682:2775: error: 'asm' operand has impossible constraints net/core/pktgen.c:682:3153: error: 'asm' operand has impossible constraints

---
 arch/arm/include/asm/div64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/div64.h +1 -1
index fe92ccf..191ada6 100644
@@ -46,7 +46,7 @@
 	__rem;							\
 })
 
-#if __GNUC__ < 4
+#if __GNUC__ < 4 || !defined(CONFIG_AEABI)
 
 /*
  * gcc versions earlier than 4.0 are simply too problematic for the
Signature · 1 line
1.8.1.2
author maintainer
#4 lore raw

PATCH 4/21 ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

In reply to Arnd Bergmann

The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the kernel/context_tracking.c code, which includes the vgic data structures implictly through the kvm headers. Definining the symbol to zero on builds without KVM resolves this build error:

In file included from include/linux/kvm_host.h:33:0,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_host.h:28:23: warning: "CONFIG_KVM_ARM_MAX_VCPUS" is not defined [-Wundef]

 #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
                       ^
arch/arm/include/asm/kvm_vgic.h:34:24: note: in expansion of macro 'KVM_MAX_VCPUS'
 #define VGIC_MAX_CPUS  KVM_MAX_VCPUS
                        ^
arch/arm/include/asm/kvm_vgic.h:38:6: note: in expansion of macro 'VGIC_MAX_CPUS'
 #if (VGIC_MAX_CPUS > 8)
      ^

In file included from arch/arm/include/asm/kvm_host.h:41:0,
from include/linux/kvm_host.h:33,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_vgic.h:59:11: error: 'CONFIG_KVM_ARM_MAX_VCPUS' undeclared here (not in a function)

  } percpu[VGIC_MAX_CPUS];
           ^
Cc Marc Zyngier <[email protected]>
Cc Christoffer Dall <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm/kvm/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/kvm/Kconfig +3 -3
index 49dd64e..370e1a8 100644
@@ -41,9 +41,9 @@ config KVM_ARM_HOST
 	  Provides host support for ARM processors.
 
 config KVM_ARM_MAX_VCPUS
-	int "Number maximum supported virtual CPUs per VM"
-	depends on KVM_ARM_HOST
-	default 4
+	int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST
+	default 4 if KVM_ARM_HOST
+	default 0
 	help
 	  Static number of max supported virtual CPUs per VM.
 
Signature · 1 line
1.8.1.2
Acked-by on v1 4/21
#5 lore raw

Re: [PATCH 04/21] ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

Quoted 49 lines · Arnd Bergmann

The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the kernel/context_tracking.c code, which includes the vgic data structures implictly through the kvm headers. Definining the symbol to zero on builds without KVM resolves this build error:

In file included from include/linux/kvm_host.h:33:0,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_host.h:28:23: warning: "CONFIG_KVM_ARM_MAX_VCPUS" is not defined [-Wundef]

 #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
                       ^
arch/arm/include/asm/kvm_vgic.h:34:24: note: in expansion of macro 'KVM_MAX_VCPUS'
 #define VGIC_MAX_CPUS  KVM_MAX_VCPUS
                        ^
arch/arm/include/asm/kvm_vgic.h:38:6: note: in expansion of macro 'VGIC_MAX_CPUS'
 #if (VGIC_MAX_CPUS > 8)
      ^

In file included from arch/arm/include/asm/kvm_host.h:41:0,
from include/linux/kvm_host.h:33,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_vgic.h:59:11: error: 'CONFIG_KVM_ARM_MAX_VCPUS' undeclared here (not in a function)

  } percpu[VGIC_MAX_CPUS];
           ^
Cc Marc Zyngier <[email protected]>
Cc Christoffer Dall <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm/kvm/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/kvm/Kconfig +3 -4
index 49dd64e..370e1a8 100644
@@ -41,9 +41,9 @@ config KVM_ARM_HOST
          Provides host support for ARM processors.
 
 config KVM_ARM_MAX_VCPUS
-       int "Number maximum supported virtual CPUs per VM"
-       depends on KVM_ARM_HOST
-       default 4
+       int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST
+       default 4 if KVM_ARM_HOST
+       default 0
        help
          Static number of max supported virtual CPUs per VM.
 
--
Quoted 2 lines

1.8.1.2

#6 lore raw

Re: [PATCH 04/21] ARM: kvm: define KVM_ARM_MAX_VCPUS unconditionally

Quoted 49 lines · Christoffer Dall
Quoted 48 lines · Arnd Bergmann

The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the kernel/context_tracking.c code, which includes the vgic data structures implictly through the kvm headers. Definining the symbol to zero on builds without KVM resolves this build error:

In file included from include/linux/kvm_host.h:33:0,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_host.h:28:23: warning: "CONFIG_KVM_ARM_MAX_VCPUS" is not defined [-Wundef]

 #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
                       ^
arch/arm/include/asm/kvm_vgic.h:34:24: note: in expansion of macro 'KVM_MAX_VCPUS'
 #define VGIC_MAX_CPUS  KVM_MAX_VCPUS
                        ^
arch/arm/include/asm/kvm_vgic.h:38:6: note: in expansion of macro 'VGIC_MAX_CPUS'
 #if (VGIC_MAX_CPUS > 8)
      ^

In file included from arch/arm/include/asm/kvm_host.h:41:0,
from include/linux/kvm_host.h:33,
from kernel/context_tracking.c:18:
arch/arm/include/asm/kvm_vgic.h:59:11: error: 'CONFIG_KVM_ARM_MAX_VCPUS' undeclared here (not in a function)

  } percpu[VGIC_MAX_CPUS];
           ^
Cc Marc Zyngier <[email protected]>
Cc Christoffer Dall <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm/kvm/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/kvm/Kconfig +3 -3
index 49dd64e..370e1a8 100644
@@ -41,9 +41,9 @@ config KVM_ARM_HOST
          Provides host support for ARM processors.
 
 config KVM_ARM_MAX_VCPUS
-       int "Number maximum supported virtual CPUs per VM"
-       depends on KVM_ARM_HOST
-       default 4
+       int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST
+       default 4 if KVM_ARM_HOST
+       default 0
        help
          Static number of max supported virtual CPUs per VM.
 
Quoted 5 lines
Quoted 3 lines

--
1.8.1.2

actually let me just pull that into my tree. thanks.

author maintainer
#7 lore raw

PATCH 5/21 ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7

In reply to Arnd Bergmann

CONFIG_ARCH_OMAP2PLUS depends on (ARCH_MULTI_V6 || ARCH_MULTI_V7) as of a0694861 "ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support", but the individual OMAP2/3/4/5 and AM33XX platforms can all be selected independent of what we are building for, which is a bug and prevents us from easily building e.g. an ARMv7-only defconfig.

This makes ARCH_OMAP2 depend on ARCH_MULTI_V6 and the others depend on ARCH_MULTI_V7, to ensure we really only build the platforms for the CPUs we have enabled in the global multiplatform configuration step.

Cc Ezequiel Garcia <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-omap2/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-omap2/Kconfig +5 -0
index 8111cd9..552341d 100644
@@ -55,6 +55,7 @@ config SOC_HAS_REALTIME_COUNTER
 config ARCH_OMAP2
 	bool "TI OMAP2"
 	depends on ARCH_OMAP2PLUS
+	depends on ARCH_MULTI_V6
 	default y
 	select CPU_V6
 	select MULTI_IRQ_HANDLER
@@ -64,6 +65,7 @@ config ARCH_OMAP2
 config ARCH_OMAP3
 	bool "TI OMAP3"
 	depends on ARCH_OMAP2PLUS
+	depends on ARCH_MULTI_V7
 	default y
 	select ARCH_HAS_OPP
 	select ARM_CPU_SUSPEND if PM
@@ -80,6 +82,7 @@ config ARCH_OMAP4
 	bool "TI OMAP4"
 	default y
 	depends on ARCH_OMAP2PLUS
+	depends on ARCH_MULTI_V7
 	select ARCH_HAS_OPP
 	select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
 	select ARM_CPU_SUSPEND if PM
@@ -99,6 +102,7 @@ config ARCH_OMAP4
 
 config SOC_OMAP5
 	bool "TI OMAP5"
+	depends on ARCH_MULTI_V7
 	select ARM_CPU_SUSPEND if PM
 	select ARM_GIC
 	select CPU_V7
@@ -135,6 +139,7 @@ config SOC_TI81XX
 
 config SOC_AM33XX
 	bool "AM33XX support"
+	depends on ARCH_MULTI_V7
 	default y
 	select ARM_CPU_SUSPEND if PM
 	select CPU_V7
Signature · 1 line
1.8.1.2
maintainer Acked-by on v1 5/21
#8 lore raw

Re: [PATCH 05/21] ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7

Quoted 6 lines · Arnd Bergmann

CONFIG_ARCH_OMAP2PLUS depends on (ARCH_MULTI_V6 || ARCH_MULTI_V7) as of a0694861 "ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support", but the individual OMAP2/3/4/5 and AM33XX platforms can all be selected independent of what we are building for, which is a bug and prevents us from easily building e.g. an ARMv7-only defconfig.

Quoted 6 lines

This makes ARCH_OMAP2 depend on ARCH_MULTI_V6 and the others depend on ARCH_MULTI_V7, to ensure we really only build the platforms for the CPUs we have enabled in the global multiplatform configuration step.

Cc Ezequiel Garcia <[email protected]>
author maintainer
#9 lore raw

Re: [PATCH 05/21] ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7

Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Arnd Bergmann

CONFIG_ARCH_OMAP2PLUS depends on (ARCH_MULTI_V6 || ARCH_MULTI_V7) as of a0694861 "ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support", but the individual OMAP2/3/4/5 and AM33XX platforms can all be selected independent of what we are building for, which is a bug and prevents us from easily building e.g. an ARMv7-only defconfig.

Quoted 9 lines
Quoted 6 lines

This makes ARCH_OMAP2 depend on ARCH_MULTI_V6 and the others depend on ARCH_MULTI_V7, to ensure we really only build the platforms for the CPUs we have enabled in the global multiplatform configuration step.

Cc Ezequiel Garcia <[email protected]>

Thanks, I've now applied it to the next/fixes-non-critical branch.

Arnd

author maintainer
#10 lore raw

PATCH 6/21 ARM: tegra: call cpu_do_idle from C code

In reply to Arnd Bergmann

When building a kernel for multiple CPU architecture levels, cpu_do_idle() is a macro for an indirect function call, which cannot be called from assembly code as Tegra does.

Adding a trivial C wrapper for this function lets us build a tegra kernel with ARMv6 support enabled.

Cc Joseph Lo <[email protected]>
Cc Stephen Warren <[email protected]>
---
 arch/arm/mach-tegra/pm.c            | 5 +++++
 arch/arm/mach-tegra/sleep-tegra20.S | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-tegra/pm.c +5 -0
index 523604d..398e932 100644
@@ -181,6 +181,11 @@ bool tegra_set_cpu_in_lp2(int phy_cpu_id)
 	return last_cpu;
 }
 
+int tegra_cpu_do_idle(void)
+{
+	return cpu_do_idle();
+}
+
 static int tegra_sleep_cpu(unsigned long v2p)
 {
 	/* Switch to the identity mapping. */
arch/arm/mach-tegra/sleep-tegra20.S +1 -1
index 9f6bfafd..e3f2417 100644
@@ -197,7 +197,7 @@ ENTRY(tegra20_sleep_cpu_secondary_finish)
 	mov	r3, #CPU_RESETTABLE
 	str	r3, [r0]
 
-	bl	cpu_do_idle
+	bl	tegra_cpu_do_idle
 
 	/*
 	 * cpu may be reset while in wfi, which will return through
Signature · 1 line
1.8.1.2
Tested-by on v1 6/21
#11 lore raw

Re: [PATCH 06/21] ARM: tegra: call cpu_do_idle from C code

Quoted 11 lines · Arnd Bergmann

When building a kernel for multiple CPU architecture levels, cpu_do_idle() is a macro for an indirect function call, which cannot be called from assembly code as Tegra does.

Adding a trivial C wrapper for this function lets us build a tegra kernel with ARMv6 support enabled.

Cc Joseph Lo <[email protected]>
Cc Stephen Warren <[email protected]>

---

Hi Arnd,

Thanks for fixing.

Joseph

author maintainer
#12 lore raw

PATCH 7/21 ARM: tegra: unify tegra_idle_device definitions

In reply to Arnd Bergmann

The three tegra variants (20, 30, 114) each define their own per-cpu variable for tegra_idle_device, which causes link errors when you build the kernel for more than one of them:

cpuidle-tegra30.o:(.discard+0x0): multiple definition of __pcpu_unique_tegra_idle_device' cpuidle-tegra20.o:(.discard+0x0): first defined here cpuidle-tegra114.o:(.discard+0x0): multiple definition of __pcpu_unique_tegra_idle_device' cpuidle-tegra20.o:(.discard+0x0): first defined here

By moving the variable into the common cpuidle.c file, we save a little bit of object code size and avoid that warning.
As a bonus, this patch also removes the unused "drv" variables in each of the three files that caused a warning since 0697598db "ARM: tegra:
cpuidle: remove useless initialization".

Cc Stephen Warren <[email protected]>
Cc Joseph Lo <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
---
 arch/arm/mach-tegra/cpuidle-tegra114.c | 5 ++---
 arch/arm/mach-tegra/cpuidle-tegra20.c  | 4 +---
 arch/arm/mach-tegra/cpuidle-tegra30.c  | 4 +---
 arch/arm/mach-tegra/cpuidle.c          | 2 ++
 arch/arm/mach-tegra/cpuidle.h          | 4 ++++
 5 files changed, 10 insertions(+), 9 deletions(-)
arch/arm/mach-tegra/cpuidle-tegra114.c +2 -3
index 0f4e8c4..09067a1 100644
@@ -20,6 +20,8 @@
 
 #include <asm/cpuidle.h>
 
+#include "cpuidle.h"
+
 static struct cpuidle_driver tegra_idle_driver = {
 	.name = "tegra_idle",
 	.owner = THIS_MODULE,
@@ -30,14 +32,11 @@ static struct cpuidle_driver tegra_idle_driver = {
 	},
 };
 
-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
 int __init tegra114_cpuidle_init(void)
 {
 	int ret;
 	unsigned int cpu;
 	struct cpuidle_device *dev;
-	struct cpuidle_driver *drv = &tegra_idle_driver;
 
 	ret = cpuidle_register_driver(&tegra_idle_driver);
 	if (ret) {
arch/arm/mach-tegra/cpuidle-tegra20.c +1 -3
index 825ced4..c811328 100644
@@ -36,6 +36,7 @@
 #include "iomap.h"
 #include "irq.h"
 #include "flowctrl.h"
+#include "cpuidle.h"
 
 #ifdef CONFIG_PM_SLEEP
 static bool abort_flag;
@@ -67,8 +68,6 @@ static struct cpuidle_driver tegra_idle_driver = {
 	.en_core_tk_irqen = 1,
 };
 
-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_SMP
 static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
@@ -220,7 +219,6 @@ int __init tegra20_cpuidle_init(void)
 	int ret;
 	unsigned int cpu;
 	struct cpuidle_device *dev;
-	struct cpuidle_driver *drv = &tegra_idle_driver;
 
 #ifdef CONFIG_PM_SLEEP
 	tegra_tear_down_cpu = tegra20_tear_down_cpu;
arch/arm/mach-tegra/cpuidle-tegra30.c +1 -3
index 8b50cf4..6187478 100644
@@ -33,6 +33,7 @@
 
 #include "pm.h"
 #include "sleep.h"
+#include "cpuidle.h"
 
 #ifdef CONFIG_PM_SLEEP
 static int tegra30_idle_lp2(struct cpuidle_device *dev,
@@ -65,8 +66,6 @@ static struct cpuidle_driver tegra_idle_driver = {
 	},
 };
 
-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
 #ifdef CONFIG_PM_SLEEP
 static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
 					   struct cpuidle_driver *drv,
@@ -160,7 +159,6 @@ int __init tegra30_cpuidle_init(void)
 	int ret;
 	unsigned int cpu;
 	struct cpuidle_device *dev;
-	struct cpuidle_driver *drv = &tegra_idle_driver;
 
 #ifdef CONFIG_PM_SLEEP
 	tegra_tear_down_cpu = tegra30_tear_down_cpu;
arch/arm/mach-tegra/cpuidle.c +2 -0
index 4b744c4..1bac560 100644
@@ -27,6 +27,8 @@
 #include "fuse.h"
 #include "cpuidle.h"
 
+DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
+
 static int __init tegra_cpuidle_init(void)
 {
 	int ret;
arch/arm/mach-tegra/cpuidle.h +4 -0
index d733f75..a4c5f17 100644
@@ -17,6 +17,10 @@
 #ifndef __MACH_TEGRA_CPUIDLE_H
 #define __MACH_TEGRA_CPUIDLE_H
 
+#include <linux/cpuidle.h>
+
+DECLARE_PER_CPU(struct cpuidle_device, tegra_idle_device);
+
 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
 int tegra20_cpuidle_init(void);
 #else
Signature · 1 line
1.8.1.2
#13 lore raw

Re: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

Quoted 15 lines · Arnd Bergmann

The three tegra variants (20, 30, 114) each define their own per-cpu variable for tegra_idle_device, which causes link errors when you build the kernel for more than one of them:

cpuidle-tegra30.o:(.discard+0x0): multiple definition of __pcpu_unique_tegra_idle_device' cpuidle-tegra20.o:(.discard+0x0): first defined here cpuidle-tegra114.o:(.discard+0x0): multiple definition of __pcpu_unique_tegra_idle_device' cpuidle-tegra20.o:(.discard+0x0): first defined here

By moving the variable into the common cpuidle.c file, we save a little bit of object code size and avoid that warning.
As a bonus, this patch also removes the unused "drv" variables in each of the three files that caused a warning since 0697598db "ARM: tegra:
cpuidle: remove useless initialization".

Quoted 6 lines
Cc Stephen Warren <[email protected]>
Cc Joseph Lo <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Rafael J. Wysocki <[email protected]>

---

Hi Arnd,

the patch sounds good but I think the side effect of the consolidation patchset [1] fixed that.

You can find these fixes in Rafael's tree:

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=4c637b2175a0dc65d533494225525c6c82d73293

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=e158f9da6974cc11bfab2246a9b10021af0e0d8a

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=c5106c9dea9a6022ab84c6cb1d4a0b19fc5af0e2

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=f040c26ffaa5e56f2bca427c719c9601a02e70e5

[1] http://www.spinics.net/lists/arm-kernel/msg239811.html

Quoted 122 lines
 arch/arm/mach-tegra/cpuidle-tegra114.c | 5 ++---
 arch/arm/mach-tegra/cpuidle-tegra20.c  | 4 +---
 arch/arm/mach-tegra/cpuidle-tegra30.c  | 4 +---
 arch/arm/mach-tegra/cpuidle.c          | 2 ++
 arch/arm/mach-tegra/cpuidle.h          | 4 ++++
 5 files changed, 10 insertions(+), 9 deletions(-)
arch/arm/mach-tegra/cpuidle-tegra114.c +2 -3
index 0f4e8c4..09067a1 100644
@@ -20,6 +20,8 @@
 
 #include <asm/cpuidle.h>
 
+#include "cpuidle.h"
+
 static struct cpuidle_driver tegra_idle_driver = {
 	.name = "tegra_idle",
 	.owner = THIS_MODULE,
@@ -30,14 +32,11 @@ static struct cpuidle_driver tegra_idle_driver = {
 	},
 };
 
-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
 int __init tegra114_cpuidle_init(void)
 {
 	int ret;
 	unsigned int cpu;
 	struct cpuidle_device *dev;
-	struct cpuidle_driver *drv = &tegra_idle_driver;
 
 	ret = cpuidle_register_driver(&tegra_idle_driver);
 	if (ret) {
arch/arm/mach-tegra/cpuidle-tegra20.c +1 -3
index 825ced4..c811328 100644
@@ -36,6 +36,7 @@
 #include "iomap.h"
 #include "irq.h"
 #include "flowctrl.h"
+#include "cpuidle.h"
 
 #ifdef CONFIG_PM_SLEEP
 static bool abort_flag;
@@ -67,8 +68,6 @@ static struct cpuidle_driver tegra_idle_driver = {
 	.en_core_tk_irqen = 1,
 };
 
-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_SMP
 static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
@@ -220,7 +219,6 @@ int __init tegra20_cpuidle_init(void)
 	int ret;
 	unsigned int cpu;
 	struct cpuidle_device *dev;
-	struct cpuidle_driver *drv = &tegra_idle_driver;
 
 #ifdef CONFIG_PM_SLEEP
 	tegra_tear_down_cpu = tegra20_tear_down_cpu;
arch/arm/mach-tegra/cpuidle-tegra30.c +1 -3
index 8b50cf4..6187478 100644
@@ -33,6 +33,7 @@
 
 #include "pm.h"
 #include "sleep.h"
+#include "cpuidle.h"
 
 #ifdef CONFIG_PM_SLEEP
 static int tegra30_idle_lp2(struct cpuidle_device *dev,
@@ -65,8 +66,6 @@ static struct cpuidle_driver tegra_idle_driver = {
 	},
 };
 
-static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
-
 #ifdef CONFIG_PM_SLEEP
 static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
 					   struct cpuidle_driver *drv,
@@ -160,7 +159,6 @@ int __init tegra30_cpuidle_init(void)
 	int ret;
 	unsigned int cpu;
 	struct cpuidle_device *dev;
-	struct cpuidle_driver *drv = &tegra_idle_driver;
 
 #ifdef CONFIG_PM_SLEEP
 	tegra_tear_down_cpu = tegra30_tear_down_cpu;
arch/arm/mach-tegra/cpuidle.c +2 -0
index 4b744c4..1bac560 100644
@@ -27,6 +27,8 @@
 #include "fuse.h"
 #include "cpuidle.h"
 
+DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
+
 static int __init tegra_cpuidle_init(void)
 {
 	int ret;
arch/arm/mach-tegra/cpuidle.h +4 -0
index d733f75..a4c5f17 100644
@@ -17,6 +17,10 @@
 #ifndef __MACH_TEGRA_CPUIDLE_H
 #define __MACH_TEGRA_CPUIDLE_H
 
+#include <linux/cpuidle.h>
+
+DECLARE_PER_CPU(struct cpuidle_device, tegra_idle_device);
+
 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
 int tegra20_cpuidle_init(void);
 #else
Signature · 5 lines
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
author maintainer
#14 lore raw

Re: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

#15 lore raw

Re: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

Quoted 12 lines · Arnd Bergmann
Quoted 11 lines · Daniel Lezcano

the patch sounds good but I think the side effect of the consolidation patchset [1] fixed that.

You can find these fixes in Rafael's tree:

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=4c637b2175a0dc65d533494225525c6c82d73293

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=e158f9da6974cc11bfab2246a9b10021af0e0d8a

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=c5106c9dea9a6022ab84c6cb1d4a0b19fc5af0e2

Quoted 7 lines
Quoted 4 lines

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=f040c26ffaa5e56f2bca427c719c9601a02e70e5

[1] http://www.spinics.net/lists/arm-kernel/msg239811.html

Ah. Is that not in linux-next? I created the patch today based on the latest linux-next from today (Tuesday).

Ah, ok. Actually the patches were taken by Rafael right today. So it is possible the changes were not reflected in linux-next yet.

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#16 lore raw

Re: [PATCH 07/21] ARM: tegra: unify tegra_idle_device definitions

Quoted 15 lines · Daniel Lezcano
Quoted 14 lines · Arnd Bergmann
Quoted 13 lines · Daniel Lezcano

the patch sounds good but I think the side effect of the consolidation patchset [1] fixed that.

You can find these fixes in Rafael's tree:

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=4c637b2175a0dc65d533494225525c6c82d73293

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=e158f9da6974cc11bfab2246a9b10021af0e0d8a

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=c5106c9dea9a6022ab84c6cb1d4a0b19fc5af0e2

https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&amp;id=f040c26ffaa5e56f2bca427c719c9601a02e70e5

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

[1] http://www.spinics.net/lists/arm-kernel/msg239811.html

Ah. Is that not in linux-next? I created the patch today based on the latest linux-next from today (Tuesday).

Ah, ok. Actually the patches were taken by Rafael right today. So it is possible the changes were not reflected in linux-next yet.

Hi Arnd and Daniel,

Thanks for taking care this.:)

Joseph

author maintainer
#17 lore raw

PATCH 8/21 ASoC: ux500: forward declare msp_i2s_platform_data

In reply to Arnd Bergmann

We get a lot of build warnings from the msp driver like:

In file included from sound/soc/ux500/ux500_msp_dai.h:21:0,

                 from sound/soc/ux500/mop500.c:25:
sound/soc/ux500/ux500_msp_i2s.h:546:11: warning: 'struct msp_i2s_platform_data' declared inside parameter list [enabled by default]
    struct msp_i2s_platform_data *platform_data);
           ^

sound/soc/ux500/ux500_msp_i2s.h:546:11: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

The easiest solution is to add a declaration of the struct name.

Cc Mark Brown <[email protected]>
Cc Lee Jones <[email protected]>
Cc Ola Lilja <[email protected]>
Cc alsa-devel at alsa-project.org
---
 sound/soc/ux500/ux500_msp_i2s.h | 1 +
 1 file changed, 1 insertion(+)
sound/soc/ux500/ux500_msp_i2s.h +1 -0
index 1311c0d..6f3e3dc 100644
@@ -543,6 +543,7 @@ struct ux500_msp_dma_params {
 	struct stedma40_chan_cfg *dma_cfg;
 };
 
+struct msp_i2s_platform_data;
 int ux500_msp_i2s_init_msp(struct platform_device *pdev,
 			struct ux500_msp **msp_p,
 			struct msp_i2s_platform_data *platform_data);
Signature · 1 line
1.8.1.2
maintainer Applied
#18 lore raw

Re: [PATCH 08/21] ASoC: ux500: forward declare msp_i2s_platform_data

Quoted 1 line · Arnd Bergmann

We get a lot of build warnings from the msp driver like:

Applied, thanks.

author maintainer
#19 lore raw

PATCH 9/21 spi/sirf: fix MODULE_DEVICE_TABLE

In reply to Arnd Bergmann

This fixes building the spi-sirf driver as a loadable module, which uses an incorrect MODULE_DEVICE_TABLE, by changing the reference to the correct symbol.

Cc Grant Likely <[email protected]>
Cc Mark Brown <[email protected]>
Cc spi-devel-general at lists.sourceforge.net
Cc Barry Song <[email protected]>
---
 drivers/spi/spi-sirf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-sirf.c +1 -1
index f59d417..0808cd5 100644
@@ -660,7 +660,7 @@ static const struct of_device_id spi_sirfsoc_of_match[] = {
 	{ .compatible = "sirf,marco-spi", },
 	{}
 };
-MODULE_DEVICE_TABLE(of, sirfsoc_spi_of_match);
+MODULE_DEVICE_TABLE(of, spi_sirfsoc_of_match);
 
 static struct platform_driver spi_sirfsoc_driver = {
 	.driver = {
Signature · 1 line
1.8.1.2
maintainer
#20 lore raw

Re: [PATCH 09/21] spi/sirf: fix MODULE_DEVICE_TABLE

Quoted 3 lines · Arnd Bergmann

This fixes building the spi-sirf driver as a loadable module, which uses an incorrect MODULE_DEVICE_TABLE, by changing the reference to the correct symbol.

Applied, thanks.
-------------- 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/20130423/372e6fbb/attachment.sig>

author maintainer
#21 lore raw

PATCH 10/21 ssb: fix alignment of struct bcma_device_id

In reply to Arnd Bergmann

The ARM OABI and EABI disagree on the alignment of structures with small members, so module init tools may interpret the ssb device table incorrectly, as shown by this warning when building the b43 device driver in an OABI kernel:

FATAL: drivers/net/wireless/b43/b43: sizeof(struct ssb_device_id)=6 is not a modulo of the size of section __mod_ssb_device_table=88.

Forcing the default (EABI) alignment on the structure makes this problem go away. Since the ssb_device_id may have the same problem, better fix both structures.

Cc Russell King <[email protected]>
Cc John W. Linville <[email protected]>
Cc Michael Buesch <[email protected]>
Cc Larry Finger <[email protected]>
---
 include/linux/mod_devicetable.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/mod_devicetable.h +3 -2
index 779cf7c..ce363a5 100644
@@ -360,7 +360,8 @@ struct ssb_device_id {
 	__u16	vendor;
 	__u16	coreid;
 	__u8	revision;
-};
+	__u8	__pad;
+} __attribute__((packed, aligned(2)));
 #define SSB_DEVICE(_vendor, _coreid, _revision)  \
 	{ .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
 #define SSB_DEVTABLE_END  \
@@ -376,7 +377,7 @@ struct bcma_device_id {
 	__u16	id;
 	__u8	rev;
 	__u8	class;
-};
+} __attribute__((packed,aligned(2)));
 #define BCMA_CORE(_manuf, _id, _rev, _class)  \
 	{ .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
 #define BCMA_CORETABLE_END  \
Signature · 1 line
1.8.1.2
author maintainer
#22 lore raw

PATCH 11/21 drm/tilcdc: use only a single module device table

In reply to Arnd Bergmann

The tilcdc driver fails to be built as a module because of extraneous MODULE_DEVICE_TABLE entries:

drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of __mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of __mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here

Since the entire point of these entries is to make the module autoload when one of the devices is present, it's enough to keep the one entry for "ti,am33xx-tilcdc", which should always be there if any of the others are.

Cc Rob Clark <[email protected]>
Cc Dave Airlie <[email protected]>
Cc dri-devel at lists.freedesktop.org
---
 drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 1 -
 drivers/gpu/drm/tilcdc/tilcdc_slave.c  | 1 -
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 -
 3 files changed, 3 deletions(-)
drivers/gpu/drm/tilcdc/tilcdc_panel.c +0 -1
index 580b74e..eb99f42 100644
@@ -413,7 +413,6 @@ static struct of_device_id panel_of_match[] = {
 		{ .compatible = "ti,tilcdc,panel", },
 		{ },
 };
-MODULE_DEVICE_TABLE(of, panel_of_match);
 
 struct platform_driver panel_driver = {
 	.probe = panel_probe,
drivers/gpu/drm/tilcdc/tilcdc_slave.c +0 -1
index 568dc1c..db1d2fc 100644
@@ -353,7 +353,6 @@ static struct of_device_id slave_of_match[] = {
 		{ .compatible = "ti,tilcdc,slave", },
 		{ },
 };
-MODULE_DEVICE_TABLE(of, slave_of_match);
 
 struct platform_driver slave_driver = {
 	.probe = slave_probe,
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c +0 -1
index 58d487b..a36788f 100644
@@ -396,7 +396,6 @@ static struct of_device_id tfp410_of_match[] = {
 		{ .compatible = "ti,tilcdc,tfp410", },
 		{ },
 };
-MODULE_DEVICE_TABLE(of, tfp410_of_match);
 
 struct platform_driver tfp410_driver = {
 	.probe = tfp410_probe,
Signature · 1 line
1.8.1.2
Acked-by on v1 11/21
#23 lore raw

Re: [PATCH 11/21] drm/tilcdc: use only a single module device table

Quoted 10 lines · Arnd Bergmann

The tilcdc driver fails to be built as a module because of extraneous MODULE_DEVICE_TABLE entries:

drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of __mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of __mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here

Quoted 4 lines

Since the entire point of these entries is to make the module autoload when one of the devices is present, it's enough to keep the one entry for "ti,am33xx-tilcdc", which should always be there if any of the others are.

Thanks Arnd

Quoted 49 lines
---
 drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 1 -
 drivers/gpu/drm/tilcdc/tilcdc_slave.c  | 1 -
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 -
 3 files changed, 3 deletions(-)
drivers/gpu/drm/tilcdc/tilcdc_panel.c +0 -1
index 580b74e..eb99f42 100644
@@ -413,7 +413,6 @@ static struct of_device_id panel_of_match[] = {
                { .compatible = "ti,tilcdc,panel", },
                { },
 };
-MODULE_DEVICE_TABLE(of, panel_of_match);
 
 struct platform_driver panel_driver = {
        .probe = panel_probe,
drivers/gpu/drm/tilcdc/tilcdc_slave.c +0 -1
index 568dc1c..db1d2fc 100644
@@ -353,7 +353,6 @@ static struct of_device_id slave_of_match[] = {
                { .compatible = "ti,tilcdc,slave", },
                { },
 };
-MODULE_DEVICE_TABLE(of, slave_of_match);
 
 struct platform_driver slave_driver = {
        .probe = slave_probe,
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c +0 -2
index 58d487b..a36788f 100644
@@ -396,7 +396,6 @@ static struct of_device_id tfp410_of_match[] = {
                { .compatible = "ti,tilcdc,tfp410", },
                { },
 };
-MODULE_DEVICE_TABLE(of, tfp410_of_match);
 
 struct platform_driver tfp410_driver = {
        .probe = tfp410_probe,
--

1.8.1.2

author maintainer
#24 lore raw

PATCH 12/21 mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

In reply to Arnd Bergmann

The symbol referenced in MODULE_DEVICE_TABLE must match the actual table, otherwise we get a build error like

sdhci-tegra.c:206:34: error: '__mod_of_device_table' aliased to undefined symbol 'sdhci_dt_ids'

Cc Stephen Warren <[email protected]>
Cc Chris Ball <[email protected]>
---
 drivers/mmc/host/sdhci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-tegra.c +1 -1
index 08b06e9..85052bf 100644
@@ -214,7 +214,7 @@ static const struct of_device_id sdhci_tegra_dt_match[] = {
 #endif
 	{}
 };
-MODULE_DEVICE_TABLE(of, sdhci_dt_ids);
+MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match);
 
 static void sdhci_tegra_parse_dt(struct device *dev,
 					struct sdhci_tegra *tegra_host)
Signature · 1 line
1.8.1.2
Acked-by on v1 12/21
#25 lore raw

Re: [PATCH 12/21] mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

Hi Arnd,

Quoted 17 lines · Arnd Bergmann

The symbol referenced in MODULE_DEVICE_TABLE must match the actual table, otherwise we get a build error like

sdhci-tegra.c:206:34: error: '__mod_of_device_table' aliased to undefined symbol 'sdhci_dt_ids'

Cc Stephen Warren <[email protected]>
Cc Chris Ball <[email protected]>
---
 drivers/mmc/host/sdhci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-tegra.c +0 -0
index 08b06e9..85052bf 100644

drivers/mmc/host/sdhci-tegra.c static const struct of_device_id sdhci_tegra_dt_match[] = { · line 220

Quoted 8 lines
drivers/mmc/host/sdhci-tegra.c +1 -1
@@ -214,7 +214,7 @@ static const struct of_device_id sdhci_tegra_dt_match[] = {
 #endif
 	{}
 };
-MODULE_DEVICE_TABLE(of, sdhci_dt_ids);
+MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match);
 
 static void sdhci_tegra_parse_dt(struct device *dev,
 					struct sdhci_tegra *tegra_host)

I was going to take this, but it doesn't apply to mmc-next or linux-next, because the #endif in your first line of context isn't present in those trees -- which tree is this based on?

Sounds like it might make more sense for you to take this; if so:

Thanks,

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
author maintainer
#26 lore raw

Re: [PATCH 12/21] mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

The symbol referenced in MODULE_DEVICE_TABLE must match the actual table, otherwise we get a build error like

sdhci-tegra.c:206:34: error: '__mod_of_device_table' aliased to undefined symbol 'sdhci_dt_ids'

Cc Stephen Warren <[email protected]>
Cc Chris Ball <[email protected]>

---

Quoted 3 lines · Chris Ball

I was going to take this, but it doesn't apply to mmc-next or linux-next, because the #endif in your first line of context isn't present in those trees -- which tree is this based on?

I based it on 3.9-rc8.

Quoted 2 lines

Sounds like it might make more sense for you to take this; if so:

This is the rebased version on linux-next. I think it's better if you take it, otherwise we just create a merge conflict for Linus.

drivers/mmc/host/sdhci-tegra.c +1 -1
index 45048d1..e0dba74 100644
@@ -203,7 +203,7 @@ static const struct of_device_id sdhci_tegra_dt_match[] = {
 	{ .compatible = "nvidia,tegra20-sdhci", .data = &soc_data_tegra20 },
 	{}
 };
-MODULE_DEVICE_TABLE(of, sdhci_dt_ids);
+MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match);
 
 static void sdhci_tegra_parse_dt(struct device *dev)
 {
#27 lore raw

Re: [PATCH 12/21] mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE

Hi,

Quoted 5 lines · Arnd Bergmann
Quoted 3 lines

I was going to take this, but it doesn't apply to mmc-next or linux-next, because the #endif in your first line of context isn't present in those trees -- which tree is this based on?

I based it on 3.9-rc8.

Thanks, I should have thought of that; applied to mmc-next for 3.10.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
author maintainer
#28 lore raw

PATCH 13/21 misc: mark spear13xx-pcie-gadget as broken

In reply to Arnd Bergmann

This driver was merged in 2.6.38 but never actually compiled because it depends on the <mach/pcie.h> header that has not made it into the kernel. Starting with Linux-3.10, this results in "allyesconfig" build errors, since spear13xx can now be enabled with the default "multiplatform" platform on ARM. Let's mark it as broken for now. If it doesn't get fixed, we can drop it completely.

Cc Pratyush Anand <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Jesse Barnes <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc Shiraz Hashim <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/misc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/Kconfig +1 -1
index e83fdfe..c74b13b 100644
@@ -398,7 +398,7 @@ config DS1682
 
 config SPEAR13XX_PCIE_GADGET
 	bool "PCIe gadget support for SPEAr13XX platform"
-	depends on ARCH_SPEAR13XX
+	depends on ARCH_SPEAR13XX && BROKEN
 	default n
 	help
 	 This option enables gadget support for PCIe controller. If
Signature · 1 line
1.8.1.2
Acked-by on v1 13/21
#29 lore raw

Re: [PATCH 13/21] misc: mark spear13xx-pcie-gadget as broken

Quoted 14 lines · Arnd Bergmann

This driver was merged in 2.6.38 but never actually compiled because it depends on the <mach/pcie.h> header that has not made it into the kernel. Starting with Linux-3.10, this results in "allyesconfig" build errors, since spear13xx can now be enabled with the default "multiplatform" platform on ARM. Let's mark it as broken for now. If it doesn't get fixed, we can drop it completely.

Cc Pratyush Anand <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Jesse Barnes <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc Shiraz Hashim <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Quoted 3 lines
---
 drivers/misc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

@Pratyush: Please see if we can get it fixed soon.

author maintainer
#30 lore raw

PATCH 14/21 staging: nvec: allow modular build

In reply to Arnd Bergmann

The serio code can be a loadable module, which in turn means that nvec also has to be a module, so mark it as "tristate" in Kconfig.

drivers/built-in.o: In function `nvec_mouse_remove':
drivers/staging/nvec/nvec_ps2.c:136: undefined reference to serio_unregister_port' drivers/built-in.o: In function nvec_mouse_probe':
drivers/staging/nvec/nvec_ps2.c:126: undefined reference to __serio_register_port' drivers/built-in.o: In function nvec_ps2_notifier':
drivers/staging/nvec/nvec_ps2.c:84: undefined reference to serio_interrupt' drivers/staging/nvec/nvec_ps2.c:91: undefined reference to serio_interrupt'

Cc Marc Dietrich <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/nvec/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/nvec/Kconfig +5 -5
index f779fdc..7e61ada 100644
@@ -1,5 +1,5 @@
 config MFD_NVEC
-	bool "NV Tegra Embedded Controller SMBus Interface"
+	tristate "NV Tegra Embedded Controller SMBus Interface"
 	depends on I2C && GPIOLIB && ARCH_TEGRA
 	select MFD_CORE
 	help
@@ -7,28 +7,28 @@ config MFD_NVEC
 	    controller.
 
 config KEYBOARD_NVEC
-	bool "Keyboard on nVidia compliant EC"
+	tristate "Keyboard on nVidia compliant EC"
 	depends on MFD_NVEC && INPUT
 	help
 	  Say Y here to enable support for a keyboard connected to 
 	  a nVidia compliant embedded controller.
 
 config SERIO_NVEC_PS2
-	bool "PS2 on nVidia EC"
+	tristate "PS2 on nVidia EC"
 	depends on MFD_NVEC && SERIO
 	help
 	  Say Y here to enable support for a Touchpad / Mouse connected
 	  to a nVidia compliant embedded controller.
 
 config NVEC_POWER
-	bool "NVEC charger and battery"
+	tristate "NVEC charger and battery"
 	depends on MFD_NVEC && POWER_SUPPLY
 	help
 	  Say Y to enable support for battery and charger interface for
 	  nVidia compliant embedded controllers.
 
 config NVEC_PAZ00
-	bool "Support for OEM specific functions on Compal PAZ00 based devices"
+	tristate "Support for OEM specific functions on Compal PAZ00 based devices"
 	depends on MFD_NVEC && LEDS_CLASS
 	help
 	  Say Y to enable control of the yellow side leds on Compal PAZ00 based
Signature · 1 line
1.8.1.2
maintainer
#31 lore raw

Re: [PATCH 14/21] staging: nvec: allow modular build

Arnd,

Quoted 2 lines · On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:

The serio code can be a loadable module, which in turn means that nvec also has to be a module, so mark it as "tristate" in Kconfig.

oh, I didn't saw this randconfig error posting. NVEC isn't prepared for modularized builds yet (it's on the TODO list though). So better say SERIO=y here. Looking a bit closer, there is other stuff which can also be a module (GPIOLIB, I2C, ...) so these also need a =y.

Should a post a patch?

Marc

Quoted 61 lines

drivers/built-in.o: In function `nvec_mouse_remove':
drivers/staging/nvec/nvec_ps2.c:136: undefined reference to serio_unregister_port' drivers/built-in.o: In function nvec_mouse_probe':
drivers/staging/nvec/nvec_ps2.c:126: undefined reference to __serio_register_port' drivers/built-in.o: In function nvec_ps2_notifier':
drivers/staging/nvec/nvec_ps2.c:84: undefined reference to serio_interrupt' drivers/staging/nvec/nvec_ps2.c:91: undefined reference to serio_interrupt'

Cc Marc Dietrich <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/nvec/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/nvec/Kconfig +5 -5
index f779fdc..7e61ada 100644
@@ -1,5 +1,5 @@
 config MFD_NVEC
-	bool "NV Tegra Embedded Controller SMBus Interface"
+	tristate "NV Tegra Embedded Controller SMBus Interface"
 	depends on I2C && GPIOLIB && ARCH_TEGRA
 	select MFD_CORE
 	help
@@ -7,28 +7,28 @@ config MFD_NVEC
 	    controller.
 
 config KEYBOARD_NVEC
-	bool "Keyboard on nVidia compliant EC"
+	tristate "Keyboard on nVidia compliant EC"
 	depends on MFD_NVEC && INPUT
 	help
 	  Say Y here to enable support for a keyboard connected to
 	  a nVidia compliant embedded controller.
 
 config SERIO_NVEC_PS2
-	bool "PS2 on nVidia EC"
+	tristate "PS2 on nVidia EC"
 	depends on MFD_NVEC && SERIO
 	help
 	  Say Y here to enable support for a Touchpad / Mouse connected
 	  to a nVidia compliant embedded controller.
 
 config NVEC_POWER
-	bool "NVEC charger and battery"
+	tristate "NVEC charger and battery"
 	depends on MFD_NVEC && POWER_SUPPLY
 	help
 	  Say Y to enable support for battery and charger interface for
 	  nVidia compliant embedded controllers.
 
 config NVEC_PAZ00
-	bool "Support for OEM specific functions on Compal PAZ00 based devices"
+	tristate "Support for OEM specific functions on Compal PAZ00 based

devices" depends on MFD_NVEC && LEDS_CLASS

drivers/staging/nvec/Kconfig +0 -0
 	help
 	  Say Y to enable control of the yellow side leds on Compal PAZ00 based
author maintainer
#32 lore raw

Re: [PATCH 14/21] staging: nvec: allow modular build

Quoted 8 lines · Marc Dietrich
Quoted 2 lines · On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:

The serio code can be a loadable module, which in turn means that nvec also has to be a module, so mark it as "tristate" in Kconfig.

oh, I didn't saw this randconfig error posting. NVEC isn't prepared for modularized builds yet (it's on the TODO list though). So better say SERIO=y here. Looking a bit closer, there is other stuff which can also be a module (GPIOLIB, I2C, ...) so these also need a =y.

What is the problem with building it as a module? It looks all fine in that regard.

I also did not see any problems with the other symbols, but that may be because they get turned on as built-in even in allmodconfig. Marking it as tristate certainly avoids the problem altogether.

Quoted 1 line

Should a post a patch?

If you have follow-on patches, they need to go on top now, since Greg already took this patch.

Arnd

maintainer
#33 lore raw

Re: [PATCH 14/21] staging: nvec: allow modular build

Quoted 5 lines · On Tuesday 23 April 2013 21:41:03 Arnd Bergmann wrote:
Quoted 4 lines · Marc Dietrich
Quoted 2 lines · On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:

The serio code can be a loadable module, which in turn means that nvec also has to be a module, so mark it as "tristate" in Kconfig.

Quoted 7 lines
Quoted 4 lines

oh, I didn't saw this randconfig error posting. NVEC isn't prepared for modularized builds yet (it's on the TODO list though). So better say SERIO=y here. Looking a bit closer, there is other stuff which can also be a module (GPIOLIB, I2C, ...) so these also need a =y.

What is the problem with building it as a module? It looks all fine in that regard.

It builds, but I haven't tried out it yet. At least the mfd children need to unregister the event notifier I guess. Anyway, I have no time to test this now, so I prefer to force =y for the dependencies for now.

Quoted 8 lines

I also did not see any problems with the other symbols, but that may be because they get turned on as built-in even in allmodconfig. Marking it as tristate certainly avoids the problem altogether.

Quoted 1 line

Should a post a patch?

If you have follow-on patches, they need to go on top now, since Greg already took this patch.

arrr, I wonder why Greg thought that a 4 minute review time is enough :-( I'll try to post a patch tomorrow then.

Marc

#34 lore raw

Re: [PATCH 14/21] staging: nvec: allow modular build

Quoted 22 lines · Marc Dietrich
Quoted 5 lines · On Tuesday 23 April 2013 21:41:03 Arnd Bergmann wrote:
Quoted 4 lines · Marc Dietrich
Quoted 2 lines · On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:

The serio code can be a loadable module, which in turn means that nvec also has to be a module, so mark it as "tristate" in Kconfig.

Quoted 7 lines
Quoted 4 lines

oh, I didn't saw this randconfig error posting. NVEC isn't prepared for modularized builds yet (it's on the TODO list though). So better say SERIO=y here. Looking a bit closer, there is other stuff which can also be a module (GPIOLIB, I2C, ...) so these also need a =y.

What is the problem with building it as a module? It looks all fine in that regard.

It builds, but I haven't tried out it yet. At least the mfd children need to unregister the event notifier I guess. Anyway, I have no time to test this now, so I prefer to force =y for the dependencies for now.

Quoted 4 lines

I also did not see any problems with the other symbols, but that may be because they get turned on as built-in even in allmodconfig. Marking it as tristate certainly avoids the problem altogether.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Should a post a patch?

If you have follow-on patches, they need to go on top now, since Greg already took this patch.

arrr, I wonder why Greg thought that a 4 minute review time is enough :-(

It was longer than 4 minutes...

I trust Arnd, and it's only a staging driver, what's the worse thing that could happen to it? :)

Quoted 1 line

I'll try to post a patch tomorrow then.

That would be great.

thanks,

greg k-h

author maintainer
#35 lore raw

Re: [PATCH 14/21] staging: nvec: allow modular build

In reply to Marc Dietrich
Quoted 3 lines · Marc Dietrich

It builds, but I haven't tried out it yet. At least the mfd children need to unregister the event notifier I guess. Anyway, I have no time to test this now, so I prefer to force =y for the dependencies for now.

Ah, so you can load it fine, but not safely unload it? In that case I think it's better to leave it as tristate but remove the module_exit() function to prevent unloading.

You'll have to change the module_platform_driver() back into a manual module_init() function to register the driver, but that sounds like the cleanest solution aside from fixing the notifier calls.

Arnd

maintainer
#36 lore raw

Re: [PATCH 14/21] staging: nvec: allow modular build

Quoted 5 lines · On Tuesday 23 April 2013 22:14:18 Arnd Bergmann wrote:
Quoted 3 lines · Marc Dietrich

It builds, but I haven't tried out it yet. At least the mfd children need to unregister the event notifier I guess. Anyway, I have no time to test this now, so I prefer to force =y for the dependencies for now.

Quoted 7 lines

Ah, so you can load it fine, but not safely unload it? In that case I think it's better to leave it as tristate but remove the module_exit() function to prevent unloading.

You'll have to change the module_platform_driver() back into a manual module_init() function to register the driver, but that sounds like the cleanest solution aside from fixing the notifier calls.

ok, I'll look into it - maybe I can also fix unloading.

Thanks!

Marc

author maintainer
#37 lore raw

PATCH 15/21 staging: comedi/dawboard2000: use mdelay for large delays

In reply to Arnd Bergmann

On ARM, it is not legal to pass values larger than 2ms into udelay(), and mdelay() must be used instead, to avoid this build error:

ERROR: "__bad_udelay" [drivers/staging/comedi/drivers/daqboard2000.ko] undefined!

On a related note, any use of mdelay() or large udelay() numbers should be carefully reviewed, and replaced with msleep() or a different implementation that does not rely on delaying the work.

Cc H Hartley Sweeten <[email protected]>
Cc Ian Abbott <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/drivers/daqboard2000.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/comedi/drivers/daqboard2000.c +7 -7
index 50b450f..b213e36 100644
@@ -462,9 +462,9 @@ static void daqboard2000_resetLocalBus(struct comedi_device *dev)
 	struct daqboard2000_private *devpriv = dev->private;
 
 	writel(DAQBOARD2000_SECRLocalBusHi, devpriv->plx + 0x6c);
-	udelay(10000);
+	mdelay(10);
 	writel(DAQBOARD2000_SECRLocalBusLo, devpriv->plx + 0x6c);
-	udelay(10000);
+	mdelay(10);
 }
 
 static void daqboard2000_reloadPLX(struct comedi_device *dev)
@@ -472,11 +472,11 @@ static void daqboard2000_reloadPLX(struct comedi_device *dev)
 	struct daqboard2000_private *devpriv = dev->private;
 
 	writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
-	udelay(10000);
+	mdelay(10);
 	writel(DAQBOARD2000_SECRReloadHi, devpriv->plx + 0x6c);
-	udelay(10000);
+	mdelay(10);
 	writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
-	udelay(10000);
+	mdelay(10);
 }
 
 static void daqboard2000_pulseProgPin(struct comedi_device *dev)
@@ -484,9 +484,9 @@ static void daqboard2000_pulseProgPin(struct comedi_device *dev)
 	struct daqboard2000_private *devpriv = dev->private;
 
 	writel(DAQBOARD2000_SECRProgPinHi, devpriv->plx + 0x6c);
-	udelay(10000);
+	mdelay(10);
 	writel(DAQBOARD2000_SECRProgPinLo, devpriv->plx + 0x6c);
-	udelay(10000);	/* Not in the original code, but I like symmetry... */
+	mdelay(10);	/* Not in the original code, but I like symmetry... */
 }
 
 static int daqboard2000_pollCPLD(struct comedi_device *dev, int mask)
Signature · 1 line
1.8.1.2
Reviewed-by on v1 15/21
#38 lore raw

RE: [PATCH 15/21] staging: comedi/dawboard2000: use mdelay for large delays

Quoted 1 line · Arnd Bergmann

Subject: [PATCH 15/21] staging: comedi/dawboard2000: use mdelay for large delays

Nit.. Typo in subject.

Quoted 6 lines

On ARM, it is not legal to pass values larger than 2ms into udelay(), and mdelay() must be used instead, to avoid this build error:

ERROR: "__bad_udelay" [drivers/staging/comedi/drivers/daqboard2000.ko] undefined!

Quoted 8 lines

On a related note, any use of mdelay() or large udelay() numbers should be carefully reviewed, and replaced with msleep() or a different implementation that does not rely on delaying the work.

Cc H Hartley Sweeten <[email protected]>
Cc Ian Abbott <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

Thanks,
Hartley

author maintainer
#39 lore raw

PATCH 16/21 staging/zsmalloc: don't use pgtable-mapping from modules

In reply to Arnd Bergmann

Building zsmalloc as a module does not work on ARM because it uses an interface that is not exported:

ERROR: "flush_tlb_kernel_range" [drivers/staging/zsmalloc/zsmalloc.ko] undefined!

Since this is only used as a performance optimization and only on ARM, we can avoid the problem simply by not using that optimization when building zsmalloc it is a loadable module.

flush_tlb_kernel_range is often an inline function, but out of the architectures that use an extern function, only powerpc exports it.

Cc Greg Kroah-Hartman <[email protected]>
Cc Seth Jennings <[email protected]>
Cc Nitin Gupta <[email protected]>
---
 drivers/staging/zsmalloc/zsmalloc-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/zsmalloc/zsmalloc-main.c +1 -1
index e78d262..291c1d8 100644
@@ -225,7 +225,7 @@ struct zs_pool {
  * so that USE_PGTABLE_MAPPING is defined. This causes zsmalloc to use
  * page table mapping rather than copying for object mapping.
 */
-#if defined(CONFIG_ARM)
+#if defined(CONFIG_ARM) && !defined(MODULE)
 #define USE_PGTABLE_MAPPING
 #endif
 
Signature · 1 line
1.8.1.2
author maintainer
#40 lore raw

PATCH 17/21 tty/serial/sirf: fix MODULE_DEVICE_TABLE

In reply to Arnd Bergmann

This fixes building the sirfsorc-uart driver as a loadable module, which uses an incorrect MODULE_DEVICE_TABLE, by changing the reference to the correct symbol.

Cc Greg Kroah-Hartman <[email protected]>
Cc Jiri Slaby <[email protected]>
---
 drivers/tty/serial/sirfsoc_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sirfsoc_uart.c +1 -1
index 6bbfe99..03465b6 100644
@@ -758,7 +758,7 @@ static struct of_device_id sirfsoc_uart_ids[] = {
 	{ .compatible = "sirf,marco-uart", },
 	{}
 };
-MODULE_DEVICE_TABLE(of, sirfsoc_serial_of_match);
+MODULE_DEVICE_TABLE(of, sirfsoc_uart_ids);
 
 static struct platform_driver sirfsoc_uart_driver = {
 	.probe		= sirfsoc_uart_probe,
Signature · 1 line
1.8.1.2
author maintainer
#41 lore raw

PATCH 18/21 usb: phy: tegra: don't call into tegra-ehci directly

In reply to Arnd Bergmann

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one, which does not work if one of them or both are loadable modules, resulting in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci driver pass two function pointers for callbacks that need to be called by the phy driver.

Cc Venu Byravarasu <[email protected]>
Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Stephen Warren <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/host/ehci-tegra.c     | 10 +++++-----
 drivers/usb/phy/tegra_usb_phy.c   | 13 +++++++++----
 include/linux/usb/tegra_usb_phy.h | 10 +++++-----
 3 files changed, 19 insertions(+), 14 deletions(-)
drivers/usb/host/ehci-tegra.c +5 -5
index 568aecc..07419e4 100644
@@ -610,7 +610,7 @@ static const struct dev_pm_ops tegra_ehci_pm_ops = {
 /* Bits of PORTSC1, which will get cleared by writing 1 into them */
 #define TEGRA_PORTSC1_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
 
-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
+static void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
 {
 	unsigned long val;
 	struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -621,9 +621,8 @@ void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
 	val |= TEGRA_USB_PORTSC1_PTS(pts_val & 3);
 	writel(val, base + TEGRA_USB_PORTSC1);
 }
-EXPORT_SYMBOL_GPL(tegra_ehci_set_pts);
 
-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
+static void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
 {
 	unsigned long val;
 	struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -636,7 +635,6 @@ void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
 		val &= ~TEGRA_USB_PORTSC1_PHCD;
 	writel(val, base + TEGRA_USB_PORTSC1);
 }
-EXPORT_SYMBOL_GPL(tegra_ehci_set_phcd);
 
 static u64 tegra_ehci_dma_mask = DMA_BIT_MASK(32);
 
@@ -733,7 +731,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 
 	tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
 					pdata->phy_config,
-					TEGRA_USB_PHY_MODE_HOST);
+					TEGRA_USB_PHY_MODE_HOST,
+					&tegra_ehci_set_pts,
+					tegra_ehci_set_phcd);
 	if (IS_ERR(tegra->phy)) {
 		dev_err(&pdev->dev, "Failed to open USB phy\n");
 		err = -ENXIO;
drivers/usb/phy/tegra_usb_phy.c +9 -4
index 5487d38..17d8112 100644
@@ -299,7 +299,7 @@ static void utmi_phy_clk_disable(struct tegra_usb_phy *phy)
 		val &= ~USB_SUSP_SET;
 		writel(val, base + USB_SUSP_CTRL);
 	} else
-		tegra_ehci_set_phcd(&phy->u_phy, true);
+		phy->set_phcd(&phy->u_phy, true);
 
 	if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID, 0) < 0)
 		pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
@@ -321,7 +321,7 @@ static void utmi_phy_clk_enable(struct tegra_usb_phy *phy)
 		val &= ~USB_SUSP_CLR;
 		writel(val, base + USB_SUSP_CTRL);
 	} else
-		tegra_ehci_set_phcd(&phy->u_phy, false);
+		phy->set_phcd(&phy->u_phy, false);
 
 	if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
 						     USB_PHY_CLK_VALID))
@@ -444,7 +444,7 @@ static int utmi_phy_power_on(struct tegra_usb_phy *phy)
 	utmi_phy_clk_enable(phy);
 
 	if (!phy->is_legacy_phy)
-		tegra_ehci_set_pts(&phy->u_phy, 0);
+		phy->set_pts(&phy->u_phy, 0);
 
 	return 0;
 }
@@ -688,7 +688,10 @@ static int	tegra_usb_phy_suspend(struct usb_phy *x, int suspend)
 }
 
 struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
-	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode)
+	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+	void (*set_pts)(struct usb_phy *x, u8 pts_val),
+	void (*set_phcd)(struct usb_phy *x, bool enable))
+
 {
 	struct tegra_usb_phy *phy;
 	unsigned long parent_rate;
@@ -707,6 +710,8 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
 	phy->dev = dev;
 	phy->is_legacy_phy =
 		of_property_read_bool(np, "nvidia,has-legacy-mode");
+	phy->set_pts = set_pts;
+	phy->set_phcd = set_phcd;
 	err = of_property_match_string(np, "phy_type", "ulpi");
 	if (err < 0)
 		phy->is_ulpi_phy = false;
include/linux/usb/tegra_usb_phy.h +5 -5
index 9ebebe9..1b7519a 100644
@@ -61,10 +61,14 @@ struct tegra_usb_phy {
 	struct device *dev;
 	bool is_legacy_phy;
 	bool is_ulpi_phy;
+	void (*set_pts)(struct usb_phy *x, u8 pts_val);
+	void (*set_phcd)(struct usb_phy *x, bool enable);
 };
 
 struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
-	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode);
+	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+	void (*set_pts)(struct usb_phy *x, u8 pts_val),
+	void (*set_phcd)(struct usb_phy *x, bool enable));
 
 void tegra_usb_phy_preresume(struct usb_phy *phy);
 
@@ -75,8 +79,4 @@ void tegra_ehci_phy_restore_start(struct usb_phy *phy,
 
 void tegra_ehci_phy_restore_end(struct usb_phy *phy);
 
-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val);
-
-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable);
-
 #endif /* __TEGRA_USB_PHY_H */
Signature · 1 line
1.8.1.2
maintainer
#42 lore raw

Re: [PATCH 18/21] usb: phy: tegra: don't call into tegra-ehci directly

Quoted 16 lines · Arnd Bergmann

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one, which does not work if one of them or both are loadable modules, resulting in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci driver pass two function pointers for callbacks that need to be called by the phy driver.

drivers/usb/host/ehci-tegra.c static int tegra_ehci_probe(struct platform_device *pdev) · line 736

Quoted 7 lines
drivers/usb/host/ehci-tegra.c +3 -1
@@ -733,7 +731,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 
 	tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
 					pdata->phy_config,
-					TEGRA_USB_PHY_MODE_HOST);
+					TEGRA_USB_PHY_MODE_HOST,
+					&tegra_ehci_set_pts,
+					tegra_ehci_set_phcd);

Does the compiler warn about the unnecessary '&'? In any case, it looks strange to have one function pointer with an '&' and another without.

Aside from that minor detail, the ehci-tegra.c changes are fine.

Alan Stern

author maintainer
#43 lore raw

Re: [PATCH 18/21] usb: phy: tegra: don't call into tegra-ehci directly

Quoted 4 lines · Alan Stern
Quoted 2 lines · Arnd Bergmann
(quoted diff) +0 -0
@@ -733,7 +731,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 
Quoted 8 lines

drivers/usb/host/ehci-tegra.c static int tegra_ehci_probe(struct platform_device *pdev) · line 736

Quoted 6 lines
drivers/usb/host/ehci-tegra.c +3 -1
 	tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
 					pdata->phy_config,
-					TEGRA_USB_PHY_MODE_HOST);
+					TEGRA_USB_PHY_MODE_HOST,
+					&tegra_ehci_set_pts,
+					tegra_ehci_set_phcd);

Does the compiler warn about the unnecessary '&'?

No, AFAIK, both variants are equally acceptable C.

Quoted 3 lines

In any case, it
looks strange to have one function pointer with an '&' and another without.

Yes, that was certainly not intentional. I've removed the '&' now.

Quoted 1 line

Aside from that minor detail, the ehci-tegra.c changes are fine.

Ok, thanks for the feedback.

Arnd

#44 lore raw

Re: [PATCH 18/21] usb: phy: tegra: don't call into tegra-ehci directly

In reply to Arnd Bergmann
Quoted 22 lines · Arnd Bergmann

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one, which does not work if one of them or both are loadable modules, resulting in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci driver pass two function pointers for callbacks that need to be called by the phy driver.

Cc Venu Byravarasu <[email protected]>
Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Stephen Warren <[email protected]>
Cc linux-usb at vger.kernel.org
Quoted 5 lines
---
 drivers/usb/host/ehci-tegra.c     | 10 +++++-----
 drivers/usb/phy/tegra_usb_phy.c   | 13 +++++++++----
 include/linux/usb/tegra_usb_phy.h | 10 +++++-----
 3 files changed, 19 insertions(+), 14 deletions(-)

Not all of these files are in my usb-next tree, so I can't take this patch, sorry.

greg k-h

author maintainer
#45 lore raw

PATCH v2 1/1 usb: phy: tegra: don't call into tegra-ehci directly

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one, which does not work if one of them or both are loadable modules, resulting in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to tegra_ehci_set_phcd' drivers/built-in.o: In function utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci driver pass two function pointers for callbacks that need to be called by the phy driver.

Cc Venu Byravarasu <[email protected]>
Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Stephen Warren <[email protected]>
Cc linux-usb at vger.kernel.org

---

Quoted 7 lines · Greg Kroah-Hartman
Quoted 4 lines
 drivers/usb/host/ehci-tegra.c     | 10 +++++-----
 drivers/usb/phy/tegra_usb_phy.c   | 13 +++++++++----
 include/linux/usb/tegra_usb_phy.h | 10 +++++-----
 3 files changed, 19 insertions(+), 14 deletions(-)

Not all of these files are in my usb-next tree, so I can't take this patch, sorry.

Right. I created the patch again linux-next but then rebased the series to 3.9-rc8 for submission. I had not realized that the files got renamed between the trees.

Arnd

 drivers/usb/host/ehci-tegra.c     | 10 +++++-----
 drivers/usb/phy/phy-tegra-usb.c   | 13 +++++++++----
 include/linux/usb/tegra_usb_phy.h | 10 +++++-----
 3 files changed, 19 insertions(+), 14 deletions(-)
drivers/usb/host/ehci-tegra.c +5 -5
index ed201ae..e3eddc3 100644
@@ -611,7 +611,7 @@ static const struct dev_pm_ops tegra_ehci_pm_ops = {
 /* Bits of PORTSC1, which will get cleared by writing 1 into them */
 #define TEGRA_PORTSC1_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
 
-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
+static void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
 {
 	unsigned long val;
 	struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -622,9 +622,8 @@ void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val)
 	val |= TEGRA_USB_PORTSC1_PTS(pts_val & 3);
 	writel(val, base + TEGRA_USB_PORTSC1);
 }
-EXPORT_SYMBOL_GPL(tegra_ehci_set_pts);
 
-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
+static void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
 {
 	unsigned long val;
 	struct usb_hcd *hcd = bus_to_hcd(x->otg->host);
@@ -637,7 +636,6 @@ void tegra_ehci_set_phcd(struct usb_phy *x, bool enable)
 		val &= ~TEGRA_USB_PORTSC1_PHCD;
 	writel(val, base + TEGRA_USB_PORTSC1);
 }
-EXPORT_SYMBOL_GPL(tegra_ehci_set_phcd);
 
 static u64 tegra_ehci_dma_mask = DMA_BIT_MASK(32);
 
@@ -738,7 +736,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 
 	tegra->phy = tegra_usb_phy_open(&pdev->dev, instance, hcd->regs,
 					pdata->phy_config,
-					TEGRA_USB_PHY_MODE_HOST);
+					TEGRA_USB_PHY_MODE_HOST,
+					tegra_ehci_set_pts,
+					tegra_ehci_set_phcd);
 	if (IS_ERR(tegra->phy)) {
 		dev_err(&pdev->dev, "Failed to open USB phy\n");
 		err = -ENXIO;
drivers/usb/phy/phy-tegra-usb.c +9 -4
index 5487d38..17d8112 100644
@@ -299,7 +299,7 @@ static void utmi_phy_clk_disable(struct tegra_usb_phy *phy)
 		val &= ~USB_SUSP_SET;
 		writel(val, base + USB_SUSP_CTRL);
 	} else
-		tegra_ehci_set_phcd(&phy->u_phy, true);
+		phy->set_phcd(&phy->u_phy, true);
 
 	if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID, 0) < 0)
 		pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
@@ -321,7 +321,7 @@ static void utmi_phy_clk_enable(struct tegra_usb_phy *phy)
 		val &= ~USB_SUSP_CLR;
 		writel(val, base + USB_SUSP_CTRL);
 	} else
-		tegra_ehci_set_phcd(&phy->u_phy, false);
+		phy->set_phcd(&phy->u_phy, false);
 
 	if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
 						     USB_PHY_CLK_VALID))
@@ -444,7 +444,7 @@ static int utmi_phy_power_on(struct tegra_usb_phy *phy)
 	utmi_phy_clk_enable(phy);
 
 	if (!phy->is_legacy_phy)
-		tegra_ehci_set_pts(&phy->u_phy, 0);
+		phy->set_pts(&phy->u_phy, 0);
 
 	return 0;
 }
@@ -688,7 +688,10 @@ static int	tegra_usb_phy_suspend(struct usb_phy *x, int suspend)
 }
 
 struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
-	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode)
+	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+	void (*set_pts)(struct usb_phy *x, u8 pts_val),
+	void (*set_phcd)(struct usb_phy *x, bool enable))
+
 {
 	struct tegra_usb_phy *phy;
 	unsigned long parent_rate;
@@ -707,6 +710,8 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
 	phy->dev = dev;
 	phy->is_legacy_phy =
 		of_property_read_bool(np, "nvidia,has-legacy-mode");
+	phy->set_pts = set_pts;
+	phy->set_phcd = set_phcd;
 	err = of_property_match_string(np, "phy_type", "ulpi");
 	if (err < 0)
 		phy->is_ulpi_phy = false;
include/linux/usb/tegra_usb_phy.h +5 -5
index 9ebebe9..1b7519a 100644
@@ -61,10 +61,14 @@ struct tegra_usb_phy {
 	struct device *dev;
 	bool is_legacy_phy;
 	bool is_ulpi_phy;
+	void (*set_pts)(struct usb_phy *x, u8 pts_val);
+	void (*set_phcd)(struct usb_phy *x, bool enable);
 };
 
 struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
-	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode);
+	void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
+	void (*set_pts)(struct usb_phy *x, u8 pts_val),
+	void (*set_phcd)(struct usb_phy *x, bool enable));
 
 void tegra_usb_phy_preresume(struct usb_phy *phy);
 
@@ -75,8 +79,4 @@ void tegra_ehci_phy_restore_start(struct usb_phy *phy,
 
 void tegra_ehci_phy_restore_end(struct usb_phy *phy);
 
-void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val);
-
-void tegra_ehci_set_phcd(struct usb_phy *x, bool enable);
-
 #endif /* __TEGRA_USB_PHY_H */
author maintainer
#46 lore raw

PATCH 19/21 usb: phy: don't mark usb_bind_phy as __init

In reply to Arnd Bergmann

It makes no sense for a symbol to be both exported and marked __init, because any users in modules would be calling this function after it gets discarded. Further, this patch revolves a section mismatch warning from usbhs_init_phys(), which is intentionally not marked __init:

WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from the function usbhs_init_phys() to the function .init.text:usb_bind_phy()

Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/otg/otg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/otg/otg.c +1 -1
index 2bd03d2..77346cf 100644
@@ -414,7 +414,7 @@ EXPORT_SYMBOL(usb_remove_phy);
  *
  * To be used by platform specific initialization code.
  */
-int __init usb_bind_phy(const char *dev_name, u8 index,
+int usb_bind_phy(const char *dev_name, u8 index,
 				const char *phy_dev_name)
 {
 	struct usb_phy_bind *phy_bind;
Signature · 1 line
1.8.1.2
#47 lore raw

Re: [PATCH 19/21] usb: phy: don't mark usb_bind_phy as __init

Quoted 9 lines · Arnd Bergmann

It makes no sense for a symbol to be both exported and marked __init, because any users in modules would be calling this function after it gets discarded. Further, this patch revolves a section mismatch warning from usbhs_init_phys(), which is intentionally not marked __init:

WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from the function usbhs_init_phys() to the function .init.text:usb_bind_phy()

Quoted 8 lines
Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/otg/otg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

What tree has this file? It's not mine :(

author maintainer
#48 lore raw

PATCH v2 1/1 usb: phy: don't mark usb_bind_phy as __init

It makes no sense for a symbol to be both exported and marked __init, because any users in modules would be calling this function after it gets discarded. Further, this patch revolves a section mismatch warning from usbhs_init_phys(), which is intentionally not marked __init:

WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from the function usbhs_init_phys() to the function .init.text:usb_bind_phy()

Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org

---

v2: rebased on linux-next

drivers/usb/phy/phy.c +1 -1
index f52c006..a9984c7 100644
@@ -413,7 +413,7 @@ EXPORT_SYMBOL_GPL(usb_remove_phy);
  *
  * To be used by platform specific initialization code.
  */
-int __init usb_bind_phy(const char *dev_name, u8 index,
+int usb_bind_phy(const char *dev_name, u8 index,
 				const char *phy_dev_name)
 {
 	struct usb_phy_bind *phy_bind;
#49 lore raw

Re: [PATCH v2] usb: phy: don't mark usb_bind_phy as __init

Quoted 9 lines · Arnd Bergmann

It makes no sense for a symbol to be both exported and marked __init, because any users in modules would be calling this function after it gets discarded. Further, this patch revolves a section mismatch warning from usbhs_init_phys(), which is intentionally not marked __init:

WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from the function usbhs_init_phys() to the function .init.text:usb_bind_phy()

Quoted 8 lines
Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org

---

v2: rebased on linux-next

not needed, Greg already has a patch doing exactly this in usb-next.

Signature · 8 lines
balbi
-------------- 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/20130423/a005dd4f/attachment.sig>
author maintainer
#50 lore raw

Re: [PATCH v2] usb: phy: don't mark usb_bind_phy as __init

Quoted 17 lines · Felipe Balbi
Quoted 16 lines · Arnd Bergmann

It makes no sense for a symbol to be both exported and marked __init, because any users in modules would be calling this function after it gets discarded. Further, this patch revolves a section mismatch warning from usbhs_init_phys(), which is intentionally not marked __init:

WARNING: vmlinux.o(.text+0x413f8): Section mismatch in reference from the function usbhs_init_phys() to the function .init.text:usb_bind_phy()

Cc Alan Stern <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org

---

Quoted 3 lines
Quoted 1 line

v2: rebased on linux-next

not needed, Greg already has a patch doing exactly this in usb-next.

Right, I see it now. I had checked today's linux-next but not usb-next or any of the other trees for stuff that was just applied today.

Arnd

author maintainer
#51 lore raw

PATCH 20/21 MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly

In reply to Arnd Bergmann

Apparently the ab8500_gpadc_sw_hw_convert function got renamed from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion", but the export for this function did not get changed at the same time, causing this allyesconfig error:

ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!

This patch fixes the export.

Cc M'boumba Cedric Madianga <[email protected]>
Cc Lee Jones <[email protected]>
Cc Mattias WALLIN <[email protected]>
Cc Michel JAOUEN <[email protected]>
Cc Samuel Ortiz <[email protected]>
---
 drivers/mfd/ab8500-gpadc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/ab8500-gpadc.c +1 -1
index 5f341a5..184df96 100644
@@ -269,7 +269,7 @@ int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel)
 
 	return voltage;
 }
-EXPORT_SYMBOL(ab8500_gpadc_convert);
+EXPORT_SYMBOL(ab8500_gpadc_sw_hw_convert);
 
 /**
  * ab8500_gpadc_read_raw() - gpadc read
Signature · 1 line
1.8.1.2
Acked-by on v1 20/21
#52 lore raw

Re: [PATCH 20/21] MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly

Quoted 8 lines · Arnd Bergmann

Apparently the ab8500_gpadc_sw_hw_convert function got renamed from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion", but the export for this function did not get changed at the same time, causing this allyesconfig error:

ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!

Quoted 8 lines

This patch fixes the export.

Cc M'boumba Cedric Madianga <[email protected]>
Cc Lee Jones <[email protected]>
Cc Mattias WALLIN <[email protected]>
Cc Michel JAOUEN <[email protected]>
Cc Samuel Ortiz <[email protected]>

Sam -> please pick this...

Yours,
Linus Walleij

Applied
#53 lore raw

Re: [PATCH 20/21] MFD: ab8500: export ab8500_gpadc_sw_hw_convert properly

In reply to Arnd Bergmann

Hi Arnd,

Quoted 16 lines · Arnd Bergmann

Apparently the ab8500_gpadc_sw_hw_convert function got renamed from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion", but the export for this function did not get changed at the same time, causing this allyesconfig error:

ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!

This patch fixes the export.

Cc M'boumba Cedric Madianga <[email protected]>
Cc Lee Jones <[email protected]>
Cc Mattias WALLIN <[email protected]>
Cc Michel JAOUEN <[email protected]>
Cc Samuel Ortiz <[email protected]>
Quoted 3 lines
---
 drivers/mfd/ab8500-gpadc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to mfd-next, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
author maintainer
#54 lore raw

PATCH 21/21 mtd: omap2: allow bulding as a module

In reply to Arnd Bergmann

The omap2 nand device driver calls into the the elm code, which can be a loadable module, and in that case it cannot be built-in itself. I can see no reason why the omap2 driver cannot also be a module, so let's make the option "tristate" in Kconfig to fix this allmodconfig build error:

ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined!
ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko] undefined!

Cc David Woodhouse <[email protected]>
Cc Artem Bityutskiy <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Afzal Mohammed <[email protected]>
Cc Russell King <[email protected]>
Cc linux-mtd at lists.infradead.org
---
 drivers/mtd/nand/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/Kconfig +1 -1
index 81bf5e5..106b55e 100644
@@ -109,7 +109,7 @@ config MTD_NAND_OMAP2
 
 config MTD_NAND_OMAP_BCH
 	depends on MTD_NAND && MTD_NAND_OMAP2 && ARCH_OMAP3
-	bool "Enable support for hardware BCH error correction"
+	tristate "Enable support for hardware BCH error correction"
 	default n
 	select BCH
 	select BCH_CONST_PARAMS
Signature · 1 line
1.8.1.2
maintainer Acked-by on v1 21/21
#55 lore raw

Re: [PATCH 21/21] mtd: omap2: allow bulding as a module

Quoted 25 lines · Arnd Bergmann

The omap2 nand device driver calls into the the elm code, which can be a loadable module, and in that case it cannot be built-in itself. I can see no reason why the omap2 driver cannot also be a module, so let's make the option "tristate" in Kconfig to fix this allmodconfig build error:

ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined!
ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko] undefined!

Cc David Woodhouse <[email protected]>
Cc Artem Bityutskiy <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Afzal Mohammed <[email protected]>
Cc Russell King <[email protected]>
Cc linux-mtd at lists.infradead.org
---
 drivers/mtd/nand/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/Kconfig +0 -0
index 81bf5e5..106b55e 100644

drivers/mtd/nand/Kconfig config MTD_NAND_OMAP2 · line 115

Quoted 8 lines
drivers/mtd/nand/Kconfig +1 -1
@@ -109,7 +109,7 @@ config MTD_NAND_OMAP2
 
 config MTD_NAND_OMAP_BCH
 	depends on MTD_NAND && MTD_NAND_OMAP2 && ARCH_OMAP3
-	bool "Enable support for hardware BCH error correction"
+	tristate "Enable support for hardware BCH error correction"
 	default n
 	select BCH
 	select BCH_CONST_PARAMS

While at it, you could also drop the "default n" as that's the default anyways.

Regards,

Tony

#56 lore raw

RE: [PATCH 21/21] mtd: omap2: allow bulding as a module

Quoted 11 lines · Arnd Bergmann
Quoted 8 lines

The omap2 nand device driver calls into the the elm code, which can be a loadable module, and in that case it cannot be built-in itself. I can see no reason why the omap2 driver cannot also be a module, so let's make the option "tristate" in Kconfig to fix this allmodconfig build error:

ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined!
ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko]

undefined!

Quoted 1 line

[Pekon]:
ELM module is required in for Hardware based ECC correction for NAND devices. And this driver has a very small foot-print.

The only cases this drives would _not_ be used are:
(a) Using S/W based ECC scheme, which have vey high CPU utilization
(b) Using single bit ECC scheme, which are becoming obsolete due to increasing NAND densities.
For most of the cases ELM module will be used with nand-driver. So there should be no harm in having this module as built-in, if not used in 10% of the use-cases.

Thus I think it's better to keep this module tied to GPMC module, rather than independent control via KConfig.
And user should just selects which ECC scheme he would like to use via DT, without worrying about KConfig options.

I'm working in cleaning up omap2-nand driver to remove some redundancies. So would like to know your feedback on same..

with regards, pekon

author maintainer
#57 lore raw

Re: [PATCH 21/21] mtd: omap2: allow bulding as a module

Quoted 12 lines · Pekon

[Pekon]:
ELM module is required in for Hardware based ECC correction for NAND devices. And this driver has a very small foot-print.

The only cases this drives would not be used are:
(a) Using S/W based ECC scheme, which have vey high CPU utilization
(b) Using single bit ECC scheme, which are becoming obsolete due to increasing NAND densities.
For most of the cases ELM module will be used with nand-driver. So there should be no harm in having this module as built-in, if not used in 10% of the use-cases.

Quoted 4 lines

Thus I think it's better to keep this module tied to GPMC module, rather than independent control via KConfig.
And user should just selects which ECC scheme he would like to use via DT, without worrying about KConfig options.

Sorry, I'm lost here and have no idea what you are actually suggesting we do. Can you phrase that as a patch?

Unless you come up with a better solution, I would still like to queue up my patch since it fixes an annoying bug and seems to have no downsides.

Quoted 2 lines

I'm working in cleaning up omap2-nand driver to remove some redundancies. So would like to know your feedback on same..

Sure, just Cc me on your patches.

Arnd