Commit Graph

20640 Commits (47cab822d6b25d8e130da00edef91ec3eef0efab)

Author SHA1 Message Date
Paolo Ciarrocchi 714a9ac2ef x86: coding style fixes to arch/x86/kernel/cpu/mcheck/non-fatal.c
Before:
   total: 5 errors, 5 warnings, 91 lines checked
After:
   total: 0 errors, 0 warnings, 94 lines checked

No code changed:

arch/x86/kernel/cpu/mcheck/non-fatal.o:

   text	   data	    bss	    dec	    hex	filename
    441	     80	      4	    525	    20d	non-fatal.o.before
    441	     80	      4	    525	    20d	non-fatal.o.after

md5:
   137bc114d2020ad331d5e76444a2c7d3  non-fatal.o.before.asm
   137bc114d2020ad331d5e76444a2c7d3  non-fatal.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:50 +02:00
Paolo Ciarrocchi 83e714e82f x86: coding style fixes to arch/x86/kernel/vm86_32.c
Before:
   total: 64 errors, 18 warnings, 840 lines checked
After:
   total: 12 errors, 15 warnings, 844 lines checked

No code changed:

arch/x86/kernel/vm86_32.o:

   text	   data	    bss	    dec	    hex	filename
   4449	     28	    132	   4609	   1201	vm86_32.o.before
   4449	     28	    132	   4609	   1201	vm86_32.o.after

md5:
   e4e51ed7689d17f04148554a3c6d5bb6  vm86_32.o.before.asm
   e4e51ed7689d17f04148554a3c6d5bb6  vm86_32.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:50 +02:00
Paolo Ciarrocchi fb87a298fb x86: coding style fixes to arch/x86/kernel/cpu/amd.c
Before:
   total: 42 errors, 26 warnings, 350 lines checked
After:
   total: 0 errors, 26 warnings, 352 lines checked

No code changed:

arch/x86/kernel/cpu/amd.o:

   text	   data	    bss	    dec	    hex	filename
   1936	    328	      0	   2264	    8d8	amd.o.before
   1936	    328	      0	   2264	    8d8	amd.o.after

md5:
   873430a88faaf31bb4bbfe3a2a691e45  amd.o.before.asm
   873430a88faaf31bb4bbfe3a2a691e45  amd.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:50 +02:00
Paolo Ciarrocchi f975182719 x86: coding style fixes to arch/x86/kernel/cpu/transmeta.c
Before:
   total: 13 errors, 3 warnings, 105 lines checked
After:
   total: 0 errors, 3 warnings, 107 lines checked

No code changed:

arch/x86/kernel/cpu/transmeta.o:

   text	   data	    bss	    dec	    hex	filename
    713	    324	      0	   1037	    40d	transmeta.o.before
    713	    324	      0	   1037	    40d	transmeta.o.after

md5:
   19abe2cafac617e1e2aadc4aa4e9923b  transmeta.o.before.asm
   19abe2cafac617e1e2aadc4aa4e9923b  transmeta.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:50 +02:00
Paolo Ciarrocchi 93d8bd3d4f x86: coding style fixes to arch/x86/lib/memcpy_32.c
Before:
   total: 2 errors, 0 warnings, 43 lines checked
After:
   total: 0 errors, 0 warnings, 43 lines checked

No code changed:

arch/x86/lib/memcpy_32.o:

   text	   data	    bss	    dec	    hex	filename
    164	      0	      0	    164	     a4	memcpy_32.o.before
    164	      0	      0	    164	     a4	memcpy_32.o.after

md5:
   d759f55621af27f51720b59c8ca96a4d  memcpy_32.o.before.asm
   d759f55621af27f51720b59c8ca96a4d  memcpy_32.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi e0f0257044 x86: coding style fixes to arch/x86/kernel/cpu/mtrr/state.c
Before:
   total: 6 errors, 5 warnings, 80 lines checked
After:
   total: 0 errors, 4 warnings, 82 lines checked

No code changed:

arch/x86/kernel/cpu/mtrr/state.o:

   text	   data	    bss	    dec	    hex	filename
    313	      0	      4	    317	    13d	state.o.before
    313	      0	      4	    317	    13d	state.o.after

md5:
   a0fbd61096205f9180f0bf45ed386d61  state.o.before.asm
   a0fbd61096205f9180f0bf45ed386d61  state.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi 0067cc996e x86: coding style fixes to arch/x86/kernel/mca_32.c
Before:
   total: 42 errors, 3 warnings, 469 lines checked
After:
   total: 0 errors, 3 warnings, 479 lines checked

No code changed:

arch/x86/kernel/mca_32.o:

   text	   data	    bss	    dec	    hex	filename
   1832	    288	      5	   2125	    84d	mca_32.o.before
   1832	    288	      5	   2125	    84d	mca_32.o.after

md5:
   c0e45e2b743ce26349eb07dc53e80b94  mca_32.o.before.asm
   c0e45e2b743ce26349eb07dc53e80b94  mca_32.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi f73920cd63 x86: coding style fixes to arch/x86/lib/strstr_3
Before:
   total: 3 errors, 0 warnings, 31 lines checked
After:
   total: 0 errors, 0 warnings, 31 lines checked

No code changed:

arch/x86/lib/strstr_32.o:

   text	   data	    bss	    dec	    hex	filename
     49	      0	      0	     49	     31	strstr_32.o.before
     49	      0	      0	     49	     31	strstr_32.o.after

md5:
   a224a7c4082e75a4f31f9d91dd34fe8e  strstr_32.o.before.asm
   a224a7c4082e75a4f31f9d91dd34fe8e  strstr_32.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi d717ca84c0 x86: coding style fixes to arch/x86/oprofile/init.c
Before:
   total: 5 errors, 4 warnings, 48 lines checked
After:
   total: 0 errors, 4 warnings, 49 lines checked

No code changed:

arch/x86/oprofile/init.o:

   text	   data	    bss	    dec	    hex	filename
     42	      0	      0	     42	     2a	init.o.before
     42	      0	      0	     42	     2a	init.o.after

md5:
   74c94c315cfbf245aeba36eceac57e66  init.o.before.asm
   74c94c315cfbf245aeba36eceac57e66  init.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi 65eb6b4326 x86: coding style fixes to arch/x86/kernel/cpu/intel.c
Before:
   total: 37 errors, 16 warnings, 366 lines checked
After:
   total: 0 errors, 15 warnings, 369 lines checked

No code changed:

arch/x86/kernel/cpu/intel.o:

   text	   data	    bss	    dec	    hex	filename
   1534	    452	      0	   1986	    7c2	intel.o.before
   1534	    452	      0	   1986	    7c2	intel.o.after

md5:
   1ca348a06de6eb354c4b6ea715a57db5  intel.o.before.asm
   1ca348a06de6eb354c4b6ea715a57db5  intel.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi 60e11746d9 x86: coding style fixes to arch/x86/kernel/summit_32.c
Before:
   total: 20 errors, 17 warnings, 180 lines checked
After:
   total: 0 errors, 17 warnings, 183 lines checked

No code changed:

arch/x86/kernel/summit_32.o:

   text	   data	    bss	    dec	    hex	filename
    932	    192	      0	   1124	    464	summit_32.o.before
    932	    192	      0	   1124	    464	summit_32.o.after

md5:
   217aa5f002f217e56ef9d8e5c74b60e0  summit_32.o.before.asm
   217aa5f002f217e56ef9d8e5c74b60e0  summit_32.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi 023196a3be x86: coding style fix to arch/x86/boot/pm.c
Before:
   total: 1 errors, 0 warnings, 178 lines checked
After:
   total: 0 errors, 0 warnings, 178 lines checked

No code changed:

arch/x86/boot/pm.o:

   text	   data	    bss	    dec	    hex	filename
    351	      0	      6	    357	    165	pm.o.before
    351	      0	      6	    357	    165	pm.o.after

md5:
   81de3616bceb29691bf835bb62a84ff1  pm.o.before.asm
   81de3616bceb29691bf835bb62a84ff1  pm.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Yinghai Lu 1e934dda0c x86: insert_resorce for lapic addr after e820_reserve_resources
when comparing the e820 direct from BIOS, and the one by kexec:

 BIOS-provided physical RAM map:
- BIOS-e820: 0000000000000000 - 0000000000097400 (usable)
+ BIOS-e820: 0000000000000100 - 0000000000097400 (usable)
  BIOS-e820: 0000000000097400 - 00000000000a0000 (reserved)
  BIOS-e820: 00000000000e6000 - 0000000000100000 (reserved)
  BIOS-e820: 0000000000100000 - 00000000dffa0000 (usable)
- BIOS-e820: 00000000dffae000 - 00000000dffb0000 type 9
+ BIOS-e820: 00000000dffae000 - 00000000dffb0000 (reserved)
  BIOS-e820: 00000000dffb0000 - 00000000dffbe000 (ACPI data)
  BIOS-e820: 00000000dffbe000 - 00000000dfff0000 (ACPI NVS)
  BIOS-e820: 00000000dfff0000 - 00000000e0000000 (reserved)
  BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
- BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
             =======> that is the local apic address... somewhere we lost it
  BIOS-e820: 00000000ff700000 - 0000000100000000 (reserved)
  BIOS-e820: 0000000100000000 - 0000004020000000 (usable)

found one entry about reserved is missing for the kernel by kexec.

it turns out init_apic_mappings is called before e820_reserve_resources
in setup_arch. but e820_reserve_resources is using request_resource.
it will not handle the conflicts.

there are three ways to fix it:

1. change request_resource in e820_reserve_resources to to insert_resource
2. move init_apic_mappings after e820_reserve_resources
3. use late_initcall to insert lapic resource.

this patch is using method 3, that is less intrusive.

in later version could consider to use method 1.

before patch
fed20000-ffffffff : PCI Bus #00
  fee00000-fee00fff : Local APIC
  fefff000-feffffff : pnp 00:09
  ff700000-ffffffff : reserved

with patch will get map in first kernel

fed20000-ffffffff : PCI Bus #00
  fee00000-fee00fff : Local APIC
    fee00000-fee00fff : reserved
  fefff000-feffffff : pnp 00:09
  ff700000-ffffffff : reserved

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Yinghai Lu 3def3d6ddf x86: clean up e820_reserve_resources on 64-bit
e820_resource_resources could use insert_resource instead of request_resource
also move code_resource, data_resource, bss_resource, and crashk_res
out of e820_reserve_resources.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Eric W. Biederman 700efc1b9f x86: introduce kernel/head32.c
Copy x86_64 and add a head32.c so we can start moving early
architecture initialization out of assembly.

[ Sam Ravnborg <sam@ravnborg.org>: updated it to x86 ]

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Yinghai Lu 322850af8d x86: make amd quad core 8 socket system not be clustered_box, #2
quad core 8 socket system will have apic id lifting.the apic id range could
be [4, 0x23]. and apic_is_clustered_box will think that need to three clusters
and that is large than 2. So it is treated as clustered_box.

and will get

Marking TSC unstable due to TSCs unsynchronized

even the CPUs have X86_FEATURE_CONSTANT_TSC set.

this patch will check if the cpu is from AMD.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Ingo Molnar 513ad84bf6 x86: de-macro start_thread()
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Ingo Molnar 1180e01de5 x86: more cleanups in arch/x86/boot/compressed/misc.c
Before:
   total: 7 errors, 8 warnings, 471 lines checked
After:
   total: 5 errors, 5 warnings, 479 lines checked

( the rest cannot be eliminated due to zlib interface cruftiness. )

No code changed:

arch/x86/boot/compressed/misc.o:

   text	   data	    bss	    dec	    hex	filename
  10716	      8	   2152	  12876	   324c	misc.o.before
  10716	      8	   2152	  12876	   324c	misc.o.after

md5:
   2c20c903986a3c9bca44306c6646067e  misc.o.before.asm
   2c20c903986a3c9bca44306c6646067e  misc.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi fd77c7cabd x86: coding style fixes to arch/x86/boot/compressed/misc.c
Fix lots of style errors and warnings.

Before:
   total: 58 errors, 9 warnings, 469 lines checked
After:
   total: 7 errors, 8 warnings, 471 lines checked

No code changed:

arch/x86/boot/compressed/misc.o:

   text	   data	    bss	    dec	    hex	filename
  10716	      8	   2152	  12876	   324c	misc.o.before
  10716	      8	   2152	  12876	   324c	misc.o.after

md5:
   2c20c903986a3c9bca44306c6646067e  misc.o.before.asm
   2c20c903986a3c9bca44306c6646067e  misc.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi 48e6b7a050 x86: coding style fixes to arch/x86/kernel/cpu/umc.c
Before:
   total: 3 errors, 1 warnings, 23 lines checked
After:
   total: 0 errors, 0 warnings, 25 lines checked

No code changed:

arch/x86/kernel/cpu/umc.o:

   text	   data	    bss	    dec	    hex	filename
     24	    616	      0	    640	    280	umc.o.before
     24	    616	      0	    640	    280	umc.o.after

md5:
   e8daa3eaed0963a0cdd2e83c2e1f9823  umc.o.before.asm
   e8daa3eaed0963a0cdd2e83c2e1f9823  umc.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Paolo Ciarrocchi 2c5847837f x86: coding style fixes to arch/x86/kernel/cpu/mcheck/p6.c
Before:
   total: 16 errors, 13 warnings, 122 lines checked
After:
   total: 0 errors, 0 warnings, 122 lines checked

No code changed:

arch/x86/kernel/cpu/mcheck/p6.o:

   text	   data	    bss	    dec	    hex	filename
   1082	      0	      8	   1090	    442	p6.o.before
   1082	      0	      8	   1090	    442	p6.o.after

md5:
   4e283fbc1b68240f1724d9725007d379  p6.o.before.asm
   4e283fbc1b68240f1724d9725007d379  p6.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:49 +02:00
Hiroshi Shimamoto eb19067d16 x86: unify cpu/proc|_64.c
Now cpu/proc.c and cpu/proc_64.c are same.
So cpu/proc_64.c can be removed.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Hiroshi Shimamoto 2aef77204e x86: cosmetic unification cpu/proc|_64.c
make cpu/proc.c and cpu/proc_64.c same.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Hiroshi Shimamoto f84c3a429f x86: add power management line in /proc/cpuinfo
Change /proc/cpuinfo on 32-bit, it will look like on 64-bit.
'power management' line is added and power management information
will be printed at the line.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Hiroshi Shimamoto a967ceac01 x86: make cpu/proc|_64.c similar
clean up for unification.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Hiroshi Shimamoto 8fa6878ffc x86: split cpuinfo from setup_64.c into cpu/proc_64.c
x86 /proc/cpuinfo code can be unified.
This is the first step of unification.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 637cba0261 x86: coding style fixes to arch/x86/mach-generic/bigsmp.c
arch/x86/mach-generic/bigsmp.o:
   text    data     bss     dec     hex filename
   1271     144       4    1419     58b bigsmp.o.before
   1271     144       4    1419     58b bigsmp.o.after
md5:
 b83aad375294c002c79b03c3a2e4be35  bigsmp.o.before.asm
 b83aad375294c002c79b03c3a2e4be35  bigsmp.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi c99aa3804e x86: coding style fixes to arch/x86/kernel/cpu/nexgen.c
arch/x86/kernel/cpu/nexgen.o:
   text    data     bss     dec     hex filename
    111     316       0     427     1ab nexgen.o.before
    111     316       0     427     1ab nexgen.o.after
md5:
 e796efefea9ebc6644338bad226599ee  nexgen.o.before.asm
 e796efefea9ebc6644338bad226599ee  nexgen.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 8108576a78 x86: coding style fixes to arch/x86/mach-generic/summit.c
File is now error/warning free.

arch/x86/mach-generic/summit.o:
   text    data     bss     dec     hex filename
   1481     140       0    1621     655 summit.o.before
   1481     140       0    1621     655 summit.o.after
md5:
 7b7dc1cbd381af7b9393da989da5b0fd  summit.o.before.asm
 7b7dc1cbd381af7b9393da989da5b0fd  summit.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 651bbe16d0 x86: coding style fixes to arch/x86/mach-generic/default.c
Just whitespace cleanups.

total: 0 errors, 0 warnings, 26 lines checked
arch/x86/mach-generic/default.c has no obvious style problems and is ready for submission.

arch/x86/mach-generic/default.o:
   text    data     bss     dec     hex filename
   1036     140       0    1176     498 default.o.before
   1036     140       0    1176     498 default.o.after
md5:
f283c53022c568f3162bbcde44f65762  default.o.before.asm
f283c53022c568f3162bbcde44f65762  default.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 9b0c502882 x86: coding style fixes to arch/x86/mach-generic/probe.c
The patch kills 20 errors and a few warnings.

arch/x86/mach-generic/probe.o:
   text    data     bss     dec     hex filename
    578      45       0     623     26f probe.o.before
    578      45       0     623     26f probe.o.after
md5:
86eb1c3e3cf37f81d37bcd9a0c9f14ad  probe.o.before.asm
86eb1c3e3cf37f81d37bcd9a0c9f14ad  probe.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi d4413732b5 x86: coding style fixes to arch/x86/oprofile/op_model_athlon.c
The patch fixes 33 errors and a few warnings reported by checkpatch.pl

arch/x86/oprofile/op_model_athlon.o:
   text    data     bss     dec     hex filename
   1691       0      32    1723     6bb op_model_athlon.o.before
   1691       0      32    1723     6bb op_model_athlon.o.after
md5:
c354bc2d7140e1e626c03390eddaa0a6  op_model_athlon.o.before.asm
c354bc2d7140e1e626c03390eddaa0a6  op_model_athlon.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 8b45b72b04 x86: coding style fixes to arch/x86/oprofile/op_model_ppro.c
no code changed:

arch/x86/oprofile/op_model_ppro.o:
   text    data     bss     dec     hex filename
   1765       0      16    1781     6f5 op_model_ppro.o.before
   1765       0      16    1781     6f5 op_model_ppro.o.after
md5:
71c7f68d2197d686e3d1121bc18a6b6e  op_model_ppro.o.before.asm
71c7f68d2197d686e3d1121bc18a6b6e  op_model_ppro.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 8000a83f43 x86: coding style fixes to arch/x86/kernel/x8664_ksyms_64.c
arch/x86/kernel/x8664_ksyms_64.o:
   text    data     bss     dec     hex filename
      0       0       0       0       0 x8664_ksyms_64.o.before
      0       0       0       0       0 x8664_ksyms_64.o.after
md5:
2dd2d82a2b440a3c29b9ac9ce3221994  x8664_ksyms_64.o.before.asm
2dd2d82a2b440a3c29b9ac9ce3221994  x8664_ksyms_64.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 1577720524 x86: coding style fixes to arch/x86/kernel/cpu/mcheck/p5.c
The patch make the file errors free.
Only 4 "WARNING: line over 80 characters" left.

arch/x86/kernel/cpu/mcheck/p5.o:
   text    data     bss     dec     hex filename
    452       0       4     456     1c8 p5.o.before
    452       0       4     456     1c8 p5.o.after
md5:
50c945ef150aa95bf0481cc3e1dc3315  p5.o.before.asm
50c945ef150aa95bf0481cc3e1dc3315  p5.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 8cf36d2bc5 x86: coding style fixes to arch/x86/lib/string_32.c
The patch kills 45 errors and a few warnings.

The file is now error/warning free:
total: 0 errors, 0 warnings, 237 lines checked
arch/x86/lib/string_32.c has no obvious style problems and is ready for submission.

no code changed:

arch/x86/lib/string_32.o:
   text    data     bss     dec     hex filename
    639       0       0     639     27f string_32.o.before
    639       0       0     639     27f string_32.o.after
md5:
2db1c48187cf5113bb595153ee1fc73d  string_32.o.before.asm
2db1c48187cf5113bb595153ee1fc73d  string_32.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi 325f86ec6d x86: coding style fixes to arch/x86/kernel/syscall_64.c
After the patch:
total: 0 errors, 1 warnings, 29 lines checked

no code changed:

arch/x86/kernel/syscall_64.o:
   text    data     bss     dec     hex filename
   2304       0       0    2304     900 syscall_64.o.before
   2304       0       0    2304     900 syscall_64.o.after
md5:
0fdbb875cde8892296585226b92f4333  syscall_64.o.before.asm
0fdbb875cde8892296585226b92f4333  syscall_64.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Paolo Ciarrocchi e940659788 x86: coding style fixes to arch/x86/lib/memmove_64.c
After the patch:

  total: 0 errors, 0 warnings, 21 lines checked

no code changed:

arch/x86/lib/memmove_64.o:
   text    data     bss     dec     hex filename
    116       0       0     116      74 memmove_64.o.before
    116       0       0     116      74 memmove_64.o.after
md5:
2d6b0951cafb86a11a222cdd70f6104f  memmove_64.o.before.asm
2d6b0951cafb86a11a222cdd70f6104f  memmove_64.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Ian Campbell 87253d1b4f x86: boot protocol updates
Also update field names to simply payload_{offset,length} so as to not rule
out uncompressed images.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:48 +02:00
Ian Campbell c92a7a54d6 x86: reduce arch/x86/mm/ioremap.o size
> Don't we have a special section for page-aligned data so it doesn't
> waste most of two pages?

We have .bss.page_aligned and it seems appropriate to use it.

    text	   data	    bss	    dec	    hex	filename
    -   3388	   8236	      4	  11628	   2d6c	../build-32/arch/x86/mm/ioremap.o
    +   3388	     48	   4100	   7536	   1d70	../build-32/arch/x86/mm/ioremap.o

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Huang Ying <ying.huang@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Ingo Molnar edc05e6de3 x86: more coding style fixes in centaur.c
no code changed:

 arch/x86/kernel/cpu/centaur.o:
    text    data     bss     dec     hex filename
    1031     324       0    1355     54b centaur.o.before
    1031     324       0    1355     54b centaur.o.after

 md5:
  4f306a7f980b58eb69c4bdcfcde565f1  centaur.o.before.asm
  4f306a7f980b58eb69c4bdcfcde565f1  centaur.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Paolo Ciarrocchi 29a9994bd8 x86: coding style fixes for arch/x86/kernel/cpu/centaur.c
Kills more than 150 errors/warnings

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Ingo Molnar ca5d3f1491 x86: clean up mmx_32.c
checkpatch.pl --file cleanups:

  before:
    total: 74 errors, 3 warnings, 386 lines checked

  after:
    total: 0 errors, 0 warnings, 377 lines checked

no code changed:

arch/x86/lib/mmx_32.o:
   text    data     bss     dec     hex filename
   1323       0       8    1331     533 mmx_32.o.before
   1323       0       8    1331     533 mmx_32.o.after

md5:
   4cc39f1017dc40a5ebf02ce0ff7312bc  mmx_32.o.before.asm
   4cc39f1017dc40a5ebf02ce0ff7312bc  mmx_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
David P. Reed 04aaa7ba09 x86: fix cmos read and write to not use inb_p and outb_p
fix code to access CMOS rtc registers so that it does not use inb_p and
outb_p routines, which are deprecated.  Extensive research on all known
CMOS RTC chipset timing shows that there is no need for a delay in
accessing the registers of these chips even on old machines. These chipa
are never on an expansion bus, but have always been "motherboard"
resources, either in the processor chipset or explicitly on the
motherboard, and they are not part of the ISA/LPC or PCI buses, so
delays should not be based on bus timing. The reason to fix it:

 1) port 80 writes often hang some laptops that use ENE EC chipsets,
    esp. those designed and manufactured by Quanta for HP;

 2) RTC accesses are timing sensitive, and extra microseconds may matter;

 3) the new "io_delay" function is calibrated by expansion bus timing needs,
    thus is not appropriate for access to CMOS rtc registers.

Signed-off-by: David P. Reed <dpreed@reed.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Thomas Petazzoni 03ae5768b6 x86: use ELF section to list CPU vendor specific code
Replace the hardcoded list of initialization functions for each CPU
vendor by a list in an ELF section, which is read at initialization in
arch/x86/kernel/cpu/cpu.c to fill the cpu_devs[] array. The ELF
section, named .x86cpuvendor.init, is reclaimed after boot, and
contains entries of type "struct cpu_vendor_dev" which associates a
vendor number with a pointer to a "struct cpu_dev" structure.

This first modification allows to remove all the VENDOR_init_cpu()
functions.

This patch also removes the hardcoded calls to early_init_amd() and
early_init_intel(). Instead, we add a "c_early_init" member to the
cpu_dev structure, which is then called if not NULL by the generic CPU
initialization code. Unfortunately, in early_cpu_detect(), this_cpu is
not yet set, so we have to use the cpu_devs[] array directly.

This patch is part of the Linux Tiny project, and is needed for
further patch that will allow to disable compilation of unused CPU
support code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Glauber Costa bc7c314d70 x86, vsmp: use the paravirt helpers
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com>
Acked-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Glauber Costa 96597fd2be x86: introduce vsmp paravirt helpers
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com>
Acked-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Glauber Costa 2785c8d052 x86: call vsmp_init explicitly
It becomes to early for ioremap, so we use early_ioremap

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com>
Acked-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Glauber Costa a2beab31b1 x86: make vsmp_init void, instead of static int
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com>
Acked-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Glauber Costa 270883a8b9 x86: change vsmp compile dependency
Change Makefile so vsmp_64.o object is dependent
on PARAVIRT, rather than X86_VSMP

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com>
Acked-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Robert Richter e319e76521 x86: apic: extended interrupt LVT support for AMD
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Yinghai Lu 04adf11435 x86: remove never used nodenumer in pda
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Yinghai Lu beafe91f1c x86: get apic_id later in acpi_numa_processor_affinity_init
we don't need get that so early.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:47 +02:00
Arnaldo Carvalho de Melo 28d2312881 x86: reducing debuginfo size by removing unneeded includes
I found it strange that the struct sk_buff definition was found
inside the DWARF debugging sections in the generated object, so I verified
and found that there is no need for the files that bring struct sk_buff
definition into this file and verified also that sk_buff is not brought
in indirectly too, thru other headers.

	I went on and removed many other unneeded includes and the end
result is:

[acme@doppio net-2.6]$ l /tmp/sys_ia32.o.before /tmp/sys_ia32.o.after
-rw-rw-r-- 1 acme acme 185240 2008-02-06 19:19 /tmp/sys_ia32.o.after
-rw-rw-r-- 1 acme acme 248328 2008-02-06 19:00 /tmp/sys_ia32.o.before

	Almost 64KB only on this object file!

	There were no other side effects from this change:

[acme@doppio net-2.6]$ objcopy -j "text" /tmp/sys_ia32.o.before /tmp/text.before
[acme@doppio net-2.6]$ objcopy -j "text" /tmp/sys_ia32.o.after /tmp/text.after
[acme@doppio net-2.6]$ md5sum /tmp/text.before /tmp/text.after
b7ac9b17942add68494e698e4f965d36  /tmp/text.before
b7ac9b17942add68494e698e4f965d36  /tmp/text.after

	One of the complaints about using tools such as systemtap is
that one has to install the huge kernel-debuginfo package:

[acme@doppio net-2.6]$ rpm -q --qf "%{size}\n" kernel-rt-debuginfo
471737710
543867594
[acme@doppio net-2.6]$

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Ingo Molnar 52b387197b x86: bump image header to version 2.08.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Ian Campbell 7d6e737c8d x86: add a crc32 checksum to the kernel image.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Ian Campbell 099e137726 x86: use ELF format in compressed images.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: virtualization@lists.linux-foundation.org
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Harvey Harrison e0bf0f75bd x86: define DEBUG_SIG in signal_64.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Harvey Harrison 866bc13fc4 x86: Unify argument names in signal_32|64.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Harvey Harrison 123a63476c x86: move struct definitions to unifed sigframe.h
[ tglx@linutronix.de: cleanup the other structs as well ]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Harvey Harrison 2d19c45806 x86: use sizeof(long) to unify signal_32|64.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Harvey Harrison 1a1768039c x86: Use FIX_EFLAGS define in X86_64
[ tglx@linutronix.de: simplified ]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Harvey Harrison ac66f3fd89 x86: reduce trivial style differences in signal_32|64.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:46 +02:00
Harvey Harrison c3e6ff87a3 x86: regparm(3) is mandatory, no need to annotate
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Harvey Harrison 9902a702c7 x86: make X86_32 pt_regs members unsigned long
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Harvey Harrison 92bc205685 x86: change most X86_32 pt_regs members to unsigned long
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Andi Kleen 45de707911 x86: enable ACPI extended century handling for 32bit
The extended century readout does not solve the year 2038 problem on
32bit!

v2: Fix compilation on !ACPI, pointed out by tglx

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Andi Kleen 068c9222d0 x86: add warning when RTC clock reports binary
We assume that the RTC clock is BCD, so print a warning if it claims
to be binary.

[ tglx@linutronix.de: changed to WARN_ON - we want to know that!
  If no one reports it we can remove the complete if (RTC_ALWAYS_BCD)
  magic, which has RTC_ALWAYS_BCD defined to 1 since Linux 1.0 ... ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Andi Kleen b62576a2f5 x86: use year 2000 offset for cmos clock
We know it is already after 2000. Use the year 2000 offset for both 32
and 64 bit, which removes ifdefs and the 1970 magic.

[ tglx@linutronix.de: remove 1970 magic, replace bogus commit message ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Yinghai Lu 48c508b364 x86: clean up find_e820_area(), 64-bit
Change size to unsigned long, becase caller and user all used unsigned long.
Also make bad_addr take an alignment parameter.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Andi Kleen ef9257668e x86: do kernel direct mapping at boot using GB pages
The AMD Fam10h CPUs support new Gigabyte page table entry for
mapping 1GB at a time. Use this for the kernel direct mapping.

Only done for 64bit because i386 does not support GB page tables.

This only applies to the data portion of the direct mapping; the
kernel text mapping stays with 2MB pages because the AMD Fam10h
microarchitecture does not support GB ITLBs and AMD recommends
against using GB mappings for code.

Can be disabled with disable_gbpages on the kernel command line

[ tglx@linutronix.de: simplify enable code ]
[ Yinghai Lu <yinghai.lu@sun.com>: boot fix on 256 GB RAM ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Ingo Molnar 00d1c5e057 x86: add gbpages switches
These new controls toggle experimental support for a new CPU feature,
the straightforward extension of largepages from the pmd level to the
pud level, which allows 1GB (kernel) TLBs instead of 2MB TLBs.

Turn it off by default, as this code has not been tested well enough yet.

Use the CONFIG_DIRECT_GBPAGES=y .config option or gbpages on the
boot line can be used to enable it. If enabled in the .config then
nogbpages boot option disables it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
H. Peter Anvin fe770bf031 x86: clean up the page table dumper and add 32-bit support
Clean up the page table dumper (fix boundary conditions, table driven
address ranges, some formatting changes since it is no longer using
the kernel log but a separate virtual file), and generalize to 32
bits.

[ mingo@elte.hu: x86: fix the pagetable dumper ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Arjan van de Ven 926e5392ba x86: add code to dump the (kernel) page tables for visual inspection by kernel developers
This patch adds code to the kernel to have an (optional)
/proc/kernel_page_tables debug file that basically dumps the kernel
pagetables; this allows us kernel developers to verify that nothing fishy is
going on and that the various mappings are set up correctly. This was quite
useful in finding various change_page_attr() bugs, and is very likely to be
useful in the future as well.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: mingo@elte.hu
Cc: tglx@tglx.de
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
H. Peter Anvin 2596e0fae0 x86: unify arch/x86/mm/Makefile
Unify arch/x86/mm/Makefile between 32 and 64 bits.

All configuration variables that are protected by Kconfig constraints
have been put in the common part of the Makefile; however, the NUMA
files are totally different between 32 and 64 bits and are handled via
an ifdef.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Thomas Gleixner ee7ae7a198 x86: add debug info to DEBUG_PAGEALLOC
Add debug information for DEBUG_PAGEALLOC to get some statistics about
the pool usage and split status.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-17 17:40:45 +02:00
Roland McGrath 5de253cc5b x86 vDSO: don't map 32-bit vdso when disabled
We map a VMA for the 32-bit vDSO even when it's disabled, which is stupid.
For the 32-bit kernel it's the vdso_enabled boot parameter/sysctl
and for the 64-bit kernel it's the vdso32 boot parameter/syscall32 sysctl.

When it's disabled, we don't pass AT_SYSINFO_EHDR so processes don't use
the vDSO for anything, but we still map it.  For the non-compat vDSO,
this means we're always putting an extra VMA somewhere, maybe lousing
up the control of the address space the user was hoping for.

Honor the setting by doing nothing in arch_setup_additional_pages.

[ also see: "x86 vDSO: don't use disabled vDSO for signal trampoline" ]

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:45 +02:00
Roland McGrath 1a3e4ca41c x86 vDSO: don't use disabled vDSO for signal trampoline
If the vDSO was not mapped, don't use it as the "restorer" for a signal
handler.  Whether we have a pointer in mm->context.vdso depends on what
happened at exec time, so we shouldn't check any global flags now.

Background:

Currently, every 32-bit exec gets the vDSO mapped even if it's disabled
(the process just doesn't get told about it).  Because it's in fact
always there, the bug that this patch fixes cannot happen now.  With
the second patch, it won't be mapped at all when it's disabled, which is
one of the things that people might really want when they disable it (so
nothing they didn't ask for goes into their address space).

The 32-bit signal handler setup when SA_RESTORER is not used refers to
current->mm->context.vdso without regard to whether the vDSO has been
disabled when the process was exec'd.  This patch fixes this not to use
it when it's null, which becomes possible after the second patch. (This
never happens in normal use, because glibc's sigaction call uses
SA_RESTORER unless glibc detected the vDSO.)

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:45 +02:00
Ingo Molnar 85eb69a16a x86: increase the kernel text limit to 512 MB
people sometimes do crazy stuff like building really large static
arrays into their kernels or building allyesconfig kernels. Give
more space to the kernel and push modules up a bit: kernel has
512 MB and modules have 1.5 GB.

Should be enough for a few years ;-)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:45 +02:00
Ingo Molnar b4e0409a36 x86: check vmlinux limits, 64-bit
these build-time and link-time checks would have prevented the
vmlinux size regression.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:45 +02:00
Björn Steinbrink 223ac2f42d x86, pci: fix off-by-one errors in some pirq warnings
fix bogus pirq warnings reported in:

  http://bugzilla.kernel.org/show_bug.cgi?id=10366

safe to be backported to v2.6.25 and earlier.

Cc: stable@kernel.org
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:45 +02:00
Sergei Shtylyov b4dcaea36b Pb1200/DBAu1200: fix bad IDE resource size
The header files for the Pb1200/DBAu1200 boards have wrong definition for the
IDE interface's decoded range length -- it should be 512 bytes according to
what the IDE driver does.  In addition, the IDE platform device claims 1 byte
too many for its memory resource -- fix the platform code and the IDE driver
in accordance.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-17 01:14:33 +02:00
Adrian Bunk 71fc4c0c44 avr32 mustn't select HAVE_IDE
There's a libata based PATA driver for avr32, but no support for 
drivers/ide/ on avr32.

This patch fixes the following compile error:

<--  snip  -->

...
  CC [M]  drivers/ide/ide-cd.o
In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/ide/ide-cd.c:37:
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/ide.h:209:21: error: asm/ide.h: No such file or directory
make[3]: *** [drivers/ide/ide-cd.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-17 01:14:32 +02:00
yakui.zhao@intel.com b87e81e5c6 acpi: unneccessary to scan the PCI bus already scanned
http://bugzilla.kernel.org/show_bug.cgi?id=10124

this change:

      commit 08f1c192c3
      Author: Muli Ben-Yehuda <muli@il.ibm.com>
      Date:   Sun Jul 22 00:23:39 2007 +0300

         x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata

         This patch introduces struct pci_sysdata to x86 and x86-64, and
         converts the existing two users (NUMA, Calgary) to use it.

         This lays the groundwork for having other users of sysdata, such as
         the PCI domains work.

         The Calgary bits are tested, the NUMA bits just look ok.

replaces pcibios_scan_root by pci_scan_bus_parented...

but in pcibios_scan_root we have a check about scanned busses.

Cc: <yakui.zhao@intel.com>
Cc: Stian Jordet <stian@jordet.net>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Yinghai Lu" <yhlu.kernel@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-15 19:35:41 -07:00
Kyle McMartin cf39cc3b56 [PARISC] fix signal trampoline cache flushing
The signal trampolines were accidently flushing the kernel I$ instead of
the users.  Fix that up, and also add a missing user D$ flush while
we're at it.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-15 15:51:36 -07:00
Andrew Morton fd785d6b18 sh: export empty_zero_page
ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined!

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:21:47 +09:00
Andrew Morton fad0f90134 sh: arch/sh/kernel/traps_32.c needs asm/fpu.h
arch/sh/kernel/traps_32.c: In function `do_reserved_inst':
arch/sh/kernel/traps_32.c:667: error: implicit declaration of function `do_fpu_inst'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:03:51 +09:00
Manuel Lauss 85eee6072b sh: fix compressed kernel build
commit 54a0151041 broke zImage build on sh arch:

 LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  AS      arch/sh/boot/compressed/head_32.o
In file included from /k/arch/sh/boot/compressed/head_32.S:11:
/k/include/linux/linkage.h:34: error: syntax error in macro parameter list

Fix it for both sh and sh64.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:01:55 +09:00
Adrian Bunk 50387b3e11 sh64: add missing #include <asm/fpu.h>'s
This patch fixes some compile errors due to missing save_fpu()
prototypes on sh64 caused by
commit 9bbafce2ee
(sh: Fix occasional FPU register corruption under preempt).

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:00:09 +09:00
David Howells 4f3f8e94b7 FRV: Correctly determine the address of an illegal instruction
Correctly determine the address of an illegal instruction.  The EPCR0 register
holds this value (masked by EPCR0_PC) if the validity bit is set (masked by
EPCR0_V).  So the test as to whether the contents of the register are usable
should be involve checking the _V bit, not the _PC bits.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-14 07:55:15 -07:00
Linus Torvalds 3f06350162 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Fix several regset and ptrace bugs.
2008-04-11 08:09:57 -07:00
Roland McGrath 54a0151041 asmlinkage_protect replaces prevent_tail_call
The prevent_tail_call() macro works around the problem of the compiler
clobbering argument words on the stack, which for asmlinkage functions
is the caller's (user's) struct pt_regs.  The tail/sibling-call
optimization is not the only way that the compiler can decide to use
stack argument words as scratch space, which we have to prevent.
Other optimizations can do it too.

Until we have new compiler support to make "asmlinkage" binding on the
compiler's own use of the stack argument frame, we have work around all
the manifestations of this issue that crop up.

More cases seem to be prevented by also keeping the incoming argument
variables live at the end of the function.  This makes their original
stack slots attractive places to leave those variables, so the compiler
tends not clobber them for something else.  It's still no guarantee, but
it handles some observed cases that prevent_tail_call() did not.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-10 17:28:26 -07:00
Venki Pallipadi 783e391b7b x86: Simplify cpu_idle_wait
This patch also resolves hangs on boot:
	http://lkml.org/lkml/2008/2/23/263
	http://bugzilla.kernel.org/show_bug.cgi?id=10093

The bug was causing once-in-few-reboots 10-15 sec wait during boot on
certain laptops.

Earlier commit 40d6a14662 added
smp_call_function in cpu_idle_wait() to kick cpus that are in tickless
idle.  Looking at cpu_idle_wait code at that time, code seemed to be
over-engineered for a case which is rarely used (while changing idle
handler).

Below is a simplified version of cpu_idle_wait, which just makes a dummy
smp_call_function to all cpus, to make them come out of old idle handler
and start using the new idle handler.  It eliminates code in the idle
loop to handle cpu_idle_wait.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-10 15:38:29 -07:00
David Howells ed9b949f55 FRV: Make NOMMU-mode work with base addresses other than 0xC0000000 [try #2]
Make NOMMU-mode work with base addresses other than 0xC0000000 by:

 (1) Giving the code that sets up the protection registers the right address
     in __sdram_base.  Rather than being hard coded to 0xC0000000, the value
     of __page_offset is obtained from the linker script.

 (2) Eliminate the check in __switch_to() that verifies the current thread
     info is in the 0xCxxxxxxx region.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-10 13:41:29 -07:00
David Howells e31c243f98 FRV: Add support for emulation of userspace atomic ops [try #2]
Use traps 120-126 to emulate atomic cmpxchg32, xchg32, and XOR-, OR-, AND-, SUB-
and ADD-to-memory operations for userspace.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-10 13:41:29 -07:00
David S. Miller d786a4a659 [SPARC]: Fix several regset and ptrace bugs.
1) ptrace should pass 'current' to task_user_regset_view()

2) When fetching general registers using a 64-bit view, and
   the target is 32-bit, we have to convert.

3) Skip the whole register window get/set code block if
   the user isn't asking to access anything in there.

   Otherwise we have problems if the user doesn't have
   an address space setup.  Fetching ptrace register is
   still valid at such a time, and ptrace does not try
   to access the register window area of the regset.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-09 19:39:25 -07:00
Steven Rostedt f4be31ec96 pop previous section in alternative.c
gcc expects all toplevel assembly to return to the original section type.
The code in alteranative.c does not do this. This caused some strange bugs
in sched-devel where code would end up in the .rodata section and when
the kernel sets the NX bit on all .rodata, the kernel would crash when
executing this code.

This patch adds a .previous marker to return the code back to the
original section.

Credit goes to Andrew Pinski for telling me it wasn't a gcc bug but a
bug in the toplevel asm code in the kernel.  ;-)

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-09 18:38:08 -07:00
Ralf Baechle 9c5a3d729c [MIPS] Handle aliases in vmalloc correctly.
flush_cache_vmap / flush_cache_vunmap were calling flush_cache_all which -
having been deprecated - turned into a nop ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-07 22:31:04 +01:00
Karsten Wiese 4f41c94d5c x86: fix call to set_cyc2ns_scale() from time_cpufreq_notifier()
In time_cpufreq_notifier() the cpu id to act upon is held in freq->cpu. Use it
instead of smp_processor_id() in the call to set_cyc2ns_scale().
This makes the preempt_*able() unnecessary and lets set_cyc2ns_scale() update
the intended cpu's cyc2ns.

Related mail/thread: http://lkml.org/lkml/2007/12/7/130

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-07 21:09:14 +02:00
Ingo Molnar 5b13d86357 revert "x86: tsc prevent time going backwards"
revert:

| commit 47001d6033
| Author: Thomas Gleixner <tglx@linutronix.de>
| Date:   Tue Apr 1 19:45:18 2008 +0200
|
|     x86: tsc prevent time going backwards

it has been identified to cause suspend regression - and the
commit fixes a longstanding bug that existed before 2.6.25 was
opened - so it can wait some more until the effects are better
understood.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-07 21:09:14 +02:00
Linus Torvalds e1c287b992 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix user accesses in regset code.
  [SPARC64]: Fix FPU saving in 64-bit signal handling.
2008-04-07 08:36:37 -07:00
Rusty Russell 64ba4f230d Fix booting pentium+ with dodgy TSC
We handle a broken tsc these days, so no need to panic.  We clear the
TSC bit when tsc_init decides it's unreliable (eg.  under lguest w/ bad
host TSC), leading to bogus panic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-06 16:10:40 -07:00
Linus Torvalds 6fdf5e67fe Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/ralf/upstream-linus
* 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/ralf/upstream-linus:
  [MIPS] Make KGDB compile on UP
  [MIPS] Pb1200: Fix header breakage
2008-04-04 15:09:44 -07:00
Sergei Shtylyov e64a3cfcd9 [MIPS] Make KGDB compile on UP
Building UP kernel with KGDB enabled produces the following errors and warning
(fatal due to -Werror in arch/mips/kernel/Makefile):

In file included from arch/mips/kernel/gdb-stub.c:142:
include/asm/smp.h:25:1: "raw_smp_processor_id" redefined
In file included from include/linux/sched.h:69,
                 from arch/mips/kernel/gdb-stub.c:126:
include/linux/smp.h:88:1: this is the location of the previous definition
In file included from arch/mips/kernel/gdb-stub.c:142:
include/asm/smp.h:62: error: redefinition of 'smp_send_reschedule'
include/linux/smp.h:102: error: previous definition of 'smp_send_reschedule' was here
include/asm/smp.h: In function `smp_send_reschedule':
include/asm/smp.h:65: error: dereferencing pointer to incomplete type
arch/mips/kernel/gdb-stub.c: At top level:
arch/mips/kernel/gdb-stub.c:660: warning: 'kgdb_wait' defined but not used

Fix the errors by not directly including <asm/smp.h> (which is already included
by <linux/smp.h>) and the warning by enclosing kgdb_wait() in #ifdef CONFIG_SMP.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-04 22:43:47 +01:00
Linus Torvalds 3a143125dd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: revert assign IRQs to hpet timer
  x86: tsc prevent time going backwards
  xen: Clear PG_pinned in release_{pt,pd}()
  xen: Do not pin/unpin PMD pages
  xen: refactor xen_{alloc,release}_{pt,pd}()
  x86, agpgart: scary messages are fortunately obsolete
  xen: fix grant table bug
  x86: fix breakage of vSMP irq operations
  x86: print message if nmi_watchdog=2 cannot be enabled
  x86: fix nmi_watchdog=2 on Pentium-D CPUs
2008-04-04 14:42:58 -07:00
Geert Uytterhoeven a1aa758d00 m68k: update defconfigs for 2.6.25
Long overdue update of the m68k defconfigs

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-04 14:42:30 -07:00
Adrian Bunk ef85ecbf11 m68k: use KBUILD_DEFCONFIG
The default defconfig should be one from arch/m68k/configs/

arch/m68k/defconfig was not exactly identical to amiga_defconfig but
also considering how long they have been without any update that doesn't
seem to have been on purpose.

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-04 14:42:20 -07:00
Thomas Gleixner 5761d64b27 x86: revert assign IRQs to hpet timer
The commits:

commit 37a47db8d7
Author: Balaji Rao <balajirrao@gmail.com>
Date:   Wed Jan 30 13:30:03 2008 +0100

    x86: assign IRQs to HPET timers, fix

and

commit e3f37a54f6
Author: Balaji Rao <balajirrao@gmail.com>
Date:   Wed Jan 30 13:30:03 2008 +0100

    x86: assign IRQs to HPET timers

have been identified to cause a regression on some platforms due to
the assignement of legacy IRQs which makes the legacy devices
connected to those IRQs disfunctional.

Revert them.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=10382

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:49 +02:00
Thomas Gleixner 47001d6033 x86: tsc prevent time going backwards
We already catch most of the TSC problems by sanity checks, but there
is a subtle bug which has been in the code for ever. This can cause
time jumps in the range of hours.

This was reported in:
     http://lkml.org/lkml/2007/8/23/96
and
     http://lkml.org/lkml/2008/3/31/23

I was able to reproduce the problem with a gettimeofday loop test on a
dual core and a quad core machine which both have sychronized
TSCs. The TSCs seems not to be perfectly in sync though, but the
kernel is not able to detect the slight delta in the sync check. Still
there exists an extremly small window where this delta can be observed
with a real big time jump. So far I was only able to reproduce this
with the vsyscall gettimeofday implementation, but in theory this
might be observable with the syscall based version as well.

CPU 0 updates the clock source variables under xtime/vyscall lock and
CPU1, where the TSC is slighty behind CPU0, is reading the time right
after the seqlock was unlocked.

The clocksource reference data was updated with the TSC from CPU0 and
the value which is read from TSC on CPU1 is less than the reference
data. This results in a huge delta value due to the unsigned
subtraction of the TSC value and the reference value. This algorithm
can not be changed due to the support of wrapping clock sources like
pm timer.

The huge delta is converted to nanoseconds and added to xtime, which
is then observable by the caller. The next gettimeofday call on CPU1
will show the correct time again as now the TSC has advanced above the
reference value.

To prevent this TSC specific wreckage we need to compare the TSC value
against the reference value and return the latter when it is larger
than the actual TSC value.

I pondered to mark the TSC unstable when the readout is smaller than
the reference value, but this would render an otherwise good and fast
clocksource unusable without a real good reason.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:49 +02:00
Mark McLoughlin c946c7de49 xen: Clear PG_pinned in release_{pt,pd}()
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: xen-devel@lists.xensource.com
Cc: Mark McLoughlin <markmc@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:48 +02:00
Mark McLoughlin a684d69d15 xen: Do not pin/unpin PMD pages
i.e. with this simple test case:

    int fd = open("/dev/zero", O_RDONLY);
    munmap(mmap((void *)0x40000000, 0x1000_LEN, PROT_READ, MAP_PRIVATE, fd, 0), 0x1000);
    close(fd);

we currently get:

   kernel BUG at arch/x86/xen/enlighten.c:678!
   ...
   EIP is at xen_release_pt+0x79/0xa9
   ...
   Call Trace:
    [<c041da25>] ? __pmd_free_tlb+0x1a/0x75
    [<c047a192>] ? free_pgd_range+0x1d2/0x2b5
    [<c047a2f3>] ? free_pgtables+0x7e/0x93
    [<c047b272>] ? unmap_region+0xb9/0xf5
    [<c047c1bd>] ? do_munmap+0x193/0x1f5
    [<c047c24f>] ? sys_munmap+0x30/0x3f
    [<c0408cce>] ? syscall_call+0x7/0xb
    =======================

and xen complains:

  (XEN) mm.c:2241:d4 Mfn 1cc37 not pinned

Further details at:

  https://bugzilla.redhat.com/436453

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: xen-devel@lists.xensource.com
Cc: Mark McLoughlin <markmc@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:48 +02:00
Mark McLoughlin f64337062c xen: refactor xen_{alloc,release}_{pt,pd}()
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: xen-devel@lists.xensource.com
Cc: Mark McLoughlin <markmc@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:48 +02:00
Pavel Machek 8f59610de2 x86, agpgart: scary messages are fortunately obsolete
Fix obsolete printks in aperture-64. We used not to handle missing
agpgart, but we handle it okay now.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:46 +02:00
Ingo Molnar 9c9b81f773 x86: print message if nmi_watchdog=2 cannot be enabled
right now if there's no CPU support for nmi_watchdog=2 we'll just
refuse it silently.

print a useful warning.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:45 +02:00
Ingo Molnar 4f14bdef41 x86: fix nmi_watchdog=2 on Pentium-D CPUs
implement nmi_watchdog=2 on this class of CPUs:

  cpu family      : 15
  model           : 6
  model name      : Intel(R) Pentium(R) D CPU 3.00GHz

the watchdog's ->setup() method is safe anyway, so if the CPU
cannot support it we'll bail out safely.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-04 18:36:45 +02:00
David S. Miller ad4f957640 [SPARC64]: Fix user accesses in regset code.
If target is not current we need to use access_process_vm().

Noticed by Roland McGrath.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-03 16:55:14 -07:00
Roland McGrath 4ba51fd75c x86 ptrace: avoid unnecessary wrmsr
This avoids using wrmsr on MSR_IA32_DEBUGCTLMSR when it's not needed.
No wrmsr ever needs to be done if noone has ever used block stepping.

Without this change, using ptrace on 2.6.25 on an x86 KVM guest
will tickle KVM's missing support for the MSR and crash the guest
kernel.  Though host KVM is the buggy one, this makes for a regression
in the guest behavior from 2.6.24->2.6.25 that we can easily avoid.

I also corrected some bad whitespace.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-03 15:42:43 -07:00
Linus Torvalds cd1d2d279a Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix MPC5200 (not B!) device tree so FEC ethernet works
  [POWERPC] mpc5200: Amalgamated DTS fixes and updates
  [POWERPC] Fix rtas_flash procfs interface
  [POWERPC] Fix deadlock with mmu_hash_lock in hash_page_sync
  [POWERPC] Fix iSeries hard irq enabling regression
  [POWERPC] Fix CPM2 SCC1 clock initialization.
  [POWERPC] Fix defconfigs so we dont set both GENRTC and RTCLIB
  [POWERPC] fsldma: Use compatiable binding as spec
  [POWERPC] sata_fsl: reduce compatibility to fsl,pq-sata
  [POWERPC] 83xx: enable usb in 837x rdb and 83xx defconfigs
  [POWERPC] 83xx: Fix wrong USB phy type in mpc837xrdb dts
2008-04-03 15:41:10 -07:00
David S. Miller 7c3cce978e [SPARC64]: Fix FPU saving in 64-bit signal handling.
The calculation of the FPU reg save area pointer
was wrong.

Based upon an OOPS report from Tom Callaway.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-03 15:07:24 -07:00
René Bürgel 8d813941b1 [POWERPC] Fix MPC5200 (not B!) device tree so FEC ethernet works
This gets the FEC ethernet driver working again on the lite5200
platform.

The FEC driver is also compatible with the MPC5200, not only with the
MPC5200B, so this adds a suitable entry to the driver's match list.
Furthermore this adds the settings for the PHY in the dts file for the
Lite5200.  Note, that this is not exactly the same as in the
Lite5200B, because the PHY is located at f0003000:01 for the 5200, and
at :00 for the 5200B.  This was tested on a Lite5200 and a Lite5200B,
both booted a kernel via tftp and mounted the root via nfs
successfully.

Signed-off-by: René Bürgel <r.buergel@unicontrol.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-03 22:11:12 +11:00
Bartlomiej Sieka 115e1adca3 [POWERPC] mpc5200: Amalgamated DTS fixes and updates
DTS updates that fix booting problems on mpc5200-based boards:
- change to ethernet reg property
- addition of mdio and phy nodes
- removal of pci node (Motion-Pro board)

Other DTS updates:
- update i2c device tree nodes
- add lpb bus node and flash device (without partitions defined)
- add rtc i2c nodes

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-03 22:11:12 +11:00
Maxim Shchetynin 7484839850 [POWERPC] Fix rtas_flash procfs interface
Handling of the proc_dir_entry->count was changed in 2.6.24-rc5.
After this change, the default value for pde->count is 1 and not 0 as
before.  Therefore, if we want to check whether our procfs file is
already opened (already in use), we have to check if pde->count is
greater than 2 rather than 1.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-03 22:11:11 +11:00
Benjamin Herrenschmidt b991f05f13 [POWERPC] Fix deadlock with mmu_hash_lock in hash_page_sync
hash_page_sync() takes and releases the low level mmu hash
lock in order to sync with other processors disposing of page
tables.  Because that lock can be needed to service hash misses
triggered by interrupt handlers, taking it must be done with
interrupts off.  However, hash_page_sync() appears to be called
with interrupts enabled, thus causing occasional deadlocks.

We fix it by making sure hash_page_sync() masks interrupts while
holding the lock.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-03 22:11:11 +11:00
Benjamin Herrenschmidt ff3da2e093 [POWERPC] Fix iSeries hard irq enabling regression
A subtle bug sneaked into iSeries recently.  On this platform, we must
not normally clear MSR:EE (the hardware external interrupt enable)
except for short periods of time.  Taking an interrupt while
soft-disabled doesn't cause us to clear it for example.

The iSeries kernel expects to mostly run with MSR:EE enabled at all
times except in a few exception entry/exit code paths.  Thus
local_irq_enable() doesn't check if it needs to hard-enable as it
expects this to be unnecessary on iSeries.

However, hard_irq_disable() _does_ cause MSR:EE to be cleared,
including on iSeries.  A call to it was recently added to the
context switch code, thus causing interrupts to become disabled
for a long periods of time, causing the iSeries watchdog to kick
in under some circumstances and other nasty things.

This patch fixes it by making local_irq_enable() properly re-enable
MSR:EE on iSeries.  It basically removes a return statement here
to make iSeries use the same code path as everybody else.  That does
mean that we might occasionally get spurious decrementer interrupts
but I don't think that matters.

Another option would have been to make hard_irq_disable() a nop
on iSeries but I didn't like it much, in case we have good reasons
to hard-disable.

Part of the patch is fixes to make sure the hard_enabled PACA field
is properly set on iSeries as it used not to be before, since it
was mostly unused.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-03 22:10:34 +11:00
Laurent Pinchart 025306f309 [POWERPC] Fix CPM2 SCC1 clock initialization.
A missing break statement in a switch caused cpm2_clk_setup() to initialize
SCC2 instead of SCC1.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-03 01:31:59 -05:00
Ken'ichi Ohmichi 629c8b4cdb vmcoreinfo: add the symbol "phys_base"
Fix the problem that makedumpfile sometimes fails on x86_64 machine.

This patch adds the symbol "phys_base" to a vmcoreinfo data.  The
vmcoreinfo data has the minimum debugging information only for dump
filtering.  makedumpfile (dump filtering command) gets it to distinguish
unnecessary pages, and makedumpfile creates a small dumpfile.

On x86_64 kernel which compiled with CONFIG_PHYSICAL_START=0x0 and
CONFIG_RELOCATABLE=y, makedumpfile fails like the following:

 # makedumpfile -d31 /proc/vmcore dumpfile
 The kernel version is not supported.
 The created dumpfile may be incomplete.
 _exclude_free_page: Can't get next online node.

 makedumpfile Failed.
 #

The cause is the lack of the symbol "phys_base" in a vmcoreinfo data.
If the symbol "phys_base" does not exist, makedumpfile considers an
x86_64 kernel as non relocatable.  As the result, makedumpfile
misunderstands the physical address where the kernel is loaded, and it
cannot translate a kernel virtual address to physical address correctly.

To fix this problem, this patch adds the symbol "phys_base" to a
vmcoreinfo data.

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: <stable@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-02 15:28:19 -07:00
Ivan Kokshaysky c143d43aa3 alpha: fix ALSA DMA mmap crash
Make dma_alloc_coherent respect gfp flags (__GFP_COMP is one that
matters).

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Tested-by: Michael Cree <mcree@orcon.net.nz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-02 15:28:19 -07:00
Linus Torvalds 4c61f72c72 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: remove unused calc_npages() in iommu_common.h
  sparc64: add the segment boundary checking to IOMMUs while merging SG entries
  [SPARC64]: Don't open-code {get,put}_cpu_var() in flush_tlb_pending().
2008-04-02 07:46:41 -07:00
Linus Torvalds 10027471a3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25:
  sh: Fix up uImage compression type
  remove include/asm-sh/floppy.h
  sh: Fix TIF_USEDFPU clearing under FPU emulation.
  sh: Fix occasional FPU register corruption under preempt.
2008-04-01 11:45:48 -07:00
Linus Torvalds 61434392f7 Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/ralf/upstream-linus
* 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/ralf/upstream-linus:
  [MIPS] XSS1500: Fix compilation
  [MIPS] Bigsur: make defconfig more useful.
  [MIPS] Alchemy: work around clock misdetection on early Au1000
  [MIPS] Add missing 4KEC TLB refill handler
  [MIPS] BCM1480: Fix PCI/HT IO access
  [MIPS] Fix the installation condition of MIPS clocksource
  [MIPS] Check for GCC r10k-cache-barrier support
  [MIPS] I8253: Export i2853_lock to modules.
  [MIPS] VPE loader: Check result of memory allocation.
2008-04-01 11:31:31 -07:00
Linus Torvalds d5f1a21ca0 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4875/1: Add MODULE_ALIAS to ixp4xx-beeper module
  [ARM] 4873/1: Fix ITE 8152 interrupt demux
  [ARM] 4878/1: Add oabi shim for fstatat64
2008-04-01 11:26:26 -07:00
Florian Fainelli f9e8b78260 [MIPS] XSS1500: Fix compilation
This patch fixes the compilation of the Au1000 XSS1500
board setup and irqmap code.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:34 +01:00
Ralf Baechle 0519649f7e [MIPS] Bigsur: make defconfig more useful.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:34 +01:00
Sergei Shtylyov 758e285fac [MIPS] Alchemy: work around clock misdetection on early Au1000
Work around the CPU clock miscalculation on Au1000DA/HA/HB due the
sys_cpupll register being write-only, i.e. actually do what the comment
before cal_r4off() function advertised for years but the code failed at.
This is achieved by just giving user a chance to define the clock
explicitly  in the board config. via CONFIG_SOC_AU1000_FREQUENCY option,
defaulting to 396 MHz if the option is not given...

The patch is based on the AMD's big unpublished patch, the issue seems to
be an undocumented errata (or feature :-)...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:34 +01:00
Thomas Bogendoerfer b1ec4c8e48 [MIPS] Add missing 4KEC TLB refill handler
Early 4KEc were MIPS32r1 and therefore need some love to get a TLB
refill handler.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:33 +01:00
Thomas Bogendoerfer cf7b7e0b37 [MIPS] BCM1480: Fix PCI/HT IO access
- removed check for enable HT-PCI bridges, because some CFE version
  init only the needed one and scanning works even with disabled HT
  links
- implemented I/O access behind HT PCI busses
- fixed pci_map for IO resource behind PCI bridge

Tested with E100 and Tulip driver.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:33 +01:00
Yoichi Yuasa 447cdf2628 [MIPS] Fix the installation condition of MIPS clocksource
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:33 +01:00
Thomas Bogendoerfer 82933342c3 [MIPS] Check for GCC r10k-cache-barrier support
Check whether gcc supports -mr10-cache-barrier=1 and issue a cleaner
error message if not. This option is needed to build working SGI IP28
kernels.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:33 +01:00
Ralf Baechle a05e623f63 [MIPS] I8253: Export i2853_lock to modules.
This fixes:

  ERROR: "i8253_lock" [drivers/input/misc/pcspkr.ko] undefined!

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:33 +01:00
Ralf Baechle 5408c490a4 [MIPS] VPE loader: Check result of memory allocation.
And while at it, make it a little cleaner.  Issue originally reported by
Tiejun Chen (tiejun.chen@windriver.com).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-04-01 15:46:33 +01:00
Kumar Gala 1e85d89fa3 [POWERPC] Fix defconfigs so we dont set both GENRTC and RTCLIB
The new rtc subsystem conflicts with genrtc so don't enable GENRTC
if RTCLIB is enabled.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-31 11:53:46 -05:00
Kim Phillips 96ce1b6dc5 [POWERPC] sata_fsl: reduce compatibility to fsl,pq-sata
as prescribed in Documentation/powerpc/booting-without-of.txt.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-31 10:27:35 -05:00
Kim Phillips 58bb7a973b [POWERPC] 83xx: enable usb in 837x rdb and 83xx defconfigs
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-31 10:26:22 -05:00
Anton Vorontsov 8e8ff3a309 [POWERPC] 83xx: Fix wrong USB phy type in mpc837xrdb dts
Due to chip constraint MPC837x USB DR module can only use
ULPI and serial PHY interfaces.  The patch fixes the wrong
type in dts.

This patch fixes USB malfunctioning on the MPC837xE-RDB boards.

Similar patch has been already applied for the MDS boards:

  commit 28b9588592
  Author: Li Yang <leoli@freescale.com>
  Date:   Thu Mar 6 18:42:26 2008 +0800

      [POWERPC] 83xx: Fix wrong USB phy type in mpc837xmds dts

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-31 10:23:48 -05:00
Yoshihiro Shimoda 26b63e9951 sh: Fix up uImage compression type
Fix up uImage compression type.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-31 16:17:11 +09:00
Adrian Bunk 7d7f7c3ed2 remove include/asm-sh/floppy.h
This patch removes the unused include/asm-sh/floppy.h
(ARCH_MAY_HAVE_PC_FDC was not enabled).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-31 16:16:02 +09:00
Al Viro f10095c3ec powerpc/pseries/xcis: ansify
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-30 14:20:24 -07:00
Al Viro 683113a33d vma_map: use proper pointer types
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-30 14:20:23 -07:00
FUJITA Tomonori c819914e0d sparc64: remove unused calc_npages() in iommu_common.h
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-28 15:56:01 -07:00
FUJITA Tomonori f088025729 sparc64: add the segment boundary checking to IOMMUs while merging SG entries
Some IOMMUs allocate memory areas spanning LLD's segment boundary limit.  It
forces low level drivers to have a workaround to adjust scatter lists that the
IOMMU builds.  We are in the process of making all the IOMMUs respect the
segment boundary limits to remove such work around in LLDs.

SPARC64 IOMMUs were rewritten to use the IOMMU helper functions and the commit
89c94f2f70 made the IOMMUs not allocate memory
areas spanning the segment boundary limit.

However, SPARC64 IOMMUs allocate memory areas first then try to merge them
(while some IOMMUs walk through all the sg entries to see how they can be
merged first and allocate memory areas).  So SPARC64 IOMMUs also need the
boundary limit checking when they try to merge sg entries.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-28 15:55:41 -07:00