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


14 Oct, 2008

1 commit

  • This patch moves the cris defconfigs to arch/cris/configs/ where they
    belong.

    As a side effect they can now be used directly through e.g.
    make ARCH=cris artpec_3_defconfig

    The default defconfig is set through KBUILD_DEFCONFIG.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Jesper Nilsson

    Adrian Bunk
     

07 Sep, 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

1 commit

  • * 'for-linus' of git://www.jni.nu/cris:
    [CRISv10] Clean up compressed/misc.c
    [CRISv10] Correct whitespace damage.
    [CRIS] Correct definition of subdirs for install_headers.
    [CRIS] Correct image makefiles to allow using a separate OBJ-directory.
    [CRIS] Build fixes for compressed and rescue images for v10 and v32:
    It looks at least odd to apply spin_unlock to a mutex.
    cris: compile fixes for 2.6.26-rc5

    Linus Torvalds
     

14 Jul, 2008

1 commit


01 Jul, 2008

5 commits


30 Jun, 2008

5 commits


21 Jun, 2008

2 commits


19 May, 2008

1 commit


05 Mar, 2008

3 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
     
  • Commit 2f569afd9ced9ebec9a6eb3dbf6f83429be0a7b4
    (CONFIG_HIGHPTE vs. sub-page page tables) introduced use of
    inc_zone_page_state and dec_zone_page_state in include/linux/mm.h.

    Those are defined in include/linux/vmstat.h, but after it includes
    mm.h, making it impossible to include vmstat.h since inc_zone_page_state
    and dec_zone_page_state then would be undefined.

    arch/cris/arch-v10/kernel/time.c does just this, which makes the
    CRIS v10 build break with the following error:

    ...
    CC arch/cris/arch-v10/kernel/time.o
    In file included from include/linux/vmstat.h:7,
    from arch/cris/arch-v10/kernel/time.c:17:
    include/linux/mm.h: In function 'pgtable_page_ctor':
    include/linux/mm.h:902: error: implicit declaration of function 'inc_zone_page_state'
    include/linux/mm.h: In function 'pgtable_page_dtor':
    include/linux/mm.h:908: error: implicit declaration of function 'dec_zone_page_state'
    make[2]: *** [arch/cris/arch-v10/kernel/time.o] Error 1
    make[1]: *** [arch/cris/arch-v10/kernel] Error 2
    make: *** [sub-make] Error 2
    ...

    By changing kernel/time.c to include linux/mm.h, the build succeeds.

    Signed-off-by: Jesper Nilsson
    Cc: Mikael Starvik
    Cc: Martin Schwidefsky
    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
     

08 Feb, 2008

11 commits