07 Jan, 2009

1 commit


13 Dec, 2008

2 commits

  • Impact: change existing irq_chip API

    Not much point with gentle transition here: the struct irq_chip's
    setaffinity method signature needs to change.

    Fortunately, not widely used code, but hits a few architectures.

    Note: In irq_select_affinity() I save a temporary in by mangling
    irq_desc[irq].affinity directly. Ingo, does this break anything?

    (Folded in fix from KOSAKI Motohiro)

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Reviewed-by: Grant Grundler
    Acked-by: Ingo Molnar
    Cc: ralf@linux-mips.org
    Cc: grundler@parisc-linux.org
    Cc: jeremy@xensource.com
    Cc: KOSAKI Motohiro

    Rusty Russell
     
  • Impact: cleanup

    Each SMP arch defines these themselves. Move them to a central
    location.

    Twists:
    1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
    CONFIG_INIT_ALL_POSSIBLE for this rather than break them.

    2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
    Those archs simply have phys_cpu_present_map replaced everywhere.

    3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
    so I just manipulate them both in sync.

    4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
    declarations.

    Signed-off-by: Rusty Russell
    Reviewed-by: Grant Grundler
    Tested-by: Tony Luck
    Acked-by: Ingo Molnar
    Cc: Mike Travis
    Cc: ink@jurassic.park.msu.ru
    Cc: rmk@arm.linux.org.uk
    Cc: starvik@axis.com
    Cc: tony.luck@intel.com
    Cc: takata@linux-m32r.org
    Cc: ralf@linux-mips.org
    Cc: grundler@parisc-linux.org
    Cc: paulus@samba.org
    Cc: schwidefsky@de.ibm.com
    Cc: lethal@linux-sh.org
    Cc: wli@holomorphy.com
    Cc: davem@davemloft.net
    Cc: jdike@addtoit.com
    Cc: mingo@redhat.com

    Rusty Russell
     

01 Nov, 2008

2 commits

  • Remove the links to architecture and machine dependent directories
    (boot, lib, drivers, arch, mach)

    The links were created and used mostly from the arch/cris/Makefile,
    so why not dispense with them altogether?
    Changed $(ARCH) to "cris" in Makefile, it is easier to read this way.

    The CRISv32 head.S common files for the kernel and compressed images
    needed to be modified to use ifdefs instead of using the now removed
    mach link. Since there are only two versions, this is not a huge loss
    in readability.

    The link to vmlinux.lds.S is also replaced with a merged version
    which uses ifdefs to select the correct layout.
    System.map before and after are identical.

    Signed-off-by: Jesper Nilsson
    Acked-by: Sam Ravnborg

    Jesper Nilsson
     
  • Eliminates the link to arch specific asm-offsets.c from CRIS
    architecture build system.

    Resulting asm-offsets.s are identical before and after change
    for both arch-v10 and arch-v32.

    Signed-off-by: Jesper Nilsson
    Acked-by: Sam Ravnborg

    Jesper Nilsson
     

30 Oct, 2008

1 commit


20 Oct, 2008

1 commit

  • Change cris to use the new bcd2bin/bin2bcd functions instead of the
    obsolete BCD_TO_BIN/BIN_TO_BCD macros.

    Signed-off-by: Adrian Bunk
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

18 Oct, 2008

1 commit


16 Oct, 2008

1 commit


09 Sep, 2008

1 commit

  • Right now, there is no notifier that is called on a new cpu, before the new
    cpu begins processing interrupts/softirqs.
    Various kernel function would need that notification, e.g. kvm works around
    by calling smp_call_function_single(), rcu polls cpu_online_map.

    The patch adds a CPU_STARTING notification. It also adds a helper function
    that sends the message to all cpu_chain handlers.

    Tested on x86-64.
    All other archs are untested. Especially on sparc, I'm not sure if I got
    it right.

    Signed-off-by: Manfred Spraul
    Signed-off-by: Ingo Molnar

    Manfred Spraul
     

24 Aug, 2008

1 commit


29 Jul, 2008

1 commit


27 Jul, 2008

1 commit


26 Jul, 2008

1 commit

  • Inflate requires some dynamic memory allocation very early in the boot
    process and this is provided with a set of four functions:
    malloc/free/gzip_mark/gzip_release.

    The old inflate code used a mark/release strategy rather than implement
    free. This new version instead keeps a count on the number of outstanding
    allocations and when it hits zero, it resets the malloc arena.

    This allows removing all the mark and release implementations and unifying
    all the malloc/free implementations.

    The architecture-dependent code must define two addresses:
    - free_mem_ptr, the address of the beginning of the area in which
    allocations should be made
    - free_mem_end_ptr, the address of the end of the area in which
    allocations should be made. If set to 0, then no check is made on
    the number of allocations, it just grows as much as needed

    The architecture-dependent code can also provide an arch_decomp_wdog()
    function call. This function will be called several times during the
    decompression process, and allow to notify the watchdog that the system is
    still running. If an architecture provides such a call, then it must
    define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls
    arch_decomp_wdog().

    Work initially done by Matt Mackall, updated to a recent version of the
    kernel and improved by me.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Thomas Petazzoni
    Cc: Matt Mackall
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: Haavard Skinnemoen
    Cc: David Howells
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: "H. Peter Anvin"
    Acked-by: Paul Mundt
    Acked-by: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Petazzoni
     

25 Jul, 2008

1 commit

  • free_area_init_node() gets passed in the node id as well as the node
    descriptor. This is redundant as the function can trivially get the node
    descriptor itself by means of NODE_DATA() and the node's id.

    I checked all the users and NODE_DATA() seems to be usable everywhere
    from where this function is called.

    Signed-off-by: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

21 Jul, 2008

2 commits


16 Jul, 2008

1 commit

  • Conflicts:

    arch/powerpc/Kconfig
    arch/s390/kernel/time.c
    arch/x86/kernel/apic_32.c
    arch/x86/kernel/cpu/perfctr-watchdog.c
    arch/x86/kernel/i8259_64.c
    arch/x86/kernel/ldt.c
    arch/x86/kernel/nmi_64.c
    arch/x86/kernel/smpboot.c
    arch/x86/xen/smp.c
    include/asm-x86/hw_irq_32.h
    include/asm-x86/hw_irq_64.h
    include/asm-x86/mach-default/irq_vectors.h
    include/asm-x86/mach-voyager/irq_vectors.h
    include/asm-x86/smp.h
    kernel/Makefile

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

14 Jul, 2008

1 commit


01 Jul, 2008

2 commits


30 Jun, 2008

3 commits

  • Jesper Nilsson
     
  • - Use the normal cross gcc instead of using an elf specific cris toolchain.
    This removes the dependency of this second toolchain.

    - Use the normal cross objcopy instead of overriding it to use elf-toolchain.
    This allows compiling using "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu-"
    instead of just "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu/bin/"

    - Remove redundant rules for compiling, the implicit rules are sufficient.

    - Convert the arch/cris/arch-v10/boot/compressed/head.S to format
    accepted by the cris-axis-linux-gnu-gcc (registers must be prefixed
    with '$', remove explicit underscore on exported symbols)

    - Remove a number of unused (and duplicated) prototypes from
    arch/cris/arch-v10/boot/compressed/misc.c.

    - Correct memcpy and memset return values (actually return them!)

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @def@
    declarer DEFINE_MUTEX;
    identifier m;
    @@

    DEFINE_MUTEX(m);

    @@
    identifier def.m;
    @@

    (
    - spin_lock(&m)
    + mutex_lock(&m)
    |
    - spin_unlock(&m)
    + mutex_unlock(&m)
    )
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Jesper Nilsson

    Julia Lawall
     

26 Jun, 2008

1 commit


21 Jun, 2008

2 commits


19 May, 2008

1 commit


05 Mar, 2008

2 commits

  • Function __copy_user_zeroing in arch/lib/usercopy.c had the wrong parameter
    set as __user, and in include/asm-cris/uaccess.h, it was not set at all for
    some of the calling functions.

    This will cut the number of warnings quite dramatically when using sparse.

    While we're here, remove useless CVS log and correct confusing typo.

    Signed-off-by: Jesper Nilsson
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Nilsson
     
  • Adrian Bunk reported another compile error with a SVN head GCC:

    ...
    CC arch/cris/arch-v10/lib/string.o
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
    error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
    error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:139:
    error: lvalue required as increment operand
    ...

    This is due to the use of the construct:

    *((long*)dst)++ = lc;

    Which isn't legal since casts don't return an lvalue.

    The solution is to import the implementation from newlib,
    which is continually autotested together with GCC mainline,
    and uses the construct:

    *(long *) dst = lc; dst += 4;

    Since this is an import of a file from newlib, I'm not touching
    the formatting or correcting any checkpatch errors.

    As for the earlier fix for memset.c, even if the two files for
    CRIS v10 and CRIS v32 are identical at the moment, it might
    be possible to tweak the CRIS v32 version.
    Thus, I'm not yet folding them into the same file, at least not
    until we've done some research on it.

    Signed-off-by: Jesper Nilsson
    Cc: Mikael Starvik
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Nilsson
     

15 Feb, 2008

1 commit

  • Adrian Bunk reported the following compile error with a SVN head GCC:

    ...
    CC arch/cris/arch-v10/lib/memset.o
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c: In function 'memset':
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:164: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:165: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:166: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:167: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:185: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:189: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:192: error: lvalue required as increment operand
    ... etc ...

    This is due to the use of the construct:

    *((long*)dst)++ = lc;

    Which is no longer legal since casts don't return an lvalue.

    The solution is to import the implementation from newlib,
    which is continually autotested together with GCC mainline,
    and uses the construct:

    *(long *) dst = lc; dst += 4;

    With this change, the generated code actually shrinks 76 bytes
    since gcc notices that it can use autoincrement for the move
    instruction in CRIS.

    text data bss dec hex filename
    304 0 0 304 130 memset.old.o
    text data bss dec hex filename
    228 0 0 228 e4 memset.o

    Since this is an import of a file from newlib, I'm not touching
    the formatting or correcting any checkpatch errors.

    Note also that even if the two files for the CRIS v10 and CRIS v32
    are identical at the moment, it might be possible to tweak the
    CRIS v32 version. Thus, I'm not yet folding them into the same file,
    at least not until we've done some research on it.

    Signed-off-by: Jesper Nilsson
    Cc: Mikael Starvik
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Nilsson
     

09 Feb, 2008

1 commit


08 Feb, 2008

8 commits