01 Aug, 2007

10 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
    [x86 setup] EDD: Fix the computation of the MBR sector buffer
    [x86 setup] Newline after setup signature failure message
    x86 boot code comments typos

    Linus Torvalds
     
  • C files should include the header files that prototype their functions.

    Eliminates a sparse warning:
    warning: symbol 'check_bugs' was not declared. Should it be static?

    Signed-off-by: Josh Triplett
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • Signed-off-by: Michael Tokarev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Tokarev
     
  • On make install I get the this error:

    ...

    sh /work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh
    2.6.22-g4eb6bf6b arch/i386/boot/bzImage System.map "/boot"
    /work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh: line 54:
    /etc/lilo/install: No such file or directory
    make[1]: *** [install] Error 127

    ...

    I don't use and don't have lilo installed on this system. The attached
    patch fixes the problem for me.

    Signed-off-by: Gabriel Craciunescu
    Acked-by: H. Peter Anvin
    Cc: Sam Ravnborg
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gabriel C
     
  • arch/i386/kernel/apm.c: In function 'apm_init':
    arch/i386/kernel/apm.c:2240: warning: format '%lx' expects type 'long
    unsigned int', but argument 3 has type 'u32'

    apm_info.bios.offset is of type 'u32'.

    Signed-off-by: Eugene Teo
    Acked-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eugene Teo
     
  • Revert 7e92b4fc345f5b6f57585fbe5ffdb0f24d7c9b26. It broke Sébastien Dugué's
    machine and Jeff said (persuasively)

    This seems like it will break decades-long-working stuff, in favor of
    breaking new ground in our favorite area, "trusting the BIOS."

    It's just not worth it for serial ports, IMO. Serial ports are something
    that just shouldn't break at this late stage in the game. My new Intel
    platform boxes don't even have serial ports, so I question the value of
    messing with serial port probing even more... because... just wait a year,
    and your box won't have a serial port either! :)

    I certainly don't object to the use of platform devices (or isa_driver),
    but the probe change seems questionable. That's sorta analagous to
    rewriting the floppy driver probe routine. Sure you could do it... but why
    risk all that damage and go through debugging all over again?

    It seems clear from this report that we cannot, should not, trust BIOS for
    something (a) so simple and (b) that has been working for over a decade.

    Much discussion ensued and we've decided to have another go at all of this.

    Cc: Sébastien Dugué
    Cc: Bjorn Helgaas
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Matthew Garrett
    Cc: Russell King
    Cc: Jeff Garzik
    Acked-by: Alan Cox
    Cc: Michal Piotrowski
    Cc: Sascha Sommer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The local variable "covered" is used without initialization in i386
    acpi-cpufreq driver. The initial value of covered should be 0. The bug
    will cause memory leak when hit. The following patch fixes this bug.

    Signed-off-by: Fenghua Yu
    Cc: Venkatesh Pallipadi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fenghua Yu
     
  • Some BIOSes require that sector buffers not cross 64K
    boundaries. As a result, we compute a dynamic address on the
    setup heap. Unfortunately, this address computation was just
    totally wrong.

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • End the "No setup signature found..." with a newline (the puts
    routine will automatically add a carriage return.)

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • Fix comments typos in new x86 boot code.

    Signed-off-by: Randy Dunlap
    Signed-off-by: H. Peter Anvin

    Randy Dunlap
     

31 Jul, 2007

1 commit


30 Jul, 2007

3 commits

  • Remove fs.h from mm.h. For this,
    1) Uninline vma_wants_writenotify(). It's pretty huge anyway.
    2) Add back fs.h or less bloated headers (err.h) to files that need it.

    As result, on x86_64 allyesconfig, fs.h dependencies cut down from 3929 files
    rebuilt down to 3444 (-12.3%).

    Cross-compile tested without regressions on my two usual configs and (sigh):

    alpha arm-mx1ads mips-bigsur powerpc-ebony
    alpha-allnoconfig arm-neponset mips-capcella powerpc-g5
    alpha-defconfig arm-netwinder mips-cobalt powerpc-holly
    alpha-up arm-netx mips-db1000 powerpc-iseries
    arm arm-ns9xxx mips-db1100 powerpc-linkstation
    arm-assabet arm-omap_h2_1610 mips-db1200 powerpc-lite5200
    arm-at91rm9200dk arm-onearm mips-db1500 powerpc-maple
    arm-at91rm9200ek arm-picotux200 mips-db1550 powerpc-mpc7448_hpc2
    arm-at91sam9260ek arm-pleb mips-ddb5477 powerpc-mpc8272_ads
    arm-at91sam9261ek arm-pnx4008 mips-decstation powerpc-mpc8313_rdb
    arm-at91sam9263ek arm-pxa255-idp mips-e55 powerpc-mpc832x_mds
    arm-at91sam9rlek arm-realview mips-emma2rh powerpc-mpc832x_rdb
    arm-ateb9200 arm-realview-smp mips-excite powerpc-mpc834x_itx
    arm-badge4 arm-rpc mips-fulong powerpc-mpc834x_itxgp
    arm-carmeva arm-s3c2410 mips-ip22 powerpc-mpc834x_mds
    arm-cerfcube arm-shannon mips-ip27 powerpc-mpc836x_mds
    arm-clps7500 arm-shark mips-ip32 powerpc-mpc8540_ads
    arm-collie arm-simpad mips-jazz powerpc-mpc8544_ds
    arm-corgi arm-spitz mips-jmr3927 powerpc-mpc8560_ads
    arm-csb337 arm-trizeps4 mips-malta powerpc-mpc8568mds
    arm-csb637 arm-versatile mips-mipssim powerpc-mpc85xx_cds
    arm-ebsa110 i386 mips-mpc30x powerpc-mpc8641_hpcn
    arm-edb7211 i386-allnoconfig mips-msp71xx powerpc-mpc866_ads
    arm-em_x270 i386-defconfig mips-ocelot powerpc-mpc885_ads
    arm-ep93xx i386-up mips-pb1100 powerpc-pasemi
    arm-footbridge ia64 mips-pb1500 powerpc-pmac32
    arm-fortunet ia64-allnoconfig mips-pb1550 powerpc-ppc64
    arm-h3600 ia64-bigsur mips-pnx8550-jbs powerpc-prpmc2800
    arm-h7201 ia64-defconfig mips-pnx8550-stb810 powerpc-ps3
    arm-h7202 ia64-gensparse mips-qemu powerpc-pseries
    arm-hackkit ia64-sim mips-rbhma4200 powerpc-up
    arm-integrator ia64-sn2 mips-rbhma4500 s390
    arm-iop13xx ia64-tiger mips-rm200 s390-allnoconfig
    arm-iop32x ia64-up mips-sb1250-swarm s390-defconfig
    arm-iop33x ia64-zx1 mips-sead s390-up
    arm-ixp2000 m68k mips-tb0219 sparc
    arm-ixp23xx m68k-amiga mips-tb0226 sparc-allnoconfig
    arm-ixp4xx m68k-apollo mips-tb0287 sparc-defconfig
    arm-jornada720 m68k-atari mips-workpad sparc-up
    arm-kafa m68k-bvme6000 mips-wrppmc sparc64
    arm-kb9202 m68k-hp300 mips-yosemite sparc64-allnoconfig
    arm-ks8695 m68k-mac parisc sparc64-defconfig
    arm-lart m68k-mvme147 parisc-allnoconfig sparc64-up
    arm-lpd270 m68k-mvme16x parisc-defconfig um-x86_64
    arm-lpd7a400 m68k-q40 parisc-up x86_64
    arm-lpd7a404 m68k-sun3 powerpc x86_64-allnoconfig
    arm-lubbock m68k-sun3x powerpc-cell x86_64-defconfig
    arm-lusl7200 mips powerpc-celleb x86_64-up
    arm-mainstone mips-atlas powerpc-chrp32

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Restore the 2.6.22 CONFIG_ACPI_SLEEP build option, but now shadowing the
    new CONFIG_PM_SLEEP option.

    Signed-off-by: Len Brown
    [ Modified to work with the PM config setup changes. ]
    Signed-off-by: Linus Torvalds

    Len Brown
     
  • Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION to avoid
    confusion (among other things, with CONFIG_SUSPEND introduced in the
    next patch).

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

27 Jul, 2007

2 commits

  • This reverts most of commit 19d36ccdc34f5ed444f8a6af0cbfdb6790eb1177.

    The way to DEBUG_RODATA interactions with KPROBES and CPU hotplug is to
    just not mark the text as being write-protected in the first place.
    Both of those facilities depend on rewriting instructions.

    Having "helpful" debug facilities that just cause more problem is not
    being helpful. It just adds complexity and bugs. Not worth it.

    Reported-by: Rafael J. Wysocki
    Cc: Andi Kleen
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This patch fixes the following compile error introduced by
    commit e8666b2718fdb5bf0ea7c3126f7e292bbbf2946b and reported
    by Alexey Dobriyan:

    CC arch/i386/kernel/acpi/cstate.o
    In file included from arch/i386/kernel/acpi/cstate.c:17:
    include/acpi/processor.h:88: error: expected specifier-qualifier-list before 'acpi_integer'

    If you select something you must ensure that the dependencies of what
    you are selecting are fulfilled.

    Signed-off-by: Adrian Bunk
    Cc: Alexey Dobriyan
    Cc: Joshua Hoblitt
    Cc: Dave Jones
    Cc: Michal Piotrowski
    Cc: Len Brown
    Cc: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

26 Jul, 2007

3 commits

  • Make "struct ist_info" valid on both i386 and x86-64, and use the
    structure by name in the setup code. Additionally, "Intel SpeedStep
    IST" is redundant, refer to it as IST consistently.

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • For APM calls, BX contains the device index, which is zero for
    the system BIOS. Disconnect requres BX = 0.

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • Starting with kernel 2.6.23-rc1, the i386 APM driver fails
    on several of my machines with the message:

    apm: BIOS not found

    This happens because of a bug in the i386 boot code rewrite
    from assembler to C. The original assembly code had the
    following code in its APM BIOS presence test (boot/setup.S):

    andw $0x02, %cx # Is 32 bit supported?
    je done_apm_bios # No 32-bit, no (good) APM BIOS

    That is, the code bails out if bit 2 is zero.

    In the new C version, this is coded as (boot/apm.c):

    if (cx & 0x02) /* 32 bits supported? */
    return -1;

    Here we see that the test has been accidentally inverted.

    The fix is to negate the test. I've verified that this
    allows the APM driver to work again on my affected machines.

    Signed-off-by: Mikael Pettersson
    Signed-off-by: H. Peter Anvin

    Mikael Pettersson
     

25 Jul, 2007

1 commit


23 Jul, 2007

12 commits

  • Fix

    WARNING: vmlinux.o(.data+0x99): Section mismatch: reference to .init.text:xen_start_kernel (between 'startup_xen' and 'boot_gdt_descr')

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (77 commits)
    ACPI: Populate /sys/firmware/acpi/tables/
    ACPI: create CONFIG_ACPI_DEBUG_FUNC_TRACE
    ACPI: update ACPI proc I/F removal schedule
    ACPI: update feature-removal-schedule.txt, /sys/firmware/acpi/namespace is gone
    ACPI: export ACPI events via acpi_mc_group multicast group
    ACPI: fix empty macros found by -Wextra
    ACPI: drivers/acpi/pci_link.c: lower printk severity
    sony-laptop: Fix event reading in sony-laptop
    sony-laptop: Add Vaio FE to the special init sequence
    sony-laptop: Make the driver use MSC_SCAN and a setkeycode and getkeycode key table.
    sony-laptop: Invoke _INI for SNC devices that provide it
    sony-laptop: Add support for recent Vaios Fn keys (C series for now)
    sony-laptop: map wireless switch events to KEY_WLAN
    sony-laptop: add new SNC handlers
    ACPI: thinkpad-acpi: add locking to brightness subdriver
    ACPI: thinkpad-acpi: bump up version to 0.15
    ACPI: thinkpad-acpi: make EC-based thermal readings non-experimental
    ACPI: thinkpad-acpi: make sure DSDT TMPx readings don't return +128
    ACPI: thinkpad-acpi: react to Lenovo ThinkPad differences in hot key
    ACPI: thinkpad-acpi: allow use of CMOS NVRAM for brightness control
    ...

    Linus Torvalds
     
  • The performance counters on K7 are only 48 bits wide, so using bit 63 to
    check if the counter overflowed is wrong. Let's use bit 47 instead.

    Signed-off-by: Björn Steinbrink
    Cc: Don Zickus
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Björn Steinbrink
     
  • I got an oops while booting a 32bit kernel on KVM because it doesn't
    implement performance counters used by the NMI watchdog. Handle this
    case.

    Cc: Avi Kivity
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Due to index register access ordering problems, when using macros a line
    like this fails (and does nothing):

    setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);

    With inlined functions this line will work as expected.

    Note about a side effect: Seems on Geode GX1 based systems the
    "suspend on halt power saving feature" was never enabled due to this
    wrong macro expansion. With inlined functions it will be enabled, but
    this will stop the TSC when the CPU runs into a HLT instruction.
    Kernel output something like this:
    Clocksource tsc unstable (delta = -472746897 ns)

    This is the 3rd version of this patch.

    - Adding missed arch/i386/kernel/cpu/mtrr/state.c
    Thanks to Andres Salomon
    - Adding some big fat comments into the new header file
    Suggested by Andi Kleen

    AK: fixed x86-64 compilation

    Signed-off-by: Juergen Beisert
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Juergen Beisert
     
  • kstat_irqs(0) includes the count of interrupt 0 from all cpus, not just
    the current cpu. The updated interrupt 0 on other cpus can stop the
    nmi_watchdog from tripping, so only include the current cpu's int 0.

    Signed-off-by: Keith Owens
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Keith Owens
     
  • This mainly changes the nops for alternative, so not very revolutionary.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Fix

    WARNING: arch/i386/kernel/built-in.o(.text+0xdd0d): Section mismatch: reference to .init.data:cpu_llc_id (between 'set_cpu_sibling_map' and 'initialize_secondary')
    WARNING: arch/i386/kernel/built-in.o(.text+0xdd1b): Section mismatch: reference to .init.data:cpu_llc_id (between 'set_cpu_sibling_map' and 'initialize_secondary')

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • When a machine check or NMI occurs while multiple byte code is patched
    the CPU could theoretically see an inconsistent instruction and crash.
    Prevent this by temporarily disabling MCEs and returning early in the
    NMI handler.

    Based on discussion with Mathieu Desnoyers.

    Cc: Mathieu Desnoyers
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Reenable kprobes and alternative patching when the kernel text is write
    protected by DEBUG_RODATA

    Add a general utility function to change write protected text. The new
    function remaps the code using vmap to write it and takes care of CPU
    synchronization. It also does CLFLUSH to make icache recovery faster.

    There are some limitations on when the function can be used, see the
    comment.

    This is a newer version that also changes the paravirt_ops code.
    text_poke also supports multi byte patching now.

    Contains bug fixes from Zach Amsden and suggestions from Mathieu
    Desnoyers.

    Cc: Jan Beulich
    Cc: Jeremy Fitzhardinge
    Cc: Mathieu Desnoyers
    Cc: Zach Amsden
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • This patch makes the i386 behave the same way that x86_64 does when a
    segfault happens. A line gets printed to the kernel log so that tools
    that need to check for failures can behave more uniformly between
    debug.show_unhandled_signals sysctl variable to 0 (or by doing echo 0 >
    /proc/sys/debug/exception-trace)

    Also, all of the lines being printed are now using printk_ratelimit() to
    deny the ability of DoS from a local user with a program like the
    following:

    main()
    {
    while (1)
    if (!fork()) *(int *)0 = 0;
    }

    This new revision also includes the fix that Andrew did which got rid of
    new sysctl that was added to the system in earlier versions of this.
    Also, 'show-unhandled-signals' sysctl has been renamed back to the old
    'exception-trace' to avoid breakage of people's scripts.

    AK: Enabling by default for i386 will be likely controversal, but let's see what happens
    AK: Really folks, before complaining just fix your segfaults
    AK: I bet this will find a lot of silent issues

    Signed-off-by: Masoud Sharbiani
    Signed-off-by: Andi Kleen
    [ Personally, I've found the complaints useful on x86-64, so I'm all for
    this. That said, I wonder if we could do it more prettily.. -Linus ]
    Signed-off-by: Linus Torvalds

    Masoud Asgharifard Sharbiani
     

22 Jul, 2007

8 commits

  • Conflicts:

    Documentation/feature-removal-schedule.txt

    Len Brown
     
  • Len Brown
     
  • 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.

    Signed-off-by: Jeff Garzik
    Signed-off-by: Muli Ben-Yehuda
    Signed-off-by: Linus Torvalds

    Muli Ben-Yehuda
     
  • Signed-off-by: Robert P. J. Day
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Dead or misnamed CONFIG_BALANCED_IRQ_DEBUG found by Robert P. J. Day.
    It's not a Kconfig variable.

    Since this debug code is ancient, I suggest to get rid of this
    misleading CONFIG_ macro by deleting all of this debug code.

    Signed-off-by: Stefan Richter
    Cc: Ingo Molnar
    Cc: "Robert P. J. Day"
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Stefan Richter
     
  • Insert HPET resources after pci probing has been completed in order to
    avoid resource conflicts with PCI resource reservation. With this change
    the HPET firmware resources will be identified, but it should also not
    cause issues when the HPET address falls on a BAR in a PCI device, and the
    PCI enumeration cannot reserve the resources.

    Signed-off-by: Aaron Durbin
    Cc: john stultz
    Cc: Thomas Gleixner
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Aaron Durbin
     
  • This builds upon the existing geode infrastructure, but adds southbridge
    support, some GPIO functions, and a header file (asm-i386/geode.h) with some
    useful GX/LX detection tests.

    The majority of this code was written by Jordan Crouse.

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

    Andres Salomon
     
  • get_vm_area always returns an area with an adjacent guard page. That guard
    page is included in vm_struct.size. iounmap uses vm_struct.size to
    determine how much address space needs to have change_page_attr applied to
    it, which will BUG if applied to the guard page.

    This patch adds a helper function - get_vm_area_size() in linux/vmalloc.h -
    to return the actual size of a vm area, and uses it to make iounmap do the
    right thing. There are probably other places which should be using
    get_vm_area_size().

    Thanks to Dave Young for debugging the
    problem.

    [ Andi, it wasn't clear to me whether x86_64 needs the same fix. ]

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Dave Young
    Cc: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge