dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

506 Commits

Author SHA1 Message Date
Linus Torvalds 8b1fae4e42 Linux 2.6.28-rc8 2008-12-10 15:11:51 -08:00
Sam Ravnborg 5e53879008 sparc,sparc64: unify Makefile
To unify Makefile for sparc and sparc64 a few other steps was needed:
1) separate defconfig files for sparc and sparc64 is required,
   so locate these in arch/sparc/configs
2) removoval of hack in toplevel Makefile to deal with that
   headers was in a separate directory compared to the rest

The unification of the Makefile required usage of several

    foo-$(CONFIG_SPARCnn) +=

due to a few directories pending unification.
This will be cleaned up when we unify the remaining directories.

Included in this patch are the deletion of a few files in
sparc64 as they are no longer needed: Makefile + Kconfig.
arch/sparc64/ will after this patch is applied only
have four directories (prom, lib, kernel, boot)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04 09:17:16 -08:00
Sam Ravnborg a680eedc6c tags and cscope support really belongs in a shell script
as they do not benefit from the make functionality.

Moving the support to a shell script has several benefits:
- The readability of the code has increased a lot
- More people is able to extend the tags support
- We see less changes to the top-level Makefile

The shell script version includes improvements from:
Alexey Dobriyan <adobriyan@gmail.com> (jump to kconfig symbols)
Alexey Dobriyan <adobriyan@gmail.com> (drop ./ in paths)
Ian Campbell <ijc@hellion.org.uk> (simplified find algorithms)

This version has a few caveats:
=> It does not support ALLSOURCE_ARCHS
   - it is easy to add if it is really used
=> It assumes all archs have moved to arch/$ARCH/include
   - until that happens we have a few additional hits in the archs

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
2008-12-03 22:24:13 +01:00
Mike Frysinger fd54f50284 kbuild: use KECHO convenience echo
Convert a few echos in the build system to new $(kecho) so we get correct
output according to build verbosity.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
[sam: added kecho in a few more places for O=... builds]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-03 21:32:01 +01:00
Sam Ravnborg d8672b40d3 kbuild: expand -I in KBUILD_CPPFLAGS
kbuild failed to expand include flags in KBUILD_CPPFLAGS
resulting in code like this in arch Makefiles:

ifeq ($(KBUILD_SRC),)
KBUILD_CPPFLAGS += -Iinclude/foo
else
KBUILD_CPPFLAGS += -I$(srctree)/include/foo
endif

Move use of LINUXINCLUDE into Makefile.lib to allow
us to expand -I directives of KBUILD_CPPFLAGS so
we can avoid the above code.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-03 21:31:59 +01:00
Linus Torvalds 061e41fdb5 Linux 2.6.28-rc7 2008-12-01 19:59:23 -08:00
Linus Torvalds 13d428afc0 Linux 2.6.28-rc6 2008-11-20 15:19:22 -08:00
Linus Torvalds 9bf1a2445f Linux 2.6.28-rc5 2008-11-15 13:42:56 -08:00
Linus Torvalds f7160c7573 Linux 2.6.28-rc4 2008-11-09 16:36:15 -08:00
Linus Torvalds 45beca08dd Linux v2.6.28-rc3 2008-11-02 14:17:19 -08:00
Ian Campbell de2addf592 kbuild: do not include arch/<ARCH>/include/asm in find-sources twice.
Architectures which have moved their includes to arch/<ARCH>/include
now list the headers twice in the source listing used by "make
cscope" and friends, causing those tools to list symbols twice.

Skipping these files in the ALLSOURCE_ARCHS pass rather than removing
the ALLINCLUDE_ARCHS pass preserves the semantics of the later.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-10-29 22:27:17 +01:00
Sam Ravnborg dcc2da1a96 kbuild: improve check-symlink
o if include/asm point to a nonexisting directory remove the asm symlink
o if include/asm is a directory error out

This fixes a situation where one could be left with a symlink
to asm-x86 but that directory no longer exist and thus the build
would error out.

include/asm may be a directory if the kernel tree has been copied

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-10-29 22:02:07 +01:00
Ingo Molnar 4944dd62de Merge commit 'v2.6.28-rc2' into tracing/urgent 2008-10-27 10:50:54 +01:00
Linus Torvalds 0173a3265b Linux 2.6.28-rc2
.. fix all the worst problems in -rc1
2008-10-26 12:13:29 -07:00
Linus Torvalds 57f8f7b60d Linux 2.6.28-rc1 2008-10-23 20:06:52 -07:00
Al Viro 61bee20445 x86, um: get rid of arch/um/Kconfig.arch
Teach scripts/kconfig/Makefile and top-level Makefile that arch/*/Makefile
is allowed to say Kconfig := <whatever I want instead of arch/blah/Kconfig>.
Rewrite arch/um/Kconfig and arch/um/Kconfig.<subarch> so that the latter
would be top-level one (and include the pieces of the former).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-22 22:55:23 -07:00
Steven Rostedt 606576ce81 ftrace: rename FTRACE to FUNCTION_TRACER
Due to confusion between the ftrace infrastructure and the gcc profiling
tracer "ftrace", this patch renames the config options from FTRACE to
FUNCTION_TRACER.  The other two names that are offspring from FTRACE
DYNAMIC_FTRACE and FTRACE_MCOUNT_RECORD will stay the same.

This patch was generated mostly by script, and partially by hand.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-20 18:27:03 +02:00
Linus Torvalds 3fa8749e58 Linux 2.6.27 2008-10-09 15:13:53 -07:00
Linus Torvalds 4330ed8ed4 Linux 2.6.27-rc9 2008-10-06 16:39:58 -07:00
Linus Torvalds 94aca1dac6 Linux 2.6.27-rc8 2008-09-29 15:24:02 -07:00
Linus Torvalds 72d31053f6 Linux 2.6.27-rc7 2008-09-21 15:29:55 -07:00
Linus Torvalds adee14b2e1 Linux 2.6.27-rc6 2008-09-09 16:27:49 -07:00
Linus Torvalds 24342c34a0 Linux 2.6.27-rc5 2008-08-28 15:52:02 -07:00
Linus Torvalds 6a55617ed5 Linux v2.6.27-rc4 2008-08-20 19:35:56 -07:00
Linus Torvalds 30a2f3c60a Linux 2.6.27-rc3 2008-08-12 18:55:39 -07:00
Randy Dunlap 3794f3e812 docsrc: build Documentation/ sources
Currently source files in the Documentation/ sub-dir can easily bit-rot
since they are not generally buildable, either because they are hidden in
text files or because there are no Makefile rules for them.  This needs to
be fixed so that the source files remain usable and good examples of code
instead of bad examples.

Add the ability to build source files that are in the Documentation/ dir.
Add to Kconfig as "BUILD_DOCSRC" config symbol.

Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
Documentation/ sources.  Or enable BUILD_DOCSRC in the *config system.
However, this symbol depends on HEADERS_CHECK since the header files need
to be installed (for userspace builds).

Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
sparc64, powerpc, sh, m68k, & mips.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-12 16:07:30 -07:00
Denis ChengRq 64a99d2a8c kbuild: a better way to generate cscope database change
It's a problem about cscope target of kernel Makefile, and the cscope
plugin of emacs:
1. `make cscope` will generate cscope.files cscope.{in,po,}.out;
2. the cscope plugin expect a cscope.out.{in,po,};
3. the default `cscope -b` would generate cscope.{in,po,}.out;

There are three approach to solve it:
1. modify the cscope C code;
2. modify the cscope emacs plugin lisp code;
3. modify the Makefile;

I have tried to communicate with the cscope upstream, but later I
realize the third approach is most meaningful.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-08-06 22:17:06 +02:00
Sam Ravnborg 7a48bdd01b kbuild: fix O=.. build with arm
With a make O=... build kbuild would only create
the include2/asm symlink for archs that not yet
had moved headers to include/$ARCH/include

There is no longer any reason to avoid the symlink
for archs that has moved their headers so create it
unconditionally.

This fixes arm because kbuild checked for include/asm-$ARCH/errno.h
and that file was not present for arm but the platform files
are not yet moved.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Russell King <rmk@arm.linux.org.uk>
2008-08-06 21:56:53 +02:00
Linus Torvalds 0967d61ea0 Linux 2.6.27-rc2 2008-08-05 21:49:54 -07:00
Sam Ravnborg ea35455e0d kbuild: fix O=... build of um
We used include/asm-$ARCH/system.h to check if
we should create a symlink in include2 directory with
make O=... builds.
But um does not have such a file thus build filed.

Let's try anohter filename:
$ ls -d include/asm-* | wc -l
21
$ ls -d include/asm-*/errno.h | wc -l
21

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jeff Dike <jdike@addtoit.com>
2008-07-30 22:21:20 +02:00
Linus Torvalds 6e86841d05 Linux 2.6.27-rc1 2008-07-28 19:40:31 -07:00
Sam Ravnborg a439fe51a1 sparc, sparc64: use arch/sparc/include
The majority of this patch was created by the following script:

***
ASM=arch/sparc/include/asm
mkdir -p $ASM
git mv include/asm-sparc64/ftrace.h $ASM
git rm include/asm-sparc64/*
git mv include/asm-sparc/* $ASM
sed -ie 's/asm-sparc64/asm/g' $ASM/*
sed -ie 's/asm-sparc/asm/g' $ASM/*
***

The rest was an update of the top-level Makefile to use sparc
for header files when sparc64 is being build.
And a small fixlet to pick up the correct unistd.h from
sparc64 code.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-27 23:00:59 +02:00
Linus Torvalds 6948385cbd Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (25 commits)
  setlocalversion: do not describe if there is nothing to describe
  kconfig: fix typos: "Suport" -> "Support"
  kconfig: make defconfig is no longer chatty
  kconfig: make oldconfig is now less chatty
  kconfig: speed up all*config + randconfig
  kconfig: set all new symbols automatically
  kconfig: add diffconfig utility
  kbuild: remove Module.markers during mrproper
  kbuild: sparse needs CF not CHECKFLAGS
  kernel-doc: handle/strip __init
  vmlinux.lds: move __attribute__((__cold__)) functions back into final .text section
  init: fix URL of "The GNU Accounting Utilities"
  kbuild: add arch/$ARCH/include to search path
  kbuild: asm symlink support for arch/$ARCH/include
  kbuild: support arch/$ARCH/include for tags, cscope
  kbuild: prepare headers_* for arch/$ARCH/include
  kbuild: install all headers when arch is changed
  kbuild: make clean removes *.o.* as well
  kbuild: optimize headers_* targets
  kbuild: only one call for include/ in make headers_*
  ...
2008-07-27 09:59:59 -07:00
Alexey Dobriyan c28ca3aaa1 kbuild: remove Module.markers during mrproper
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:40 +02:00
Sam Ravnborg 5e4786f75d kbuild: add arch/$ARCH/include to search path
This patch conclude the support for

   arch/$ARCH/include

Note: The individual architectures will most likely require
      a few minor patches to support locating header files in
      arch/$ARCH/include

Testing shows that it worked out-of-the-box for sparc.
x86 required a few trivial changes in the arch
specific Makefile and a few include paths had to be adjusted.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:35 +02:00
Sam Ravnborg 2e57d05116 kbuild: asm symlink support for arch/$ARCH/include
Adjust the asm symlink support so we do not create the
symlink unless really needed.
We check the precense of include/asm-$ARCH by checking
for the system.h file. We may end up with a stale directory
so it is not enough to check if the directory is present.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:34 +02:00
Sam Ravnborg a53ce098a7 kbuild: support arch/$ARCH/include for tags, cscope
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:33 +02:00
Sam Ravnborg 2fb9b1bd9d kbuild: prepare headers_* for arch/$ARCH/include
Factor out the headers_*_all support to a seperate
shell script and add support for arch specific
header files can be located in either

    arch/$ARCH/include/asm
or
    include/asm-$ARCH/

In "make help" always display the headers_* targets.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:33 +02:00
Alexey Dobriyan 6b36ab27d7 kbuild: make clean removes *.o.* as well
Those are left presumably from aborted ccache(1) compilations:

	arch/x86/kernel/.tmp_io_apic_64.o.T5veul
	arch/x86/kvm/.tmp_x86.o.SZWn69
	arch/x86/mm/.tmp_pgtable.o.sL1LTf
	drivers/ieee1394/.tmp_ieee1394_transactions.o.bUj6o1
	drivers/infiniband/hw/mlx4/.tmp_main.o.vy0ep6

BTW, with git there is nice way to check for such nuisainces:

	make mrproper
	git-ls-files -o

should give empty output.

More precise wildcard spec from: Jan Engelhardt <jengelh@medozas.de>

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jan Engelhardt <jengelh@medozas.de>
2008-07-25 22:12:17 +02:00
Sam Ravnborg 88181ec30f kbuild: only one call for include/ in make headers_*
Move it to the top-level file to decide if we install/check
the generic headers or the arch specific headers.

This revealed a long standing bug where "make headers_check_all"
relied on the files in asm/ for the current architecture.
So make headers_check_all is now broken by this commit.

In addition:

o add a simpler way to detect if an arch support
  exporting header files.

o add 'set -e;' so we error out early if
  make headers_check_all fails.

o add sparc64 and cris to arch we do not process
  in make headers_*_all because:

    sparc64 - use sparc to export headers
    cris    - is know seriously broken

Includes suggestions from: David Woodhouse
<dwmw2@infradead.org>.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
2008-07-25 22:11:44 +02:00
Sam Ravnborg f6ecd4c84a kbuild: error out early in make headers_install
Fix the a.out.h case by setting SRCARCH and error
out early in case of an error.
The a.out.h case failed with the *_all targets.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:08:41 +02:00
Sam Ravnborg e6883b1879 kbuild: refactor headers_* targets in Makefile
o Use lower case for local variables
o Add a helper target for common targets
o Use $(hdr-inst)= ... to make Make invocations simpler
o Add -rR to make invocations

In total this adds more lines than it removes but the
benefit is better readability

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
2008-07-25 22:08:37 +02:00
David Woodhouse 44463f7dd6 firmware: create firmware binaries during 'make modules'.
This means that we no longer need write access to the source tree while
doing 'make modules_install'.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-25 14:26:30 -04:00
Mathieu Desnoyers d35cb360c2 markers: fix duplicate modpost entry
When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed.  This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b3

It therefore applies to 2.6.25, 2.6.26 and linux-next.

I merely merged the patches from Roland, Wenji and Takashi here.

Credits to
Roland McGrath <roland@redhat.com>
Wenji Huang <wenji.huang@oracle.com>
and
Takashi Nishiie <t-nishiie@np.css.fujitsu.com>

for providing the individual fixes.

- Changelog :
  - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Roland McGrath <roland@redhat.com>
Cc: Wenji Huang <wenji.huang@oracle.com>
Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-22 09:59:41 -07:00
Grant Likely 7023cc6129 Fix collateral damage to top level Makefile
The patch named "powerpc/mpc5121: Add clock driver", also contained
an unrelated and bogus change to the top-level makefile.  This patch
backs out the bad bit.

SHA1 of offending patch: 137e95906e)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Repented-by: John Rigby <jrigby@freescale.com>
[ Heh. Normally I pick these out from the diffstats, but I guess
  I've grown to trust the ppc tree too much ;)   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17 09:05:12 -07:00
Ralf Baechle bef5b54bd7 Fix MIPS cross-compile problem
Crosscompiling on a Fedora 9 machine running gcc 4.3.0 as its host compiler
and gcc 3.4.6 for the mips-linux target results in the following build
error:

$ make malta_defconfig
$ make
cc1: error: unrecognized command line option "-fno-stack-protector"
scripts/kconfig/conf -s arch/mips/Kconfig
cc1: error: unrecognized command line option "-fno-stack-protector"

The arch Makefile is included too late so the host compiler is feature
tested, not the crosscompiler as intended and thus the Makefile applies
adds -fno-stack-protector to crosscompiler's flags which fails for gcc
3.4.6.  The bug was introduced by e06b8b98da
in 2.6.25; 35bb5b1e0e did add more flags
testing before the arch Makefile inclusion.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-16 11:42:32 -07:00
Benjamin Herrenschmidt 84c3d4aaec Merge commit 'origin/master'
Manual merge of:

	arch/powerpc/Kconfig
	arch/powerpc/kernel/stacktrace.c
	arch/powerpc/mm/slice.c
	arch/ppc/kernel/smp.c
2008-07-16 11:07:59 +10:00
Benjamin Herrenschmidt 43d2548bb2 Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of:

	arch/powerpc/Kconfig
2008-07-15 15:44:51 +10:00
Benjamin Herrenschmidt 5b0504c0d7 Merge commit 'gcl/gcl-next' 2008-07-15 11:55:27 +10:00
Linus Torvalds 5a86102248 Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6
* 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6: (64 commits)
  firmware: convert sb16_csp driver to use firmware loader exclusively
  dsp56k: use request_firmware
  edgeport-ti: use request_firmware()
  edgeport: use request_firmware()
  vicam: use request_firmware()
  dabusb: use request_firmware()
  cpia2: use request_firmware()
  ip2: use request_firmware()
  firmware: convert Ambassador ATM driver to request_firmware()
  whiteheat: use request_firmware()
  ti_usb_3410_5052: use request_firmware()
  emi62: use request_firmware()
  emi26: use request_firmware()
  keyspan_pda: use request_firmware()
  keyspan: use request_firmware()
  ttusb-budget: use request_firmware()
  kaweth: use request_firmware()
  smctr: use request_firmware()
  firmware: convert ymfpci driver to use firmware loader exclusively
  firmware: convert maestro3 driver to use firmware loader exclusively
  ...

Fix up trivial conflicts with BKL removal in drivers/char/dsp56k.c and
drivers/char/ip2/ip2main.c manually.
2008-07-14 16:54:07 -07:00
David Woodhouse 751851af7a Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Conflicts:

	sound/pci/Kconfig
2008-07-14 15:51:11 -07:00
Ingo Molnar 5806b81ac1 Merge branch 'auto-ftrace-next' into tracing/for-linus
Conflicts:

	arch/x86/kernel/entry_32.S
	arch/x86/kernel/process_32.c
	arch/x86/kernel/process_64.c
	arch/x86/lib/Makefile
	include/asm-x86/irqflags.h
	kernel/Makefile
	kernel/sched.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-14 16:11:52 +02:00
Linus Torvalds bce7f793da Linux 2.6.26 2008-07-13 14:51:29 -07:00
John Rigby 137e95906e powerpc/mpc5121: Add clock driver
Plugs into the generic powerpc clock driver in
arch/powerpc/kernel/clock.c

The following subset of clk_interface is implemented:
    clk_get, clk_put:  get clock via name, release clock
    clk_enable, clk_disable:  enable or disable clock
    clk_get_rate:  get clock rate in Hz
    clk_set_rate:  stubbed
    clk_round_rate:  stubbed
    clk_set_parent: NULL
    clk_get_parent: NULL

Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-07-12 12:10:54 -06:00
David Woodhouse 88ecf814c4 firmware: Add firmware installation to modules_install, add firmware_install
For 'make modules_install', install any firmware required by
the modules which are being installed.

Also add a 'make firmware_install' target which doesn't depend on the
configuration, but installs _all_ available in-kernel-tree firmware into
$(INSTALL_FW_PATH), which defaults to /lib/firmware. This is intended
for distributors to make arch-independent (and config-independent)
packages containing firmware.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10 14:47:34 +01:00
David Woodhouse 4d2acfbfdf firmware: Add CONFIG_EXTRA_FIRMWARE option
This allows arbitrary firmware files to be included in the static kernel
where the firmware loader can find them without requiring userspace to
be alive.

(Updated and CONFIG_EXTRA_FIRMWARE_DIR added with lots of help from
Johannes Berg).

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2008-07-10 14:30:39 +01:00
Ingo Molnar bac0c9103b Merge branch 'tracing/ftrace' into auto-ftrace-next 2008-07-10 11:43:00 +02:00
Linus Torvalds b7279469d6 Linux 2.6.26-rc9 2008-07-05 15:53:22 -07:00
Ingo Molnar 97e6722b8d Merge branch 'linus' into tracing/ftrace 2008-06-25 12:27:56 +02:00
Linus Torvalds 543cf4cb3f Linux 2.6.26-rc8 2008-06-24 18:58:20 -07:00
Ingo Molnar f34bfb1bee Merge branch 'linus' into tracing/ftrace 2008-06-23 11:11:42 +02:00
Linus Torvalds d70ac829b7 Linux 2.6.26-rc7 2008-06-20 16:19:44 -07:00
Ingo Molnar e765ee90da Merge branch 'linus' into tracing/ftrace 2008-06-16 11:15:58 +02:00
Linus Torvalds 5dd34572ad Linux 2.6.26-rc6
.. and a new name, courtesy of Alan.
2008-06-12 14:22:24 -07:00
Linus Torvalds 53c8ba9540 Linux 2.6.26-rc5 2008-06-04 20:10:44 -07:00
Linus Torvalds e490517a03 Linux 2.6.26-rc4 2008-05-26 11:08:11 -07:00
Arnaldo Carvalho de Melo 16444a8a40 ftrace: add basic support for gcc profiler instrumentation
If CONFIG_FTRACE is selected and /proc/sys/kernel/ftrace_enabled is
set to a non-zero value the ftrace routine will be called everytime
we enter a kernel function that is not marked with the "notrace"
attribute.

The ftrace routine will then call a registered function if a function
happens to be registered.

[ This code has been highly hacked by Steven Rostedt and Ingo Molnar,
  so don't blame Arnaldo for all of this ;-) ]

Update:
  It is now possible to register more than one ftrace function.
  If only one ftrace function is registered, that will be the
  function that ftrace calls directly. If more than one function
  is registered, then ftrace will call a function that will loop
  through the functions to call.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-23 20:31:58 +02:00
Linus Torvalds 1bf9947722 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  Don't clean bounds.h and asm-offsets.h
  kconfig: incorrect 'len' field initialisation ?
  kernel-doc: allow unnamed bit-fields
  kbuild: filter away debug symbols from kernel symbols
  Remove *.rej pattern from .gitignore
  MAINTAINERS: document names of new kbuild trees
  kbuild: disable modpost warnings for linkonce sections
  kbuild: escape meta characters in regular expression in make TAGS
2008-05-19 11:32:21 -07:00
Jan Blunck 7d3cc8b6d8 Don't clean bounds.h and asm-offsets.h
Since 97965478a6 ("mm: Get rid of __ZONE_COUNT")
mmzone.h includes bounds.h.
Calling make clean after make prepare removes bounds.h
again so when building external modules this fails.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
--
2008-05-19 20:18:24 +02:00
Linus Torvalds b8291ad07a Linux 2.6.26-rc3 2008-05-18 14:36:41 -07:00
Linus Torvalds 492c2e476e Linux 2.6.26-rc2 2008-05-11 17:09:41 -07:00
Masatake YAMATO a95bcfac2b kbuild: escape meta characters in regular expression in make TAGS
Alexey Dobriyan <adobriyan@gmail.com> introduced a code adds
menuconfig SOMETHING in Kconfig to tags output when you did "make tags".

See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=80ff26241623875636674a31c0540a78c0fb5433

"make tags" may work fine with his code. However make TAGS doesn't work well
because etags command requires backslashes to escape meta characters like
`(', `)' and `|'.

Here is a patch.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-11 10:10:48 +02:00
Linus Torvalds 2ddcca36c8 Linux 2.6.26-rc1 2008-05-03 11:59:44 -07:00
Sam Ravnborg 90ebd878a5 kbuild: fix vmlinux.o link
We always linked vmliux.o.
Remove init/built-in.o dependency so we avoid this

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-01 19:31:35 +02:00
Andres Salomon 01dee1881d kbuild: fix help output to show correct arch
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 22:46:11 +02:00
Segher Boessenkool 5dffbe811b kbuild: show defconfig subdirs in make help
PowerPC will start moving board defconfigs into subarch-specific
subdirs soon.  "make help" currently does not look in subdirs to
find the defconfigs to show.  This is partially a good thing,
since there are way too many defconfigs for one list.

This patch makes the main "make help" display something like

  help-40x         - Show 40x-specific targets
  help-44x         - Show 44x-specific targets
  help-boards      - Show all of the above

and wires up stuff so those new help-* commands actually work.

[sam: fixed it up to display x86 defconfigs too]
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 22:40:14 +02:00
Uwe Kleine-König 0254da07d9 kbuild: fix depmod comment
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: trivial@kernel.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 20:49:40 +02:00
Andi Kleen 35bb5b1e0e Add option to enable -Wframe-larger-than= on gcc 4.4
Add option to enable -Wframe-larger-than= on gcc 4.4

gcc mainline (upcoming 4.4) added a new -Wframe-larger-than=...
option to warn at build time about too large stack frames. Add a config
option to enable this warning, since this very useful for the kernel.

I choose (somewhat arbitarily) 2048 as default warning threshold for 64bit
and 1024 as default for 32bit architectures.  With some research and
fixing all the code for smaller values these defaults should be probably
lowered.

With the default allyesconfigs have some new warnings, but I think
that is all code that should be just fixed.

At some point (when gcc 4.4 is released and widely used) this should
obsolete make checkstack

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 20:23:47 +02:00
Alexey Dobriyan 80ff262416 kbuild: add kconfig symbols to tags output
Steps to reproduce:

	vi -t NETFILTER

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 20:20:42 +02:00
Sebastian Siewior f764e51421 Remove -numa from EXTRAVERSION
This snuck in through 919ee677b6
("[SPARC64]: Add NUMA support")

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-24 12:38:04 -07:00
David S. Miller 919ee677b6 [SPARC64]: Add NUMA support.
Currently there is only code to parse NUMA attributes on
sun4v/niagara systems, but later on we will add such parsing
for older systems.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-23 23:32:17 -07:00
Uwe Kleine-Knig bc3c26fe65 fix typo "is" -> "if" in Makefile
It should be "if" but is written as "is"..

Signed-off-by: Uwe Kleine-Koenig <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
2008-04-21 22:53:56 +00:00
Linus Torvalds 4b119e21d0 Linux 2.6.25 2008-04-16 19:49:44 -07:00
Linus Torvalds 120dd64cac Linux 2.6.25-rc9 2008-04-11 13:32:29 -07:00
Linus Torvalds 0e81a8ae37 Linux 2.6.25-rc8 2008-04-01 12:44:26 -07:00
Linus Torvalds 05dda977f2 Linux 2.6.25-rc7 2008-03-25 18:38:14 -07:00
Sam Ravnborg 4ce6efed48 kbuild: soften modpost checks when doing cross builds
The module alias support in the kernel have a consistency
check where it is checked that the size of a structure
in the kernel and on the build host are the same.
For cross builds this check does not make sense so detect
when we do cross builds and silently skip the check in these
situations.
This fixes a build bug for a wireless driver when cross building
for arm.

Acked-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Gordon Farquharson <gordonfarquharson@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: stable@kernel.org
2008-03-23 21:38:54 +01:00
Linus Torvalds a978b30af3 Linux 2.6.25-rc6 2008-03-16 16:32:14 -07:00
Linus Torvalds cdeeeae056 Linux 2.6.25-rc5 2008-03-09 22:22:27 -07:00
Linus Torvalds 29e8c3c304 Linux 2.6.25-rc4 2008-03-04 20:33:54 -08:00
Linus Torvalds bfa274e243 Linux 2.6.25-rc3 2008-02-24 13:25:54 -08:00
Linus Torvalds 230b548c15 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: explain why DEBUG_SECTION_MISMATCH is UNDEFINED
  kbuild: fix building vmlinux.o
  kbuild: allow -fstack-protector to take effect
  kconfig: fix select in combination with default
2008-02-18 15:41:05 -08:00
Linus Torvalds 101142c37b Linux 2.6.25-rc2 2008-02-15 12:57:20 -08:00
Sam Ravnborg cf87dcd140 kbuild: fix building vmlinux.o
Ingo Molnar wrote:
>
> i've got a build log from a weird build error below:
>
>   LD      init/built-in.o
> distcc[12023] ERROR: compile (null) on localhost failed
> make: *** [vmlinux.o] Error 1
> make: *** Waiting for unfinished jobs....
>   LD      .tmp_vmlinux1
>

Building vmlinux.o were moved up in the dependency chain so we started
to build it before the kallsym stuff. This was done to let modpost
report section mismatch bugs even when the final link failed.

Originally I had expected the dependency of $(kallsyms.o) to
cover this but it turns out that we need to be even more explicit.
Fix this by adding a conditional dependency on firat target
used in the kallsyms serie of builds.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Roland McGrath <roland@redhat.com>
2008-02-14 23:33:25 +01:00
Sam Ravnborg e06b8b98da kbuild: allow -fstack-protector to take effect
Arjan van de Ven <arjan@infradead.org> wrote:
===
I just read the excellent LWN writeup of the vmsplice
security thing, and that got me wondering why this attack
wasn't stopped by the CONFIG_CC_STACKPROTECTOR option...
because it plain should have been...

Some analysis later.. it turns out that the following line
in the top level Makefile, added by you in October 2007,
entirely disables CONFIG_CC_STACKPROTECTOR ;(
With this line removed the exploit will be nicely stopped.

CFLAGS          += $(call cc-option, -fno-stack-protector)

Now I realize that certain distros have patched gcc to
compensate for their lack of distro wide CFLAGS, and it's
great to work around that... but would there be a way to NOT
disable this for CONFIG_CC_STACKPROTECTOR please?
It would have made this exploit not possible for those kernels
that enable this feature (and that includes distros like Fedora)
===

Move the assignment to KBUILD_CFLAGS up before including
the arch specific Makefile so arch makefiles may override
the setting.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: stable@kernel.org
2008-02-14 23:33:21 +01:00
Linus Torvalds 19af35546d Linux 2.6.25-rc1
.. and I really need to call it something else.  Maybe it is time to
bring back the weasel series, since weasels always make me feel good
about a kernel.
2008-02-10 14:18:14 -08:00
Robert P. J. Day e1b8513d21 Typoes: "whith" -> "with"
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:14:02 +02:00
Sam Ravnborg 310f8243a6 kbuild: link vmlinux.o before kallsyms passes
link vmlinux.o so we may report section mismatch bugs before
we start with the real link - that may error out.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Sam Ravnborg 91341d4b2c kbuild: introduce new option to enhance section mismatch analysis
Setting the option DEBUG_SECTION_MISMATCH will
report additional section mismatch'es but this
should in the end makes it possible to get rid of
all of them.

See help text in lib/Kconfig.debug for details.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Valdis.Kletnieks@vt.edu 243f40cecb kbuild: document 'make prepare' in 'make help'
The output of 'make help' covers a lot of options, but doesn't include
a listing for 'make prepare'.  Here's a one-liner to fix that...

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:38 +01:00
Uwe Kleine-König 2c81210a26 kbuild: ignore cache modifiers for generating the tags files
With this patch I'm able to find the definition of _xmit_lock defined in
include/linux/netdevice.h as follows:

	struct net_device {
		...
		spinlock_t _xmit_lock ____cacheline_aligned_in_smp;
	}

Otherwise this counts as definition of ____cacheline_aligned_in_smp.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:38 +01:00
Robert P. J. Day 899c38420c Kbuild: Clarify the rpm-related make packaging targets
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:36 +01:00
Tejun Heo 551559e13a kbuild: implement modules.order
When multiple built-in modules (especially drivers) provide the same
capability, they're prioritized by link order specified by the order
listed in Makefile.  This implicit ordering is lost for loadable
modules.

When driver modules are loaded by udev, what comes first in
modules.alias file is selected.  However, the order in this file is
indeterministic (depends on filesystem listing order of installed
modules).  This causes confusion.

The solution is two-parted.  This patch updates kbuild such that it
generates and installs modules.order which contains the name of
modules ordered according to Makefile.  The second part is update to
depmod such that it generates output files according to this file.

Note that both obj-y and obj-m subdirs can contain modules and
ordering information between those two are lost from beginning.
Currently obj-y subdirs are put before obj-m subdirs.

Sam Ravnborg cleaned up Makefile modifications and suggested using awk
to remove duplicate lines from modules.order instead of using separate
C program.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Bill Nottingham <notting@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Jon Masters <jonathan@jonmasters.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Geert Uytterhoeven 8000743455 kbuild: Add missing srctree prefix for includecheck and versioncheck
Add missing $(srctree)/ prefix for scripts used by the includecheck and
versioncheck make targets

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Sam Ravnborg aa025e7d5c kbuild: document versioncheck in make help
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Randy Dunlap ec2d987f98 kbuild: add 'includecheck' help text
Add 'includecheck' to the Static analyzers help list.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Paul Mundt 12760cb4df sh: Fix up uname -m matching for native sh64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:56 +09:00
Linus Torvalds 49914084e7 Linux 2.6.24 2008-01-24 14:58:37 -08:00
Linus Nilsson d384e35a25 Makefile: Change typoed 'behavour' to 'behaviour'
Change two occurances of "behavour" to "behaviour".

Signed-off-by: Linus Nilsson <lajnold@acc.umu.se>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-21 19:55:04 -08:00
Linus Torvalds cbd9c88369 Linux 2.6.24-rc8 2008-01-15 20:22:48 -08:00
Linus Torvalds 3ce5445046 Linux 2.6.24-rc7 2008-01-06 13:45:38 -08:00
Linus Torvalds ea67db4cdb Linux 2.6.24-rc6 2007-12-20 17:25:48 -08:00
Linus Torvalds 82d29bf6dc Linux 2.6.24-rc5 2007-12-10 19:48:43 -08:00
Sam Ravnborg 18c32dac75 kbuild: fix building with O=.. options
The check introduced in commit:
4f1127e204 "kbuild: fix
infinite make recursion"

caused certain external modules not to build and
also caused 'make targz-pkg' to fail.
This is a minimal fix so we revert to previous
behaviour - but we do not overwrite the Makefile
in the top-level directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Jay Cliburn <jacliburn@bellsouth.net>
Cc: Jay Cliburn <jacliburn@bellsouth.net>
2007-12-09 08:55:13 +01:00
Sam Ravnborg 1cacc9ab8b kbuild: fix building with redirected output.
Jan Altenberg <jan.altenberg@linutronix.de> reported that
building with redirected input like this failed:
make O=dir oldconfig bzImage < /dev/null

The problem were caused by a make silentoldconfig being
run before oldconfig and with a non-recent .config the build
failed because silentoldconfig requires non-redirected stdin.

Silentoldconfig was run as a side-effect of having the
top-level Makefile re-made by make.
Introducing an empty rule for the top-level Makefile
(and Kbuild.include) fixed the issue.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-12-09 08:43:42 +01:00
Linus Torvalds 09b56adc98 Linux 2.6.24-rc4 2007-12-03 20:26:10 -08:00
Sam Ravnborg 80ef88d6d2 x86: simplify "make ARCH=x86" and fix kconfig all.config
Simplify "make ARCH=x86" and fix kconfig so we again
can set 64BIT in all.config.

For a fix the diffstat is nice:
 6 files changed, 3 insertions(+), 36 deletions(-)

The patch reverts these commits:
0f855aa64b
-> kconfig: add helper to set config symbol from environment variable

2a113281f5
-> kconfig: use $K64BIT to set 64BIT with all*config targets

Roman Zippel pointed out that kconfig supported string
compares so the additional complexity introduced by the
above two patches were not needed.

With this patch we have following behaviour:

# make {allno,allyes,allmod,rand}config [ARCH=...]
option \ host arch      | 32bit         | 64bit
=====================================================
./.                     | 32bit         | 64bit
ARCH=x86                | 32bit         | 32bit
ARCH=i386               | 32bit         | 32bit
ARCH=x86_64             | 64bit         | 64bit

The general rule are that ARCH= and native architecture
takes precedence over the configuration.
So make ARCH=i386 [whatever] will always build a 32-bit
kernel no matter what the configuration says.
The configuration will be updated to 32-bit if it was
configured to 64-bit and the other way around.

This behaviour is consistent with previous behaviour so
no suprises here.

make ARCH=x86 will per default result in a 32-bit kernel
but as the only ARCH= value x86 allow the user to select
between 32-bit and 64-bit using menuconfig. 

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andreas Herrmann <aherrman@arcor.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
2007-11-17 17:21:54 +01:00
Thomas Gleixner d0974b11e0 Remove x86 merge artifact from top Makefile
The x86 merge modified the tags target to handle the two separate
source directories. Remove it now that i386/x86_64 are gone completely.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-17 16:27:01 +01:00
Linus Torvalds d9f8bcbf67 Linux 2.6.24-rc3 2007-11-16 21:16:36 -08:00
Sam Ravnborg daa93fab82 x86: enable "make ARCH=x86"
After unification of the Kconfig files and
introducing K64BIT support in kconfig
it required only trivial changes to enable
"make ARCH=x86".

With this patch you can build for x86_64 in several ways:
1) make ARCH=x86_64
2) make ARCH=x86 K64BIT=y
3) make ARCH=x86 menuconfig
   => select 64-bit

Likewise for i386 with the addition that
i386 is default is you say ARCH=x86.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
2007-11-12 21:02:20 +01:00
Sam Ravnborg d746d647f3 x86: do not use $(ARCH) when not needed
For x86 ARCH may say i386 or x86_64 and soon x86.
Rely on CONFIG_X64_32 to select between 32/64 or just
hardcode the value as appropriate.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
2007-11-12 21:02:20 +01:00
Linus Torvalds dbeeb816e8 Linux 2.6.24-rc2 2007-11-06 13:57:46 -08:00
Sam Ravnborg 69ee0b3522 kbuild: do not pick up CFLAGS from the environment
Too many people have CFLAGS set to support building userspace.
And now Kbuild picks up CFLAGS this caused troubles.

Although people should realise that setting CFLAGS has
a 'global' effect the impact on the kernel build is a suprise.
So change kbuild to pick up value from KCFLAGS that is
much less used.

When kbuild pick up a value it will warn like this:
Makefile:544: "WARNING: Appending $KCFLAGS (-O3) from environment to kernel $CFLAGS"

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Bächler <thomas@archlinux.org>
Cc: David Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@redhat.com>
2007-11-04 19:00:46 +01:00
Paul Mundt 236b195744 sh: Correct SUBARCH matching.
When configuring the kernel natively the uname matching is off,
so fix up the uname mangling to get the proper SUBARCH. Needs
an explicit range so that SH-5 doesn't break.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 12:22:47 +09:00
Sam Ravnborg 74b469f2e6 x86: move i386 and x86_64 Makefiles to arch/x86
Moving the ARCH specific Makefiles for i386 and x86_64
required a litle bit tweaking in the top-lvel Makefile.

SRCARCH is now set in the top-level Makefile
because we need this info to include the correct
arch Makefile.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:27:34 +02:00
Linus Torvalds c9927c2bf4 Linux 2.6.24-rc1
The patch is big.  Really big.  You just won't believe how vastly hugely
mindbogglingly big it is.  I mean you may think it's a long way down the
road to the chemist, but that's just peanuts to how big the patch from
2.6.23 is.

But it's all good.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:50:57 -07:00
Sam Ravnborg d8d2e78a06 kbuild: allow depmod in cross builds again
depmod from module-init-tools 3.3-pre2 are reported
to work fine in cross build.
depmod from module-init-tools 3.1-pre5 are known to SEGV

Do not workaround older module-init-tools bugs here.
The right fix is for users to upgrade module-init-tools.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
2007-10-22 20:04:37 +02:00
Sam Ravnborg ab19f8794a kbuild: fix modules_install after a 'make vmlinux'
make vmlinux would delete the content of $(MODVERDIR)
equals .tmp_versions. This caused a subsequent
make modules_install to fail.

Fix it so we clean the directory only for the
modules build - but we still unconditionally create it so
we can do:
make dir/file.ko
without a preceeding make modules.

Reported by David Miller <davem@davemloft.net>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Miller <davem@davemloft.net>
2007-10-22 20:04:37 +02:00
David Brownell 0b463ff139 kbuild: fix toplevel Makefile/depmod
This removes a syntax error (seen building on Ubuntu Feisty).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-20 20:10:19 +02:00
Linus Torvalds 4800be295c Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: fix first module build
  kconfig: update kconfig-language text
  kbuild: introduce cc-cross-prefix
  kbuild: disable depmod in cross-compile kernel build
  kbuild: make deb-pkg - add 'Provides:' line
  kconfig: comment typo in scripts/kconfig/Makefile.
  kbuild: stop docproc segfaulting when SRCTREE isn't set.
  kbuild: modpost problem when symbols move from one module to another
  kbuild: cscope - filter out .tmp_* in find_sources
  kbuild: mailing list has moved
  kbuild: check asm symlink when building a kernel
2007-10-19 13:47:38 -07:00
Sam Ravnborg 7bb9d092de kbuild: fix first module build
When building a specific module before doing a total kernel
build it failed because $(MORVERDIR) were missing.
Creating the MODVERDIR explicit (independent of KBUILD_MODULES)
fixed this. As a side-effect the MODVERDIR will be created
also for a non-module build - but no harm done by that.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-19 22:20:02 +02:00
Mathieu Desnoyers 267c4025f2 markers: Add samples subdir
Begin infrastructure for kernel code samples in the samples/ directory.
Add its Kconfig and Kbuild files.
Source its Kconfig file in all arch/ Kconfigs.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:55 -07:00
Sam Ravnborg 50a8ec31c3 kbuild: disable depmod in cross-compile kernel build
When building embedded systems in a cross-compile environment and
populating a target's file system image, we don't want to run the
depmod on the host as we may be building for a completely different
architecture. Since there's no such thing as a cross-depmod, we
just disable running depmod in the cross-compile case and we just
run depmod on the target at bootup.

Inspired by patches from Christian, Armin and Deepak.

This solves: http://bugzilla.kernel.org/show_bug.cgi?id=3881

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Christian Bjølevik <nafallo@magicalforest.se>
Cc: Deepak Saxena <dsaxena@mvista.com> and
Cc: Armin Kuster <akuster@mvista.com>,
2007-10-18 23:17:06 +02:00
Yinghai Lu 37ab7a2696 kbuild: cscope - filter out .tmp_* in find_sources
remove .tmp_kallsyms*.S in cscope.files

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 13:35:49 +02:00
Sam Ravnborg fc333b2df3 kbuild: check asm symlink when building a kernel
We often hit the situation where the asm symlink
in include/ points to the wrong architecture.
In 9 out of 10 cases thats because we forgot to set
ARCH but sometimes we just reused the same tree
for another ARCH. For the merged x86 tree we need
to create a new symlink but this is not obvious.
So with the following patch we check if the symlink
points to the correct architecture and error
out if this is not the case.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 09:06:34 +02:00
Yinghai Lu f8bea58b6a kbuild: fix typo SRCARCH in find_sources
otherwise get the two copy file list in SRCARCH

for cscope:
C symbol: start_kernel

  File           Function            Line
0 proto.h        <global>              11 extern void start_kernel(void );
1 start_kernel.h <global>              10 extern asmlinkage void __init start_kernel(void );
2 head32.c       i386_start_kernel     37 start_kernel();
3 head32.c       i386_start_kernel     37 start_kernel();
4 head64.c       x86_64_start_kernel   85 start_kernel();
5 head64.c       x86_64_start_kernel   85 start_kernel();
6 head_32.S      options              199 cmpb $0,%cl #the first CPU calls start_kernel
7 head_32.S      options              199 cmpb $0,%cl #the first CPU calls start_kernel
8 enlighten.c    xen_start_kernel    1145 start_kernel();
9 enlighten.c    xen_start_kernel    1145 start_kernel();
a lguest.c       lguest_init         1095 start_kernel();
b main.c         start_kernel         513 asmlinkage void __init start_kernel(void )

after the patch:
C symbol: start_kernel

  File           Function            Line
0 proto.h        <global>              11 extern void start_kernel(void );
1 start_kernel.h <global>              10 extern asmlinkage void __init start_kernel(void );
2 head32.c       i386_start_kernel     37 start_kernel();
3 head64.c       x86_64_start_kernel   85 start_kernel();
4 head_32.S      options              199 cmpb $0,%cl #the first CPU calls start_kernel
5 enlighten.c    xen_start_kernel    1145 start_kernel();
6 lguest.c       lguest_init         1095 start_kernel();
7 main.c         start_kernel         513 asmlinkage void __init start_kernel(void )

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17 21:39:23 +02:00
Sam Ravnborg 06c5040cdb kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
The variable CPPFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.

This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the
tree and enabling one to use:
make CPPFLAGS=...
to specify additional CPP commandline options.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 22:17:25 +02:00
Sam Ravnborg 52bcc3308a kbuild: enable use of AFLAGS and CFLAGS on commandline
The previous patches was preparation.
With this patch we can now say:
make CFLAGS=-Os vmlinux

And the option specified will be appended to the
options passed to gcc for C files.

For assembler use:
make AFLAGS=-foo vmlinux
for the same functionality.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 22:03:58 +02:00
Sam Ravnborg 222d394d30 kbuild: enable 'make AFLAGS=...' to add additional options to AS
The variable AFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.

This patch replace use of AFLAGS with KBUILD_AFLAGS all over
the tree.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 21:59:31 +02:00
Sam Ravnborg a0f97e06a4 kbuild: enable 'make CFLAGS=...' to add additional options to CC
The variable CFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.

This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
tree and enabling one to use:
make CFLAGS=...
to specify additional gcc commandline options.

One usecase is when trying to find gcc bugs but other
use cases has been requested too.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k

Test was simple to do a defconfig build, apply the patch and check
that nothing got rebuild.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-14 22:21:35 +02:00
Adrian Bunk 295ac05186 kbuild: call export_report from the Makefile
The main feature is that export_report now automatically works
for O= builds.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:39:02 +02:00
Milton Miller 0b35786d77 kbuild: call make once for all targets when O=.. is used
Change the invocations of make in the output directory Makefile and the
main Makefile for separate object trees to pass all goals to one $(MAKE)
via a new phony target "sub-make" and the existing target _all.

When compiling with separate object directories, a separate make is called
in the context of another directory (from the output directory the main
Makefile is called, the Makefile is then restarted with current directory
set to the object tree).  Before this patch, when multiple make command
goals are specified, each target results in a separate make invocation.
With make -j, these invocations may run in parallel, resulting in multiple
commands running in the same directory clobbering each others results.

I did not try to address make -j for mixed dot-config and no-dot-config
targets.  Because the order does matter, a solution was not obvious.
Perhaps a simple check for MAKEFLAGS having -j and refusing to run would
be appropriate.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Roland McGrath cf851aa756 kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
The assembler for a while now supports -gdwarf to generate source line info
just like the C compiler does.  Source-level assembly debugging sounds like an
oxymoron, but it is handy to be able to see the right source file and read its
comments rather than just the disassembly.  This patch enables -gdwarf for
assembly files when CONFIG_DEBUG_INFO=y and the assembler supports the option.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Sam Ravnborg 4f1127e204 kbuild: fix infinite make recursion
Jan Engelhardt <jengelh@computergmbh.de> reported:
You can cause a recursion in kbuild/make with the following:

make O=$PWD kernel/time.o
make mrproper

Of course no one would use O=$PWD (that's just the testcase),
but this happened too often:

/ws/linux/linux-2.6.23$ make O=/ws/linux/linux-2.6.23 kernel/time.o
(Oops - should have been O=/ws/linux/obj-2.6.23!)

Fixed by an explicit test for this case - we error
out if output directory and source directory are the same.

Tested-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:32 +02:00
Mike Frysinger c34114f4ac kbuild: clean Modules.symvers in external module dirs
At the moment, running `make clean` in an external module directory does a
nice job of cleaning up with one exception: it leaves behind Modules.symvers.
Attached patch adds this file to the clean list for external modules.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:30 +02:00
Thomas Gleixner 91e034eff1 x86: Fix the $(ARCH) dependent help output in the top Makefile
Change the $(ARCH) dependency to $(SRCARCH) to honor the x86
namespace for i386 and x86_64.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-11 17:53:52 +02:00
Thomas Gleixner 96a388de5d i386/x86_64: move headers to include/asm-x86
Move the headers to include/asm-x86 and fixup the
header install make rules

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-11 11:20:03 +02:00
Thomas Gleixner 2eb4c95094 Kbuild: prepare scope and tags for arch/x86
Preparatory patch for the source merge of arch/i386 and arch/x86_64
into arch/x86. Make scope and tags aware of SRCARCH

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-11 11:11:38 +02:00
Thomas Gleixner 6752ed90da Kbuild: allow arch/xxx to use a different source path
Preparatory patch for the source merge of arch/i386 and arch/x86_64
into arch/x86. This allows to keep the original arch directories as
stubs for the main Makefiles, Kconfigs et. al during the transition
phase while having the code in the new arch/x86 directory.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-11 11:11:36 +02:00
Linus Torvalds bbf25010f1 Linux 2.6.23 2007-10-09 13:31:38 -07:00