You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (225 commits) [PATCH] Don't set calgary iommu as default y [PATCH] i386/x86-64: New Intel feature flags [PATCH] x86: Add a cumulative thermal throttle event counter. [PATCH] i386: Make the jiffies compares use the 64bit safe macros. [PATCH] x86: Refactor thermal throttle processing [PATCH] Add 64bit jiffies compares (for use with get_jiffies_64) [PATCH] Fix unwinder warning in traps.c [PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1 [PATCH] x86: Move direct PCI scanning functions out of line [PATCH] i386/x86-64: Make all early PCI scans dependent on CONFIG_PCI [PATCH] Don't leak NT bit into next task [PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder [PATCH] Fix some broken white space in ia32_signal.c [PATCH] Initialize argument registers for 32bit signal handlers. [PATCH] Remove all traces of signal number conversion [PATCH] Don't synchronize time reading on single core AMD systems [PATCH] Remove outdated comment in x86-64 mmconfig code [PATCH] Use string instructions for Core2 copy/clear [PATCH] x86: - restore i8259A eoi status on resume [PATCH] i386: Split multi-line printk in oops output. ...
This commit is contained in:
+2
-1
@@ -358,7 +358,8 @@ Here is a list of some of the different kernel trees available:
|
||||
quilt trees:
|
||||
- USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman <gregkh@suse.de>
|
||||
kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
|
||||
|
||||
- x86-64, partly i386, Andi Kleen <ak@suse.de>
|
||||
ftp.firstfloor.org:/pub/ak/x86_64/quilt/
|
||||
|
||||
Bug Reporting
|
||||
-------------
|
||||
|
||||
@@ -1124,11 +1124,15 @@ debugging information is displayed on console.
|
||||
NMI switch that most IA32 servers have fires unknown NMI up, for example.
|
||||
If a system hangs up, try pressing the NMI switch.
|
||||
|
||||
[NOTE]
|
||||
This function and oprofile share a NMI callback. Therefore this function
|
||||
cannot be enabled when oprofile is activated.
|
||||
And NMI watchdog will be disabled when the value in this file is set to
|
||||
non-zero.
|
||||
nmi_watchdog
|
||||
------------
|
||||
|
||||
Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero
|
||||
the NMI watchdog is enabled and will continuously test all online cpus to
|
||||
determine whether or not they are still functioning properly.
|
||||
|
||||
Because the NMI watchdog shares registers with oprofile, by disabling the NMI
|
||||
watchdog, oprofile may have more registers to utilize.
|
||||
|
||||
|
||||
2.4 /proc/sys/vm - The virtual memory subsystem
|
||||
|
||||
@@ -421,6 +421,11 @@ more details, with real examples.
|
||||
The second argument is optional, and if supplied will be used
|
||||
if first argument is not supported.
|
||||
|
||||
as-instr
|
||||
as-instr checks if the assembler reports a specific instruction
|
||||
and then outputs either option1 or option2
|
||||
C escapes are supported in the test instruction
|
||||
|
||||
cc-option
|
||||
cc-option is used to check if $(CC) supports a given option, and not
|
||||
supported to use an optional second option.
|
||||
|
||||
@@ -1240,7 +1240,11 @@ running once the system is up.
|
||||
bootloader. This is currently used on
|
||||
IXP2000 systems where the bus has to be
|
||||
configured a certain way for adjunct CPUs.
|
||||
|
||||
noearly [X86] Don't do any early type 1 scanning.
|
||||
This might help on some broken boards which
|
||||
machine check when some devices' config space
|
||||
is read. But various workarounds are disabled
|
||||
and some IOMMU drivers will not work.
|
||||
pcmv= [HW,PCMCIA] BadgePAD 4
|
||||
|
||||
pd. [PARIDE]
|
||||
|
||||
@@ -245,6 +245,13 @@ Debugging
|
||||
newfallback: use new unwinder but fall back to old if it gets
|
||||
stuck (default)
|
||||
|
||||
call_trace=[old|both|newfallback|new]
|
||||
old: use old inexact backtracer
|
||||
new: use new exact dwarf2 unwinder
|
||||
both: print entries from both
|
||||
newfallback: use new unwinder but fall back to old if it gets
|
||||
stuck (default)
|
||||
|
||||
Misc
|
||||
|
||||
noreplacement Don't replace instructions with more appropriate ones
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
Most of the text from Keith Owens, hacked by AK
|
||||
|
||||
x86_64 page size (PAGE_SIZE) is 4K.
|
||||
|
||||
Like all other architectures, x86_64 has a kernel stack for every
|
||||
active thread. These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.
|
||||
These stacks contain useful data as long as a thread is alive or a
|
||||
zombie. While the thread is in user space the kernel stack is empty
|
||||
except for the thread_info structure at the bottom.
|
||||
|
||||
In addition to the per thread stacks, there are specialized stacks
|
||||
associated with each cpu. These stacks are only used while the kernel
|
||||
is in control on that cpu, when a cpu returns to user space the
|
||||
specialized stacks contain no useful data. The main cpu stacks is
|
||||
|
||||
* Interrupt stack. IRQSTACKSIZE
|
||||
|
||||
Used for external hardware interrupts. If this is the first external
|
||||
hardware interrupt (i.e. not a nested hardware interrupt) then the
|
||||
kernel switches from the current task to the interrupt stack. Like
|
||||
the split thread and interrupt stacks on i386 (with CONFIG_4KSTACKS),
|
||||
this gives more room for kernel interrupt processing without having
|
||||
to increase the size of every per thread stack.
|
||||
|
||||
The interrupt stack is also used when processing a softirq.
|
||||
|
||||
Switching to the kernel interrupt stack is done by software based on a
|
||||
per CPU interrupt nest counter. This is needed because x86-64 "IST"
|
||||
hardware stacks cannot nest without races.
|
||||
|
||||
x86_64 also has a feature which is not available on i386, the ability
|
||||
to automatically switch to a new stack for designated events such as
|
||||
double fault or NMI, which makes it easier to handle these unusual
|
||||
events on x86_64. This feature is called the Interrupt Stack Table
|
||||
(IST). There can be up to 7 IST entries per cpu. The IST code is an
|
||||
index into the Task State Segment (TSS), the IST entries in the TSS
|
||||
point to dedicated stacks, each stack can be a different size.
|
||||
|
||||
An IST is selected by an non-zero value in the IST field of an
|
||||
interrupt-gate descriptor. When an interrupt occurs and the hardware
|
||||
loads such a descriptor, the hardware automatically sets the new stack
|
||||
pointer based on the IST value, then invokes the interrupt handler. If
|
||||
software wants to allow nested IST interrupts then the handler must
|
||||
adjust the IST values on entry to and exit from the interrupt handler.
|
||||
(this is occasionally done, e.g. for debug exceptions)
|
||||
|
||||
Events with different IST codes (i.e. with different stacks) can be
|
||||
nested. For example, a debug interrupt can safely be interrupted by an
|
||||
NMI. arch/x86_64/kernel/entry.S::paranoidentry adjusts the stack
|
||||
pointers on entry to and exit from all IST events, in theory allowing
|
||||
IST events with the same code to be nested. However in most cases, the
|
||||
stack size allocated to an IST assumes no nesting for the same code.
|
||||
If that assumption is ever broken then the stacks will become corrupt.
|
||||
|
||||
The currently assigned IST stacks are :-
|
||||
|
||||
* STACKFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
|
||||
|
||||
Used for interrupt 12 - Stack Fault Exception (#SS).
|
||||
|
||||
This allows to recover from invalid stack segments. Rarely
|
||||
happens.
|
||||
|
||||
* DOUBLEFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
|
||||
|
||||
Used for interrupt 8 - Double Fault Exception (#DF).
|
||||
|
||||
Invoked when handling a exception causes another exception. Happens
|
||||
when the kernel is very confused (e.g. kernel stack pointer corrupt)
|
||||
Using a separate stack allows to recover from it well enough in many
|
||||
cases to still output an oops.
|
||||
|
||||
* NMI_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
|
||||
|
||||
Used for non-maskable interrupts (NMI).
|
||||
|
||||
NMI can be delivered at any time, including when the kernel is in the
|
||||
middle of switching stacks. Using IST for NMI events avoids making
|
||||
assumptions about the previous state of the kernel stack.
|
||||
|
||||
* DEBUG_STACK. DEBUG_STKSZ
|
||||
|
||||
Used for hardware debug interrupts (interrupt 1) and for software
|
||||
debug interrupts (INT3).
|
||||
|
||||
When debugging a kernel, debug interrupts (both hardware and
|
||||
software) can occur at any time. Using IST for these interrupts
|
||||
avoids making assumptions about the previous state of the kernel
|
||||
stack.
|
||||
|
||||
* MCE_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
|
||||
|
||||
Used for interrupt 18 - Machine Check Exception (#MC).
|
||||
|
||||
MCE can be delivered at any time, including when the kernel is in the
|
||||
middle of switching stacks. Using IST for MCE events avoids making
|
||||
assumptions about the previous state of the kernel stack.
|
||||
|
||||
For more details see the Intel IA32 or AMD AMD64 architecture manuals.
|
||||
+11
-6
@@ -166,7 +166,6 @@ config X86_VISWS
|
||||
|
||||
config X86_GENERICARCH
|
||||
bool "Generic architecture (Summit, bigsmp, ES7000, default)"
|
||||
depends on SMP
|
||||
help
|
||||
This option compiles in the Summit, bigsmp, ES7000, default subarchitectures.
|
||||
It is intended for a generic binary kernel.
|
||||
@@ -263,7 +262,7 @@ source "kernel/Kconfig.preempt"
|
||||
|
||||
config X86_UP_APIC
|
||||
bool "Local APIC support on uniprocessors"
|
||||
depends on !SMP && !(X86_VISWS || X86_VOYAGER)
|
||||
depends on !SMP && !(X86_VISWS || X86_VOYAGER || X86_GENERICARCH)
|
||||
help
|
||||
A local APIC (Advanced Programmable Interrupt Controller) is an
|
||||
integrated interrupt controller in the CPU. If you have a single-CPU
|
||||
@@ -288,12 +287,12 @@ config X86_UP_IOAPIC
|
||||
|
||||
config X86_LOCAL_APIC
|
||||
bool
|
||||
depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER)
|
||||
depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER) || X86_GENERICARCH
|
||||
default y
|
||||
|
||||
config X86_IO_APIC
|
||||
bool
|
||||
depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER))
|
||||
depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER)) || X86_GENERICARCH
|
||||
default y
|
||||
|
||||
config X86_VISWS_APIC
|
||||
@@ -741,8 +740,7 @@ config SECCOMP
|
||||
source kernel/Kconfig.hz
|
||||
|
||||
config KEXEC
|
||||
bool "kexec system call (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
bool "kexec system call"
|
||||
help
|
||||
kexec is a system call that implements the ability to shutdown your
|
||||
current kernel, and to start another kernel. It is like a reboot
|
||||
@@ -763,6 +761,13 @@ config CRASH_DUMP
|
||||
depends on HIGHMEM
|
||||
help
|
||||
Generate crash dump after being started by kexec.
|
||||
This should be normally only set in special crash dump kernels
|
||||
which are loaded in the main kernel with kexec-tools into
|
||||
a specially reserved region and then later executed after
|
||||
a crash by kdump/kexec. The crash dump kernel must be compiled
|
||||
to a memory address not used by the main kernel or BIOS using
|
||||
PHYSICAL_START.
|
||||
For more details see Documentation/kdump/kdump.txt
|
||||
|
||||
config PHYSICAL_START
|
||||
hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
|
||||
|
||||
@@ -46,6 +46,14 @@ cflags-y += -ffreestanding
|
||||
# a lot more stack due to the lack of sharing of stacklots:
|
||||
CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
|
||||
|
||||
# do binutils support CFI?
|
||||
cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
|
||||
AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
|
||||
|
||||
# is .cfi_signal_frame supported too?
|
||||
cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
|
||||
AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
|
||||
|
||||
CFLAGS += $(cflags-y)
|
||||
|
||||
# Default subarch .c files
|
||||
|
||||
+75
-22
@@ -15,42 +15,95 @@
|
||||
#include <asm/setup.h>
|
||||
|
||||
#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
|
||||
|
||||
# It is assumed that %ds == INITSEG here
|
||||
|
||||
movb $0, (EDD_MBR_SIG_NR_BUF)
|
||||
movb $0, (EDDNR)
|
||||
|
||||
# Check the command line for two options:
|
||||
# Check the command line for options:
|
||||
# edd=of disables EDD completely (edd=off)
|
||||
# edd=sk skips the MBR test (edd=skipmbr)
|
||||
# edd=on re-enables EDD (edd=on)
|
||||
|
||||
pushl %esi
|
||||
cmpl $0, %cs:cmd_line_ptr
|
||||
jz done_cl
|
||||
movw $edd_mbr_sig_start, %di # Default to edd=on
|
||||
|
||||
movl %cs:(cmd_line_ptr), %esi
|
||||
# ds:esi has the pointer to the command line now
|
||||
movl $(COMMAND_LINE_SIZE-7), %ecx
|
||||
# loop through kernel command line one byte at a time
|
||||
cl_loop:
|
||||
cmpl $EDD_CL_EQUALS, (%si)
|
||||
andl %esi, %esi
|
||||
jz old_cl # Old boot protocol?
|
||||
|
||||
# Convert to a real-mode pointer in fs:si
|
||||
movl %esi, %eax
|
||||
shrl $4, %eax
|
||||
movw %ax, %fs
|
||||
andw $0xf, %si
|
||||
jmp have_cl_pointer
|
||||
|
||||
# Old-style boot protocol?
|
||||
old_cl:
|
||||
push %ds # aka INITSEG
|
||||
pop %fs
|
||||
|
||||
cmpw $0xa33f, (0x20)
|
||||
jne done_cl # No command line at all?
|
||||
movw (0x22), %si # Pointer relative to INITSEG
|
||||
|
||||
# fs:si has the pointer to the command line now
|
||||
have_cl_pointer:
|
||||
|
||||
# Loop through kernel command line one byte at a time. Just in
|
||||
# case the loader is buggy and failed to null-terminate the command line
|
||||
# terminate if we get close enough to the end of the segment that we
|
||||
# cannot fit "edd=XX"...
|
||||
cl_atspace:
|
||||
cmpw $-5, %si # Watch for segment wraparound
|
||||
jae done_cl
|
||||
movl %fs:(%si), %eax
|
||||
andb %al, %al # End of line?
|
||||
jz done_cl
|
||||
cmpl $EDD_CL_EQUALS, %eax
|
||||
jz found_edd_equals
|
||||
incl %esi
|
||||
loop cl_loop
|
||||
jmp done_cl
|
||||
cmpb $0x20, %al # <= space consider whitespace
|
||||
ja cl_skipword
|
||||
incw %si
|
||||
jmp cl_atspace
|
||||
|
||||
cl_skipword:
|
||||
cmpw $-5, %si # Watch for segment wraparound
|
||||
jae done_cl
|
||||
movb %fs:(%si), %al # End of string?
|
||||
andb %al, %al
|
||||
jz done_cl
|
||||
cmpb $0x20, %al
|
||||
jbe cl_atspace
|
||||
incw %si
|
||||
jmp cl_skipword
|
||||
|
||||
found_edd_equals:
|
||||
# only looking at first two characters after equals
|
||||
addl $4, %esi
|
||||
cmpw $EDD_CL_OFF, (%si) # edd=of
|
||||
jz do_edd_off
|
||||
cmpw $EDD_CL_SKIP, (%si) # edd=sk
|
||||
jz do_edd_skipmbr
|
||||
jmp done_cl
|
||||
# late overrides early on the command line, so keep going after finding something
|
||||
movw %fs:4(%si), %ax
|
||||
cmpw $EDD_CL_OFF, %ax # edd=of
|
||||
je do_edd_off
|
||||
cmpw $EDD_CL_SKIP, %ax # edd=sk
|
||||
je do_edd_skipmbr
|
||||
cmpw $EDD_CL_ON, %ax # edd=on
|
||||
je do_edd_on
|
||||
jmp cl_skipword
|
||||
do_edd_skipmbr:
|
||||
popl %esi
|
||||
jmp edd_start
|
||||
movw $edd_start, %di
|
||||
jmp cl_skipword
|
||||
do_edd_off:
|
||||
popl %esi
|
||||
jmp edd_done
|
||||
movw $edd_done, %di
|
||||
jmp cl_skipword
|
||||
do_edd_on:
|
||||
movw $edd_mbr_sig_start, %di
|
||||
jmp cl_skipword
|
||||
|
||||
done_cl:
|
||||
popl %esi
|
||||
|
||||
jmpw *%di
|
||||
|
||||
# Read the first sector of each BIOS disk device and store the 4-byte signature
|
||||
edd_mbr_sig_start:
|
||||
|
||||
@@ -494,12 +494,12 @@ no_voyager:
|
||||
movw %cs, %ax # aka SETUPSEG
|
||||
subw $DELTA_INITSEG, %ax # aka INITSEG
|
||||
movw %ax, %ds
|
||||
movw $0, (0x1ff) # default is no pointing device
|
||||
movb $0, (0x1ff) # default is no pointing device
|
||||
int $0x11 # int 0x11: equipment list
|
||||
testb $0x04, %al # check if mouse installed
|
||||
jz no_psmouse
|
||||
|
||||
movw $0xAA, (0x1ff) # device present
|
||||
movb $0xAA, (0x1ff) # device present
|
||||
no_psmouse:
|
||||
|
||||
#if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
|
||||
|
||||
+501
-562
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
|
||||
extra-y := head.o init_task.o vmlinux.lds
|
||||
|
||||
obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
|
||||
obj-y := process.o signal.o entry.o traps.o irq.o \
|
||||
ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
|
||||
pci-dma.o i386_ksyms.o i387.o bootflag.o \
|
||||
quirks.o i8237.o topology.o alternative.o i8253.o tsc.o
|
||||
@@ -81,4 +81,5 @@ $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
|
||||
$(call if_changed,syscall)
|
||||
|
||||
k8-y += ../../x86_64/kernel/k8.o
|
||||
stacktrace-y += ../../x86_64/kernel/stacktrace.o
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
obj-$(CONFIG_ACPI) += boot.o
|
||||
ifneq ($(CONFIG_PCI),)
|
||||
obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o
|
||||
endif
|
||||
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o
|
||||
|
||||
ifneq ($(CONFIG_ACPI_PROCESSOR),)
|
||||
|
||||
@@ -26,9 +26,12 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/efi.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/ioport.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/io_apic.h>
|
||||
@@ -36,11 +39,17 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/mpspec.h>
|
||||
|
||||
static int __initdata acpi_force = 0;
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
int acpi_disabled = 0;
|
||||
#else
|
||||
int acpi_disabled = 1;
|
||||
#endif
|
||||
EXPORT_SYMBOL(acpi_disabled);
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
|
||||
extern void __init clustered_apic_check(void);
|
||||
|
||||
extern int gsi_irq_sharing(int gsi);
|
||||
#include <asm/proto.h>
|
||||
|
||||
static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return 0; }
|
||||
@@ -506,16 +515,76 @@ EXPORT_SYMBOL(acpi_register_gsi);
|
||||
#ifdef CONFIG_ACPI_HOTPLUG_CPU
|
||||
int acpi_map_lsapic(acpi_handle handle, int *pcpu)
|
||||
{
|
||||
/* TBD */
|
||||
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||
union acpi_object *obj;
|
||||
struct acpi_table_lapic *lapic;
|
||||
cpumask_t tmp_map, new_map;
|
||||
u8 physid;
|
||||
int cpu;
|
||||
|
||||
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer)))
|
||||
return -EINVAL;
|
||||
|
||||
if (!buffer.length || !buffer.pointer)
|
||||
return -EINVAL;
|
||||
|
||||
obj = buffer.pointer;
|
||||
if (obj->type != ACPI_TYPE_BUFFER ||
|
||||
obj->buffer.length < sizeof(*lapic)) {
|
||||
kfree(buffer.pointer);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
lapic = (struct acpi_table_lapic *)obj->buffer.pointer;
|
||||
|
||||
if ((lapic->header.type != ACPI_MADT_LAPIC) ||
|
||||
(!lapic->flags.enabled)) {
|
||||
kfree(buffer.pointer);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
physid = lapic->id;
|
||||
|
||||
kfree(buffer.pointer);
|
||||
buffer.length = ACPI_ALLOCATE_BUFFER;
|
||||
buffer.pointer = NULL;
|
||||
|
||||
tmp_map = cpu_present_map;
|
||||
mp_register_lapic(physid, lapic->flags.enabled);
|
||||
|
||||
/*
|
||||
* If mp_register_lapic successfully generates a new logical cpu
|
||||
* number, then the following will get us exactly what was mapped
|
||||
*/
|
||||
cpus_andnot(new_map, cpu_present_map, tmp_map);
|
||||
if (cpus_empty(new_map)) {
|
||||
printk ("Unable to map lapic to logical cpu number\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
cpu = first_cpu(new_map);
|
||||
|
||||
*pcpu = cpu;
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(acpi_map_lsapic);
|
||||
|
||||
int acpi_unmap_lsapic(int cpu)
|
||||
{
|
||||
/* TBD */
|
||||
return -EINVAL;
|
||||
int i;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
if (x86_acpiid_to_apicid[i] == x86_cpu_to_apicid[cpu]) {
|
||||
x86_acpiid_to_apicid[i] = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
x86_cpu_to_apicid[cpu] = -1;
|
||||
cpu_clear(cpu, cpu_present_map);
|
||||
num_processors--;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(acpi_unmap_lsapic);
|
||||
@@ -579,6 +648,8 @@ static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size)
|
||||
static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
|
||||
{
|
||||
struct acpi_table_hpet *hpet_tbl;
|
||||
struct resource *hpet_res;
|
||||
resource_size_t res_start;
|
||||
|
||||
if (!phys || !size)
|
||||
return -EINVAL;
|
||||
@@ -594,12 +665,26 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
|
||||
"memory.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#define HPET_RESOURCE_NAME_SIZE 9
|
||||
hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
|
||||
if (hpet_res) {
|
||||
memset(hpet_res, 0, sizeof(*hpet_res));
|
||||
hpet_res->name = (void *)&hpet_res[1];
|
||||
hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE,
|
||||
"HPET %u", hpet_tbl->number);
|
||||
hpet_res->end = (1 * 1024) - 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
vxtime.hpet_address = hpet_tbl->addr.addrl |
|
||||
((long)hpet_tbl->addr.addrh << 32);
|
||||
|
||||
printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
|
||||
hpet_tbl->id, vxtime.hpet_address);
|
||||
|
||||
res_start = vxtime.hpet_address;
|
||||
#else /* X86 */
|
||||
{
|
||||
extern unsigned long hpet_address;
|
||||
@@ -607,9 +692,17 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
|
||||
hpet_address = hpet_tbl->addr.addrl;
|
||||
printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
|
||||
hpet_tbl->id, hpet_address);
|
||||
|
||||
res_start = hpet_address;
|
||||
}
|
||||
#endif /* X86 */
|
||||
|
||||
if (hpet_res) {
|
||||
hpet_res->start = res_start;
|
||||
hpet_res->end += res_start;
|
||||
insert_resource(&iomem_resource, hpet_res);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
@@ -860,8 +953,6 @@ static void __init acpi_process_madt(void)
|
||||
return;
|
||||
}
|
||||
|
||||
extern int acpi_force;
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
static int __init disable_acpi_irq(struct dmi_system_id *d)
|
||||
@@ -1163,3 +1254,75 @@ int __init acpi_boot_init(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init parse_acpi(char *arg)
|
||||
{
|
||||
if (!arg)
|
||||
return -EINVAL;
|
||||
|
||||
/* "acpi=off" disables both ACPI table parsing and interpreter */
|
||||
if (strcmp(arg, "off") == 0) {
|
||||
disable_acpi();
|
||||
}
|
||||
/* acpi=force to over-ride black-list */
|
||||
else if (strcmp(arg, "force") == 0) {
|
||||
acpi_force = 1;
|
||||
acpi_ht = 1;
|
||||
acpi_disabled = 0;
|
||||
}
|
||||
/* acpi=strict disables out-of-spec workarounds */
|
||||
else if (strcmp(arg, "strict") == 0) {
|
||||
acpi_strict = 1;
|
||||
}
|
||||
/* Limit ACPI just to boot-time to enable HT */
|
||||
else if (strcmp(arg, "ht") == 0) {
|
||||
if (!acpi_force)
|
||||
disable_acpi();
|
||||
acpi_ht = 1;
|
||||
}
|
||||
/* "acpi=noirq" disables ACPI interrupt routing */
|
||||
else if (strcmp(arg, "noirq") == 0) {
|
||||
acpi_noirq_set();
|
||||
} else {
|
||||
/* Core will printk when we return error. */
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
early_param("acpi", parse_acpi);
|
||||
|
||||
/* FIXME: Using pci= for an ACPI parameter is a travesty. */
|
||||
static int __init parse_pci(char *arg)
|
||||
{
|
||||
if (arg && strcmp(arg, "noacpi") == 0)
|
||||
acpi_disable_pci();
|
||||
return 0;
|
||||
}
|
||||
early_param("pci", parse_pci);
|
||||
|
||||
#ifdef CONFIG_X86_IO_APIC
|
||||
static int __init parse_acpi_skip_timer_override(char *arg)
|
||||
{
|
||||
acpi_skip_timer_override = 1;
|
||||
return 0;
|
||||
}
|
||||
early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override);
|
||||
#endif /* CONFIG_X86_IO_APIC */
|
||||
|
||||
static int __init setup_acpi_sci(char *s)
|
||||
{
|
||||
if (!s)
|
||||
return -EINVAL;
|
||||
if (!strcmp(s, "edge"))
|
||||
acpi_sci_flags.trigger = 1;
|
||||
else if (!strcmp(s, "level"))
|
||||
acpi_sci_flags.trigger = 3;
|
||||
else if (!strcmp(s, "high"))
|
||||
acpi_sci_flags.polarity = 1;
|
||||
else if (!strcmp(s, "low"))
|
||||
acpi_sci_flags.polarity = 3;
|
||||
else
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
early_param("acpi_sci", setup_acpi_sci);
|
||||
|
||||
@@ -48,7 +48,11 @@ void __init check_acpi_pci(void)
|
||||
int num, slot, func;
|
||||
|
||||
/* Assume the machine supports type 1. If not it will
|
||||
always read ffffffff and should not have any side effect. */
|
||||
always read ffffffff and should not have any side effect.
|
||||
Actually a few buggy systems can machine check. Allow the user
|
||||
to disable it by command line option at least -AK */
|
||||
if (!early_pci_allowed())
|
||||
return;
|
||||
|
||||
/* Poor man's PCI discovery */
|
||||
for (num = 0; num < 32; num++) {
|
||||
|
||||
+28
-3
@@ -52,7 +52,18 @@ static cpumask_t timer_bcast_ipi;
|
||||
/*
|
||||
* Knob to control our willingness to enable the local APIC.
|
||||
*/
|
||||
int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */
|
||||
static int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */
|
||||
|
||||
static inline void lapic_disable(void)
|
||||
{
|
||||
enable_local_apic = -1;
|
||||
clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
|
||||
}
|
||||
|
||||
static inline void lapic_enable(void)
|
||||
{
|
||||
enable_local_apic = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Debug level
|
||||
@@ -586,8 +597,7 @@ void __devinit setup_local_APIC(void)
|
||||
printk("No ESR for 82489DX.\n");
|
||||
}
|
||||
|
||||
if (nmi_watchdog == NMI_LOCAL_APIC)
|
||||
setup_apic_nmi_watchdog();
|
||||
setup_apic_nmi_watchdog(NULL);
|
||||
apic_pm_activate();
|
||||
}
|
||||
|
||||
@@ -1373,3 +1383,18 @@ int __init APIC_init_uniprocessor (void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init parse_lapic(char *arg)
|
||||
{
|
||||
lapic_enable();
|
||||
return 0;
|
||||
}
|
||||
early_param("lapic", parse_lapic);
|
||||
|
||||
static int __init parse_nolapic(char *arg)
|
||||
{
|
||||
lapic_disable();
|
||||
return 0;
|
||||
}
|
||||
early_param("nolapic", parse_nolapic);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
extern void vide(void);
|
||||
__asm__(".align 4\nvide: ret");
|
||||
|
||||
static void __init init_amd(struct cpuinfo_x86 *c)
|
||||
static void __cpuinit init_amd(struct cpuinfo_x86 *c)
|
||||
{
|
||||
u32 l, h;
|
||||
int mbytes = num_physpages >> (20-PAGE_SHIFT);
|
||||
@@ -246,7 +246,7 @@ static void __init init_amd(struct cpuinfo_x86 *c)
|
||||
num_cache_leaves = 3;
|
||||
}
|
||||
|
||||
static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)
|
||||
static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)
|
||||
{
|
||||
/* AMD errata T13 (order #21922) */
|
||||
if ((c->x86 == 6)) {
|
||||
@@ -259,7 +259,7 @@ static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)
|
||||
return size;
|
||||
}
|
||||
|
||||
static struct cpu_dev amd_cpu_dev __initdata = {
|
||||
static struct cpu_dev amd_cpu_dev __cpuinitdata = {
|
||||
.c_vendor = "AMD",
|
||||
.c_ident = { "AuthenticAMD" },
|
||||
.c_models = {
|
||||
@@ -275,7 +275,6 @@ static struct cpu_dev amd_cpu_dev __initdata = {
|
||||
},
|
||||
},
|
||||
.c_init = init_amd,
|
||||
.c_identify = generic_identify,
|
||||
.c_size_cache = amd_size_cache,
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
|
||||
static u32 __init power2(u32 x)
|
||||
static u32 __cpuinit power2(u32 x)
|
||||
{
|
||||
u32 s=1;
|
||||
while(s<=x)
|
||||
@@ -22,7 +22,7 @@ static u32 __init power2(u32 x)
|
||||
* Set up an actual MCR
|
||||
*/
|
||||
|
||||
static void __init centaur_mcr_insert(int reg, u32 base, u32 size, int key)
|
||||
static void __cpuinit centaur_mcr_insert(int reg, u32 base, u32 size, int key)
|
||||
{
|
||||
u32 lo, hi;
|
||||
|
||||
@@ -40,7 +40,7 @@ static void __init centaur_mcr_insert(int reg, u32 base, u32 size, int key)
|
||||
* Shortcut: We know you can't put 4Gig of RAM on a winchip
|
||||
*/
|
||||
|
||||
static u32 __init ramtop(void) /* 16388 */
|
||||
static u32 __cpuinit ramtop(void) /* 16388 */
|
||||
{
|
||||
int i;
|
||||
u32 top = 0;
|
||||
@@ -91,7 +91,7 @@ static u32 __init ramtop(void) /* 16388 */
|
||||
* Compute a set of MCR's to give maximum coverage
|
||||
*/
|
||||
|
||||
static int __init centaur_mcr_compute(int nr, int key)
|
||||
static int __cpuinit centaur_mcr_compute(int nr, int key)
|
||||
{
|
||||
u32 mem = ramtop();
|
||||
u32 root = power2(mem);
|
||||
@@ -166,7 +166,7 @@ static int __init centaur_mcr_compute(int nr, int key)
|
||||
return ct;
|
||||
}
|
||||
|
||||
static void __init centaur_create_optimal_mcr(void)
|
||||
static void __cpuinit centaur_create_optimal_mcr(void)
|
||||
{
|
||||
int i;
|
||||
/*
|
||||
@@ -189,7 +189,7 @@ static void __init centaur_create_optimal_mcr(void)
|
||||
wrmsr(MSR_IDT_MCR0+i, 0, 0);
|
||||
}
|
||||
|
||||
static void __init winchip2_create_optimal_mcr(void)
|
||||
static void __cpuinit winchip2_create_optimal_mcr(void)
|
||||
{
|
||||
u32 lo, hi;
|
||||
int i;
|
||||
@@ -227,7 +227,7 @@ static void __init winchip2_create_optimal_mcr(void)
|
||||
* Handle the MCR key on the Winchip 2.
|
||||
*/
|
||||
|
||||
static void __init winchip2_unprotect_mcr(void)
|
||||
static void __cpuinit winchip2_unprotect_mcr(void)
|
||||
{
|
||||
u32 lo, hi;
|
||||
u32 key;
|
||||
@@ -239,7 +239,7 @@ static void __init winchip2_unprotect_mcr(void)
|
||||
wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
}
|
||||
|
||||
static void __init winchip2_protect_mcr(void)
|
||||
static void __cpuinit winchip2_protect_mcr(void)
|
||||
{
|
||||
u32 lo, hi;
|
||||
|
||||
@@ -257,7 +257,7 @@ static void __init winchip2_protect_mcr(void)
|
||||
#define RNG_ENABLED (1 << 3)
|
||||
#define RNG_ENABLE (1 << 6) /* MSR_VIA_RNG */
|
||||
|
||||
static void __init init_c3(struct cpuinfo_x86 *c)
|
||||
static void __cpuinit init_c3(struct cpuinfo_x86 *c)
|
||||
{
|
||||
u32 lo, hi;
|
||||
|
||||
@@ -303,7 +303,7 @@ static void __init init_c3(struct cpuinfo_x86 *c)
|
||||
display_cacheinfo(c);
|
||||
}
|
||||
|
||||
static void __init init_centaur(struct cpuinfo_x86 *c)
|
||||
static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
|
||||
{
|
||||
enum {
|
||||
ECX8=1<<1,
|
||||
@@ -442,7 +442,7 @@ static void __init init_centaur(struct cpuinfo_x86 *c)
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int centaur_size_cache(struct cpuinfo_x86 * c, unsigned int size)
|
||||
static unsigned int __cpuinit centaur_size_cache(struct cpuinfo_x86 * c, unsigned int size)
|
||||
{
|
||||
/* VIA C3 CPUs (670-68F) need further shifting. */
|
||||
if ((c->x86 == 6) && ((c->x86_model == 7) || (c->x86_model == 8)))
|
||||
@@ -457,7 +457,7 @@ static unsigned int centaur_size_cache(struct cpuinfo_x86 * c, unsigned int size
|
||||
return size;
|
||||
}
|
||||
|
||||
static struct cpu_dev centaur_cpu_dev __initdata = {
|
||||
static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
|
||||
.c_vendor = "Centaur",
|
||||
.c_ident = { "CentaurHauls" },
|
||||
.c_init = init_centaur,
|
||||
|
||||
@@ -36,7 +36,7 @@ struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
|
||||
|
||||
extern int disable_pse;
|
||||
|
||||
static void default_init(struct cpuinfo_x86 * c)
|
||||
static void __cpuinit default_init(struct cpuinfo_x86 * c)
|
||||
{
|
||||
/* Not much we can do here... */
|
||||
/* Check if at least it has cpuid */
|
||||
@@ -49,7 +49,7 @@ static void default_init(struct cpuinfo_x86 * c)
|
||||
}
|
||||
}
|
||||
|
||||
static struct cpu_dev default_cpu = {
|
||||
static struct cpu_dev __cpuinitdata default_cpu = {
|
||||
.c_init = default_init,
|
||||
.c_vendor = "Unknown",
|
||||
};
|
||||
@@ -265,7 +265,7 @@ static void __init early_cpu_detect(void)
|
||||
}
|
||||
}
|
||||
|
||||
void __cpuinit generic_identify(struct cpuinfo_x86 * c)
|
||||
static void __cpuinit generic_identify(struct cpuinfo_x86 * c)
|
||||
{
|
||||
u32 tfms, xlvl;
|
||||
int ebx;
|
||||
@@ -675,7 +675,7 @@ old_gdt:
|
||||
#endif
|
||||
|
||||
/* Clear %fs and %gs. */
|
||||
asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
|
||||
asm volatile ("movl %0, %%fs; movl %0, %%gs" : : "r" (0));
|
||||
|
||||
/* Clear all 6 debug registers: */
|
||||
set_debugreg(0, 0);
|
||||
|
||||
@@ -24,7 +24,5 @@ extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
|
||||
extern int get_model_name(struct cpuinfo_x86 *c);
|
||||
extern void display_cacheinfo(struct cpuinfo_x86 *c);
|
||||
|
||||
extern void generic_identify(struct cpuinfo_x86 * c);
|
||||
|
||||
extern void early_intel_workaround(struct cpuinfo_x86 *c);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user