Skip to content

Commit 019abbc

Browse files
committed
Merge branch 'x86-stage-3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-stage-3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (190 commits) Revert "cpuacct: reduce one NULL check in fast-path" Revert "x86: don't compile vsmp_64 for 32bit" x86: Correct behaviour of irq affinity x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe x86: use default_cpu_mask_to_apicid for 64bit x86: fix set_extra_move_desc calling x86, PAT, PCI: Change vma prot in pci_mmap to reflect inherited prot x86/dmi: fix dmi_alloc() section mismatches x86: e820 fix various signedness issues in setup.c and e820.c x86: apic/io_apic.c define msi_ir_chip and ir_ioapic_chip all the time x86: irq.c keep CONFIG_X86_LOCAL_APIC interrupts together x86: irq.c use same path for show_interrupts x86: cpu/cpu.h cleanup x86: Fix a couple of sparse warnings in arch/x86/kernel/apic/io_apic.c Revert "x86: create a non-zero sized bm_pte only when needed" x86: pci-nommu.c cleanup x86: io_delay.c cleanup x86: rtc.c cleanup x86: i8253 cleanup x86: kdebugfs.c cleanup ...
2 parents 2d25ee3 + 5a3c8fe commit 019abbc

File tree

145 files changed

+6465
-3583
lines changed

Some content is hidden

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

145 files changed

+6465
-3583
lines changed

Documentation/x86/earlyprintk.txt

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
2+
Mini-HOWTO for using the earlyprintk=dbgp boot option with a
3+
USB2 Debug port key and a debug cable, on x86 systems.
4+
5+
You need two computers, the 'USB debug key' special gadget and
6+
and two USB cables, connected like this:
7+
8+
[host/target] <-------> [USB debug key] <-------> [client/console]
9+
10+
1. There are three specific hardware requirements:
11+
12+
a.) Host/target system needs to have USB debug port capability.
13+
14+
You can check this capability by looking at a 'Debug port' bit in
15+
the lspci -vvv output:
16+
17+
# lspci -vvv
18+
...
19+
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
20+
Subsystem: Lenovo ThinkPad T61
21+
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
22+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
23+
Latency: 0
24+
Interrupt: pin D routed to IRQ 19
25+
Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K]
26+
Capabilities: [50] Power Management version 2
27+
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
28+
Status: D0 PME-Enable- DSel=0 DScale=0 PME+
29+
Capabilities: [58] Debug port: BAR=1 offset=00a0
30+
^^^^^^^^^^^ <==================== [ HERE ]
31+
Kernel driver in use: ehci_hcd
32+
Kernel modules: ehci-hcd
33+
...
34+
35+
( If your system does not list a debug port capability then you probably
36+
wont be able to use the USB debug key. )
37+
38+
b.) You also need a Netchip USB debug cable/key:
39+
40+
http://www.plxtech.com/products/NET2000/NET20DC/default.asp
41+
42+
This is a small blue plastic connector with two USB connections,
43+
it draws power from its USB connections.
44+
45+
c.) Thirdly, you need a second client/console system with a regular USB port.
46+
47+
2. Software requirements:
48+
49+
a.) On the host/target system:
50+
51+
You need to enable the following kernel config option:
52+
53+
CONFIG_EARLY_PRINTK_DBGP=y
54+
55+
And you need to add the boot command line: "earlyprintk=dbgp".
56+
(If you are using Grub, append it to the 'kernel' line in
57+
/etc/grub.conf)
58+
59+
NOTE: normally earlyprintk console gets turned off once the
60+
regular console is alive - use "earlyprintk=dbgp,keep" to keep
61+
this channel open beyond early bootup. This can be useful for
62+
debugging crashes under Xorg, etc.
63+
64+
b.) On the client/console system:
65+
66+
You should enable the following kernel config option:
67+
68+
CONFIG_USB_SERIAL_DEBUG=y
69+
70+
On the next bootup with the modified kernel you should
71+
get a /dev/ttyUSBx device(s).
72+
73+
Now this channel of kernel messages is ready to be used: start
74+
your favorite terminal emulator (minicom, etc.) and set
75+
it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to
76+
see the raw output.
77+
78+
c.) On Nvidia Southbridge based systems: the kernel will try to probe
79+
and find out which port has debug device connected.
80+
81+
3. Testing that it works fine:
82+
83+
You can test the output by using earlyprintk=dbgp,keep and provoking
84+
kernel messages on the host/target system. You can provoke a harmless
85+
kernel message by for example doing:
86+
87+
echo h > /proc/sysrq-trigger
88+
89+
On the host/target system you should see this help line in "dmesg" output:
90+
91+
SysRq : HELP : loglevel(0-9) reBoot Crashdump terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) dump-ftrace-buffer(Z)
92+
93+
On the client/console system do:
94+
95+
cat /dev/ttyUSB0
96+
97+
And you should see the help line above displayed shortly after you've
98+
provoked it on the host system.
99+
100+
If it does not work then please ask about it on the [email protected]
101+
mailing list or contact the x86 maintainers.

arch/x86/Kconfig

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,11 @@ config X86_MCE_AMD
786786
Additional support for AMD specific MCE features such as
787787
the DRAM Error Threshold.
788788

789+
config X86_MCE_THRESHOLD
790+
depends on X86_MCE_AMD || X86_MCE_INTEL
791+
bool
792+
default y
793+
789794
config X86_MCE_NONFATAL
790795
tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4"
791796
depends on X86_32 && X86_MCE
@@ -929,6 +934,12 @@ config X86_CPUID
929934
with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
930935
/dev/cpu/31/cpuid.
931936

937+
config X86_CPU_DEBUG
938+
tristate "/sys/kernel/debug/x86/cpu/* - CPU Debug support"
939+
---help---
940+
If you select this option, this will provide various x86 CPUs
941+
information through debugfs.
942+
932943
choice
933944
prompt "High Memory Support"
934945
default HIGHMEM4G if !X86_NUMAQ
@@ -1121,7 +1132,7 @@ config NUMA_EMU
11211132

11221133
config NODES_SHIFT
11231134
int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
1124-
range 1 9 if X86_64
1135+
range 1 9
11251136
default "9" if MAXSMP
11261137
default "6" if X86_64
11271138
default "4" if X86_NUMAQ
@@ -1429,7 +1440,7 @@ config CRASH_DUMP
14291440
config KEXEC_JUMP
14301441
bool "kexec jump (EXPERIMENTAL)"
14311442
depends on EXPERIMENTAL
1432-
depends on KEXEC && HIBERNATION && X86_32
1443+
depends on KEXEC && HIBERNATION
14331444
---help---
14341445
Jump between original kernel and kexeced kernel and invoke
14351446
code in physical address mode via KEXEC

arch/x86/Kconfig.cpu

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -456,24 +456,9 @@ config CPU_SUP_AMD
456456

457457
If unsure, say N.
458458

459-
config CPU_SUP_CENTAUR_32
459+
config CPU_SUP_CENTAUR
460460
default y
461461
bool "Support Centaur processors" if PROCESSOR_SELECT
462-
depends on !64BIT
463-
---help---
464-
This enables detection, tunings and quirks for Centaur processors
465-
466-
You need this enabled if you want your kernel to run on a
467-
Centaur CPU. Disabling this option on other types of CPUs
468-
makes the kernel a tiny bit smaller. Disabling it on a Centaur
469-
CPU might render the kernel unbootable.
470-
471-
If unsure, say N.
472-
473-
config CPU_SUP_CENTAUR_64
474-
default y
475-
bool "Support Centaur processors" if PROCESSOR_SELECT
476-
depends on 64BIT
477462
---help---
478463
This enables detection, tunings and quirks for Centaur processors
479464

arch/x86/Makefile

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -153,34 +153,23 @@ endif
153153

154154
boot := arch/x86/boot
155155

156-
PHONY += zImage bzImage compressed zlilo bzlilo \
157-
zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install
156+
BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage install
157+
158+
PHONY += bzImage $(BOOT_TARGETS)
158159

159160
# Default kernel to build
160161
all: bzImage
161162

162163
# KBUILD_IMAGE specify target image being built
163-
KBUILD_IMAGE := $(boot)/bzImage
164-
zImage zlilo zdisk: KBUILD_IMAGE := $(boot)/zImage
164+
KBUILD_IMAGE := $(boot)/bzImage
165165

166-
zImage bzImage: vmlinux
166+
bzImage: vmlinux
167167
$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
168168
$(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
169169
$(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@
170170

171-
compressed: zImage
172-
173-
zlilo bzlilo: vmlinux
174-
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zlilo
175-
176-
zdisk bzdisk: vmlinux
177-
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zdisk
178-
179-
fdimage fdimage144 fdimage288 isoimage: vmlinux
180-
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
181-
182-
install:
183-
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
171+
$(BOOT_TARGETS): vmlinux
172+
$(Q)$(MAKE) $(build)=$(boot) $@
184173

185174
PHONY += vdso_install
186175
vdso_install:
@@ -205,7 +194,3 @@ define archhelp
205194
echo ' FDARGS="..." arguments for the booted kernel'
206195
echo ' FDINITRD=file initrd for the booted kernel'
207196
endef
208-
209-
CLEAN_FILES += arch/x86/boot/fdimage \
210-
arch/x86/boot/image.iso \
211-
arch/x86/boot/mtools.conf

arch/x86/boot/Makefile

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,24 @@
66
# for more details.
77
#
88
# Copyright (C) 1994 by Linus Torvalds
9+
# Changed by many, many contributors over the years.
910
#
1011

1112
# ROOT_DEV specifies the default root-device when making the image.
1213
# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
1314
# the default of FLOPPY is used by 'build'.
1415

15-
ROOT_DEV := CURRENT
16+
ROOT_DEV := CURRENT
1617

1718
# If you want to preset the SVGA mode, uncomment the next line and
1819
# set SVGA_MODE to whatever number you want.
1920
# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
2021
# The number is the same as you would ordinarily press at bootup.
2122

22-
SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
23+
SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
2324

24-
# If you want the RAM disk device, define this to be the size in blocks.
25-
26-
#RAMDISK := -DRAMDISK=512
27-
28-
targets := vmlinux.bin setup.bin setup.elf zImage bzImage
25+
targets := vmlinux.bin setup.bin setup.elf bzImage
26+
targets += fdimage fdimage144 fdimage288 image.iso mtools.conf
2927
subdir- := compressed
3028

3129
setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
@@ -71,17 +69,13 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
7169
KBUILD_CFLAGS += $(call cc-option,-m32)
7270
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
7371

74-
$(obj)/zImage: asflags-y := $(SVGA_MODE) $(RAMDISK)
75-
$(obj)/bzImage: ccflags-y := -D__BIG_KERNEL__
76-
$(obj)/bzImage: asflags-y := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
77-
$(obj)/bzImage: BUILDFLAGS := -b
72+
$(obj)/bzImage: asflags-y := $(SVGA_MODE)
7873

7974
quiet_cmd_image = BUILD $@
80-
cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/setup.bin \
81-
$(obj)/vmlinux.bin $(ROOT_DEV) > $@
75+
cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \
76+
$(ROOT_DEV) > $@
8277

83-
$(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \
84-
$(obj)/vmlinux.bin $(obj)/tools/build FORCE
78+
$(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE
8579
$(call if_changed,image)
8680
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
8781

@@ -116,9 +110,11 @@ $(obj)/setup.bin: $(obj)/setup.elf FORCE
116110
$(obj)/compressed/vmlinux: FORCE
117111
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
118112

119-
# Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel
113+
# Set this if you want to pass append arguments to the
114+
# bzdisk/fdimage/isoimage kernel
120115
FDARGS =
121-
# Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel
116+
# Set this if you want an initrd included with the
117+
# bzdisk/fdimage/isoimage kernel
122118
FDINITRD =
123119

124120
image_cmdline = default linux $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,)
@@ -127,18 +123,18 @@ $(obj)/mtools.conf: $(src)/mtools.conf.in
127123
sed -e 's|@OBJ@|$(obj)|g' < $< > $@
128124

129125
# This requires write access to /dev/fd0
130-
zdisk: $(BOOTIMAGE) $(obj)/mtools.conf
126+
bzdisk: $(obj)/bzImage $(obj)/mtools.conf
131127
MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync
132128
syslinux /dev/fd0 ; sync
133129
echo '$(image_cmdline)' | \
134130
MTOOLSRC=$(src)/mtools.conf mcopy - a:syslinux.cfg
135131
if [ -f '$(FDINITRD)' ] ; then \
136132
MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' a:initrd.img ; \
137133
fi
138-
MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux ; sync
134+
MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage a:linux ; sync
139135

140136
# These require being root or having syslinux 2.02 or higher installed
141-
fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf
137+
fdimage fdimage144: $(obj)/bzImage $(obj)/mtools.conf
142138
dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440
143139
MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync
144140
syslinux $(obj)/fdimage ; sync
@@ -147,9 +143,9 @@ fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf
147143
if [ -f '$(FDINITRD)' ] ; then \
148144
MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' v:initrd.img ; \
149145
fi
150-
MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux ; sync
146+
MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage v:linux ; sync
151147

152-
fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf
148+
fdimage288: $(obj)/bzImage $(obj)/mtools.conf
153149
dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880
154150
MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync
155151
syslinux $(obj)/fdimage ; sync
@@ -158,9 +154,9 @@ fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf
158154
if [ -f '$(FDINITRD)' ] ; then \
159155
MTOOLSRC=$(obj)/mtools.conf mcopy '$(FDINITRD)' w:initrd.img ; \
160156
fi
161-
MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux ; sync
157+
MTOOLSRC=$(obj)/mtools.conf mcopy $(obj)/bzImage w:linux ; sync
162158

163-
isoimage: $(BOOTIMAGE)
159+
isoimage: $(obj)/bzImage
164160
-rm -rf $(obj)/isoimage
165161
mkdir $(obj)/isoimage
166162
for i in lib lib64 share end ; do \
@@ -170,7 +166,7 @@ isoimage: $(BOOTIMAGE)
170166
fi ; \
171167
if [ $$i = end ] ; then exit 1 ; fi ; \
172168
done
173-
cp $(BOOTIMAGE) $(obj)/isoimage/linux
169+
cp $(obj)/bzImage $(obj)/isoimage/linux
174170
echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg
175171
if [ -f '$(FDINITRD)' ] ; then \
176172
cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \
@@ -181,12 +177,13 @@ isoimage: $(BOOTIMAGE)
181177
isohybrid $(obj)/image.iso 2>/dev/null || true
182178
rm -rf $(obj)/isoimage
183179

184-
zlilo: $(BOOTIMAGE)
180+
bzlilo: $(obj)/bzImage
185181
if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
186182
if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
187-
cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz
183+
cat $(obj)/bzImage > $(INSTALL_PATH)/vmlinuz
188184
cp System.map $(INSTALL_PATH)/
189185
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
190186

191187
install:
192-
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
188+
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
189+
System.map "$(INSTALL_PATH)"

0 commit comments

Comments
 (0)