Skip to content

Commit

Permalink
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Browse files Browse the repository at this point in the history
* ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (35 commits)
  x86: Add HPET force support for MCP55 (nForce 5) chipsets
  x86: Force enable HPET for CK804 (nForce 4) chipsets
  x86: clean up setup.h and the boot code
  x86: Save registers in saved_context during suspend and hibernation
  x86: merge setup_32/64.h
  x86: merge signal_32/64.h
  x86: merge required-features.h
  x86: merge sigcontext_32/64.h
  x86: merge msr_32/64.h
  x86: merge mttr_32/64.h
  x86: merge statfs_32/64.h
  x86: merge stat_32/64.h
  x86: merge shmbuf_32/64.h
  x86: merge ptrace_32/64.h
  x86: merge msgbuf_32/64.h
  x86: merge elf_32/64.h
  x86: merge byteorder_32/64.h
  x86: whitespace cleanup of mce_64.c
  x86: consolidate the cpu/ related code usage
  x86: prepare consolidation of cpu/ related code usage
  ...
  • Loading branch information
Linus Torvalds committed Oct 23, 2007
2 parents 1212663 + 1b82ba6 commit a7aed1c
Show file tree
Hide file tree
Showing 88 changed files with 2,368 additions and 3,029 deletions.
3 changes: 2 additions & 1 deletion Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ and is between 256 and 4096 characters. It is defined in the file
hpet= [X86-32,HPET] option to control HPET usage
Format: { enable (default) | disable | force }
disable: disable HPET and use PIT instead
force: allow force enabled of undocumented chips (ICH4, VIA)
force: allow force enabled of undocumented chips (ICH4,
VIA, nVidia)

com20020= [HW,NET] ARCnet - COM20020 chipset
Format:
Expand Down
2 changes: 2 additions & 0 deletions arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,8 @@ source "drivers/Kconfig"

source "fs/Kconfig"

source "kernel/Kconfig.instrumentation"

source "arch/i386/Kconfig.debug"

source "security/Kconfig"
Expand Down
6 changes: 6 additions & 0 deletions arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
# Fill in SRCARCH
SRCARCH := x86

# BITS is used as extension for files which are available in a 32 bit
# and a 64 bit version to simplify shared Makefiles.
# e.g.: obj-y += foo_$(BITS).o
BITS := 32
export BITS

HAS_BIARCH := $(call cc-option-yn, -m32)
ifeq ($(HAS_BIARCH),y)
AS := $(AS) --32
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/types.h>
#include <linux/edd.h>
#include <asm/boot.h>
#include <asm/bootparam.h>
#include <asm/setup.h>

/* Useful macros */
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
Expand Down
6 changes: 2 additions & 4 deletions arch/x86/boot/compressed/relocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ static const char* safe_abs_relocs[] = {

static int is_safe_abs_reloc(const char* sym_name)
{
int i, array_size;

array_size = sizeof(safe_abs_relocs)/sizeof(char*);
int i;

for(i = 0; i < array_size; i++) {
for(i = 0; i < ARRAY_SIZE(safe_abs_relocs); i++) {
if (!strcmp(sym_name, safe_abs_relocs[i]))
/* Match found */
return 1;
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ char *heap_end = _end; /* Default end of heap = no heap */
* screws up the old-style command line protocol, adjust by
* filling in the new-style command line pointer instead.
*/
#define OLD_CL_MAGIC 0xA33F
#define OLD_CL_ADDRESS 0x20

static void copy_boot_params(void)
{
Expand Down
20 changes: 15 additions & 5 deletions arch/x86/crypto/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
ifeq ($(CONFIG_X86_32),y)
include ${srctree}/arch/x86/crypto/Makefile_32
else
include ${srctree}/arch/x86/crypto/Makefile_64
endif
#
# Arch-specific CryptoAPI modules.
#

obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o
obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o

obj-$(CONFIG_CRYPTO_AES_X86_64) += aes-x86_64.o
obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o

aes-i586-y := aes-i586-asm_32.o aes_32.o
twofish-i586-y := twofish-i586-asm_32.o twofish_32.o

aes-x86_64-y := aes-x86_64-asm_64.o aes_64.o
twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_64.o
12 changes: 0 additions & 12 deletions arch/x86/crypto/Makefile_32

This file was deleted.

12 changes: 0 additions & 12 deletions arch/x86/crypto/Makefile_64

This file was deleted.

2 changes: 1 addition & 1 deletion arch/x86/kernel/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ obj-$(CONFIG_X86_MPPARSE) += mpparse_32.o
obj-$(CONFIG_X86_LOCAL_APIC) += apic_32.o nmi_32.o
obj-$(CONFIG_X86_IO_APIC) += io_apic_32.o
obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o
obj-$(CONFIG_KEXEC) += machine_kexec_32.o relocate_kernel_32.o crash_32.o
obj-$(CONFIG_KEXEC) += machine_kexec_32.o relocate_kernel_32.o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_32.o
obj-$(CONFIG_X86_NUMAQ) += numaq_32.o
obj-$(CONFIG_X86_SUMMIT_NUMA) += summit_32.o
Expand Down
19 changes: 4 additions & 15 deletions arch/x86/kernel/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,21 @@ obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \
x8664_ksyms_64.o i387_64.o syscall_64.o vsyscall_64.o \
setup64.o bootflag.o e820_64.o reboot_64.o quirks.o i8237.o \
pci-dma_64.o pci-nommu_64.o alternative.o hpet.o tsc_64.o bugs_64.o \
perfctr-watchdog.o i8253.o
i8253.o

obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_X86_MCE) += mce_64.o therm_throt.o
obj-$(CONFIG_X86_MCE_INTEL) += mce_intel_64.o
obj-$(CONFIG_X86_MCE_AMD) += mce_amd_64.o
obj-$(CONFIG_MTRR) += cpu/mtrr/
obj-$(CONFIG_ACPI) += acpi/
obj-y += cpu/
obj-y += acpi/
obj-$(CONFIG_X86_MSR) += msr.o
obj-$(CONFIG_MICROCODE) += microcode.o
obj-$(CONFIG_X86_CPUID) += cpuid.o
obj-$(CONFIG_SMP) += smp_64.o smpboot_64.o trampoline_64.o tsc_sync.o
obj-y += apic_64.o nmi_64.o
obj-y += io_apic_64.o mpparse_64.o genapic_64.o genapic_flat_64.o
obj-$(CONFIG_KEXEC) += machine_kexec_64.o relocate_kernel_64.o crash_64.o
obj-$(CONFIG_KEXEC) += machine_kexec_64.o relocate_kernel_64.o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_64.o
obj-$(CONFIG_PM) += suspend_64.o
obj-$(CONFIG_HIBERNATION) += suspend_asm_64.o
obj-$(CONFIG_CPU_FREQ) += cpu/cpufreq/
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_IOMMU) += pci-gart_64.o aperture_64.o
obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o
Expand All @@ -42,13 +38,6 @@ obj-$(CONFIG_MODULES) += module_64.o
obj-$(CONFIG_PCI) += early-quirks.o

obj-y += topology.o
obj-y += intel_cacheinfo.o
obj-y += addon_cpuid_features.o
obj-y += pcspeaker.o

CFLAGS_vsyscall_64.o := $(PROFILING) -g0

therm_throt-y += cpu/mcheck/therm_throt.o
intel_cacheinfo-y += cpu/intel_cacheinfo.o
addon_cpuid_features-y += cpu/addon_cpuid_features.o
perfctr-watchdog-y += cpu/perfctr-watchdog.o
10 changes: 6 additions & 4 deletions arch/x86/kernel/acpi/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ifeq ($(CONFIG_X86_32),y)
include ${srctree}/arch/x86/kernel/acpi/Makefile_32
else
include ${srctree}/arch/x86/kernel/acpi/Makefile_64
obj-$(CONFIG_ACPI) += boot.o
obj-$(CONFIG_ACPI_SLEEP) += sleep_$(BITS).o wakeup_$(BITS).o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += cstate.o processor.o
endif

7 changes: 0 additions & 7 deletions arch/x86/kernel/acpi/Makefile_32

This file was deleted.

7 changes: 0 additions & 7 deletions arch/x86/kernel/acpi/Makefile_64

This file was deleted.

101 changes: 53 additions & 48 deletions arch/x86/kernel/acpi/wakeup_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/msr.h>
#include <asm/asm-offsets.h>

# Copyright 2003 Pavel Machek <pavel@suse.cz>, distribute under GPLv2
#
Expand Down Expand Up @@ -342,31 +343,32 @@ do_suspend_lowlevel:
xorl %eax, %eax
call save_processor_state

movq %rsp, saved_context_esp(%rip)
movq %rax, saved_context_eax(%rip)
movq %rbx, saved_context_ebx(%rip)
movq %rcx, saved_context_ecx(%rip)
movq %rdx, saved_context_edx(%rip)
movq %rbp, saved_context_ebp(%rip)
movq %rsi, saved_context_esi(%rip)
movq %rdi, saved_context_edi(%rip)
movq %r8, saved_context_r08(%rip)
movq %r9, saved_context_r09(%rip)
movq %r10, saved_context_r10(%rip)
movq %r11, saved_context_r11(%rip)
movq %r12, saved_context_r12(%rip)
movq %r13, saved_context_r13(%rip)
movq %r14, saved_context_r14(%rip)
movq %r15, saved_context_r15(%rip)
pushfq ; popq saved_context_eflags(%rip)
movq $saved_context, %rax
movq %rsp, pt_regs_rsp(%rax)
movq %rbp, pt_regs_rbp(%rax)
movq %rsi, pt_regs_rsi(%rax)
movq %rdi, pt_regs_rdi(%rax)
movq %rbx, pt_regs_rbx(%rax)
movq %rcx, pt_regs_rcx(%rax)
movq %rdx, pt_regs_rdx(%rax)
movq %r8, pt_regs_r8(%rax)
movq %r9, pt_regs_r9(%rax)
movq %r10, pt_regs_r10(%rax)
movq %r11, pt_regs_r11(%rax)
movq %r12, pt_regs_r12(%rax)
movq %r13, pt_regs_r13(%rax)
movq %r14, pt_regs_r14(%rax)
movq %r15, pt_regs_r15(%rax)
pushfq
popq pt_regs_eflags(%rax)

movq $.L97, saved_rip(%rip)

movq %rsp,saved_rsp
movq %rbp,saved_rbp
movq %rbx,saved_rbx
movq %rdi,saved_rdi
movq %rsi,saved_rsi
movq %rsp, saved_rsp
movq %rbp, saved_rbp
movq %rbx, saved_rbx
movq %rdi, saved_rdi
movq %rsi, saved_rsi

addq $8, %rsp
movl $3, %edi
Expand All @@ -377,32 +379,35 @@ do_suspend_lowlevel:
.L99:
.align 4
movl $24, %eax
movw %ax, %ds
movq saved_context+58(%rip), %rax
movq %rax, %cr4
movq saved_context+50(%rip), %rax
movq %rax, %cr3
movq saved_context+42(%rip), %rax
movq %rax, %cr2
movq saved_context+34(%rip), %rax
movq %rax, %cr0
pushq saved_context_eflags(%rip) ; popfq
movq saved_context_esp(%rip), %rsp
movq saved_context_ebp(%rip), %rbp
movq saved_context_eax(%rip), %rax
movq saved_context_ebx(%rip), %rbx
movq saved_context_ecx(%rip), %rcx
movq saved_context_edx(%rip), %rdx
movq saved_context_esi(%rip), %rsi
movq saved_context_edi(%rip), %rdi
movq saved_context_r08(%rip), %r8
movq saved_context_r09(%rip), %r9
movq saved_context_r10(%rip), %r10
movq saved_context_r11(%rip), %r11
movq saved_context_r12(%rip), %r12
movq saved_context_r13(%rip), %r13
movq saved_context_r14(%rip), %r14
movq saved_context_r15(%rip), %r15
movw %ax, %ds

/* We don't restore %rax, it must be 0 anyway */
movq $saved_context, %rax
movq saved_context_cr4(%rax), %rbx
movq %rbx, %cr4
movq saved_context_cr3(%rax), %rbx
movq %rbx, %cr3
movq saved_context_cr2(%rax), %rbx
movq %rbx, %cr2
movq saved_context_cr0(%rax), %rbx
movq %rbx, %cr0
pushq pt_regs_eflags(%rax)
popfq
movq pt_regs_rsp(%rax), %rsp
movq pt_regs_rbp(%rax), %rbp
movq pt_regs_rsi(%rax), %rsi
movq pt_regs_rdi(%rax), %rdi
movq pt_regs_rbx(%rax), %rbx
movq pt_regs_rcx(%rax), %rcx
movq pt_regs_rdx(%rax), %rdx
movq pt_regs_r8(%rax), %r8
movq pt_regs_r9(%rax), %r9
movq pt_regs_r10(%rax), %r10
movq pt_regs_r11(%rax), %r11
movq pt_regs_r12(%rax), %r12
movq pt_regs_r13(%rax), %r13
movq pt_regs_r14(%rax), %r14
movq pt_regs_r15(%rax), %r15

xorl %eax, %eax
addq $8, %rsp
Expand Down
14 changes: 14 additions & 0 deletions arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,20 @@ void disable_local_APIC(void)
apic_write(APIC_SPIV, value);
}

void lapic_shutdown(void)
{
unsigned long flags;

if (!cpu_has_apic)
return;

local_irq_save(flags);

disable_local_APIC();

local_irq_restore(flags);
}

/*
* This is to verify that we're looking at a real local APIC.
* Check these against your board if the CPUs aren't getting
Expand Down
28 changes: 28 additions & 0 deletions arch/x86/kernel/asm-offsets_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@ int main(void)
DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
DEFINE(pbe_next, offsetof(struct pbe, next));
BLANK();
#define ENTRY(entry) DEFINE(pt_regs_ ## entry, offsetof(struct pt_regs, entry))
ENTRY(rbx);
ENTRY(rbx);
ENTRY(rcx);
ENTRY(rdx);
ENTRY(rsp);
ENTRY(rbp);
ENTRY(rsi);
ENTRY(rdi);
ENTRY(r8);
ENTRY(r9);
ENTRY(r10);
ENTRY(r11);
ENTRY(r12);
ENTRY(r13);
ENTRY(r14);
ENTRY(r15);
ENTRY(eflags);
BLANK();
#undef ENTRY
#define ENTRY(entry) DEFINE(saved_context_ ## entry, offsetof(struct saved_context, entry))
ENTRY(cr0);
ENTRY(cr2);
ENTRY(cr3);
ENTRY(cr4);
ENTRY(cr8);
BLANK();
#undef ENTRY
DEFINE(TSS_ist, offsetof(struct tss_struct, ist));
BLANK();
DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
Expand Down
Loading

0 comments on commit a7aed1c

Please sign in to comment.