13 Sep, 2006

11 commits

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    [POWERPC] Fix G5 DART (IOMMU) race causing occasional data corruption
    [POWERPC] Fix MMIO ops to provide expected barrier behaviour
    [POWERPC] Fix interrupt clearing in kdump shutdown sequence
    [POWERPC] update prep_defconfig
    [POWERPC] kdump: Support kernels having 64k page size.
    [POWERPC] Implement PowerPC futex_atomic_cmpxchg_inatomic().
    [POWERPC] Add new, missing argument to of_irq_map_raw() for 86xx.
    [POWERPC] Update defconfigs

    Linus Torvalds
     
  • MIPS asm/page.h unconditionally includes , which
    doesn't exist in userspace. Move an #endif /* __KERNEL__ */ down a few lines
    to prevent that.

    Also, remove the broken definition of PAGE_SIZE which is never going to be
    correct -- in the absence of PAGE_SIZE, non-broken userspace will fall back to
    using sysconf() or getpagesize() instead.

    Signed-off-by: David Woodhouse
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • The header file doesn't exist in userspace and probably
    shouldn't -- but it's used unconditionally in . Protect it
    with #ifdef __KERNEL__ and move setup.h from $(header-y) to $(unifdef-y) in
    Kbuild accordingly.

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

    David Woodhouse
     
  • Some files which don't exist in userspace were being included unconditionally
    in asm-i386/elf.h. Move the offending #includes down a few lines so that
    they're protected by #ifdef __KERNEL__

    In fact, we probably want to kill off all userspace use of asm/elf.h -- but we
    aren't there yet, so we should at least make it possible to include it for
    now.

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

    David Woodhouse
     
  • Because doesn't exist in userspace, it should be only
    included from within #ifdef __KERNEL__. Move the corresponding #include

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

    David Woodhouse
     
  • There's useful stuff in but has nothing for
    userspace. Stop exporting it, and include it only from within the existing
    #ifdef __KERNEL__ part of

    This fixes a 'make headers_check' failure on i386 because asm-i386/timex.h
    includes both asm-i386/tsc.h and asm-i386/processor.h, neither of which are
    exported to userspace. It's not entirely clear _why_ it includes either of
    these, but it does.

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

    David Woodhouse
     
  • We don't need any of this crap included from the user-visible part of nfs_fs.h
    -- remove it all.

    In fact, we probably don't need anything but NFS_SUPER_MAGIC to be defined; is
    there any need for anything else? And magic numbers should probably move to
    rather than being strewn across various fs-specific include
    files which exist in userspace for solely that purpose.

    With this patch, 'make header_check' works again at least on PowerPC.

    Signed-off-by: David Woodhouse
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • This changes the writeX family of functions to have a sync instruction
    before the MMIO store rather than after, because the generally expected
    behaviour is that the device receiving the MMIO store can be guaranteed
    to see the effects of any preceding writes to normal memory.

    To preserve ordering between writeX and readX, and to preserve ordering
    between preceding stores and the readX, the readX family of functions
    have had an sync added before the load.

    Although writeX followed by spin_unlock is not officially guaranteed
    to keep the writeX inside the spin-locked region unless an mmiowb()
    is used, there are currently drivers that depend on the previous
    behaviour on powerpc, which was that the mmiowb wasn't actually required.
    Therefore we have a per-cpu flag that is set by writeX, cleared by
    __raw_spin_lock and mmiowb, and tested by __raw_spin_unlock. If it is
    set, __raw_spin_unlock does a sync and clears it.

    This changes both 32-bit and 64-bit readX/writeX. 32-bit already has a
    sync in __raw_spin_unlock (since lwsync doesn't exist on 32-bit), and thus
    doesn't need the per-cpu flag.

    Tested on G5 (PPC970) and POWER5.

    Signed-off-by: Paul Mackerras

    Paul Mackerras
     
  • This is required to generate proper core files using kdump on ppc64.

    Create a backup region of 64K size irrespective of the PAGE SIZE.
    At present 32K was used as backup size. In the case of 64K page size,
    second PT_LOAD segments starts at 32K and the first one is not page
    aligned. __ioremap() (crash_dump.c) fails if pfn = 0 which is the
    case for the second PT_LOAD segment. This is not an issue for 4K page
    size because the the first page (32K backup) is copied to second
    kernel memory and thus referencing with the second kernel pfn.

    Signed-off-by: Sachin Sant
    Signed-off-by: Paul Mackerras

    Sachin P. Sant
     
  • The sys_[gs]et_robust_list() syscalls were wired up on PowerPC but
    didn't work correctly because futex_atomic_cmpxchg_inatomic() wasn't
    implemented. Implement it, based on __cmpxchg_u32().

    Signed-off-by: David Woodhouse
    Signed-off-by: Paul Mackerras

    David Woodhouse
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
    V4L/DVB (4608c): Fix I2C dependencies for saa7146 modules
    V4L/DVB (4608b): i2c deps fix on DVB
    V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install
    V4L/DVB (4520): Fix an error when loading bttv driver on PV M4900.
    V4L/DVB (4511): Restore tuner_ymec_tvf66t5_b_dff_pal_ranges[] to fix UHF switch functionality
    V4L/DVB (4494a): Fix compilation when V4L1 support is not present

    Linus Torvalds
     

12 Sep, 2006

4 commits


11 Sep, 2006

3 commits

  • * master.kernel.org:/home/rmk/linux-2.6-mmc:
    [MMC] Always use a sector size of 512 bytes
    [MMC] Cleanup 385e3227d4d83ab13d7767c4bb3593b0256bf246
    [ARM] 3751/1: i.MX/MX1 SD/MMC use 512 bytes request for SCR read
    [MMC] Fix SD timeout calculation
    [MMC] constify mmc_host_ops

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 3778/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410 [simtec]
    [ARM] 3783/1: S3C2412: fix IRQ_EINT0 to IRQ_EINT3 handling
    [ARM] 3779/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410 [left]
    [ARM] 3777/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410 [regs-*.h]
    [ARM] 3776/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410
    [ARM] 3775/1: S3C24XX: do not add same sysdev_driver to two classes
    [ARM] 3774/1: S3C24XX: SMDK2413 has two machine IDs
    [ARM] 3773/1: Add the HWCAP_VFP bit for the ARM926 CPUs
    [ARM] 3772/1: Fix compilation error in mach-ixp4xx/nslu2*
    [ARM] 3767/1: S3C24XX: remove changelog comments from arch/arm/mach-s3c2410
    [ARM] 3766/1: Fix typo in ARM _raw_read_trylock

    Linus Torvalds
     
  • V4L1 support should be disabled when no CONFIG_VIDEO_V4L1_COMPAT is defined,
    to allow checking for broken V4L2 ports. This is very important during the
    migration phase for V4L2 API.
    However, userspace apps should be capable of using both APIs, since they need
    to test at runtime, via VIDIOCGCAP ioctl, if V4L1 is supported. So, when
    __KERNEL__ is not defined, those ioctls and corresponding structs should be
    visible.
    This patch also removes the obsolete defines HAVE_V4L1 and HAVE_V4L2, that
    where causing some confusion, and were replaced by CONFIG_VIDEO_V4L1_COMPAT
    and CONFIG_VIDEO_V4L2.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

10 Sep, 2006

4 commits


09 Sep, 2006

4 commits

  • The syscalls set/get_robust_list must not be wired up until
    futex_atomic_cmpxchg_inatomic is implemented. Otherwise the kernel will
    hang in handle_futex_death.

    Signed-off-by: Andreas Schwab
    Signed-off-by: Tony Luck

    Andreas Schwab
     
  • The logic in nfs_direct_read_schedule and nfs_direct_write_schedule can
    allow data->npages to be one larger than rpages. This causes a page
    pointer to be written beyond the end of the pagevec in nfs_read_data (or
    nfs_write_data).

    Fix this by making nfs_(read|write)_alloc() calculate the size of the
    pagevec array, and initialise data->npages.

    Also get rid of the redundant argument to nfs_commit_alloc().

    Signed-off-by: Trond Myklebust
    Cc: Chuck Lever
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • New SiS south bridge device ID is 0x966.

    Next coming product will be 0x968. (Will be released in Q4, this year)

    We don't make any updates to the IDE controller.

    Signed-off-by: David Wang
    Cc: Jeff Garzik
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Wang
     
  • Not that it passes allmodconfig without it...

    Signed-off-by: Alexey Dobriyan
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Mark Haverkamp
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

08 Sep, 2006

1 commit

  • This prevents cross-region mappings on IA64 and SPARC which could lead
    to system crash. They were correctly trapped for normal mmap() calls,
    but not for the kernel internal calls generated by executable loading.

    This code just moves the architecture-specific cross-region checks into
    an arch-specific "arch_mmap_check()" macro, and defines that for the
    architectures that needed it (ia64, sparc and sparc64).

    Architectures that don't have any special requirements can just ignore
    the new cross-region check, since the mmap() code will just notice on
    its own when the macro isn't defined.

    Signed-off-by: Pavel Emelianov
    Signed-off-by: Kirill Korotaev
    Acked-by: David Miller
    Signed-off-by: Greg Kroah-Hartman
    [ Cleaned up to not affect architectures that don't need it ]
    Signed-off-by: Linus Torvalds

    Kirill Korotaev
     

07 Sep, 2006

7 commits


03 Sep, 2006

2 commits

  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches
    [ARM] 3765/1: S3C24XX: cleanup include/asm-arm/arch-s3c2410/dma.h
    [ARM] 3764/1: S3C24XX: change type naming to kernel style
    [ARM] 3763/1: add both rtcs to csb337 defconfig
    [ARM] Fix ARM __raw_read_trylock() implementation
    [ARM] 3750/3: Fix double VFP emulation for EABI kernels

    Linus Torvalds
     
  • Patch from George G. Davis

    Resolve ARM1136 VIPT non-aliasing cache coherency issues observed when
    using ptrace to set breakpoints and cleanup copy_{to,from}_user_page()
    while we're here as requested by Russell King because "it's also far
    too heavy on non-v6 CPUs".

    NOTES:

    1. Only access_process_vm() calls copy_{to,from}_user_page().
    2. access_process_vm() calls get_user_pages() to pin down the "page".
    3. get_user_pages() calls flush_dcache_page(page) which ensures cache
    coherency between kernel and userspace mappings of "page". However
    flush_dcache_page(page) may not invalidate I-Cache over this range
    for all cases, specifically, I-Cache is not invalidated for the VIPT
    non-aliasing case. So memory is consistent between kernel and user
    space mappings of "page" but I-Cache may still be hot over this
    range. IOW, we don't have to worry about flush_cache_page() before
    memcpy().
    4. Now, for the copy_to_user_page() case, after memcpy(), we must flush
    the caches so memory is consistent with kernel cache entries and
    invalidate the I-Cache if this mm region is executable. We don't
    need to do anything after memcpy() for the copy_from_user_page()
    case since kernel cache entries will be invalidated via the same
    process above if we access "page" again. The flush_ptrace_access()
    function (borrowed from SPARC64 implementation) is added to handle
    cache flushing after memcpy() for the copy_to_user_page() case.

    Signed-off-by: George G. Davis
    Signed-off-by: Russell King

    George G. Davis
     

02 Sep, 2006

4 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
    uhci-hcd: fix list access bug
    USB: Support for ELECOM LD-USB20 in pegasus
    USB: Add VIA quirk fixup for VT8235 usb2
    USB: rtl8150_disconnect() needs tasklet_kill()
    USB Storage: unusual_devs.h for Sony Ericsson M600i
    USB Storage: Remove the finecam3 unusual_devs entry
    UHCI: don't stop at an Iso error
    usb gadget: g_ether spinlock recursion fix
    USB: add all wacom device to hid-core.c blacklist
    hid-core.c: Adds all GTCO CalComp Digitizers and InterWrite School Products to blacklist
    USB floppy drive SAMSUNG SFD-321U/EP detected 8 times

    Linus Torvalds
     
  • Vitezslav Samel reports that an HP DL380 g4 fails using the
    default arch due to the ISA bus having an ID of 32.

    It would have worked OK with the generic arch - for some reason the default
    arch doesn't support as many busses.

    So bump that up to support 256 busses, but leave it at 32 if we're building a
    tiny system to save a bit of memory.

    Cc: Vitezslav Samel
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Cleanup allocation and freeing of tsk->delays used by delay accounting.
    This solves two problems reported for delay accounting:

    1. oops in __delayacct_blkio_ticks
    http://www.uwsg.indiana.edu/hypermail/linux/kernel/0608.2/1844.html

    Currently tsk->delays is getting freed too early in task exit which can
    cause a NULL tsk->delays to get accessed via reading of /proc//stats.
    The patch fixes this problem by freeing tsk->delays closer to when
    task_struct itself is freed up. As a result, it also eliminates the use of
    tsk->delays_lock which was only being used (inadequately) to safeguard
    access to tsk->delays while a task was exiting.

    2. Possible memory leak in kernel/delayacct.c
    http://www.uwsg.indiana.edu/hypermail/linux/kernel/0608.2/1389.html

    The patch cleans up tsk->delays allocations after a bad fork which was
    missing earlier.

    The patch has been tested to fix the problems listed above and stress
    tested with rapid calls to delay accounting's taskstats command interface
    (which is the other path that can access the same data, besides the /proc
    interface causing the oops above).

    Signed-off-by: Shailabh Nagar
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shailabh Nagar
     
  • The ZVC counter update threshold is currently set to a fixed value of 32.
    This patch sets up the threshold depending on the number of processors and
    the sizes of the zones in the system.

    With the current threshold of 32, I was able to observe slight contention
    when more than 130-140 processors concurrently updated the counters. The
    contention vanished when I either increased the threshold to 64 or used
    Andrew's idea of overstepping the interval (see ZVC overstep patch).

    However, we saw contention again at 220-230 processors. So we need higher
    values for larger systems.

    But the current default is already a bit of an overkill for smaller
    systems. Some systems have tiny zones where precision matters. For
    example i386 and x86_64 have 16M DMA zones and either 900M ZONE_NORMAL or
    ZONE_DMA32. These are even present on SMP and NUMA systems.

    The patch here sets up a threshold based on the number of processors in the
    system and the size of the zone that these counters are used for. The
    threshold should grow logarithmically, so we use fls() as an easy
    approximation.

    Results of tests on a system with 1024 processors (4TB RAM)

    The following output is from a test allocating 1GB of memory concurrently
    on each processor (Forking the process. So contention on mmap_sem and the
    pte locks is not a factor):

    X MIN
    TYPE: CPUS WALL WALL SYS USER TOTCPU
    fork 1 0.552 0.552 0.540 0.012 0.552
    fork 4 0.552 0.548 2.164 0.036 2.200
    fork 16 0.564 0.548 8.812 0.164 8.976
    fork 128 0.580 0.572 72.204 1.208 73.412
    fork 256 1.300 0.660 310.400 2.160 312.560
    fork 512 3.512 0.696 1526.836 4.816 1531.652
    fork 1020 20.024 0.700 17243.176 6.688 17249.863

    So a threshold of 32 is fine up to 128 processors. At 256 processors contention
    becomes a factor.

    Overstepping the counter (earlier patch) improves the numbers a bit:

    fork 4 0.552 0.548 2.164 0.040 2.204
    fork 16 0.552 0.548 8.640 0.148 8.788
    fork 128 0.556 0.548 69.676 0.956 70.632
    fork 256 0.876 0.636 212.468 2.108 214.576
    fork 512 2.276 0.672 997.324 4.260 1001.584
    fork 1020 13.564 0.680 11586.436 6.088 11592.523

    Still contention at 512 and 1020. Contention at 1020 is down by a third.
    256 still has a slight bit of contention.

    After this patch the counter threshold will be set to 125 which reduces
    contention significantly:

    fork 128 0.560 0.548 69.776 0.932 70.708
    fork 256 0.636 0.556 143.460 2.036 145.496
    fork 512 0.640 0.548 284.244 4.236 288.480
    fork 1020 1.500 0.588 1326.152 8.892 1335.044

    [akpm@osdl.org: !SMP build fix]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter