10 Jul, 2007

2 commits

  • track TSC-unstable events and propagate it to the scheduler code.
    Also allow sched_clock() to be used when the TSC is unstable,
    the rq_clock() wrapper creates a reliable clock out of it.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • the SMP load-balancer uses the boot-time migration-cost estimation
    code to attempt to improve the quality of balancing. The reason for
    this code is that the discrete priority queues do not preserve
    the order of scheduling accurately, so the load-balancer skips
    tasks that were running on a CPU 'recently'.

    this code is fundamental fragile: the boot-time migration cost detector
    doesnt really work on systems that had large L3 caches, it caused boot
    delays on large systems and the whole cache-hot concept made the
    balancing code pretty undeterministic as well.

    (and hey, i wrote most of it, so i can say it out loud that it sucks ;-)

    under CFS the same purpose of cache affinity can be achieved without
    any special cache-hot special-case: tasks are sorted in the 'timeline'
    tree and the SMP balancer picks tasks from the left side of the
    tree, thus the most cache-cold task is balanced automatically.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

08 Jul, 2007

1 commit

  • The printk level in this printk is bogus, as the previous printk
    didn't have a terminating \n resulting in ..

    Intel E7520/7320/7525 detected.Disabling irq balancing and affinity

    It also never printed a \n at all in the case where we didn't do
    the quirk.

    Change it to only make noise if it actually does something useful.

    Signed-off-by: Dave Jones
    Signed-off-by: Linus Torvalds

    Dave Jones
     

07 Jul, 2007

5 commits

  • Writing to MSR 0x51400017 forces a hard reset on CS5536-based machines,
    this has the reboot fixup do just that if such a board is detected.

    Acked-by: Jordan Crouse
    Signed-off-by: Andres Salomon
    Cc: Alan Cox
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
    [MIPS] Fix scheduling latency issue on 24K, 34K and 74K cores
    [MIPS] Add macros to encode processor revisions.
    [MIPS] RM7000: Enable ICACHE_REFILLS_WORKAROUND_WAR.
    [MIPS] SMTC: Fix cut'n'paste bug in Kconfig.debug
    [MIPS] Change libgcc-style functions from lib-y to obj-y
    [MIPS] Fix timer/performance interrupt detection
    [MIPS] AP/SP: Avoid triggering the 34K E125 performance issue
    [MIPS] 64-bit TO_PHYS_MASK macro for RM9000 processors

    Linus Torvalds
     
  • o Commit 1833d6bc72893265f22addd79cf52e6987496e0f broke the build if
    compiled with CONFIG_ES7000=y and CONFIG_X86_GENERICARCH=n

    arch/i386/kernel/built-in.o(.init.text+0x4fa9): In function `acpi_parse_madt':
    : undefined reference to `acpi_madt_oem_check'
    arch/i386/kernel/built-in.o(.init.text+0x7406): In function `smp_read_mpc':
    : undefined reference to `mps_oem_check'
    arch/i386/kernel/built-in.o(.init.text+0x8990): In function
    `connect_bsp_APIC':
    : undefined reference to `enable_apic_mode'
    make: *** [.tmp_vmlinux1] Error 1

    o Fix the build issue. Provided the definitions of missing functions.

    o Don't have ES7000 machine. Only compile tested.

    Cc: Len Brown
    Cc: Natalie Protasevich
    Cc: Roland Dreier
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • Processors synchronization in set_mtrr requires the .gate field to be set
    after .count field is properly initialized. Without an explicit barrier,
    the compiler was reordering those memory stores. That was sometimes
    causing a processor (in ipi_handler) to see the .gate change and decrement
    .count before the latter is set by set_mtrr() (which then hangs in a
    infinite loop with irqs disabled).

    Signed-off-by: Loic Prylli
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Loic Prylli
     
  • The commit 635cf99a80f4ebee59d70eb64bb85ce829e4591f introduced a
    regression. Executing a ptrace single step after certain int80
    accesses will infinitely loop and never advance the PC.

    The TIF_SINGLESTEP check should be done on the return from the syscall
    and not before it.

    I loops on each single step on the pop right after the int80 which writes out
    to the console. At that point you can issue as many single steps as you want
    and it will not advance any further.

    The test case is below:

    /* Test whether singlestep through an int80 syscall works.
    */
    #define _GNU_SOURCE
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    static int child, status;
    static struct user_regs_struct regs;

    static void do_child()
    {
    char str[80] = "child: int80 test\n";

    ptrace(PTRACE_TRACEME, 0, 0, 0);
    kill(getpid(), SIGUSR1);
    write(fileno(stdout),str,strlen(str));
    asm ("int $0x80" : : "a" (20)); /* getpid */
    }

    static void do_parent()
    {
    unsigned long eip, expected = 0;
    again:
    waitpid(child, &status, 0);
    if (WIFEXITED(status) || WIFSIGNALED(status))
    return;

    if (WIFSTOPPED(status)) {
    ptrace(PTRACE_GETREGS, child, 0, ®s);
    eip = regs.eip;
    if (expected)
    fprintf(stderr, "child stop @ %08lx, expected %08lx %s\n",
    eip, expected,
    eip == expected ? "" : "
    Cc: Jeremy Fitzhardinge
    Cc:
    Cc: Chuck Ebbert
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Wessel
     

06 Jul, 2007

8 commits


05 Jul, 2007

1 commit

  • AT91SAM9260 stopped booting with the recent changes to MM
    initialisation - it was asking for a non-aligned virtual address
    which caused loops to be non-terminal. Fix this by rounding
    virtual addresses down, but remember to include the offset in
    the length, and round the length up to the following page.

    This means that asking for a mapping of 4K starting at 2K into
    a page maps two pages as one would expect.

    Signed-off-by: Russell King

    Russell King
     

04 Jul, 2007

4 commits

  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • When Andi reverted the HPET resource reservation (in commit
    0f8dc2f06560e2ca126d1670a24126ba08357d38), he didn't remove the now
    unused variables, which just causes gcc to be noisy.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • With this change it works again when the nmi watchdog is disabled.

    Signed-off-by: Andi Kleen
    Cc: Björn Steinbrink
    Cc: Stephane Eranian
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Matthias Lenk reports that the PCI subsystem would move the HPET on
    SB400/SB600-based systems, where the HPET is in BAR1 of the SMbus
    controller.

    The reason? The ACPI layer registered the PCI MMIO range as being busy
    too early, before PCI enumeration had happened, causing the PCI layer to
    decide that it should relocate the resources somewhere else.

    Firmware resources should be marked busy _after_ the PCI enumeration and
    probing has happened, not before.

    Remove the too-early reservation, we'll fix it up to do it properly
    later. In the meantime, this solves the regression.

    Tested-by: Matthias Lenk
    Cc: Aaron Durbin
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

02 Jul, 2007

9 commits

  • The PXA CKEN changes broken syspend/resume on the pxa27x. This patch
    corrects the problem and fixes another couple of bad references.

    Signed-off-by: Richard Purdie
    Signed-off-by: Russell King

    Richard Purdie
     
  • ARM Versatile PCI config reads of one byte width have the lowest two
    bits of the address cleared and result in reading from a wrong place
    in the config space. This change is to use word size accesses like it is done for halfword reads.

    Byte reads are used for retrieving the IRQ number of a PCI device and the problem was not exposed until 2.6.20 because the value read was discarded in drivers/pci/setup-irq.c (recently fixed).

    Signed-off-by: Andrzej Zaborowski
    Acked-by: Paul Brook
    Signed-off-by: Russell King

    Andrzej Zaborowski
     
  • Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu

    Mike Frysinger
     
  • Signed-off-by: Kumar Gala

    Kumar Gala
     
  • Uninline virq_to_hw and export it so modules can use it. The alternative
    would be to export the irq_map array instead, but it's an infrequently
    called function, and keeping the array unexported seems considerably
    cleaner.

    This is needed so that the pasemi_mac driver can be compiled as a module.

    Signed-off-by: Olof Johansson
    Signed-off-by: Paul Mackerras

    Olof Johansson
     
  • The recent change to cell_defconfig to enable cpufreq on Cell exposed
    the fact that the cbe_cpufreq driver currently needs the PMI interface
    code to compile, but Kconfig doesn't make sure that the PMI interface
    code gets built if cbe_cpufreq is enabled.

    In fact cbe_cpufreq can work without PMI, so this ifdefs out the code
    that deals with PMI. This is a minimal solution for 2.6.22; a more
    comprehensive solution will be merged for 2.6.23.

    Signed-off-by: Christian Krafft
    Signed-off-by: Paul Mackerras

    Christian Krafft
     
  • Commit 52ade9b3b97fd3bea42842a056fe0786c28d0555 changed the suspend code
    ordering to execute pm_ops->prepare() after the device model per-device
    .suspend() calls in order to fix some ACPI-related issues. Unfortunately, it
    broke the at91 platform which assumed that pm_ops->prepare() would be called
    before suspending devices.

    at91 used pm_ops->prepare() to get notified of the target system sleep state,
    so that it could use this information while suspending devices. However, with
    the current suspend code ordering pm_ops->prepare() is called too late for
    this purpose. Thus, at91 needs an additional method in 'struct pm_ops' that
    will be used for notifying the platform of the target system sleep state.
    Moreover, in the future such a method will also be needed by ACPI.

    This patch adds the .set_target() method to 'struct pm_ops' and makes the
    suspend code call it, if implemented, before executing the device model
    per-device .suspend() calls. It also modifies the at91 code to use
    pm_ops->set_target() instead of pm_ops->prepare().

    Signed-off-by: Rafael J. Wysocki
    Acked-by: David Brownell
    Cc: Pavel Machek
    Cc: Johannes Berg
    Cc: Len Brown
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Commit 3ebad5905609476a4ff1151a66b21d9794009961 ("[PATCH] x86: Save and
    restore the fixed-range MTRRs of the BSP when suspending") added mtrr
    operations without verifying that the CPU has MTRRs. Crashes transmeta
    CPUs.

    Cc: "H. Peter Anvin"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Commit 9215da33209b861b01c51382254b178a3fe92a30 "fixed" the MTRR range
    check to not allow any MTRR's under the 1MB mark (since that's where the
    fixed MTRR's are active).

    However, that was totally bogus, since it's normal (and almost required)
    to have a large variable MTRR that starts at 0, and covers some large
    percentage of the whole RAM, and then using the fixed MTRR's to override
    that large MTRR to handle the special ISA hole in the 640k-1M region.

    The old check was bogus too (checking that no variable MTRR is used that
    is entirely under the 1MB range), but at least it wasn't actively
    detrimental, because no sane situation would ever trigger such MTRR
    usage in the first place.

    That said, the whole notion of not allowing variable MTRR's in the low
    1MB is just stupid, so rather than revert the commit, this just removes
    the whole sad and unnecessary check entirely.

    Cc: Jan Beulich
    Cc: Andi Kleen
    Cc: Andrew Morton
    Tested-by: Luca Palermo
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

30 Jun, 2007

2 commits

  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Add linux/pagemap.h to asm/tlb.h
    [SPARC64]: Need to set state to IDLE during sun4v IRQ enable.
    [SPARC64]: Fix VIRQ enabling.
    [SPARC64]: Add irqs to mdesc_node.

    Linus Torvalds
     
  • The vdso64 portion of patch 74609f4536f2b8fd6a48381bbbe3cd37da20a527 for
    fixing problems with NULL gettimeofday input mistakenly checks for a
    null tz field twice, when it should be checking for null tz once, and
    null tv once; by way of a r10/r11 typo.

    Any application calling gettimeofday(&tv,NULL) will "fail".

    This corrects that typo, and makes my G5 happy.

    Tested on G5.

    Signed-off-by: Will Schmidt
    Cc: Tony Breeds
    Forwarded-by: Ben Herrenschmidt

    [ Ben says: "I checked the 32 bits part of the change is correct. You
    can probably blame me for originally writing the 2 versions with
    inversed usage of r10 and r11, thus confusing Tony :-)"

    Ben duly blamed. - Linus ]

    Signed-off-by: Linus Torvalds

    Will Schmidt
     

29 Jun, 2007

3 commits

  • Not all the world is an i386. Many architectures need 64-bit arguments to be
    aligned in suitable pairs of registers, and the original
    sys_sync_file_range(int, loff_t, loff_t, int) was therefore wasting an
    argument register for padding after the first integer. Since we don't
    normally have more than 6 arguments for system calls, that left no room for
    the final argument on some architectures.

    Fix this by introducing sys_sync_file_range2(int, int, loff_t, loff_t) which
    all fits nicely. In fact, ARM already had that, but called it
    sys_arm_sync_file_range. Move it to fs/sync.c and rename it, then implement
    the needed compatibility routine. And stop the missing syscall check from
    bitching about the absence of sys_sync_file_range() if we've implemented
    sys_sync_file_range2() instead.

    Tested on PPC32 and with 32-bit and 64-bit userspace on PPC64.

    Signed-off-by: David Woodhouse
    Acked-by: Russell King
    Cc: Arnd Bergmann
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • arch/mips/jazz/setup.c:55:4: error: Initializer entry defined twice

    Signed-off-by: Alexey Dobriyan
    Acked-by: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • main.c::mtrr_add() or mtrr_del() [exported]
    calls main.c::mtrr_add_page() or mtrr_del_page() or mtrr_restore() [resume]
    calls main.c::set_mtrr()
    calls main.c::ipi_handler()
    calls main.c::mtrr_if->set_all() == which can be cyrix_set_all

    WARNING: arch/i386/kernel/built-in.o(.text+0x8657): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
    WARNING: arch/i386/kernel/built-in.o(.text+0x866b): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
    WARNING: arch/i386/kernel/built-in.o(.text+0x867e): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
    WARNING: arch/i386/kernel/built-in.o(.text+0x8684): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
    WARNING: arch/i386/kernel/built-in.o(.text+0x868a): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')

    Signed-off-by: Randy Dunlap
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

28 Jun, 2007

1 commit


27 Jun, 2007

4 commits

  • Force irq migration path during cpu offline, is not using proper locks and
    irq_chip mask/unmask routines. This will result in some races(especially
    the device generating the interrupt can see some inconsistent state,
    resulting in issues like stuck irq,..).

    Appended patch fixes the issue by taking proper lock and encapsulating
    irq_chip set_affinity() with a mask() before and an unmask() after.

    This fixes a MSI irq stuck issue reported by Darrick Wong.

    There are several more general bugs in this area(irq migration in the
    process context). For example,

    1. Possibility of missing edge triggered irq.
    2. Reliable method of migrating level triggered irq in the process context.

    We plan to look and close these in the near future.

    Eric says:
    In addition even with the fix from Suresh there is still at least one
    nasty hardware race in fixup_irqs(). However we exercise that code
    path rarely enough that we are unlikely to hit it in the real world,
    and that race seems to have existed since the code was merged. And a
    fix for that is not coming soon as it is an open investigation area
    if we can fix irq migration to work outside of irq context or if
    we have to rework the requirements imposed by the generic cpu hotplug
    and layer on fixup_irqs(). So this may come up again.

    Signed-off-by: Suresh Siddha
    Cc: Eric W. Biederman
    Reported-and-tested-by: Darrick Wong
    Cc: Andi Kleen
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Siddha, Suresh B
     
  • set the irq_chip name for lapic.

    Signed-off-by: Suresh Siddha
    Signed-off-by: Linus Torvalds

    Suresh Siddha
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 4449/1: more entries in arch/arm/boot/.gitignore
    [ARM] 4452/1: Force the literal pool dump before reloc_end
    [ARM] Update show_regs/oops register format
    [ARM] Add support for pause_on_oops and display preempt/smp options

    Linus Torvalds
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
    [MIPS] Count timer interrupts correctly.
    [MIPS] SMTC and non-SMTC kernel and modules are incompatible
    [MIPS] EMMA2RH: Disable GEN_RTC, it can't possibly work.
    [MIPS] Remove a duplicated local variable in test_and_clear_bit()
    [MIPS] use compat_siginfo in rt_sigframe_n32
    [MIPS] 20K: Handle WAIT related bugs according to errata information
    [MIPS] AP/SP requires shadow registers, auto enable support.
    [MIPS] Fix pb1500 reg B access
    [MIPS] Alchemy: Fix wrong cast
    [MIPS] remove "support for" from system type entry
    [MIPS] add io_map_base to pci_controller on Cobalt
    [MIPS] __ucmpdi2 arguments are unsigned long long.

    Linus Torvalds