20 Nov, 2009

1 commit


18 Nov, 2009

1 commit

  • …ux/kernel/git/josh/linux-misc

    * 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc:
    Makefile: Add -Wmising-prototypes to HOSTCFLAGS
    oss: Mark loadhex static in hex2hex.c
    dtc: Mark various internal functions static
    dtc: Set "noinput" in the lexer to avoid an unused function
    drm: radeon: Mark several functions static in mkregtable
    arch/sparc/boot/*.c: Mark various internal functions static
    arch/powerpc/boot/addRamDisk.c: Mark several internal functions static
    arch/alpha/boot/tools/objstrip.c: Mark "usage" static
    Documentation/vm/page-types.c: Declare checked_open static
    genksyms: Mark is_reserved_word static
    kconfig: Mark various internal functions static
    kconfig: Make zconf.y work with current bison

    Linus Torvalds
     

16 Nov, 2009

1 commit

  • Now that all host programs use static for all private functions and
    forward prototypes for all extern functions, add -Wmissing-prototypes to
    HOSTCFLAGS in the hopes of keeping it that way.

    All versions of GCC supported by the kernel handle -Wmissing-prototypes.

    Signed-off-by: Josh Triplett

    Josh Triplett
     

13 Nov, 2009

1 commit


04 Nov, 2009

1 commit


16 Oct, 2009

1 commit


14 Oct, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
    kbuild: revert "save ARCH & CROSS_COMPILE ..."
    warn about use of uninstalled kernel headers
    kbuild: mkcompile_h: trivial cleanups
    kbuild: fix warning when domainname is not available
    kbuild: Fix size_append issue for bzip2/lzma kernel
    kbuild,scripts: use non-builtin echo for '-e'
    kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set

    Linus Torvalds
     

12 Oct, 2009

2 commits

  • Linus Torvalds
     
  • Revert commit 575543347b5baed0ca927cb90ba8807396fe9cc9

    It caused following issues:

    - On architectures where ARCH= setting is used to select between
    32 and 64 bit this was no longer possible without "make mrproper"
    - If ARCH was changed then kbuild refused to run "make mrproper"
    because ARCH had changed
    - When CROSS_COMPILE was changed people were asked to run "make mrproper"
    but kbuild refused to run "make mrproper" because CROSS_COMPILE changed.
    - Spaces in CROSS_COMPILE was not 'supported'
    - If an non-existing ARCH= was used kbuild could get stuck

    Lessons learned:
    . Despite being simple and straghtforward people uses very different
    approaches when building the kernel.

    . CROSS_COMPILE is sometimes used for ccache despite cache being
    only a CC frontend so one would have expected CC to be
    used for this purpose.

    . And obviously this was not tested widely enough.

    Signed-off-by: Sam Ravnborg
    Cc: Pavel Machek
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Andrew Morton

    Sam Ravnborg
     

05 Oct, 2009

1 commit

  • I'm skipping -rc2 because the -rc1 Makefile mistakenly said -rc2, so in
    order to avoid confusion, I'm jumping from -rc1 to -rc3. That way, when
    'uname' (or an oops report) says 2.6.32-rc2, there's no confusion about
    whether people perhaps meant -rc1 or -rc2.

    Linus Torvalds
     

28 Sep, 2009

1 commit


20 Sep, 2009

6 commits

  • Albin Tonnerre reported:

    Bash 4 filters out variables which contain a dot in them.
    This happends to be the case of CPPFLAGS_vmlinux.lds.
    This is rather unfortunate, as it now causes
    build failures when using SHELL=/bin/bash to compile,
    or when bash happens to be used by make (eg when it's /bin/sh)

    Remove the common definition of CPPFLAGS_vmlinux.lds by
    pushing relevant stuff to either Makefile.build or the
    arch specific kernel/Makefile where we build the linker script.

    This is also nice cleanup as we move the information out where
    it is used.

    Notes for the different architectures touched:

    arm - we use an already exported symbol
    cris - we use a config symbol aleady available
    [Not build tested]
    mips - the jiffies complexity has moved to vmlinux.lds.S where we need it.
    Added a few variables to CPPFLAGS - they are only used by
    the linker script.
    [Not build tested]
    powerpc - removed assignment that is not needed
    [not build tested]
    sparc - simplified it using $(BITS)
    um - introduced a few new exported variables to deal with this
    xtensa - added options to CPP invocation
    [not build tested]

    Cc: Albin Tonnerre
    Cc: Russell King
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Chris Zankel
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • The upcomming gcc 4.5 has a new -fconserve-stack option that tells the
    inliner to take stack frame size in account. Set it if the compiler
    supports it.

    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Andi Kleen
     
  • The new alternative `gold' linker in recent binutils doesn't support
    the -X option. This breaks allyesconfig builds that have
    CONFIG_STRIP_ASM_SYMS enabled. Check if the linker really supports
    the option using ld-option.

    Signed-off-by: Andi Kleen
    Signed-off-by: Sam Ravnborg

    Andi Kleen
     
  • ld-option is misnamed as it test options to gcc, not to ld.
    Renamed it to reflect this.

    Cc: Andi Kleen
    Cc: Roland McGrath
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • When building a kernel for a different architecture
    kbuild requires the user always to specify ARCH and
    CROSS_COMPILE on the command-line.

    We use the asm symlink to detect if user forgets to
    specify the correct ARCH value - but that symlink
    is about to die. And we do now want to loose this check.

    This patch save the settings of ARCH and CROSS_COMPILE
    in two files named:

    include/generated/kernel.arch
    include/generated/kernel.cross

    The settings are saved during "make *config" time
    and always read.

    If user try to change the settings we error out.

    This works both for plain builds and for O=...
    builds.

    So now you can do:
    $ mkdir sparc64
    $ make O=sparc64 ARCH=sparc64 CROSS_COMPILE=sparc64-linux- defconfig
    $ cd sparc64
    $ make

    Notice that you no longer need to tell kbuild
    the settings of ARCH and CROSS_COMPILE when you type make
    in the output directory.

    Likewise for plain builds where you do not use O=...

    Signed-off-by: Sam Ravnborg
    Cc: Roland McGrath

    Sam Ravnborg
     
  • Replace the use of CROSS_COMPILE to select a customized
    installkernel script with the possibility to set INSTALLKERNEL
    to select a custom installkernel script when running make:

    make INSTALLKERNEL=arm-installkernel install

    With this patch we are now more consistent across
    different architectures - they did not all support use
    of CROSS_COMPILE.

    The use of CROSS_COMPILE was a hack as this really belongs
    to gcc/binutils and the installkernel script does not change
    just because we change toolchain.

    The use of CROSS_COMPILE caused troubles with an upcoming patch
    that saves CROSS_COMPILE when a kernel is built - it would no
    longer be installable.
    [Thanks to Peter Z. for this hint]

    This patch undos what Ian did in commit:

    0f8e2d62fa04441cd12c08ce521e84e5bd3f8a46
    ("use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh")

    The patch has been lightly tested on x86 only - but all changes
    looks obvious.

    Acked-by: Peter Zijlstra
    Acked-by: Mike Frysinger [blackfin]
    Acked-by: Russell King [arm]
    Acked-by: Paul Mundt [sh]
    Acked-by: "H. Peter Anvin" [x86]
    Cc: Ian Campbell
    Cc: Tony Luck [ia64]
    Cc: Fenghua Yu [ia64]
    Cc: Hirokazu Takata [m32r]
    Cc: Geert Uytterhoeven [m68k]
    Cc: Kyle McMartin [parisc]
    Cc: Benjamin Herrenschmidt [powerpc]
    Cc: Martin Schwidefsky [s390]
    Cc: Thomas Gleixner [x86]
    Cc: Ingo Molnar [x86]
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

16 Sep, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
    powerpc64: convert to dynamic percpu allocator
    sparc64: use embedding percpu first chunk allocator
    percpu: kill lpage first chunk allocator
    x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
    percpu: update embedding first chunk allocator to handle sparse units
    percpu: use group information to allocate vmap areas sparsely
    vmalloc: implement pcpu_get_vm_areas()
    vmalloc: separate out insert_vmalloc_vm()
    percpu: add chunk->base_addr
    percpu: add pcpu_unit_offsets[]
    percpu: introduce pcpu_alloc_info and pcpu_group_info
    percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
    percpu: add @align to pcpu_fc_alloc_fn_t
    percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
    percpu: drop @static_size from first chunk allocators
    percpu: generalize first chunk allocator selection
    percpu: build first chunk allocators selectively
    percpu: rename 4k first chunk allocator to page
    percpu: improve boot messages
    percpu: fix pcpu_reclaim() locking
    ...

    Fix trivial conflict as by Tejun Heo in kernel/sched.c

    Linus Torvalds
     

10 Sep, 2009

1 commit


06 Sep, 2009

1 commit


28 Aug, 2009

1 commit


22 Aug, 2009

1 commit


14 Aug, 2009

2 commits

  • Conflicts:
    arch/sparc/kernel/smp_64.c
    arch/x86/kernel/cpu/perf_counter.c
    arch/x86/kernel/setup_percpu.c
    drivers/cpufreq/cpufreq_ondemand.c
    mm/percpu.c

    Conflicts in core and arch percpu codes are mostly from commit
    ed78e1e078dd44249f88b1dd8c76dafb39567161 which substituted many
    num_possible_cpus() with nr_cpu_ids. As for-next branch has moved all
    the first chunk allocators into mm/percpu.c, the changes are moved
    from arch code to mm/percpu.c.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Linus Torvalds
     

01 Aug, 2009

1 commit


23 Jul, 2009

1 commit


17 Jul, 2009

1 commit

  • Turning on this flag could prevent the compiler from optimising away
    some "useless" checks for null pointers. Such bugs can sometimes become
    exploitable at compile time because of the -O2 optimisation.

    See http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html

    An example that clearly shows this 'problem' is commit 6bf67672.

    static void __devexit agnx_pci_remove(struct pci_dev *pdev)
    {
    struct ieee80211_hw *dev = pci_get_drvdata(pdev);
    - struct agnx_priv *priv = dev->priv;
    + struct agnx_priv *priv;
    AGNX_TRACE;

    if (!dev)
    return;
    + priv = dev->priv;

    By reverting this patch, and compile it with and without
    -fno-delete-null-pointer-checks flag, we can see that the check for dev
    is compiled away.

    call printk #
    - testq %r12, %r12 # dev
    - je .L94 #,
    movq %r12, %rdi # dev,

    Clearly the 'fix' is to stop using dev before it is tested, but building
    with -fno-delete-null-pointer-checks flag at least makes it harder to
    abuse.

    Signed-off-by: Eugene Teo
    Acked-by: Eric Paris
    Acked-by: Wang Cong
    Signed-off-by: Linus Torvalds

    Eugene Teo
     

14 Jul, 2009

1 commit


13 Jul, 2009

1 commit

  • This causes kernel images that don't run init to completion with certain
    broken gcc versions.

    This fixes kernel bugzilla entry:
    http://bugzilla.kernel.org/show_bug.cgi?id=13012

    I suspect the gcc problem is this:
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28230

    Fix the problem by using the -fno-strict-overflow flag instead, which
    not only does not exist in the known-to-be-broken versions of gcc (it
    was introduced later than fwrapv), but seems to be much less disturbing
    to gcc too: the difference in the generated code by -fno-strict-overflow
    are smaller (compared to using neither flag) than when using -fwrapv.

    Reported-by: Barry K. Nathan
    Pushed-by: Frans Pop
    Cc: Andrew Morton
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 Jul, 2009

1 commit


04 Jul, 2009

1 commit

  • Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
    changes. As alpha in percpu tree uses 'weak' attribute instead of
    inline assembly, there's no need for __used attribute.

    Conflicts:
    arch/alpha/include/asm/percpu.h
    arch/mn10300/kernel/vmlinux.lds.S
    include/linux/percpu-defs.h

    Tejun Heo
     

27 Jun, 2009

2 commits

  • TOPDIR is obsolete, it can be finally removed now.

    Signed-off-by: WANG Cong
    Signed-off-by: Sam Ravnborg

    Amerigo Wang
     
  • Some distributions have enabled the gcc flag -Wformat-security by default.
    This results in a number of warnings about format arguments to functions,
    sometimes in cases where fixing the warning is not likely to actually fix a
    bug. Instead of hand patching a dozens of places (possibly more) that produce
    warnings that get ignored anyway we just turn off the flag in the Makefile.

    Signed-off-by: Floris Kraak
    Signed-off-by: Pekka Enberg
    Signed-off-by: Sam Ravnborg

    Floris Kraak
     

25 Jun, 2009

1 commit


24 Jun, 2009

1 commit

  • x86 throws away .discard section but no other archs do. Also,
    .discard is not thrown away while linking modules. Make every arch
    and module linking throw it away. This will be used to define dummy
    variables for percpu declarations and definitions.

    This patch is based on Ivan Kokshaysky's alpha percpu patch.

    [ Impact: always throw away everything in .discard ]

    Signed-off-by: Tejun Heo
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Tony Luck
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Jeff Dike
    Cc: Chris Zankel
    Cc: Rusty Russell
    Cc: Ingo Molnar

    Tejun Heo
     

19 Jun, 2009

1 commit

  • Enable the use of GCC's coverage testing tool gcov [1] with the Linux
    kernel. gcov may be useful for:

    * debugging (has this code been reached at all?)
    * test improvement (how do I change my test to cover these lines?)
    * minimizing kernel configurations (do I need this option if the
    associated code is never run?)

    The profiling patch incorporates the following changes:

    * change kbuild to include profiling flags
    * provide functions needed by profiling code
    * present profiling data as files in debugfs

    Note that on some architectures, enabling gcc's profiling option
    "-fprofile-arcs" for the entire kernel may trigger compile/link/
    run-time problems, some of which are caused by toolchain bugs and
    others which require adjustment of architecture code.

    For this reason profiling the entire kernel is initially restricted
    to those architectures for which it is known to work without changes.
    This restriction can be lifted once an architecture has been tested
    and found compatible with gcc's profiling. Profiling of single files
    or directories is still available on all platforms (see config help
    text).

    [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html

    Signed-off-by: Peter Oberparleiter
    Cc: Andi Kleen
    Cc: Huang Ying
    Cc: Li Wei
    Cc: Michael Ellerman
    Cc: Ingo Molnar
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Rusty Russell
    Cc: WANG Cong
    Cc: Sam Ravnborg
    Cc: Jeff Dike
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     

15 Jun, 2009

1 commit

  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits)
    .gitignore: ignore *.lzma files
    kbuild: add generic --set-str option to scripts/config
    kbuild: simplify argument loop in scripts/config
    kbuild: handle non-existing options in scripts/config
    kallsyms: generalize text region handling
    kallsyms: support kernel symbols in Blackfin on-chip memory
    documentation: make version fix
    kbuild: fix a compile warning
    gitignore: Add GNU GLOBAL files to top .gitignore
    kbuild: fix delay in setlocalversion on readonly source
    README: fix misleading pointer to the defconf directory
    vmlinux.lds.h update
    kernel-doc: cleanup perl script
    Improve vmlinux.lds.h support for arch specific linker scripts
    kbuild: fix headers_exports with boolean expression
    kbuild/headers_check: refine extern check
    kbuild: fix "Argument list too long" error for "make headers_check",
    ignore *.patch files
    Remove bashisms from scripts
    menu: fix embedded menu presentation
    ...

    Linus Torvalds
     

10 Jun, 2009

2 commits

  • Linus Torvalds
     
  • The GNU make's origin function know undefined variable well,
    so the outer ifdef/endif conditional checking is unneeded.

    From `info make` documentation, origin will return

    `undefined'
    if VARIABLE was never defined.
    `command line'
    if VARIABLE was defined on the command line.
    ...

    Therefore, $(origin V) will get a value anyway, killing ifdef/endif is
    viable and safe.

    Furthermore, I've checked the minimal requirements from
    Documentation/Changes is GNU make 3.79.1, and that version of GNU make
    has support of origin function well already, so now it's safe to kill
    the outer conditional checking, without upgrading the minimal
    requirements.

    Signed-off-by: Cheng Renquan
    Signed-off-by: Sam Ravnborg

    Cheng Renquan
     

05 Jun, 2009

1 commit