24 Aug, 2008

1 commit


29 Jul, 2008

1 commit


27 Jul, 2008

2 commits

  • Remove arch-specific show_mem() in favor of the generic version.

    This also removes the following redundant information display:

    - free pages, printed by show_free_areas()
    - pages in swapcache, printed by show_swap_cache_info()

    where show_mem() calls show_free_areas(), which calls
    show_swap_cache_info().

    Signed-off-by: Johannes Weiner
    Acked-by: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Signed-off-by: Harvey Harrison
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

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

2 commits


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
     

15 Jul, 2008

1 commit


01 Jul, 2008

5 commits


30 Jun, 2008

5 commits


26 Jun, 2008

1 commit


21 Jun, 2008

2 commits


19 May, 2008

1 commit


17 May, 2008

1 commit


09 May, 2008

2 commits


29 Apr, 2008

1 commit


28 Apr, 2008

1 commit

  • show_mem() has no need to print the amount of free swap space manually because
    show_free_areas() does this already and is called by the former.

    The two outputs only differ in text formatting:

    printk("Free swap = %lukB\n", ...);
    printk("Free swap: %6ldkB\n", ...);

    Signed-off-by: Johannes Weiner
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

17 Apr, 2008

1 commit

  • Semaphores are no longer performance-critical, so a generic C
    implementation is better for maintainability, debuggability and
    extensibility. Thanks to Peter Zijlstra for fixing the lockdep
    warning. Thanks to Harvey Harrison for pointing out that the
    unlikely() was unnecessary.

    Signed-off-by: Matthew Wilcox
    Acked-by: Ingo Molnar

    Matthew Wilcox
     

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
     

09 Feb, 2008

5 commits

  • To allow flexible configuration of IDE introduce HAVE_IDE.
    All archs except arm, um and s390 unconditionally select it.
    For arm the actual configuration determine if IDE is supported.

    This is a step towards introducing drivers/Kconfig for arm.

    Signed-off-by: Sam Ravnborg
    Acked-by: Russell King - ARM Linux
    Acked-by: Bartlomiej Zolnierkiewicz

    Sam Ravnborg
     
  • * 'cris' of git://www.jni.nu/cris: (158 commits)
    CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific.
    CRIS v32: Change drivers/i2c.c locking.
    CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.
    CRIS: Add new timerfd syscall entries.
    MAINTAINERS: Add my information for the CRIS port.
    CRIS v32: Correct spelling of bandwidth in function name.
    CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.
    CRIS v10: Cleanup of drivers/gpio.c
    CRIS v10: drivers/net/cris/eth_v10.c rename LED defines to CRIS_LED to avoid name clash.
    CRIS: Make io_pwm_set_period members unsigned in etraxgpio.h
    CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.
    CRIS: Drop regs parameter from call to profile_tick in kernel/time.c
    CRIS v32: Fix minor formatting issue in mach-a3/io.c
    CRIS v32: Initialize GIO even if we're rambooting in kernel/head.S
    CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory.
    CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h
    CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory.
    CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.h
    CRIS v32: Move register map header to machine dependent directory.
    CRIS v32: Let compiler know that memory is clobbered after a break op.
    ...

    Linus Torvalds
     
  • When the conversion factor between jiffies and milli- or microseconds is
    not a single multiply or divide, as for the case of HZ == 300, we currently
    do a multiply followed by a divide. The intervening result, however, is
    subject to overflows, especially since the fraction is not simplified (for
    HZ == 300, we multiply by 300 and divide by 1000).

    This is exposed to the user when passing a large timeout to poll(), for
    example.

    This patch replaces the multiply-divide with a reciprocal multiplication on
    32-bit platforms. When the input is an unsigned long, there is no portable
    way to do this on 64-bit platforms there is no portable way to do this
    since it requires a 128-bit intermediate result (which gcc does support on
    64-bit platforms but may generate libgcc calls, e.g. on 64-bit s390), but
    since the output is a 32-bit integer in the cases affected, just simplify
    the multiply-divide (*3/10 instead of *300/1000).

    The reciprocal multiply used can have off-by-one errors in the upper half
    of the valid output range. This could be avoided at the expense of having
    to deal with a potential 65-bit intermediate result. Since the intent is
    to avoid overflow problems and most of the other time conversions are only
    semiexact, the off-by-one errors were considered an acceptable tradeoff.

    At Ralf Baechle's suggestion, this version uses a Perl script to compute
    the necessary constants. We already have dependencies on Perl for kernel
    compiles. This does, however, require the Perl module Math::BigInt, which
    is included in the standard Perl distribution starting with version 5.8.0.
    In order to support older versions of Perl, include a table of canned
    constants in the script itself, and structure the script so that
    Math::BigInt isn't required if pulling values from said table.

    Running the script requires that the HZ value is available from the
    Makefile. Thus, this patch also adds the Kconfig variable CONFIG_HZ to the
    architectures which didn't already have it (alpha, cris, frv, h8300, m32r,
    m68k, m68knommu, sparc, v850, and xtensa.) It does *not* touch the sh or
    sh64 architectures, since Paul Mundt has dealt with those separately in the
    sh tree.

    Signed-off-by: H. Peter Anvin
    Cc: Ralf Baechle ,
    Cc: Sam Ravnborg ,
    Cc: Paul Mundt ,
    Cc: Richard Henderson ,
    Cc: Michael Starvik ,
    Cc: David Howells ,
    Cc: Yoshinori Sato ,
    Cc: Hirokazu Takata ,
    Cc: Geert Uytterhoeven ,
    Cc: Roman Zippel ,
    Cc: William L. Irwin ,
    Cc: Chris Zankel ,
    Cc: H. Peter Anvin ,
    Cc: Jan Engelhardt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H. Peter Anvin
     
  • Signed-off-by: Jan Engelhardt
    Acked-by: Geert Uytterhoeven
    Acked-by: Mike Frysinger
    Acked-By: David Howells
    Acked-by: Bryan Wu
    Acked-by: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Engelhardt
     
  • - Change spin_lock + local_irq_save into spin_lock_irqsave
    - Change spin_unlock + local_irq_restore into spin_unlock_irqrestore
    - Return ENOTTY if ioctl is not recognized as a cris ioctl.
    - Make init functions static.

    Jesper Nilsson