08 Jul, 2008

1 commit

  • There are various constraints on the use of unit-at-a-time:
    - i386 uses no-unit-at-a-time for pre-4.0 (not 4.3)
    - x86_64 uses unit-at-a-time always

    Uli reported a crash on x86_64 with gcc 4.1.2 with unit-at-a-time,
    resulting in commit c0a18111e571138747a98af18b3a2124df56a0d1

    Ingo reported a gcc internal error with gcc 4.3 with no-unit-at-a-timem,
    resulting in 22eecde2f9034764a3fd095eecfa3adfb8ec9a98

    Benny Halevy is seeing extern inlines not resolved with gcc 4.3 with
    no-unit-at-a-time

    This patch reintroduces unit-at-a-time for gcc >= 4.0, bringing back the
    possibility of Uli's crash. If that happens, we'll debug it.

    I started seeing both the internal compiler errors and unresolved
    inlines on Fedora 9. This patch fixes both problems, without so far
    reintroducing the crash reported by Uli.

    Signed-off-by: Jeff Dike
    Cc: Benny Halevy
    Cc: Adrian Bunk
    Cc: Ingo Molnar
    Cc: Ulrich Drepper
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

07 May, 2008

1 commit

  • This reverts commit 22eecde2f9034764a3fd095eecfa3adfb8ec9a98. Uli
    reports that it breaks UML on x86-64 with the Fedora 8 gcc (gcc 4.1.2),
    causing a crash on startup. See

    http://marc.info/?l=linux-kernel&m=121011722806093&w=2

    for a trace.

    Reported-by: Ulrich Drepper
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 May, 2008

1 commit


09 Feb, 2008

1 commit

  • Calculate TASK_SIZE at run-time by figuring out the host's VMSPLIT - this is
    needed on i386 if UML is to run on hosts with varying VMSPLITs without
    recompilation.

    TASK_SIZE is now defined in terms of a variable, task_size. This gets rid of
    an include of pgtable.h from processor.h, which can cause include loops.

    On i386, task_size is calculated early in boot by probing the address space in
    a binary search to figure out where the boundary between usable and non-usable
    memory is. This tries to make sure that a page that is considered to be in
    userspace is, or can be made, read-write. I'm concerned about a system-global
    VDSO page in kernel memory being hit and considered to be a userspace page.

    On x86_64, task_size is just the old value of CONFIG_TOP_ADDR.

    A bunch of config variable are gone now. CONFIG_TOP_ADDR is directly replaced
    by TASK_SIZE. NEST_LEVEL is gone since the relocation of the stubs makes it
    irrelevant. All the HOST_VMSPLIT stuff is gone. All references to these in
    arch/um/Makefile are also gone.

    I noticed and fixed a missing extern in os.h when adding os_get_task_size.

    Note: This has been revised to fix the 32-bit UML on 64-bit host bug that
    Miklos ran into.

    Signed-off-by: Jeff Dike
    Cc: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

06 Feb, 2008

3 commits

  • TOPDIR is obsolete, use srctree instead. This patch removes TOPDIR from all
    UML Makefiles.

    Cc: Sam Ravnborg
    Signed-off-by: WANG Cong
    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • UML still needed some work in order to allow CFLAGS to be passed in from the
    command line.

    USER_CFLAGS is produced from KBUILD_CFLAGS in part by removing all the -I
    switches. This is so that kernel headers don't accidentally get pulled into
    libc files. However, a common use of command-line CFLAGS would be to add -I
    switches to the build. This patch specifically adds any command-line -I flags
    back to USER_CFLAGS.

    I also corrected the spelling of LFLAGS to LDFLAGS.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Allow LFLAGS to be given to make and have the expected effect.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

30 Nov, 2007

1 commit

  • include/asm-um/arch points to the non-existed include/asm-i386 directory.

    Signed-off-by: WANG Cong
    Cc: Jeff Dike
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     

15 Nov, 2007

1 commit

  • symlinks to directories in the non-O= case were lacking -n, which meant
    that, when the link already existed, a new link pointing at itself was
    created in the target directory.

    Signed-off-by: Jeff Dike
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

06 Nov, 2007

1 commit


17 Oct, 2007

4 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
     
  • Formatting changes in the files which have been changed in the
    tt-removal patchset so far. These include:
    copyright updates
    header file trimming
    style fixes
    adding severity to printks
    indenting Kconfig help according to the predominant kernel style

    These changes should be entirely non-functional.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • This patchset throws out tt mode, which has been non-functional for a while.

    This is done in phases, interspersed with code cleanups on the affected files.

    The removal is done as follows:
    remove all code, config options, and files which depend on
    CONFIG_MODE_TT
    get rid of the CHOOSE_MODE macro, which decided whether to
    call tt-mode or skas-mode code, and replace invocations with their
    skas portions
    replace all now-trivial procedures with their skas equivalents

    There are now a bunch of now-redundant pieces of data structures, including
    mode-specific pieces of the thread structure, pt_regs, and mm_context. These
    are all replaced with their skas-specific contents.

    As part of the ongoing style compliance project, I made a style pass over all
    files that were changed. There are three such patches, one for each phase,
    covering the files affected by that phase but no later ones.

    I noticed that we weren't freeing the LDT state associated with a process when
    it exited, so that's fixed in one of the later patches.

    The last patch is a tidying patch which I've had for a while, but which caused
    inexplicable crashes under tt mode. Since that is no longer a problem, this
    can now go in.

    This patch:

    Start getting rid of tt mode support.

    This patch throws out CONFIG_MODE_TT and all config options, code, and files
    which depend on it.

    CONFIG_MODE_SKAS is gone and everything that depends on it is included
    unconditionally.

    The few changed lines are in re-written Kconfig help, lines which needed
    something skas-related removed from them, and a few more which weren't
    strictly deletions.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • On some systems, with IPV6 configured, there is a clash between the kernel's
    in6addr_any and the one in libc.

    This is handled in the usual (gross) way of defining the kernel symbol out of
    the way on the gcc command line.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

16 Oct, 2007

1 commit

  • The variable AFLAGS 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 AFLAGS with KBUILD_AFLAGS all over
    the tree.

    Patch was tested on following architectures:
    alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

15 Oct, 2007

1 commit

  • 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
     

14 Oct, 2007

1 commit

  • a) include/asm-um/arch can't just point to include/asm-$(SUBARCH) now
    b) arch/{i386,x86_64}/crypto are merged now
    c) subarch-obj needed changes
    d) cpufeature_64.h should pull "cpufeature_32.h", not
    since it can be included from asm-um/cpufeature.h
    e) in case of uml-i386 we need CONFIG_X86_32 for make and gcc, but not
    for Kconfig
    f) sysctl.c shouldn't do vdso_enabled for uml-i386 (actually, that one
    should be registered from corresponding arch/*/kernel/*, with ifdef
    going away; that's a separate patch, though).

    With that and with Stephen's patch ("[PATCH net-2.6] uml: hard_header fix")
    we have uml allmodconfig building both on i386 and amd64.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

20 Jul, 2007

1 commit


31 Oct, 2006

1 commit

  • From: Jeff Dike , Paolo Giarrusso

    Make sure that when compiling USER_OBJS the correct compilation options are
    passed; since they are compiled with USER_CFLAGS which is derived from
    CFLAGS, make sure it is a recursively evaluated variable, so that changes
    to CFLAGS done afterwards the inclusion of arch/$(ARCH)/Makefile are
    reflected in USER_CFLAGS.

    For instance, without this patch userspace objects are never compiled with
    debug info active.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    akpm@osdl.org
     

04 Oct, 2006

1 commit

  • The patch below corrects multiple occurances of "the the"
    typos across several files, both in source comments and KConfig files.
    There is no actual code changed, only text. Note this only affects the /arch
    directory, and I believe I could find many more elsewhere. :)

    Signed-off-by: Adrian Bunk

    Matt LaPlante
     

02 May, 2006

3 commits

  • Blaisorblade's uml-makefile-nicer makes a V=0 build say SYMLINK where
    what's happening is really a LINK.

    Signed-off-by: Jeff Dike
    Acked-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • To make some half-assembly stubs compile, disable various "hardened" GCC
    features:

    *) we can't make it build PIC code as we need %ebx to do syscalls and GCC
    wants it free for PIC

    *) we can't leave stack protection as the stub is moved (not relocated!) in
    memory so the RIP-relative access to the canary tries reading from an
    unmapped address and causes a segfault, since we move the stub of various
    megabytes (the exact amount will be decided at runtime) away from the
    link-time address.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Move the build of user-offsets to arch/um/sys-$(SUBARCH), where it's located.
    So we can also build it via Kbuild with its dependency tracking rather than by
    hand. While hacking here, fix also a lot of little cosmetic things.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

11 Apr, 2006

1 commit


01 Apr, 2006

3 commits

  • ldt-{i386,x86_64}.h is made of two different parts - some code for parsing of
    LDT descriptors, which is arch-dependant, and the code to handle uml_ldt_t (an
    LDT block inside UML), which is mostly arch-independant (among x86 and x86_64,
    at least).

    Join the common part in a single file (ldt.h) and split the rest away
    (host_ldt-{i386,x86_64}.h).

    This is needed because processor.h, with next patches, will start including
    the LDT descriptor parsing macros in host_ldt.h, but it can't include ldt.h
    because it uses semaphores (and to define semaphores one must first include
    processor.h!).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • no need to add the same file twice to MRPROPER_FILES

    Signed-off-by: Al Viro
    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • kills unmap magic

    Signed-off-by: Al Viro
    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

06 Mar, 2006

1 commit

  • The kbuild system takes advantage of an incorrect behavior in GNU make.
    Once this behavior is fixed, all files in the kernel rebuild every time,
    even if nothing has changed. This patch ensures kbuild works with both
    the incorrect and correct behaviors of GNU make.

    For more details on the incorrect behavior, see:

    http://lists.gnu.org/archive/html/bug-make/2006-03/msg00003.html

    Changes in this patch:
    - Keep all targets that are to be marked .PHONY in a variable, PHONY.
    - Add .PHONY: $(PHONY) to mark them properly.
    - Remove any $(PHONY) files from the $? list when determining whether
    targets are up-to-date or not.

    Signed-off-by: Paul Smith
    Signed-off-by: Sam Ravnborg

    Paul Smith
     

02 Feb, 2006

2 commits


19 Jan, 2006

1 commit


15 Jan, 2006

1 commit

  • LD .tmp_vmlinux1
    /usr/lib/gcc-lib/i486-linux/3.3.4/../../../libc.a(mktime.o): In function `timelocal':
    : multiple definition of `mktime'
    kernel/built-in.o:kernel/time.c:604: first defined here
    /usr/bin/ld: Warning: size of symbol `mktime' changed from 134 in kernel/built-in.o to 44 in /usr/lib/gcc-lib/i486-linux/3.3.4/../../../libc.a(mktime.o)
    collect2: ld returned 1 exit status

    Signed-off-by: Miklos Szeredi
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

12 Jan, 2006

1 commit

  • 2.6.15-mm1 caused kernel-offsets.c to stop compiling with a syntax error in a
    header. The problem was with KBUILD_BASENAME, which didn't get a definition
    with the by-hand compilation in the main UML Makefile.

    This was OK before since the expansion was syntactically the same as the
    KBUILD_BASENAME token. With -mm1, the expansion is now a quote-delimited
    string, so there needs to be a definition of it.

    Since kernel-offsets.c is basically the same as other arches' asm-offsets.c,
    and those seem to build OK, this patch turns kernel-offsets.c into
    asm-offsets.c. kernel-offsets.c is in arch/um/sys-$(SUBARCH), i.e. sys-i386
    and sys-x86_64, while kbuild expects it to be in arch/um/kernel.
    kernel-offsets.c is moved to
    arch/um/include/sysdep-$(SUBARCH)/kernel-offsets.h, which is included by
    arch/um/kernel/asm-offsets.c. With that, include/asm-um/asm-offsets.h is
    generated automatically. kernel-offsets.h continues to exist because it needs
    to be accessible to userspace UML code, and include/asm-um isn't. So, a
    symlink is made from arch/um/include/kernel-offsets.h to
    include/asm-um/asm-offsets.h.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

23 Nov, 2005

1 commit

  • This gives a name to the anonymous union introduced in skas-hold-own-ldt,
    allowing to build on a wider range of gccs.

    It also removes ldt.h, which somehow became real, and replaces it with a
    symlink, and creates ldt-x86_64.h as a copy of ldt-i386.h for now.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

07 Nov, 2005

1 commit

  • A number of fixes to improve behavior when large physical memory sizes
    are specified:

    - libc files need -D_FILE_OFFSET_BITS=64 because there are unavoidable uses
    of non-64 interfaces in libc

    - some %d need to be %u

    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

10 Oct, 2005

1 commit


29 Sep, 2005

1 commit

  • UML makefiles sanitized:
    - number of generated headers reduced to 2 (from user-offsets.c and
    kernel-offsets.c resp.). The rest is made constant and simply
    includes those two.
    - mk_... helpers are gone now that we don't need to generate these
    headers
    - arch/um/include2 removed since everything under arch/um/include/sysdep
    is constant now and symlink can point straight to source tree.
    - dependencies seriously simplified.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

22 Sep, 2005

1 commit


12 Sep, 2005

1 commit

  • When introducing the generic asm-offsets.h support the dependency
    chain for the prepare targets was changed. All build scripts expecting
    include/asm/asm-offsets.h to be made when using the prepare target would broke.
    With the limited number of prepare targets left in arch Makefiles
    the trivial solution was to introduce a new arch specific target: archprepare

    The dependency chain looks like this now:

    prepare
    |
    +--> prepare0
    |
    +--> archprepare
    |
    +--> scripts_basic
    +--> prepare1
    |
    +---> prepare2
    |
    +--> prepare3

    So prepare 3 is processed before prepare2 etc.
    This guaantees that the asm symlink, version.h, scripts_basic
    are all updated before archprepare is processed.

    prepare0 which build the asm-offsets.h file will need the
    actions performed by archprepare.

    The head target is now named prepare, because users scripts will most
    likely use that target, but prepare-all has been kept for compatibility.
    Updated Documentation/kbuild/makefiles.txt.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

11 Sep, 2005

1 commit