Commit graph

524 commits

Author SHA1 Message Date
Sam Ravnborg
47572387d5 x86: move i386 and x86_64 Kconfig files to x86 directory
After a small change in kconfig Makefile we could
move all x86 Kconfig files to x86 directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:37:02 +02:00
Sam Ravnborg
e703f75d62 kconfig: small code refactoring in kconfig Makefile
Do not hardcode the arch/$(ARCH)/Kconfig name all over

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:35:18 +02:00
Sam Ravnborg
2266cfd50d x86: move defconfig files for i386 and x86_64 to x86
With some small changes to kconfig makefile we can now
locate the defconfig files for i386 and x86_64 in
the configs/ subdirectory under x86.
make ARCH=i386 defconfig and make defconfig
works as expected also after this change.
But arch maintainers shall now update a defconfig file in
the configs/ directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:27:41 +02:00
Rusty Russell
b01d9f2863 Module autoprobing support for virtio drivers.
This adds the logic to convert the virtio ids into module aliases, and
includes a modalias entry in sysfs and the env var to make probing work.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:55 +10:00
Linus Torvalds
cfa76f024f Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (29 commits)
  [PARISC] fix uninitialized variable warning in asm/rtc.h
  [PARISC] Port checkstack.pl to parisc
  [PARISC] Make palo target work when $obj != $src
  [PARISC] Zap unused variable warnings in pci.c
  [PARISC] Fix tests in palo target
  [PARISC] Fix palo target
  [PARISC] Restore palo target
  [PARISC] Attempt to clean up parisc/Makefile
  [PARISC] Fix infinite loop in /proc/iomem
  [PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable
  [PARISC] Squelch pci_enable_device __must_check warning in superio
  [PARISC] Kill off broken irqstack code
  [PARISC] Remove hardcoded uses of PAGE_SIZE
  [PARISC] Clean up pointless ASM_PAGE_SIZE_DIV use
  [PARISC] Kill off the last vestiges of ASM_PAGE_SIZE
  [PARISC] Kill off ASM_PAGE_SIZE use
  [PARISC] Beautify parisc vmlinux.lds.S
  [PARISC] Clean up a resource_size_t warning in sba_iommu
  [PARISC] Kill incorrect cast warning in unwinder
  [PARISC] Kill zone_to_nid printk warning
  ...

Fixed trivial conflict in include/asm-parisc/tlbflush.h manually
2007-10-20 20:19:15 -07:00
Kyle McMartin
562d139cc5 [PARISC] Port checkstack.pl to parisc
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2007-10-20 13:18:56 -07:00
Randy Dunlap
a54bb701c2 kconfig: set title bar in xconfig
Put kernel version info on title bar in xconfig (qconf) instead of
defaulting to "qconf".

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-20 20:16:50 +02:00
Linus Torvalds
e8b8c97773 Revert "kconfig: tristate choices with mixed tristate and boolean values"
This reverts commit a5bf3d891a.

David Brownell notes that this causes a regression visible in the
drivers/usb/gadget Kconfig file:

  "That Kconfig hasn't changed (other than adding new drivers), and it's
   worked that way for several years now ...  so the issue seems to be
   changes in menuconfig/kconfig/etc semantics.

   The issue is that when USB_GADGET=m, it's no longer possible to
   configure peripheral controller drivers as modules ...  the
   controller drivers can now only be configured for static linkage.

   It should be making a choice of one of the controller drivers which
   could work on the target system, and allow that driver to be linked
   either as a module (ok iff USB_GADGET=m) or statically."

Reverting this commit resolves the problem, and also fixes a second
problem that David noticed: various dependent options couldn't be enabled.

Tested-and-reported-by: David Brownell <david-b@pacbell.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Jan Beulich <jbeulich@novell.com>,
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cc: Sam Ravnborg <sam@ravnborg.org>,
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 21:25:45 -07: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
910b40468a kbuild: introduce cc-cross-prefix
cc-cross-prefix is useful for the architecture that like
to provide a default CROSS_COMPILE value,
but may have several to select between.

Sample usage:

ifneq ($(SUBARCH),$(ARCH))
        ifeq ($(CROSS_COMPILE),)
               CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
        endif
endif

Actual usage by the different archs will taken care of later.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-19 21:46:01 +02:00
Joern Engel
477116e69d fix a trivial typo in scripts/checkstack.pl
Trivial change in a comment.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andre Haupt <andre@finow14.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:34 -07:00
Andy Whitcroft
6c72ffaab9 update checkpatch.pl to version 0.11
This version brings a more cautious checkpatch.pl by default.  The more
subjective checks are only applied with the --strict option.  It also
brings the usual slew of corrections for false positives.  Of note:

  - new tree detection, the source tree will be found via the executable
  - a major revamp of the unary detection to make it more parser like
  - a new summary at the bottom of the report
  - --strict option for subjective checks
  - --file to enable checking on complete files
  - support for use in emacs "compile" window

Andy Whitcroft (27):
      Version: 0.11
      fix up cat_vet for the case where there are no control characters
      any cast to a pointer introduces a type
      cpp unary operator detection needs to float
      attributes are also valid in type definitions
      sizeof may be a bareword and makes its argument unary
      unary checks for #ifdef et al need to find end of line
      add new --file mode to handle raw source files
      add --strict/--subjective which enables the subjective tests
      add some additional standard type suffixes
      cpp #elif is also a unary prefix
      case is not a function name
      widen asm volatile exceptions
      __kprobes is a type attribute
      typeof is a unary operator
      function open parenthesis checks should check all occurances
      expand sizeof() binary exceptions
      linux/irq.h should not be recommended
      work harder to find the kernel root and add --root=
      fix --emacs mode line numbers and string concatenation warnings
      add a summary to the bottom of the main report
      loosen assignment in if checks
      update operator spacing to maintain tabs in output
      revamp unary detection
      corruption/line wrapped patches need only reporting once
      revamp s/u/be/le 8/16/32/64 bit types
      handle missing ,1 in uni-diff header

Mike D. Day (2):
      Adds support to checkpatch.pl for running in the emacs compile window.
      checkpatch: Fix line number reporting

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:21 -07:00
bugme-daemon@bugzilla.kernel.org
6f67a00498 kbuild: make deb-pkg - add 'Provides:' line
http://bugzilla.kernel.org/show_bug.cgi?id=8941

Current Debian's kernel-modules depend on matching linux-image-$version, though
Linux's make deb-pkg build a .deb that 'Provides: kernel-image-$version' only.
The following patch adds the Debian-compliant 'Provides', leaving the default
one; hopely this will make way all happy.

Signed-off-by: paolo <oopla@users.sf.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 15:15:53 +02:00
Rob Landley
e9e40e143c kconfig: comment typo in scripts/kconfig/Makefile.
Typo in comment in scripts/kconfig/Makefile.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 14:31:50 +02:00
Rob Landley
bb13be5145 kbuild: stop docproc segfaulting when SRCTREE isn't set.
Prevent docproc from segfaulting when SRCTREE isn't set.

Signed-off-by: Rob Landley <rob@landley.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 13:42:53 +02:00
Trent Piepho
4b21960f90 kbuild: modpost problem when symbols move from one module to another
When part of build an external module tree, modpost first reads in the
kernel's and then the external tree's Module.symvers files.  From these files
it establishes a symbol => module mapping.  When it later reads in each module
built and processes the symbols it finds, it discovers the symbol=>module
mapping from Module.symvers and leaves it as it is.

The problem comes with a module has been re-named or a symbol has moved from
one module to another, since the Module.symvers file was generated.  modpost
does not update the symbol=>module mapping when it finds the new location of
the symbol when scanning the newly built modules.  This results in the module
containing incorrect dependency information and the new Module.symvers file
written by modpost will also contain the incorrect mappings, perpetuating the
problem to the next build, and so on.

When building the out of kernel development tree for kernel subsystem, like
v4l-dvb or ALSA, deleting the external Module.symvers file before building
(which the kernel build system doesn't do and shouldn't be necessary anyway),
won't fix the problem.  modpost still reads the kernel's Module.symvers, and
since we a building a kernel subsystem, it will define the same symbols as the
external modules.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 13:35:49 +02:00
Randy Dunlap
6b5b55f6c4 kernel-doc: fix doc blocks and html
Johannes Berg reports (Thanks!) that &struct names are not highlighted in
html output format when they are inside a DOC: block.

DOC: blocks were not escaped thru xml_escape() like other kernel-doc
comments were.  Fixed that.

However, that left a problem with <p> ($blankline_html) being processed
thru xml_escape(), converting it to &lt;p&gt;, which isn't good for the
generated html output (the <p> should remain unchanged), so this patch also
introduces the notion of "local" kernel-doc meta-characters
('\\\\mnemonic:'), which are converted to html just before writing the
stream to its output file.

Please report any problems that you (anyone) see in "highlighting" in any
output mode (text, man, html, xml).

Also update copyright to include me.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:43:05 -07:00
Andy Whitcroft
9c0ca6f9a0 update checkpatch.pl to version 0.10
This version brings a number of new checks, and a number of bug
fixes.  Of note:

  - better categorisation and space checks for dual use unary/binary
    operators
  - warn on deprecated use of {SPIN,RW}_LOCK_UNLOCKED
  - check if/for/while with trailing ';' for hanging statements
  - detect DOS line endings
  - detect redundant casts for kalloc()

Andy Whitcroft (18):
      Version: 0.10
      asmlinkage is also a storage type
      pull out inline specifiers
      allow only some operators before a unary operator
      parenthesised values may span line ends
      add additional attribute matching
      handle sparse annotations within pointer type space checks
      support alternative function definition syntax for typedefs
      check if/for/while with trailing ';' for hanging statements
      fix output format for case checks
      deprecate SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED
      allow complex macros with bracketing braces
      detect and report DOS line endings
      fastcall is a valid function attribute
      bracket spacing is ok for 'for'
      categorise operators into unary/binary/definitions
      add heuristic to pick up on unannotated types
      remove spurious warnings from cat_vet

Dave Jones (1):
      Make checkpatch warn about pointless casting of kalloc returns.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:56 -07:00
Mike Frysinger
1e9535a591 Add stack checking for Blackfin
Simply fill out the bits in checkstack.pl for Blackfin.  I thought I already
sent this, but I don't see it in -mm anywhere ...

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:54 -07:00
Linus Torvalds
821f3eff7c Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
  kbuild: introduce ccflags-y, asflags-y and ldflags-y
  kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
  kbuild: enable use of AFLAGS and CFLAGS on commandline
  kbuild: enable 'make AFLAGS=...' to add additional options to AS
  kbuild: fix AFLAGS use in h8300 and m68knommu
  kbuild: check for wrong use of CFLAGS
  kbuild: enable 'make CFLAGS=...' to add additional options to CC
  kbuild: fix up CFLAGS usage
  kbuild: make modpost detect unterminated device id lists
  kbuild: call export_report from the Makefile
  kbuild: move Kai Germaschewski to CREDITS
  kconfig/menuconfig: distinguish between selected-by-another options and comments
  kconfig: tristate choices with mixed tristate and boolean values
  include/linux/Kbuild: remove duplicate entries
  kbuild: kill backward compatibility checks
  kbuild: kill EXTRA_ARFLAGS
  kbuild: fix documentation in makefiles.txt
  kbuild: call make once for all targets when O=.. is used
  kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
  kbuild: update _shipped files for kconfig syntax cleanup
  ...

Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
2007-10-16 11:23:06 -07:00
Sam Ravnborg
f77bf01425 kbuild: introduce ccflags-y, asflags-y and ldflags-y
Introduce ccflags-y, asflags-y and ldflags-y so we soon can
deprecate use of EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
This patch does not touch any in-tree users - thats next round.
Lets get this committed first and then fix the users of the
soon to be deprecated variants next.

The rationale behind this change is to introduce support for
makefile fragments like:

ccflags-$(CONFIG_WHATEVER_DEBUG) := -DDEBUG

As a replacement for the uglier:
ifeq ($(CONFIG_WHATEVER_DEBUG),y)
        EXTRA_CFLAGS := -DDEBUG
endif

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 22:25:06 +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
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
0c53c8e6eb kbuild: check for wrong use of CFLAGS
External modules have in a few cases modifed gcc option
by modifying CFLAGS. This has never been documented and
was a bad practice.
With the check to use KBUILD_CFLAGS it will no longer work
so we better error out and tell what was wrong as a service
to the external module users.

This check can be overruled if
KBUILD_NOPEDANTIC is set to something.
Addid this possibility may allow older external
module to build without any code modifications but potentially
only loosing some un-important gcc options.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-14 22:26:53 +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
Jean Delvare
cee37ae407 i2c: Kill struct i2c_device_id
I2C devices do not have any form of ID as PCI or USB devices have.
No driver uses "MODULE_DEVICE_TABLE(i2c, ...)" because it doesn't
make sense. So we can get rid of struct i2c_device_id and the
associated support code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Greg KH <greg@kroah.com>
2007-10-13 23:56:29 +02:00
Kees Cook
e00498258c kbuild: make modpost detect unterminated device id lists
Cause modpost to fail if any device id lists are incorrectly terminated,
after reporting the offender.
Improved reporting by akpm

Signed-off-by: Kees Cook <kees@ubuntu.com>
Cc: Greg KH <greg@kroah.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Ben Collins <bcollins@ubuntu.com>
Cc: Michael Wu <flamingice@sourmilk.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:48:11 +02:00
Matej Laitl
b5d609dbfa kconfig/menuconfig: distinguish between selected-by-another options and comments
menuconfig currently represents options implied by another option ('select'
directive in Kconfig) by prefixing them with '---'.  Unfortunately the same
notation is used for comments.  If the implied option is module capable,
user can still switch between Y and M, all without any feedback until she
visits option's help.  (try saying M to MAC80211 and then toggling
CFG80211)

This patch changes notation of selected-by-another items by introducing 2
new representations for implied options: {*} or {M} for options selected by
another modularized one, thus builtin or module capable, -*- or -M- for
options that cannot be at the moment changed by user.

The idea is to represent actual capability of the option by braces (dashes)
around and to always report actual state by * or M inside.

Signed-off-by: Matej Laitl <strohel@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:33 +02:00
Jan Beulich
a5bf3d891a kconfig: tristate choices with mixed tristate and boolean values
Change kconfig behavior so that mixing bool and tristate config settings in
a choice is possible and has the desired effect of offering just the
tristate options individually if the choice gets set to M, and a normal
boolean selection if the choice gets set to Y.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:33 +02:00
Sam Ravnborg
836caba77c kbuild: kill backward compatibility checks
These checks has been present for several kernel releases (> 5).
So lets just get rid of them.
With this we no longer check for use of:
EXTRA_TARGETS, O_TARGET, L_TARGET, list-multi, export-objs

There were three remaining in-tree users of O_TARGET in some
unmaintained sh64 code - mail sent to the maintainer + list.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Sam Ravnborg
5e54d5e5fb kbuild: kill EXTRA_ARFLAGS
EXTRA_ARFLAGS have never been used so no need to carry
around on this.
A google search did not reveal any external module
using this either.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +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
Sam Ravnborg
14f31562db kbuild: update _shipped files for kconfig syntax cleanup
Update _shipped files so regular user does not
need to have bison/flex/gperf installed.
Code changes were contained in previous commit.

Used following program versions (on fedora):
bison (GNU Bison) 2.3
flex 2.5.33
GNU gperf 3.0.2

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Adrian Bunk
247537b9a2 kconfig: syntax cleanup - drop support for "depends/requires/def_boolean"
Remove the following redundant and never or rarely used kconfig syntax:

- "def_boolean" (same as "def_bool")
- "requires" (same as "depends on")
- "depends" (same as "depends on")

This patch contains the code changes and Kconfig updates.
The shipped files are in next patch to let actual codechange stand out.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
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
a67cb1319f kconfig: fix segv fault in menuconfig
With specific configurations requesting help for certain
menu lines caused menuconfig to crash.
This was tracked down to a null pointer bug.
Thanks to "Miles Lane" <miles.lane@gmail.com> for inital reporting
and to Gabriel C <nix.or.die@googlemail.com> for the backtrace
that helped me locating the bug.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:32 +02:00
Sam Ravnborg
48874077dd kconfig: make comments stand out in menuconfig
Matěj Laitl <strohel@gmail.com> noticed that there was no way
to distingush between comments and un-selectable menu lines.
This patch marks comments with *** comment ***

Cc: Matěj Laitl <strohel@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:32 +02:00
Sam Ravnborg
f5fb976520 kbuild: fix directory traversal bug
Previously kbuild choked over the following:
obj-y += ../../../arch/i386/kernel/bootflag.o

This has resulted in some rather ugly workarounds in
current x86_64 tree.
This patch fixes kbuild to allow the above and enable
potential cleanups in x86_64 and maybe in other places.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Randy Dunlap
6dd16f44a9 docproc: style & typo cleanups
- fix typos/spellos in docproc.c and Makefile
- add a little whitespace {while, switch} (coding style)
- use NULL instead of 0 for pointer testing

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Sam Ravnborg
70f75246cf kbuild: apply genksyms changes
This patch updates the _shipped files for genksyms.
See previous patch for actual functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Sam Ravnborg
3550a516d0 kbuild: __extension__ support in genksyms (fix unknown CRC warning)
Recently the __extension__ keyword has been introduced in the kernel.
Teach genksyms about this keyword so it can generate correct CRC for
exported symbols that uses a symbol marked __extension__.
For now only the typedef variant:

	__extension__ typedef ...

is supported.
Later we may add more variants as needed.

This patch contains the actual source file changes. The
following patch will hold modifications to the generated
files (*_shipped) and only after the second patch the fix
has effect.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Sam Ravnborg
a3a6261a11 kbuild: fix genksyms Makefile
When enabling GENERATE_PARSER the genksyms Makefile
failed to create _shipped version of generated files.

Modifying keywords.gperf failed to cause a rebuild
of genksyms.
Fixed by specifying keywowrds .c as explicit prerequisite
of the lexer.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Jesper Juhl
cc9eefdb9e kbuild: scripts/ver_linux : correct printing of binutils version
Currently scripts/ver_linux prints "Binutils" or other random
information for the version number in the "binutils" output line
on some distributions. This patch corrects that.

When I initially submitted a patch to correct that, I was not aware
that the output from "ld -v" could differ as much as it turned out
it can, so my original fix turned out to not cover all bases.
This patch works correctly with all the different "ld -v" output
that people posted in replys to my first patch, so it should be a
clear win over what we have currently.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Jesper Juhl
9cc3ef3034 kbuild: ver_linux fix glibc version print
Fix ver_linux glibc version printing (for real this time)

Alexey Dobriyan reported that commit
4a645d5ea6
broke ver_linux when glibc has a 3 digit
version number, and proposed a patch.
Al Viro then suggested a simpler way to
solve the problem which I've then simply
put into patch form.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Jesper Juhl
de47062a17 kbuild: improve scripts/gcc-version.sh output a bit when called without args
Currently, if you call scripts/gcc-version.sh without arguments it will
generate this output :

$ sh scripts/gcc-version.sh
scripts/gcc-version.sh: line 12: [: =: unary operator expected
scripts/gcc-version.sh: line 16: -E: command not found
scripts/gcc-version.sh: line 17: -E: command not found
0000

Not too pretty. I believe this is an improvement :

$ sh scripts/gcc-version.sh
Error: No compiler specified.
Usage:
        scripts/gcc-version.sh <gcc-command>

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:30 +02:00
Petr Stetiar
a83710e584 kbuild: fix segfault in modpost
Fix modpost segfault.

Before:
-------
ynezz@ntbk:~/linux-2.6.git$ scripts/mod/modpost vmlinux ath_pci.o
Segmentation fault

After:
------
ynezz@ntbk:~/linux-2.6.git$ scripts/mod/modpost vmlinux ath_pci.o
FATAL: section header offset=815726848 in file 'ath_pci.o' is bigger then filesize=153968

Sam: This seems to warn for a binutils issue. Anyway modpost should not
segfault.

Signed-off-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:30 +02:00
Ram Pai
88f567f3a3 kbuild: fix perl usage in export_report.pl
Fixes some subtle perl coding bug observed
by Jan Engelhardt <jengelh@computergmbh.de>
This patch applies on top of Adrian's fix.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Adrian Bunk
cf9a6adeae kbuild: fix export_report.pl
This patch fixes an annoying bug of export_report.pl missing the usages
of some exports.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Paolo 'Blaisorblade' Giarrusso
0bce67352b kbuild: script to check for undefined Kconfig symbols
To avoid having to look manually for used but undefined Kconfig variables,
I've written a script which tries do this efficiently, in case all other
attention fail.  It accounts for _MODULE suffix and for UML_ prefixes to
Kconfig variable, but otherwise looks for exact matches (i.e.  \<CONFIG_;
this is done to exclude macros like MMCONFIG_).

Undefined Kconfig variables should be not be removed without care, but for
instance arch/i386/boot/ uses a bunch of undefined Kconfig vars:

$ scripts/checkunknowndefines.sh arch/i386/boot/
arch/i386/boot/video.h uses undefined symbol VIDEO_400_HACK
arch/i386/boot/video-vga.c uses undefined symbol VIDEO_400_HACK
arch/i386/boot/video.c uses undefined symbol VIDEO_RETAIN
arch/i386/boot/video.h uses undefined symbol VIDEO_RETAIN
arch/i386/boot/video.h uses undefined symbol VIDEO_SVGA
arch/i386/boot/video.h uses undefined symbol VIDEO_VESA
arch/i386/boot/video-vesa.c uses undefined symbol VIDEO_VESA

It should also be mentioned in SubmittingPatches and SubmitChecklist.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Sam Ravnborg
aa1e5ef5c1 kbuild: check if we can link gettext not just compile
cygwin provides the header file but the lib file needs
to be added manually. A generic fix is to check if
we can compile and link a program that uses gettext()
and if it fails fall back to NO_NLS.

International users of cygwin may have to specify
HOST_LOADLIBES := "-lintl" on the make command line.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Sam Ravnborg
4f4c4ee1b7 kbuild: Use Elfnn_Half as replacement for Elfnn_Section
The Elfnn_Section is not available on all platforms,
noteworthy are cygwin.
Use the safe replacement _Half.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00