kbuild: Makefile: remove unnecessary check for m68knommu ARCH

ARCH is never set to m68knomm.
make ARCH=m68knomm is not supported anymore.

Signed-off-by: Edward Shao <laface.tw@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
kconfig: Add error handling to KCONFIG_ALLCONFIG

- Only try to read the file specified if KCONFIG_ALL_CONFIG is set to
  something other than the empty string or "1".

- Don't use stat to check the name passed to conf_read_simple so that
  zconf_fopen can find the file in the current directory or in SRCTREE
  removing a extremely source of confusing failure, where KCONFIG_ALL_CONFIG
  was not interpreted with respect to the directory make was called in.

- If conf_read_simple fails complain clearly and stop processing.
  Allowing the simple debugging of typos.

- Clearly document the behavior so it is clear to users which
  values are treated as flags and which values are treated as
  filenames.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
kbuild: drop unused KBUILD_VMLINUX_OBJS from top-level Makefile

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
kbuild: refactor final link of sparc32

sparc32 uses an additional final link to support btfix.
Introduce a new set of exported variables in the top-level Makefile
to make the extra linking step simpler.

sparc32 has hardcoded knowledge of kallsyms support. This fix
include support for EXTRA_KALLSYM_PASS=1.
The ugly part is that it is hardcoded in the arch/sparc/boot
Makefile.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
kbuild: link of vmlinux moved to a script

Move the final link of vmlinux to a script to improve
readability and maintainability of the code.

The Makefile fragments used to link vmlinux has over the
years seen far too many changes and the logic had become
hard to follow.

As the process by nature is serialized there was
nothing gained including this in the Makefile.

"um" has special link requirments - and the
only way to handle this was to hard-code the linking
of "um" in the script.
This was better than trying to modularize it only for the
benefit of "um" anyway.

The shell script has been improved after input from:
Arnaud Lacombe <lacombar@gmail.com>
Nick Bowler <nbowler@elliptictech.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Nick Bowler <nbowler@elliptictech.com>
Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux

Newly exported variables - used by link-vmlinux.sh

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
kbuild: all{no,yes,mod,def,rand}config only read files when instructed to.

Prevent subtle surprises to both people working on the kconfig code
and people using make allnoconfig allyesconfig allmoconfig and
randconfig by only attempting to read a config file if
KCONFIG_ALLCONFIG is set.

Common sense suggests attempting to read the extra config files does
not make sense unless requested.  The documentation says the code
won't attempt to read the extra config files unless requested.
Current usage does not appear to include people depending on the code
reading the config files without the variable being set So do the
simple thing and stop reading config files when passed
all{no,yes,mod,def,rand}config unless KCONFIG_ALLCONFIG environment
variable is set.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
kbuild: fix ia64 link

ia64 build failed like this:

  CC      init/version.o
  LD      init/built-in.o
  KSYM    .tmp_kallsyms1.o
ld: .tmp_kallsyms1.o: linking constant-gp files with non-constant-gp files
ld: failed to merge target specific data of file .tmp_kallsyms1.o
make: *** [vmlinux] Error 1

This was introduced when link of vmlinux was migrated to a script.
Add missing option to as to fix this.

Reported-by: Tony Luck <tony.luck@gmail.com>
Tested-by: Tony Luck <tony.luck@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/config: properly report and set string options

Currently, scripts/config removes the leading double-quote from
string options, but leaves the trailing double-quote.

Also, double-quotes in a string are escaped, but scripts/config
does not unescape those when printing

Finally, scripts/config does not escape double-quotes when setting
string options.

Eg. the current behavior:
    $ grep -E '^CONFIG_FOO=' .config
    CONFIG_FOO="Bar \"Buz\" Meh"
    $ ./scripts/config -s FOO
    Bar \"Buz\" Meh"
    $ ./scripts/config --set-str FOO 'Alpha "Bravo" Charlie'
    $ grep -E '^CONFIG_FOO=' .config
    CONFIG_FOO="Alpha "Bravo" Charlie"

Fix those three, giving this new behavior:
    $ grep -E '^CONFIG_FOO=' .config
    CONFIG_FOO="Bar \"Buz\" Meh"
    $ ./scripts/config -s FOO
    Bar "Buz" Meh
    $ ./scripts/config --set-str FOO 'Alpha "Bravo" Charlie'
    $ grep -E '^CONFIG_FOO=' .config
    CONFIG_FOO="Alpha \"Bravo\" Charlie"

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
mips: Fix KBUILD_CPPFLAGS definition

The KBUILD_CPPFLAGS variable is no longer passed to sh -c 'gcc ...',
but exported and used by the link-vmlinux.sh script. This means that the
double-quotes will not be evaluated by the shell.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccinelle: address test is always true

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccinelle: sizeof of pointer

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Documentation/kernel-parameters: remove autotest and mcatest

It has no more users, the last one is gone in "[PATCH] ia64: Kconfig
cleanup" aka ("6fd79ab50b").
mcatest is gone in commit "[PATCH] ia64: SGI SN update"
("c6bacd5010ec").

Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Documentation/SubmittingPatches: suggested the use of scripts/get_maintainer.pl

Had I found a reference to scripts/get_maintainer.pl when I first read
Documentation/SubmittingPatches, it would've saved me some time.

Signed-off-by: Michel Machado <michel@digirati.com.br>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Documentation/initrd.txt: Change the location of util-linux

The address of util-linux seems deprecated. The new util-linux location is
in the kernel.org. So, change this for the correct address.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
doc: ext3: update documentation with barrier=1 default

Commit 00eacd6 ("ext3: make ext3 mount default to barrier=1") changed
the default barrier mount option for ext3.  The documentation needs to
be updated, so this patch does that.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
builddeb: include autogenerated header files

After 303395ac3bf3e2cb488435537d416bc840438fcb, some headers are
autogenerated. Include these autogenerated headers (mainly
unistd_32_ia32.h) in out-of-tree builds to allow DKMS modules to be
built succesfully.

Signed-off-by: Peter Lekensteyn <lekensteyn@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild updates from Michal Marek.

Fixed up nontrivial merge conflict in Makefile as per Stephen Rothwell
and linux-next (and trivial arch/sparc/Makefile changes due to removed
sparc32 logic).

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  mips: Fix KBUILD_CPPFLAGS definition
  kbuild: fix ia64 link
  kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux
  kbuild: link of vmlinux moved to a script
  kbuild: refactor final link of sparc32
  kbuild: drop unused KBUILD_VMLINUX_OBJS from top-level Makefile
  kbuild: Makefile: remove unnecessary check for m68knommu ARCH
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kconfig changes from Michal Marek:

 - Error handling for make KCONFIG_ALLCONFIG=<...> all*config plus a fix
   for a bug that was exposed by this

 - Fix for the script/config utility.

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/config: properly report and set string options
  kbuild: all{no,yes,mod,def,rand}config only read files when instructed to.
  kconfig: Add error handling to KCONFIG_ALLCONFIG
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull misc kbuild changes from Michal Marek:
 "The non-critical part of kbuild for 3.5 includes

   - two new coccinelle checks
   - fix for make deb-pkg to include generated headers in arch/*/include

  I have more make-deb-pkg fixes in the backlog, but these will likely
  have to wait for 3.6."

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  builddeb: include autogenerated header files
  scripts/coccinelle: sizeof of pointer
  scripts/coccinelle: address test is always true