Skip to content

Commit

Permalink
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6…
Browse files Browse the repository at this point in the history
…-x86

* ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86: (33 commits)
  x86: convert cpuinfo_x86 array to a per_cpu array
  x86: introduce frame_pointer() and stack_pointer()
  x86 & generic: change to __builtin_prefetch()
  i386: do not BUG_ON() when MSR is unknown
  x86: acpi use cpu_physical_id
  x86: convert cpu_llc_id to be a per cpu variable
  x86: convert cpu_to_apicid to be a per cpu variable
  i386: introduce "used_vectors" bitmap which can be used to reserve vectors.
  x86: use raw locks during oopses
  x86: honor _PAGE_PSE bit on page walks
  i386: do cpuid_device_create() in CPU_UP_PREPARE instead of CPU_ONLINE.
  x86: implement missing x86_64 function smp_call_function_mask()
  x86: use descriptor's functions instead of inline assembly
  i386: consolidate show_regs and show_registers for i386
  i386: make callgraph use dump_trace() on i386/x86_64
  x86: enable iommu_merge by default
  i386: i386 add AMD64 Barcelona PMU MSR definitions to msr.h
  x86: Unify i386 and x86-64 early quirks
  x86: enable HPET on ICH3 and ICH4
  x86: force enable HPET on VT8235/8237 chipsets
  ...

Manually fix trivial conflict with task pid container helper changes in
arch/x86/kernel/process_32.c
  • Loading branch information
Linus Torvalds committed Oct 19, 2007
2 parents b04cde3 + 92cb761 commit 60812a4
Show file tree
Hide file tree
Showing 97 changed files with 754 additions and 700 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.lst
Expand Down
6 changes: 4 additions & 2 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,10 @@ and is between 256 and 4096 characters. It is defined in the file
over the 8254 in addition to over the IO-APIC. The
kernel tries to set a sensible default.

hpet= [X86-32,HPET] option to disable HPET and use PIT.
Format: disable
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)

com20020= [HW,NET] ARCnet - COM20020 chipset
Format:
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ config APM_REAL_MODE_POWER_OFF

endif # APM

source "arch/x86/kernel/cpu/cpufreq/Kconfig"
source "arch/x86/kernel/cpu/cpufreq/Kconfig_32"

source "drivers/cpuidle/Kconfig"

Expand Down
6 changes: 3 additions & 3 deletions arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ core-$(CONFIG_XEN) += arch/x86/xen/
# default subarch .h files
mflags-y += -Iinclude/asm-x86/mach-default

head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task_32.o
head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task.o

libs-y += arch/x86/lib/
core-y += arch/x86/kernel/ \
Expand Down Expand Up @@ -131,9 +131,9 @@ all: bzImage
zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage

zImage bzImage: vmlinux
$(Q)mkdir -p $(objtree)/arch/i386/boot
$(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage
$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
$(Q)mkdir -p $(objtree)/arch/i386/boot
$(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage

compressed: zImage

Expand Down
124 changes: 46 additions & 78 deletions arch/x86/ia32/ia32_binfmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
* This tricks binfmt_elf.c into loading 32bit binaries using lots
* of ugly preprocessor tricks. Talk about very very poor man's inheritance.
*/
#define __ASM_X86_64_ELF_H 1

#undef ELF_CLASS
#define ELF_CLASS ELFCLASS32

#include <linux/types.h>
#include <linux/stddef.h>
Expand All @@ -19,6 +15,7 @@
#include <linux/binfmts.h>
#include <linux/mm.h>
#include <linux/security.h>
#include <linux/elfcore-compat.h>

#include <asm/segment.h>
#include <asm/ptrace.h>
Expand All @@ -31,6 +28,20 @@
#include <asm/ia32.h>
#include <asm/vsyscall32.h>

#undef ELF_ARCH
#undef ELF_CLASS
#define ELF_CLASS ELFCLASS32
#define ELF_ARCH EM_386

#undef elfhdr
#undef elf_phdr
#undef elf_note
#undef elf_addr_t
#define elfhdr elf32_hdr
#define elf_phdr elf32_phdr
#define elf_note elf32_note
#define elf_addr_t Elf32_Off

#define ELF_NAME "elf/i386"

#define AT_SYSINFO 32
Expand All @@ -48,74 +59,20 @@ int sysctl_vsyscall32 = 1;
} while(0)

struct file;
struct elf_phdr;

#define IA32_EMULATOR 1

#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)

#undef ELF_ARCH
#define ELF_ARCH EM_386

#define ELF_DATA ELFDATA2LSB
#undef ELF_ET_DYN_BASE

#define USE_ELF_CORE_DUMP 1

/* Override elfcore.h */
#define _LINUX_ELFCORE_H 1
typedef unsigned int elf_greg_t;

#define ELF_NGREG (sizeof (struct user_regs_struct32) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];

struct elf_siginfo
{
int si_signo; /* signal number */
int si_code; /* extra code */
int si_errno; /* errno */
};
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)

#define jiffies_to_timeval(a,b) do { (b)->tv_usec = 0; (b)->tv_sec = (a)/HZ; }while(0)

struct elf_prstatus
{
struct elf_siginfo pr_info; /* Info associated with signal */
short pr_cursig; /* Current signal */
unsigned int pr_sigpend; /* Set of pending signals */
unsigned int pr_sighold; /* Set of held signals */
pid_t pr_pid;
pid_t pr_ppid;
pid_t pr_pgrp;
pid_t pr_sid;
struct compat_timeval pr_utime; /* User time */
struct compat_timeval pr_stime; /* System time */
struct compat_timeval pr_cutime; /* Cumulative user time */
struct compat_timeval pr_cstime; /* Cumulative system time */
elf_gregset_t pr_reg; /* GP registers */
int pr_fpvalid; /* True if math co-processor being used. */
};

#define ELF_PRARGSZ (80) /* Number of chars for args */

struct elf_prpsinfo
{
char pr_state; /* numeric process state */
char pr_sname; /* char for pr_state */
char pr_zomb; /* zombie */
char pr_nice; /* nice val */
unsigned int pr_flag; /* flags */
__u16 pr_uid;
__u16 pr_gid;
pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
/* Lots missing */
char pr_fname[16]; /* filename of executable */
char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
};

#define _GET_SEG(x) \
({ __u32 seg; asm("movl %%" __stringify(x) ",%0" : "=r"(seg)); seg; })

/* Assumes current==process to be dumped */
#undef ELF_CORE_COPY_REGS
#define ELF_CORE_COPY_REGS(pr_reg, regs) \
pr_reg[0] = regs->rbx; \
pr_reg[1] = regs->rcx; \
Expand All @@ -135,36 +92,41 @@ struct elf_prpsinfo
pr_reg[15] = regs->rsp; \
pr_reg[16] = regs->ss;

#define user user32

#define elf_prstatus compat_elf_prstatus
#define elf_prpsinfo compat_elf_prpsinfo
#define elf_fpregset_t struct user_i387_ia32_struct
#define elf_fpxregset_t struct user32_fxsr_struct
#define user user32

#undef elf_read_implies_exec
#define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X)
//#include <asm/ia32.h>
#include <linux/elf.h>

typedef struct user_i387_ia32_struct elf_fpregset_t;
typedef struct user32_fxsr_struct elf_fpxregset_t;


static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
#define elf_core_copy_regs elf32_core_copy_regs
static inline void elf32_core_copy_regs(compat_elf_gregset_t *elfregs,
struct pt_regs *regs)
{
ELF_CORE_COPY_REGS((*elfregs), regs)
ELF_CORE_COPY_REGS((&elfregs->ebx), regs)
}

static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
#define elf_core_copy_task_regs elf32_core_copy_task_regs
static inline int elf32_core_copy_task_regs(struct task_struct *t,
compat_elf_gregset_t* elfregs)
{
struct pt_regs *pp = task_pt_regs(t);
ELF_CORE_COPY_REGS((*elfregs), pp);
ELF_CORE_COPY_REGS((&elfregs->ebx), pp);
/* fix wrong segments */
(*elfregs)[7] = t->thread.ds;
(*elfregs)[9] = t->thread.fsindex;
(*elfregs)[10] = t->thread.gsindex;
(*elfregs)[8] = t->thread.es;
elfregs->ds = t->thread.ds;
elfregs->fs = t->thread.fsindex;
elfregs->gs = t->thread.gsindex;
elfregs->es = t->thread.es;
return 1;
}

#define elf_core_copy_task_fpregs elf32_core_copy_task_fpregs
static inline int
elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpregset_t *fpu)
elf32_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs,
elf_fpregset_t *fpu)
{
struct _fpstate_ia32 *fpstate = (void*)fpu;
mm_segment_t oldfs = get_fs();
Expand All @@ -186,8 +148,9 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr

#define ELF_CORE_COPY_XFPREGS 1
#define ELF_CORE_XFPREG_TYPE NT_PRXFPREG
#define elf_core_copy_task_xfpregs elf32_core_copy_task_xfpregs
static inline int
elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu)
elf32_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu)
{
struct pt_regs *regs = task_pt_regs(t);
if (!tsk_used_math(t))
Expand All @@ -206,6 +169,10 @@ elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu)

extern int force_personality32;

#undef ELF_EXEC_PAGESIZE
#undef ELF_HWCAP
#undef ELF_PLATFORM
#undef SET_PERSONALITY
#define ELF_EXEC_PAGESIZE PAGE_SIZE
#define ELF_HWCAP (boot_cpu_data.x86_capability[0])
#define ELF_PLATFORM ("i686")
Expand All @@ -231,6 +198,7 @@ do { \

#define load_elf_binary load_elf32_binary

#undef ELF_PLAT_INIT
#define ELF_PLAT_INIT(r, load_addr) elf32_init(r)

#undef start_thread
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/kernel/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

extra-y := head_32.o init_task_32.o vmlinux.lds
extra-y := head_32.o init_task.o vmlinux.lds

obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \
ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \
Expand All @@ -17,6 +17,7 @@ obj-$(CONFIG_MCA) += mca_32.o
obj-$(CONFIG_X86_MSR) += msr.o
obj-$(CONFIG_X86_CPUID) += cpuid.o
obj-$(CONFIG_MICROCODE) += microcode.o
obj-$(CONFIG_PCI) += early-quirks.o
obj-$(CONFIG_APM) += apm_32.o
obj-$(CONFIG_X86_SMP) += smp_32.o smpboot_32.o tsc_sync.o
obj-$(CONFIG_SMP) += smpcommon_32.o
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

extra-y := head_64.o head64.o init_task_64.o vmlinux.lds
extra-y := head_64.o head64.o init_task.o vmlinux.lds
EXTRA_AFLAGS := -traditional
obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \
ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \
Expand Down Expand Up @@ -39,7 +39,7 @@ obj-$(CONFIG_K8_NB) += k8.o
obj-$(CONFIG_AUDIT) += audit_64.o

obj-$(CONFIG_MODULES) += module_64.o
obj-$(CONFIG_PCI) += early-quirks_64.o
obj-$(CONFIG_PCI) += early-quirks.o

obj-y += topology.o
obj-y += intel_cacheinfo.o
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/kernel/acpi/Makefile_32
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
obj-$(CONFIG_ACPI) += boot.o
ifneq ($(CONFIG_PCI),)
obj-$(CONFIG_X86_IO_APIC) += earlyquirk_32.o
endif
obj-$(CONFIG_ACPI_SLEEP) += sleep_32.o wakeup_32.o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ EXPORT_SYMBOL(acpi_map_lsapic);

int acpi_unmap_lsapic(int cpu)
{
x86_cpu_to_apicid[cpu] = -1;
per_cpu(x86_cpu_to_apicid, cpu) = -1;
cpu_clear(cpu, cpu_present_map);
num_processors--;

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/acpi/cstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
unsigned int cpu)
{
struct cpuinfo_x86 *c = cpu_data + cpu;
struct cpuinfo_x86 *c = &cpu_data(cpu);

flags->bm_check = 0;
if (num_online_cpus() == 1)
Expand Down Expand Up @@ -72,7 +72,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
struct acpi_processor_cx *cx, struct acpi_power_register *reg)
{
struct cstate_entry *percpu_entry;
struct cpuinfo_x86 *c = cpu_data + cpu;
struct cpuinfo_x86 *c = &cpu_data(cpu);

cpumask_t saved_mask;
int retval;
Expand Down
Loading

0 comments on commit 60812a4

Please sign in to comment.