26 Sep, 2006

40 commits

  • Implement async reads for swsusp resuming.

    Crufty old PIII testbox:
    15.7 MB/s -> 20.3 MB/s

    Sony Vaio:
    14.6 MB/s -> 33.3 MB/s

    I didn't implement the post-resume bio_set_pages_dirty(). I don't really
    understand why resume needs to run set_page_dirty() against these pages.

    It might be a worry that this code modifies PG_Uptodate, PG_Error and
    PG_Locked against the image pages. Can this possibly affect the resumed-into
    kernel? Hopefully not, if we're atomically restoring its mem_map?

    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Jens Axboe
    Cc: Laurent Riffard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Add some instrumentation to the swsusp readin code to show what bandwidth
    we're achieving.

    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Switch the swsusp writeout code from 4k-at-a-time to 4MB-at-a-time.

    Crufty old PIII testbox:
    12.9 MB/s -> 20.9 MB/s

    Sony Vaio:
    14.7 MB/s -> 26.5 MB/s

    The implementation is crude. A better one would use larger BIOs, but wouldn't
    gain any performance.

    The memcpys will be mostly pipelined with the IO and basically come for free.

    The ENOMEM path has not been tested. It should be.

    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Add some instrumentation to the swsusp writeout code to show what bandwidth
    we're achieving.

    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Add the DIV_ROUND_UP() helper macro: divide `n' by `d', rounding up.

    Stolen from the gfs2 tree(!) because the swsusp patches need it.

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

    Steven Whitehouse
     
  • There appears to be a typo in the EV56 config option. NORITAKE and PRIMO are
    be able to set a variation of either.

    Signed-off-by: Daniel Drake
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fernando J. Pereda
     
  • The functions prepare_set and post_set in kernel/cpu/mtrr/generic.c wrap
    the spinlock set_atomicity_lock: prepare_set returns with the lock held,
    and post_set releases the lock without acquiring it. Add lock annotations
    to these two functions so that sparse can check callers for lock pairing,
    and so that sparse will not complain about these functions since they
    intentionally use locks in this manner.

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

    Josh Triplett
     
  • Remove all references to xtime in i386 and replace them w/
    get/set_timeofday(). Requires some ugly and uncertain changes to APM, but
    has been lightly tested to work.

    Signed-off-by: John Stultz
    Acked-by: Ingo Molnar
    Acked-by: Mikael Pettersson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     
  • Voyager fiddles with current->signal.tty without locking. It turns out
    that the code in question has already cleared current->signal.tty correctly
    because daemonize() does the right thing already.

    The signal handling also appears to be incorrect as it does an unprotected
    sigfillset that also appears unneccessary. As I don't have a bowtie and am
    therefore not a qualified voyager maintainer I leave that to James.

    Signed-off-by: Alan Cox
    Acked-by: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • If we're going to implement smp_call_function_single() on three architecture
    with the same prototype then it should have a declaration in a
    non-arch-specific header file.

    Move it into .

    Cc: Stephane Eranian
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Continiung the series of small patches necessary for the perfmon subsystem,
    here is a patch that adds support for the smp_call_function_single()
    function for i386. It exists for almost all other architectures but i386.
    The perfmon subsystem needs it in one case to free some state on a
    designated remote CPU.

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

    Stephane Eranian
     
  • Remove unnecessary include from efi_stub.S

    Signed-off-by: Zachary Amsden
    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Move ptep_set_access_flags to be closer to the other ptep accessors, and make
    the indentation standard.

    Signed-off-by: Zachary Amsden
    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Move the __HAVE_ARCH_PTEP defines to accompany the function definitions.
    Anything else is just a complete nightmare to track through the 2/3-level
    paging code, and this caused duplicate definitions to be needed (pte_same),
    which could have easily been taken care of with the asm-generic pgtable
    functions.

    Signed-off-by: Zachary Amsden
    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Parsing generic pgtable.h in assembler is simply crazy. None of this file is
    needed in assembler code, and C inline functions and structures routine break
    one or more different compiles.

    Signed-off-by: Zachary Amsden
    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • The current VMSPLIT Kconfig option is disabled whenever highmem is on.
    This is a bit screwy because the people who need to change VMSPLIT the most
    tend to be the ones with highmem and constrained lowmem.

    So, remove the highmem dependency. But, re-include the dependency for the
    "full 1GB of lowmem" option. You can't have the full 1GB of lowmem and
    highmem because of the need for the vmalloc(), kmap(), etc... areas.

    I thought there would be at least a bit of tweaking to do to
    get it to work, but everything seems OK.

    Boot tested on a 4GB x86 machine, and a 12GB 3-node NUMA-Q:

    elm3b82:~# cat /proc/meminfo
    MemTotal: 3695412 kB
    MemFree: 3659540 kB
    ...
    LowTotal: 2909008 kB
    LowFree: 2892324 kB
    ...
    elm3b82:~# zgrep PAE /proc/config.gz
    CONFIG_X86_PAE=y

    larry:~# cat /proc/meminfo
    MemTotal: 11845900 kB
    MemFree: 11786748 kB
    ...
    LowTotal: 2855180 kB
    LowFree: 2830092 kB

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

    Dave Hansen
     
  • I've come across some problems with the assembly version of the ELFNOTE
    macro currently in -mm. (in
    x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch)

    The first is that older gas does not support :varargs in .macro
    definitions (in my testing 2.17 does while 2.15 does not, I don't know
    when it became supported). The Changes file says binutils >= 2.12 so I
    think we need to avoid using it. There are no other uses in mainline or
    -mm. Old gas appears to just ignore it so you get "too many arguments"
    type errors.

    Secondly it seems that passing strings as arguments to assembler macros
    is broken without varargs. It looks like they get unquoted or each
    character is treated as a separate argument or something and this causes
    all manner of grief. I think this is because of the use of -traditional
    when compiling assembly files.

    Therefore I have translated the assembler macro into a pre-processor
    macro.

    I added the desctype as a separate argument instead of including it with
    the descdata as the previous version did since -traditional means the
    ELFNOTE definition after the #else needs to have the same number of
    arguments (I think so anyway, the -traditional CPP semantics are pretty
    fscking strange!).

    With this patch I am able to define elfnotes in assembly like this with
    both old and new assemblers.

    ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "linux")
    ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, "2.6")
    ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz, "xen-3.0")
    ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long, __PAGE_OFFSET)

    Which seems reasonable enough.

    Signed-off-by: Ian Campbell
    Acked-by: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Campbell
     
  • This patch will pack any .note.* section into a PT_NOTE segment in the output
    file.

    To do this, we tell ld that we need a PT_NOTE segment. This requires us to
    start explicitly mapping sections to segments, so we also need to explicitly
    create PT_LOAD segments for text and data, and map the sections to them
    appropriately. Fortunately, each section will default to its previous
    section's segment, so it doesn't take many changes to vmlinux.lds.S.

    This only changes i386 for now, but I presume the corresponding changes for
    other architectures will be as simple.

    This change also adds , which defines C and Assembler macros
    for actually creating ELF notes.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Eric W. Biederman
    Cc: Hollis Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Add a boot parameter to reserve high linear address space for hypervisors.
    This is necessary to allow dynamically loaded hypervisor modules, which might
    not happen until userspace is already running, and also provides a useful tool
    to benchmark the performance impact of reduced lowmem address space.

    Signed-off-by: Zachary Amsden
    Signed-off-by: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     
  • Make __FIXADDR_TOP a variable, so that it can be set to not get in the way of
    address space a hypervisor may want to reserve.

    Original patch by Gerd Hoffmann

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Chris Wright
    Cc: Gerd Hoffmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • It's a little neater, and also means only one place to patch for
    paravirtualization.

    Signed-off-by: Rusty Russell
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Add "always lock'd" implementations of set_bit, clear_bit and change_bit and
    the corresponding test_and_ functions. Also add "always lock'd"
    implementation of cmpxchg. These give guaranteed strong synchronisation and
    are required for non-SMP kernels running on an SMP hypervisor.

    Signed-off-by: Ian Pratt
    Signed-off-by: Christian Limpach
    Signed-off-by: Chris Wright
    Signed-off-by: Jeremy Fitzhardinge
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Wright
     
  • arch/i386/kernel/reboot.c defines its own struct to describe an ldt entry: it
    should use struct Xgt_desc_struct (currently load_ldt is a macro, so doesn't
    complain: paravirt patches make it warn).

    Signed-off-by: Rusty Russell
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Clean up module initalization for apm.c. I had started by auditing for
    proper return code checks in misc_register, but I found that in the event
    of an initalization failure, a proc file and a kernel thread were left
    hanging out. this patch properly cleans up those loose ends on any
    initalization failure.

    Signed-off-by: Neil Horman
    Acked-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     
  • Signed-off-by: Rolf Eike Beer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rolf Eike Beer
     
  • show_registers() tries to dump failing code starting 43 bytes before the
    offending instruction, but this address can be bad, for example in a device
    driver where the failing instruction is less than 43 bytes from the start
    of the driver's code. When that happens, try to dump code starting at the
    failing instruction instead of printing no code at all.

    Signed-off-by: Chuck Ebbert
    Cc: Andi Kleen
    Cc: Keith Owens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • To prevent the emulated RTC timer from stopping when interrupts are delayed
    for too long, disable interrupts around all of the register initialization,
    and check that the interrupt handler did not schedule the next interrupt in
    the past.

    Signed-off-by: Clemens Ladisch
    Cc: Venkatesh Pallipadi
    Cc: Andi Kleen
    Cc: Vojtech Pavlik
    Cc: Robert Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • FRegister a platform device for the AT49BV6416 NOR flash chip on the ATSTK1000
    development board for use by the physmap MTD driver.

    The SMC timings are set up before the platform device is registered so that no
    board-specific mapping driver is necessary.

    Signed-off-by: Haavard Skinnemoen
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • This patchset adds the necessary drivers and infrastructure to access the
    external flash on the ATSTK1000 board through the MTD subsystem. With this
    stuff in place, it will be possible to use a jffs2 filesystem stored in the
    external flash as a root filesystem. It might also be possible to update the
    boot loader if you drop the write protection of partition 0.

    As suggested by David Woodhouse, I reworked the patches to use the physmap
    driver instead of introducing a separate mapping driver for the ATSTK1000.
    I've also cleaned up the hsmc header by removing useless comments and
    converting spaces to tabs (my headerfile generator needs some work.)

    Unfortunately, I couldn't unlock the flash in fixup_use_atmel_lock because the
    erase regions hadn't been set up yet, so I had to do it from cfi_amdstd_setup
    instead.

    This patch:

    This adds a simple API for configuring the static memory controller along with
    an implementation for the Atmel HSMC.

    Signed-off-by: Haavard Skinnemoen
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
    CPU and the AT32STK1000 development board.

    AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
    cost-sensitive embedded applications, with particular emphasis on low power
    consumption and high code density. The AVR32 architecture is not binary
    compatible with earlier 8-bit AVR architectures.

    The AVR32 architecture, including the instruction set, is described by the
    AVR32 Architecture Manual, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf

    The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
    features a 7-stage pipeline, 16KB instruction and data caches and a full
    Memory Management Unit. It also comes with a large set of integrated
    peripherals, many of which are shared with the AT91 ARM-based controllers from
    Atmel.

    Full data sheet is available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf

    while the CPU core implementation including caches and MMU is documented by
    the AVR32 AP Technical Reference, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf

    Information about the AT32STK1000 development board can be found at

    http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918

    including a BSP CD image with an earlier version of this patch, development
    tools (binaries and source/patches) and a root filesystem image suitable for
    booting from SD card.

    Alternatively, there's a preliminary "getting started" guide available at
    http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
    to the sources and patches you will need in order to set up a cross-compiling
    environment for avr32-linux.

    This patch, as well as the other patches included with the BSP and the
    toolchain patches, is actively supported by Atmel Corporation.

    [dmccr@us.ibm.com: Fix more pxx_page macro locations]
    [bunk@stusta.de: fix `make defconfig']
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Adrian Bunk
    Signed-off-by: Dave McCracken
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • The third argument of au1xxx_dbdma_chan_alloc's callback function is not
    used anywhere.

    Signed-off-by: Ralf Baechle
    Cc: David Howells
    Cc: Russell King
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Optimise ffs(x) by using fls(x & x - 1) which we optimise to use the SCAN
    instruction.

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

    David Howells
     
  • Implement fls64() for FRV without recource to conditional jumps.

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

    David Howells
     
  • Fix FRV fls() to handle bit 31 being set correctly (it should return 32 not 0).

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

    David Howells
     
  • Permit __do_IRQ() to be dispensed with based on a configuration option.

    Signed-off-by: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Improve FRV's use of generic IRQ handling:

    (*) Use generic_handle_irq() rather than __do_IRQ() as the latter is obsolete.

    (*) Don't implement enable() and disable() ops as these will fall back to
    using unmask() and mask().

    (*) Provide mask_ack() functions to avoid a call each to mask() and ack().

    (*) Make the cascade handlers always return IRQ_HANDLED.

    (*) Implement the mask() and unmask() functions in the same order as they're
    listed in the ops table.

    Signed-off-by: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Make the FRV arch use the generic IRQ code rather than having its own
    routines for doing so.

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

    David Howells
     
  • As David Howells points out, binfmt_elf sometimes uses
    off_t, sometimes uses loff_t. Use loff_t throughout.

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

    Andrew Morton
     
  • Take tty_mutex when accessing ->signal->tty in selinux code. Noted by Alan
    Cox. Longer term, we are looking at refactoring the code to provide better
    encapsulation of the tty layer, but this is a simple fix that addresses the
    immediate bug.

    Signed-off-by: Stephen Smalley
    Acked-by: Alan Cox
    Acked-by: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Smalley
     
  • This patch converts the semaphore in the superblock security struct to a
    mutex. No locking changes or other code changes are done.

    Signed-off-by: Eric Paris
    Acked-by: Stephen Smalley
    Acked-by: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Paris