07 Feb, 2008

1 commit

  • calibrate_delay() must be __cpuinit, not __{dev,}init.

    I've verified that this is correct for all users.

    While doing the latter, I also did the following cleanups:
    - remove pointless additional prototypes in C files
    - ensure all users #include

    This fixes the following section mismatches with CONFIG_HOTPLUG=n,
    CONFIG_HOTPLUG_CPU=y:

    WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
    WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')

    Signed-off-by: Adrian Bunk
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: "David S. Miller"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Christian Zankel
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

03 Feb, 2008

1 commit

  • Move the instrumentation Kconfig to

    arch/Kconfig for architecture dependent options
    - oprofile
    - kprobes

    and

    init/Kconfig for architecture independent options
    - profiling
    - markers

    Remove the "Instrumentation Support" menu. Everything moves to "General setup".
    Delete the kernel/Kconfig.instrumentation file.

    Signed-off-by: Mathieu Desnoyers
    Cc: Linus Torvalds
    Cc:
    Signed-off-by: Sam Ravnborg

    Mathieu Desnoyers
     

02 Feb, 2008

1 commit


29 Jan, 2008

2 commits


11 Dec, 2007

1 commit

  • Recently, Wang Chen submitted a patch
    (d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
    after a subsequent reference to skb, because netif_rx may call kfree_skb on
    its argument. The same problem occurs in some other drivers as well.

    This was found using the following semantic match.
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    expression skb, e,e1;
    @@

    (
    netif_rx(skb);
    |
    netif_rx_ni(skb);
    )
    ... when != skb = e
    (
    skb = e1
    |
    * skb
    )
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

31 Oct, 2007

1 commit


21 Oct, 2007

1 commit

  • Commit 9a39e273d4df0560c724c5fe71f6314a0583ca2b removed the boot directory
    addition to CFLAGS that was being used by the subdirectory builds. For the
    other files, that patch set EXTRA_CFLAGS, but Makefile.build explicitly
    sets that to empty as it is explicitly for a single directory only.
    Append to KBUILD_CFLAGS instead.

    Signed-off-by: Milton Miller
    Signed-off-by: Sam Ravnborg

    Milton Miller
     

20 Oct, 2007

4 commits

  • Signed-off-by: Robert P. J. Day
    Signed-off-by: Adrian Bunk

    Robert P. J. Day
     
  • Quoting Randy:

    "It seems sad that this patch sources Kconfig.marker, a 7-line file,
    20-something times. Yes, you (we) don't want to put those 7 lines into
    20-something different files, so sourcing is the right thing.

    However, what you did for avr32 seems more on the right track to me: make
    _one_ Instrumentation support menu that includes PROFILING, OPROFILE, KPROBES,
    and MARKERS and then use (source) that in all of the arches."

    Signed-off-by: Mathieu Desnoyers
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • One of the easiest things to isolate is the pid printed in kernel log.
    There was a patch, that made this for arch-independent code, this one makes
    so for arch/xxx files.

    It took some time to cross-compile it, but hopefully these are all the
    printks in arch code.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Pavel Emelyanov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • is_init() is an ambiguous name for the pid==1 check. Split it into
    is_global_init() and is_container_init().

    A cgroup init has it's tsk->pid == 1.

    A global init also has it's tsk->pid == 1 and it's active pid namespace
    is the init_pid_ns. But rather than check the active pid namespace,
    compare the task structure with 'init_pid_ns.child_reaper', which is
    initialized during boot to the /sbin/init process and never changes.

    Changelog:

    2.6.22-rc4-mm2-pidns1:
    - Use 'init_pid_ns.child_reaper' to determine if a given task is the
    global init (/sbin/init) process. This would improve performance
    and remove dependence on the task_pid().

    2.6.21-mm2-pidns2:

    - [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
    ppc,avr32}/traps.c for the _exception() call to is_global_init().
    This way, we kill only the cgroup if the cgroup's init has a
    bug rather than force a kernel panic.

    [akpm@linux-foundation.org: fix comment]
    [sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
    [bunk@stusta.de: kernel/pid.c: remove unused exports]
    [sukadev@us.ibm.com: Fix capability.c to work with threaded init]
    Signed-off-by: Serge E. Hallyn
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Pavel Emelianov
    Cc: Eric W. Biederman
    Cc: Cedric Le Goater
    Cc: Dave Hansen
    Cc: Herbert Poetzel
    Cc: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     

17 Oct, 2007

3 commits

  • * 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.

    Linus Torvalds
     
  • We have had complaints where a threaded application is left in a bad state
    after one of it's threads is killed when we hit a VM: out_of_memory
    condition.

    Killing just one of the process threads can leave the application in a bad
    state, whereas killing the entire process group would allow for the
    application to restart, or be otherwise handled, and makes it very obvious
    that something has gone wrong.

    This change allows the entire process group to be taken down, rather
    than just the one thread.

    Signed-off-by: Will Schmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Haavard Skinnemoen
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Schmidt
     
  • Identical handlers of PTRACE_DETACH go into ptrace_request().
    Not touching compat code.
    Not touching archs that don't call ptrace_request.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

15 Oct, 2007

2 commits

  • 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
     
  • Only in very rare cases is it needed to change CFLAGS
    outside of arch/*/Makefile.
    Fix up all wrong cases - in most cases
    the use of EXTRA_CFLAGS is the only thing needed.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

28 Aug, 2007

11 commits


20 Jul, 2007

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits)
    xtensa: use DATA_DATA in xtensa
    powerpc: add missing DATA_DATA to powerpc
    cris: use DATA_DATA in cris
    kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c
    kbuild: use -fno-optimize-sibling-calls unconditionally
    kconfig: reset generated values only if Kconfig and .config agree.
    kbuild: fix the warning when running make tags
    kconfig: strip 'CONFIG_' automatically in kernel configuration search
    kbuild: use POSIX BRE in headers install target
    Whitelist references from __dbe_table to .init
    modpost white list pattern adjustment
    kbuild: do section mismatch check on full vmlinux
    kbuild: whitelist references from variables named _timer to .init.text
    kbuild: remove hardcoded _logo names from modpost
    kbuild: remove hardcoded apic_es7000 from modpost
    kbuild: warn about references from .init.text to .exit.text
    kbuild: consolidate section checks
    kbuild: refactor code in modpost to improve maintainability
    kbuild: ignore section mismatch warnings originating from .note section
    kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it
    ...

    Linus Torvalds
     
  • per cpu data section contains two types of data. One set which is
    exclusively accessed by the local cpu and the other set which is per cpu,
    but also shared by remote cpus. In the current kernel, these two sets are
    not clearely separated out. This can potentially cause the same data
    cacheline shared between the two sets of data, which will result in
    unnecessary bouncing of the cacheline between cpus.

    One way to fix the problem is to cacheline align the remotely accessed per
    cpu data, both at the beginning and at the end. Because of the padding at
    both ends, this will likely cause some memory wastage and also the
    interface to achieve this is not clean.

    This patch:

    Moves the remotely accessed per cpu data (which is currently marked
    as ____cacheline_aligned_in_smp) into a different section, where all the data
    elements are cacheline aligned. And as such, this differentiates the local
    only data and remotely accessed data cleanly.

    Signed-off-by: Fenghua Yu
    Acked-by: Suresh Siddha
    Cc: Rusty Russell
    Cc: Christoph Lameter
    Cc:
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fenghua Yu
     
  • This patch completes Linus's wish that the fault return codes be made into
    bit flags, which I agree makes everything nicer. This requires requires
    all handle_mm_fault callers to be modified (possibly the modifications
    should go further and do things like fault accounting in handle_mm_fault --
    however that would be for another patch).

    [akpm@linux-foundation.org: fix alpha build]
    [akpm@linux-foundation.org: fix s390 build]
    [akpm@linux-foundation.org: fix sparc build]
    [akpm@linux-foundation.org: fix sparc64 build]
    [akpm@linux-foundation.org: fix ia64 build]
    Signed-off-by: Nick Piggin
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Greg Ungerer
    Cc: Matthew Wilcox
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Acked-by: Kyle McMartin
    Acked-by: Haavard Skinnemoen
    Acked-by: Ralf Baechle
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    [ Still apparently needs some ARM and PPC loving - Linus ]
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

18 Jul, 2007

3 commits

  • Identical implementations of PTRACE_POKEDATA go into generic_ptrace_pokedata()
    function.

    AFAICS, fix bug on xtensa where successful PTRACE_POKEDATA will nevertheless
    return EPERM.

    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata()
    function.

    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • If the kernel OOPSed or BUGed then it probably should be considered as
    tainted. Thus, all subsequent OOPSes and SysRq dumps will report the
    tainted kernel. This saves a lot of time explaining oddities in the
    calltraces.

    Signed-off-by: Pavel Emelianov
    Acked-by: Randy Dunlap
    Cc:
    Signed-off-by: Andrew Morton
    [ Added parisc patch from Matthew Wilson -Linus ]
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     

17 Jul, 2007

1 commit

  • * Sam Ravnborg (sam@ravnborg.org) wrote:
    > From your patch it looks like I originally missed out
    > powerpc + xtensa when introducing DATA_DATA - would be nice if
    > you could fix that.
    >
    > Sam

    Use DATA_DATA in xtensa

    Signed-off-by: Mathieu Desnoyers
    Cc: Chris Zankel
    Signed-off-by: Sam Ravnborg

    Mathieu Desnoyers
     

01 Jun, 2007

5 commits

  • The non-rt signal handling was never really used, so we don't break
    anything. This patch also cleans up the signal stack-frame to make
    it independent from the processor configuration. It also improves
    the method used for controlling single-stepping. We now save and
    restore the 'icountlevel' register that controls single stepping
    and set or clear the saved state to enable or disable it.

    Signed-off-by: Chris Zankel

    Chris Zankel
     
  • Move the fields of the COMMON sections 'swapper_pg_dir' and
    'empty_zero_page' to the BSS section. Remove the unused COMMON
    sections 'emtpy_bad_page_table' and 'empty_bad_page'.

    Signed-off-by: Chris Zankel

    Chris Zankel
     
  • The header files in the asm-xtensa directory are not clean and
    'make headers_check' fails. This is a first patch to fix most of
    the header files. It removes unnecessary include statements and
    adds some that are required for building the kernel. The linker
    script required some updates or the linking stage would fail.

    Signed-off-by: Chris Zankel

    Chris Zankel
     
  • This patch removes the following symbols from
    arch/xtensa/kernel/xtensa_ksyms.c that were already exported:
    memcmp, memchr, strcat, strchr, strlen, stncat, strnlen, strrchr,
    strstr, enable_irq, and disable_irq

    Signed-off-by: Chris Zankel

    Chris Zankel
     
  • The assembler directive '.begin literal' is deprecated in the newer
    versions of the binutils (strncopy_user.S and strnlen_user.S).

    Signed-off-by: Chris Zankel

    Chris Zankel