Skip to content

Commit 72a7369

Browse files
committed
Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (160 commits) x86: remove extra calling to get ext cpuid level x86: use setup_clear_cpu_cap() when disabling the lapic KVM: fix exception entry / build bug, on 64-bit x86: add unknown_nmi_panic kernel parameter x86, VisWS: turn into generic arch, eliminate leftover files x86: add ->pre_time_init to x86_quirks x86: extend and use x86_quirks to clean up NUMAQ code x86: introduce x86_quirks x86: improve debug printout: add target bootmem range in early_res_to_bootmem() Subject: devmem, x86: fix rename of CONFIG_NONPROMISC_DEVMEM x86: remove arch_get_ram_range x86: Add a debugfs interface to dump PAT memtype x86: Add a arch directory for x86 under debugfs x86: i386: reduce boot fixmap space i386/xen: add proper unwind annotations to xen_sysenter_target x86: reduce force_mwait visibility x86: reduce forbid_dac's visibility x86: fix two modpost warnings x86: check function status in EDD boot code x86_64: ia32_signal.c: remove signal number conversion ...
2 parents b7e6f62 + 2e2dcc7 commit 72a7369

File tree

152 files changed

+4292
-1753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+4292
-1753
lines changed

Documentation/kernel-parameters.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ and is between 256 and 4096 characters. It is defined in the file
12061206
or
12071207
memmap=0x10000$0x18690000
12081208

1209-
memtest= [KNL,X86_64] Enable memtest
1209+
memtest= [KNL,X86] Enable memtest
12101210
Format: <integer>
12111211
range: 0,4 : pattern number
12121212
default : 0 <disable>
@@ -2158,6 +2158,10 @@ and is between 256 and 4096 characters. It is defined in the file
21582158
Note that genuine overcurrent events won't be
21592159
reported either.
21602160

2161+
unknown_nmi_panic
2162+
[X86-32,X86-64]
2163+
Set unknown_nmi_panic=1 early on boot.
2164+
21612165
usbcore.autosuspend=
21622166
[USB] The autosuspend time delay (in seconds) used
21632167
for newly-detected USB devices (default 2). This

arch/x86/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ config PARAVIRT_DEBUG
447447

448448
config MEMTEST
449449
bool "Memtest"
450-
depends on X86_64
451450
help
452451
This option adds a kernel parameter 'memtest', which allows memtest
453452
to be set.

arch/x86/Kconfig.cpu

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,6 @@ config X86_ALIGNMENT_16
362362
def_bool y
363363
depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
364364

365-
config X86_GOOD_APIC
366-
def_bool y
367-
depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON || MCORE2 || MVIAC7 || X86_64
368-
369365
config X86_INTEL_USERCOPY
370366
def_bool y
371367
depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2

arch/x86/Kconfig.debug

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ config TRACE_IRQFLAGS_SUPPORT
55

66
source "lib/Kconfig.debug"
77

8-
config NONPROMISC_DEVMEM
8+
config STRICT_DEVMEM
99
bool "Filter access to /dev/mem"
1010
help
11-
If this option is left off, you allow userspace access to all
11+
If this option is left on, you allow userspace (root) access to all
1212
of memory, including kernel and userspace memory. Accidental
1313
access to this is obviously disastrous, but specific access can
14-
be used by people debugging the kernel.
14+
be used by people debugging the kernel. Note that with PAT support
15+
enabled, even in this case there are restrictions on /dev/mem
16+
use due to the cache aliasing requirements.
1517

1618
If this option is switched on, the /dev/mem file only allows
1719
userspace access to PCI space and the BIOS code and data regions.
@@ -287,7 +289,6 @@ config CPA_DEBUG
287289

288290
config OPTIMIZE_INLINING
289291
bool "Allow gcc to uninline functions marked 'inline'"
290-
depends on BROKEN
291292
help
292293
This option determines if the kernel forces gcc to inline the functions
293294
developers have marked 'inline'. Doing so takes away freedom from gcc to
@@ -298,5 +299,7 @@ config OPTIMIZE_INLINING
298299
become the default in the future, until then this option is there to
299300
test gcc for this.
300301

302+
If unsure, say N.
303+
301304
endmenu
302305

arch/x86/boot/edd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,8 @@ void query_edd(void)
167167
* Scan the BIOS-supported hard disks and query EDD
168168
* information...
169169
*/
170-
get_edd_info(devno, &ei);
171-
172-
if (boot_params.eddbuf_entries < EDDMAXNR) {
170+
if (!get_edd_info(devno, &ei)
171+
&& boot_params.eddbuf_entries < EDDMAXNR) {
173172
memcpy(edp, &ei, sizeof ei);
174173
edp++;
175174
boot_params.eddbuf_entries++;

arch/x86/boot/pm.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@ static void reset_coprocessor(void)
9898
/*
9999
* Set up the GDT
100100
*/
101-
#define GDT_ENTRY(flags, base, limit) \
102-
(((u64)(base & 0xff000000) << 32) | \
103-
((u64)flags << 40) | \
104-
((u64)(limit & 0x00ff0000) << 32) | \
105-
((u64)(base & 0x00ffffff) << 16) | \
106-
((u64)(limit & 0x0000ffff)))
107101

108102
struct gdt_ptr {
109103
u16 len;

arch/x86/configs/i386_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
20472047
# CONFIG_SAMPLES is not set
20482048
# CONFIG_KGDB is not set
20492049
CONFIG_HAVE_ARCH_KGDB=y
2050-
# CONFIG_NONPROMISC_DEVMEM is not set
2050+
# CONFIG_STRICT_DEVMEM is not set
20512051
CONFIG_EARLY_PRINTK=y
20522052
CONFIG_DEBUG_STACKOVERFLOW=y
20532053
CONFIG_DEBUG_STACK_USAGE=y

arch/x86/configs/x86_64_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
20122012
# CONFIG_SAMPLES is not set
20132013
# CONFIG_KGDB is not set
20142014
CONFIG_HAVE_ARCH_KGDB=y
2015-
# CONFIG_NONPROMISC_DEVMEM is not set
2015+
# CONFIG_STRICT_DEVMEM is not set
20162016
CONFIG_EARLY_PRINTK=y
20172017
CONFIG_DEBUG_STACKOVERFLOW=y
20182018
CONFIG_DEBUG_STACK_USAGE=y

arch/x86/ia32/ia32_signal.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636

3737
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
3838

39+
#define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | \
40+
X86_EFLAGS_DF | X86_EFLAGS_TF | X86_EFLAGS_SF | \
41+
X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \
42+
X86_EFLAGS_CF)
43+
3944
asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
4045
void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
4146

@@ -248,7 +253,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
248253
regs->ss |= 3;
249254

250255
err |= __get_user(tmpflags, &sc->flags);
251-
regs->flags = (regs->flags & ~0x40DD5) | (tmpflags & 0x40DD5);
256+
regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
252257
/* disable syscall checks */
253258
regs->orig_ax = -1;
254259

@@ -515,7 +520,6 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
515520
compat_sigset_t *set, struct pt_regs *regs)
516521
{
517522
struct rt_sigframe __user *frame;
518-
struct exec_domain *ed = current_thread_info()->exec_domain;
519523
void __user *restorer;
520524
int err = 0;
521525

@@ -538,8 +542,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
538542
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
539543
goto give_sigsegv;
540544

541-
err |= __put_user((ed && ed->signal_invmap && sig < 32
542-
? ed->signal_invmap[sig] : sig), &frame->sig);
545+
err |= __put_user(sig, &frame->sig);
543546
err |= __put_user(ptr_to_compat(&frame->info), &frame->pinfo);
544547
err |= __put_user(ptr_to_compat(&frame->uc), &frame->puc);
545548
err |= copy_siginfo_to_user32(&frame->info, info);

arch/x86/ia32/ia32entry.S

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
movq %rax,R8(%rsp)
3838
.endm
3939

40+
/*
41+
* Reload arg registers from stack in case ptrace changed them.
42+
* We don't reload %eax because syscall_trace_enter() returned
43+
* the value it wants us to use in the table lookup.
44+
*/
4045
.macro LOAD_ARGS32 offset
4146
movl \offset(%rsp),%r11d
4247
movl \offset+8(%rsp),%r10d
@@ -46,7 +51,6 @@
4651
movl \offset+48(%rsp),%edx
4752
movl \offset+56(%rsp),%esi
4853
movl \offset+64(%rsp),%edi
49-
movl \offset+72(%rsp),%eax
5054
.endm
5155

5256
.macro CFI_STARTPROC32 simple
@@ -137,13 +141,12 @@ ENTRY(ia32_sysenter_target)
137141
.previous
138142
GET_THREAD_INFO(%r10)
139143
orl $TS_COMPAT,TI_status(%r10)
140-
testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \
141-
TI_flags(%r10)
144+
testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
142145
CFI_REMEMBER_STATE
143146
jnz sysenter_tracesys
144-
sysenter_do_call:
145147
cmpl $(IA32_NR_syscalls-1),%eax
146148
ja ia32_badsys
149+
sysenter_do_call:
147150
IA32_ARG_FIXUP 1
148151
call *ia32_sys_call_table(,%rax,8)
149152
movq %rax,RAX-ARGOFFSET(%rsp)
@@ -242,8 +245,7 @@ ENTRY(ia32_cstar_target)
242245
.previous
243246
GET_THREAD_INFO(%r10)
244247
orl $TS_COMPAT,TI_status(%r10)
245-
testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \
246-
TI_flags(%r10)
248+
testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
247249
CFI_REMEMBER_STATE
248250
jnz cstar_tracesys
249251
cstar_do_call:
@@ -321,6 +323,7 @@ ENTRY(ia32_syscall)
321323
/*CFI_REL_OFFSET rflags,EFLAGS-RIP*/
322324
/*CFI_REL_OFFSET cs,CS-RIP*/
323325
CFI_REL_OFFSET rip,RIP-RIP
326+
PARAVIRT_ADJUST_EXCEPTION_FRAME
324327
SWAPGS
325328
/*
326329
* No need to follow this irqs on/off section: the syscall
@@ -336,8 +339,7 @@ ENTRY(ia32_syscall)
336339
SAVE_ARGS 0,0,1
337340
GET_THREAD_INFO(%r10)
338341
orl $TS_COMPAT,TI_status(%r10)
339-
testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \
340-
TI_flags(%r10)
342+
testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
341343
jnz ia32_tracesys
342344
ia32_do_syscall:
343345
cmpl $(IA32_NR_syscalls-1),%eax

arch/x86/kernel/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ extra-y := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinu
77
CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
88

99
ifdef CONFIG_FTRACE
10-
# Do not profile debug utilities
10+
# Do not profile debug and lowlevel utilities
1111
CFLAGS_REMOVE_tsc.o = -pg
1212
CFLAGS_REMOVE_rtc.o = -pg
13+
CFLAGS_REMOVE_paravirt.o = -pg
1314
endif
1415

1516
#
@@ -102,6 +103,7 @@ obj-$(CONFIG_OLPC) += olpc.o
102103
# 64 bit specific files
103104
ifeq ($(CONFIG_X86_64),y)
104105
obj-y += genapic_64.o genapic_flat_64.o genx2apic_uv_x.o tlb_uv.o
106+
obj-y += bios_uv.o
105107
obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o
106108
obj-$(CONFIG_AUDIT) += audit_64.o
107109

arch/x86/kernel/acpi/sleep.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/bootmem.h>
1010
#include <linux/dmi.h>
1111
#include <linux/cpumask.h>
12+
#include <asm/segment.h>
1213

1314
#include "realmode/wakeup.h"
1415
#include "sleep.h"
@@ -23,15 +24,6 @@ static unsigned long acpi_realmode;
2324
static char temp_stack[10240];
2425
#endif
2526

26-
/* XXX: this macro should move to asm-x86/segment.h and be shared with the
27-
boot code... */
28-
#define GDT_ENTRY(flags, base, limit) \
29-
(((u64)(base & 0xff000000) << 32) | \
30-
((u64)flags << 40) | \
31-
((u64)(limit & 0x00ff0000) << 32) | \
32-
((u64)(base & 0x00ffffff) << 16) | \
33-
((u64)(limit & 0x0000ffff)))
34-
3527
/**
3628
* acpi_save_state_mem - save kernel state
3729
*

0 commit comments

Comments
 (0)