mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: new asm-offsets.h patch problems
Date: Sun, 11 Sep 2005 09:45:58 +0200	[thread overview]
Message-ID: <20050911074557.GA22452@mars.ravnborg.org> (raw)
In-Reply-To: <B8E391BBE9FE384DAA4C5C003888BE6F045A8DF3@scsmsx401.amr.corp.intel.com>

iHi Tony

> I'm sometimes ending up with just "#define IA64_TASK_SIZE 0"
> in include/asm-ia64/asm-offsets.h ... but only sometimes.
> 
> My build script does "make prepare; make -j8" ... so I guess
> there are some races in the parallel build?  The "make prepare"
> part used to do the full of build offsets.h, but now it just does
> the ia64 hack.
First an explanation why it doess less today.
The dependency chain looks like this now:

prepare-all
     |
     +---> prepare0
              |
              +--> prepare
              |
	      +--> prepare1
	              |
		      +---> prepare2
		               |
			       +--> prepare3

So executing `make prepare` will only do a subset of what is needed to do
the full build.
But make -j8 should not fail - and I have tried to find what dependency
is missing since you see this odd behaviour. So far with no luck.
Testing on my UP with an ia64 toolchain did not reveal the problem.

Do you recall why you have this make prepare step. It smells like a
workaround for a missing dependency somewhere.


But you put my attention on another matter. I recall several
cross-compile scripts that uses the 'make prepare' target,
and it will no longer behave as expected. So the only correct
solution for that issue is to move up the prepare target in the
dependency chain. But prepare0 needs stuff to be done in arch makefiles
so we cannot have a nameclash there. The solution I made was to rename
the remaining prepare targets in arch Makefile to archprepare.

Tony - can you test below patch and tell it this solve the problem you
see?

Changes outside top-level Makefile and ia64 Makefile is irellevant for
you.

	Sam

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -776,15 +776,16 @@ $(sort $(vmlinux-init) $(vmlinux-main)) 
 # Error messages still appears in the original language
 
 .PHONY: $(vmlinux-dirs)
-$(vmlinux-dirs): prepare-all scripts
+$(vmlinux-dirs): prepare scripts
 	$(Q)$(MAKE) $(build)=$@
 
 # Things we need to do before we recursively start building the kernel
-# or the modules are listed in "prepare-all".
+# or the modules are listed in "prepare".
 # A multi level approach is used. prepare1 is updated first, then prepare0.
-# prepare-all is the collection point for the prepare targets.
+# prepare is the collection point for the prepare targets.
+# prepare-all is old style and kept for compatibility with users build scripts
 
-.PHONY: prepare-all prepare prepare0 prepare1 prepare2 prepare3
+.PHONY: prepare-all prepare archprepare prepare0 prepare1 prepare2 prepare3
 
 # prepare3 is used to check if we are building in a separate output directory,
 # and if so do:
@@ -813,11 +814,11 @@ ifneq ($(KBUILD_MODULES),)
 	$(Q)mkdir -p $(MODVERDIR)
 endif
 
-prepare0: prepare prepare1 FORCE
+prepare0: archprepare prepare1 FORCE
 	$(Q)$(MAKE) $(build)=.
 
 # All the preparing..
-prepare-all: prepare0
+prepare prepare-all: prepare0
 
 #	Leave this as default for preprocessing vmlinux.lds.S, which is now
 #	done in arch/$(ARCH)/kernel/Makefile
@@ -908,7 +909,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_B
 
 # Target to prepare building external modules
 .PHONY: modules_prepare
-modules_prepare: prepare-all scripts
+modules_prepare: prepare scripts
 
 # Target to install modules
 .PHONY: modules_install
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -175,7 +175,7 @@ else
 endif
 	@touch $@
 
-prepare: maketools include/asm-arm/.arch
+archprepare: maketools include/asm-arm/.arch
 
 .PHONY: maketools FORCE
 maketools: include/linux/version.h FORCE
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -107,7 +107,7 @@ archclean:
 	rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img
 	rm -rf $(LD_SCRIPT).tmp
 
-prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch
+archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch
 
 # Create some links to make all tools happy
 $(SRC_ARCH)/.links:
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -82,7 +82,7 @@ unwcheck: vmlinux
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
 
-prepare:  include/asm-ia64/.offsets.h.stamp
+archprepare:  include/asm-ia64/.offsets.h.stamp
 
 include/asm-ia64/.offsets.h.stamp:
 	mkdir -p include/asm-ia64
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -105,7 +105,7 @@ archclean:
 	$(Q)$(MAKE) $(clean)=arch/ppc/boot
 	$(Q)rm -rf include3
 
-prepare: checkbin
+archprepare: checkbin
 
 # Temporary hack until we have migrated to asm-powerpc
 include/asm: include3/asm
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -152,7 +152,7 @@ endif
 	@touch $@
 
 
-prepare: maketools include/asm-sh/.cpu include/asm-sh/.mach
+archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach
 
 .PHONY: maketools FORCE
 maketools:  include/linux/version.h FORCE
diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile
--- a/arch/sh64/Makefile
+++ b/arch/sh64/Makefile
@@ -73,7 +73,7 @@ compressed: zImage
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
 
-prepare: arch/$(ARCH)/lib/syscalltab.h
+archprepare: arch/$(ARCH)/lib/syscalltab.h
 
 define filechk_gen-syscalltab
        (set -e; \
diff --git a/arch/um/Makefile b/arch/um/Makefile
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -108,7 +108,7 @@ else
 $(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch)
 endif
 
-prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS)
+archprepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS)
 
 LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -66,7 +66,7 @@ boot		:= arch/xtensa/boot
 
 archinc		:= include/asm-xtensa
 
-prepare: $(archinc)/.platform
+archprepare: $(archinc)/.platform
 
 # Update machine cpu and platform symlinks if something which affects
 # them changed.

  reply	other threads:[~2005-09-11  7:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-11  6:07 Luck, Tony
2005-09-11  7:45 ` Sam Ravnborg [this message]
2005-09-11 14:54 Luck, Tony
2005-09-11 20:39 Luck, Tony
2005-09-11 21:36 ` Sam Ravnborg
2005-09-11 21:48 Luck, Tony
2005-09-11 22:07 ` Sam Ravnborg
2005-09-12 16:00 Luck, Tony
2005-09-12 16:50 ` Al Viro
2005-09-12 19:01   ` Sam Ravnborg
2005-09-12 18:59 ` Sam Ravnborg
2005-09-13  0:08 ` Peter Chubb
2005-09-12 21:02 Luck, Tony
2005-09-12 23:17 ` Tony Luck
2005-09-13  0:14 Luck, Tony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050911074557.GA22452@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®