18 May, 2008

3 commits

  • The previous revert of 0c07ee38c9d4eb081758f5ad14bbffa7197e1aec left
    out the mwait disable condition for AMD family 10H/11H CPUs.

    Andreas Herrman said:

    It depends on the CPU. For AMD CPUs that support MWAIT this is wrong.
    Family 0x10 and 0x11 CPUs will enter C1 on HLT. Powersavings then
    depend on a clock divisor and current Pstate of the core.

    If all cores of a processor are in halt state (C1) the processor can
    enter the C1E (C1 enhanced) state. If mwait is used this will never
    happen.

    Thus HLT saves more power than MWAIT here.

    It might be best to switch off the mwait flag for these AMD CPU
    families like it was introduced with commit
    f039b754714a422959027cb18bb33760eb8153f0 (x86: Don't use MWAIT on AMD
    Family 10)

    Re-add the AMD families 10H/11H check and disable the mwait usage for
    those.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • pat_disable() is __init, which means it goes away after booting is complete.
    Unfortunately it is used by the hotplug code if the machine is not
    pat-capable, causing a crash.

    Fix by marking pat_disable() as __cpuinit.

    Signed-off-by: Avi Kivity
    Signed-off-by: Ingo Molnar

    Avi Kivity
     
  • Vegard Nossum reports:

    | powertop shows between 200-400 wakeups/second with the description
    | ": Rescheduling interrupts" when all processors have load (e.g.
    | I need to run two busy-loops on my 2-CPU system for this to show up).
    |
    | The bisect resulted in this commit:
    |
    | commit 0c07ee38c9d4eb081758f5ad14bbffa7197e1aec
    | Date: Wed Jan 30 13:33:16 2008 +0100
    |
    | x86: use the correct cpuid method to detect MWAIT support for C states

    remove the functional effects of this patch and make mwait unconditional.

    A future patch will turn off mwait on specific CPUs where that causes
    power to be wasted.

    Bisected-by: Vegard Nossum
    Tested-by: Vegard Nossum
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

14 May, 2008

8 commits

  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: user_regset_view table fix for ia32 on 64-bit
    x86: arch/x86/mm/pat.c - fix warning
    x86: fix csum_partial() export
    x86: early_init_centaur(): use set_cpu_cap()
    x86: fix app crashes after SMP resume
    x86: wakeup.lds.S - section ordering fix
    x86: [VOYAGER] fix duplicate phys_cpu_present_map symbol
    x86/pci: fix broken ISA DMA

    Linus Torvalds
     
  • The user_regset_view table for the 32-bit regsets on the 64-bit build had
    the wrong sizes for the FP regsets. This bug had no user-visible effect
    (just on kernel modules using the user_regset interfaces and the like).
    But the fix is trivial and risk-free.

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

    Roland McGrath
     
  • fix this warning:

    arch/x86/mm/pat.c: In function `phys_mem_access_prot_allowed':
    arch/x86/mm/pat.c:558: warning: long long unsigned int format, long
    unsigned int arg (arg 6)
    arch/x86/mm/pat.c: In function `map_devmem':
    arch/x86/mm/pat.c:580: warning: long long unsigned int format, long
    unsigned int arg (arg 6)

    Signed-off-by: D Pranith Kumar
    Signed-off-by: Ingo Molnar

    Pranith Kumar
     
  • Fix this symbol export problem:

    Building modules, stage 2.
    MODPOST 193 modules
    ERROR: "csum_partial" [fs/reiserfs/reiserfs.ko] undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

    This is due to a known weakness of symbol exports: if a symbol's
    only in-core user is an EXPORT_SYMBOL from a lib-y section, the
    symbol is not linked in.

    The solution is to move the export to x8664_ksyms_64.c - but the real
    solution would be to fix kbuild.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • arch/x86/kernel/setup_64.c:954: warning: passing argument 2 of 'set_bit' from incompatible pointer type

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

    Andrew Morton
     
  • After resume on a 2cpu laptop, kernel builds collapse with a sed hang,
    sh or make segfault (often on 20295564), real-time signal to cc1 etc.

    Several hurdles to jump, but a manually-assisted bisect led to -rc1's
    d2bcbad5f3ad38a1c09861bca7e252dde7bb8259 x86: do not zap_low_mappings
    in __smp_prepare_cpus. Though the low mappings were removed at bootup,
    they were left behind (with Global flags helping to keep them in TLB)
    after resume or cpu online, causing the crashes seen.

    Reinstate zap_low_mappings (with local __flush_tlb_all) for each cpu_up
    on x86_32. This used to be serialized by smp_commenced_mask: that's now
    gone, but a low_mappings flag will do. No need for native_smp_cpus_done
    to repeat the zap: let mem_init zap BSP's low mappings just like on UP.

    (In passing, fix error code from native_cpu_up: do_boot_cpu returns a
    variety of diagnostic values, Dprintk what it says but convert to -EIO.
    And save_pg_dir separately before zap_low_mappings: doesn't matter now,
    but zapping twice in succession wiped out resume's swsusp_pg_dir.)

    That worked well on the duo and one quad, but wouldn't boot 3rd or 4th
    cpu on P4 Xeon, oopsing just after unlock_ipi_call_lock. The TLB flush
    IPI now being sent reveals a long-standing bug: the booting cpu has its
    APIC readied in smp_callin at the top of start_secondary, but isn't put
    into the cpu_online_map until just before that unlock_ipi_call_lock.

    So native_smp_call_function_mask to online cpus would send_IPI_allbutself,
    including the cpu just coming up, though it has been excluded from the
    count to wait for: by the time it handles the IPI, the call data on
    native_smp_call_function_mask's stack may well have been overwritten.

    So fall back to send_IPI_mask while cpu_online_map does not match
    cpu_callout_map: perhaps there's a better APICological fix to be
    made at the start_secondary end, but I wouldn't know that.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Ingo Molnar

    Hugh Dickins
     
  • Some versions of X used the mprotect workaround to change caching type from UC
    to WB, so that it can then use mtrr to program WC for that region [1]. Change
    the mmap of pci space through /sys or /proc interfaces from UC to UC_MINUS.
    With this change, X will not need to use mprotect workaround to get WC type
    since the MTRR mapping type will be honored.

    The bug in mprotect that clobbers PAT bits is fixed in a follow on patch. So,
    this X workaround will stop working as well.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Suresh Siddha
    Signed-off-by: Ingo Molnar
    Signed-off-by: Jesse Barnes

    Venki Pallipadi
     
  • Rene Herman reported:

    > commit 8779f2fc3b84ebb6c5181fb13d702e9944c16069
    >
    > "x86: don't try to allocate from DMA zone at first"
    >
    > breaks all of ISA DMA. Or all of ALSA ISA DMA at least. All
    > ISA soundcards are silent following that commit -- no error
    > messages, everything appears fine, just silence.

    That patch is buggy. We had an implicit assumption that
    dev = NULL for ISA devices that require 24bit DMA.

    The recent work on x86 dma_alloc_coherent() breaks the ISA DMA buffer
    allocation, which is represented by "dev = NULL" and requires 24bit
    DMA implicitly.

    Bisected-by: Rene Herman
    Signed-off-by: Takashi Iwai
    Signed-off-by: Ingo Molnar
    Signed-off-by: Jesse Barnes

    Takashi Iwai
     

13 May, 2008

3 commits

  • To allow linker to catch sections overlapping we have to declare
    them in appropriate order.

    Signed-off-by: Cyrill Gorcunov
    Cc: Sam Ravnborg
    Acked-by: Pavel Machek
    Signed-off-by: Thomas Gleixner

    Cyrill Gorcunov
     
  • The phys_cpu_present_map is an expected symbol in the SMP harness.
    Unfortunately, x86 recently moved this and a few others to
    kernel/setup.c where it doesn't quite work because voyager has to
    define its own. Use CONFIG_X86_LOCAL_APIC to isolate these
    definitions and fix up another area in setup.c where CONFIG_X86_SMP
    should be used instead of CONFIG_SMP.

    Signed-off-by: James Bottomley
    Cc: WANG Cong
    Cc: toralf.foerster@gmx.de
    Cc: Mike Travis
    Cc: Alexey Starikovskiy
    Signed-off-by: Thomas Gleixner

    James Bottomley
     
  • Rene Herman reported:

    > commit 8779f2fc3b84ebb6c5181fb13d702e9944c16069
    >
    > "x86: don't try to allocate from DMA zone at first"
    >
    > breaks all of ISA DMA. Or all of ALSA ISA DMA at least. All
    > ISA soundcards are silent following that commit -- no error
    > messages, everything appears fine, just silence.

    That patch is buggy. We had an implicit assumption that
    dev = NULL for ISA devices that require 24bit DMA.

    The recent work on x86 dma_alloc_coherent() breaks the ISA DMA buffer
    allocation, which is represented by "dev = NULL" and requires 24bit
    DMA implicitly.

    Bisected-by: Rene Herman
    Signed-off-by: Takashi Iwai
    Tested-by: Rene Herman
    Signed-off-by: Ingo Molnar

    Takashi Iwai
     

11 May, 2008

6 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
    x86: rdc: leds build/config fix
    x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
    x86: revert commit 709f744 ("x86: bitops asm constraint fixes")
    x86: restrict keyboard io ports reservation to make ipmi driver work
    x86: fix fpu restore from sig return
    x86: remove spew print out about bus to node mapping
    x86: revert printk format warning change which is for linux-next
    x86: cleanup PAT cpu validation
    x86: geode: define geode_has_vsa2() even if CONFIG_MGEODE_LX is not set
    x86: GEODE: cache results from geode_has_vsa2() and uninline
    x86: revert geode config dependency

    Linus Torvalds
     
  • select NEW_LEDS for now until the Kconfig dependencies have been
    fixed.

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

    Ingo Molnar
     
  • On some of our (single board computer) boards (x86) we are using an
    IPMI controller that uses I/O ports 0x62 and 0x66 for a KCS (keyboard
    controller style) IPMI system interface.

    Trying to load the openipmi driver fails, because the ports
    (0x62/0x66) are reserved for keyboard. keyboard reserves the full
    range 0x60-0x6F while it doesn't need to.

    Reserve only ports 0x60 and 0x64 for the legacy PS/2 i8042 keyboad
    controller instead of 0x60-0x6F to allow the openipmi driver to work.

    [ tglx: added 64bit fixup ]

    Signed-off-by: Thomas Gleixner
    Acked-by: H. Peter Anvin
    Signed-off-by: Ingo Molnar

    Helge Wagner
     
  • If the task never used fpu, initialize the fpu before restoring the FP
    state from the signal handler context. This will allocate the fpu
    state, if the task never needed it before.

    Reported-and-bisected-by: Eric Sesterhenn
    Signed-off-by: Suresh Siddha
    Tested-by: Eric Sesterhenn
    Cc: Frederik Deweerdt
    Signed-off-by: Thomas Gleixner

    Suresh Siddha
     
  • Jeff Garzik pointed out that this printout is not needed.

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

    Yinghai Lu
     
  • commit 62179849b40aded9e727cca5006627a1c4d6446e
    x86: fix setup printk format warning

    is for linux-next and not for .26

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

09 May, 2008

2 commits


08 May, 2008

3 commits

  • Move the scattered checks for PAT support to a single function. Its
    moved to addon_cpuid_features.c as this file is shared between 32 and
    64 bit.

    Remove the manipulation of the PAT feature bit and just disable PAT in
    the PAT layer, based on the PAT bit provided by the CPU and the
    current CPU version/model white list.

    Change the boot CPU check so it works on Voyager somewhere in the
    future as well :) Also panic, when a secondary has PAT disabled but
    the primary one has alrady switched to PAT. We have no way to undo
    that.

    The white list is kept for now to ensure that we can rely on known to
    work CPU types and concentrate on the software induced problems
    instead of fighthing CPU erratas and subtle wreckage caused by not yet
    verified CPUs. Once the PAT code has stabilized enough, we can remove
    the white list and open the can of worms.

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

    Thomas Gleixner
     
  • This moves geode_has_vsa2 into a .c file, caches the result we get from
    the VSA virtual registers, and causes the function to no longer be inline.

    [akpm@linux-foundation.org: cleanup]

    Signed-off-by: Andres Salomon
    Cc: Jordan Crouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Andres Salomon
     
  • commit e26a28d190304d910ee49b81cbfe6d9241f56e86
    x86: olpc build fix

    was a fix to a patch that was withdrawn/delayed and then erroneously
    commited to x86.git. Revert it.

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

    Thomas Gleixner
     

07 May, 2008

2 commits

  • fix pcspkr dependancies: make the pcspkr platform
    drivers to depend on a platform device, and
    not the other way around.

    Signed-off-by: Stas Sergeev
    Acked-by: Thomas Gleixner
    Acked-by: Dmitry Torokhov
    CC: Vojtech Pavlik
    CC: Michael Opdenacker
    [fixed for 2.6.26-rc1 by tiwai]
    Signed-off-by: Takashi Iwai

    Stas Sergeev
     
  • Fix warning from pmd_bad() at bootup on a HIGHMEM64G HIGHPTE x86_32.

    That came from 9fc34113f6880b215cbea4e7017fc818700384c2 x86: debug pmd_bad();
    but we understand now that the typecasting was wrong for PAE in the previous
    version: pagetable pages above 4GB looked bad and stopped Arjan from booting.

    And revert that cded932b75ab0a5f9181ee3da34a0a488d1a14fd x86: fix pmd_bad
    and pud_bad to support huge pages. It was the wrong way round: we shouldn't
    weaken every pmd_bad and pud_bad check to let huge pages slip through - in
    part they check that we _don't_ have a huge page where it's not expected.

    Put the x86 pmd_bad() and pud_bad() definitions back to what they have long
    been: they can be improved (x86_32 should use PTE_MASK, to stop PAE thinking
    junk in the upper word is good; and x86_64 should follow x86_32's stricter
    comparison, to stop thinking any subset of required bits is good); but that
    should be a later patch.

    Fix Hans' good observation that follow_page() will never find pmd_huge()
    because that would have already failed the pmd_bad test: test pmd_huge in
    between the pmd_none and pmd_bad tests. Tighten x86's pmd_huge() check?
    No, once it's a hugepage entry, it can get quite far from a good pmd: for
    example, PROT_NONE leaves it with only ACCESSED of the KERN_PGTABLE bits.

    However... though follow_page() contains this and another test for huge
    pages, so it's nice to keep it working on them, where does it actually get
    called on a huge page? get_user_pages() checks is_vm_hugetlb_page(vma) to
    to call alternative hugetlb processing, as does unmap_vmas() and others.

    Signed-off-by: Hugh Dickins
    Earlier-version-tested-by: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Jeff Chua
    Cc: Hans Rosenfeld
    Cc: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

06 May, 2008

5 commits

  • …linux-2.6-sched-fixes

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-fixes:
    sched: default to n for GROUP_SCHED and FAIR_GROUP_SCHED
    sched: add optional support for CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
    sched, x86: add HAVE_UNSTABLE_SCHED_CLOCK
    sched: fix cpu clock
    sched: fair-group: fix a Div0 error of the fair group scheduler
    sched: fix missing locking in sched_domains code
    sched: make clock sync tunable by architecture code
    sched: fix debugging
    sched: fix sched_info_switch not being called according to documentation
    sched: fix hrtick_start_fair and CPU-Hotplug
    sched: fix SCHED_FAIR wake-idle logic error
    sched: fix RT task-wakeup logic
    sched: add statics, don't return void expressions
    sched: add debug checks to idle functions
    sched: remove old sched doc
    sched: make rt_sched_class, idle_sched_class static
    sched: optimize calc_delta_mine()
    sched: fix normalized sleeper

    Linus Torvalds
     
  • add the HAVE_UNSTABLE_SCHED_CLOCK, for architectures to select.

    the next change utilizes it.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    x86 PCI: call dmi_check_pciprobe()
    x86/pci: add pci=skip_isa_align command lines.
    x86/pci: remove flag in pci_cfg_space_size_ext
    x86: fix section mismatch in pci_scan_bus

    Linus Torvalds
     
  • this change:

    | commit 08f1c192c3c32797068bfe97738babb3295bbf42
    | Author: Muli Ben-Yehuda
    | Date: Sun Jul 22 00:23:39 2007 +0300
    |
    | x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata
    |
    | This patch introduces struct pci_sysdata to x86 and x86-64, and
    | converts the existing two users (NUMA, Calgary) to use it.
    |
    | This lays the groundwork for having other users of sysdata, such as
    | the PCI domains work.
    |
    | The Calgary bits are tested, the NUMA bits just look ok.

    replaces pcibios_scan_root with pci_scan_bus_parented...

    but in pcibios_scan_root we have a DMI check:

    dmi_check_system(pciprobe_dmi_table);

    when when have several peer root buses this could be called multiple
    times (which is bad), so move that call to pci_access_init().

    Signed-off-by: Yinghai Lu
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Jesse Barnes

    Yinghai Lu
     
  • so we don't align the io port start address for pci cards.

    also move out dmi check out acpi.c, because it has nothing to do with acpi.
    it could spare some calling when we have several peer root buses.

    Signed-off-by: Yinghai Lu
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Jesse Barnes

    Yinghai Lu
     

05 May, 2008

8 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes:
    x86: fix setup printk format warning
    x86: olpc build fix
    x86: video/fbdev.c: add MODULE_LICENSE
    x86: fix up bootparam.h for userspace inclusion
    x86: relocs ELF handling - use SELFMAG instead of numeric constant
    x86: vdso ELF handling - use SELFMAG instead of numeric constant
    x86: remove dell reboot dmi quirk board name match
    x86: es7000 build fix
    x86: make additional_cpus static
    x86: make start_secondary() static
    kbuild, suspend, x86: fix rebuild of wakeup.bin
    uml: fix gcc problem
    x86: undo visws/numaq build changes

    Linus Torvalds
     
  • Fix x86 setup printk format warming:

    next-20080430/arch/x86/kernel/setup.c:172: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'ssize_t'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Cc: mingo@elte.hu
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Randy Dunlap
     
  • CONFIG_OLPC needs to depend on MGEODE_LX

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

    Thomas Gleixner
     
  • Add the missing MODULE_LICENSE("GPL").

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Adrian Bunk
     
  • Signed-off-by: Cyrill Gorcunov
    Cc: akpm@linux-foundation.org
    Cc: hpa@zytor.com
    Cc: mingo@elte.hu
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Cyrill Gorcunov
     
  • Signed-off-by: Cyrill Gorcunov
    Cc: akpm@linux-foundation.org
    Cc: hpa@zytor.com
    Cc: mingo@elte.hu
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Cyrill Gorcunov
     
  • http://bugzilla.kernel.org/show_bug.cgi?id=10547

    Newer Dell OptiPlex 745s hang before rebooting after 'sudo reboot'.

    A patch for some versions of the OptiPlex was proposed here --
    http://lkml.org/lkml/2007/6/5/59 -- and is included in 2.6.23 and
    later kernels, according to
    http://lxr.linux.no/linux+v2.6.23/arch/i386/kernel/reboot.c . However,
    the DMI_BOARD_NAME ("0WF810") is too restrictive. Newer OptiPlex
    machines have a DMI_BOARD_NAME of "0RF703". I therefore suggest
    adding another clause to reboot.c, similar to the one in the original
    patch, but matching a DMI_BOARD_NAME of "0RF703".

    On further inspection, it seems that there are other DMI_BOARD_NAMEs
    for this same machine. They seem to change from time to time, which
    means that the current code is fragile. Moreover, using bios reboot
    should not break non-SFF OptiPlex 745s, and so a reasonable fix is to
    simply drop the match on DMI_BOARD_NAME.

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

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

    Ingo Molnar