17 Oct, 2007

2 commits

  • __setup_str_* are referenced only during boot, hence there's no need to
    waste image space for aligning these strings (with the aim of improving
    performance).

    Signed-off-by: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • I need __INIT_REFOK to fix a MODPOST warning for a few MIPS configs which
    have to call init code from .text very early in the game due to bootloader
    issues. __INITDATA_REFOK is just for consistency.

    Signed-off-by: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     

11 Oct, 2007

1 commit

  • With the net namespaces many code leaved the __init section,
    thus making the kernel occupy more memory than it did before.
    Since we have a config option that prohibits the namespace
    creation, the functions that initialize/finalize some netns
    stuff are simply not needed and can be freed after the boot.

    Currently, this is almost not noticeable, since few calls
    are no longer in __init, but when the namespaces will be
    merged it will be possible to free more code. I propose to
    use the __net_init, __net_exit and __net_initdata "attributes"
    for functions/variables that are not used if the CONFIG_NET_NS
    is not set to save more space in memory.

    The exiting functions cannot just reside in the __exit section,
    as noticed by David, since the init section will have
    references on it and the compilation will fail due to modpost
    checks. These references can exist, since the init namespace
    never dies and the exit callbacks are never called. So I
    introduce the __exit_refok attribute just like it is already
    done with the __init_refok.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

12 Aug, 2007

1 commit


01 Aug, 2007

1 commit


22 Jul, 2007

1 commit

  • gcc 4.3 supports a new __attribute__((__cold__)) to mark functions cold. Any
    path directly leading to a call of this function will be unlikely. And gcc
    will try to generate smaller code for the function itself.

    Please use with care. The code generation advantage isn't large and in most
    cases it is not worth uglifying code with this.

    This patch marks some common error functions like panic(), printk()
    as cold. This will longer term make many unlikely()s unnecessary, although
    we can keep them for now for older compilers.

    BUG is not marked cold because there is currently no way to tell
    gcc to mark a inline function told.

    Also all __init and __exit functions are marked cold. With a non -Os
    build this will tell the compiler to generate slightly smaller code
    for them. I think it currently only uses less alignments for labels,
    but that might change in the future.

    One disadvantage over *likely() is that they cannot be easily instrumented
    to verify them.

    Another drawback is that only the latest gcc 4.3 snapshots support this.
    Unfortunately we cannot detect this using the preprocessor. This means older
    snapshots will fail now. I don't think that's a problem because they are
    unreleased compilers that nobody should be using.

    gcc also has a __hot__ attribute, but I don't see any sense in using
    this in the kernel right now. But someday I hope gcc will be able
    to use more aggressive optimizing for hot functions even in -Os,
    if that happens it should be added.

    Includes compile fix from Thomas Gleixner.

    Cc: Jan Hubicka
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

17 Jul, 2007

1 commit


19 May, 2007

1 commit

  • Throughout the kernel there are a few legitimite references
    to init or exit sections. Most of these are covered by the
    patterns included in modpost but a few nees special attention.
    To avoid hardcoding a lot of function names in modpost introduce
    a marker so relevant function/data can be marked.
    When modpost see a reference to a init/exit function from
    a function/data marked no warning will be issued.

    Idea from: Andrew Morton

    Signed-off-by: Sam Ravnborg
    Cc: Andrew Morton

    Sam Ravnborg
     

15 May, 2007

1 commit

  • After examining what was checked in and the code base I discovered that most
    of 86c0baf123e474b6eb404798926ecf62b426bf3a wasn't necessary anymore....

    So here's a patch that reverts the last part of that changeset:

    Revert part of 86c0baf123e474b6eb404798926ecf62b426bf3a.

    The kernel has moved forward to a state where the original change is not
    necessary. After porting forward, this final version of the patch was
    applied and broke non-x86 architectures.

    Signed-off-by: Prarit Bhargava
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prarit Bhargava
     

09 May, 2007

1 commit


08 May, 2007

1 commit

  • Remove software_suspend() and all its users since
    pm_suspend(PM_SUSPEND_DISK) should be equivalent and there's no point in
    having two interfaces for the same thing.

    The patch also changes the valid_state function to return 0 (false) for
    PM_SUSPEND_DISK when SOFTWARE_SUSPEND is not configured instead of
    accepting it and having the whole thing fail later.

    Signed-off-by: Johannes Berg
    Acked-by: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     

03 May, 2007

1 commit

  • Change sysenter_setup to __cpuinit.
    Change __INIT & __INITDATA to be cpu hotplug aware.

    Resolve MODPOST warnings similar to:

    WARNING: vmlinux - Section mismatch: reference to .init.text:sysenter_setup from
    .text between 'identify_cpu' (at offset 0xc040a380) and 'detect_ht'

    and

    WARNING: vmlinux - Section mismatch: reference to .init.data:vsyscall_int80_end
    from .text between 'sysenter_setup' (at offset 0xc041a269) and 'enable_sep_cpu'
    WARNING: vmlinux - Section mismatch: reference to
    .init.data:vsyscall_int80_start from .text between 'sysenter_setup' (at offset
    0xc041a26e) and 'enable_sep_cpu'
    WARNING: vmlinux - Section mismatch: reference to
    .init.data:vsyscall_sysenter_end from .text between 'sysenter_setup' (at offset
    0xc041a275) and 'enable_sep_cpu'
    WARNING: vmlinux - Section mismatch: reference to
    .init.data:vsyscall_sysenter_start from .text between 'sysenter_setup' (at
    offset 0xc041a27a) and 'enable_sep_cpu'

    Signed-off-by: Prarit Bhargava
    Signed-off-by: Andi Kleen

    Prarit Bhargava
     

13 Feb, 2007

1 commit

  • Current implementation stores a static command-line buffer allocated to
    COMMAND_LINE_SIZE size. Most architectures stores two copies of this buffer,
    one for future reference and one for parameter parsing.

    Current kernel command-line size for most architecture is much too small for
    module parameters, video settings, initramfs paramters and much more. The
    problem is that setting COMMAND_LINE_SIZE to a grater value, allocates static
    buffers.

    In order to allow a greater command-line size, these buffers should be
    dynamically allocated or marked as init disposable buffers, so unused memory
    can be released.

    This patch renames the static saved_command_line variable into
    boot_command_line adding __initdata attribute, so that it can be disposed
    after initialization. This rename is required so applications that use
    saved_command_line will not be affected by this change.

    It reintroduces saved_command_line as dynamically allocated buffer to match
    the data in boot_command_line.

    It also mark secondary command-line buffer as __initdata, and copies it to
    dynamically allocated static_command_line buffer components may hold reference
    to it after initialization.

    This patch is for linux-2.6.20-rc4-mm1 and is divided to target each
    architecture. I could not check this in any architecture so please forgive me
    if I got it wrong.

    The per-architecture modification is very simple, use boot_command_line in
    place of saved_command_line. The common code is the change into dynamic
    command-line.

    This patch:

    1. Rename saved_command_line into boot_command_line, mark as init
    disposable.

    2. Add dynamic allocated saved_command_line.

    3. Add dynamic allocated static_command_line.

    4. During startup copy: boot_command_line into saved_command_line. arch
    command_line into static_command_line.

    5. Parse static_command_line and not arch command_line, so arch
    command_line may be freed.

    Signed-off-by: Alon Bar-Lev
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Hirokazu Takata
    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
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alon Bar-Lev
     

12 Feb, 2007

1 commit

  • A variety of (mostly) innocuous fixes to the embedded kernel-doc content in
    source files, including:

    * make multi-line initial descriptions single line
    * denote some function names, constants and structs as such
    * change erroneous opening '/*' to '/**' in a few places
    * reword some text for clarity

    Signed-off-by: Robert P. J. Day
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

12 Dec, 2006

1 commit


21 Nov, 2006

1 commit

  • This is a quick hack to overcome the fact that SRCU currently does not
    allow static initializers, and we need to sometimes initialize those
    things before any other initializers (even "core" ones) can do so.

    Currently we don't allow this at all for modules, and the only user that
    needs is right now is cpufreq. As reported by Thomas Gleixner:

    "Commit b4dfdbb3c707474a2254c5b4d7e62be31a4b7da9 ("[PATCH] cpufreq:
    make the transition_notifier chain use SRCU breaks cpu frequency
    notification users, which register the callback > on core_init
    level."

    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Arjan van de Ven
    Cc: Andrew Morton ,
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

28 Oct, 2006

1 commit

  • The multithreaded-probing code has a problem: after one initcall level (eg,
    core_initcall) has been processed, we will then start processing the next
    level (postcore_initcall) while the kernel threads which are handling
    core_initcall are still executing. This breaks the guarantees which the
    layered initcalls previously gave us.

    IOW, we want to be multithreaded _within_ an initcall level, but not between
    different levels.

    Fix that up by causing the probing code to wait for all outstanding probes at
    one level to complete before we start processing the next level.

    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

27 Sep, 2006

1 commit

  • Resetting the devices during driver initialization can be a costly
    operation in terms of time (especially scsi devices). This option can be
    used by drivers to know that user forcibly wants the devices to be reset
    during initialization.

    This option can be useful while kernel is booting in unreliable
    environment. For ex. during kdump boot where devices are in unknown
    random state and BIOS execution has been skipped.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

26 Apr, 2006

1 commit


10 Apr, 2006

1 commit


26 Mar, 2006

1 commit


17 Jan, 2006

1 commit

  • Add __meminit to the __init lineup to ensure functions default
    to __init when memory hotplug is not enabled. Replace __devinit
    with __meminit on functions that were changed when the memory
    hotplug code was introduced.

    Signed-off-by: Matt Tolentino
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Matt Tolentino
     

26 Jun, 2005

1 commit

  • This patch adds __cpuinit and __cpuinitdata sections that need to exist past
    boot to support cpu hotplug.

    Caveat: This is done *only* for EM64T CPU Hotplug support, on request from
    Andi Kleen. Much of the generic hotplug code in kernel, and none of the other
    archs that support CPU hotplug today, i386, ia64, ppc64, s390 and parisc dont
    mark sections with __cpuinit, but only mark them as __devinit, and
    __devinitdata.

    If someone is motivated to change generic code, we need to make sure all
    existing hotplug code does not break, on other arch's that dont use __cpuinit,
    and __cpudevinit.

    Signed-off-by: Ashok Raj
    Acked-by: Andi Kleen
    Acked-by: Zwane Mwaikambo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashok Raj
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds