02 Jun, 2008

1 commit

  • As noted by Matthew Wilcox:

    Kyle McMartin just tracked down a bug on parisc to a missing
    "memory" clobber in the inline assembly implementation of
    ip_fast_csum. The FRV, SH and Xtensa ports are also missing a
    memory clobber, so I thought it would be polite to let you know.

    The bug manifests as dropped network packets (obviously they have
    the wrong checksum). It started appearing for parisc with GCC 4.3.

    The GCC manual says:

    If your assembler instructions access memory in an unpredictable
    fashion, add `memory' to the list of clobbered registers. This
    will cause GCC to not keep memory values cached in registers
    across the assembler instruction and not optimize stores or loads
    to that memory.

    I see that FRV has a 400 byte memory output which may prevent this
    problem from appearing, but SH and Xtensa have nothing to prevent
    this bug. Hope this saves you a few days of debugging.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

16 May, 2008

1 commit


09 May, 2008

1 commit


08 May, 2008

7 commits


03 May, 2008

1 commit


30 Apr, 2008

1 commit

  • Lots of asm-*/futex.h call pagefault_enable and pagefault_disable, which
    are declared in linux/uaccess.h, without including linux/uaccess.h.

    They all include asm/uaccess.h, so this patch replaces asm/uaccess.h
    with linux/uaccess.h.

    Signed-off-by: Jeff Dike
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

29 Apr, 2008

1 commit

  • Unaligned access is ok for the following arches:
    cris, m68k, mn10300, powerpc, s390, x86

    Arches that use the memmove implementation for native endian, and
    the byteshifting for the opposite endianness.
    h8300, m32r, xtensa

    Packed struct for native endian, byteshifting for other endian:
    alpha, blackfin, ia64, parisc, sparc, sparc64, mips, sh

    m86knommu is generic_be for Coldfire, otherwise unaligned access is ok.

    frv, arm chooses endianness based on compiler settings, uses the byteshifting
    versions. Remove the unaligned trap handler from frv as it is now unused.

    v850 is le, uses the byteshifting versions for both be and le.

    Remove the now unused asm-generic implementation.

    Signed-off-by: Harvey Harrison
    Acked-by: David S. Miller
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

28 Apr, 2008

4 commits

  • Huge ptes have a special type on s390 and cannot be handled with the standard
    pte functions in certain cases, e.g. because of a different location of the
    invalid bit. This patch adds some new architecture- specific functions to
    hugetlb common code, as a prerequisite for the s390 large page support.

    This won't affect other architectures in functionality, but I need to add some
    new dummy inline functions to the headers.

    Acked-by: Martin Schwidefsky
    Signed-off-by: Gerald Schaefer
    Cc: Paul Mundt
    Cc: "Luck, Tony"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerald Schaefer
     
  • A cow break on a hugetlbfs page with page_count > 1 will set a new pte with
    set_huge_pte_at(), w/o any tlb flush operation. The old pte will remain in
    the tlb and subsequent write access to the page will result in a page fault
    loop, for as long as it may take until the tlb is flushed from somewhere else.
    This patch introduces an architecture-specific huge_ptep_clear_flush()
    function, which is called before the the set_huge_pte_at() in hugetlb_cow().

    ATTENTION: This is just a nop on all architectures for now, the s390
    implementation will come with our large page patch later. Other architectures
    should define their own huge_ptep_clear_flush() if needed.

    Acked-by: Martin Schwidefsky
    Signed-off-by: Gerald Schaefer
    Cc: Paul Mundt
    Cc: "Luck, Tony"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerald Schaefer
     
  • This patch moves all architecture functions for hugetlb to architecture header
    files (include/asm-foo/hugetlb.h) and converts all macros to inline functions.
    It also removes (!) ARCH_HAS_HUGEPAGE_ONLY_RANGE,
    ARCH_HAS_HUGETLB_FREE_PGD_RANGE, ARCH_HAS_PREPARE_HUGEPAGE_RANGE,
    ARCH_HAS_SETCLEAR_HUGE_PTE and ARCH_HAS_HUGETLB_PREFAULT_HOOK.

    Getting rid of the ARCH_HAS_xxx #ifdef and macro fugliness should increase
    readability and maintainability, at the price of some code duplication. An
    asm-generic common part would have reduced the loc, but we would end up with
    new ARCH_HAS_xxx defines eventually.

    Acked-by: Martin Schwidefsky
    Signed-off-by: Gerald Schaefer
    Cc: Paul Mundt
    Cc: "Luck, Tony"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerald Schaefer
     
  • s390 for one, cannot implement VM_MIXEDMAP with pfn_valid, due to their memory
    model (which is more dynamic than most). Instead, they had proposed to
    implement it with an additional path through vm_normal_page(), using a bit in
    the pte to determine whether or not the page should be refcounted:

    vm_normal_page()
    {
    ...
    if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) {
    if (vma->vm_flags & VM_MIXEDMAP) {
    #ifdef s390
    if (!mixedmap_refcount_pte(pte))
    return NULL;
    #else
    if (!pfn_valid(pfn))
    return NULL;
    #endif
    goto out;
    }
    ...
    }

    This is fine, however if we are allowed to use a bit in the pte to determine
    refcountedness, we can use that to _completely_ replace all the vma based
    schemes. So instead of adding more cases to the already complex vma-based
    scheme, we can have a clearly seperate and simple pte-based scheme (and get
    slightly better code generation in the process):

    vm_normal_page()
    {
    #ifdef s390
    if (!mixedmap_refcount_pte(pte))
    return NULL;
    return pte_page(pte);
    #else
    ...
    #endif
    }

    And finally, we may rather make this concept usable by any architecture rather
    than making it s390 only, so implement a new type of pte state for this.
    Unfortunately the old vma based code must stay, because some architectures may
    not be able to spare pte bits. This makes vm_normal_page a little bit more
    ugly than we would like, but the 2 cases are clearly seperate.

    So introduce a pte_special pte state, and use it in mm/memory.c. It is
    currently a noop for all architectures, so this doesn't actually result in any
    compiled code changes to mm/memory.o.

    BTW:
    I haven't put vm_normal_page() into arch code as-per an earlier suggestion.
    The reason is that, regardless of where vm_normal_page is actually
    implemented, the *abstraction* is still exactly the same. Also, while it
    depends on whether the architecture has pte_special or not, that is the
    only two possible cases, and it really isn't an arch specific function --
    the role of the arch code should be to provide primitive functions and
    accessors with which to build the core code; pte_special does that. We do
    not want architectures to know or care about vm_normal_page itself, and
    we definitely don't want them being able to invent something new there
    out of sight of mm/ code. If we made vm_normal_page an arch function, then
    we have to make vm_insert_mixed (next patch) an arch function too. So I
    don't think moving it to arch code fundamentally improves any abstractions,
    while it does practically make the code more difficult to follow, for both
    mm and arch developers, and easier to misuse.

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Nick Piggin
    Acked-by: Carsten Otte
    Cc: Jared Hulbert
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

27 Apr, 2008

1 commit

  • Implement __fls on all 64-bit archs:

    alpha has an implementation of fls64.
    Added __fls(x) = fls64(x) - 1.

    ia64 has fls, but not __fls.
    Added __fls based on code of fls.

    mips and powerpc have __ilog2, which is the same as __fls.
    Added __fls = __ilog2.

    parisc, s390, sh and sparc64:
    Include generic __fls.

    x86_64 already has __fls.

    Signed-off-by: Alexander van Heukelum
    Signed-off-by: Ingo Molnar

    Alexander van Heukelum
     

23 Apr, 2008

1 commit


22 Apr, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (42 commits)
    PCI: Change PCI subsystem MAINTAINER
    PCI: pci-iommu-iotlb-flushing-speedup
    PCI: pci_setup_bridge() mustn't be __devinit
    PCI: pci_bus_size_cardbus() mustn't be __devinit
    PCI: pci_scan_device() mustn't be __devinit
    PCI: pci_alloc_child_bus() mustn't be __devinit
    PCI: replace remaining __FUNCTION__ occurrences
    PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered
    PCI: Hotplug: Fix leaks in IBM Hot Plug Controller Driver - ibmphp_init_devno()
    PCI: clean up resource alignment management
    PCI: aerdrv_acpi.c: remove unneeded NULL check
    PCI: Update VIA CX700 quirk
    PCI: Expose PCI VPD through sysfs
    PCI: iommu: iotlb flushing
    PCI: simplify quirk debug output
    PCI: iova RB tree setup tweak
    PCI: parisc: use generic pci_enable_resources()
    PCI: ppc: use generic pci_enable_resources()
    PCI: powerpc: use generic pci_enable_resources()
    PCI: ia64: use generic pci_enable_resources()
    ...

    Linus Torvalds
     
  • …linux-2.6-sched-devel

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel: (62 commits)
    sched: build fix
    sched: better rt-group documentation
    sched: features fix
    sched: /debug/sched_features
    sched: add SCHED_FEAT_DEADLINE
    sched: debug: show a weight tree
    sched: fair: weight calculations
    sched: fair-group: de-couple load-balancing from the rb-trees
    sched: fair-group scheduling vs latency
    sched: rt-group: optimize dequeue_rt_stack
    sched: debug: add some debug code to handle the full hierarchy
    sched: fair-group: SMP-nice for group scheduling
    sched, cpuset: customize sched domains, core
    sched, cpuset: customize sched domains, docs
    sched: prepatory code movement
    sched: rt: multi level group constraints
    sched: task_group hierarchy
    sched: fix the task_group hierarchy for UID grouping
    sched: allow the group scheduler to have multiple levels
    sched: mix tasks and groups
    ...

    Linus Torvalds
     

21 Apr, 2008

1 commit

  • We currently keep 2 lists of PCI devices in the system, one in the
    driver core, and one all on its own. This second list is sorted at boot
    time, in "BIOS" order, to try to remain compatible with older kernels
    (2.2 and earlier days). There was also a "nosort" option to turn this
    sorting off, to remain compatible with even older kernel versions, but
    that just ends up being what we have been doing from 2.5 days...

    Unfortunately, the second list of devices is not really ever used to
    determine the probing order of PCI devices or drivers[1]. That is done
    using the driver core list instead. This change happened back in the
    early 2.5 days.

    Relying on BIOS ording for the binding of drivers to specific device
    names is problematic for many reasons, and userspace tools like udev
    exist to properly name devices in a persistant manner if that is needed,
    no reliance on the BIOS is needed.

    Matt Domsch and others at Dell noticed this back in 2006, and added a
    boot option to sort the PCI device lists (both of them) in a
    breadth-first manner to help remain compatible with the 2.4 order, if
    needed for any reason. This option is not going away, as some systems
    rely on them.

    This patch removes the sorting of the internal PCI device list in "BIOS"
    mode, as it's not needed at all anymore, and hasn't for many years.
    I've also removed the PCI flags for this from some other arches that for
    some reason defined them, but never used them.

    This should not change the ordering of any drivers or device probing.

    [1] The old-style pci_get_device and pci_find_device() still used this
    sorting order, but there are very few drivers that use these functions,
    as they are deprecated for use in this manner. If for some reason, a
    driver rely on the order and uses these functions, the breadth-first
    boot option will resolve any problem.

    Cc: Matt Domsch
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

20 Apr, 2008

1 commit

  • [rebased for sched-devel/latest]

    - Add a new cpuset file, having levels:
    sched_relax_domain_level

    - Modify partition_sched_domains() and build_sched_domains()
    to take attributes parameter passed from cpuset.

    - Fill newidle_idx for node domains which currently unused but
    might be required if sched_relax_domain_level become higher.

    - We can change the default level by boot option 'relax_domain_level='.

    Signed-off-by: Hidetoshi Seto
    Signed-off-by: Ingo Molnar

    Hidetoshi Seto
     

19 Apr, 2008

9 commits


18 Apr, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (58 commits)
    ide: remove ide_init_default_irq() macro
    ide: move default IDE ports setup to ide_generic host driver
    ide: remove obsoleted "idex=noprobe" kernel parameter (take 2)
    ide: remove needless hwif->irq check from ide_hwif_configure()
    ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers
    ide: limit legacy VLB host drivers to alpha, x86 and mips
    cmd640: init hwif->{io_ports,irq} explicitly
    cmd640: cleanup setup_device_ptrs()
    ide: add ide-4drives host driver (take 3)
    ide: remove ppc ifdef from init_ide_data()
    ide: remove ide_default_io_ctl() macro
    ide: remove CONFIG_IDE_ARCH_OBSOLETE_INIT
    ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2)
    ppc/pmac: remove no longer needed IDE quirk
    ppc: don't include
    ppc: remove ppc_ide_md
    ppc/pplus: remove ppc_ide_md.ide_init_hwif hook
    ppc/sandpoint: remove ppc_ide_md hooks
    ppc/lopec: remove ppc_ide_md hooks
    ppc/mpc8xx: remove ppc_ide_md hooks
    ...

    Linus Torvalds
     
  • It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y
    and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]).

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

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
     

03 Apr, 2008

1 commit

  • Currently include/linux/kvm.h is not considered by make headers_install,
    because Kbuild cannot handle " unifdef-$(CONFIG_FOO) += foo.h. This problem
    was introduced by

    commit fb56dbb31c4738a3918db81fd24da732ce3b4ae6
    Author: Avi Kivity
    Date: Sun Dec 2 10:50:06 2007 +0200

    KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM

    Currently, make headers_check barfs due to , which
    includes, not existing. Rather than add a zillion s, export kvm.
    only if the arch actually supports it.

    Signed-off-by: Avi Kivity

    which makes this an 2.6.25 regression.

    One way of solving the issue is to enhance Kbuild, but Avi and David conviced
    me, that changing headers_install is not the way to go. This patch changes
    the definition for linux/kvm.h to unifdef-y.

    If  unifdef-y is used for linux/kvm.h "make headers_check" will fail on all
    architectures without asm/kvm.h. Therefore, this patch also provides
    asm/kvm.h on all architectures.

    Signed-off-by: Christian Borntraeger
    Acked-by: Avi Kivity
    Cc: Sam Ravnborg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christian Borntraeger
     

31 Mar, 2008

1 commit


26 Mar, 2008

2 commits

  • The unlazy_fpu() path calls in to save_fpu() if the task has
    TIF_USEDFPU set. save_fpu() being the crap API that it is has the side
    effect of clearing the flag itself, which presently doesn't happen
    if we're using FPU emulation. Fix this up for now, pending an overhaul
    in 2.6.26.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Presently with preempt enabled there's the possibility to be preempted
    after the TIF_USEDFPU test and the register save, leading to bogus
    state post-__switch_to(). Use an explicit preempt_disable()/enable()
    pair around unlazy_fpu()/clear_fpu() to avoid this. Follows the x86
    change.

    Reported-by: Takuo Koguchi
    Signed-off-by: Paul Mundt

    Paul Mundt
     

14 Mar, 2008

1 commit