07 Feb, 2008

19 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
    x86: fix deadlock, make pgd_lock irq-safe
    virtio: fix trivial build bug
    x86: fix mttr trimming
    x86: delay CPA self-test and repeat it
    x86: fix 64-bit sections
    generic: add __FINITDATA
    x86: remove suprious ifdefs from pageattr.c
    x86: mark the .rodata section also NX
    x86: fix iret exception recovery on 64-bit
    cpuidle: dubious one-bit signed bitfield in cpuidle.h
    x86: fix sparse warnings in powernow-k8.c
    x86: fix sparse error in traps_32.c
    x86: trivial sparse/checkpatch in quirks.c
    x86 ptrace: disallow null cs/ss
    MAINTAINERS: RDC R-321x SoC maintainer
    brk randomization: introduce CONFIG_COMPAT_BRK
    brk: check the lower bound properly
    x86: remove X2 workaround
    x86: make spurious fault handler aware of large mappings
    x86: make traps on entry code be debuggable in user space, 64-bit

    Linus Torvalds
     
  • lockdep just caught this one:

    =================================
    [ INFO: inconsistent lock state ]
    2.6.24 #38
    ---------------------------------
    inconsistent {in-softirq-W} -> {softirq-on-W} usage.
    swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
    (pgd_lock){-+..}, at: [] mm_init+0x1da/0x250
    {in-softirq-W} state was registered at:
    [] 0xffffffffffffffff
    irq event stamp: 394559
    hardirqs last enabled at (394559): [] get_page_from_freelist+0x30a/0x4c0
    hardirqs last disabled at (394558): [] get_page_from_freelist+0x125/0x4c0
    softirqs last enabled at (393952): [] __do_softirq+0xce/0xe0
    softirqs last disabled at (393945): [] call_softirq+0x1c/0x30

    other info that might help us debug this:
    no locks held by swapper/1.

    stack backtrace:
    Pid: 1, comm: swapper Not tainted 2.6.24 #38

    Call Trace:
    [] print_usage_bug+0x18b/0x190
    [] mark_lock+0x53d/0x560
    [] __lock_acquire+0x3ca/0xed0
    [] lock_acquire+0xa8/0xe0
    [] ? mm_init+0x1da/0x250
    [] _spin_lock+0x30/0x70
    [] mm_init+0x1da/0x250
    [] mm_alloc+0x39/0x50
    [] bprm_mm_init+0x2a/0x1a0
    [] do_execve+0x7b/0x220
    [] sys_execve+0x46/0x70
    [] kernel_execve+0x64/0xd0
    [] ? _stext+0x1e/0x20
    [] init_post+0x9a/0xf0
    [] ? trace_hardirqs_on_thunk+0x35/0x3a
    [] ? trace_hardirqs_on+0xba/0xd0
    [] ? child_rip+0xa/0x12
    [] ? restore_args+0x0/0x44
    [] ? child_rip+0x0/0x12

    turns out that pgd_lock has been used on 64-bit x86 in an irq-unsafe
    way for almost two years, since commit 8c914cb704a11460e.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • Pavel Emelyanov reported that his networking card did not work
    and bisected it down to:

    "
    The commit

    093af8d7f0ba3c6be1485973508584ef081e9f93
    x86_32: trim memory by updating e820

    broke my e1000 card: on loading driver says that

    e1000: probe of 0000:04:03.0 failed with error -5

    and the interface doesn't appear.
    "

    on a 32-bit kernel, base will overflow when try to do PAGE_SHIFT,
    and highest_addr will always less 4G.

    So use pfn instead of address to avoid the overflow when more than
    4g RAM is installed on a 32-bit kernel.

    Many thanks to Pavel Emelyanov for reporting and testing it.

    Bisected-by: Pavel Emelyanov
    Signed-off-by: Yinghai Lu
    Tested-by: Pavel Emelyanov
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     
  • delay the CPA self-test so that any impact (corruption) of
    user-space pagetables can be triggered. Repeat the test
    every 30 seconds.

    this would have prevented the bug fixed by 8cb2a7c1e95e472b5,
    at its source.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • fix 64-bit section warnings.

    Signed-off-by: Ingo Molnar

    Sam Ravnborg
     
  • The .rodata section really should just be read only; the config option
    is there to make breaking up the 2Mb page an option (so people whos machines
    give more performance for the 2Mb case can opt to do so).
    But when the page gets split anyway, this is no longer an issue, so
    clean up the code and remove the ifdefs

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     
  • The .rodata section shouldn't just be read-only,
    but also non-executable. This is free since we've broken
    up the 2MB page already anyway.

    also update test_nx to check for this.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     
  • This change broke recovery of exceptions in iret:

    commit 72fe4858544292ad64600765cb78bc02298c6b1c
    Author: Glauber de Oliveira Costa

    x86: replace privileged instructions with paravirt macros

    The ENTRY(native_iret) macro adds alignment padding before the iretq
    instruction, so "iret_label" no longer points exactly at the instruction.
    It was sloppy to leave the old "iret_label" label behind when replacing
    its nearby use. Removing it would have revealed the other use of the
    label later in the file, and upon noticing that use, anyone exercising
    the minimum of attention to detail expected of anyone touching this
    subtle code would realize it needed to change as well.

    Signed-off-by: Roland McGrath
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:7: warning: symbol 'hi' shadows an earlier one
    arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:6: originally declared here
    arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:15: warning: symbol 'lo' shadows an earlier one
    arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:14: originally declared here

    Signed-off-by: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • This was being used to ensure the proper alignment of the FXSAVE/FXRSTOR data.
    This would create a sparse error in the _correct_ cases, hiding further
    warnings. Use BUILD_BUG_ON instead.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • arch/x86/kernel/quirks.c:384:3: warning: returning void-valued expression
    arch/x86/kernel/quirks.c:387:3: warning: returning void-valued expression
    arch/x86/kernel/quirks.c:390:3: warning: returning void-valued expression
    arch/x86/kernel/quirks.c:393:3: warning: returning void-valued expression

    Signed-off-by: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • In my revamp of the x86 ptrace code for setting register values,
    I accidentally omitted a check that was there in the old code.
    Allowing %cs to be 0 causes a bad crash in recovery from iret failure.
    This patch fixes that regression against 2.6.24, and adds a comment
    that should help prevent this subtlety from being overlooked again.

    Signed-off-by: Roland McGrath
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • With the spurious handler fix, the X2 does not lock up anymore.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • In very rare cases, on certain CPUs, we could end up in the spurious
    fault handler and ignore a large pud/pmd mapping. The resulting pte
    pointer points into the mapped physical space and dereferencing it
    will fault recursively.

    Make the code aware of large mappings and do the permission check
    on the pmd/pud entry, when a large pud/pmd mapping is detected.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Unify the x86-64 behavior for 32-bit processes that set
    bogus %cs/%ss values (the only ones that can fault in iret)
    match what the native i386 behavior is. (do not kill the task
    via do_exit but generate a SIGSEGV signal)

    [ tglx@linutronix.de: build fix ]

    Signed-off-by: Roland McGrath
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • That patch adds the RTC emulation of the HPET timer to the new RTC_DRV_CMOS.
    The old drivers/char/rtc.ko driver had that functionality and it's important
    on new systems.

    [akpm@linux-foundation.org: unbreak alpha build]
    Signed-off-by: Bernhard Walle
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: john stultz
    Cc: Robert Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Walle
     
  • Fix the following section mismatch with CONFIG_HOTPLUG=n,
    CONFIG_HOTPLUG_CPU=y:

    WARNING: vmlinux.o(.text+0x399a6): Section mismatch: reference to .init.text.5:idle_regs (between 'fork_idle' and 'get_task_mm')

    Signed-off-by: Adrian Bunk
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • calibrate_delay() must be __cpuinit, not __{dev,}init.

    I've verified that this is correct for all users.

    While doing the latter, I also did the following cleanups:
    - remove pointless additional prototypes in C files
    - ensure all users #include

    This fixes the following section mismatches with CONFIG_HOTPLUG=n,
    CONFIG_HOTPLUG_CPU=y:

    WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
    WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')

    Signed-off-by: Adrian Bunk
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: "David S. Miller"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Christian Zankel
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • - All implementations can be __devinit

    - The function prototypes were in asm/timex.h but they all must be the same,
    so create a single declaration in linux/timex.h.

    - uninline the sparc64 version to match the other architectures

    - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.

    [ezk@cs.sunysb.edu: fix build]
    Cc: "David S. Miller"
    Cc: Haavard Skinnemoen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

06 Feb, 2008

9 commits

  • When change_page_attr splits a large page on x86_32 (without PAE), it is
    currently corrupting every process's page directory: fix that by removing
    the thinko which passes down a physical instead of a virtual address.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • * 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
    agp: remove flush_agp_mappings calls from new flush handling code
    intel-agp: introduce IS_I915 and do some cleanups..
    [intel_agp] fix name for G35 chipset
    intel-agp: fixup resource handling in flush code.
    intel-agp: add new chipset ID
    agp: remove unnecessary pci_dev_put
    agp: remove uid comparison as security check
    fix AGP warning
    agp/intel: Add chipset flushing support for i8xx chipsets.
    intel-agp: add chipset flushing support
    agp: add chipset flushing support to AGP interface

    Linus Torvalds
     
  • (with Martin Schwidefsky )

    The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as
    first argument. The free functions do not get the mm_struct argument. This
    is 1) asymmetrical and 2) to do mm related page table allocations the mm
    argument is needed on the free function as well.

    [kamalesh@linux.vnet.ibm.com: i386 fix]
    [akpm@linux-foundation.org: coding-syle fixes]
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Martin Schwidefsky
    Cc:
    Signed-off-by: Kamalesh Babulal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • This kills unused __clear_bit_string and find_next_zero_string (they
    were used by only gart and calgary IOMMUs).

    Signed-off-by: FUJITA Tomonori
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Jens Axboe
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • This patch converts gart IOMMU to use the IOMMU helper functions. The
    IOMMU doesn't allocate a memory area spanning LLD's segment boundary
    anymore.

    Signed-off-by: FUJITA Tomonori
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Jens Axboe
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • This patch converts calgary IOMMU to use the IOMMU helper
    functions. The IOMMU doesn't allocate a memory area spanning LLD's
    segment boundary anymore.

    Signed-off-by: FUJITA Tomonori
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Jens Axboe
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • This patch makes pci-gart iommu respect segment size limits when
    merging sg lists.

    Signed-off-by: FUJITA Tomonori
    Cc: Jeff Garzik
    Cc: James Bottomley
    Acked-by: Jens Axboe
    Cc: Dave Airlie
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • Wires up the new timerfd API to the x86 family.

    Signed-off-by: Davide Libenzi
    Cc: Michael Kerrisk
    Cc: Thomas Gleixner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • arch/x86/kvm/x86.c: In function 'emulator_cmpxchg_emulated':
    arch/x86/kvm/x86.c:1746: warning: passing argument 2 of 'vcpu->arch.mmu.gva_to_gpa' makes integer from pointer without a cast
    arch/x86/kvm/x86.c:1746: warning: 'addr' is used uninitialized in this function

    Is true. Local variable `addr' shadows incoming arg `addr'. Avi is on
    vacation for a while, so...

    Cc: Avi Kivity
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

05 Feb, 2008

3 commits

  • This adds support for flushing the chipsets on the 915, 945, 965 and G33
    families of Intel chips.

    The BIOS doesn't seem to always allocate the BAR on the 965 chipsets
    so I have to use pci resource code to create a resource

    It adds an export for pcibios_align_resource.

    Dave Airlie
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (78 commits)
    x86: fix RTC lockdep warning: potential hardirq recursion
    x86: cpa, micro-optimization
    x86: cpa, clean up code flow
    x86: cpa, eliminate CPA_ enum
    x86: cpa, cleanups
    x86: implement gbpages support in change_page_attr()
    x86: support gbpages in pagetable dump
    x86: add gbpages support to lookup_address
    x86: add pgtable accessor functions for gbpages
    x86: add PUD_PAGE_SIZE
    x86: add feature macros for the gbpages cpuid bit
    x86: switch direct mapping setup over to set_pte
    x86: fix page-present check in cpa_flush_range
    x86: remove cpa warning
    x86: remove now unused clear_kernel_mapping
    x86: switch pci-gart over to using set_memory_np() instead of clear_kernel_mapping()
    x86: cpa selftest, skip non present entries
    x86: CPA fix pagetable split
    x86: rename LARGE_PAGE_SIZE to PMD_PAGE_SIZE
    x86: cpa, fix lookup_address
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (25 commits)
    virtio: balloon driver
    virtio: Use PCI revision field to indicate virtio PCI ABI version
    virtio: PCI device
    virtio_blk: implement naming for vda-vdz,vdaa-vdzz,vdaaa-vdzzz
    virtio_blk: Dont waste major numbers
    virtio_blk: provide getgeo
    virtio_net: parametrize the napi_weight for virtio receive queue.
    virtio: free transmit skbs when notified, not on next xmit.
    virtio: flush buffers on open
    virtnet: remove double ether_setup
    virtio: Allow virtio to be modular and used by modules
    virtio: Use the sg_phys convenience function.
    virtio: Put the virtio under the virtualization menu
    virtio: handle interrupts after callbacks turned off
    virtio: reset function
    virtio: populate network rings in the probe routine, not open
    virtio: Tweak virtio_net defines
    virtio: Net header needs hdr_len
    virtio: remove unused id field from struct virtio_blk_outhdr
    virtio: clarify NO_NOTIFY flag usage
    ...

    Linus Torvalds
     

04 Feb, 2008

9 commits