]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
18 years ago[PATCH] Don't set calgary iommu as default y
Andi Kleen [Tue, 26 Sep 2006 08:52:42 +0000 (10:52 +0200)]
[PATCH] Don't set calgary iommu as default y

Most systems don't need it.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386/x86-64: New Intel feature flags
Dave Jones [Tue, 26 Sep 2006 08:52:42 +0000 (10:52 +0200)]
[PATCH] i386/x86-64: New Intel feature flags

Add supplemental SSE3 instructions flag, and Direct Cache Access flag.
As described in "Intel Processor idenfication and the CPUID instruction
AP485 Sept 2006"

AK: also added for x86-64

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: Add a cumulative thermal throttle event counter.
Dmitriy Zavin [Tue, 26 Sep 2006 08:52:42 +0000 (10:52 +0200)]
[PATCH] x86: Add a cumulative thermal throttle event counter.

The counter is exported to /sys that keeps track of the
number of thermal events, such that the user knows how bad the
thermal problem might be (since the logging to syslog and mcelog
is rate limited).

AK: Fixed cpu hotplug locking

Signed-off-by: Dmitriy Zavin <dmitriyz@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Make the jiffies compares use the 64bit safe macros.
Dmitriy Zavin [Tue, 26 Sep 2006 08:52:42 +0000 (10:52 +0200)]
[PATCH] i386: Make the jiffies compares use the 64bit safe macros.

Signed-off-by: Dmitriy Zavin <dmitriyz@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: Refactor thermal throttle processing
Dmitriy Zavin [Tue, 26 Sep 2006 08:52:42 +0000 (10:52 +0200)]
[PATCH] x86: Refactor thermal throttle processing

Refactor the event processing (syslog messaging and rate limiting)
into separate file therm_throt.c. This allows consistent reporting
of CPU thermal throttle events.

After ACK'ing the interrupt, if the event is current, the user
(p4.c/mce_intel.c) calls therm_throt_process to log (and rate limit)
the event. If that function returns 1, the user has the option to log
things further (such as to mce_log in x86_64).

AK: minor cleanup

Signed-off-by: Dmitriy Zavin <dmitriyz@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Add 64bit jiffies compares (for use with get_jiffies_64)
Dmitriy Zavin [Tue, 26 Sep 2006 08:52:42 +0000 (10:52 +0200)]
[PATCH] Add 64bit jiffies compares (for use with get_jiffies_64)

The current time_before/time_after macros will fail typechecks
when passed u64 values (as returned by get_jiffies_64()). On 64bit
systems, this will just result in a warning about mismatching types
without explicit casts, but since unsigned long and u64
(unsigned long long) are of same size, it will still work.
On 32bit systems, a long is 32bits, so the value from get_jiffies_64()
will be truncated by the cast and thus lose all the precision gained by
64bit jiffies.

Signed-off-by: Dmitriy Zavin <dmitriyz@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix unwinder warning in traps.c
Andi Kleen [Tue, 26 Sep 2006 08:52:42 +0000 (10:52 +0200)]
[PATCH] Fix unwinder warning in traps.c

Fix

linux/arch/x86_64/kernel/traps.c: In function 'dump_trace':
linux/arch/x86_64/kernel/traps.c:275: warning: cast to pointer from integer of different size

with allnoconfig

Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1

Some buggy systems can machine check when config space accesses
happen for some non existent devices.  i386/x86-64 do some early
device scans that might trigger this. Allow pci=noearly to disable
this. Also when type 1 is disabling also don't do any early
accesses which are always type1.

This moves the pci= configuration parsing to be a early parameter.
I don't think this can break anything because it only changes
a single global that is only used by PCI.

Cc: gregkh@suse.de
Cc: Trammell Hudson <hudson@osresearch.net>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: Move direct PCI scanning functions out of line
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] x86: Move direct PCI scanning functions out of line

Saves about 200 bytes of code space.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386/x86-64: Make all early PCI scans dependent on CONFIG_PCI
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] i386/x86-64: Make all early PCI scans dependent on CONFIG_PCI

This is useful on systems with broken PCI bus. Affects various
scans in x86-64 and i386's early ACPI quirk scan.

Cc: gregkh@suse.de
Cc: len.brown@intel.com
Cc: Trammell Hudson <hudson@osresearch.net>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Don't leak NT bit into next task
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] Don't leak NT bit into next task

SYSENTER can cause a NT to be set which might cause crashes on the IRET
in the next task.

Following similar i386 patch from Linus.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder
Jan Beulich [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder

Current gcc generates calls not jumps to noreturn functions. When that happens the
return address can point to the next function, which confuses the unwinder.

This patch works around it by marking asynchronous exception
frames in contrast normal call frames in the unwind information.  Then teach
the unwinder to decode this.

For normal call frames the unwinder now subtracts one from the address which avoids
this problem.  The standard libgcc unwinder uses the same trick.

It doesn't include adjustment of the printed address (i.e. for the original
example, it'd still be kernel_math_error+0 that gets displayed, but the
unwinder wouldn't get confused anymore.

This only works with binutils 2.6.17+ and some versions of H.J.Lu's 2.6.16
unfortunately because earlier binutils don't support .cfi_signal_frame

[AK: added automatic detection of the new binutils and wrote description]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix some broken white space in ia32_signal.c
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] Fix some broken white space in ia32_signal.c

No functional changes
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Initialize argument registers for 32bit signal handlers.
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] Initialize argument registers for 32bit signal handlers.

In case the user space was compiled with -mregparm=3
Following i386. Pointed out by Albert Cahalan

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove all traces of signal number conversion
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] Remove all traces of signal number conversion

This was old code that was needed for iBCS and x86-64 never supported that.

Pointed out by Albert Cahalan
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Don't synchronize time reading on single core AMD systems
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] Don't synchronize time reading on single core AMD systems

We do some additional CPU synchronization in gettimeofday et.al. to make
sure the time stamps are always monotonic over multiple CPUs. But on
single core systems that is not needed. So don't do it.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove outdated comment in x86-64 mmconfig code
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] Remove outdated comment in x86-64 mmconfig code

Cc: gregkh@suse.de
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Use string instructions for Core2 copy/clear
Andi Kleen [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] Use string instructions for Core2 copy/clear

It is faster than using a unrolled loop for the use cases the kernel
cares about (cached, sizes typically < 4K)

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: - restore i8259A eoi status on resume
Matthew Garrett [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] x86: - restore i8259A eoi status on resume

Got it. i8259A_resume calls init_8259A(0) unconditionally, even if
auto_eoi has been set. Keep track of the current status and restore that
on resume. This fixes it for AMD64 and i386.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Split multi-line printk in oops output.
Dave Jones [Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)]
[PATCH] i386: Split multi-line printk in oops output.

Sometimes, bug reports come in where we've had an oops, and the
only record we have is what the reporter saw on screen shortly
before the system locked up completely.  Unfortunatly, syslog
only prints lines beginning with KERN_EMERG to the console, so
some lines get lost.
An example of this can be seen at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203723

Some of this information isn't vital to diagnosis, but some parts
are useful, such as the tainted flag.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Fix pack_descriptor()
Jeremy Fitzhardinge [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] i386: Fix pack_descriptor()

Fix pack_descriptor:
 1. flags are bits 20-23 in the high word
 2. limit's 4 msb are bits 16-19 in the high word

These haven't mattered so far, because all users have had small limits
and a flags setting of 0.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
===================================================================

18 years ago[PATCH] i386: Add MMCFG resources to i386 too
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] i386: Add MMCFG resources to i386 too

Following earlier x86-64 patch

Cc: gregkh@suse.de
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] MMCONFIG and new Intel motherboards
Aaron Durbin [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] MMCONFIG and new Intel motherboards

On Sat, Sep 09, 2006 at 04:14:29PM +0200, Andi Kleen wrote:
> [patch] Looks reasonable, but probably not for 2.6.18 because this stuff
> is already too fragile and it is probably too risky to do any big changes now
> since not enough testing time is left. Can you please resubmit
> it with proper description and signed-off-by line? I can queue it for .19 then
>
> -Andi

Patch inserts PCI memory mapped config region(s) into the resource map.  This
will allow for the MMCCONFIG regions to be marked as busy in the iomem
address space as well as the regions(s) showing up in /proc/iomem.

Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Insert GART region into resource map
Aaron Durbin [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Insert GART region into resource map

Patch inserts the GART region into the iomem resource map. The GART will then
be visible within /proc/iomem. It will also allow for other users
utilizing the GART to subreserve the region (agp or IOMMU).

Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386/x86-64: Only do MCFG e820 check when type 1 works
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] i386/x86-64: Only do MCFG e820 check when type 1 works

Needs earlier patch to split type 1 probing from use.

This patch should fix the x86 macs where type 1 PCI config space access
doesn't work, but MCFG does. They also don't have a usable e820 table
so the e820 sanity check failed.

Instead assume now that if type 1 doesn't work then MCFG must work
and don't do the e820 check.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386/x86-64: PCI: split probing and initialization of type 1 config space...
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] i386/x86-64: PCI: split probing and initialization of type 1 config space access

First probe if type1/2 accesses work, but then only initialize them at the end.

This is useful for a later patch that needs this information inbetween.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix idle notifiers
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Fix idle notifiers

Previously exit_idle would be called more often than enter_idle

Now instead of using complicated tests just keep track of it
using the per CPU variable as a flip flop.  I moved the idle state into the
PDA to make the access more efficient.

Original bug report and an initial patch from Stephane Eranian,
but redone by AK.

Cc: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove experimental mark of kexec
Eric W. Biederman [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Remove experimental mark of kexec

kexec has been marked experimental for a year now and all
of the serious problems have been worked through.  So it
is time (if not past time) to remove the experimental mark.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Remove experimental mark of kexec
Eric W. Biederman [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] i386: Remove experimental mark of kexec

kexec has been marked experimental for a year now and all
of the serious problems have been worked through.  So it
is time (if not past time) to remove the experimental mark.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Mark per cpu data initialization __initdata again
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Mark per cpu data initialization __initdata again

Before 2.6.16 this was changed to work around code that accessed
CPUs not in the possible map. But that code should be all fixed now,
so mark it __initdata again.
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove unused asm-x86_64/mmx.h
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Remove unused asm-x86_64/mmx.h

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Define __bad_pda_field as noreturn
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Define __bad_pda_field as noreturn

This quietens so warnings about uninitialized use of the return
value of the pda read operations.
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Reindent macros in pda.h
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Reindent macros in pda.h

Reindent the macros in x86-64 pda.h, making them much more readable.
Follows Jeremy's i386 version of this.

No functional changes

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix some stylistic issues in uaccess.h
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Fix some stylistic issues in uaccess.h

- Replace some broken white space.
- Replace __ keywords with standard names

No functional changes.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Check return values of __copy_to_user in uname emulation
Andi Kleen [Tue, 26 Sep 2006 08:52:40 +0000 (10:52 +0200)]
[PATCH] Check return values of __copy_to_user in uname emulation

Quietens some new warnings
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Check return value of copy_to_user in compat_sys_pselect7
Andi Kleen [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Check return value of copy_to_user in compat_sys_pselect7

Fix

linux/fs/compat.c: In function compat_sys_pselect7
linux/fs/compat.c:1869: warning: ignoring return value of copy_to_user, declared with attribute warn_unused_result

To make it easier to handle I changed to semantics to not try to
write out a timespec if an error occurred. I hope that's ok.

Cc: dwmw2@infradead.org
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Add __must_check to copy_*_user
Andi Kleen [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Add __must_check to copy_*_user

Following i386.

And also fix the two occurrences that caused warnings in arch/x86_64/*

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix zeroing on exception in copy_*_user
Andi Kleen [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Fix zeroing on exception in copy_*_user

- Don't zero for __copy_from_user_inatomic following i386.
This will prevent spurious zeros for parallel file system writers when
one does a exception
- The string instruction version didn't zero the output on
exception. Oops.

Also I cleaned up the code a bit while I was at it and added a minor
optimization to the string instruction path.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: add HPET(s) into resource map
adurbin@google.com [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] i386: add HPET(s) into resource map

Add HPET(s) into resource map. This will allow for the HPET(s) to be
visibile within /proc/iomem.

Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] insert IOAPIC(s) and Local APIC into resource map
adurbin@google.com [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] insert IOAPIC(s) and Local APIC into resource map

This patch places the IOAPIC(s) and the Local APIC specified by ACPI
tables into the resource map. The APICs will then be visible within
/proc/iomem

Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Do better early exception handlers
Chuck Ebbert [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] i386: Do better early exception handlers

Add early i386 fault handlers with debug information for common faults.
Handles:

        divide error
        invalid opcode
        protection fault
        page fault

Also adds code to detect early recursive/multiple faults and halt the
system when they happen (taken from x86_64.)

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: Allow a kernel not to be in ring 0
Rusty Russell [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] i386: Allow a kernel not to be in ring 0

We allow for the fact that the guest kernel may not run in ring 0.  This
requires some abstraction in a few places when setting %cs or checking
privilege level (user vs kernel).

This is Chris' [RFC PATCH 15/33] move segment checks to subarch, except rather
than using #define USER_MODE_MASK which depends on a config option, we use
Zach's more flexible approach of assuming ring 3 == userspace.  I also used
"get_kernel_rpl()" over "get_kernel_cs()" because I think it reads better in
the code...

1) Remove the hardcoded 3 and introduce #define SEGMENT_RPL_MASK 3 2) Add a
get_kernel_rpl() macro, and don't assume it's zero.

And:

Clean up of patch for letting kernel run other than ring 0:

a. Add some comments about the SEGMENT_IS_*_CODE() macros.
b. Add a USER_RPL macro.  (Code was comparing a value to a mask
   in some places and to the magic number 3 in other places.)
c. Add macros for table indicator field and use them.
d. Change the entry.S tests for LDT stack segment to use the macros

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Abstract sensitive instructions
Rusty Russell [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] i386: Abstract sensitive instructions

Abstract sensitive instructions in assembler code, replacing them with macros
(which currently are #defined to the native versions).  We use long names:
assembler is case-insensitive, so if something goes wrong and macros do not
expand, it would assemble anyway.

Resulting object files are exactly the same as before.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix a PDA warning uncovered by the new type checking
Andi Kleen [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Fix a PDA warning uncovered by the new type checking

Fix
linux/arch/x86_64/kernel/process.c: In function __switch_to:
linux/arch/x86_64/kernel/process.c:626: warning: assignment makes integer from pointer without a cast

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Type checking for write_pda()
Jeremy Fitzhardinge [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Type checking for write_pda()

I just added type checking for assignments the PDA in the i386 PDA code.
Here's the x86-64 equivalent.  (Obviously this doesn't contain the latest
x86-64 PDA change.)

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Use %c instead of %P modifier in pda access
Andi Kleen [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Use %c instead of %P modifier in pda access

Apparently that is the more official way to get numbers without $ in inline
assembly

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix a irqcount comment in entry.S
Andi Kleen [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Fix a irqcount comment in entry.S

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Add the -fstack-protector option to the CFLAGS
Arjan van de Ven [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Add the -fstack-protector option to the CFLAGS

Add a feature check that checks that the gcc compiler has stack-protector
support and has the bugfix for PR28281 to make this work in kernel mode.
The easiest solution I could find was to have a shell script in scripts/
to do the detection; if needed we can make this fancier in the future
without making the makefile too complex.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
CC: Andi Kleen <ak@suse.de>
CC: Sam Ravnborg <sam@ravnborg.org>
18 years ago[PATCH] Add the __stack_chk_fail() function
Arjan van de Ven [Tue, 26 Sep 2006 08:52:39 +0000 (10:52 +0200)]
[PATCH] Add the __stack_chk_fail() function

GCC emits a call to a __stack_chk_fail() function when the stack canary is
not matching the expected value.

Since this is a bad security issue; lets panic the kernel rather than limping
along; the kernel really can't be trusted anymore when this happens.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
CC: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Add the canary field to the PDA area and the task struct
Arjan van de Ven [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Add the canary field to the PDA area and the task struct

This patch adds the per thread cookie field to the task struct and the PDA.
Also it makes sure that the PDA value gets the new cookie value at context
switch, and that a new task gets a new cookie at task creation time.

Signed-off-by: Arjan van Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
CC: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Add the Kconfig option for the stackprotector feature
Arjan van de Ven [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Add the Kconfig option for the stackprotector feature

This patch adds the config options for -fstack-protector.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
CC: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Add comments to the PDA structure to annotate offsets
Arjan van de Ven [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Add comments to the PDA structure to annotate offsets

Change the comments in the pda structure to make the first fields to have
their offset documented and to have the comments aligned.
The stack protector series needs a field at offset 40 (gcc ABI); annotate
upto 40 for that reason.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
CC: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Document my tree in Documentation/HOWTO
Andi Kleen [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Document my tree in Documentation/HOWTO

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Don't use kernel_text_address in oops context
Andi Kleen [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Don't use kernel_text_address in oops context

Because it can take spinlocks.

Suggested by Mathieu Desnoyers

Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Avoid overwriting the current pgd (V4, i386)
Magnus Damm [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] i386: Avoid overwriting the current pgd (V4, i386)

kexec: Avoid overwriting the current pgd (V4, i386)

This patch upgrades the i386-specific kexec code to avoid overwriting the
current pgd. Overwriting the current pgd is bad when CONFIG_CRASH_DUMP is used
to start a secondary kernel that dumps the memory of the previous kernel.

The code introduces a new set of page tables. These tables are used to provide
an executable identity mapping without overwriting the current pgd.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Avoid overwriting the current pgd (V4, x86_64)
Magnus Damm [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Avoid overwriting the current pgd (V4, x86_64)

kexec: Avoid overwriting the current pgd (V4, x86_64)

This patch upgrades the x86_64-specific kexec code to avoid overwriting the
current pgd. Overwriting the current pgd is bad when CONFIG_CRASH_DUMP is used
to start a secondary kernel that dumps the memory of the previous kernel.

The code introduces a new set of page tables. These tables are used to provide
an executable identity mapping without overwriting the current pgd.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove most of the special cases for the debug IST stack
Keith Owens [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Remove most of the special cases for the debug IST stack

Remove most of the special cases for the debug IST stack.  This is a
follow on clean up patch, it requires the bug fix patch that adds
orig_ist.

Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Fix the EDD code misparsing the command line
H. Peter Anvin [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] i386: Fix the EDD code misparsing the command line

The EDD code would scan the command line as a fixed array, without
taking account of either whitespace, null-termination, the old
command-line protocol, late overrides early, or the fact that the
command line may not be reachable from INITSEG.

This should fix those problems, and enable us to use a longer command
line.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Optimize PDA accesses slightly
Andi Kleen [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Optimize PDA accesses slightly

Based on a idea by Jeremy Fitzhardinge:

Replace the volatiles and memory clobbers in the PDA access with
telling gcc about access to a proxy PDA structure that doesn't
actually exist. But the dummy accesses give a defined ordering for
read/write accesses.

Also add some memory barriers to the early GS initialization to
make sure no PDA access is moved before it.

Advantage is some .text savings (probably most from better
code for accessing "current"):

   text    data     bss     dec     hex filename
4845647 1223688  615864 6685199  66020f vmlinux
4837780 1223688  615864 6677332  65e354 vmlinux-pda

1.2% smaller code

Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: Remove incorrect comment about ACPI e820 entries
Andi Kleen [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] x86: Remove incorrect comment about ACPI e820 entries

They cannot be actually freed because the FACS table has a
shared-with-the-BIOS lock.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Put .note.* sections into a PT_NOTE segment
Ian Campbell [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Put .note.* sections into a PT_NOTE segment

This patch updates x86_64 linker script to pack any .note.* sections
into a PT_NOTE segment in the output file.

To do this, we tell ld that we need a PT_NOTE segment.  This requires
us to start explicitly mapping sections to segments, so we also need
to explicitly create PT_LOAD segments for text and data, and map the
sections to them appropriately.  Fortunately, each section will
default to its previous section's segment, so it doesn't take many
changes to vmlinux.lds.S.

The corresponding change is already made for i386 in -mm and I'd like
this patch to join it. The section to segment mappings do change as do
the segment flags so some time in -mm would be good for that reason as
well, just in case.

In particular .data and .bss move from the text segment to the data
segment and .data.cacheline_aligned .data.read_mostly are put in the
data segment instead of a separate one.

I think that it would be possible to exactly match the existing section
to segment mapping and flags but it would be a more intrusive change and
I'm not sure there is a reason for the existing layout other than it is
what you get by default if you don't explicitly specify something else.
If there is a reason for the existing layout then I will of course make
the more intrusive change. If there is no reason we could probably drop
the executable or writable flags from some segments but I don't know how
much attention is paid to them anyway so it might not be worth the
effort.

The vsyscall related sections need to go in a different segment to the
normal data segment and so I invented a "user" segment to contain them.
I believe this should appear to be another data segment as far as the
kernel is concerned so the flags are setup accordingly.

The notes will be used in the Xen paravirt_ops backend to provide
additional information to the domain builder. I am in the process of
converting the xen-unstable kernels and tools over to this scheme at the
moment to support this in the future.

It has been suggested to me that the notes segment should have flags 0
(i.e. not readable) since it is only used by the loader and is not used
at runtime. For now I went with a readable segment since that is what
the i386 patch uses.

AK: dropped NOTES addition right now because the needed infrastructure
for that is not merged yet

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Reload CS when startup_64 is used.
Eric W. Biederman [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] Reload CS when startup_64 is used.

In long mode the %cs is largely a relic.  However there are a few cases
like iret where it matters that we have a valid value.  Without this
patch it is possible to enter the kernel in startup_64 without setting
%cs to a valid value.  With this patch we don't care what %cs value
we enter the kernel with, so long as the cs shadow register indicates
it is a privileged code segment.

Thanks to Magnus Damm for finding this problem and posting the
first workable patch.  I have moved the jump to set %cs down a
few instructions so we don't need to take an extra jump.  Which
keeps the code simpler.

Signed-of-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] optimize hweight64 for x86_64
Andi Kleen [Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)]
[PATCH] optimize hweight64 for x86_64

Based on patch from David Rientjes <rientjes@google.com>, but
changed by AK.

Optimizes the 64-bit hamming weight for x86_64 processors assuming they
have fast multiplication.  Uses five fewer bitops than the generic
hweight64.  Benchmark on one EMT64 showed ~25% speedup with 2^24
consecutive calls.

Define a new ARCH_HAS_FAST_MULTIPLIER that can be set by other
architectures that can also multiply fast.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove non e820 fallbacks in high level code
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Remove non e820 fallbacks in high level code

Drop support for non e820 BIOS calls to get the memory map.

The boot assembler code still has some support, but not the C code now.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix boot code head.S warning
Paolo 'Blaisorblade' Giarrusso [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Fix boot code head.S warning

When compiling a 64-bit kernel on an Ubuntu 6.06 32bit system (whose GCC is also
a cross-compiler for x86_64) I've seen that head.o is compiled as a 64-bit file
(while it should not) and ld complaining about this during linking:
[AK: it happens on all systems with new binutils]

ld: warning: i386:x86-64 architecture of input file
`arch/x86_64/boot/compressed/head.o' is incompatible with i386 output

I've verified that removing -m64 from compilation flags to turn
"-m64 -traditional -m32" into "-traditional -m32" fixes the issue.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Add a missing check for irq flags tracing in NMI
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Add a missing check for irq flags tracing in NMI

NMIs are not supposed to track the irq flags, but TRACE_IRQS_IRETQ
did it anyways. Add a check.

Cc: mingo@elte.hu
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix coding style and output of the mptable parser
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Fix coding style and output of the mptable parser

Give the printks a consistent prefix.
Add some missing white space.

Cc: len.brown@intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove some cruft in apic id checking during processor setup
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Remove some cruft in apic id checking during processor setup

- Remove a define that was used only once
- Remove the too large APIC ID check because we always support
the full 8bit range of APICs.
- Restructure code a bit to be simpler.

Cc: len.brown@intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove APIC version/cpu capability mpparse checking/printing
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Remove APIC version/cpu capability mpparse checking/printing

ACPI went to great trouble to get the APIC version and CPU capabilities
of different CPUs before passing them to the mpparser. But all
that data was used was to print it out.  Actually it even faked some data
based on the boot cpu, not on the actual CPU being booted.

Remove all this code because it's not needed.

Cc: len.brown@intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Use proper accessors to change PSE bits in change_page_attr()
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Use proper accessors to change PSE bits in change_page_attr()

Use normal pte accessors in change_page_attr() to access the PSE
bits.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Fix pte_exec/mkexec and use it in change_page_attr()
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Fix pte_exec/mkexec and use it in change_page_attr()

Fix the pte_exec/mkexec page table accessor functions to really
use the NX bit. Previously they only checked the USER bit, but
weren't actually used for anything.

Then use them in change_page_attr() to manipulate the NX bit
properly.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove bogus warning from early_ioremap
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Remove bogus warning from early_ioremap

It is correct for its only caller right now, but not for possible
future others.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Remove safe_smp_processor_id()
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Remove safe_smp_processor_id()

And replace all users with ordinary smp_processor_id.  The function
was originally added to get some basic oops information out even
if the GS register was corrupted. However that didn't
work for some anymore because printk is needed to print the oops
and it uses smp_processor_id() already. Also GS register corruptions
are not particularly common anymore.

This also helps the Xen port which would otherwise need to
do this in a special way because it can't access the local APIC.

Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Detect clock skew during suspend
Rafael J. Wysocki [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Detect clock skew during suspend

Detect the situations in which the time after a resume from disk would
be earlier than the time before the suspend and prevent them from
happening on x86_64.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: annotate FIX_STACK() and the rest of nmi()
Chuck Ebbert [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] i386: annotate FIX_STACK() and the rest of nmi()

In i386's entry.S, FIX_STACK() needs annotation because it
replaces the stack pointer.  And the rest of nmi() needs
annotation in order to compile with these new annotations.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] make numa_emulation() __init
Andrew Morton [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] make numa_emulation() __init

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Move compiler check for modules to ia64 only
Andi Kleen [Tue, 26 Sep 2006 08:52:37 +0000 (10:52 +0200)]
[PATCH] Move compiler check for modules to ia64 only

Apparently IA64 needs it, but i386/x86-64 don't anymore
since gcc 2.95 support was dropped.  Nobody else on linux-arch
requested keeping it generically

Cc: tony.luck@intel.com
Cc: kaos@sgi.com
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Don't force reserve the 640k-1MB range
Andi Kleen [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] Don't force reserve the 640k-1MB range

From i386 x86-64 inherited code to force reserve the 640k-1MB area.
That was needed on some old systems.

But we generally trust the e820 map to be correct on 64bit systems
and mark all areas that are not memory correctly.

This patch will allow to use the real memory in there.

Or rather the only way to find out if it's still needed is to
try. So far I'm optimistic.

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86: remove config.h includes from asm-i386 & asm-x86_64
Dave Jones [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] x86: remove config.h includes from asm-i386 & asm-x86_64

This is now automatically included by kbuild.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Disallow kprobes on NMI handlers
Fernando Luis Vázquez Cao [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] i386: Disallow kprobes on NMI handlers

A kprobe executes IRET early and that could cause NMI recursion and stack
corruption.

Note: This problem was originally spotted and solved by Andi Kleen in the
x86_64 architecture. This patch is an adaption of his patch for i386.

AK: Merged with current code which was a bit different.
AK: Removed printk in nmi handler that shouldn't be there in the first time
AK: Added missing include.
AK: added KPROBES_END

Signed-off-by: Fernando Vazquez <fernando@intellilink.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Disallow kprobes on NMI handlers
Fernando Luis Vázquez Cao [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] i386: Disallow kprobes on NMI handlers

A kprobe executes IRET early and that could cause NMI recursion and stack
corruption.

Note: This problem was originally spotted by Andi Kleen. This patch
      adds fixes not included in his original patch.
[AK: Jan Beulich originally discovered these classes of bugs]

Signed-off-by: Fernando Vazquez <fernando@intellilink.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: mark cpu cache functions as __cpuinit
Magnus Damm [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] i386: mark cpu cache functions as __cpuinit

Mark i386-specific cpu cache functions as __cpuinit. They are all
only called from arch/i386/common.c:display_cache_info() that already is
marked as __cpuinit.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: mark cpu identify functions as __cpuinit
Magnus Damm [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] i386: mark cpu identify functions as __cpuinit

Mark i386-specific cpu identification functions as __cpuinit. They are all
only called from arch/i386/common.c:identify_cpu() that already is marked as
__cpuinit.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: mark cpu init functions as __cpuinit, data as __cpuinitdata
Magnus Damm [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] i386: mark cpu init functions as __cpuinit, data as __cpuinitdata

Mark i386-specific cpu init functions as __cpuinit. They are all
only called from arch/i386/common.c:identify_cpu() that already is marked as
__cpuinit. This patch also removes the empty function init_umc().

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: mark cpu_dev structures as __cpuinitdata
Magnus Damm [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] i386: mark cpu_dev structures as __cpuinitdata

The different cpu_dev structures are all used from __cpuinit callers what
I can tell. So mark them as __cpuinitdata instead of __initdata. I am a
little bit unsure about arch/i386/common.c:default_cpu, especially when it
comes to the purpose of this_cpu.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] mark init_amd() as __cpuinit
Magnus Damm [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] mark init_amd() as __cpuinit

The init_amd() function is only called from identify_cpu() which is already
marked as __cpuinit. So let's mark it as __cpuinit.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: remove redundant generic_identify() calls when identifying cpus
Magnus Damm [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] i386: remove redundant generic_identify() calls when identifying cpus

cpu_dev->c_identify is only called from arch/i386/common.c:identify_cpu(), and
this after generic_identify() already has been called. There is no need to call
this function twice and hook it in c_identify - but I may be wrong, please
double check before applying.

This patch also removes generic_identify() from cpu.h to avoid unnecessary
future nesting.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] x86_64 kernel mapping fix
Keith Mannthey [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] x86_64 kernel mapping fix

Fix for the x86_64 kernel mapping code.  Without this patch the update path
only inits one pmd_page worth of memory and tramples any entries on it.  now
the calling convention to phys_pmd_init and phys_init is to always pass a
[pmd/pud] page not an offset within a page.

Signed-off-by: Keith Mannthey<kmannth@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] wire up oops_enter()/oops_exit()
Andrew Morton [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] wire up oops_enter()/oops_exit()

Implement pause_on_oops() on x86_64.

AK: I redid the patch to do the oops_enter/exit in the existing
oops_begin()/end(). This makes it much shorter.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] non lazy "sleazy" fpu implementation
Arjan van de Ven [Tue, 26 Sep 2006 08:52:36 +0000 (10:52 +0200)]
[PATCH] non lazy "sleazy" fpu implementation

Right now the kernel on x86-64 has a 100% lazy fpu behavior: after *every*
context switch a trap is taken for the first FPU use to restore the FPU
context lazily.  This is of course great for applications that have very
sporadic or no FPU use (since then you avoid doing the expensive
save/restore all the time).  However for very frequent FPU users...  you
take an extra trap every context switch.

The patch below adds a simple heuristic to this code: After 5 consecutive
context switches of FPU use, the lazy behavior is disabled and the context
gets restored every context switch.  If the app indeed uses the FPU, the
trap is avoided.  (the chance of the 6th time slice using FPU after the
previous 5 having done so are quite high obviously).

After 256 switches, this is reset and lazy behavior is returned (until
there are 5 consecutive ones again).  The reason for this is to give apps
that do longer bursts of FPU use still the lazy behavior back after some
time.

[akpm@osdl.org: place new task_struct field next to jit_keyring to save space]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: Support physical cpu hotplug for x86_64
Ashok Raj [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: Support physical cpu hotplug for x86_64

This patch enables ACPI based physical CPU hotplug support for x86_64.
Implements acpi_map_lsapic() and acpi_unmap_lsapic() to support physical cpu
hotplug.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] fix bus numbering format in mmconfig warning
Brice Goglin [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] fix bus numbering format in mmconfig warning

Make an mmconfig warning print the bus id with a regular format.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
18 years ago[PATCH] i386: mark two more functions as __init
Magnus Damm [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: mark two more functions as __init

cyrix_identify() should be __init because transmeta_identify() is.
tsc_init() is only called from setup_arch() which is marked as __init.

These two section mismatches have been detected using running modpost on
a vmlinux image compiled with CONFIG_RELOCATABLE=y.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: clean up topology.c
Magnus Damm [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: clean up topology.c

There is no need to duplicate the topology_init() function.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] Auto size the per cpu area.
Eric W. Biederman [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] Auto size the per cpu area.

Now for a completely different but trivial approach.
I just boot tested it with 255 CPUS and everything worked.

Currently everything (except module data) we place in
the per cpu area we know about at compile time.  So
instead of allocating a fixed size for the per_cpu area
allocate the number of bytes we need plus a fixed constant
for to be used for modules.

It isn't perfect but it is much less of a pain to
work with than what we are doing now.

AK: fixed warning

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Descriptor and trap table cleanups.
Rusty Russell [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: Descriptor and trap table cleanups.

The implementation comes from Zach's [RFC, PATCH 10/24] i386 Vmi
descriptor changes:

Descriptor and trap table cleanups.  Add cleanly written accessors for
IDT and GDT gates so the subarch may override them.  Note that this
allows the hypervisor to transparently tweak the DPL of the descriptors
as well as the RPL of segments in those descriptors, with no unnecessary
kernel code modification.  It also allows the hypervisor implementation
of the VMI to tweak the gates, allowing for custom exception frames or
extra layers of indirection above the guest fault / IRQ handlers.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: move kernel_thread_helper into entry.S
Andi Kleen [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: move kernel_thread_helper into entry.S

And add proper CFI annotation to it which was previously
impossible. This prevents "stuck" messages by the dwarf2 unwinder
when reaching the top of a kernel stack.

Includes feedback from Jan Beulich

Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Make enable_local_apic static
Adrian Bunk [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: Make enable_local_apic static

enable_local_apic can now become static.

Cc: len.brown@intel.com
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: Make acpi_force static
Adrian Bunk [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: Make acpi_force static

acpi_force can become static.

Cc: len.brown@intel.com
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] i386: make fault notifier unconditional and export it
Andi Kleen [Tue, 26 Sep 2006 08:52:35 +0000 (10:52 +0200)]
[PATCH] i386: make fault notifier unconditional and export it

It's needed for external debuggers and overhead is very small.

Also make the actual notifier chain they use static

Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>