13 Jul, 2006

1 commit

  • During the recent discussion of taking 'volatile' off of the spinlock, I
    noticed that while most arches #define cpu_relax() such that it implies
    barrier(), some arches define cpu_relax() to be empty.

    This patch changes the definition of cpu_relax() for frv, h8300, m68knommu,
    sh, sh64, v850 and xtensa from an empty while(0) to the compiler barrier().

    Signed-off-by: Chase Venters
    Acked-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Chase Venters
     

12 Jul, 2006

6 commits

  • Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • 1. Multipath devices for which SetPGID is not supported are not handled well.
    Use NOP ccws for path verification (sans path grouping) when SetPGID is not
    supported.
    2. Check for PGIDs already set with SensePGID on _all_ paths (not just the
    first one) and try to find a common one. Moan if no common PGID can be
    found (and use NOP verification). If no PGIDs have been set, use the css
    global PGID (as before). (Rationale: SetPGID will get a command reject if
    the PGID it tries to set does not match the already set PGID.)
    3. Immediately before reboot, issue RESET CHANNEL PATH (rcp) on all chpids. This
    will remove the old PGIDs. rcp will generate solicited CRWs which can be
    savely ignored by the machine check handler (all other actions create
    unsolicited CRWs).

    Signed-off-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky

    Cornelia Huck
     
  • Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • futex_atomic_cmpxchg_inatomic has the same bug as the other
    atomic futex operations: the operation needs to be done in the
    user address space, not the kernel address space. Add the missing
    sacf 256 & sacf 0.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Make sure that raw_local_save_flags and raw_local_irq_restore always get an
    unsigned long parameter. raw_irqs_disabled should call raw_local_save_flags
    instead of local_save_flags.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • __builtin_trap() has the archictecture defined backend in gcc since gcc 3.3.
    To make sure the kernel builds with gcc 3.2 as well, use the old style BUG()
    statement if compiled with older gcc versions.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

11 Jul, 2006

22 commits

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI: ACPI_DOCK: Initialize the atomic notifier list
    ACPI: acpi_os_allocate() fixes
    ACPI: SBS: fix initialization, sem2mutex
    ACPI: add 'const' to several ACPI file_operations
    ACPI: delete some defaults from ACPI Kconfig
    ACPI: "Device `[%s]' is not power manageable" make message debug only
    ACPI: ACPI_DOCK Kconfig
    Revert "Revert "ACPI: dock driver""
    ACPI: acpi_os_get_thread_id() returns current
    ACPI: ACPICA 20060707

    Linus Torvalds
     
  • Signed-off-by: Muli Ben-Yehuda
    Signed-off-by: Jon Mason
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Muli Ben-Yehuda
     
  • Add an nfs4 operations count array to nfsd_stats structure. The count is
    incremented in nfsd4_proc_compound() where all the operations are handled
    by the nfsv4 server. This count of individual nfsv4 operations is also
    entered into /proc filesystem.

    Signed-off-by: Shankar Anand
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shankar Anand
     
  • allyesconfig vmlinux size delta:

    text data bss dec filename
    20736884 6073834 3075176 29885894 vmlinux.before
    20721009 6073966 3075176 29870151 vmlinux.after

    ~18 bytes per callsite, 15K of text size (~0.1%) saved.

    (as an added bonus this also removes a lockdep annotation.)

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

    Ingo Molnar
     
  • Handle memory-mapped chips properly, needed for example on DECstations.
    This support was in Linux 2.4 but for some reason got lost in 2.6. This
    patch is taken directly from the linux-mips repository.

    [akpm@osdl.org: cleanup]
    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: Martin Michlmayr
    Cc: Paul Gortmaker
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki
     
  • Newer ARMs have a 40 bit physical address space, but mapping physical
    memory above 4G needs a special page table format which we (currently?) do
    not use for userspace mappings, so what happens instead is that mapping an
    address >= 4G will happily discard the upper bits and wrap.

    There is a valid_mmap_phys_addr_range() arch hook where we could check for
    >= 4G addresses and deny the mapping, but this hook takes an unsigned long
    address:

    static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t size);

    And drivers/char/mem.c:mmap_mem() calls it like this:

    static int mmap_mem(struct file * file, struct vm_area_struct * vma)
    {
    size_t size = vma->vm_end - vma->vm_start;

    if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size))

    So that's not much help either.

    This patch makes the hook take a pfn instead of a phys address.

    Signed-off-by: Lennert Buytenhek
    Cc: Bjorn Helgaas
    Cc: "Luck, Tony"
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lennert Buytenhek
     
  • Introduce the use of asm-offsets into the FRV architecture.

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

    David Howells
     
  • Add coredump capability for the ELF-FDPIC binfmt.

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

    David Howells
     
  • Move the roundup() macro from binfmt_elf.c into linux/kernel.h as it's
    generally useful.

    [akpm@osdl.org: nuke all the other implementations]
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Add definitions for SEEK_SET, SEEK_CUR and SEEK_END to the kernel header
    files.

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

    David Howells
     
  • Fix some FRV arch compile errors, including:

    (*) Marking nr_kernel_pages as __meminitdata so that references to it end up
    being properly calculated rather than being assumed to be in the small
    data section (and thus calculated wrt the GP register). Not doing this
    causes the linker to emit errors as the offset is too big to fit into the
    load instruction.

    (*) Move pm_power_off into an unconditionally compiled .c file as it's now
    unconditionally accessed.

    (*) Declare frv_change_cmode() in a header file rather than in a .c file, and
    declare it asmlinkage.

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

    David Howells
     
  • This patch fixes several problems:
    - pmac_backlight_key() is called under interrupt context, and therefore
    can't use mutexes or semaphores, so defer the backlight level for
    later, as it's not critical (original code by Aristeu S. Rozanski F.
    ).
    - Add exports for functions that might be called from modules
    - Fix Kconfig depdencies on PMAC_BACKLIGHT.
    - Fix locking issues on calls from inside the driver (reported by
    Aristeu S. Rozanski F., too)
    - Fix wrong calculation of backlight values in some of the drivers
    - Replace pmac_backlight_key_up/down by inline functions

    [akpm@osdl.org: fix function prototypes]
    Signed-off-by: Michael Hanselmann
    Acked-by: Aristeu S. Rozanski F.
    Acked-by: Rene Nussbaumer
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann
     
  • This patch slightly reworks the new irq code to fix a small design error. I
    removed the passing of the trigger to the map() calls entirely, it was not a
    good idea to have one call do two different things. It also fixes a couple of
    corner cases.

    Mapping a linux virtual irq to a physical irq now does only that. Setting the
    trigger is a different action which has a different call.

    The main changes are:

    - I no longer call host->ops->map() for an already mapped irq, I just return
    the virtual number that was already mapped. It was called before to give an
    opportunity to change the trigger, but that was causing issues as that could
    happen while the interrupt was in use by a device, and because of the
    trigger change, map would potentially muck around with things in a racy way.
    That was causing much burden on a given's controller implementation of
    map() to get it right. This is much simpler now. map() is only called on
    the initial mapping of an irq, meaning that you know that this irq is _not_
    being used. You can initialize the hardware if you want (though you don't
    have to).

    - Controllers that can handle different type of triggers (level/edge/etc...)
    now implement the standard irq_chip->set_type() call as defined by the
    generic code. That means that you can use the standard set_irq_type() to
    configure an irq line manually if you wish or (though I don't like that
    interface), pass explicit trigger flags to request_irq() as defined by the
    generic kernel interfaces. Also, using those interfaces guarantees that
    your controller set_type callback is called with the descriptor lock held,
    thus providing locking against activity on the same interrupt (including
    mask/unmask/etc...) automatically. A result is that, for example, MPIC's
    own map() implementation calls irq_set_type(NONE) to configure the hardware
    to the default triggers.

    - To allow the above, the irq_map array entry for the new mapped interrupt
    is now set before map() callback is called for the controller.

    - The irq_create_of_mapping() (also used by irq_of_parse_and_map()) function
    for mapping interrupts from the device-tree now also call the separate
    set_irq_type(), and only does so if there is a change in the trigger type.

    - While I was at it, I changed pci_read_irq_line() (which is the helper I
    would expect most archs to use in their pcibios_fixup() to get the PCI
    interrupt routing from the device tree) to also handle a fallback when the
    DT mapping fails consisting of reading the PCI_INTERRUPT_PIN to know wether
    the device has an interrupt at all, and the the PCI_INTERRUPT_LINE to get an
    interrupt number from the device. That number is then mapped using the
    default controller, and the trigger is set to level low. That default
    behaviour works for several platforms that don't have a proper interrupt
    tree like Pegasos. If it doesn't work for your platform, then either
    provide a proper interrupt tree from the firmware so that fallback isn't
    needed, or don't call pci_read_irq_line()

    - Add back a bit that got dropped by my main rework patch for properly
    clearing pending IPIs on pSeries when using a kexec

    Signed-off-by: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • It turns out that there is a way to build a kernel with NUMA and no SMP.
    In that case we are missing one definition __inc_zone_state.

    Provide that missing __inc_zone_state.

    (akpm: NUMA && !SMP sounds odd, but I am told "But there is the concept of
    cpuless nodes. A NUMA system without SMP has a single processor but multiple
    memory nodes. This used to work before on IA64 (wasn't aware of it, never seen
    anyone with this kind of thing).")

    Acked-by: Tony Luck
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Signed-off-by: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoshinori Sato
     
  • We introduced 'io_sectors' recently so we could count the sectors that causes
    io during resync separate from sectors which didn't cause IO - there can be a
    difference if a bitmap is being used to accelerate resync.

    However when a speed is reported, we find the number of sectors processed
    recently by subtracting an oldish io_sectors count from a current
    'curr_resync' count. This is wrong because curr_resync counts all sectors,
    not just io sectors.

    So, add a field to mddev to store the curren io_sectors separately from
    curr_resync, and use that in the calculations.

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

    NeilBrown
     
  • screen_info.h doesn't have anything to do with the tty layer and shouldn't be
    included by tty.h. This patches removes the include and modifies all users to
    directly include screen_info.h. struct screen_info is mainly used to
    communicate with the console drivers in drivers/video/console. Note that this
    patch touches every arch and I have no way of testing it. If there is a
    mistake the worst thing that will happen is a compile error.

    [akpm@osdl.org: fix arm build]
    [akpm@osdl.org: fix alpha build]
    Signed-off-by: Jon Smirl
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon Smirl
     
  • MAX_NR_CONSOLES, fg_console, want_console and last_console are more of a
    function of the VT layer than the TTY one. Moving these to vt.h and vt_kern.h
    allows all of the framebuffer and VT console drivers to remove their
    dependency on tty.h.

    [akpm@osdl.org: fix alpha build]
    Signed-off-by: Jon Smirl
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon Smirl
     
  • Clean up lockdep on-stack-completion initializer. (This also removes the
    dependency on waitqueue_lock_key.)

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

    Ingo Molnar
     
  • lockdep_map is embedded into every lock, which blows up data structure
    sizes all around the kernel. Reduce the class-cache to be for the default
    class only - that is used in 99.9% of the cases and even if we dont have a
    class cached, the lookup in the class-hash is lockless.

    This change reduces the per-lock dep_map overhead by 56 bytes on 64-bit
    platforms and by 28 bytes on 32-bit platforms.

    Signed-off-by: Ingo Molnar
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Add more documentation to rwsem.h.

    Signed-off-by: Ingo Molnar
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Dopey bug. Causes hopelessly-wrong numbers from vmstat(8) and several other
    counters.

    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

10 Jul, 2006

11 commits

  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • Replace acpi_in_resume with a more general hack
    to check irqs_disabled() on any kmalloc() from ACPI.
    While setting (system_state != SYSTEM_RUNNING) on resume
    seemed more general, Andrew Morton preferred this approach.

    http://bugzilla.kernel.org/show_bug.cgi?id=3469

    Make acpi_os_allocate() into an inline function to
    allow /proc/slab_allocators to work.

    Delete some memset() that could fault on allocation failure.

    Signed-off-by: Len Brown

    Len Brown
     
  • Use thread info flags to track use of debug registers and IO bitmaps.

    - add TIF_DEBUG to track when debug registers are active
    - add TIF_IO_BITMAP to track when I/O bitmap is used
    - modify __switch_to() to use the new TIF flags

    Performance tested on Pentium II, ten runs of LMbench context switch
    benchmark (smaller is better:)

    before after
    avg 3.65 3.39
    min 3.55 3.33

    Signed-off-by: Stephane Eranian
    Signed-off-by: Chuck Ebbert
    Acked-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Stephane Eranian
     
  • * HEAD:
    [AX.25]: Use kzalloc
    [ATM] net/atm/clip.c: fix PROC_FS=n compile
    [PKT_SCHED]: act_api: Fix module leak while flushing actions
    [NET]: Fix IPv4/DECnet routing rule dumping
    [NET] gso: Fix up GSO packets with broken checksums
    [NET] gso: Add skb_is_gso
    [IRDA]: fix drivers/net/irda/ali-ircc.c:ali_ircc_init()
    [ATM]: fix possible recursive locking in skb_migrate()
    [ATM]: Typo in drivers/atm/Kconfig...
    [TG3]: add amd8131 to "write reorder" chipsets
    [NET]: Fix network device interface printk message priority

    Linus Torvalds
     
  • * 'blktrace' of git://brick.kernel.dk/data/git/linux-2.6-block:
    [PATCH] Only the first two bits in bio->bi_rw and rq->flags match
    [PATCH] blktrace: readahead support
    [PATCH] blktrace: fix barrier vs sync typo

    Linus Torvalds
     
  • This reverts 953969ddf5b049361ed1e8471cc43dc4134d2a6f commit.

    Len Brown
     
  • Linux mutexes and the debug code that that reference
    acpi_os_get_thread_id() are happy with 0.
    But the AML mutexes in exmutex.c expect a unique non-zero
    number for each thread - as they track this thread_id
    to permit the mutex re-entrancy defined by the ACPI spec.

    http://bugzilla.kernel.org/show_bug.cgi?id=6687

    Signed-off-by: Len Brown

    Len Brown
     
  • Added the ACPI_PACKED_POINTERS_NOT_SUPPORTED macro to
    support C compilers that do not allow the initialization
    of address pointers within packed structures - even though
    the hardware itself may support misaligned transfers. Some
    of the debug data structures are packed by default to
    minimize size.

    Added an error message for the case where
    acpi_os_get_thread_id() returns zero. A non-zero value is
    required by the core ACPICA code to ensure the proper
    operation of AML mutexes and recursive control methods.

    The DSDT is now the only ACPI table that determines whether
    the AML interpreter is in 32-bit or 64-bit mode. Not really
    a functional change, but the hooks for per-table 32/64
    switching have been removed from the code. A clarification
    to the ACPI specification is forthcoming in ACPI 3.0B.

    Fixed a possible leak of an Owner ID in the error
    path of tbinstal.c acpi_tb_init_table_descriptor() and
    migrated all table OwnerID deletion to a single place in
    acpi_tb_uninstall_table() to correct possible leaks when using
    the acpi_tb_delete_tables_by_type() interface (with assistance
    from Lance Ortiz.)

    Fixed a problem with Serialized control methods where the
    semaphore associated with the method could be over-signaled
    after multiple method invocations.

    Fixed two issues with the locking of the internal
    namespace data structure. Both the Unload() operator and
    acpi_unload_table() interface now lock the namespace during
    the namespace deletion associated with the table unload
    (with assistance from Linn Crosetto.)

    Fixed problem reports (Valery Podrezov) integrated: -
    Eliminate unnecessary memory allocation for CreateXxxxField
    http://bugzilla.kernel.org/show_bug.cgi?id=5426

    Fixed problem reports (Fiodor Suietov) integrated: -
    Incomplete cleanup branches in AcpiTbGetTableRsdt (BZ 369)
    - On Address Space handler deletion, needless deactivation
    call (BZ 374) - AcpiRemoveAddressSpaceHandler: validate
    Device handle parameter (BZ 375) - Possible memory leak,
    Notify sub-objects of Processor, Power, ThermalZone (BZ
    376) - AcpiRemoveAddressSpaceHandler: validate Handler
    parameter (BZ 378) - Minimum Length of RSDT should be
    validated (BZ 379) - AcpiRemoveNotifyHandler: return
    AE_NOT_EXIST if Processor Obj has no Handler (BZ (380)
    - AcpiUnloadTable: return AE_NOT_EXIST if no table of
    specified type loaded (BZ 381)

    Signed-off-by: Bob Moore
    Signed-off-by: Len Brown

    Bob Moore