Skip to contentSkip to conversation

Kernel doesn't build on master (751797c)

PATCH In review Premi, Sanjeev 4 participants 9 messages Aug 19, 2009 – Sep 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Tony,

The kernel doesn't build with the latest patch on the master.
I had reported this missing endif in response to your patch yesterday as well.

Screenshot from my terminal is attached below.

Best regards,
Sanjeev

premi # git pull
Updating e087f6f..751797c
Fast forward

 arch/arm/plat-omap/include/mach/cpu.h |   35 +++++++++++---------------------
 1 files changed, 12 insertions(+), 23 deletions(-)

premi #
premi #
premi #
premi # make clean

  CLEAN   arch/arm/boot/compressed
  CLEAN   arch/arm/boot
  CLEAN   /db/psp_git/users/a0756819/linux-omap-2.6
  CLEAN   arch/arm/kernel
  CLEAN   drivers/char
  CLEAN   init
  CLEAN   kernel
  CLEAN   lib
  CLEAN   usr
  CLEAN   .tmp_versions
  CLEAN   include/asm-arm/mach-types.h vmlinux System.map .tmp_kallsyms1.S .tmp_kallsyms1.o .tmp_kallsyms2.S .tmp_kallsyms2.o .tmp_kallsyms3.S .tmp_kallsyms3.o .tmp_vmlinux1 .tmp_vmlinux2 .tmp_vmlinux3 .tmp_System.map
premi # make omap3_evm_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/basic/hash
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
premi # make uImage
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK     include/linux/version.h
  Generating include/asm-arm/mach-types.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
  GEN     include/linux/bounds.h
  CC      arch/arm/kernel/asm-offsets.s
  GEN     include/asm/asm-offsets.h
  CALL    scripts/checksyscalls.sh
<stdin>:1351:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1407:2: warning: #warning syscall pselect6 not implemented
<stdin>:1411:2: warning: #warning syscall ppoll not implemented
<stdin>:1451:2: warning: #warning syscall epoll_pwait not implemented
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/genksyms/lex.o
  HOSTCC  scripts/genksyms/parse.o
  HOSTLD  scripts/genksyms/genksyms
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  CC      init/main.o
In file included from arch/arm/plat-omap/include/mach/hardware.h:42,
                 from arch/arm/plat-omap/include/mach/irqs.h:564,
                 from /db/psp_git/users/a0756819/linux-omap-2.6/arch/arm/include/asm/irq.h:4,
                 from /db/psp_git/users/a0756819/linux-omap-2.6/arch/arm/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:10,
                 from include/linux/interrupt.h:12,
                 from include/linux/kernel_stat.h:8,
                 from init/main.c:33:
arch/arm/plat-omap/include/mach/cpu.h:30:1: error: unterminated #ifndef
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
#1 lore raw

PATCH 1/1 arch: arm: omap: terminate ifndef

There was a missing endif on cpu.h

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +2 -0
index 61dbe90..7a5f9e8 100644
@@ -422,3 +422,5 @@ IS_OMAP_TYPE(3430, 0x3430)
 
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
+
+#endif /* __ASM_ARCH_OMAP_CPU_H */
Signature · 1 line
1.6.3.3.385.g60647
#2 lore raw

RE: [PATCH] arch: arm: omap: terminate ifndef

Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Felipe Balbi
Sent: Wednesday, August 19, 2009 4:02 PM
To: [email protected]
Cc: Felipe Balbi
Subject: [PATCH] arch: arm: omap: terminate ifndef

There was a missing endif on cpu.h

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +0 -0
index 61dbe90..7a5f9e8 100644

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 426

Quoted 5 lines
arch/arm/plat-omap/include/mach/cpu.h +2 -0
@@ -422,3 +422,5 @@ IS_OMAP_TYPE(3430, 0x3430)
 
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
+
+#endif /* __ASM_ARCH_OMAP_CPU_H */

ACKed.
Have mentioned the same yesterday.

Best regards,
Sanjeev

Quoted 10 lines
Signature · 7 lines
1.6.3.3.385.g60647

--
To unsubscribe from this list: send the line "unsubscribe 
linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Re: [PATCH] arch: arm: omap: terminate ifndef

Quoted 24 lines · Premi, Sanjeev
Quoted 24 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Felipe Balbi
Sent: Wednesday, August 19, 2009 4:02 PM
To: [email protected]
Cc: Felipe Balbi
Subject: [PATCH] arch: arm: omap: terminate ifndef

There was a missing endif on cpu.h

---
 arch/arm/plat-omap/include/mach/cpu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/mach/cpu.h +0 -0
index 61dbe90..7a5f9e8 100644
@@ -422,3 +422,5 @@ IS_OMAP_TYPE(3430, 0x3430)
 
Quoted 7 lines

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 426

Quoted 4 lines
arch/arm/plat-omap/include/mach/cpu.h +2 -0
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
+
+#endif /* __ASM_ARCH_OMAP_CPU_H */

ACKed.
Have mentioned the same yesterday.

Sorry, I pushed that experimental patch accidentally while rebasing the upstream branches. I've pushed Felipe's fix now.

Tony

#4 lore raw

Patch missing in 2.6.32-rc1

Hi Tony,

Can you push this patch to 2.6.32-rc1?

7a8d53a0: arch: arm: omap: terminate ifndef

I was unable to refresh my patches against this baseline. OR, is it okay if I re-submit against the 'master'.

Best regards,
Sanjeev

#5 lore raw

Re: Patch missing in 2.6.32-rc1

Quoted 8 lines · Premi, Sanjeev

Hi Tony,

Can you push this patch to 2.6.32-rc1?

7a8d53a0: arch: arm: omap: terminate ifndef

I was unable to refresh my patches against this baseline. OR, is it okay if I re-submit against the 'master'.

Sorry, I was meaning to look where the mismatch really came from but forgot.

Looks like adding omap850 support added an #else without removing the #endif above it, and also removed another #endif in commit ae302f40061235f6bc58ae9ba02aa849d60223b5.

I added some more comments to your original patch, see below.

I did not notice earlier that adding omap850 also accidentally did both changes. So I was wondering where the second change came from..

Can you please check that this patch is still OK?

Regards,

Tony

Quoted 1 line

From 64fd0b5983e2b6f6bcf3ff66dc6b011b2c6d3c02 Mon Sep 17 00:00:00 2001

From: Sanjeev Premi <[email protected]>
Date: Tue, 29 Sep 2009 13:21:26 -0700
Subject: [PATCH] omap: Fix mismatched ifdefs

The #endif at end of the file was missing. However, an additional #else ... #endif was causing the compiler to keep going.

The problem was found when compiler started reporting the newly added inline functions were being reported as redeclared by the compiler.

This was caused by cd92204924fafbd5c7241dfd12ca3176d542e0c5 that added support for omap850. However, the patch accidentally removed the wrong ifdef:

# define cpu_is_omap730() 1

 # endif
 #endif
+#else
+# if defined(CONFIG_ARCH_OMAP850)
+#  undef  cpu_is_omap850
+#  define cpu_is_omap850()		1
+# endif
+#endif

...

void omap2_check_revision(void);

#endif /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
-
-#endif

Instead of removing removing the #endif at the end of the file, the #endif before #else should have been removed.

arch/arm/plat-omap/include/mach/cpu.h +2 -1
index 11e73d9..1acc4ec 100644
@@ -317,7 +317,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #  undef  cpu_is_omap730
 #  define cpu_is_omap730()		1
 # endif
-#endif
 #else
 # if defined(CONFIG_ARCH_OMAP850)
 #  undef  cpu_is_omap850
@@ -433,3 +432,5 @@ IS_OMAP_TYPE(3430, 0x3430)
 
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
+
+#endif
#6 lore raw

Re: Patch missing in 2.6.32-rc1

2009/9/29 Tony Lindgren <[email protected]>:

Quoted 10 lines · Premi, Sanjeev
Quoted 8 lines

Hi Tony,

Can you push this patch to 2.6.32-rc1?

7a8d53a0:  arch: arm: omap: terminate ifndef

I was unable to refresh my patches against this baseline. OR, is it okay if I re-submit against the 'master'.

Quoted 6 lines

Sorry, I was meaning to look where the mismatch really came from but forgot.

Looks like adding omap850 support added an #else without removing the #endif above it, and also removed another #endif in commit ae302f40061235f6bc58ae9ba02aa849d60223b5.

The #else immediately after the removed #endif needs to go as well, because the block that the #endif(s) belongs to already has an #else.

That means the bug not only caused everything after the extra #endif to have no multiple inclusion protection (causing the redefinitions), but the extra #else also caused cpu_is_omap850() to be true only when cpu.h was included twice.

Thanks,

Signature · 6 lines
Alistair Buxton
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

PATCH 1/1 omap: Fix incorrect 730 vs 850 detection, v2 (Re: Patch missing in 2.6.32-rc1)

Quoted 18 lines · Alistair Buxton

2009/9/29 Tony Lindgren <[email protected]>:

Quoted 10 lines · Premi, Sanjeev
Quoted 8 lines

Hi Tony,

Can you push this patch to 2.6.32-rc1?

7a8d53a0:  arch: arm: omap: terminate ifndef

I was unable to refresh my patches against this baseline. OR, is it okay if I re-submit against the 'master'.

Quoted 6 lines

Sorry, I was meaning to look where the mismatch really came from but forgot.

Looks like adding omap850 support added an #else without removing the #endif above it, and also removed another #endif in commit ae302f40061235f6bc58ae9ba02aa849d60223b5.

Quoted 7 lines

The #else immediately after the removed #endif needs to go as well, because the block that the #endif(s) belongs to already has an #else.

That means the bug not only caused everything after the extra #endif to have no multiple inclusion protection (causing the redefinitions), but the extra #else also caused cpu_is_omap850() to be true only when cpu.h was included twice.

Ah, right! So we're back to http://patchwork.kernel.org/patch/42292/
and we also need to add back the missing #endif to the end of file file.

Here's an updated version of 42292, hopefully this will do the trick.

Regards,

Tony

Quoted 1 line

From 980dda1d160a665c4cbe62c583333448449573a4 Mon Sep 17 00:00:00 2001

From: Tony Lindgren <[email protected]>
Date: Tue, 29 Sep 2009 17:22:11 -0700
Subject: [PATCH] omap: Fix incorrect 730 vs 850 detection

Commit cd92204924fafbd5c7241dfd12ca3176d542e0c5 added support for omap850. However, the patch accidentally removed the wrong ifdef:

# define cpu_is_omap730() 1

 # endif
 #endif
+#else
+# if defined(CONFIG_ARCH_OMAP850)
+#  undef  cpu_is_omap850
+#  define cpu_is_omap850()		1
+# endif
+#endif

...

void omap2_check_revision(void);

#endif /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
-
-#endif

Instead of removing removing the #endif at the end of the file, the #endif before #else should have been removed.

But we cannot have multiple #else statements as pointed out by Alistair Buxton <[email protected]>. So the fix is to:

- remove the non-multi-omap special handling, as we need to detect between omap730 and omap850 anyways.

- add the missing #endif back to the end of the file

arch/arm/plat-omap/include/mach/cpu.h +14 -23
index 11e73d9..f129efb 100644
@@ -303,32 +303,21 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2430()		0
 #define cpu_is_omap3430()		0
 
-#if defined(MULTI_OMAP1)
-# if defined(CONFIG_ARCH_OMAP730)
-#  undef  cpu_is_omap730
-#  define cpu_is_omap730()		is_omap730()
-# endif
-# if defined(CONFIG_ARCH_OMAP850)
-#  undef  cpu_is_omap850
-#  define cpu_is_omap850()		is_omap850()
-# endif
-#else
-# if defined(CONFIG_ARCH_OMAP730)
-#  undef  cpu_is_omap730
-#  define cpu_is_omap730()		1
-# endif
-#endif
-#else
-# if defined(CONFIG_ARCH_OMAP850)
-#  undef  cpu_is_omap850
-#  define cpu_is_omap850()		1
-# endif
-#endif
-
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
- * between 330 vs. 1510 and 1611B/5912 vs. 1710.
+ * between 730 vs 850, 330 vs. 1510 and 1611B/5912 vs. 1710.
  */
+
+#if defined(CONFIG_ARCH_OMAP730)
+# undef  cpu_is_omap730
+# define cpu_is_omap730()		is_omap730()
+#endif
+
+#if defined(CONFIG_ARCH_OMAP850)
+# undef  cpu_is_omap850
+# define cpu_is_omap850()		is_omap850()
+#endif
+
 #if defined(CONFIG_ARCH_OMAP15XX)
 # undef  cpu_is_omap310
 # undef  cpu_is_omap1510
@@ -433,3 +422,5 @@ IS_OMAP_TYPE(3430, 0x3430)
 
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
+
+#endif
#8 lore raw

RE: [PATCH] omap: Fix incorrect 730 vs 850 detection, v2 (Re: Patch missing in 2.6.32-rc1)

Quoted 35 lines

-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Wednesday, September 30, 2009 6:02 AM
To: Alistair Buxton
Cc: Premi, Sanjeev; [email protected]
Subject: [PATCH] omap: Fix incorrect 730 vs 850 detection, v2 (Re: Patch missing in 2.6.32-rc1)

Quoted 14 lines · Alistair Buxton

2009/9/29 Tony Lindgren <[email protected]>:

Quoted 13 lines · Premi, Sanjeev
Quoted 8 lines

Hi Tony,

Can you push this patch to 2.6.32-rc1?

7a8d53a0:  arch: arm: omap: terminate ifndef

I was unable to refresh my patches against this baseline. OR, is it okay if I re-submit against the 'master'.

Sorry, I was meaning to look where the mismatch really came from but forgot.

Quoted 6 lines
Quoted 3 lines

Looks like adding omap850 support added an #else without removing the #endif above it, and also removed another #endif in commit ae302f40061235f6bc58ae9ba02aa849d60223b5.

The #else immediately after the removed #endif needs to go as well, because the block that the #endif(s) belongs to already has

an #else.

Quoted 3 lines

That means the bug not only caused everything after the extra #endif to have no multiple inclusion protection (causing the

redefinitions),

Quoted 1 line

but the extra #else also caused cpu_is_omap850() to be true

Quoted 8 lines

only when

Quoted 1 line

cpu.h was included twice.

Ah, right! So we're back to http://patchwork.kernel.org/patch/42292/
and we also need to add back the missing #endif to the end of file file.

Here's an updated version of 42292, hopefully this will do the trick.

[sp] Tested working fine for me.

Quoted 5 lines

Regards,

Tony
--

To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html