10 Dec, 2006

1 commit

  • The new PDA code uses a dummy _proxy_pda variable to describe
    memory references to the PDA. It is never referenced
    in inline assembly, but exists as input/output arguments.
    gcc 4.2 in some cases can CSE references to this which causes
    unresolved symbols. Define it to zero to avoid this.

    Signed-off-by: Andi Kleen

    Andi Kleen
     

09 Dec, 2006

1 commit

  • This makes i386 use the generic BUG machinery. There are no functional
    changes from the old i386 implementation.

    The main advantage in using the generic BUG machinery for i386 is that the
    inlined overhead of BUG is just the ud2a instruction; the file+line(+function)
    information are no longer inlined into the instruction stream. This reduces
    cache pollution, and makes disassembly work properly.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Andi Kleen
    Cc: Hugh Dickens
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     

07 Dec, 2006

8 commits

  • The .eh_frame section contents is never written to, so it can as well
    benefit from CONFIG_DEBUG_RODATA.

    Diff-ed against firstfloor tree.

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen

    Jan Beulich
     
  • o Convert more absolute symbols to section relative to keep the theme in
    vmlinux.lds.S file and to avoid problem if kernel is relocated.

    o Also put a message so that in future people can be aware of it and
    avoid introducing absolute symbols.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton

    Vivek Goyal
     
  • 1) Each hypervisor writes a probe function to detect whether we are
    running under that hypervisor. paravirt_probe() registers this
    function.

    2) If vmlinux is booted with ring != 0, we call all the probe
    functions (with registers except %esp intact) in link order: the
    winner will not return.

    Signed-off-by: Rusty Russell
    Signed-off-by: Chris Wright
    Signed-off-by: Andi Kleen
    Cc: Jeremy Fitzhardinge
    Cc: Zachary Amsden
    Signed-off-by: Andrew Morton

    Rusty Russell
     
  • It turns out that the most called ops, by several orders of magnitude,
    are the interrupt manipulation ops. These are obvious candidates for
    patching, so mark them up and create infrastructure for it.

    The method used is that the ops structure has a patch function, which
    is called for each place which needs to be patched: this returns a
    number of instructions (the rest are NOP-padded).

    Usually we can spare a register (%eax) for the binary patched code to
    use, but in a couple of critical places in entry.S we can't: we make
    the clobbers explicit at the call site, and manually clobber the
    allowed registers in debug mode as an extra check.

    And:

    Don't abuse CONFIG_DEBUG_KERNEL, add CONFIG_DEBUG_PARAVIRT.

    And:

    AK: Fix warnings in x86-64 alternative.c build

    And:

    AK: Fix compilation with defconfig

    And:

    ^From: Andrew Morton

    Some binutlises still like to emit references to __stop_parainstructions and
    __start_parainstructions.

    And:

    AK: Fix warnings about unused variables when PARAVIRT is disabled.

    Signed-off-by: Rusty Russell
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Chris Wright
    Signed-off-by: Zachary Amsden
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton

    Rusty Russell
     
  • o Now CONFIG_PHYSICAL_START is being replaced with CONFIG_PHYSICAL_ALIGN.
    Hardcoding the kernel physical start value creates a problem in relocatable
    kernel context due to boot loader limitations. For ex, if somebody
    compiles a relocatable kernel to be run from address 4MB, but this kernel
    will run from location 1MB as grub loads the kernel at physical address
    1MB. Kernel thinks that I am a relocatable kernel and I should run from
    the address I have been loaded at. So somebody wanting to run kernel
    from 4MB alignment location (for improved performance regions) can't do
    that.

    o Hence, Eric proposed that probably CONFIG_PHYSICAL_ALIGN will make
    more sense in relocatable kernel context. At run time kernel will move
    itself to a physical addr location which meets user specified alignment
    restrictions.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Vivek Goyal
     
  • Defining __PHYSICAL_START and __KERNEL_START in asm-i386/page.h works but
    it triggers a full kernel rebuild for the silliest of reasons. This
    modifies the users to directly use CONFIG_PHYSICAL_START and linux/config.h
    which prevents the full rebuild problem, which makes the code much
    more maintainer and hopefully user friendly.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Eric W. Biederman
     
  • Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Vivek Goyal
     
  • Ld knows about 2 kinds of symbols, absolute and section
    relative. Section relative symbols symbols change value
    when a section is moved and absolute symbols do not.

    Currently in the linker script we have several labels
    marking the beginning and ending of sections that
    are outside of sections, making them absolute symbols.
    Having a mixture of absolute and section relative
    symbols refereing to the same data is currently harmless
    but it is confusing.

    This must be done carefully as newer revs of ld do not place
    symbols that appear in sections without data and instead
    ld makes those symbols global :(

    My ultimate goal is to build a relocatable kernel. The
    safest and least intrusive technique is to generate
    relocation entries so the kernel can be relocated at load
    time. The only penalty would be an increase in the size
    of the kernel binary. The problem is that if absolute and
    relocatable symbols are not properly specified absolute symbols
    will be relocated or section relative symbols won't be, which
    is fatal.

    The practical motivation is that when generating kernels that
    will run from a reserved area for analyzing what caused
    a kernel panic, it is simpler if you don't need to hard code
    the physical memory location they will run at, especially
    for the distributions.

    [AK: and merged:]

    o Also put a message so that in future people can be aware of it and
    avoid introducing absolute symbols.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Vivek Goyal
     

09 Nov, 2006

1 commit

  • o Currently there is no specific alignment restriction in linker script
    and in some cases it can be placed non 4K aligned addresses. This fails
    kexec which checks that segment to be loaded is page aligned.

    o I guess, it does not harm data segment to be 4K aligned.

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

    Vivek Goyal
     

28 Oct, 2006

1 commit

  • Add a vmlinux.lds.h helper macro for defining the eight-level initcall table,
    teach all the architectures to use it.

    This is a prerequisite for a patch which performs initcall synchronisation for
    multithreaded-probing.

    Cc: Greg KH
    Signed-off-by: Andrew Morton
    [ Added AVR32 as well ]
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

26 Sep, 2006

1 commit

  • This patch will pack any .note.* section into a PT_NOTE segment in the output
    file.

    To do this, we tell ld that we need a PT_NOTE segment. This requires us to
    start explicitly mapping sections to segments, so we also need to explicitly
    create PT_LOAD segments for text and data, and map the sections to them
    appropriately. Fortunately, each section will default to its previous
    section's segment, so it doesn't take many changes to vmlinux.lds.S.

    This only changes i386 for now, but I presume the corresponding changes for
    other architectures will be as simple.

    This change also adds , which defines C and Assembler macros
    for actually creating ELF notes.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Eric W. Biederman
    Cc: Hollis Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     

27 Jun, 2006

1 commit


25 Jun, 2006

1 commit

  • Considering that there isn't a lot of hw we can depend on during resume,
    this is about as good as it gets.

    This is x86-only for now, although the basic concept (and most of the
    code) will certainly work on almost any platform.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

26 Mar, 2006

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild: (46 commits)
    kbuild: remove obsoleted scripts/reference_* files
    kbuild: fix make help & make *pkg
    kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h
    Kconfig: remove the CONFIG_CC_ALIGN_* options
    kbuild: add -fverbose-asm to i386 Makefile
    kbuild: clean-up genksyms
    kbuild: Lindent genksyms.c
    kbuild: fix genksyms build error
    kbuild: in makefile.txt note that Makefile is preferred name for kbuild files
    kbuild: replace PHONY with FORCE
    kbuild: Fix bug in crc symbol generating of kernel and modules
    kbuild: change kbuild to not rely on incorrect GNU make behavior
    kbuild: when warning symbols exported twice now tell user this is the problem
    kbuild: fix make dir/file.xx when asm symlink is missing
    kbuild: in the section mismatch check try harder to find symbols
    kbuild: fix section mismatch check for unwind on IA64
    kbuild: kill false positives from section mismatch warnings for powerpc
    kbuild: kill trailing whitespace in modpost & friends
    kbuild: small update of allnoconfig description
    kbuild: make namespace.pl CROSS_COMPILE happy
    ...

    Trivial conflict in arch/ppc/boot/Makefile manually fixed up

    Linus Torvalds
     

23 Mar, 2006

1 commit

  • Implement SMP alternatives, i.e. switching at runtime between different
    code versions for UP and SMP. The code can patch both SMP->UP and UP->SMP.
    The UP->SMP case is useful for CPU hotplug.

    With CONFIG_CPU_HOTPLUG enabled the code switches to UP at boot time and
    when the number of CPUs goes down to 1, and switches to SMP when the number
    of CPUs goes up to 2.

    Without CONFIG_CPU_HOTPLUG or on non-SMP-capable systems the code is
    patched once at boot time (if needed) and the tables are released
    afterwards.

    The changes in detail:

    * The current alternatives bits are moved to a separate file,
    the SMP alternatives code is added there.

    * The patch adds some new elf sections to the kernel:
    .smp_altinstructions
    like .altinstructions, also contains a list
    of alt_instr structs.
    .smp_altinstr_replacement
    like .altinstr_replacement, but also has some space to
    save original instruction before replaving it.
    .smp_locks
    list of pointers to lock prefixes which can be nop'ed
    out on UP.
    The first two are used to replace more complex instruction
    sequences such as spinlocks and semaphores. It would be possible
    to deal with the lock prefixes with that as well, but by handling
    them as special case the table sizes become much smaller.

    * The sections are page-aligned and padded up to page size, so they
    can be free if they are not needed.

    * Splitted the code to release init pages to a separate function and
    use it to release the elf sections if they are unused.

    Signed-off-by: Gerd Hoffmann
    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     

19 Feb, 2006

1 commit


11 Sep, 2005

1 commit

  • Inside the linker script, insert the code for DWARF debug info sections. This
    may help GDB'ing a Uml binary. Actually, it seems that ld is able to guess
    what I added correctly, but normal linker scripts include this section so it
    should be correct anyway adding it.

    On request by Sam Ravnborg , I've added it to
    asm-generic/vmlinux.lds.s. I've also moved there the stabs debug section,
    used the new macro in i386 linker script and added DWARF debug section to
    that.

    In the truth, I've not been able to verify the difference in GDB behaviour
    after this change (I've seen large improvements with another patch). This
    may depend on my binutils version, older one may have worse defaults.

    However, this section is present in normal linker script, so add it at
    least for the sake of cleanness.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

08 Sep, 2005

1 commit


08 Jul, 2005

1 commit

  • Add a new section called ".data.read_mostly" for data items that are read
    frequently and rarely written to like cpumaps etc.

    If these maps are placed in the .data section then these frequenly read
    items may end up in cachelines with data is is frequently updated. In that
    case all processors in an SMP system must needlessly reload the cachelines
    again and again containing elements of those frequently used variables.

    The ability to share these cachelines will allow each cpu in an SMP system
    to keep local copies of those shared cachelines thereby optimizing
    performance.

    Signed-off-by: Alok N Kataria
    Signed-off-by: Shobhit Dayal
    Signed-off-by: Christoph Lameter
    Signed-off-by: Shai Fultheim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

26 Jun, 2005

2 commits

  • For one kernel to report a crash another kernel has created we need
    to have 2 kernels loaded simultaneously in memory. To accomplish this
    the two kernels need to built to run at different physical addresses.

    This patch adds the CONFIG_PHYSICAL_START option to the x86 kernel
    so we can do just that. You need to know what you are doing and
    the ramifications are before changing this value, and most users
    won't care so I have made it depend on CONFIG_EMBEDDED

    bzImage kernels will work and run at a different address when compiled
    with this option but they will still load at 1MB. If you need a kernel
    loaded at a different address as well you need to boot a vmlinux.

    Signed-off-by: Eric Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • The vmlinux on i386 does not report the correct physical address of
    the kernel. Instead in the physical address field it currently
    reports the virtual address of the kernel.

    This is patch is a bug fix that corrects vmlinux to report the
    proper physical addresses.

    This is potentially a help for crash dump analysis tools.

    This definitiely allows bootloaders that load vmlinux as a standard
    ELF executable. Bootloaders directly loading vmlinux become of
    practical importance when we consider the kexec on panic case.

    Signed-off-by: Eric Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

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