26 Jun, 2006

33 commits

  • kernel-doc:

    Put all short function descriptions on one line or if they are too long,
    omit the short description & add a Description: section for them.

    Change some list iterator descriptions to use "current" point instead of
    "existing" point.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • - proper prototypes for the following functions:
    - ctrl_alt_del() (in include/linux/reboot.h)
    - getrusage() (in include/linux/resource.h)
    - make the following needlessly global functions static:
    - kernel_restart_prepare()
    - kernel_kexec()

    [akpm@osdl.org: compile fix]
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Currently printk is no use for early debugging because it refuses to
    actually print anything to the console unless
    cpu_online(smp_processor_id()) is true.

    The stated explanation is that console drivers may require per-cpu
    resources, or otherwise barf, because the system is not yet setup
    correctly. Fair enough.

    However some console drivers might be quite happy running early during
    boot, in fact we have one, and so it'd be nice if printk understood that.

    So I added a flag (which I would have called CON_BOOT, but that's taken)
    called CON_ANYTIME, which indicates that a console is happy to be called
    anytime, even if the cpu is not yet online.

    Tested on a Power 5 machine, with both a CON_ANYTIME driver and a bogus
    console driver that BUG()s if called while offline. No problems AFAICT.
    Built for i386 UP & SMP.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Ellerman
     
  • Make two needlessly global functions static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • ufs super block contains some statistic about file systems, like amount of
    directories, free blocks, inodes and so on.

    UFS1 hold this information in one location and uses 32bit integers for such
    information, UFS2 hold statistic in another location and uses 64bit integers.

    There is transition variant, if UFS1 has type 44BSD and flags field in super
    block has some special value this mean that we work with statistic like UFS2
    does. and this also means that nobody care about old(UFS1) statistic.

    So if start fsck against such file system, after usage linux ufs driver, it
    found error: at now only UFS1 like statistic is updated.

    This patch should fix this. Also it contains some minor cleanup: CodingSytle
    and remove unused variables.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • Super block of UFS usually has size >512, because of fragment size may be 512,
    this cause some problems.

    Currently, there are two methods to work with ufs super block:

    1) split structure which describes ufs super blocks into structures with
    size b_data + bh[n]->b_size == bh[n + 1]->b_data

    The second variant may cause some problems in the future, and usage of two
    variants cause unnecessary code duplication.

    This patch remove the second variant. Also patch contains some CodingStyle
    fixes.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • This patch make little optimization of ufs_find_entry like "ext2" does. Save
    number of page and reuse it again in the next call.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • Currently to turn on debug mode "user" has to edit ~10 files, to turn off he
    has to do it again.

    This patch introduce such changes:
    1)turn on(off) debug messages via ".config"
    2)remove unnecessary duplication of code
    3)make "UFSD" macros more similar to function
    4)fix some compiler warnings

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • There are two ugly macros in ufs code:
    #define UCPI_UBH ((struct ufs_buffer_head *)ucpi)
    #define USPI_UBH ((struct ufs_buffer_head *)uspi)
    when uspi looks like
    struct {
    struct ufs_buffer_head ;
    }
    and USPI_UBH has some sence,
    ucpi looks like
    struct {
    struct not_ufs_buffer_head;
    }

    To prevent bugs in future, this patch convert macros to inline function and
    fix "ucpi" structure.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • Change function in fs/ufs/dir.c and fs/ufs/namei.c to work with pages
    instead of straight work with blocks. It fixed such bugs:

    * for i in `seq 1 1000`; do touch $i; done - crash system
    * mkdir create directory without "." and ".." entries

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • First of all some necessary notes about UFS by it self: To avoid waste of disk
    space the tail of file consists not from blocks (which is ordinary big enough,
    16K usually), it consists from fragments(which is ordinary 2K). When file is
    growing its tail occupy 1 fragment, 2 fragments... At some stage decision to
    allocate whole block is made and all fragments are moved to one block.

    How this situation was handled before:

    ufs_prepare_write
    ->block_prepare_write
    ->ufs_getfrag_block
    ->...
    ->ufs_new_fragments:

    bh = sb_bread
    bh->b_blocknr = result + i;
    mark_buffer_dirty (bh);

    This is wrong solution, because:

    - it didn't take into consideration that there is another cache: "inode page
    cache"

    - because of sb_getblk uses not b_blocknr, (it uses page->index) to find
    certain block, this breaks sb_getblk.

    How this situation is handled now: we go though all "page inode cache", if
    there are no such page in cache we load it into cache, and change b_blocknr.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • There are several instances of per_cpu(foo, raw_smp_processor_id()), which
    is semantically equivalent to __get_cpu_var(foo) but without the warning
    that smp_processor_id() can give if CONFIG_DEBUG_PREEMPT is enabled. For
    those architectures with optimized per-cpu implementations, namely ia64,
    powerpc, s390, sparc64 and x86_64, per_cpu() turns into more and slower
    code than __get_cpu_var(), so it would be preferable to use __get_cpu_var
    on those platforms.

    This defines a __raw_get_cpu_var(x) macro which turns into per_cpu(x,
    raw_smp_processor_id()) on architectures that use the generic per-cpu
    implementation, and turns into __get_cpu_var(x) on the architectures that
    have an optimized per-cpu implementation.

    Signed-off-by: Paul Mackerras
    Acked-by: David S. Miller
    Acked-by: Ingo Molnar
    Acked-by: Martin Schwidefsky
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • The floppy driver is already calling add_disk_randomness as it should, so this
    was redundant.

    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • This patch contains a total rewrite of the backlight infrastructure for
    portable Apple computers. Backward compatibility is retained. A sysfs
    interface allows userland to control the brightness with more steps than
    before. Userland is allowed to upload a brightness curve for different
    monitors, similar to Mac OS X.

    [akpm@osdl.org: add needed exports]
    Signed-off-by: Michael Hanselmann
    Acked-by: Benjamin Herrenschmidt
    Cc: Richard Purdie
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Convert the generic irq code to use irq controller, this gets rid of the
    machine specific callbacks and gives better control over irq handling without
    duplicating lots of code.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Introduce irq controller and use it to manage auto vector interrupts.
    Introduce setup_irq() which can be used for irq setup.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Fix amiga irq numbering, so they are after the generic IRQ_AUTO defines and
    remove the IRQ_AMIGA_AUTO defines.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Rename IRQ1..IRQ7 to IRQ_AUTO_1..IRQ_AUTO_7 and remove the duplicate
    defintions.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Use separate entry points for auto and user vector interrupts and cleanup
    naming a little.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Additions to dma API with some small cleanups.

    Signed-off-by: Richard Hirst
    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Make flush_icache() an inline function and clean it up a litte.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • gcc-3.x has a few problems detecting a constant parameter.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Clean up and refactor i386 sub-architecture setup.

    This change moves all the code from the
    asm-i386/mach-*/setup_arch_pre/post.h headers, into
    arch/i386/mach-*/setup.c. mach-*/setup_arch_pre.h is renamed to
    setup_arch.h, and contains only things which should be in header files. It
    is purely code-motion; there should be no functional changes at all.

    Several functions in arch/i386/kernel/setup.c needed to be made non-static
    so that they're visible to the code in mach-*/setup.c. asm-i386/setup.h is
    used to hold the prototypes for these functions.

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Chris Wright
    Cc: Zachary Amsden
    Cc: Chris Wright
    Cc: Christian Limpach
    Cc: Martin Bligh
    Cc: James Bottomley
    Cc: Andrey Panin
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Hooks for calling vma specific migration functions

    With this patch a vma may define a vma->vm_ops->migrate function. That
    function may perform page migration on its own (some vmas may not contain page
    structs and therefore cannot be handled by regular page migration. Pages in a
    vma may require special preparatory treatment before migration is possible
    etc) . Only mmap_sem is held when the migration function is called. The
    migrate() function gets passed two sets of nodemasks describing the source and
    the target of the migration. The flags parameter either contains

    MPOL_MF_MOVE which means that only pages used exclusively by
    the specified mm should be moved

    or

    MPOL_MF_MOVE_ALL which means that pages shared with other processes
    should also be moved.

    The migration function returns 0 on success or an error condition. An error
    condition will prevent regular page migration from occurring.

    On its own this patch cannot be included since there are no users for this
    functionality. But it seems that the uncached allocator will need this
    functionality at some point.

    Signed-off-by: Christoph Lameter
    Cc: Hugh Dickins
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Remove VM_LOCKED before remap_pfn range from device drivers and get rid of
    VM_SHM.

    remap_pfn_range() already sets VM_IO. There is no need to set VM_SHM since
    it does nothing. VM_LOCKED is of no use since the remap_pfn_range does not
    place pages on the LRU. The pages are therefore never subject to swap
    anyways. Remove all the vm_flags settings before calling remap_pfn_range.

    After removing all the vm_flag settings no use of VM_SHM is left. Drop it.

    Signed-off-by: Christoph Lameter
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Convert a few stragglers over to for_each_possible_cpu(), remove
    for_each_cpu().

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

    Andrew Morton
     

25 Jun, 2006

7 commits

  • * master.kernel.org:/home/rmk/linux-2.6-arm: (25 commits)
    [ARM] 3648/1: Update struct ucontext layout for coprocessor registers
    [ARM] Add identifying number for non-rt sigframe
    [ARM] Gather common sigframe saving code into setup_sigframe()
    [ARM] Gather common sigframe restoration code into restore_sigframe()
    [ARM] Re-use sigframe within rt_sigframe
    [ARM] Merge sigcontext and sigmask members of sigframe
    [ARM] Replace extramask with a full copy of the sigmask
    [ARM] Remove rt_sigframe puc and pinfo pointers
    [ARM] 3647/1: S3C24XX: add Osiris to the list of simtec pm machines
    [ARM] 3645/1: S3C2412: irq support for external interrupts
    [ARM] 3643/1: S3C2410: Add new usb clocks
    [ARM] 3642/1: S3C24XX: Add machine SMDK2413
    [ARM] 3641/1: S3C2412: Fixup gpio register naming
    [ARM] 3640/1: S3C2412: Use S3C24XX_DCLKCON instead of S3C2410_DCLKCON
    [ARM] 3639/1: S3C2412: serial port support
    [ARM] 3638/1: S3C2412: core clocks
    [ARM] 3637/1: S3C24XX: Add mpll clock, and set as fclk parent
    [ARM] 3636/1: S3C2412: Add selection of CPU_ARM926
    [ARM] 3635/1: S3C24XX: Add S3C2412 core cpu support
    [ARM] 3633/1: S3C24XX: s3c2410 gpio bugfix - wrong pin nos
    ...

    Linus Torvalds
     
  • Russell King
     
  • Patch from Daniel Jacobowitz

    In order for userspace to find saved coprocessor registers, move them from
    struct rt_sigframe into struct ucontext. Also allow space for glibc's
    sigset_t, so that userspace and kernelspace can use the same ucontext
    layout. Define the magic numbers for iWMMXt in the header file for easier
    reference. Include the size of the coprocessor data in the magic numbers.

    Also define magic numbers and layout for VFP, not yet saved.

    Signed-off-by: Daniel Jacobowitz
    Signed-off-by: Russell King

    Daniel Jacobowitz
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (40 commits)
    [SPARC64]: Update defconfig.
    [SPARC64]: Make auxio a real driver.
    [PARPORT] sunbpp: Convert to new SBUS device framework.
    [Documentation]: Update probing info in sbus_drivers.txt
    [SCSI] qlogicpti: Convert to new SBUS device framework.
    [SCSI] esp: Fix bug in esp_remove_common.
    [NET] sunhme: Kill useless loop over sdevs in quattro_sbus_find().
    [NET] myri_sbus: Kill unused next_module struct member.
    [NET] myri_sbus: Convert to new SBUS device layer.
    [NET] sunqe: Convert to new SBUS driver layer.
    [NET] sunbmac: Convert over to new SBUS device framework.
    [NET] sunlance: Convert to new SBUS driver framework.
    [NET] sunhme: Convert to new SBUS driver framework.
    [NET] sunhme: Kill __sparc__ and __sparc_v9__ ifdefs.
    [SCSI] sparc: Port esp to new SBUS driver layer.
    [SOUND] sparc: Port amd7930 to new SBUS device layer.
    [SBUS]: Rewrite and plug into of_device framework.
    [SPARC]: Port of_device layer and make ebus use it.
    [SPARC]: Port sparc64 in-kernel device tree code to sparc32.
    [SPARC64]: Add of_device layer and make ebus/isa use it.
    ...

    Linus Torvalds
     
  • 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
     
  • Russell King
     
  • Russell King