aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-17 18:26:44 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-17 18:26:44 -0400
commit6bf6d1af86e7dec914f7916f2a00910650a73469 (patch)
tree7fb14c7fce10a9f3e5c48f49941b8642562017ec /arch
parent45a690f6bcd5506d9988d0d069811ac9380750ad (diff)
parent63f49dce39e5d6a19e5f1f9004eb48e73ba259e8 (diff)
Merge remote-tracking branch 'asoc/topic/blackfin' into for-3.7
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/imx23.dtsi52
-rw-r--r--arch/arm/boot/dts/imx27-3ds.dts2
-rw-r--r--arch/arm/boot/dts/imx27.dtsi6
-rw-r--r--arch/arm/boot/dts/imx28.dtsi74
-rw-r--r--arch/arm/boot/dts/imx51-babbage.dts2
-rw-r--r--arch/arm/boot/dts/imx51.dtsi4
-rw-r--r--arch/arm/boot/dts/imx53-ard.dts22
-rw-r--r--arch/arm/boot/dts/imx53.dtsi7
-rw-r--r--arch/arm/boot/dts/imx6q-sabrelite.dts1
-rw-r--r--arch/arm/boot/dts/imx6q.dtsi7
-rw-r--r--arch/arm/configs/imx_v6_v7_defconfig1
-rw-r--r--arch/arm/configs/mxs_defconfig1
-rw-r--r--arch/arm/configs/tct_hammer_defconfig2
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c39
-rw-r--r--arch/arm/mach-exynos/pm_domains.c2
-rw-r--r--arch/arm/mach-imx/clk-imx27.c8
-rw-r--r--arch/arm/mach-imx/clk-imx31.c2
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c1
-rw-r--r--arch/arm/mach-integrator/core.c1
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c2
-rw-r--r--arch/arm/mach-kirkwood/Makefile.boot4
-rw-r--r--arch/arm/mach-mxs/Kconfig6
-rw-r--r--arch/arm/mach-mxs/Makefile3
-rw-r--r--arch/arm/mach-pxa/raumfeld.c2
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig4
-rw-r--r--arch/arm/mach-sa1100/leds-hackkit.c1
-rw-r--r--arch/arm/mach-tegra/board-harmony-power.c32
-rw-r--r--arch/arm/mm/dma-mapping.c12
-rw-r--r--arch/arm/plat-samsung/Kconfig3
-rw-r--r--arch/blackfin/kernel/setup.c1
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c20
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c20
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c20
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c20
-rw-r--r--arch/blackfin/mach-bf609/boards/ezkit.c19
-rw-r--r--arch/ia64/kernel/acpi.c5
-rw-r--r--arch/m68k/Kconfig12
-rw-r--r--arch/m68k/Kconfig.cpu14
-rw-r--r--arch/m68k/apollo/config.c16
-rw-r--r--arch/m68k/include/asm/Kbuild25
-rw-r--r--arch/m68k/include/asm/MC68332.h152
-rw-r--r--arch/m68k/include/asm/apollodma.h248
-rw-r--r--arch/m68k/include/asm/apollohw.h2
-rw-r--r--arch/m68k/include/asm/bitsperlong.h1
-rw-r--r--arch/m68k/include/asm/cputime.h6
-rw-r--r--arch/m68k/include/asm/delay.h2
-rw-r--r--arch/m68k/include/asm/device.h7
-rw-r--r--arch/m68k/include/asm/emergency-restart.h6
-rw-r--r--arch/m68k/include/asm/errno.h6
-rw-r--r--arch/m68k/include/asm/futex.h6
-rw-r--r--arch/m68k/include/asm/ioctl.h1
-rw-r--r--arch/m68k/include/asm/ipcbuf.h1
-rw-r--r--arch/m68k/include/asm/irq_regs.h1
-rw-r--r--arch/m68k/include/asm/kdebug.h1
-rw-r--r--arch/m68k/include/asm/kmap_types.h6
-rw-r--r--arch/m68k/include/asm/kvm_para.h1
-rw-r--r--arch/m68k/include/asm/local.h6
-rw-r--r--arch/m68k/include/asm/local64.h1
-rw-r--r--arch/m68k/include/asm/mac_mouse.h23
-rw-r--r--arch/m68k/include/asm/mcfmbus.h77
-rw-r--r--arch/m68k/include/asm/mman.h1
-rw-r--r--arch/m68k/include/asm/mutex.h9
-rw-r--r--arch/m68k/include/asm/percpu.h6
-rw-r--r--arch/m68k/include/asm/resource.h6
-rw-r--r--arch/m68k/include/asm/sbus.h45
-rw-r--r--arch/m68k/include/asm/scatterlist.h6
-rw-r--r--arch/m68k/include/asm/sections.h8
-rw-r--r--arch/m68k/include/asm/shm.h31
-rw-r--r--arch/m68k/include/asm/siginfo.h6
-rw-r--r--arch/m68k/include/asm/statfs.h6
-rw-r--r--arch/m68k/include/asm/topology.h6
-rw-r--r--arch/m68k/include/asm/types.h22
-rw-r--r--arch/m68k/include/asm/unaligned.h4
-rw-r--r--arch/m68k/include/asm/xor.h1
-rw-r--r--arch/m68k/kernel/setup_no.c11
-rw-r--r--arch/m68k/kernel/sys_m68k.c8
-rw-r--r--arch/m68k/kernel/vmlinux-nommu.lds2
-rw-r--r--arch/m68k/kernel/vmlinux-std.lds2
-rw-r--r--arch/m68k/kernel/vmlinux-sun3.lds2
-rw-r--r--arch/m68k/lib/muldi3.c2
-rw-r--r--arch/m68k/mm/init_mm.c2
-rw-r--r--arch/m68k/mm/init_no.c2
-rw-r--r--arch/m68k/platform/68328/head-de2.S8
-rw-r--r--arch/m68k/platform/68328/head-pilot.S10
-rw-r--r--arch/m68k/platform/68328/head-ram.S4
-rw-r--r--arch/m68k/platform/68328/head-rom.S6
-rw-r--r--arch/m68k/platform/68360/head-ram.S6
-rw-r--r--arch/m68k/platform/68360/head-rom.S8
-rw-r--r--arch/m68k/platform/coldfire/head.S10
-rw-r--r--arch/m68k/sun3/prom/init.c48
-rw-r--r--arch/microblaze/include/asm/sections.h4
-rw-r--r--arch/microblaze/kernel/microblaze_ksyms.c3
-rw-r--r--arch/microblaze/kernel/setup.c4
-rw-r--r--arch/microblaze/kernel/vmlinux.lds.S1
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/include/asm/sparsemem.h2
-rw-r--r--arch/s390/include/asm/syscall.h10
-rw-r--r--arch/s390/kernel/compat_linux.c2
-rw-r--r--arch/s390/kernel/compat_wrapper.S4
-rw-r--r--arch/s390/kernel/ptrace.c7
-rw-r--r--arch/s390/kernel/sys_s390.c9
-rw-r--r--arch/sh/drivers/dma/dma-sh.c2
-rw-r--r--arch/sh/include/asm/sections.h1
-rw-r--r--arch/sh/include/cpu-sh2a/cpu/sh7269.h36
-rw-r--r--arch/sh/kernel/cpu/sh2a/pinmux-sh7269.c195
-rw-r--r--arch/sh/kernel/setup.c2
-rw-r--r--arch/sh/kernel/sh_ksyms_32.c1
-rw-r--r--arch/sh/kernel/vmlinux.lds.S1
-rw-r--r--arch/sh/lib/mcount.S8
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c10
-rw-r--r--arch/sparc/mm/init_64.c28
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/include/asm/mce.h8
-rw-r--r--arch/x86/include/asm/perf_event.h11
-rw-r--r--arch/x86/kernel/acpi/sleep.c4
-rw-r--r--arch/x86/kernel/acpi/sleep.h2
-rw-r--r--arch/x86/kernel/acpi/wakeup_32.S4
-rw-r--r--arch/x86/kernel/acpi/wakeup_64.S4
-rw-r--r--arch/x86/kernel/alternative.c2
-rw-r--r--arch/x86/kernel/apic/io_apic.c4
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-severity.c7
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c43
-rw-r--r--arch/x86/kernel/cpu/perf_event.c89
-rw-r--r--arch/x86/kernel/cpu/perf_event.h20
-rw-r--r--arch/x86/kernel/cpu/perf_event_amd_ibs.c4
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_ds.c7
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.h2
-rw-r--r--arch/x86/kernel/irq.c1
-rw-r--r--arch/x86/kernel/kdebugfs.c6
-rw-r--r--arch/x86/kvm/i8259.c17
-rw-r--r--arch/x86/kvm/vmx.c20
-rw-r--r--arch/x86/kvm/x86.c4
-rw-r--r--arch/x86/mm/srat.c15
-rw-r--r--arch/x86/syscalls/syscall_64.tbl2
-rw-r--r--arch/x86/xen/p2m.c5
135 files changed, 775 insertions, 1156 deletions
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index a874dbfb5ae6..e6138310e5ce 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -51,11 +51,11 @@
51 51
52 dma-apbh@80004000 { 52 dma-apbh@80004000 {
53 compatible = "fsl,imx23-dma-apbh"; 53 compatible = "fsl,imx23-dma-apbh";
54 reg = <0x80004000 2000>; 54 reg = <0x80004000 0x2000>;
55 }; 55 };
56 56
57 ecc@80008000 { 57 ecc@80008000 {
58 reg = <0x80008000 2000>; 58 reg = <0x80008000 0x2000>;
59 status = "disabled"; 59 status = "disabled";
60 }; 60 };
61 61
@@ -63,7 +63,7 @@
63 compatible = "fsl,imx23-gpmi-nand"; 63 compatible = "fsl,imx23-gpmi-nand";
64 #address-cells = <1>; 64 #address-cells = <1>;
65 #size-cells = <1>; 65 #size-cells = <1>;
66 reg = <0x8000c000 2000>, <0x8000a000 2000>; 66 reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
67 reg-names = "gpmi-nand", "bch"; 67 reg-names = "gpmi-nand", "bch";
68 interrupts = <13>, <56>; 68 interrupts = <13>, <56>;
69 interrupt-names = "gpmi-dma", "bch"; 69 interrupt-names = "gpmi-dma", "bch";
@@ -72,14 +72,14 @@
72 }; 72 };
73 73
74 ssp0: ssp@80010000 { 74 ssp0: ssp@80010000 {
75 reg = <0x80010000 2000>; 75 reg = <0x80010000 0x2000>;
76 interrupts = <15 14>; 76 interrupts = <15 14>;
77 fsl,ssp-dma-channel = <1>; 77 fsl,ssp-dma-channel = <1>;
78 status = "disabled"; 78 status = "disabled";
79 }; 79 };
80 80
81 etm@80014000 { 81 etm@80014000 {
82 reg = <0x80014000 2000>; 82 reg = <0x80014000 0x2000>;
83 status = "disabled"; 83 status = "disabled";
84 }; 84 };
85 85
@@ -87,7 +87,7 @@
87 #address-cells = <1>; 87 #address-cells = <1>;
88 #size-cells = <0>; 88 #size-cells = <0>;
89 compatible = "fsl,imx23-pinctrl", "simple-bus"; 89 compatible = "fsl,imx23-pinctrl", "simple-bus";
90 reg = <0x80018000 2000>; 90 reg = <0x80018000 0x2000>;
91 91
92 gpio0: gpio@0 { 92 gpio0: gpio@0 {
93 compatible = "fsl,imx23-gpio", "fsl,mxs-gpio"; 93 compatible = "fsl,imx23-gpio", "fsl,mxs-gpio";
@@ -273,32 +273,32 @@
273 }; 273 };
274 274
275 emi@80020000 { 275 emi@80020000 {
276 reg = <0x80020000 2000>; 276 reg = <0x80020000 0x2000>;
277 status = "disabled"; 277 status = "disabled";
278 }; 278 };
279 279
280 dma-apbx@80024000 { 280 dma-apbx@80024000 {
281 compatible = "fsl,imx23-dma-apbx"; 281 compatible = "fsl,imx23-dma-apbx";
282 reg = <0x80024000 2000>; 282 reg = <0x80024000 0x2000>;
283 }; 283 };
284 284
285 dcp@80028000 { 285 dcp@80028000 {
286 reg = <0x80028000 2000>; 286 reg = <0x80028000 0x2000>;
287 status = "disabled"; 287 status = "disabled";
288 }; 288 };
289 289
290 pxp@8002a000 { 290 pxp@8002a000 {
291 reg = <0x8002a000 2000>; 291 reg = <0x8002a000 0x2000>;
292 status = "disabled"; 292 status = "disabled";
293 }; 293 };
294 294
295 ocotp@8002c000 { 295 ocotp@8002c000 {
296 reg = <0x8002c000 2000>; 296 reg = <0x8002c000 0x2000>;
297 status = "disabled"; 297 status = "disabled";
298 }; 298 };
299 299
300 axi-ahb@8002e000 { 300 axi-ahb@8002e000 {
301 reg = <0x8002e000 2000>; 301 reg = <0x8002e000 0x2000>;
302 status = "disabled"; 302 status = "disabled";
303 }; 303 };
304 304
@@ -310,14 +310,14 @@
310 }; 310 };
311 311
312 ssp1: ssp@80034000 { 312 ssp1: ssp@80034000 {
313 reg = <0x80034000 2000>; 313 reg = <0x80034000 0x2000>;
314 interrupts = <2 20>; 314 interrupts = <2 20>;
315 fsl,ssp-dma-channel = <2>; 315 fsl,ssp-dma-channel = <2>;
316 status = "disabled"; 316 status = "disabled";
317 }; 317 };
318 318
319 tvenc@80038000 { 319 tvenc@80038000 {
320 reg = <0x80038000 2000>; 320 reg = <0x80038000 0x2000>;
321 status = "disabled"; 321 status = "disabled";
322 }; 322 };
323 }; 323 };
@@ -330,37 +330,37 @@
330 ranges; 330 ranges;
331 331
332 clkctl@80040000 { 332 clkctl@80040000 {
333 reg = <0x80040000 2000>; 333 reg = <0x80040000 0x2000>;
334 status = "disabled"; 334 status = "disabled";
335 }; 335 };
336 336
337 saif0: saif@80042000 { 337 saif0: saif@80042000 {
338 reg = <0x80042000 2000>; 338 reg = <0x80042000 0x2000>;
339 status = "disabled"; 339 status = "disabled";
340 }; 340 };
341 341
342 power@80044000 { 342 power@80044000 {
343 reg = <0x80044000 2000>; 343 reg = <0x80044000 0x2000>;
344 status = "disabled"; 344 status = "disabled";
345 }; 345 };
346 346
347 saif1: saif@80046000 { 347 saif1: saif@80046000 {
348 reg = <0x80046000 2000>; 348 reg = <0x80046000 0x2000>;
349 status = "disabled"; 349 status = "disabled";
350 }; 350 };
351 351
352 audio-out@80048000 { 352 audio-out@80048000 {
353 reg = <0x80048000 2000>; 353 reg = <0x80048000 0x2000>;
354 status = "disabled"; 354 status = "disabled";
355 }; 355 };
356 356
357 audio-in@8004c000 { 357 audio-in@8004c000 {
358 reg = <0x8004c000 2000>; 358 reg = <0x8004c000 0x2000>;
359 status = "disabled"; 359 status = "disabled";
360 }; 360 };
361 361
362 lradc@80050000 { 362 lradc@80050000 {
363 reg = <0x80050000 2000>; 363 reg = <0x80050000 0x2000>;
364 status = "disabled"; 364 status = "disabled";
365 }; 365 };
366 366
@@ -370,26 +370,26 @@
370 }; 370 };
371 371
372 i2c@80058000 { 372 i2c@80058000 {
373 reg = <0x80058000 2000>; 373 reg = <0x80058000 0x2000>;
374 status = "disabled"; 374 status = "disabled";
375 }; 375 };
376 376
377 rtc@8005c000 { 377 rtc@8005c000 {
378 compatible = "fsl,imx23-rtc", "fsl,stmp3xxx-rtc"; 378 compatible = "fsl,imx23-rtc", "fsl,stmp3xxx-rtc";
379 reg = <0x8005c000 2000>; 379 reg = <0x8005c000 0x2000>;
380 interrupts = <22>; 380 interrupts = <22>;
381 }; 381 };
382 382
383 pwm: pwm@80064000 { 383 pwm: pwm@80064000 {
384 compatible = "fsl,imx23-pwm"; 384 compatible = "fsl,imx23-pwm";
385 reg = <0x80064000 2000>; 385 reg = <0x80064000 0x2000>;
386 #pwm-cells = <2>; 386 #pwm-cells = <2>;
387 fsl,pwm-number = <5>; 387 fsl,pwm-number = <5>;
388 status = "disabled"; 388 status = "disabled";
389 }; 389 };
390 390
391 timrot@80068000 { 391 timrot@80068000 {
392 reg = <0x80068000 2000>; 392 reg = <0x80068000 0x2000>;
393 status = "disabled"; 393 status = "disabled";
394 }; 394 };
395 395
@@ -429,7 +429,7 @@
429 ranges; 429 ranges;
430 430
431 usbctrl@80080000 { 431 usbctrl@80080000 {
432 reg = <0x80080000 0x10000>; 432 reg = <0x80080000 0x40000>;
433 status = "disabled"; 433 status = "disabled";
434 }; 434 };
435 }; 435 };
diff --git a/arch/arm/boot/dts/imx27-3ds.dts b/arch/arm/boot/dts/imx27-3ds.dts
index d3f8296e19e0..0a8978a40ece 100644
--- a/arch/arm/boot/dts/imx27-3ds.dts
+++ b/arch/arm/boot/dts/imx27-3ds.dts
@@ -27,7 +27,7 @@
27 status = "okay"; 27 status = "okay";
28 }; 28 };
29 29
30 uart@1000a000 { 30 uart1: serial@1000a000 {
31 fsl,uart-has-rtscts; 31 fsl,uart-has-rtscts;
32 status = "okay"; 32 status = "okay";
33 }; 33 };
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 00bae3aad5ab..5303ab680a34 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -19,6 +19,12 @@
19 serial3 = &uart4; 19 serial3 = &uart4;
20 serial4 = &uart5; 20 serial4 = &uart5;
21 serial5 = &uart6; 21 serial5 = &uart6;
22 gpio0 = &gpio1;
23 gpio1 = &gpio2;
24 gpio2 = &gpio3;
25 gpio3 = &gpio4;
26 gpio4 = &gpio5;
27 gpio5 = &gpio6;
22 }; 28 };
23 29
24 avic: avic-interrupt-controller@e0000000 { 30 avic: avic-interrupt-controller@e0000000 {
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 787efac68da8..3fa6d190fab4 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -57,18 +57,18 @@
57 }; 57 };
58 58
59 hsadc@80002000 { 59 hsadc@80002000 {
60 reg = <0x80002000 2000>; 60 reg = <0x80002000 0x2000>;
61 interrupts = <13 87>; 61 interrupts = <13 87>;
62 status = "disabled"; 62 status = "disabled";
63 }; 63 };
64 64
65 dma-apbh@80004000 { 65 dma-apbh@80004000 {
66 compatible = "fsl,imx28-dma-apbh"; 66 compatible = "fsl,imx28-dma-apbh";
67 reg = <0x80004000 2000>; 67 reg = <0x80004000 0x2000>;
68 }; 68 };
69 69
70 perfmon@80006000 { 70 perfmon@80006000 {
71 reg = <0x80006000 800>; 71 reg = <0x80006000 0x800>;
72 interrupts = <27>; 72 interrupts = <27>;
73 status = "disabled"; 73 status = "disabled";
74 }; 74 };
@@ -77,7 +77,7 @@
77 compatible = "fsl,imx28-gpmi-nand"; 77 compatible = "fsl,imx28-gpmi-nand";
78 #address-cells = <1>; 78 #address-cells = <1>;
79 #size-cells = <1>; 79 #size-cells = <1>;
80 reg = <0x8000c000 2000>, <0x8000a000 2000>; 80 reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
81 reg-names = "gpmi-nand", "bch"; 81 reg-names = "gpmi-nand", "bch";
82 interrupts = <88>, <41>; 82 interrupts = <88>, <41>;
83 interrupt-names = "gpmi-dma", "bch"; 83 interrupt-names = "gpmi-dma", "bch";
@@ -86,28 +86,28 @@
86 }; 86 };
87 87
88 ssp0: ssp@80010000 { 88 ssp0: ssp@80010000 {
89 reg = <0x80010000 2000>; 89 reg = <0x80010000 0x2000>;
90 interrupts = <96 82>; 90 interrupts = <96 82>;
91 fsl,ssp-dma-channel = <0>; 91 fsl,ssp-dma-channel = <0>;
92 status = "disabled"; 92 status = "disabled";
93 }; 93 };
94 94
95 ssp1: ssp@80012000 { 95 ssp1: ssp@80012000 {
96 reg = <0x80012000 2000>; 96 reg = <0x80012000 0x2000>;
97 interrupts = <97 83>; 97 interrupts = <97 83>;
98 fsl,ssp-dma-channel = <1>; 98 fsl,ssp-dma-channel = <1>;
99 status = "disabled"; 99 status = "disabled";
100 }; 100 };
101 101
102 ssp2: ssp@80014000 { 102 ssp2: ssp@80014000 {
103 reg = <0x80014000 2000>; 103 reg = <0x80014000 0x2000>;
104 interrupts = <98 84>; 104 interrupts = <98 84>;
105 fsl,ssp-dma-channel = <2>; 105 fsl,ssp-dma-channel = <2>;
106 status = "disabled"; 106 status = "disabled";
107 }; 107 };
108 108
109 ssp3: ssp@80016000 { 109 ssp3: ssp@80016000 {
110 reg = <0x80016000 2000>; 110 reg = <0x80016000 0x2000>;
111 interrupts = <99 85>; 111 interrupts = <99 85>;
112 fsl,ssp-dma-channel = <3>; 112 fsl,ssp-dma-channel = <3>;
113 status = "disabled"; 113 status = "disabled";
@@ -117,7 +117,7 @@
117 #address-cells = <1>; 117 #address-cells = <1>;
118 #size-cells = <0>; 118 #size-cells = <0>;
119 compatible = "fsl,imx28-pinctrl", "simple-bus"; 119 compatible = "fsl,imx28-pinctrl", "simple-bus";
120 reg = <0x80018000 2000>; 120 reg = <0x80018000 0x2000>;
121 121
122 gpio0: gpio@0 { 122 gpio0: gpio@0 {
123 compatible = "fsl,imx28-gpio", "fsl,mxs-gpio"; 123 compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";
@@ -510,96 +510,96 @@
510 }; 510 };
511 511
512 digctl@8001c000 { 512 digctl@8001c000 {
513 reg = <0x8001c000 2000>; 513 reg = <0x8001c000 0x2000>;
514 interrupts = <89>; 514 interrupts = <89>;
515 status = "disabled"; 515 status = "disabled";
516 }; 516 };
517 517
518 etm@80022000 { 518 etm@80022000 {
519 reg = <0x80022000 2000>; 519 reg = <0x80022000 0x2000>;
520 status = "disabled"; 520 status = "disabled";
521 }; 521 };
522 522
523 dma-apbx@80024000 { 523 dma-apbx@80024000 {
524 compatible = "fsl,imx28-dma-apbx"; 524 compatible = "fsl,imx28-dma-apbx";
525 reg = <0x80024000 2000>; 525 reg = <0x80024000 0x2000>;
526 }; 526 };
527 527
528 dcp@80028000 { 528 dcp@80028000 {
529 reg = <0x80028000 2000>; 529 reg = <0x80028000 0x2000>;
530 interrupts = <52 53 54>; 530 interrupts = <52 53 54>;
531 status = "disabled"; 531 status = "disabled";
532 }; 532 };
533 533
534 pxp@8002a000 { 534 pxp@8002a000 {
535 reg = <0x8002a000 2000>; 535 reg = <0x8002a000 0x2000>;
536 interrupts = <39>; 536 interrupts = <39>;
537 status = "disabled"; 537 status = "disabled";
538 }; 538 };
539 539
540 ocotp@8002c000 { 540 ocotp@8002c000 {
541 reg = <0x8002c000 2000>; 541 reg = <0x8002c000 0x2000>;
542 status = "disabled"; 542 status = "disabled";
543 }; 543 };
544 544
545 axi-ahb@8002e000 { 545 axi-ahb@8002e000 {
546 reg = <0x8002e000 2000>; 546 reg = <0x8002e000 0x2000>;
547 status = "disabled"; 547 status = "disabled";
548 }; 548 };
549 549
550 lcdif@80030000 { 550 lcdif@80030000 {
551 compatible = "fsl,imx28-lcdif"; 551 compatible = "fsl,imx28-lcdif";
552 reg = <0x80030000 2000>; 552 reg = <0x80030000 0x2000>;
553 interrupts = <38 86>; 553 interrupts = <38 86>;
554 status = "disabled"; 554 status = "disabled";
555 }; 555 };
556 556
557 can0: can@80032000 { 557 can0: can@80032000 {
558 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; 558 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
559 reg = <0x80032000 2000>; 559 reg = <0x80032000 0x2000>;
560 interrupts = <8>; 560 interrupts = <8>;
561 status = "disabled"; 561 status = "disabled";
562 }; 562 };
563 563
564 can1: can@80034000 { 564 can1: can@80034000 {
565 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; 565 compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
566 reg = <0x80034000 2000>; 566 reg = <0x80034000 0x2000>;
567 interrupts = <9>; 567 interrupts = <9>;
568 status = "disabled"; 568 status = "disabled";
569 }; 569 };
570 570
571 simdbg@8003c000 { 571 simdbg@8003c000 {
572 reg = <0x8003c000 200>; 572 reg = <0x8003c000 0x200>;
573 status = "disabled"; 573 status = "disabled";
574 }; 574 };
575 575
576 simgpmisel@8003c200 { 576 simgpmisel@8003c200 {
577 reg = <0x8003c200 100>; 577 reg = <0x8003c200 0x100>;
578 status = "disabled"; 578 status = "disabled";
579 }; 579 };
580 580
581 simsspsel@8003c300 { 581 simsspsel@8003c300 {
582 reg = <0x8003c300 100>; 582 reg = <0x8003c300 0x100>;
583 status = "disabled"; 583 status = "disabled";
584 }; 584 };
585 585
586 simmemsel@8003c400 { 586 simmemsel@8003c400 {
587 reg = <0x8003c400 100>; 587 reg = <0x8003c400 0x100>;
588 status = "disabled"; 588 status = "disabled";
589 }; 589 };
590 590
591 gpiomon@8003c500 { 591 gpiomon@8003c500 {
592 reg = <0x8003c500 100>; 592 reg = <0x8003c500 0x100>;
593 status = "disabled"; 593 status = "disabled";
594 }; 594 };
595 595
596 simenet@8003c700 { 596 simenet@8003c700 {
597 reg = <0x8003c700 100>; 597 reg = <0x8003c700 0x100>;
598 status = "disabled"; 598 status = "disabled";
599 }; 599 };
600 600
601 armjtag@8003c800 { 601 armjtag@8003c800 {
602 reg = <0x8003c800 100>; 602 reg = <0x8003c800 0x100>;
603 status = "disabled"; 603 status = "disabled";
604 }; 604 };
605 }; 605 };
@@ -612,45 +612,45 @@
612 ranges; 612 ranges;
613 613
614 clkctl@80040000 { 614 clkctl@80040000 {
615 reg = <0x80040000 2000>; 615 reg = <0x80040000 0x2000>;
616 status = "disabled"; 616 status = "disabled";
617 }; 617 };
618 618
619 saif0: saif@80042000 { 619 saif0: saif@80042000 {
620 compatible = "fsl,imx28-saif"; 620 compatible = "fsl,imx28-saif";
621 reg = <0x80042000 2000>; 621 reg = <0x80042000 0x2000>;
622 interrupts = <59 80>; 622 interrupts = <59 80>;
623 fsl,saif-dma-channel = <4>; 623 fsl,saif-dma-channel = <4>;
624 status = "disabled"; 624 status = "disabled";
625 }; 625 };
626 626
627 power@80044000 { 627 power@80044000 {
628 reg = <0x80044000 2000>; 628 reg = <0x80044000 0x2000>;
629 status = "disabled"; 629 status = "disabled";
630 }; 630 };
631 631
632 saif1: saif@80046000 { 632 saif1: saif@80046000 {
633 compatible = "fsl,imx28-saif"; 633 compatible = "fsl,imx28-saif";
634 reg = <0x80046000 2000>; 634 reg = <0x80046000 0x2000>;
635 interrupts = <58 81>; 635 interrupts = <58 81>;
636 fsl,saif-dma-channel = <5>; 636 fsl,saif-dma-channel = <5>;
637 status = "disabled"; 637 status = "disabled";
638 }; 638 };
639 639
640 lradc@80050000 { 640 lradc@80050000 {
641 reg = <0x80050000 2000>; 641 reg = <0x80050000 0x2000>;
642 status = "disabled"; 642 status = "disabled";
643 }; 643 };
644 644
645 spdif@80054000 { 645 spdif@80054000 {
646 reg = <0x80054000 2000>; 646 reg = <0x80054000 0x2000>;
647 interrupts = <45 66>; 647 interrupts = <45 66>;
648 status = "disabled"; 648 status = "disabled";
649 }; 649 };
650 650
651 rtc@80056000 { 651 rtc@80056000 {
652 compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; 652 compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc";
653 reg = <0x80056000 2000>; 653 reg = <0x80056000 0x2000>;
654 interrupts = <29>; 654 interrupts = <29>;
655 }; 655 };
656 656
@@ -658,7 +658,7 @@
658 #address-cells = <1>; 658 #address-cells = <1>;
659 #size-cells = <0>; 659 #size-cells = <0>;
660 compatible = "fsl,imx28-i2c"; 660 compatible = "fsl,imx28-i2c";
661 reg = <0x80058000 2000>; 661 reg = <0x80058000 0x2000>;
662 interrupts = <111 68>; 662 interrupts = <111 68>;
663 clock-frequency = <100000>; 663 clock-frequency = <100000>;
664 status = "disabled"; 664 status = "disabled";
@@ -668,7 +668,7 @@
668 #address-cells = <1>; 668 #address-cells = <1>;
669 #size-cells = <0>; 669 #size-cells = <0>;
670 compatible = "fsl,imx28-i2c"; 670 compatible = "fsl,imx28-i2c";
671 reg = <0x8005a000 2000>; 671 reg = <0x8005a000 0x2000>;
672 interrupts = <110 69>; 672 interrupts = <110 69>;
673 clock-frequency = <100000>; 673 clock-frequency = <100000>;
674 status = "disabled"; 674 status = "disabled";
@@ -676,14 +676,14 @@
676 676
677 pwm: pwm@80064000 { 677 pwm: pwm@80064000 {
678 compatible = "fsl,imx28-pwm", "fsl,imx23-pwm"; 678 compatible = "fsl,imx28-pwm", "fsl,imx23-pwm";
679 reg = <0x80064000 2000>; 679 reg = <0x80064000 0x2000>;
680 #pwm-cells = <2>; 680 #pwm-cells = <2>;
681 fsl,pwm-number = <8>; 681 fsl,pwm-number = <8>;
682 status = "disabled"; 682 status = "disabled";
683 }; 683 };
684 684
685 timrot@80068000 { 685 timrot@80068000 {
686 reg = <0x80068000 2000>; 686 reg = <0x80068000 0x2000>;
687 status = "disabled"; 687 status = "disabled";
688 }; 688 };
689 689
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index de065b5976e6..cd86177a3ea2 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -53,7 +53,7 @@
53 spi-max-frequency = <6000000>; 53 spi-max-frequency = <6000000>;
54 reg = <0>; 54 reg = <0>;
55 interrupt-parent = <&gpio1>; 55 interrupt-parent = <&gpio1>;
56 interrupts = <8>; 56 interrupts = <8 0x4>;
57 57
58 regulators { 58 regulators {
59 sw1_reg: sw1 { 59 sw1_reg: sw1 {
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 53cbaa3d4f90..aba28dc87fc8 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -17,6 +17,10 @@
17 serial0 = &uart1; 17 serial0 = &uart1;
18 serial1 = &uart2; 18 serial1 = &uart2;
19 serial2 = &uart3; 19 serial2 = &uart3;
20 gpio0 = &gpio1;
21 gpio1 = &gpio2;
22 gpio2 = &gpio3;
23 gpio3 = &gpio4;
20 }; 24 };
21 25
22 tzic: tz-interrupt-controller@e0000000 { 26 tzic: tz-interrupt-controller@e0000000 {
diff --git a/arch/arm/boot/dts/imx53-ard.dts b/arch/arm/boot/dts/imx53-ard.dts
index 5b8eafcdbeec..da895e93a999 100644
--- a/arch/arm/boot/dts/imx53-ard.dts
+++ b/arch/arm/boot/dts/imx53-ard.dts
@@ -64,12 +64,32 @@
64 reg = <0xf4000000 0x2000000>; 64 reg = <0xf4000000 0x2000000>;
65 phy-mode = "mii"; 65 phy-mode = "mii";
66 interrupt-parent = <&gpio2>; 66 interrupt-parent = <&gpio2>;
67 interrupts = <31>; 67 interrupts = <31 0x8>;
68 reg-io-width = <4>; 68 reg-io-width = <4>;
69 /*
70 * VDD33A and VDDVARIO of LAN9220 are supplied by
71 * SW4_3V3 of LTC3589. Before the regulator driver
72 * for this PMIC is available, we use a fixed dummy
73 * 3V3 regulator to get LAN9220 driver probing work.
74 */
75 vdd33a-supply = <&reg_3p3v>;
76 vddvario-supply = <&reg_3p3v>;
69 smsc,irq-push-pull; 77 smsc,irq-push-pull;
70 }; 78 };
71 }; 79 };
72 80
81 regulators {
82 compatible = "simple-bus";
83
84 reg_3p3v: 3p3v {
85 compatible = "regulator-fixed";
86 regulator-name = "3P3V";
87 regulator-min-microvolt = <3300000>;
88 regulator-max-microvolt = <3300000>;
89 regulator-always-on;
90 };
91 };
92
73 gpio-keys { 93 gpio-keys {
74 compatible = "gpio-keys"; 94 compatible = "gpio-keys";
75 95
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index fc79cdc4b4e6..cd37165edce5 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -19,6 +19,13 @@
19 serial2 = &uart3; 19 serial2 = &uart3;
20 serial3 = &uart4; 20 serial3 = &uart4;
21 serial4 = &uart5; 21 serial4 = &uart5;
22 gpio0 = &gpio1;
23 gpio1 = &gpio2;
24 gpio2 = &gpio3;
25 gpio3 = &gpio4;
26 gpio4 = &gpio5;
27 gpio5 = &gpio6;
28 gpio6 = &gpio7;
22 }; 29 };
23 30
24 tzic: tz-interrupt-controller@0fffc000 { 31 tzic: tz-interrupt-controller@0fffc000 {
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts
index d42e851ceb97..72f30f3e6171 100644
--- a/arch/arm/boot/dts/imx6q-sabrelite.dts
+++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
@@ -53,6 +53,7 @@
53 fsl,pins = < 53 fsl,pins = <
54 144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */ 54 144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */
55 121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */ 55 121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */
56 953 0x80000000 /* MX6Q_PAD_GPIO_0__CCM_CLKO */
56 >; 57 >;
57 }; 58 };
58 }; 59 };
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 3d3c64b014e6..fd57079f71a9 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -19,6 +19,13 @@
19 serial2 = &uart3; 19 serial2 = &uart3;
20 serial3 = &uart4; 20 serial3 = &uart4;
21 serial4 = &uart5; 21 serial4 = &uart5;
22 gpio0 = &gpio1;
23 gpio1 = &gpio2;
24 gpio2 = &gpio3;
25 gpio3 = &gpio4;
26 gpio4 = &gpio5;
27 gpio5 = &gpio6;
28 gpio6 = &gpio7;
22 }; 29 };
23 30
24 cpus { 31 cpus {
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index f725b9637b33..3c9f32f9b6b4 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -192,6 +192,7 @@ CONFIG_RTC_DRV_MC13XXX=y
192CONFIG_RTC_DRV_MXC=y 192CONFIG_RTC_DRV_MXC=y
193CONFIG_DMADEVICES=y 193CONFIG_DMADEVICES=y
194CONFIG_IMX_SDMA=y 194CONFIG_IMX_SDMA=y
195CONFIG_MXS_DMA=y
195CONFIG_COMMON_CLK_DEBUG=y 196CONFIG_COMMON_CLK_DEBUG=y
196# CONFIG_IOMMU_SUPPORT is not set 197# CONFIG_IOMMU_SUPPORT is not set
197CONFIG_EXT2_FS=y 198CONFIG_EXT2_FS=y
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index ccdb6357fb74..4edcfb4e4dee 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -34,7 +34,6 @@ CONFIG_NO_HZ=y
34CONFIG_HIGH_RES_TIMERS=y 34CONFIG_HIGH_RES_TIMERS=y
35CONFIG_PREEMPT_VOLUNTARY=y 35CONFIG_PREEMPT_VOLUNTARY=y
36CONFIG_AEABI=y 36CONFIG_AEABI=y
37CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
38CONFIG_AUTO_ZRELADDR=y 37CONFIG_AUTO_ZRELADDR=y
39CONFIG_FPE_NWFPE=y 38CONFIG_FPE_NWFPE=y
40CONFIG_NET=y 39CONFIG_NET=y
diff --git a/arch/arm/configs/tct_hammer_defconfig b/arch/arm/configs/tct_hammer_defconfig
index 1d24f8458bef..71277a1591ba 100644
--- a/arch/arm/configs/tct_hammer_defconfig
+++ b/arch/arm/configs/tct_hammer_defconfig
@@ -7,7 +7,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y
7CONFIG_BLK_DEV_INITRD=y 7CONFIG_BLK_DEV_INITRD=y
8CONFIG_EXPERT=y 8CONFIG_EXPERT=y
9# CONFIG_KALLSYMS is not set 9# CONFIG_KALLSYMS is not set
10# CONFIG_BUG is not set 10# CONFIG_BUGVERBOSE is not set
11# CONFIG_ELF_CORE is not set 11# CONFIG_ELF_CORE is not set
12# CONFIG_SHMEM is not set 12# CONFIG_SHMEM is not set
13CONFIG_SLOB=y 13CONFIG_SLOB=y
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index 5de69f2fcca9..f6b9fc70161b 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -162,38 +162,6 @@ static void __init davinci_ntosd2_map_io(void)
162 dm644x_init(); 162 dm644x_init();
163} 163}
164 164
165/*
166 I2C initialization
167*/
168static struct davinci_i2c_platform_data ntosd2_i2c_pdata = {
169 .bus_freq = 20 /* kHz */,
170 .bus_delay = 100 /* usec */,
171};
172
173static struct i2c_board_info __initdata ntosd2_i2c_info[] = {
174};
175
176static int ntosd2_init_i2c(void)
177{
178 int status;
179
180 davinci_init_i2c(&ntosd2_i2c_pdata);
181 status = gpio_request(NTOSD2_MSP430_IRQ, ntosd2_i2c_info[0].type);
182 if (status == 0) {
183 status = gpio_direction_input(NTOSD2_MSP430_IRQ);
184 if (status == 0) {
185 status = gpio_to_irq(NTOSD2_MSP430_IRQ);
186 if (status > 0) {
187 ntosd2_i2c_info[0].irq = status;
188 i2c_register_board_info(1,
189 ntosd2_i2c_info,
190 ARRAY_SIZE(ntosd2_i2c_info));
191 }
192 }
193 }
194 return status;
195}
196
197static struct davinci_mmc_config davinci_ntosd2_mmc_config = { 165static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
198 .wires = 4, 166 .wires = 4,
199 .version = MMC_CTLR_VERSION_1 167 .version = MMC_CTLR_VERSION_1
@@ -218,7 +186,6 @@ static __init void davinci_ntosd2_init(void)
218{ 186{
219 struct clk *aemif_clk; 187 struct clk *aemif_clk;
220 struct davinci_soc_info *soc_info = &davinci_soc_info; 188 struct davinci_soc_info *soc_info = &davinci_soc_info;
221 int status;
222 189
223 aemif_clk = clk_get(NULL, "aemif"); 190 aemif_clk = clk_get(NULL, "aemif");
224 clk_enable(aemif_clk); 191 clk_enable(aemif_clk);
@@ -242,12 +209,6 @@ static __init void davinci_ntosd2_init(void)
242 platform_add_devices(davinci_ntosd2_devices, 209 platform_add_devices(davinci_ntosd2_devices,
243 ARRAY_SIZE(davinci_ntosd2_devices)); 210 ARRAY_SIZE(davinci_ntosd2_devices));
244 211
245 /* Initialize I2C interface specific for this board */
246 status = ntosd2_init_i2c();
247 if (status < 0)
248 pr_warning("davinci_ntosd2_init: msp430 irq setup failed:"
249 " %d\n", status);
250
251 davinci_serial_init(&uart_config); 212 davinci_serial_init(&uart_config);
252 dm644x_init_asp(&dm644x_ntosd2_snd_data); 213 dm644x_init_asp(&dm644x_ntosd2_snd_data);
253 214
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 373c3c00d24c..c0bc83a7663e 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -115,7 +115,7 @@ static __init int exynos_pm_dt_parse_domains(void)
115} 115}
116#endif /* CONFIG_OF */ 116#endif /* CONFIG_OF */
117 117
118static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev, 118static __init __maybe_unused void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
119 struct exynos_pm_domain *pd) 119 struct exynos_pm_domain *pd)
120{ 120{
121 if (pdev->dev.bus) { 121 if (pdev->dev.bus) {
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index 7aa6313fb167..f69ca4680049 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -223,7 +223,7 @@ int __init mx27_clocks_init(unsigned long fref)
223 clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0"); 223 clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0");
224 clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0"); 224 clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0");
225 clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0"); 225 clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0");
226 clk_register_clkdev(clk[csi_ahb_gate], NULL, "mx2-camera.0"); 226 clk_register_clkdev(clk[csi_ahb_gate], "ahb", "mx2-camera.0");
227 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); 227 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
228 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); 228 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
229 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); 229 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");
@@ -250,8 +250,10 @@ int __init mx27_clocks_init(unsigned long fref)
250 clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1"); 250 clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1");
251 clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); 251 clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0");
252 clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); 252 clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad");
253 clk_register_clkdev(clk[emma_ahb_gate], "ahb", "imx-emma"); 253 clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0");
254 clk_register_clkdev(clk[emma_ipg_gate], "ipg", "imx-emma"); 254 clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "mx2-camera.0");
255 clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
256 clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
255 clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL); 257 clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL);
256 clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL); 258 clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL);
257 clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL); 259 clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL);
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c
index 8e19e70f90f9..1253af2d9971 100644
--- a/arch/arm/mach-imx/clk-imx31.c
+++ b/arch/arm/mach-imx/clk-imx31.c
@@ -130,7 +130,7 @@ int __init mx31_clocks_init(unsigned long fref)
130 clk_register_clkdev(clk[nfc], NULL, "mxc_nand.0"); 130 clk_register_clkdev(clk[nfc], NULL, "mxc_nand.0");
131 clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); 131 clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
132 clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); 132 clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
133 clk_register_clkdev(clk[kpp_gate], "kpp", NULL); 133 clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
134 clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.0"); 134 clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.0");
135 clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.0"); 135 clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.0");
136 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0"); 136 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0");
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index f6086693ebd2..4bdcaa97bd98 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -303,6 +303,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
303 clk_prepare_enable(clk[aips_tz2]); /* fec */ 303 clk_prepare_enable(clk[aips_tz2]); /* fec */
304 clk_prepare_enable(clk[spba]); 304 clk_prepare_enable(clk[spba]);
305 clk_prepare_enable(clk[emi_fast_gate]); /* fec */ 305 clk_prepare_enable(clk[emi_fast_gate]); /* fec */
306 clk_prepare_enable(clk[emi_slow_gate]); /* eim */
306 clk_prepare_enable(clk[tmax1]); 307 clk_prepare_enable(clk[tmax1]);
307 clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ 308 clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */
308 clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ 309 clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index ebf680bebdf2..3fa6c51390da 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -11,6 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/device.h> 13#include <linux/device.h>
14#include <linux/export.h>
14#include <linux/spinlock.h> 15#include <linux/spinlock.h>
15#include <linux/interrupt.h> 16#include <linux/interrupt.h>
16#include <linux/irq.h> 17#include <linux/irq.h>
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 7b1055c8e0b9..3b2267529f5e 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -456,7 +456,7 @@ static void __init ap_init_timer(void)
456 456
457 clk = clk_get_sys("ap_timer", NULL); 457 clk = clk_get_sys("ap_timer", NULL);
458 BUG_ON(IS_ERR(clk)); 458 BUG_ON(IS_ERR(clk));
459 clk_enable(clk); 459 clk_prepare_enable(clk);
460 rate = clk_get_rate(clk); 460 rate = clk_get_rate(clk);
461 461
462 writel(0, TIMER0_VA_BASE + TIMER_CTRL); 462 writel(0, TIMER0_VA_BASE + TIMER_CTRL);
diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot
index 2a576abf409b..a5717558ee89 100644
--- a/arch/arm/mach-kirkwood/Makefile.boot
+++ b/arch/arm/mach-kirkwood/Makefile.boot
@@ -9,5 +9,5 @@ dtb-$(CONFIG_MACH_ICONNECT_DT) += kirkwood-iconnect.dtb
9dtb-$(CONFIG_MACH_IB62X0_DT) += kirkwood-ib62x0.dtb 9dtb-$(CONFIG_MACH_IB62X0_DT) += kirkwood-ib62x0.dtb
10dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-qnap-ts219.dtb 10dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-qnap-ts219.dtb
11dtb-$(CONFIG_MACH_GOFLEXNET_DT) += kirkwood-goflexnet.dtb 11dtb-$(CONFIG_MACH_GOFLEXNET_DT) += kirkwood-goflexnet.dtb
12dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb 12dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb
13dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb 13dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index ccdf83b17cf1..9a8bbda195b2 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -2,9 +2,6 @@ if ARCH_MXS
2 2
3source "arch/arm/mach-mxs/devices/Kconfig" 3source "arch/arm/mach-mxs/devices/Kconfig"
4 4
5config MXS_OCOTP
6 bool
7
8config SOC_IMX23 5config SOC_IMX23
9 bool 6 bool
10 select ARM_AMBA 7 select ARM_AMBA
@@ -66,7 +63,6 @@ config MACH_MX28EVK
66 select MXS_HAVE_PLATFORM_MXS_SAIF 63 select MXS_HAVE_PLATFORM_MXS_SAIF
67 select MXS_HAVE_PLATFORM_MXS_I2C 64 select MXS_HAVE_PLATFORM_MXS_I2C
68 select MXS_HAVE_PLATFORM_RTC_STMP3XXX 65 select MXS_HAVE_PLATFORM_RTC_STMP3XXX
69 select MXS_OCOTP
70 help 66 help
71 Include support for MX28EVK platform. This includes specific 67 Include support for MX28EVK platform. This includes specific
72 configurations for the board and its peripherals. 68 configurations for the board and its peripherals.
@@ -94,7 +90,6 @@ config MODULE_M28
94 select MXS_HAVE_PLATFORM_MXS_I2C 90 select MXS_HAVE_PLATFORM_MXS_I2C
95 select MXS_HAVE_PLATFORM_MXS_MMC 91 select MXS_HAVE_PLATFORM_MXS_MMC
96 select MXS_HAVE_PLATFORM_MXSFB 92 select MXS_HAVE_PLATFORM_MXSFB
97 select MXS_OCOTP
98 93
99config MODULE_APX4 94config MODULE_APX4
100 bool 95 bool
@@ -106,7 +101,6 @@ config MODULE_APX4
106 select MXS_HAVE_PLATFORM_MXS_I2C 101 select MXS_HAVE_PLATFORM_MXS_I2C
107 select MXS_HAVE_PLATFORM_MXS_MMC 102 select MXS_HAVE_PLATFORM_MXS_MMC
108 select MXS_HAVE_PLATFORM_MXS_SAIF 103 select MXS_HAVE_PLATFORM_MXS_SAIF
109 select MXS_OCOTP
110 104
111config MACH_TX28 105config MACH_TX28
112 bool "Ka-Ro TX28 module" 106 bool "Ka-Ro TX28 module"
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile
index e41590ccb437..fed3695a1339 100644
--- a/arch/arm/mach-mxs/Makefile
+++ b/arch/arm/mach-mxs/Makefile
@@ -1,7 +1,6 @@
1# Common support 1# Common support
2obj-y := devices.o icoll.o iomux.o system.o timer.o mm.o 2obj-y := devices.o icoll.o iomux.o ocotp.o system.o timer.o mm.o
3 3
4obj-$(CONFIG_MXS_OCOTP) += ocotp.o
5obj-$(CONFIG_PM) += pm.o 4obj-$(CONFIG_PM) += pm.o
6 5
7obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o 6obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 5905ed130e94..d89d87ae144c 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -953,12 +953,12 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
953 953
954static struct eeti_ts_platform_data eeti_ts_pdata = { 954static struct eeti_ts_platform_data eeti_ts_pdata = {
955 .irq_active_high = 1, 955 .irq_active_high = 1,
956 .irq_gpio = GPIO_TOUCH_IRQ,
956}; 957};
957 958
958static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { 959static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
959 .type = "eeti_ts", 960 .type = "eeti_ts",
960 .addr = 0x0a, 961 .addr = 0x0a,
961 .irq = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
962 .platform_data = &eeti_ts_pdata, 962 .platform_data = &eeti_ts_pdata,
963}; 963};
964 964
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e24961109b70..d56b0f7f2b20 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02
483 select I2C 483 select I2C
484 select POWER_SUPPLY 484 select POWER_SUPPLY
485 select MACH_NEO1973 485 select MACH_NEO1973
486 select S3C2410_PWM 486 select S3C24XX_PWM
487 select S3C_DEV_USB_HOST 487 select S3C_DEV_USB_HOST
488 help 488 help
489 Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone 489 Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
@@ -493,7 +493,7 @@ config MACH_RX1950
493 select S3C24XX_DCLK 493 select S3C24XX_DCLK
494 select PM_H1940 if PM 494 select PM_H1940 if PM
495 select I2C 495 select I2C
496 select S3C2410_PWM 496 select S3C24XX_PWM
497 select S3C_DEV_NAND 497 select S3C_DEV_NAND
498 select S3C2410_IOTIMING if S3C2440_CPUFREQ 498 select S3C2410_IOTIMING if S3C2440_CPUFREQ
499 select S3C2440_XTAL_16934400 499 select S3C2440_XTAL_16934400
diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c
index 6a2352436e62..f8e47235babe 100644
--- a/arch/arm/mach-sa1100/leds-hackkit.c
+++ b/arch/arm/mach-sa1100/leds-hackkit.c
@@ -10,6 +10,7 @@
10 * as cpu led, the green one is used as timer led. 10 * as cpu led, the green one is used as timer led.
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/io.h>
13 14
14#include <mach/hardware.h> 15#include <mach/hardware.h>
15#include <asm/leds.h> 16#include <asm/leds.h>
diff --git a/arch/arm/mach-tegra/board-harmony-power.c b/arch/arm/mach-tegra/board-harmony-power.c
index 8fd387bf31f0..b7344beec102 100644
--- a/arch/arm/mach-tegra/board-harmony-power.c
+++ b/arch/arm/mach-tegra/board-harmony-power.c
@@ -51,7 +51,7 @@ static struct regulator_init_data ldo0_data = {
51 .consumer_supplies = tps658621_ldo0_supply, 51 .consumer_supplies = tps658621_ldo0_supply,
52}; 52};
53 53
54#define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv) \ 54#define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv, _on)\
55 static struct regulator_init_data _id##_data = { \ 55 static struct regulator_init_data _id##_data = { \
56 .supply_regulator = _supply, \ 56 .supply_regulator = _supply, \
57 .constraints = { \ 57 .constraints = { \
@@ -63,21 +63,22 @@ static struct regulator_init_data ldo0_data = {
63 .valid_ops_mask = (REGULATOR_CHANGE_MODE | \ 63 .valid_ops_mask = (REGULATOR_CHANGE_MODE | \
64 REGULATOR_CHANGE_STATUS | \ 64 REGULATOR_CHANGE_STATUS | \
65 REGULATOR_CHANGE_VOLTAGE), \ 65 REGULATOR_CHANGE_VOLTAGE), \
66 .always_on = _on, \
66 }, \ 67 }, \
67 } 68 }
68 69
69HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500); 70HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500, 1);
70HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500); 71HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500, 1);
71HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550); 72HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550, 1);
72HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500); 73HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500, 1);
73HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500); 74HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500, 0);
74HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300); 75HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300, 1);
75HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475); 76HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475, 1);
76HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300); 77HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300, 1);
77HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300); 78HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300, 0);
78HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300); 79HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300, 0);
79HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300); 80HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300, 0);
80HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300); 81HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300, 1);
81 82
82#define TPS_REG(_id, _data) \ 83#define TPS_REG(_id, _data) \
83 { \ 84 { \
@@ -119,9 +120,10 @@ static struct i2c_board_info __initdata harmony_regulators[] = {
119 120
120int __init harmony_regulator_init(void) 121int __init harmony_regulator_init(void)
121{ 122{
123 regulator_register_always_on(0, "vdd_sys",
124 NULL, 0, 5000000);
125
122 if (machine_is_harmony()) { 126 if (machine_is_harmony()) {
123 regulator_register_always_on(0, "vdd_sys",
124 NULL, 0, 5000000);
125 i2c_register_board_info(3, harmony_regulators, 1); 127 i2c_register_board_info(3, harmony_regulators, 1);
126 } else { /* Harmony, booted using device tree */ 128 } else { /* Harmony, booted using device tree */
127 struct device_node *np; 129 struct device_node *np;
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index c2cdf6500f75..4e7d1182e8a3 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -358,7 +358,7 @@ void __init dma_contiguous_remap(void)
358 if (end > arm_lowmem_limit) 358 if (end > arm_lowmem_limit)
359 end = arm_lowmem_limit; 359 end = arm_lowmem_limit;
360 if (start >= end) 360 if (start >= end)
361 return; 361 continue;
362 362
363 map.pfn = __phys_to_pfn(start); 363 map.pfn = __phys_to_pfn(start);
364 map.virtual = __phys_to_virt(start); 364 map.virtual = __phys_to_virt(start);
@@ -423,7 +423,7 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page)
423 unsigned int pageno; 423 unsigned int pageno;
424 unsigned long flags; 424 unsigned long flags;
425 void *ptr = NULL; 425 void *ptr = NULL;
426 size_t align; 426 unsigned long align_mask;
427 427
428 if (!pool->vaddr) { 428 if (!pool->vaddr) {
429 WARN(1, "coherent pool not initialised!\n"); 429 WARN(1, "coherent pool not initialised!\n");
@@ -435,11 +435,11 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page)
435 * small, so align them to their order in pages, minimum is a page 435 * small, so align them to their order in pages, minimum is a page
436 * size. This helps reduce fragmentation of the DMA space. 436 * size. This helps reduce fragmentation of the DMA space.
437 */ 437 */
438 align = PAGE_SIZE << get_order(size); 438 align_mask = (1 << get_order(size)) - 1;
439 439
440 spin_lock_irqsave(&pool->lock, flags); 440 spin_lock_irqsave(&pool->lock, flags);
441 pageno = bitmap_find_next_zero_area(pool->bitmap, pool->nr_pages, 441 pageno = bitmap_find_next_zero_area(pool->bitmap, pool->nr_pages,
442 0, count, (1 << align) - 1); 442 0, count, align_mask);
443 if (pageno < pool->nr_pages) { 443 if (pageno < pool->nr_pages) {
444 bitmap_set(pool->bitmap, pageno, count); 444 bitmap_set(pool->bitmap, pageno, count);
445 ptr = pool->vaddr + PAGE_SIZE * pageno; 445 ptr = pool->vaddr + PAGE_SIZE * pageno;
@@ -648,12 +648,12 @@ void arm_dma_free(struct device *dev, size_t size, void *cpu_addr,
648 648
649 if (arch_is_coherent() || nommu()) { 649 if (arch_is_coherent() || nommu()) {
650 __dma_free_buffer(page, size); 650 __dma_free_buffer(page, size);
651 } else if (__free_from_pool(cpu_addr, size)) {
652 return;
651 } else if (!IS_ENABLED(CONFIG_CMA)) { 653 } else if (!IS_ENABLED(CONFIG_CMA)) {
652 __dma_free_remap(cpu_addr, size); 654 __dma_free_remap(cpu_addr, size);
653 __dma_free_buffer(page, size); 655 __dma_free_buffer(page, size);
654 } else { 656 } else {
655 if (__free_from_pool(cpu_addr, size))
656 return;
657 /* 657 /*
658 * Non-atomic allocations cannot be freed with IRQs disabled 658 * Non-atomic allocations cannot be freed with IRQs disabled
659 */ 659 */
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 7aca31c1df1f..9c3b90c3538e 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -403,7 +403,8 @@ config S5P_DEV_USB_EHCI
403 403
404config S3C24XX_PWM 404config S3C24XX_PWM
405 bool "PWM device support" 405 bool "PWM device support"
406 select HAVE_PWM 406 select PWM
407 select PWM_SAMSUNG
407 help 408 help
408 Support for exporting the PWM timer blocks via the pwm device 409 Support for exporting the PWM timer blocks via the pwm device
409 system 410 system
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index ada8f0fc71e4..fb96e607adcf 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -52,7 +52,6 @@ EXPORT_SYMBOL(reserved_mem_dcache_on);
52#ifdef CONFIG_MTD_UCLINUX 52#ifdef CONFIG_MTD_UCLINUX
53extern struct map_info uclinux_ram_map; 53extern struct map_info uclinux_ram_map;
54unsigned long memory_mtd_end, memory_mtd_start, mtd_size; 54unsigned long memory_mtd_end, memory_mtd_start, mtd_size;
55unsigned long _ebss;
56EXPORT_SYMBOL(memory_mtd_end); 55EXPORT_SYMBOL(memory_mtd_end);
57EXPORT_SYMBOL(memory_mtd_start); 56EXPORT_SYMBOL(memory_mtd_start);
58EXPORT_SYMBOL(mtd_size); 57EXPORT_SYMBOL(mtd_size);
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index fc179ca07799..29f16e5c37b9 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -587,6 +587,21 @@ static struct platform_device bfin_tdm = {
587}; 587};
588#endif 588#endif
589 589
590#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
591 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
592static const char * const ad1836_link[] = {
593 "bfin-tdm.0",
594 "spi0.4",
595};
596static struct platform_device bfin_ad1836_machine = {
597 .name = "bfin-snd-ad1836",
598 .id = -1,
599 .dev = {
600 .platform_data = (void *)ad1836_link,
601 },
602};
603#endif
604
590static struct spi_board_info bfin_spi_board_info[] __initdata = { 605static struct spi_board_info bfin_spi_board_info[] __initdata = {
591#if defined(CONFIG_MTD_M25P80) \ 606#if defined(CONFIG_MTD_M25P80) \
592 || defined(CONFIG_MTD_M25P80_MODULE) 607 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -1269,6 +1284,11 @@ static struct platform_device *stamp_devices[] __initdata = {
1269#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 1284#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1270 &bfin_tdm, 1285 &bfin_tdm,
1271#endif 1286#endif
1287
1288#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
1289 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1290 &bfin_ad1836_machine,
1291#endif
1272}; 1292};
1273 1293
1274static int __init ezkit_init(void) 1294static int __init ezkit_init(void)
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index ce88a7165b62..6fca8698bf3b 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -617,6 +617,21 @@ static struct platform_device bfin_ac97_pcm = {
617}; 617};
618#endif 618#endif
619 619
620#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
621 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
622static const char * const ad1836_link[] = {
623 "bfin-tdm.0",
624 "spi0.4",
625};
626static struct platform_device bfin_ad1836_machine = {
627 .name = "bfin-snd-ad1836",
628 .id = -1,
629 .dev = {
630 .platform_data = (void *)ad1836_link,
631 },
632};
633#endif
634
620#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 635#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
621 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 636 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
622static const unsigned ad73311_gpio[] = { 637static const unsigned ad73311_gpio[] = {
@@ -754,6 +769,11 @@ static struct platform_device *stamp_devices[] __initdata = {
754 &bfin_ac97_pcm, 769 &bfin_ac97_pcm,
755#endif 770#endif
756 771
772#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
773 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
774 &bfin_ad1836_machine,
775#endif
776
757#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 777#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
758 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 778 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
759 &bfin_ad73311_machine, 779 &bfin_ad73311_machine,
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 5ed654ae66e1..307bd7e62f43 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -2641,6 +2641,21 @@ static struct platform_device bfin_ac97_pcm = {
2641}; 2641};
2642#endif 2642#endif
2643 2643
2644#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
2645 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2646static const char * const ad1836_link[] = {
2647 "bfin-tdm.0",
2648 "spi0.4",
2649};
2650static struct platform_device bfin_ad1836_machine = {
2651 .name = "bfin-snd-ad1836",
2652 .id = -1,
2653 .dev = {
2654 .platform_data = (void *)ad1836_link,
2655 },
2656};
2657#endif
2658
2644#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2659#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
2645 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 2660 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2646static const unsigned ad73311_gpio[] = { 2661static const unsigned ad73311_gpio[] = {
@@ -2927,6 +2942,11 @@ static struct platform_device *stamp_devices[] __initdata = {
2927 &bfin_ac97_pcm, 2942 &bfin_ac97_pcm,
2928#endif 2943#endif
2929 2944
2945#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
2946 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2947 &bfin_ad1836_machine,
2948#endif
2949
2930#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2950#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
2931 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 2951 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2932 &bfin_ad73311_machine, 2952 &bfin_ad73311_machine,
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 7c36777c6455..551f866172cf 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -539,6 +539,21 @@ static struct platform_device bfin_ac97 = {
539}; 539};
540#endif 540#endif
541 541
542#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
543 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
544static const char * const ad1836_link[] = {
545 "bfin-tdm.0",
546 "spi0.4",
547};
548static struct platform_device bfin_ad1836_machine = {
549 .name = "bfin-snd-ad1836",
550 .id = -1,
551 .dev = {
552 .platform_data = (void *)ad1836_link,
553 },
554};
555#endif
556
542static struct platform_device *ezkit_devices[] __initdata = { 557static struct platform_device *ezkit_devices[] __initdata = {
543 558
544 &bfin_dpmc, 559 &bfin_dpmc,
@@ -603,6 +618,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
603#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 618#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
604 &bfin_ac97, 619 &bfin_ac97,
605#endif 620#endif
621
622#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
623 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
624 &bfin_ad1836_machine,
625#endif
606}; 626};
607 627
608static int __init net2272_init(void) 628static int __init net2272_init(void)
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index c2cf1ae31189..61c1f47a4bf2 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -818,6 +818,21 @@ static struct platform_device bfin_i2s = {
818}; 818};
819#endif 819#endif
820 820
821#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
822 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
823static const char * const ad1836_link[] = {
824 "bfin-tdm.0",
825 "spi0.76",
826};
827static struct platform_device bfin_ad1836_machine = {
828 .name = "bfin-snd-ad1836",
829 .id = -1,
830 .dev = {
831 .platform_data = (void *)ad1836_link,
832 },
833};
834#endif
835
821#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 836#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
822 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE) 837 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
823static struct platform_device adau1761_device = { 838static struct platform_device adau1761_device = {
@@ -1557,6 +1572,10 @@ static struct platform_device *ezkit_devices[] __initdata = {
1557 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE) 1572 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
1558 &bfin_i2s, 1573 &bfin_i2s,
1559#endif 1574#endif
1575#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
1576 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1577 &bfin_ad1836_machine,
1578#endif
1560#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 1579#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
1561 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE) 1580 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
1562 &adau1761_device, 1581 &adau1761_device,
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 6f38b6120d96..440578850ae5 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -497,7 +497,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
497 srat_num_cpus++; 497 srat_num_cpus++;
498} 498}
499 499
500void __init 500int __init
501acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) 501acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
502{ 502{
503 unsigned long paddr, size; 503 unsigned long paddr, size;
@@ -512,7 +512,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
512 512
513 /* Ignore disabled entries */ 513 /* Ignore disabled entries */
514 if (!(ma->flags & ACPI_SRAT_MEM_ENABLED)) 514 if (!(ma->flags & ACPI_SRAT_MEM_ENABLED))
515 return; 515 return -1;
516 516
517 /* record this node in proximity bitmap */ 517 /* record this node in proximity bitmap */
518 pxm_bit_set(pxm); 518 pxm_bit_set(pxm);
@@ -531,6 +531,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
531 p->size = size; 531 p->size = size;
532 p->nid = pxm; 532 p->nid = pxm;
533 num_node_memblks++; 533 num_node_memblks++;
534 return 0;
534} 535}
535 536
536void __init acpi_numa_arch_fixup(void) 537void __init acpi_numa_arch_fixup(void)
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 0b0f8b8c4a26..4a469907f04a 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -54,18 +54,6 @@ config ZONE_DMA
54 bool 54 bool
55 default y 55 default y
56 56
57config CPU_HAS_NO_BITFIELDS
58 bool
59
60config CPU_HAS_NO_MULDIV64
61 bool
62
63config CPU_HAS_ADDRESS_SPACES
64 bool
65
66config FPU
67 bool
68
69config HZ 57config HZ
70 int 58 int
71 default 1000 if CLEOPATRA 59 default 1000 if CLEOPATRA
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 43a9f8f1b8eb..82068349a2bb 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -37,6 +37,7 @@ config M68000
37 bool 37 bool
38 select CPU_HAS_NO_BITFIELDS 38 select CPU_HAS_NO_BITFIELDS
39 select CPU_HAS_NO_MULDIV64 39 select CPU_HAS_NO_MULDIV64
40 select CPU_HAS_NO_UNALIGNED
40 select GENERIC_CSUM 41 select GENERIC_CSUM
41 help 42 help
42 The Freescale (was Motorola) 68000 CPU is the first generation of 43 The Freescale (was Motorola) 68000 CPU is the first generation of
@@ -48,6 +49,7 @@ config M68000
48config MCPU32 49config MCPU32
49 bool 50 bool
50 select CPU_HAS_NO_BITFIELDS 51 select CPU_HAS_NO_BITFIELDS
52 select CPU_HAS_NO_UNALIGNED
51 help 53 help
52 The Freescale (was then Motorola) CPU32 is a CPU core that is 54 The Freescale (was then Motorola) CPU32 is a CPU core that is
53 based on the 68020 processor. For the most part it is used in 55 based on the 68020 processor. For the most part it is used in
@@ -376,6 +378,18 @@ config NODES_SHIFT
376 default "3" 378 default "3"
377 depends on !SINGLE_MEMORY_CHUNK 379 depends on !SINGLE_MEMORY_CHUNK
378 380
381config CPU_HAS_NO_BITFIELDS
382 bool
383
384config CPU_HAS_NO_MULDIV64
385 bool
386
387config CPU_HAS_NO_UNALIGNED
388 bool
389
390config CPU_HAS_ADDRESS_SPACES
391 bool
392
379config FPU 393config FPU
380 bool 394 bool
381 395
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index 0a30406b9442..f5565d6eeb8e 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -177,8 +177,8 @@ irqreturn_t dn_timer_int(int irq, void *dev_id)
177 177
178 timer_handler(irq, dev_id); 178 timer_handler(irq, dev_id);
179 179
180 x=*(volatile unsigned char *)(timer+3); 180 x = *(volatile unsigned char *)(apollo_timer + 3);
181 x=*(volatile unsigned char *)(timer+5); 181 x = *(volatile unsigned char *)(apollo_timer + 5);
182 182
183 return IRQ_HANDLED; 183 return IRQ_HANDLED;
184} 184}
@@ -186,17 +186,17 @@ irqreturn_t dn_timer_int(int irq, void *dev_id)
186void dn_sched_init(irq_handler_t timer_routine) 186void dn_sched_init(irq_handler_t timer_routine)
187{ 187{
188 /* program timer 1 */ 188 /* program timer 1 */
189 *(volatile unsigned char *)(timer+3)=0x01; 189 *(volatile unsigned char *)(apollo_timer + 3) = 0x01;
190 *(volatile unsigned char *)(timer+1)=0x40; 190 *(volatile unsigned char *)(apollo_timer + 1) = 0x40;
191 *(volatile unsigned char *)(timer+5)=0x09; 191 *(volatile unsigned char *)(apollo_timer + 5) = 0x09;
192 *(volatile unsigned char *)(timer+7)=0xc4; 192 *(volatile unsigned char *)(apollo_timer + 7) = 0xc4;
193 193
194 /* enable IRQ of PIC B */ 194 /* enable IRQ of PIC B */
195 *(volatile unsigned char *)(pica+1)&=(~8); 195 *(volatile unsigned char *)(pica+1)&=(~8);
196 196
197#if 0 197#if 0
198 printk("*(0x10803) %02x\n",*(volatile unsigned char *)(timer+0x3)); 198 printk("*(0x10803) %02x\n",*(volatile unsigned char *)(apollo_timer + 0x3));
199 printk("*(0x10803) %02x\n",*(volatile unsigned char *)(timer+0x3)); 199 printk("*(0x10803) %02x\n",*(volatile unsigned char *)(apollo_timer + 0x3));
200#endif 200#endif
201 201
202 if (request_irq(IRQ_APOLLO, dn_timer_int, 0, "time", timer_routine)) 202 if (request_irq(IRQ_APOLLO, dn_timer_int, 0, "time", timer_routine))
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
index eafa2539a8ee..a74e5d95c384 100644
--- a/arch/m68k/include/asm/Kbuild
+++ b/arch/m68k/include/asm/Kbuild
@@ -1,4 +1,29 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2header-y += cachectl.h 2header-y += cachectl.h
3 3
4generic-y += bitsperlong.h
5generic-y += cputime.h
6generic-y += device.h
7generic-y += emergency-restart.h
8generic-y += errno.h
9generic-y += futex.h
10generic-y += ioctl.h
11generic-y += ipcbuf.h
12generic-y += irq_regs.h
13generic-y += kdebug.h
14generic-y += kmap_types.h
15generic-y += kvm_para.h
16generic-y += local64.h
17generic-y += local.h
18generic-y += mman.h
19generic-y += mutex.h
20generic-y += percpu.h
21generic-y += resource.h
22generic-y += scatterlist.h
23generic-y += sections.h
24generic-y += siginfo.h
25generic-y += statfs.h
26generic-y += topology.h
27generic-y += types.h
4generic-y += word-at-a-time.h 28generic-y += word-at-a-time.h
29generic-y += xor.h
diff --git a/arch/m68k/include/asm/MC68332.h b/arch/m68k/include/asm/MC68332.h
deleted file mode 100644
index 6bb8f02685a2..000000000000
--- a/arch/m68k/include/asm/MC68332.h
+++ /dev/null
@@ -1,152 +0,0 @@
1
2/* include/asm-m68knommu/MC68332.h: '332 control registers
3 *
4 * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>,
5 *
6 */
7
8#ifndef _MC68332_H_
9#define _MC68332_H_
10
11#define BYTE_REF(addr) (*((volatile unsigned char*)addr))
12#define WORD_REF(addr) (*((volatile unsigned short*)addr))
13
14#define PORTE_ADDR 0xfffa11
15#define PORTE BYTE_REF(PORTE_ADDR)
16#define DDRE_ADDR 0xfffa15
17#define DDRE BYTE_REF(DDRE_ADDR)
18#define PEPAR_ADDR 0xfffa17
19#define PEPAR BYTE_REF(PEPAR_ADDR)
20
21#define PORTF_ADDR 0xfffa19
22#define PORTF BYTE_REF(PORTF_ADDR)
23#define DDRF_ADDR 0xfffa1d
24#define DDRF BYTE_REF(DDRF_ADDR)
25#define PFPAR_ADDR 0xfffa1f
26#define PFPAR BYTE_REF(PFPAR_ADDR)
27
28#define PORTQS_ADDR 0xfffc15
29#define PORTQS BYTE_REF(PORTQS_ADDR)
30#define DDRQS_ADDR 0xfffc17
31#define DDRQS BYTE_REF(DDRQS_ADDR)
32#define PQSPAR_ADDR 0xfffc16
33#define PQSPAR BYTE_REF(PQSPAR_ADDR)
34
35#define CSPAR0_ADDR 0xFFFA44
36#define CSPAR0 WORD_REF(CSPAR0_ADDR)
37#define CSPAR1_ADDR 0xFFFA46
38#define CSPAR1 WORD_REF(CSPAR1_ADDR)
39#define CSARBT_ADDR 0xFFFA48
40#define CSARBT WORD_REF(CSARBT_ADDR)
41#define CSOPBT_ADDR 0xFFFA4A
42#define CSOPBT WORD_REF(CSOPBT_ADDR)
43#define CSBAR0_ADDR 0xFFFA4C
44#define CSBAR0 WORD_REF(CSBAR0_ADDR)
45#define CSOR0_ADDR 0xFFFA4E
46#define CSOR0 WORD_REF(CSOR0_ADDR)
47#define CSBAR1_ADDR 0xFFFA50
48#define CSBAR1 WORD_REF(CSBAR1_ADDR)
49#define CSOR1_ADDR 0xFFFA52
50#define CSOR1 WORD_REF(CSOR1_ADDR)
51#define CSBAR2_ADDR 0xFFFA54
52#define CSBAR2 WORD_REF(CSBAR2_ADDR)
53#define CSOR2_ADDR 0xFFFA56
54#define CSOR2 WORD_REF(CSOR2_ADDR)
55#define CSBAR3_ADDR 0xFFFA58
56#define CSBAR3 WORD_REF(CSBAR3_ADDR)
57#define CSOR3_ADDR 0xFFFA5A
58#define CSOR3 WORD_REF(CSOR3_ADDR)
59#define CSBAR4_ADDR 0xFFFA5C
60#define CSBAR4 WORD_REF(CSBAR4_ADDR)
61#define CSOR4_ADDR 0xFFFA5E
62#define CSOR4 WORD_REF(CSOR4_ADDR)
63#define CSBAR5_ADDR 0xFFFA60
64#define CSBAR5 WORD_REF(CSBAR5_ADDR)
65#define CSOR5_ADDR 0xFFFA62
66#define CSOR5 WORD_REF(CSOR5_ADDR)
67#define CSBAR6_ADDR 0xFFFA64
68#define CSBAR6 WORD_REF(CSBAR6_ADDR)
69#define CSOR6_ADDR 0xFFFA66
70#define CSOR6 WORD_REF(CSOR6_ADDR)
71#define CSBAR7_ADDR 0xFFFA68
72#define CSBAR7 WORD_REF(CSBAR7_ADDR)
73#define CSOR7_ADDR 0xFFFA6A
74#define CSOR7 WORD_REF(CSOR7_ADDR)
75#define CSBAR8_ADDR 0xFFFA6C
76#define CSBAR8 WORD_REF(CSBAR8_ADDR)
77#define CSOR8_ADDR 0xFFFA6E
78#define CSOR8 WORD_REF(CSOR8_ADDR)
79#define CSBAR9_ADDR 0xFFFA70
80#define CSBAR9 WORD_REF(CSBAR9_ADDR)
81#define CSOR9_ADDR 0xFFFA72
82#define CSOR9 WORD_REF(CSOR9_ADDR)
83#define CSBAR10_ADDR 0xFFFA74
84#define CSBAR10 WORD_REF(CSBAR10_ADDR)
85#define CSOR10_ADDR 0xFFFA76
86#define CSOR10 WORD_REF(CSOR10_ADDR)
87
88#define CSOR_MODE_ASYNC 0x0000
89#define CSOR_MODE_SYNC 0x8000
90#define CSOR_MODE_MASK 0x8000
91#define CSOR_BYTE_DISABLE 0x0000
92#define CSOR_BYTE_UPPER 0x4000
93#define CSOR_BYTE_LOWER 0x2000
94#define CSOR_BYTE_BOTH 0x6000
95#define CSOR_BYTE_MASK 0x6000
96#define CSOR_RW_RSVD 0x0000
97#define CSOR_RW_READ 0x0800
98#define CSOR_RW_WRITE 0x1000
99#define CSOR_RW_BOTH 0x1800
100#define CSOR_RW_MASK 0x1800
101#define CSOR_STROBE_DS 0x0400
102#define CSOR_STROBE_AS 0x0000
103#define CSOR_STROBE_MASK 0x0400
104#define CSOR_DSACK_WAIT(x) (wait << 6)
105#define CSOR_DSACK_FTERM (14 << 6)
106#define CSOR_DSACK_EXTERNAL (15 << 6)
107#define CSOR_DSACK_MASK 0x03c0
108#define CSOR_SPACE_CPU 0x0000
109#define CSOR_SPACE_USER 0x0010
110#define CSOR_SPACE_SU 0x0020
111#define CSOR_SPACE_BOTH 0x0030
112#define CSOR_SPACE_MASK 0x0030
113#define CSOR_IPL_ALL 0x0000
114#define CSOR_IPL_PRIORITY(x) (x << 1)
115#define CSOR_IPL_MASK 0x000e
116#define CSOR_AVEC_ON 0x0001
117#define CSOR_AVEC_OFF 0x0000
118#define CSOR_AVEC_MASK 0x0001
119
120#define CSBAR_ADDR(x) ((addr >> 11) << 3)
121#define CSBAR_ADDR_MASK 0xfff8
122#define CSBAR_BLKSIZE_2K 0x0000
123#define CSBAR_BLKSIZE_8K 0x0001
124#define CSBAR_BLKSIZE_16K 0x0002
125#define CSBAR_BLKSIZE_64K 0x0003
126#define CSBAR_BLKSIZE_128K 0x0004
127#define CSBAR_BLKSIZE_256K 0x0005
128#define CSBAR_BLKSIZE_512K 0x0006
129#define CSBAR_BLKSIZE_1M 0x0007
130#define CSBAR_BLKSIZE_MASK 0x0007
131
132#define CSPAR_DISC 0
133#define CSPAR_ALT 1
134#define CSPAR_CS8 2
135#define CSPAR_CS16 3
136#define CSPAR_MASK 3
137
138#define CSPAR0_CSBOOT(x) (x << 0)
139#define CSPAR0_CS0(x) (x << 2)
140#define CSPAR0_CS1(x) (x << 4)
141#define CSPAR0_CS2(x) (x << 6)
142#define CSPAR0_CS3(x) (x << 8)
143#define CSPAR0_CS4(x) (x << 10)
144#define CSPAR0_CS5(x) (x << 12)
145
146#define CSPAR1_CS6(x) (x << 0)
147#define CSPAR1_CS7(x) (x << 2)
148#define CSPAR1_CS8(x) (x << 4)
149#define CSPAR1_CS9(x) (x << 6)
150#define CSPAR1_CS10(x) (x << 8)
151
152#endif
diff --git a/arch/m68k/include/asm/apollodma.h b/arch/m68k/include/asm/apollodma.h
deleted file mode 100644
index 954adc851adb..000000000000
--- a/arch/m68k/include/asm/apollodma.h
+++ /dev/null
@@ -1,248 +0,0 @@
1/*
2 * linux/include/asm/dma.h: Defines for using and allocating dma channels.
3 * Written by Hennus Bergman, 1992.
4 * High DMA channel support & info by Hannu Savolainen
5 * and John Boyd, Nov. 1992.
6 */
7
8#ifndef _ASM_APOLLO_DMA_H
9#define _ASM_APOLLO_DMA_H
10
11#include <asm/apollohw.h> /* need byte IO */
12#include <linux/spinlock.h> /* And spinlocks */
13#include <linux/delay.h>
14
15
16#define dma_outb(val,addr) (*((volatile unsigned char *)(addr+IO_BASE)) = (val))
17#define dma_inb(addr) (*((volatile unsigned char *)(addr+IO_BASE)))
18
19/*
20 * NOTES about DMA transfers:
21 *
22 * controller 1: channels 0-3, byte operations, ports 00-1F
23 * controller 2: channels 4-7, word operations, ports C0-DF
24 *
25 * - ALL registers are 8 bits only, regardless of transfer size
26 * - channel 4 is not used - cascades 1 into 2.
27 * - channels 0-3 are byte - addresses/counts are for physical bytes
28 * - channels 5-7 are word - addresses/counts are for physical words
29 * - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries
30 * - transfer count loaded to registers is 1 less than actual count
31 * - controller 2 offsets are all even (2x offsets for controller 1)
32 * - page registers for 5-7 don't use data bit 0, represent 128K pages
33 * - page registers for 0-3 use bit 0, represent 64K pages
34 *
35 * DMA transfers are limited to the lower 16MB of _physical_ memory.
36 * Note that addresses loaded into registers must be _physical_ addresses,
37 * not logical addresses (which may differ if paging is active).
38 *
39 * Address mapping for channels 0-3:
40 *
41 * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses)
42 * | ... | | ... | | ... |
43 * | ... | | ... | | ... |
44 * | ... | | ... | | ... |
45 * P7 ... P0 A7 ... A0 A7 ... A0
46 * | Page | Addr MSB | Addr LSB | (DMA registers)
47 *
48 * Address mapping for channels 5-7:
49 *
50 * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses)
51 * | ... | \ \ ... \ \ \ ... \ \
52 * | ... | \ \ ... \ \ \ ... \ (not used)
53 * | ... | \ \ ... \ \ \ ... \
54 * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0
55 * | Page | Addr MSB | Addr LSB | (DMA registers)
56 *
57 * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses
58 * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at
59 * the hardware level, so odd-byte transfers aren't possible).
60 *
61 * Transfer count (_not # bytes_) is limited to 64K, represented as actual
62 * count - 1 : 64K => 0xFFFF, 1 => 0x0000. Thus, count is always 1 or more,
63 * and up to 128K bytes may be transferred on channels 5-7 in one operation.
64 *
65 */
66
67#define MAX_DMA_CHANNELS 8
68
69/* The maximum address that we can perform a DMA transfer to on this platform */#define MAX_DMA_ADDRESS (PAGE_OFFSET+0x1000000)
70
71/* 8237 DMA controllers */
72#define IO_DMA1_BASE 0x10C00 /* 8 bit slave DMA, channels 0..3 */
73#define IO_DMA2_BASE 0x10D00 /* 16 bit master DMA, ch 4(=slave input)..7 */
74
75/* DMA controller registers */
76#define DMA1_CMD_REG (IO_DMA1_BASE+0x08) /* command register (w) */
77#define DMA1_STAT_REG (IO_DMA1_BASE+0x08) /* status register (r) */
78#define DMA1_REQ_REG (IO_DMA1_BASE+0x09) /* request register (w) */
79#define DMA1_MASK_REG (IO_DMA1_BASE+0x0A) /* single-channel mask (w) */
80#define DMA1_MODE_REG (IO_DMA1_BASE+0x0B) /* mode register (w) */
81#define DMA1_CLEAR_FF_REG (IO_DMA1_BASE+0x0C) /* clear pointer flip-flop (w) */
82#define DMA1_TEMP_REG (IO_DMA1_BASE+0x0D) /* Temporary Register (r) */
83#define DMA1_RESET_REG (IO_DMA1_BASE+0x0D) /* Master Clear (w) */
84#define DMA1_CLR_MASK_REG (IO_DMA1_BASE+0x0E) /* Clear Mask */
85#define DMA1_MASK_ALL_REG (IO_DMA1_BASE+0x0F) /* all-channels mask (w) */
86
87#define DMA2_CMD_REG (IO_DMA2_BASE+0x10) /* command register (w) */
88#define DMA2_STAT_REG (IO_DMA2_BASE+0x10) /* status register (r) */
89#define DMA2_REQ_REG (IO_DMA2_BASE+0x12) /* request register (w) */
90#define DMA2_MASK_REG (IO_DMA2_BASE+0x14) /* single-channel mask (w) */
91#define DMA2_MODE_REG (IO_DMA2_BASE+0x16) /* mode register (w) */
92#define DMA2_CLEAR_FF_REG (IO_DMA2_BASE+0x18) /* clear pointer flip-flop (w) */
93#define DMA2_TEMP_REG (IO_DMA2_BASE+0x1A) /* Temporary Register (r) */
94#define DMA2_RESET_REG (IO_DMA2_BASE+0x1A) /* Master Clear (w) */
95#define DMA2_CLR_MASK_REG (IO_DMA2_BASE+0x1C) /* Clear Mask */
96#define DMA2_MASK_ALL_REG (IO_DMA2_BASE+0x1E) /* all-channels mask (w) */
97
98#define DMA_ADDR_0 (IO_DMA1_BASE+0x00) /* DMA address registers */
99#define DMA_ADDR_1 (IO_DMA1_BASE+0x02)
100#define DMA_ADDR_2 (IO_DMA1_BASE+0x04)
101#define DMA_ADDR_3 (IO_DMA1_BASE+0x06)
102#define DMA_ADDR_4 (IO_DMA2_BASE+0x00)
103#define DMA_ADDR_5 (IO_DMA2_BASE+0x04)
104#define DMA_ADDR_6 (IO_DMA2_BASE+0x08)
105#define DMA_ADDR_7 (IO_DMA2_BASE+0x0C)
106
107#define DMA_CNT_0 (IO_DMA1_BASE+0x01) /* DMA count registers */
108#define DMA_CNT_1 (IO_DMA1_BASE+0x03)
109#define DMA_CNT_2 (IO_DMA1_BASE+0x05)
110#define DMA_CNT_3 (IO_DMA1_BASE+0x07)
111#define DMA_CNT_4 (IO_DMA2_BASE+0x02)
112#define DMA_CNT_5 (IO_DMA2_BASE+0x06)
113#define DMA_CNT_6 (IO_DMA2_BASE+0x0A)
114#define DMA_CNT_7 (IO_DMA2_BASE+0x0E)
115
116#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */
117#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */
118#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */
119
120#define DMA_AUTOINIT 0x10
121
122#define DMA_8BIT 0
123#define DMA_16BIT 1
124#define DMA_BUSMASTER 2
125
126extern spinlock_t dma_spin_lock;
127
128static __inline__ unsigned long claim_dma_lock(void)
129{
130 unsigned long flags;
131 spin_lock_irqsave(&dma_spin_lock, flags);
132 return flags;
133}
134
135static __inline__ void release_dma_lock(unsigned long flags)
136{
137 spin_unlock_irqrestore(&dma_spin_lock, flags);
138}
139
140/* enable/disable a specific DMA channel */
141static __inline__ void enable_dma(unsigned int dmanr)
142{
143 if (dmanr<=3)
144 dma_outb(dmanr, DMA1_MASK_REG);
145 else
146 dma_outb(dmanr & 3, DMA2_MASK_REG);
147}
148
149static __inline__ void disable_dma(unsigned int dmanr)
150{
151 if (dmanr<=3)
152 dma_outb(dmanr | 4, DMA1_MASK_REG);
153 else
154 dma_outb((dmanr & 3) | 4, DMA2_MASK_REG);
155}
156
157/* Clear the 'DMA Pointer Flip Flop'.
158 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
159 * Use this once to initialize the FF to a known state.
160 * After that, keep track of it. :-)
161 * --- In order to do that, the DMA routines below should ---
162 * --- only be used while holding the DMA lock ! ---
163 */
164static __inline__ void clear_dma_ff(unsigned int dmanr)
165{
166 if (dmanr<=3)
167 dma_outb(0, DMA1_CLEAR_FF_REG);
168 else
169 dma_outb(0, DMA2_CLEAR_FF_REG);
170}
171
172/* set mode (above) for a specific DMA channel */
173static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
174{
175 if (dmanr<=3)
176 dma_outb(mode | dmanr, DMA1_MODE_REG);
177 else
178 dma_outb(mode | (dmanr&3), DMA2_MODE_REG);
179}
180
181/* Set transfer address & page bits for specific DMA channel.
182 * Assumes dma flipflop is clear.
183 */
184static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
185{
186 if (dmanr <= 3) {
187 dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
188 dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
189 } else {
190 dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
191 dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
192 }
193}
194
195
196/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
197 * a specific DMA channel.
198 * You must ensure the parameters are valid.
199 * NOTE: from a manual: "the number of transfers is one more
200 * than the initial word count"! This is taken into account.
201 * Assumes dma flip-flop is clear.
202 * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
203 */
204static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
205{
206 count--;
207 if (dmanr <= 3) {
208 dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
209 dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
210 } else {
211 dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
212 dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
213 }
214}
215
216
217/* Get DMA residue count. After a DMA transfer, this
218 * should return zero. Reading this while a DMA transfer is
219 * still in progress will return unpredictable results.
220 * If called before the channel has been used, it may return 1.
221 * Otherwise, it returns the number of _bytes_ left to transfer.
222 *
223 * Assumes DMA flip-flop is clear.
224 */
225static __inline__ int get_dma_residue(unsigned int dmanr)
226{
227 unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE
228 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE;
229
230 /* using short to get 16-bit wrap around */
231 unsigned short count;
232
233 count = 1 + dma_inb(io_port);
234 count += dma_inb(io_port) << 8;
235
236 return (dmanr<=3)? count : (count<<1);
237}
238
239
240/* These are in kernel/dma.c: */
241extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
242extern void free_dma(unsigned int dmanr); /* release it again */
243
244/* These are in arch/m68k/apollo/dma.c: */
245extern unsigned short dma_map_page(unsigned long phys_addr,int count,int type);
246extern void dma_unmap_page(unsigned short dma_addr);
247
248#endif /* _ASM_APOLLO_DMA_H */
diff --git a/arch/m68k/include/asm/apollohw.h b/arch/m68k/include/asm/apollohw.h
index a1373b9aa281..635ef4f89010 100644
--- a/arch/m68k/include/asm/apollohw.h
+++ b/arch/m68k/include/asm/apollohw.h
@@ -98,7 +98,7 @@ extern u_long timer_physaddr;
98#define cpuctrl (*(volatile unsigned int *)(IO_BASE + cpuctrl_physaddr)) 98#define cpuctrl (*(volatile unsigned int *)(IO_BASE + cpuctrl_physaddr))
99#define pica (IO_BASE + pica_physaddr) 99#define pica (IO_BASE + pica_physaddr)
100#define picb (IO_BASE + picb_physaddr) 100#define picb (IO_BASE + picb_physaddr)
101#define timer (IO_BASE + timer_physaddr) 101#define apollo_timer (IO_BASE + timer_physaddr)
102#define addr_xlat_map ((unsigned short *)(IO_BASE + 0x17000)) 102#define addr_xlat_map ((unsigned short *)(IO_BASE + 0x17000))
103 103
104#define isaIO2mem(x) (((((x) & 0x3f8) << 7) | (((x) & 0xfc00) >> 6) | ((x) & 0x7)) + 0x40000 + IO_BASE) 104#define isaIO2mem(x) (((((x) & 0x3f8) << 7) | (((x) & 0xfc00) >> 6) | ((x) & 0x7)) + 0x40000 + IO_BASE)
diff --git a/arch/m68k/include/asm/bitsperlong.h b/arch/m68k/include/asm/bitsperlong.h
deleted file mode 100644
index 6dc0bb0c13b2..000000000000
--- a/arch/m68k/include/asm/bitsperlong.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/bitsperlong.h>
diff --git a/arch/m68k/include/asm/cputime.h b/arch/m68k/include/asm/cputime.h
deleted file mode 100644
index c79c5e892305..000000000000
--- a/arch/m68k/include/asm/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __M68K_CPUTIME_H
2#define __M68K_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __M68K_CPUTIME_H */
diff --git a/arch/m68k/include/asm/delay.h b/arch/m68k/include/asm/delay.h
index 9c09becfd4c9..12d8fe4f1d30 100644
--- a/arch/m68k/include/asm/delay.h
+++ b/arch/m68k/include/asm/delay.h
@@ -43,7 +43,7 @@ static inline void __delay(unsigned long loops)
43extern void __bad_udelay(void); 43extern void __bad_udelay(void);
44 44
45 45
46#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) 46#ifdef CONFIG_CPU_HAS_NO_MULDIV64
47/* 47/*
48 * The simpler m68k and ColdFire processors do not have a 32*32->64 48 * The simpler m68k and ColdFire processors do not have a 32*32->64
49 * multiply instruction. So we need to handle them a little differently. 49 * multiply instruction. So we need to handle them a little differently.
diff --git a/arch/m68k/include/asm/device.h b/arch/m68k/include/asm/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/arch/m68k/include/asm/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/arch/m68k/include/asm/emergency-restart.h b/arch/m68k/include/asm/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/arch/m68k/include/asm/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/arch/m68k/include/asm/errno.h b/arch/m68k/include/asm/errno.h
deleted file mode 100644
index 0d4e188d6ef6..000000000000
--- a/arch/m68k/include/asm/errno.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68K_ERRNO_H
2#define _M68K_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#endif /* _M68K_ERRNO_H */
diff --git a/arch/m68k/include/asm/futex.h b/arch/m68k/include/asm/futex.h
deleted file mode 100644
index 6a332a9f099c..000000000000
--- a/arch/m68k/include/asm/futex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif
diff --git a/arch/m68k/include/asm/ioctl.h b/arch/m68k/include/asm/ioctl.h
deleted file mode 100644
index b279fe06dfe5..000000000000
--- a/arch/m68k/include/asm/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ioctl.h>
diff --git a/arch/m68k/include/asm/ipcbuf.h b/arch/m68k/include/asm/ipcbuf.h
deleted file mode 100644
index 84c7e51cb6d0..000000000000
--- a/arch/m68k/include/asm/ipcbuf.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ipcbuf.h>
diff --git a/arch/m68k/include/asm/irq_regs.h b/arch/m68k/include/asm/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/arch/m68k/include/asm/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/arch/m68k/include/asm/kdebug.h b/arch/m68k/include/asm/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/arch/m68k/include/asm/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/arch/m68k/include/asm/kmap_types.h b/arch/m68k/include/asm/kmap_types.h
deleted file mode 100644
index 3413cc1390ec..000000000000
--- a/arch/m68k/include/asm/kmap_types.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_M68K_KMAP_TYPES_H
2#define __ASM_M68K_KMAP_TYPES_H
3
4#include <asm-generic/kmap_types.h>
5
6#endif /* __ASM_M68K_KMAP_TYPES_H */
diff --git a/arch/m68k/include/asm/kvm_para.h b/arch/m68k/include/asm/kvm_para.h
deleted file mode 100644
index 14fab8f0b957..000000000000
--- a/arch/m68k/include/asm/kvm_para.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kvm_para.h>
diff --git a/arch/m68k/include/asm/local.h b/arch/m68k/include/asm/local.h
deleted file mode 100644
index 6c259263e1f0..000000000000
--- a/arch/m68k/include/asm/local.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_M68K_LOCAL_H
2#define _ASM_M68K_LOCAL_H
3
4#include <asm-generic/local.h>
5
6#endif /* _ASM_M68K_LOCAL_H */
diff --git a/arch/m68k/include/asm/local64.h b/arch/m68k/include/asm/local64.h
deleted file mode 100644
index 36c93b5cc239..000000000000
--- a/arch/m68k/include/asm/local64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/local64.h>
diff --git a/arch/m68k/include/asm/mac_mouse.h b/arch/m68k/include/asm/mac_mouse.h
deleted file mode 100644
index 39a5c292eaee..000000000000
--- a/arch/m68k/include/asm/mac_mouse.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef _ASM_MAC_MOUSE_H
2#define _ASM_MAC_MOUSE_H
3
4/*
5 * linux/include/asm-m68k/mac_mouse.h
6 * header file for Macintosh ADB mouse driver
7 * 27-10-97 Michael Schmitz
8 * copied from:
9 * header file for Atari Mouse driver
10 * by Robert de Vries (robert@and.nl) on 19Jul93
11 */
12
13struct mouse_status {
14 char buttons;
15 short dx;
16 short dy;
17 int ready;
18 int active;
19 wait_queue_head_t wait;
20 struct fasync_struct *fasyncptr;
21};
22
23#endif
diff --git a/arch/m68k/include/asm/mcfmbus.h b/arch/m68k/include/asm/mcfmbus.h
deleted file mode 100644
index 319899c47a2c..000000000000
--- a/arch/m68k/include/asm/mcfmbus.h
+++ /dev/null
@@ -1,77 +0,0 @@
1/****************************************************************************/
2
3/*
4 * mcfmbus.h -- Coldfire MBUS support defines.
5 *
6 * (C) Copyright 1999, Martin Floeer (mfloeer@axcent.de)
7 */
8
9/****************************************************************************/
10
11
12#ifndef mcfmbus_h
13#define mcfmbus_h
14
15
16#define MCFMBUS_BASE 0x280
17#define MCFMBUS_IRQ_VECTOR 0x19
18#define MCFMBUS_IRQ 0x1
19#define MCFMBUS_CLK 0x3f
20#define MCFMBUS_IRQ_LEVEL 0x07 /*IRQ Level 1*/
21#define MCFMBUS_ADDRESS 0x01
22
23
24/*
25* Define the 5307 MBUS register set addresses
26*/
27
28#define MCFMBUS_MADR 0x00
29#define MCFMBUS_MFDR 0x04
30#define MCFMBUS_MBCR 0x08
31#define MCFMBUS_MBSR 0x0C
32#define MCFMBUS_MBDR 0x10
33
34
35#define MCFMBUS_MADR_ADDR(a) (((a)&0x7F)<<0x01) /*Slave Address*/
36
37#define MCFMBUS_MFDR_MBC(a) ((a)&0x3F) /*M-Bus Clock*/
38
39/*
40* Define bit flags in Control Register
41*/
42
43#define MCFMBUS_MBCR_MEN (0x80) /* M-Bus Enable */
44#define MCFMBUS_MBCR_MIEN (0x40) /* M-Bus Interrupt Enable */
45#define MCFMBUS_MBCR_MSTA (0x20) /* Master/Slave Mode Select Bit */
46#define MCFMBUS_MBCR_MTX (0x10) /* Transmit/Rcv Mode Select Bit */
47#define MCFMBUS_MBCR_TXAK (0x08) /* Transmit Acknowledge Enable */
48#define MCFMBUS_MBCR_RSTA (0x04) /* Repeat Start */
49
50/*
51* Define bit flags in Status Register
52*/
53
54#define MCFMBUS_MBSR_MCF (0x80) /* Data Transfer Complete */
55#define MCFMBUS_MBSR_MAAS (0x40) /* Addressed as a Slave */
56#define MCFMBUS_MBSR_MBB (0x20) /* Bus Busy */
57#define MCFMBUS_MBSR_MAL (0x10) /* Arbitration Lost */
58#define MCFMBUS_MBSR_SRW (0x04) /* Slave Transmit */
59#define MCFMBUS_MBSR_MIF (0x02) /* M-Bus Interrupt */
60#define MCFMBUS_MBSR_RXAK (0x01) /* No Acknowledge Received */
61
62/*
63* Define bit flags in DATA I/O Register
64*/
65
66#define MCFMBUS_MBDR_READ (0x01) /* 1=read 0=write MBUS */
67
68#define MBUSIOCSCLOCK 1
69#define MBUSIOCGCLOCK 2
70#define MBUSIOCSADDR 3
71#define MBUSIOCGADDR 4
72#define MBUSIOCSSLADDR 5
73#define MBUSIOCGSLADDR 6
74#define MBUSIOCSSUBADDR 7
75#define MBUSIOCGSUBADDR 8
76
77#endif
diff --git a/arch/m68k/include/asm/mman.h b/arch/m68k/include/asm/mman.h
deleted file mode 100644
index 8eebf89f5ab1..000000000000
--- a/arch/m68k/include/asm/mman.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/mman.h>
diff --git a/arch/m68k/include/asm/mutex.h b/arch/m68k/include/asm/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/arch/m68k/include/asm/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/arch/m68k/include/asm/percpu.h b/arch/m68k/include/asm/percpu.h
deleted file mode 100644
index 0859d048faf5..000000000000
--- a/arch/m68k/include/asm/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_M68K_PERCPU_H
2#define __ASM_M68K_PERCPU_H
3
4#include <asm-generic/percpu.h>
5
6#endif /* __ASM_M68K_PERCPU_H */
diff --git a/arch/m68k/include/asm/resource.h b/arch/m68k/include/asm/resource.h
deleted file mode 100644
index e7d35019f337..000000000000
--- a/arch/m68k/include/asm/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68K_RESOURCE_H
2#define _M68K_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif /* _M68K_RESOURCE_H */
diff --git a/arch/m68k/include/asm/sbus.h b/arch/m68k/include/asm/sbus.h
deleted file mode 100644
index bfe3ba147f2e..000000000000
--- a/arch/m68k/include/asm/sbus.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * some sbus structures and macros to make usage of sbus drivers possible
3 */
4
5#ifndef __M68K_SBUS_H
6#define __M68K_SBUS_H
7
8struct sbus_dev {
9 struct {
10 unsigned int which_io;
11 unsigned int phys_addr;
12 } reg_addrs[1];
13};
14
15/* sbus IO functions stolen from include/asm-sparc/io.h for the serial driver */
16/* No SBUS on the Sun3, kludge -- sam */
17
18static inline void _sbus_writeb(unsigned char val, unsigned long addr)
19{
20 *(volatile unsigned char *)addr = val;
21}
22
23static inline unsigned char _sbus_readb(unsigned long addr)
24{
25 return *(volatile unsigned char *)addr;
26}
27
28static inline void _sbus_writel(unsigned long val, unsigned long addr)
29{
30 *(volatile unsigned long *)addr = val;
31
32}
33
34extern inline unsigned long _sbus_readl(unsigned long addr)
35{
36 return *(volatile unsigned long *)addr;
37}
38
39
40#define sbus_readb(a) _sbus_readb((unsigned long)a)
41#define sbus_writeb(v, a) _sbus_writeb(v, (unsigned long)a)
42#define sbus_readl(a) _sbus_readl((unsigned long)a)
43#define sbus_writel(v, a) _sbus_writel(v, (unsigned long)a)
44
45#endif
diff --git a/arch/m68k/include/asm/scatterlist.h b/arch/m68k/include/asm/scatterlist.h
deleted file mode 100644
index 312505452a1e..000000000000
--- a/arch/m68k/include/asm/scatterlist.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68K_SCATTERLIST_H
2#define _M68K_SCATTERLIST_H
3
4#include <asm-generic/scatterlist.h>
5
6#endif /* !(_M68K_SCATTERLIST_H) */
diff --git a/arch/m68k/include/asm/sections.h b/arch/m68k/include/asm/sections.h
deleted file mode 100644
index 5277e52715ec..000000000000
--- a/arch/m68k/include/asm/sections.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_M68K_SECTIONS_H
2#define _ASM_M68K_SECTIONS_H
3
4#include <asm-generic/sections.h>
5
6extern char _sbss[], _ebss[];
7
8#endif /* _ASM_M68K_SECTIONS_H */
diff --git a/arch/m68k/include/asm/shm.h b/arch/m68k/include/asm/shm.h
deleted file mode 100644
index fa56ec84a126..000000000000
--- a/arch/m68k/include/asm/shm.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _M68K_SHM_H
2#define _M68K_SHM_H
3
4
5/* format of page table entries that correspond to shared memory pages
6 currently out in swap space (see also mm/swap.c):
7 bits 0-1 (PAGE_PRESENT) is = 0
8 bits 8..2 (SWP_TYPE) are = SHM_SWP_TYPE
9 bits 31..9 are used like this:
10 bits 15..9 (SHM_ID) the id of the shared memory segment
11 bits 30..16 (SHM_IDX) the index of the page within the shared memory segment
12 (actually only bits 25..16 get used since SHMMAX is so low)
13 bit 31 (SHM_READ_ONLY) flag whether the page belongs to a read-only attach
14*/
15/* on the m68k both bits 0 and 1 must be zero */
16/* format on the sun3 is similar, but bits 30, 31 are set to zero and all
17 others are reduced by 2. --m */
18
19#ifndef CONFIG_SUN3
20#define SHM_ID_SHIFT 9
21#else
22#define SHM_ID_SHIFT 7
23#endif
24#define _SHM_ID_BITS 7
25#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
26
27#define SHM_IDX_SHIFT (SHM_ID_SHIFT+_SHM_ID_BITS)
28#define _SHM_IDX_BITS 15
29#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
30
31#endif /* _M68K_SHM_H */
diff --git a/arch/m68k/include/asm/siginfo.h b/arch/m68k/include/asm/siginfo.h
deleted file mode 100644
index 851d3d784b53..000000000000
--- a/arch/m68k/include/asm/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68K_SIGINFO_H
2#define _M68K_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#endif
diff --git a/arch/m68k/include/asm/statfs.h b/arch/m68k/include/asm/statfs.h
deleted file mode 100644
index 08d93f14e061..000000000000
--- a/arch/m68k/include/asm/statfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68K_STATFS_H
2#define _M68K_STATFS_H
3
4#include <asm-generic/statfs.h>
5
6#endif /* _M68K_STATFS_H */
diff --git a/arch/m68k/include/asm/topology.h b/arch/m68k/include/asm/topology.h
deleted file mode 100644
index ca173e9f26ff..000000000000
--- a/arch/m68k/include/asm/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_M68K_TOPOLOGY_H
2#define _ASM_M68K_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_M68K_TOPOLOGY_H */
diff --git a/arch/m68k/include/asm/types.h b/arch/m68k/include/asm/types.h
deleted file mode 100644
index 89705adcbd52..000000000000
--- a/arch/m68k/include/asm/types.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _M68K_TYPES_H
2#define _M68K_TYPES_H
3
4/*
5 * This file is never included by application software unless
6 * explicitly requested (e.g., via linux/types.h) in which case the
7 * application is Linux specific so (user-) name space pollution is
8 * not a major issue. However, for interoperability, libraries still
9 * need to be careful to avoid a name clashes.
10 */
11#include <asm-generic/int-ll64.h>
12
13/*
14 * These aren't exported outside the kernel to avoid name space clashes
15 */
16#ifdef __KERNEL__
17
18#define BITS_PER_LONG 32
19
20#endif /* __KERNEL__ */
21
22#endif /* _M68K_TYPES_H */
diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h
index f4043ae63db1..2b3ca0bf7a0d 100644
--- a/arch/m68k/include/asm/unaligned.h
+++ b/arch/m68k/include/asm/unaligned.h
@@ -2,7 +2,7 @@
2#define _ASM_M68K_UNALIGNED_H 2#define _ASM_M68K_UNALIGNED_H
3 3
4 4
5#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000) 5#ifdef CONFIG_CPU_HAS_NO_UNALIGNED
6#include <linux/unaligned/be_struct.h> 6#include <linux/unaligned/be_struct.h>
7#include <linux/unaligned/le_byteshift.h> 7#include <linux/unaligned/le_byteshift.h>
8#include <linux/unaligned/generic.h> 8#include <linux/unaligned/generic.h>
@@ -12,7 +12,7 @@
12 12
13#else 13#else
14/* 14/*
15 * The m68k can do unaligned accesses itself. 15 * The m68k can do unaligned accesses itself.
16 */ 16 */
17#include <linux/unaligned/access_ok.h> 17#include <linux/unaligned/access_ok.h>
18#include <linux/unaligned/generic.h> 18#include <linux/unaligned/generic.h>
diff --git a/arch/m68k/include/asm/xor.h b/arch/m68k/include/asm/xor.h
deleted file mode 100644
index c82eb12a5b18..000000000000
--- a/arch/m68k/include/asm/xor.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/xor.h>
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
index 7dc186b7a85f..71fb29938dba 100644
--- a/arch/m68k/kernel/setup_no.c
+++ b/arch/m68k/kernel/setup_no.c
@@ -218,13 +218,10 @@ void __init setup_arch(char **cmdline_p)
218 printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n"); 218 printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
219#endif 219#endif
220 220
221 pr_debug("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x " 221 pr_debug("KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n",
222 "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext, 222 _stext, _etext, _sdata, _edata, __bss_start, __bss_stop);
223 (int) &_sdata, (int) &_edata, 223 pr_debug("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ",
224 (int) &_sbss, (int) &_ebss); 224 __bss_stop, memory_start, memory_start, memory_end);
225 pr_debug("MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
226 (int) &_ebss, (int) memory_start,
227 (int) memory_start, (int) memory_end);
228 225
229 /* Keep a copy of command line */ 226 /* Keep a copy of command line */
230 *cmdline_p = &command_line[0]; 227 *cmdline_p = &command_line[0];
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 8623f8dc16f8..9a5932ec3689 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -479,9 +479,13 @@ sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5,
479 goto bad_access; 479 goto bad_access;
480 } 480 }
481 481
482 mem_value = *mem; 482 /*
483 * No need to check for EFAULT; we know that the page is
484 * present and writable.
485 */
486 __get_user(mem_value, mem);
483 if (mem_value == oldval) 487 if (mem_value == oldval)
484 *mem = newval; 488 __put_user(newval, mem);
485 489
486 pte_unmap_unlock(pte, ptl); 490 pte_unmap_unlock(pte, ptl);
487 up_read(&mm->mmap_sem); 491 up_read(&mm->mmap_sem);
diff --git a/arch/m68k/kernel/vmlinux-nommu.lds b/arch/m68k/kernel/vmlinux-nommu.lds
index 40e02d9c38b4..06a763f49fd3 100644
--- a/arch/m68k/kernel/vmlinux-nommu.lds
+++ b/arch/m68k/kernel/vmlinux-nommu.lds
@@ -78,9 +78,7 @@ SECTIONS {
78 __init_end = .; 78 __init_end = .;
79 } 79 }
80 80
81 _sbss = .;
82 BSS_SECTION(0, 0, 0) 81 BSS_SECTION(0, 0, 0)
83 _ebss = .;
84 82
85 _end = .; 83 _end = .;
86 84
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index 63407c836826..d0993594f558 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -31,9 +31,7 @@ SECTIONS
31 31
32 RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) 32 RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
33 33
34 _sbss = .;
35 BSS_SECTION(0, 0, 0) 34 BSS_SECTION(0, 0, 0)
36 _ebss = .;
37 35
38 _edata = .; /* End of data section */ 36 _edata = .; /* End of data section */
39 37
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index ad0f46d64c0b..8080469ee6c1 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -44,9 +44,7 @@ __init_begin = .;
44 . = ALIGN(PAGE_SIZE); 44 . = ALIGN(PAGE_SIZE);
45 __init_end = .; 45 __init_end = .;
46 46
47 _sbss = .;
48 BSS_SECTION(0, 0, 0) 47 BSS_SECTION(0, 0, 0)
49 _ebss = .;
50 48
51 _end = . ; 49 _end = . ;
52 50
diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c
index 79e928a525d0..ee5f0b1b5c5d 100644
--- a/arch/m68k/lib/muldi3.c
+++ b/arch/m68k/lib/muldi3.c
@@ -19,7 +19,7 @@ along with GNU CC; see the file COPYING. If not, write to
19the Free Software Foundation, 59 Temple Place - Suite 330, 19the Free Software Foundation, 59 Temple Place - Suite 330,
20Boston, MA 02111-1307, USA. */ 20Boston, MA 02111-1307, USA. */
21 21
22#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) 22#ifdef CONFIG_CPU_HAS_NO_MULDIV64
23 23
24#define SI_TYPE_SIZE 32 24#define SI_TYPE_SIZE 32
25#define __BITS4 (SI_TYPE_SIZE / 4) 25#define __BITS4 (SI_TYPE_SIZE / 4)
diff --git a/arch/m68k/mm/init_mm.c b/arch/m68k/mm/init_mm.c
index f77f258dce3a..282f9de68966 100644
--- a/arch/m68k/mm/init_mm.c
+++ b/arch/m68k/mm/init_mm.c
@@ -104,7 +104,7 @@ void __init print_memmap(void)
104 MLK_ROUNDUP(__init_begin, __init_end), 104 MLK_ROUNDUP(__init_begin, __init_end),
105 MLK_ROUNDUP(_stext, _etext), 105 MLK_ROUNDUP(_stext, _etext),
106 MLK_ROUNDUP(_sdata, _edata), 106 MLK_ROUNDUP(_sdata, _edata),
107 MLK_ROUNDUP(_sbss, _ebss)); 107 MLK_ROUNDUP(__bss_start, __bss_stop));
108} 108}
109 109
110void __init mem_init(void) 110void __init mem_init(void)
diff --git a/arch/m68k/mm/init_no.c b/arch/m68k/mm/init_no.c
index 345ec0d83e3d..688e3664aea0 100644
--- a/arch/m68k/mm/init_no.c
+++ b/arch/m68k/mm/init_no.c
@@ -91,7 +91,7 @@ void __init mem_init(void)
91 totalram_pages = free_all_bootmem(); 91 totalram_pages = free_all_bootmem();
92 92
93 codek = (_etext - _stext) >> 10; 93 codek = (_etext - _stext) >> 10;
94 datak = (_ebss - _sdata) >> 10; 94 datak = (__bss_stop - _sdata) >> 10;
95 initk = (__init_begin - __init_end) >> 10; 95 initk = (__init_begin - __init_end) >> 10;
96 96
97 tmp = nr_free_pages() << PAGE_SHIFT; 97 tmp = nr_free_pages() << PAGE_SHIFT;
diff --git a/arch/m68k/platform/68328/head-de2.S b/arch/m68k/platform/68328/head-de2.S
index f632fdcb93e9..537d3245b539 100644
--- a/arch/m68k/platform/68328/head-de2.S
+++ b/arch/m68k/platform/68328/head-de2.S
@@ -60,8 +60,8 @@ _start:
60 * Move ROM filesystem above bss :-) 60 * Move ROM filesystem above bss :-)
61 */ 61 */
62 62
63 moveal #_sbss, %a0 /* romfs at the start of bss */ 63 moveal #__bss_start, %a0 /* romfs at the start of bss */
64 moveal #_ebss, %a1 /* Set up destination */ 64 moveal #__bss_stop, %a1 /* Set up destination */
65 movel %a0, %a2 /* Copy of bss start */ 65 movel %a0, %a2 /* Copy of bss start */
66 66
67 movel 8(%a0), %d1 /* Get size of ROMFS */ 67 movel 8(%a0), %d1 /* Get size of ROMFS */
@@ -84,8 +84,8 @@ _start:
84 * Initialize BSS segment to 0 84 * Initialize BSS segment to 0
85 */ 85 */
86 86
87 lea _sbss, %a0 87 lea __bss_start, %a0
88 lea _ebss, %a1 88 lea __bss_stop, %a1
89 89
90 /* Copy 0 to %a0 until %a0 == %a1 */ 90 /* Copy 0 to %a0 until %a0 == %a1 */
912: cmpal %a0, %a1 912: cmpal %a0, %a1
diff --git a/arch/m68k/platform/68328/head-pilot.S b/arch/m68k/platform/68328/head-pilot.S
index 2ebfd6420818..45a9dad29e3d 100644
--- a/arch/m68k/platform/68328/head-pilot.S
+++ b/arch/m68k/platform/68328/head-pilot.S
@@ -110,7 +110,7 @@ L0:
110 movel #CONFIG_VECTORBASE, %d7 110 movel #CONFIG_VECTORBASE, %d7
111 addl #16, %d7 111 addl #16, %d7
112 moveal %d7, %a0 112 moveal %d7, %a0
113 moveal #_ebss, %a1 113 moveal #__bss_stop, %a1
114 lea %a1@(512), %a2 114 lea %a1@(512), %a2
115 115
116 DBG_PUTC('C') 116 DBG_PUTC('C')
@@ -138,8 +138,8 @@ LD1:
138 138
139 DBG_PUTC('E') 139 DBG_PUTC('E')
140 140
141 moveal #_sbss, %a0 141 moveal #__bss_start, %a0
142 moveal #_ebss, %a1 142 moveal #__bss_stop, %a1
143 143
144 /* Copy 0 to %a0 until %a0 == %a1 */ 144 /* Copy 0 to %a0 until %a0 == %a1 */
145L1: 145L1:
@@ -150,7 +150,7 @@ L1:
150 DBG_PUTC('F') 150 DBG_PUTC('F')
151 151
152 /* Copy command line from end of bss to command line */ 152 /* Copy command line from end of bss to command line */
153 moveal #_ebss, %a0 153 moveal #__bss_stop, %a0
154 moveal #command_line, %a1 154 moveal #command_line, %a1
155 lea %a1@(512), %a2 155 lea %a1@(512), %a2
156 156
@@ -165,7 +165,7 @@ L3:
165 165
166 movel #_sdata, %d0 166 movel #_sdata, %d0
167 movel %d0, _rambase 167 movel %d0, _rambase
168 movel #_ebss, %d0 168 movel #__bss_stop, %d0
169 movel %d0, _ramstart 169 movel %d0, _ramstart
170 170
171 movel %a4, %d0 171 movel %a4, %d0
diff --git a/arch/m68k/platform/68328/head-ram.S b/arch/m68k/platform/68328/head-ram.S
index 7f1aeeacb219..5189ef926098 100644
--- a/arch/m68k/platform/68328/head-ram.S
+++ b/arch/m68k/platform/68328/head-ram.S
@@ -76,8 +76,8 @@ pclp3:
76 beq pclp3 76 beq pclp3
77#endif /* DEBUG */ 77#endif /* DEBUG */
78 moveal #0x007ffff0, %ssp 78 moveal #0x007ffff0, %ssp
79 moveal #_sbss, %a0 79 moveal #__bss_start, %a0
80 moveal #_ebss, %a1 80 moveal #__bss_stop, %a1
81 81
82 /* Copy 0 to %a0 until %a0 >= %a1 */ 82 /* Copy 0 to %a0 until %a0 >= %a1 */
83L1: 83L1:
diff --git a/arch/m68k/platform/68328/head-rom.S b/arch/m68k/platform/68328/head-rom.S
index a5ff96d0295f..3dff98ba2e97 100644
--- a/arch/m68k/platform/68328/head-rom.S
+++ b/arch/m68k/platform/68328/head-rom.S
@@ -59,8 +59,8 @@ _stext: movew #0x2700,%sr
59 cmpal %a1, %a2 59 cmpal %a1, %a2
60 bhi 1b 60 bhi 1b
61 61
62 moveal #_sbss, %a0 62 moveal #__bss_start, %a0
63 moveal #_ebss, %a1 63 moveal #__bss_stop, %a1
64 /* Copy 0 to %a0 until %a0 == %a1 */ 64 /* Copy 0 to %a0 until %a0 == %a1 */
65 65
661: 661:
@@ -70,7 +70,7 @@ _stext: movew #0x2700,%sr
70 70
71 movel #_sdata, %d0 71 movel #_sdata, %d0
72 movel %d0, _rambase 72 movel %d0, _rambase
73 movel #_ebss, %d0 73 movel #__bss_stop, %d0
74 movel %d0, _ramstart 74 movel %d0, _ramstart
75 movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0 75 movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0
76 movel %d0, _ramend 76 movel %d0, _ramend
diff --git a/arch/m68k/platform/68360/head-ram.S b/arch/m68k/platform/68360/head-ram.S
index 8eb94fb6b971..acd213170d80 100644
--- a/arch/m68k/platform/68360/head-ram.S
+++ b/arch/m68k/platform/68360/head-ram.S
@@ -219,8 +219,8 @@ LD1:
219 cmp.l #_edata, %a1 219 cmp.l #_edata, %a1
220 blt LD1 220 blt LD1
221 221
222 moveal #_sbss, %a0 222 moveal #__bss_start, %a0
223 moveal #_ebss, %a1 223 moveal #__bss_stop, %a1
224 224
225 /* Copy 0 to %a0 until %a0 == %a1 */ 225 /* Copy 0 to %a0 until %a0 == %a1 */
226L1: 226L1:
@@ -234,7 +234,7 @@ load_quicc:
234store_ram_size: 234store_ram_size:
235 /* Set ram size information */ 235 /* Set ram size information */
236 move.l #_sdata, _rambase 236 move.l #_sdata, _rambase
237 move.l #_ebss, _ramstart 237 move.l #__bss_stop, _ramstart
238 move.l #RAMEND, %d0 238 move.l #RAMEND, %d0
239 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ 239 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/
240 move.l %d0, _ramend /* Different from RAMEND.*/ 240 move.l %d0, _ramend /* Different from RAMEND.*/
diff --git a/arch/m68k/platform/68360/head-rom.S b/arch/m68k/platform/68360/head-rom.S
index 97510e55b802..dfc756d99886 100644
--- a/arch/m68k/platform/68360/head-rom.S
+++ b/arch/m68k/platform/68360/head-rom.S
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15.global _stext 15.global _stext
16.global _sbss 16.global __bss_start
17.global _start 17.global _start
18 18
19.global _rambase 19.global _rambase
@@ -229,8 +229,8 @@ LD1:
229 cmp.l #_edata, %a1 229 cmp.l #_edata, %a1
230 blt LD1 230 blt LD1
231 231
232 moveal #_sbss, %a0 232 moveal #__bss_start, %a0
233 moveal #_ebss, %a1 233 moveal #__bss_stop, %a1
234 234
235 /* Copy 0 to %a0 until %a0 == %a1 */ 235 /* Copy 0 to %a0 until %a0 == %a1 */
236L1: 236L1:
@@ -244,7 +244,7 @@ load_quicc:
244store_ram_size: 244store_ram_size:
245 /* Set ram size information */ 245 /* Set ram size information */
246 move.l #_sdata, _rambase 246 move.l #_sdata, _rambase
247 move.l #_ebss, _ramstart 247 move.l #__bss_stop, _ramstart
248 move.l #RAMEND, %d0 248 move.l #RAMEND, %d0
249 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ 249 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/
250 move.l %d0, _ramend /* Different from RAMEND.*/ 250 move.l %d0, _ramend /* Different from RAMEND.*/
diff --git a/arch/m68k/platform/coldfire/head.S b/arch/m68k/platform/coldfire/head.S
index 4e0c9eb3bd1f..b88f5716f357 100644
--- a/arch/m68k/platform/coldfire/head.S
+++ b/arch/m68k/platform/coldfire/head.S
@@ -230,8 +230,8 @@ _vstart:
230 /* 230 /*
231 * Move ROM filesystem above bss :-) 231 * Move ROM filesystem above bss :-)
232 */ 232 */
233 lea _sbss,%a0 /* get start of bss */ 233 lea __bss_start,%a0 /* get start of bss */
234 lea _ebss,%a1 /* set up destination */ 234 lea __bss_stop,%a1 /* set up destination */
235 movel %a0,%a2 /* copy of bss start */ 235 movel %a0,%a2 /* copy of bss start */
236 236
237 movel 8(%a0),%d0 /* get size of ROMFS */ 237 movel 8(%a0),%d0 /* get size of ROMFS */
@@ -249,7 +249,7 @@ _copy_romfs:
249 bne _copy_romfs 249 bne _copy_romfs
250 250
251#else /* CONFIG_ROMFS_FS */ 251#else /* CONFIG_ROMFS_FS */
252 lea _ebss,%a1 252 lea __bss_stop,%a1
253 movel %a1,_ramstart 253 movel %a1,_ramstart
254#endif /* CONFIG_ROMFS_FS */ 254#endif /* CONFIG_ROMFS_FS */
255 255
@@ -257,8 +257,8 @@ _copy_romfs:
257 /* 257 /*
258 * Zero out the bss region. 258 * Zero out the bss region.
259 */ 259 */
260 lea _sbss,%a0 /* get start of bss */ 260 lea __bss_start,%a0 /* get start of bss */
261 lea _ebss,%a1 /* get end of bss */ 261 lea __bss_stop,%a1 /* get end of bss */
262 clrl %d0 /* set value */ 262 clrl %d0 /* set value */
263_clear_bss: 263_clear_bss:
264 movel %d0,(%a0)+ /* clear each word */ 264 movel %d0,(%a0)+ /* clear each word */
diff --git a/arch/m68k/sun3/prom/init.c b/arch/m68k/sun3/prom/init.c
index d8e6349336b4..eeba067d565f 100644
--- a/arch/m68k/sun3/prom/init.c
+++ b/arch/m68k/sun3/prom/init.c
@@ -22,57 +22,13 @@ int prom_root_node;
22struct linux_nodeops *prom_nodeops; 22struct linux_nodeops *prom_nodeops;
23 23
24/* You must call prom_init() before you attempt to use any of the 24/* You must call prom_init() before you attempt to use any of the
25 * routines in the prom library. It returns 0 on success, 1 on 25 * routines in the prom library.
26 * failure. It gets passed the pointer to the PROM vector. 26 * It gets passed the pointer to the PROM vector.
27 */ 27 */
28 28
29extern void prom_meminit(void);
30extern void prom_ranges_init(void);
31
32void __init prom_init(struct linux_romvec *rp) 29void __init prom_init(struct linux_romvec *rp)
33{ 30{
34 romvec = rp; 31 romvec = rp;
35#ifndef CONFIG_SUN3
36 switch(romvec->pv_romvers) {
37 case 0:
38 prom_vers = PROM_V0;
39 break;
40 case 2:
41 prom_vers = PROM_V2;
42 break;
43 case 3:
44 prom_vers = PROM_V3;
45 break;
46 case 4:
47 prom_vers = PROM_P1275;
48 prom_printf("PROMLIB: Sun IEEE Prom not supported yet\n");
49 prom_halt();
50 break;
51 default:
52 prom_printf("PROMLIB: Bad PROM version %d\n",
53 romvec->pv_romvers);
54 prom_halt();
55 break;
56 };
57
58 prom_rev = romvec->pv_plugin_revision;
59 prom_prev = romvec->pv_printrev;
60 prom_nodeops = romvec->pv_nodeops;
61
62 prom_root_node = prom_getsibling(0);
63 if((prom_root_node == 0) || (prom_root_node == -1))
64 prom_halt();
65
66 if((((unsigned long) prom_nodeops) == 0) ||
67 (((unsigned long) prom_nodeops) == -1))
68 prom_halt();
69
70 prom_meminit();
71
72 prom_ranges_init();
73#endif
74// printk("PROMLIB: Sun Boot Prom Version %d Revision %d\n",
75// romvec->pv_romvers, prom_rev);
76 32
77 /* Initialization successful. */ 33 /* Initialization successful. */
78 return; 34 return;
diff --git a/arch/microblaze/include/asm/sections.h b/arch/microblaze/include/asm/sections.h
index 4487e150b455..c07ed5d2a820 100644
--- a/arch/microblaze/include/asm/sections.h
+++ b/arch/microblaze/include/asm/sections.h
@@ -18,10 +18,6 @@ extern char _ssbss[], _esbss[];
18extern unsigned long __ivt_start[], __ivt_end[]; 18extern unsigned long __ivt_start[], __ivt_end[];
19extern char _etext[], _stext[]; 19extern char _etext[], _stext[];
20 20
21# ifdef CONFIG_MTD_UCLINUX
22extern char *_ebss;
23# endif
24
25extern u32 _fdt_start[], _fdt_end[]; 21extern u32 _fdt_start[], _fdt_end[];
26 22
27# endif /* !__ASSEMBLY__ */ 23# endif /* !__ASSEMBLY__ */
diff --git a/arch/microblaze/kernel/microblaze_ksyms.c b/arch/microblaze/kernel/microblaze_ksyms.c
index bb4907c828dc..2b25bcf05c00 100644
--- a/arch/microblaze/kernel/microblaze_ksyms.c
+++ b/arch/microblaze/kernel/microblaze_ksyms.c
@@ -21,9 +21,6 @@
21#include <linux/ftrace.h> 21#include <linux/ftrace.h>
22#include <linux/uaccess.h> 22#include <linux/uaccess.h>
23 23
24extern char *_ebss;
25EXPORT_SYMBOL_GPL(_ebss);
26
27#ifdef CONFIG_FUNCTION_TRACER 24#ifdef CONFIG_FUNCTION_TRACER
28extern void _mcount(void); 25extern void _mcount(void);
29EXPORT_SYMBOL(_mcount); 26EXPORT_SYMBOL(_mcount);
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 16d8dfd9094b..4da971d4392f 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -121,7 +121,7 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
121 121
122 /* Move ROMFS out of BSS before clearing it */ 122 /* Move ROMFS out of BSS before clearing it */
123 if (romfs_size > 0) { 123 if (romfs_size > 0) {
124 memmove(&_ebss, (int *)romfs_base, romfs_size); 124 memmove(&__bss_stop, (int *)romfs_base, romfs_size);
125 klimit += romfs_size; 125 klimit += romfs_size;
126 } 126 }
127#endif 127#endif
@@ -165,7 +165,7 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
165 BUG_ON(romfs_size < 0); /* What else can we do? */ 165 BUG_ON(romfs_size < 0); /* What else can we do? */
166 166
167 printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", 167 printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n",
168 romfs_size, romfs_base, (unsigned)&_ebss); 168 romfs_size, romfs_base, (unsigned)&__bss_stop);
169 169
170 printk("New klimit: 0x%08x\n", (unsigned)klimit); 170 printk("New klimit: 0x%08x\n", (unsigned)klimit);
171#endif 171#endif
diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index 109e9d86ade4..936d01a689d7 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
@@ -131,7 +131,6 @@ SECTIONS {
131 *(COMMON) 131 *(COMMON)
132 . = ALIGN (4) ; 132 . = ALIGN (4) ;
133 __bss_stop = . ; 133 __bss_stop = . ;
134 _ebss = . ;
135 } 134 }
136 . = ALIGN(PAGE_SIZE); 135 . = ALIGN(PAGE_SIZE);
137 _end = .; 136 _end = .;
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 76de6b68487c..107610e01a29 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -124,6 +124,7 @@ config S390
124 select GENERIC_TIME_VSYSCALL 124 select GENERIC_TIME_VSYSCALL
125 select GENERIC_CLOCKEVENTS 125 select GENERIC_CLOCKEVENTS
126 select KTIME_SCALAR if 32BIT 126 select KTIME_SCALAR if 32BIT
127 select HAVE_ARCH_SECCOMP_FILTER
127 128
128config SCHED_OMIT_FRAME_POINTER 129config SCHED_OMIT_FRAME_POINTER
129 def_bool y 130 def_bool y
diff --git a/arch/s390/include/asm/sparsemem.h b/arch/s390/include/asm/sparsemem.h
index 0fb34027d3f6..a60d085ddb4d 100644
--- a/arch/s390/include/asm/sparsemem.h
+++ b/arch/s390/include/asm/sparsemem.h
@@ -4,13 +4,11 @@
4#ifdef CONFIG_64BIT 4#ifdef CONFIG_64BIT
5 5
6#define SECTION_SIZE_BITS 28 6#define SECTION_SIZE_BITS 28
7#define MAX_PHYSADDR_BITS 46
8#define MAX_PHYSMEM_BITS 46 7#define MAX_PHYSMEM_BITS 46
9 8
10#else 9#else
11 10
12#define SECTION_SIZE_BITS 25 11#define SECTION_SIZE_BITS 25
13#define MAX_PHYSADDR_BITS 31
14#define MAX_PHYSMEM_BITS 31 12#define MAX_PHYSMEM_BITS 31
15 13
16#endif /* CONFIG_64BIT */ 14#endif /* CONFIG_64BIT */
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h
index fb214dd9b7e0..fe7b99759e12 100644
--- a/arch/s390/include/asm/syscall.h
+++ b/arch/s390/include/asm/syscall.h
@@ -12,6 +12,7 @@
12#ifndef _ASM_SYSCALL_H 12#ifndef _ASM_SYSCALL_H
13#define _ASM_SYSCALL_H 1 13#define _ASM_SYSCALL_H 1
14 14
15#include <linux/audit.h>
15#include <linux/sched.h> 16#include <linux/sched.h>
16#include <linux/err.h> 17#include <linux/err.h>
17#include <asm/ptrace.h> 18#include <asm/ptrace.h>
@@ -87,4 +88,13 @@ static inline void syscall_set_arguments(struct task_struct *task,
87 regs->orig_gpr2 = args[0]; 88 regs->orig_gpr2 = args[0];
88} 89}
89 90
91static inline int syscall_get_arch(struct task_struct *task,
92 struct pt_regs *regs)
93{
94#ifdef CONFIG_COMPAT
95 if (test_tsk_thread_flag(task, TIF_31BIT))
96 return AUDIT_ARCH_S390;
97#endif
98 return sizeof(long) == 8 ? AUDIT_ARCH_S390X : AUDIT_ARCH_S390;
99}
90#endif /* _ASM_SYSCALL_H */ 100#endif /* _ASM_SYSCALL_H */
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index d1225089a4bb..f606d935f495 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -620,7 +620,6 @@ asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg)
620 return -EFAULT; 620 return -EFAULT;
621 if (a.offset & ~PAGE_MASK) 621 if (a.offset & ~PAGE_MASK)
622 return -EINVAL; 622 return -EINVAL;
623 a.addr = (unsigned long) compat_ptr(a.addr);
624 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, 623 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
625 a.offset >> PAGE_SHIFT); 624 a.offset >> PAGE_SHIFT);
626} 625}
@@ -631,7 +630,6 @@ asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg)
631 630
632 if (copy_from_user(&a, arg, sizeof(a))) 631 if (copy_from_user(&a, arg, sizeof(a)))
633 return -EFAULT; 632 return -EFAULT;
634 a.addr = (unsigned long) compat_ptr(a.addr);
635 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); 633 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset);
636} 634}
637 635
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index e835d6d5b7fd..2d82cfcbce5b 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1635,7 +1635,7 @@ ENTRY(compat_sys_process_vm_readv_wrapper)
1635 llgfr %r6,%r6 # unsigned long 1635 llgfr %r6,%r6 # unsigned long
1636 llgf %r0,164(%r15) # unsigned long 1636 llgf %r0,164(%r15) # unsigned long
1637 stg %r0,160(%r15) 1637 stg %r0,160(%r15)
1638 jg sys_process_vm_readv 1638 jg compat_sys_process_vm_readv
1639 1639
1640ENTRY(compat_sys_process_vm_writev_wrapper) 1640ENTRY(compat_sys_process_vm_writev_wrapper)
1641 lgfr %r2,%r2 # compat_pid_t 1641 lgfr %r2,%r2 # compat_pid_t
@@ -1645,4 +1645,4 @@ ENTRY(compat_sys_process_vm_writev_wrapper)
1645 llgfr %r6,%r6 # unsigned long 1645 llgfr %r6,%r6 # unsigned long
1646 llgf %r0,164(%r15) # unsigned long 1646 llgf %r0,164(%r15) # unsigned long
1647 stg %r0,160(%r15) 1647 stg %r0,160(%r15)
1648 jg sys_process_vm_writev 1648 jg compat_sys_process_vm_writev
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index f4eb37680b91..e4be113fbac6 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -719,7 +719,11 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
719 long ret = 0; 719 long ret = 0;
720 720
721 /* Do the secure computing check first. */ 721 /* Do the secure computing check first. */
722 secure_computing_strict(regs->gprs[2]); 722 if (secure_computing(regs->gprs[2])) {
723 /* seccomp failures shouldn't expose any additional code. */
724 ret = -1;
725 goto out;
726 }
723 727
724 /* 728 /*
725 * The sysc_tracesys code in entry.S stored the system 729 * The sysc_tracesys code in entry.S stored the system
@@ -745,6 +749,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
745 regs->gprs[2], regs->orig_gpr2, 749 regs->gprs[2], regs->orig_gpr2,
746 regs->gprs[3], regs->gprs[4], 750 regs->gprs[3], regs->gprs[4],
747 regs->gprs[5]); 751 regs->gprs[5]);
752out:
748 return ret ?: regs->gprs[2]; 753 return ret ?: regs->gprs[2];
749} 754}
750 755
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index b4a29eee41b8..d0964d22adb5 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -81,11 +81,12 @@ SYSCALL_DEFINE1(s390_personality, unsigned int, personality)
81{ 81{
82 unsigned int ret; 82 unsigned int ret;
83 83
84 if (current->personality == PER_LINUX32 && personality == PER_LINUX) 84 if (personality(current->personality) == PER_LINUX32 &&
85 personality = PER_LINUX32; 85 personality(personality) == PER_LINUX)
86 personality |= PER_LINUX32;
86 ret = sys_personality(personality); 87 ret = sys_personality(personality);
87 if (ret == PER_LINUX32) 88 if (personality(ret) == PER_LINUX32)
88 ret = PER_LINUX; 89 ret &= ~PER_LINUX32;
89 90
90 return ret; 91 return ret;
91} 92}
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c
index 4c171f13b0e8..b22565623142 100644
--- a/arch/sh/drivers/dma/dma-sh.c
+++ b/arch/sh/drivers/dma/dma-sh.c
@@ -335,7 +335,7 @@ static int dmae_irq_init(void)
335 335
336 for (n = 0; n < NR_DMAE; n++) { 336 for (n = 0; n < NR_DMAE; n++) {
337 int i = request_irq(get_dma_error_irq(n), dma_err, 337 int i = request_irq(get_dma_error_irq(n), dma_err,
338 IRQF_SHARED, dmae_name[n], NULL); 338 IRQF_SHARED, dmae_name[n], (void *)dmae_name[n]);
339 if (unlikely(i < 0)) { 339 if (unlikely(i < 0)) {
340 printk(KERN_ERR "%s request_irq fail\n", dmae_name[n]); 340 printk(KERN_ERR "%s request_irq fail\n", dmae_name[n]);
341 return i; 341 return i;
diff --git a/arch/sh/include/asm/sections.h b/arch/sh/include/asm/sections.h
index 4a5350037c8f..1b6199740e98 100644
--- a/arch/sh/include/asm/sections.h
+++ b/arch/sh/include/asm/sections.h
@@ -6,7 +6,6 @@
6extern long __nosave_begin, __nosave_end; 6extern long __nosave_begin, __nosave_end;
7extern long __machvec_start, __machvec_end; 7extern long __machvec_start, __machvec_end;
8extern char __uncached_start, __uncached_end; 8extern char __uncached_start, __uncached_end;
9extern char _ebss[];
10extern char __start_eh_frame[], __stop_eh_frame[]; 9extern char __start_eh_frame[], __stop_eh_frame[];
11 10
12#endif /* __ASM_SH_SECTIONS_H */ 11#endif /* __ASM_SH_SECTIONS_H */
diff --git a/arch/sh/include/cpu-sh2a/cpu/sh7269.h b/arch/sh/include/cpu-sh2a/cpu/sh7269.h
index 48d14498e774..2a0ca8780f0d 100644
--- a/arch/sh/include/cpu-sh2a/cpu/sh7269.h
+++ b/arch/sh/include/cpu-sh2a/cpu/sh7269.h
@@ -183,18 +183,30 @@ enum {
183 GPIO_FN_DV_DATA1, GPIO_FN_DV_DATA0, 183 GPIO_FN_DV_DATA1, GPIO_FN_DV_DATA0,
184 GPIO_FN_LCD_CLK, GPIO_FN_LCD_EXTCLK, 184 GPIO_FN_LCD_CLK, GPIO_FN_LCD_EXTCLK,
185 GPIO_FN_LCD_VSYNC, GPIO_FN_LCD_HSYNC, GPIO_FN_LCD_DE, 185 GPIO_FN_LCD_VSYNC, GPIO_FN_LCD_HSYNC, GPIO_FN_LCD_DE,
186 GPIO_FN_LCD_DATA23, GPIO_FN_LCD_DATA22, 186 GPIO_FN_LCD_DATA23_PG23, GPIO_FN_LCD_DATA22_PG22,
187 GPIO_FN_LCD_DATA21, GPIO_FN_LCD_DATA20, 187 GPIO_FN_LCD_DATA21_PG21, GPIO_FN_LCD_DATA20_PG20,
188 GPIO_FN_LCD_DATA19, GPIO_FN_LCD_DATA18, 188 GPIO_FN_LCD_DATA19_PG19, GPIO_FN_LCD_DATA18_PG18,
189 GPIO_FN_LCD_DATA17, GPIO_FN_LCD_DATA16, 189 GPIO_FN_LCD_DATA17_PG17, GPIO_FN_LCD_DATA16_PG16,
190 GPIO_FN_LCD_DATA15, GPIO_FN_LCD_DATA14, 190 GPIO_FN_LCD_DATA15_PG15, GPIO_FN_LCD_DATA14_PG14,
191 GPIO_FN_LCD_DATA13, GPIO_FN_LCD_DATA12, 191 GPIO_FN_LCD_DATA13_PG13, GPIO_FN_LCD_DATA12_PG12,
192 GPIO_FN_LCD_DATA11, GPIO_FN_LCD_DATA10, 192 GPIO_FN_LCD_DATA11_PG11, GPIO_FN_LCD_DATA10_PG10,
193 GPIO_FN_LCD_DATA9, GPIO_FN_LCD_DATA8, 193 GPIO_FN_LCD_DATA9_PG9, GPIO_FN_LCD_DATA8_PG8,
194 GPIO_FN_LCD_DATA7, GPIO_FN_LCD_DATA6, 194 GPIO_FN_LCD_DATA7_PG7, GPIO_FN_LCD_DATA6_PG6,
195 GPIO_FN_LCD_DATA5, GPIO_FN_LCD_DATA4, 195 GPIO_FN_LCD_DATA5_PG5, GPIO_FN_LCD_DATA4_PG4,
196 GPIO_FN_LCD_DATA3, GPIO_FN_LCD_DATA2, 196 GPIO_FN_LCD_DATA3_PG3, GPIO_FN_LCD_DATA2_PG2,
197 GPIO_FN_LCD_DATA1, GPIO_FN_LCD_DATA0, 197 GPIO_FN_LCD_DATA1_PG1, GPIO_FN_LCD_DATA0_PG0,
198 GPIO_FN_LCD_DATA23_PJ23, GPIO_FN_LCD_DATA22_PJ22,
199 GPIO_FN_LCD_DATA21_PJ21, GPIO_FN_LCD_DATA20_PJ20,
200 GPIO_FN_LCD_DATA19_PJ19, GPIO_FN_LCD_DATA18_PJ18,
201 GPIO_FN_LCD_DATA17_PJ17, GPIO_FN_LCD_DATA16_PJ16,
202 GPIO_FN_LCD_DATA15_PJ15, GPIO_FN_LCD_DATA14_PJ14,
203 GPIO_FN_LCD_DATA13_PJ13, GPIO_FN_LCD_DATA12_PJ12,
204 GPIO_FN_LCD_DATA11_PJ11, GPIO_FN_LCD_DATA10_PJ10,
205 GPIO_FN_LCD_DATA9_PJ9, GPIO_FN_LCD_DATA8_PJ8,
206 GPIO_FN_LCD_DATA7_PJ7, GPIO_FN_LCD_DATA6_PJ6,
207 GPIO_FN_LCD_DATA5_PJ5, GPIO_FN_LCD_DATA4_PJ4,
208 GPIO_FN_LCD_DATA3_PJ3, GPIO_FN_LCD_DATA2_PJ2,
209 GPIO_FN_LCD_DATA1_PJ1, GPIO_FN_LCD_DATA0_PJ0,
198 GPIO_FN_LCD_M_DISP, 210 GPIO_FN_LCD_M_DISP,
199}; 211};
200 212
diff --git a/arch/sh/kernel/cpu/sh2a/pinmux-sh7269.c b/arch/sh/kernel/cpu/sh2a/pinmux-sh7269.c
index f25127c46eca..039e4587dd9b 100644
--- a/arch/sh/kernel/cpu/sh2a/pinmux-sh7269.c
+++ b/arch/sh/kernel/cpu/sh2a/pinmux-sh7269.c
@@ -758,12 +758,22 @@ enum {
758 DV_DATA3_MARK, DV_DATA2_MARK, DV_DATA1_MARK, DV_DATA0_MARK, 758 DV_DATA3_MARK, DV_DATA2_MARK, DV_DATA1_MARK, DV_DATA0_MARK,
759 LCD_CLK_MARK, LCD_EXTCLK_MARK, 759 LCD_CLK_MARK, LCD_EXTCLK_MARK,
760 LCD_VSYNC_MARK, LCD_HSYNC_MARK, LCD_DE_MARK, 760 LCD_VSYNC_MARK, LCD_HSYNC_MARK, LCD_DE_MARK,
761 LCD_DATA23_MARK, LCD_DATA22_MARK, LCD_DATA21_MARK, LCD_DATA20_MARK, 761 LCD_DATA23_PG23_MARK, LCD_DATA22_PG22_MARK, LCD_DATA21_PG21_MARK,
762 LCD_DATA19_MARK, LCD_DATA18_MARK, LCD_DATA17_MARK, LCD_DATA16_MARK, 762 LCD_DATA20_PG20_MARK, LCD_DATA19_PG19_MARK, LCD_DATA18_PG18_MARK,
763 LCD_DATA15_MARK, LCD_DATA14_MARK, LCD_DATA13_MARK, LCD_DATA12_MARK, 763 LCD_DATA17_PG17_MARK, LCD_DATA16_PG16_MARK, LCD_DATA15_PG15_MARK,
764 LCD_DATA11_MARK, LCD_DATA10_MARK, LCD_DATA9_MARK, LCD_DATA8_MARK, 764 LCD_DATA14_PG14_MARK, LCD_DATA13_PG13_MARK, LCD_DATA12_PG12_MARK,
765 LCD_DATA7_MARK, LCD_DATA6_MARK, LCD_DATA5_MARK, LCD_DATA4_MARK, 765 LCD_DATA11_PG11_MARK, LCD_DATA10_PG10_MARK, LCD_DATA9_PG9_MARK,
766 LCD_DATA3_MARK, LCD_DATA2_MARK, LCD_DATA1_MARK, LCD_DATA0_MARK, 766 LCD_DATA8_PG8_MARK, LCD_DATA7_PG7_MARK, LCD_DATA6_PG6_MARK,
767 LCD_DATA5_PG5_MARK, LCD_DATA4_PG4_MARK, LCD_DATA3_PG3_MARK,
768 LCD_DATA2_PG2_MARK, LCD_DATA1_PG1_MARK, LCD_DATA0_PG0_MARK,
769 LCD_DATA23_PJ23_MARK, LCD_DATA22_PJ22_MARK, LCD_DATA21_PJ21_MARK,
770 LCD_DATA20_PJ20_MARK, LCD_DATA19_PJ19_MARK, LCD_DATA18_PJ18_MARK,
771 LCD_DATA17_PJ17_MARK, LCD_DATA16_PJ16_MARK, LCD_DATA15_PJ15_MARK,
772 LCD_DATA14_PJ14_MARK, LCD_DATA13_PJ13_MARK, LCD_DATA12_PJ12_MARK,
773 LCD_DATA11_PJ11_MARK, LCD_DATA10_PJ10_MARK, LCD_DATA9_PJ9_MARK,
774 LCD_DATA8_PJ8_MARK, LCD_DATA7_PJ7_MARK, LCD_DATA6_PJ6_MARK,
775 LCD_DATA5_PJ5_MARK, LCD_DATA4_PJ4_MARK, LCD_DATA3_PJ3_MARK,
776 LCD_DATA2_PJ2_MARK, LCD_DATA1_PJ1_MARK, LCD_DATA0_PJ0_MARK,
767 LCD_TCON6_MARK, LCD_TCON5_MARK, LCD_TCON4_MARK, 777 LCD_TCON6_MARK, LCD_TCON5_MARK, LCD_TCON4_MARK,
768 LCD_TCON3_MARK, LCD_TCON2_MARK, LCD_TCON1_MARK, LCD_TCON0_MARK, 778 LCD_TCON3_MARK, LCD_TCON2_MARK, LCD_TCON1_MARK, LCD_TCON0_MARK,
769 LCD_M_DISP_MARK, 779 LCD_M_DISP_MARK,
@@ -1036,6 +1046,7 @@ static pinmux_enum_t pinmux_data[] = {
1036 1046
1037 PINMUX_DATA(PF1_DATA, PF1MD_000), 1047 PINMUX_DATA(PF1_DATA, PF1MD_000),
1038 PINMUX_DATA(BACK_MARK, PF1MD_001), 1048 PINMUX_DATA(BACK_MARK, PF1MD_001),
1049 PINMUX_DATA(SSL10_MARK, PF1MD_011),
1039 PINMUX_DATA(TIOC4B_MARK, PF1MD_100), 1050 PINMUX_DATA(TIOC4B_MARK, PF1MD_100),
1040 PINMUX_DATA(DACK0_MARK, PF1MD_101), 1051 PINMUX_DATA(DACK0_MARK, PF1MD_101),
1041 1052
@@ -1049,47 +1060,50 @@ static pinmux_enum_t pinmux_data[] = {
1049 PINMUX_DATA(PG27_DATA, PG27MD_00), 1060 PINMUX_DATA(PG27_DATA, PG27MD_00),
1050 PINMUX_DATA(LCD_TCON2_MARK, PG27MD_10), 1061 PINMUX_DATA(LCD_TCON2_MARK, PG27MD_10),
1051 PINMUX_DATA(LCD_EXTCLK_MARK, PG27MD_11), 1062 PINMUX_DATA(LCD_EXTCLK_MARK, PG27MD_11),
1063 PINMUX_DATA(LCD_DE_MARK, PG27MD_11),
1052 1064
1053 PINMUX_DATA(PG26_DATA, PG26MD_00), 1065 PINMUX_DATA(PG26_DATA, PG26MD_00),
1054 PINMUX_DATA(LCD_TCON1_MARK, PG26MD_10), 1066 PINMUX_DATA(LCD_TCON1_MARK, PG26MD_10),
1067 PINMUX_DATA(LCD_HSYNC_MARK, PG26MD_10),
1055 1068
1056 PINMUX_DATA(PG25_DATA, PG25MD_00), 1069 PINMUX_DATA(PG25_DATA, PG25MD_00),
1057 PINMUX_DATA(LCD_TCON0_MARK, PG25MD_10), 1070 PINMUX_DATA(LCD_TCON0_MARK, PG25MD_10),
1071 PINMUX_DATA(LCD_VSYNC_MARK, PG25MD_10),
1058 1072
1059 PINMUX_DATA(PG24_DATA, PG24MD_00), 1073 PINMUX_DATA(PG24_DATA, PG24MD_00),
1060 PINMUX_DATA(LCD_CLK_MARK, PG24MD_10), 1074 PINMUX_DATA(LCD_CLK_MARK, PG24MD_10),
1061 1075
1062 PINMUX_DATA(PG23_DATA, PG23MD_000), 1076 PINMUX_DATA(PG23_DATA, PG23MD_000),
1063 PINMUX_DATA(LCD_DATA23_MARK, PG23MD_010), 1077 PINMUX_DATA(LCD_DATA23_PG23_MARK, PG23MD_010),
1064 PINMUX_DATA(LCD_TCON6_MARK, PG23MD_011), 1078 PINMUX_DATA(LCD_TCON6_MARK, PG23MD_011),
1065 PINMUX_DATA(TXD5_MARK, PG23MD_100), 1079 PINMUX_DATA(TXD5_MARK, PG23MD_100),
1066 1080
1067 PINMUX_DATA(PG22_DATA, PG22MD_000), 1081 PINMUX_DATA(PG22_DATA, PG22MD_000),
1068 PINMUX_DATA(LCD_DATA22_MARK, PG22MD_010), 1082 PINMUX_DATA(LCD_DATA22_PG22_MARK, PG22MD_010),
1069 PINMUX_DATA(LCD_TCON5_MARK, PG22MD_011), 1083 PINMUX_DATA(LCD_TCON5_MARK, PG22MD_011),
1070 PINMUX_DATA(RXD5_MARK, PG22MD_100), 1084 PINMUX_DATA(RXD5_MARK, PG22MD_100),
1071 1085
1072 PINMUX_DATA(PG21_DATA, PG21MD_000), 1086 PINMUX_DATA(PG21_DATA, PG21MD_000),
1073 PINMUX_DATA(DV_DATA7_MARK, PG21MD_001), 1087 PINMUX_DATA(DV_DATA7_MARK, PG21MD_001),
1074 PINMUX_DATA(LCD_DATA21_MARK, PG21MD_010), 1088 PINMUX_DATA(LCD_DATA21_PG21_MARK, PG21MD_010),
1075 PINMUX_DATA(LCD_TCON4_MARK, PG21MD_011), 1089 PINMUX_DATA(LCD_TCON4_MARK, PG21MD_011),
1076 PINMUX_DATA(TXD4_MARK, PG21MD_100), 1090 PINMUX_DATA(TXD4_MARK, PG21MD_100),
1077 1091
1078 PINMUX_DATA(PG20_DATA, PG20MD_000), 1092 PINMUX_DATA(PG20_DATA, PG20MD_000),
1079 PINMUX_DATA(DV_DATA6_MARK, PG20MD_001), 1093 PINMUX_DATA(DV_DATA6_MARK, PG20MD_001),
1080 PINMUX_DATA(LCD_DATA20_MARK, PG21MD_010), 1094 PINMUX_DATA(LCD_DATA20_PG20_MARK, PG21MD_010),
1081 PINMUX_DATA(LCD_TCON3_MARK, PG20MD_011), 1095 PINMUX_DATA(LCD_TCON3_MARK, PG20MD_011),
1082 PINMUX_DATA(RXD4_MARK, PG20MD_100), 1096 PINMUX_DATA(RXD4_MARK, PG20MD_100),
1083 1097
1084 PINMUX_DATA(PG19_DATA, PG19MD_000), 1098 PINMUX_DATA(PG19_DATA, PG19MD_000),
1085 PINMUX_DATA(DV_DATA5_MARK, PG19MD_001), 1099 PINMUX_DATA(DV_DATA5_MARK, PG19MD_001),
1086 PINMUX_DATA(LCD_DATA19_MARK, PG19MD_010), 1100 PINMUX_DATA(LCD_DATA19_PG19_MARK, PG19MD_010),
1087 PINMUX_DATA(SPDIF_OUT_MARK, PG19MD_011), 1101 PINMUX_DATA(SPDIF_OUT_MARK, PG19MD_011),
1088 PINMUX_DATA(SCK5_MARK, PG19MD_100), 1102 PINMUX_DATA(SCK5_MARK, PG19MD_100),
1089 1103
1090 PINMUX_DATA(PG18_DATA, PG18MD_000), 1104 PINMUX_DATA(PG18_DATA, PG18MD_000),
1091 PINMUX_DATA(DV_DATA4_MARK, PG18MD_001), 1105 PINMUX_DATA(DV_DATA4_MARK, PG18MD_001),
1092 PINMUX_DATA(LCD_DATA18_MARK, PG18MD_010), 1106 PINMUX_DATA(LCD_DATA18_PG18_MARK, PG18MD_010),
1093 PINMUX_DATA(SPDIF_IN_MARK, PG18MD_011), 1107 PINMUX_DATA(SPDIF_IN_MARK, PG18MD_011),
1094 PINMUX_DATA(SCK4_MARK, PG18MD_100), 1108 PINMUX_DATA(SCK4_MARK, PG18MD_100),
1095 1109
@@ -1097,103 +1111,103 @@ static pinmux_enum_t pinmux_data[] = {
1097// we're going with 2 bits 1111// we're going with 2 bits
1098 PINMUX_DATA(PG17_DATA, PG17MD_00), 1112 PINMUX_DATA(PG17_DATA, PG17MD_00),
1099 PINMUX_DATA(WE3ICIOWRAHDQMUU_MARK, PG17MD_01), 1113 PINMUX_DATA(WE3ICIOWRAHDQMUU_MARK, PG17MD_01),
1100 PINMUX_DATA(LCD_DATA17_MARK, PG17MD_10), 1114 PINMUX_DATA(LCD_DATA17_PG17_MARK, PG17MD_10),
1101 1115
1102// TODO hardware manual has PG16 3 bits wide in reg picture and 2 bits in description 1116// TODO hardware manual has PG16 3 bits wide in reg picture and 2 bits in description
1103// we're going with 2 bits 1117// we're going with 2 bits
1104 PINMUX_DATA(PG16_DATA, PG16MD_00), 1118 PINMUX_DATA(PG16_DATA, PG16MD_00),
1105 PINMUX_DATA(WE2ICIORDDQMUL_MARK, PG16MD_01), 1119 PINMUX_DATA(WE2ICIORDDQMUL_MARK, PG16MD_01),
1106 PINMUX_DATA(LCD_DATA16_MARK, PG16MD_10), 1120 PINMUX_DATA(LCD_DATA16_PG16_MARK, PG16MD_10),
1107 1121
1108 PINMUX_DATA(PG15_DATA, PG15MD_00), 1122 PINMUX_DATA(PG15_DATA, PG15MD_00),
1109 PINMUX_DATA(D31_MARK, PG15MD_01), 1123 PINMUX_DATA(D31_MARK, PG15MD_01),
1110 PINMUX_DATA(LCD_DATA15_MARK, PG15MD_10), 1124 PINMUX_DATA(LCD_DATA15_PG15_MARK, PG15MD_10),
1111 PINMUX_DATA(PINT7_PG_MARK, PG15MD_11), 1125 PINMUX_DATA(PINT7_PG_MARK, PG15MD_11),
1112 1126
1113 PINMUX_DATA(PG14_DATA, PG14MD_00), 1127 PINMUX_DATA(PG14_DATA, PG14MD_00),
1114 PINMUX_DATA(D30_MARK, PG14MD_01), 1128 PINMUX_DATA(D30_MARK, PG14MD_01),
1115 PINMUX_DATA(LCD_DATA14_MARK, PG14MD_10), 1129 PINMUX_DATA(LCD_DATA14_PG14_MARK, PG14MD_10),
1116 PINMUX_DATA(PINT6_PG_MARK, PG14MD_11), 1130 PINMUX_DATA(PINT6_PG_MARK, PG14MD_11),
1117 1131
1118 PINMUX_DATA(PG13_DATA, PG13MD_00), 1132 PINMUX_DATA(PG13_DATA, PG13MD_00),
1119 PINMUX_DATA(D29_MARK, PG13MD_01), 1133 PINMUX_DATA(D29_MARK, PG13MD_01),
1120 PINMUX_DATA(LCD_DATA13_MARK, PG13MD_10), 1134 PINMUX_DATA(LCD_DATA13_PG13_MARK, PG13MD_10),
1121 PINMUX_DATA(PINT5_PG_MARK, PG13MD_11), 1135 PINMUX_DATA(PINT5_PG_MARK, PG13MD_11),
1122 1136
1123 PINMUX_DATA(PG12_DATA, PG12MD_00), 1137 PINMUX_DATA(PG12_DATA, PG12MD_00),
1124 PINMUX_DATA(D28_MARK, PG12MD_01), 1138 PINMUX_DATA(D28_MARK, PG12MD_01),
1125 PINMUX_DATA(LCD_DATA12_MARK, PG12MD_10), 1139 PINMUX_DATA(LCD_DATA12_PG12_MARK, PG12MD_10),
1126 PINMUX_DATA(PINT4_PG_MARK, PG12MD_11), 1140 PINMUX_DATA(PINT4_PG_MARK, PG12MD_11),
1127 1141
1128 PINMUX_DATA(PG11_DATA, PG11MD_000), 1142 PINMUX_DATA(PG11_DATA, PG11MD_000),
1129 PINMUX_DATA(D27_MARK, PG11MD_001), 1143 PINMUX_DATA(D27_MARK, PG11MD_001),
1130 PINMUX_DATA(LCD_DATA11_MARK, PG11MD_010), 1144 PINMUX_DATA(LCD_DATA11_PG11_MARK, PG11MD_010),
1131 PINMUX_DATA(PINT3_PG_MARK, PG11MD_011), 1145 PINMUX_DATA(PINT3_PG_MARK, PG11MD_011),
1132 PINMUX_DATA(TIOC3D_MARK, PG11MD_100), 1146 PINMUX_DATA(TIOC3D_MARK, PG11MD_100),
1133 1147
1134 PINMUX_DATA(PG10_DATA, PG10MD_000), 1148 PINMUX_DATA(PG10_DATA, PG10MD_000),
1135 PINMUX_DATA(D26_MARK, PG10MD_001), 1149 PINMUX_DATA(D26_MARK, PG10MD_001),
1136 PINMUX_DATA(LCD_DATA10_MARK, PG10MD_010), 1150 PINMUX_DATA(LCD_DATA10_PG10_MARK, PG10MD_010),
1137 PINMUX_DATA(PINT2_PG_MARK, PG10MD_011), 1151 PINMUX_DATA(PINT2_PG_MARK, PG10MD_011),
1138 PINMUX_DATA(TIOC3C_MARK, PG10MD_100), 1152 PINMUX_DATA(TIOC3C_MARK, PG10MD_100),
1139 1153
1140 PINMUX_DATA(PG9_DATA, PG9MD_000), 1154 PINMUX_DATA(PG9_DATA, PG9MD_000),
1141 PINMUX_DATA(D25_MARK, PG9MD_001), 1155 PINMUX_DATA(D25_MARK, PG9MD_001),
1142 PINMUX_DATA(LCD_DATA9_MARK, PG9MD_010), 1156 PINMUX_DATA(LCD_DATA9_PG9_MARK, PG9MD_010),
1143 PINMUX_DATA(PINT1_PG_MARK, PG9MD_011), 1157 PINMUX_DATA(PINT1_PG_MARK, PG9MD_011),
1144 PINMUX_DATA(TIOC3B_MARK, PG9MD_100), 1158 PINMUX_DATA(TIOC3B_MARK, PG9MD_100),
1145 1159
1146 PINMUX_DATA(PG8_DATA, PG8MD_000), 1160 PINMUX_DATA(PG8_DATA, PG8MD_000),
1147 PINMUX_DATA(D24_MARK, PG8MD_001), 1161 PINMUX_DATA(D24_MARK, PG8MD_001),
1148 PINMUX_DATA(LCD_DATA8_MARK, PG8MD_010), 1162 PINMUX_DATA(LCD_DATA8_PG8_MARK, PG8MD_010),
1149 PINMUX_DATA(PINT0_PG_MARK, PG8MD_011), 1163 PINMUX_DATA(PINT0_PG_MARK, PG8MD_011),
1150 PINMUX_DATA(TIOC3A_MARK, PG8MD_100), 1164 PINMUX_DATA(TIOC3A_MARK, PG8MD_100),
1151 1165
1152 PINMUX_DATA(PG7_DATA, PG7MD_000), 1166 PINMUX_DATA(PG7_DATA, PG7MD_000),
1153 PINMUX_DATA(D23_MARK, PG7MD_001), 1167 PINMUX_DATA(D23_MARK, PG7MD_001),
1154 PINMUX_DATA(LCD_DATA7_MARK, PG7MD_010), 1168 PINMUX_DATA(LCD_DATA7_PG7_MARK, PG7MD_010),
1155 PINMUX_DATA(IRQ7_PG_MARK, PG7MD_011), 1169 PINMUX_DATA(IRQ7_PG_MARK, PG7MD_011),
1156 PINMUX_DATA(TIOC2B_MARK, PG7MD_100), 1170 PINMUX_DATA(TIOC2B_MARK, PG7MD_100),
1157 1171
1158 PINMUX_DATA(PG6_DATA, PG6MD_000), 1172 PINMUX_DATA(PG6_DATA, PG6MD_000),
1159 PINMUX_DATA(D22_MARK, PG6MD_001), 1173 PINMUX_DATA(D22_MARK, PG6MD_001),
1160 PINMUX_DATA(LCD_DATA6_MARK, PG6MD_010), 1174 PINMUX_DATA(LCD_DATA6_PG6_MARK, PG6MD_010),
1161 PINMUX_DATA(IRQ6_PG_MARK, PG6MD_011), 1175 PINMUX_DATA(IRQ6_PG_MARK, PG6MD_011),
1162 PINMUX_DATA(TIOC2A_MARK, PG6MD_100), 1176 PINMUX_DATA(TIOC2A_MARK, PG6MD_100),
1163 1177
1164 PINMUX_DATA(PG5_DATA, PG5MD_000), 1178 PINMUX_DATA(PG5_DATA, PG5MD_000),
1165 PINMUX_DATA(D21_MARK, PG5MD_001), 1179 PINMUX_DATA(D21_MARK, PG5MD_001),
1166 PINMUX_DATA(LCD_DATA5_MARK, PG5MD_010), 1180 PINMUX_DATA(LCD_DATA5_PG5_MARK, PG5MD_010),
1167 PINMUX_DATA(IRQ5_PG_MARK, PG5MD_011), 1181 PINMUX_DATA(IRQ5_PG_MARK, PG5MD_011),
1168 PINMUX_DATA(TIOC1B_MARK, PG5MD_100), 1182 PINMUX_DATA(TIOC1B_MARK, PG5MD_100),
1169 1183
1170 PINMUX_DATA(PG4_DATA, PG4MD_000), 1184 PINMUX_DATA(PG4_DATA, PG4MD_000),
1171 PINMUX_DATA(D20_MARK, PG4MD_001), 1185 PINMUX_DATA(D20_MARK, PG4MD_001),
1172 PINMUX_DATA(LCD_DATA4_MARK, PG4MD_010), 1186 PINMUX_DATA(LCD_DATA4_PG4_MARK, PG4MD_010),
1173 PINMUX_DATA(IRQ4_PG_MARK, PG4MD_011), 1187 PINMUX_DATA(IRQ4_PG_MARK, PG4MD_011),
1174 PINMUX_DATA(TIOC1A_MARK, PG4MD_100), 1188 PINMUX_DATA(TIOC1A_MARK, PG4MD_100),
1175 1189
1176 PINMUX_DATA(PG3_DATA, PG3MD_000), 1190 PINMUX_DATA(PG3_DATA, PG3MD_000),
1177 PINMUX_DATA(D19_MARK, PG3MD_001), 1191 PINMUX_DATA(D19_MARK, PG3MD_001),
1178 PINMUX_DATA(LCD_DATA3_MARK, PG3MD_010), 1192 PINMUX_DATA(LCD_DATA3_PG3_MARK, PG3MD_010),
1179 PINMUX_DATA(IRQ3_PG_MARK, PG3MD_011), 1193 PINMUX_DATA(IRQ3_PG_MARK, PG3MD_011),
1180 PINMUX_DATA(TIOC0D_MARK, PG3MD_100), 1194 PINMUX_DATA(TIOC0D_MARK, PG3MD_100),
1181 1195
1182 PINMUX_DATA(PG2_DATA, PG2MD_000), 1196 PINMUX_DATA(PG2_DATA, PG2MD_000),
1183 PINMUX_DATA(D18_MARK, PG2MD_001), 1197 PINMUX_DATA(D18_MARK, PG2MD_001),
1184 PINMUX_DATA(LCD_DATA2_MARK, PG2MD_010), 1198 PINMUX_DATA(LCD_DATA2_PG2_MARK, PG2MD_010),
1185 PINMUX_DATA(IRQ2_PG_MARK, PG2MD_011), 1199 PINMUX_DATA(IRQ2_PG_MARK, PG2MD_011),
1186 PINMUX_DATA(TIOC0C_MARK, PG2MD_100), 1200 PINMUX_DATA(TIOC0C_MARK, PG2MD_100),
1187 1201
1188 PINMUX_DATA(PG1_DATA, PG1MD_000), 1202 PINMUX_DATA(PG1_DATA, PG1MD_000),
1189 PINMUX_DATA(D17_MARK, PG1MD_001), 1203 PINMUX_DATA(D17_MARK, PG1MD_001),
1190 PINMUX_DATA(LCD_DATA1_MARK, PG1MD_010), 1204 PINMUX_DATA(LCD_DATA1_PG1_MARK, PG1MD_010),
1191 PINMUX_DATA(IRQ1_PG_MARK, PG1MD_011), 1205 PINMUX_DATA(IRQ1_PG_MARK, PG1MD_011),
1192 PINMUX_DATA(TIOC0B_MARK, PG1MD_100), 1206 PINMUX_DATA(TIOC0B_MARK, PG1MD_100),
1193 1207
1194 PINMUX_DATA(PG0_DATA, PG0MD_000), 1208 PINMUX_DATA(PG0_DATA, PG0MD_000),
1195 PINMUX_DATA(D16_MARK, PG0MD_001), 1209 PINMUX_DATA(D16_MARK, PG0MD_001),
1196 PINMUX_DATA(LCD_DATA0_MARK, PG0MD_010), 1210 PINMUX_DATA(LCD_DATA0_PG0_MARK, PG0MD_010),
1197 PINMUX_DATA(IRQ0_PG_MARK, PG0MD_011), 1211 PINMUX_DATA(IRQ0_PG_MARK, PG0MD_011),
1198 PINMUX_DATA(TIOC0A_MARK, PG0MD_100), 1212 PINMUX_DATA(TIOC0A_MARK, PG0MD_100),
1199 1213
@@ -1275,14 +1289,14 @@ static pinmux_enum_t pinmux_data[] = {
1275 1289
1276 PINMUX_DATA(PJ23_DATA, PJ23MD_000), 1290 PINMUX_DATA(PJ23_DATA, PJ23MD_000),
1277 PINMUX_DATA(DV_DATA23_MARK, PJ23MD_001), 1291 PINMUX_DATA(DV_DATA23_MARK, PJ23MD_001),
1278 PINMUX_DATA(LCD_DATA23_MARK, PJ23MD_010), 1292 PINMUX_DATA(LCD_DATA23_PJ23_MARK, PJ23MD_010),
1279 PINMUX_DATA(LCD_TCON6_MARK, PJ23MD_011), 1293 PINMUX_DATA(LCD_TCON6_MARK, PJ23MD_011),
1280 PINMUX_DATA(IRQ3_PJ_MARK, PJ23MD_100), 1294 PINMUX_DATA(IRQ3_PJ_MARK, PJ23MD_100),
1281 PINMUX_DATA(CTX1_MARK, PJ23MD_101), 1295 PINMUX_DATA(CTX1_MARK, PJ23MD_101),
1282 1296
1283 PINMUX_DATA(PJ22_DATA, PJ22MD_000), 1297 PINMUX_DATA(PJ22_DATA, PJ22MD_000),
1284 PINMUX_DATA(DV_DATA22_MARK, PJ22MD_001), 1298 PINMUX_DATA(DV_DATA22_MARK, PJ22MD_001),
1285 PINMUX_DATA(LCD_DATA22_MARK, PJ22MD_010), 1299 PINMUX_DATA(LCD_DATA22_PJ22_MARK, PJ22MD_010),
1286 PINMUX_DATA(LCD_TCON5_MARK, PJ22MD_011), 1300 PINMUX_DATA(LCD_TCON5_MARK, PJ22MD_011),
1287 PINMUX_DATA(IRQ2_PJ_MARK, PJ22MD_100), 1301 PINMUX_DATA(IRQ2_PJ_MARK, PJ22MD_100),
1288 PINMUX_DATA(CRX1_MARK, PJ22MD_101), 1302 PINMUX_DATA(CRX1_MARK, PJ22MD_101),
@@ -1290,14 +1304,14 @@ static pinmux_enum_t pinmux_data[] = {
1290 1304
1291 PINMUX_DATA(PJ21_DATA, PJ21MD_000), 1305 PINMUX_DATA(PJ21_DATA, PJ21MD_000),
1292 PINMUX_DATA(DV_DATA21_MARK, PJ21MD_001), 1306 PINMUX_DATA(DV_DATA21_MARK, PJ21MD_001),
1293 PINMUX_DATA(LCD_DATA21_MARK, PJ21MD_010), 1307 PINMUX_DATA(LCD_DATA21_PJ21_MARK, PJ21MD_010),
1294 PINMUX_DATA(LCD_TCON4_MARK, PJ21MD_011), 1308 PINMUX_DATA(LCD_TCON4_MARK, PJ21MD_011),
1295 PINMUX_DATA(IRQ1_PJ_MARK, PJ21MD_100), 1309 PINMUX_DATA(IRQ1_PJ_MARK, PJ21MD_100),
1296 PINMUX_DATA(CTX2_MARK, PJ21MD_101), 1310 PINMUX_DATA(CTX2_MARK, PJ21MD_101),
1297 1311
1298 PINMUX_DATA(PJ20_DATA, PJ20MD_000), 1312 PINMUX_DATA(PJ20_DATA, PJ20MD_000),
1299 PINMUX_DATA(DV_DATA20_MARK, PJ20MD_001), 1313 PINMUX_DATA(DV_DATA20_MARK, PJ20MD_001),
1300 PINMUX_DATA(LCD_DATA20_MARK, PJ20MD_010), 1314 PINMUX_DATA(LCD_DATA20_PJ20_MARK, PJ20MD_010),
1301 PINMUX_DATA(LCD_TCON3_MARK, PJ20MD_011), 1315 PINMUX_DATA(LCD_TCON3_MARK, PJ20MD_011),
1302 PINMUX_DATA(IRQ0_PJ_MARK, PJ20MD_100), 1316 PINMUX_DATA(IRQ0_PJ_MARK, PJ20MD_100),
1303 PINMUX_DATA(CRX2_MARK, PJ20MD_101), 1317 PINMUX_DATA(CRX2_MARK, PJ20MD_101),
@@ -1305,7 +1319,7 @@ static pinmux_enum_t pinmux_data[] = {
1305 1319
1306 PINMUX_DATA(PJ19_DATA, PJ19MD_000), 1320 PINMUX_DATA(PJ19_DATA, PJ19MD_000),
1307 PINMUX_DATA(DV_DATA19_MARK, PJ19MD_001), 1321 PINMUX_DATA(DV_DATA19_MARK, PJ19MD_001),
1308 PINMUX_DATA(LCD_DATA19_MARK, PJ19MD_010), 1322 PINMUX_DATA(LCD_DATA19_PJ19_MARK, PJ19MD_010),
1309 PINMUX_DATA(MISO0_PJ19_MARK, PJ19MD_011), 1323 PINMUX_DATA(MISO0_PJ19_MARK, PJ19MD_011),
1310 PINMUX_DATA(TIOC0D_MARK, PJ19MD_100), 1324 PINMUX_DATA(TIOC0D_MARK, PJ19MD_100),
1311 PINMUX_DATA(SIOFRXD_MARK, PJ19MD_101), 1325 PINMUX_DATA(SIOFRXD_MARK, PJ19MD_101),
@@ -1313,126 +1327,126 @@ static pinmux_enum_t pinmux_data[] = {
1313 1327
1314 PINMUX_DATA(PJ18_DATA, PJ18MD_000), 1328 PINMUX_DATA(PJ18_DATA, PJ18MD_000),
1315 PINMUX_DATA(DV_DATA18_MARK, PJ18MD_001), 1329 PINMUX_DATA(DV_DATA18_MARK, PJ18MD_001),
1316 PINMUX_DATA(LCD_DATA18_MARK, PJ18MD_010), 1330 PINMUX_DATA(LCD_DATA18_PJ18_MARK, PJ18MD_010),
1317 PINMUX_DATA(MOSI0_PJ18_MARK, PJ18MD_011), 1331 PINMUX_DATA(MOSI0_PJ18_MARK, PJ18MD_011),
1318 PINMUX_DATA(TIOC0C_MARK, PJ18MD_100), 1332 PINMUX_DATA(TIOC0C_MARK, PJ18MD_100),
1319 PINMUX_DATA(SIOFTXD_MARK, PJ18MD_101), 1333 PINMUX_DATA(SIOFTXD_MARK, PJ18MD_101),
1320 1334
1321 PINMUX_DATA(PJ17_DATA, PJ17MD_000), 1335 PINMUX_DATA(PJ17_DATA, PJ17MD_000),
1322 PINMUX_DATA(DV_DATA17_MARK, PJ17MD_001), 1336 PINMUX_DATA(DV_DATA17_MARK, PJ17MD_001),
1323 PINMUX_DATA(LCD_DATA17_MARK, PJ17MD_010), 1337 PINMUX_DATA(LCD_DATA17_PJ17_MARK, PJ17MD_010),
1324 PINMUX_DATA(SSL00_PJ17_MARK, PJ17MD_011), 1338 PINMUX_DATA(SSL00_PJ17_MARK, PJ17MD_011),
1325 PINMUX_DATA(TIOC0B_MARK, PJ17MD_100), 1339 PINMUX_DATA(TIOC0B_MARK, PJ17MD_100),
1326 PINMUX_DATA(SIOFSYNC_MARK, PJ17MD_101), 1340 PINMUX_DATA(SIOFSYNC_MARK, PJ17MD_101),
1327 1341
1328 PINMUX_DATA(PJ16_DATA, PJ16MD_000), 1342 PINMUX_DATA(PJ16_DATA, PJ16MD_000),
1329 PINMUX_DATA(DV_DATA16_MARK, PJ16MD_001), 1343 PINMUX_DATA(DV_DATA16_MARK, PJ16MD_001),
1330 PINMUX_DATA(LCD_DATA16_MARK, PJ16MD_010), 1344 PINMUX_DATA(LCD_DATA16_PJ16_MARK, PJ16MD_010),
1331 PINMUX_DATA(RSPCK0_PJ16_MARK, PJ16MD_011), 1345 PINMUX_DATA(RSPCK0_PJ16_MARK, PJ16MD_011),
1332 PINMUX_DATA(TIOC0A_MARK, PJ16MD_100), 1346 PINMUX_DATA(TIOC0A_MARK, PJ16MD_100),
1333 PINMUX_DATA(SIOFSCK_MARK, PJ16MD_101), 1347 PINMUX_DATA(SIOFSCK_MARK, PJ16MD_101),
1334 1348
1335 PINMUX_DATA(PJ15_DATA, PJ15MD_000), 1349 PINMUX_DATA(PJ15_DATA, PJ15MD_000),
1336 PINMUX_DATA(DV_DATA15_MARK, PJ15MD_001), 1350 PINMUX_DATA(DV_DATA15_MARK, PJ15MD_001),
1337 PINMUX_DATA(LCD_DATA15_MARK, PJ15MD_010), 1351 PINMUX_DATA(LCD_DATA15_PJ15_MARK, PJ15MD_010),
1338 PINMUX_DATA(PINT7_PJ_MARK, PJ15MD_011), 1352 PINMUX_DATA(PINT7_PJ_MARK, PJ15MD_011),
1339 PINMUX_DATA(PWM2H_MARK, PJ15MD_100), 1353 PINMUX_DATA(PWM2H_MARK, PJ15MD_100),
1340 PINMUX_DATA(TXD7_MARK, PJ15MD_101), 1354 PINMUX_DATA(TXD7_MARK, PJ15MD_101),
1341 1355
1342 PINMUX_DATA(PJ14_DATA, PJ14MD_000), 1356 PINMUX_DATA(PJ14_DATA, PJ14MD_000),
1343 PINMUX_DATA(DV_DATA14_MARK, PJ14MD_001), 1357 PINMUX_DATA(DV_DATA14_MARK, PJ14MD_001),
1344 PINMUX_DATA(LCD_DATA14_MARK, PJ14MD_010), 1358 PINMUX_DATA(LCD_DATA14_PJ14_MARK, PJ14MD_010),
1345 PINMUX_DATA(PINT6_PJ_MARK, PJ14MD_011), 1359 PINMUX_DATA(PINT6_PJ_MARK, PJ14MD_011),
1346 PINMUX_DATA(PWM2G_MARK, PJ14MD_100), 1360 PINMUX_DATA(PWM2G_MARK, PJ14MD_100),
1347 PINMUX_DATA(TXD6_MARK, PJ14MD_101), 1361 PINMUX_DATA(TXD6_MARK, PJ14MD_101),
1348 1362
1349 PINMUX_DATA(PJ13_DATA, PJ13MD_000), 1363 PINMUX_DATA(PJ13_DATA, PJ13MD_000),
1350 PINMUX_DATA(DV_DATA13_MARK, PJ13MD_001), 1364 PINMUX_DATA(DV_DATA13_MARK, PJ13MD_001),
1351 PINMUX_DATA(LCD_DATA13_MARK, PJ13MD_010), 1365 PINMUX_DATA(LCD_DATA13_PJ13_MARK, PJ13MD_010),
1352 PINMUX_DATA(PINT5_PJ_MARK, PJ13MD_011), 1366 PINMUX_DATA(PINT5_PJ_MARK, PJ13MD_011),
1353 PINMUX_DATA(PWM2F_MARK, PJ13MD_100), 1367 PINMUX_DATA(PWM2F_MARK, PJ13MD_100),
1354 PINMUX_DATA(TXD5_MARK, PJ13MD_101), 1368 PINMUX_DATA(TXD5_MARK, PJ13MD_101),
1355 1369
1356 PINMUX_DATA(PJ12_DATA, PJ12MD_000), 1370 PINMUX_DATA(PJ12_DATA, PJ12MD_000),
1357 PINMUX_DATA(DV_DATA12_MARK, PJ12MD_001), 1371 PINMUX_DATA(DV_DATA12_MARK, PJ12MD_001),
1358 PINMUX_DATA(LCD_DATA12_MARK, PJ12MD_010), 1372 PINMUX_DATA(LCD_DATA12_PJ12_MARK, PJ12MD_010),
1359 PINMUX_DATA(PINT4_PJ_MARK, PJ12MD_011), 1373 PINMUX_DATA(PINT4_PJ_MARK, PJ12MD_011),
1360 PINMUX_DATA(PWM2E_MARK, PJ12MD_100), 1374 PINMUX_DATA(PWM2E_MARK, PJ12MD_100),
1361 PINMUX_DATA(SCK7_MARK, PJ12MD_101), 1375 PINMUX_DATA(SCK7_MARK, PJ12MD_101),
1362 1376
1363 PINMUX_DATA(PJ11_DATA, PJ11MD_000), 1377 PINMUX_DATA(PJ11_DATA, PJ11MD_000),
1364 PINMUX_DATA(DV_DATA11_MARK, PJ11MD_001), 1378 PINMUX_DATA(DV_DATA11_MARK, PJ11MD_001),
1365 PINMUX_DATA(LCD_DATA11_MARK, PJ11MD_010), 1379 PINMUX_DATA(LCD_DATA11_PJ11_MARK, PJ11MD_010),
1366 PINMUX_DATA(PINT3_PJ_MARK, PJ11MD_011), 1380 PINMUX_DATA(PINT3_PJ_MARK, PJ11MD_011),
1367 PINMUX_DATA(PWM2D_MARK, PJ11MD_100), 1381 PINMUX_DATA(PWM2D_MARK, PJ11MD_100),
1368 PINMUX_DATA(SCK6_MARK, PJ11MD_101), 1382 PINMUX_DATA(SCK6_MARK, PJ11MD_101),
1369 1383
1370 PINMUX_DATA(PJ10_DATA, PJ10MD_000), 1384 PINMUX_DATA(PJ10_DATA, PJ10MD_000),
1371 PINMUX_DATA(DV_DATA10_MARK, PJ10MD_001), 1385 PINMUX_DATA(DV_DATA10_MARK, PJ10MD_001),
1372 PINMUX_DATA(LCD_DATA10_MARK, PJ10MD_010), 1386 PINMUX_DATA(LCD_DATA10_PJ10_MARK, PJ10MD_010),
1373 PINMUX_DATA(PINT2_PJ_MARK, PJ10MD_011), 1387 PINMUX_DATA(PINT2_PJ_MARK, PJ10MD_011),
1374 PINMUX_DATA(PWM2C_MARK, PJ10MD_100), 1388 PINMUX_DATA(PWM2C_MARK, PJ10MD_100),
1375 PINMUX_DATA(SCK5_MARK, PJ10MD_101), 1389 PINMUX_DATA(SCK5_MARK, PJ10MD_101),
1376 1390
1377 PINMUX_DATA(PJ9_DATA, PJ9MD_000), 1391 PINMUX_DATA(PJ9_DATA, PJ9MD_000),
1378 PINMUX_DATA(DV_DATA9_MARK, PJ9MD_001), 1392 PINMUX_DATA(DV_DATA9_MARK, PJ9MD_001),
1379 PINMUX_DATA(LCD_DATA9_MARK, PJ9MD_010), 1393 PINMUX_DATA(LCD_DATA9_PJ9_MARK, PJ9MD_010),
1380 PINMUX_DATA(PINT1_PJ_MARK, PJ9MD_011), 1394 PINMUX_DATA(PINT1_PJ_MARK, PJ9MD_011),
1381 PINMUX_DATA(PWM2B_MARK, PJ9MD_100), 1395 PINMUX_DATA(PWM2B_MARK, PJ9MD_100),
1382 PINMUX_DATA(RTS5_MARK, PJ9MD_101), 1396 PINMUX_DATA(RTS5_MARK, PJ9MD_101),
1383 1397
1384 PINMUX_DATA(PJ8_DATA, PJ8MD_000), 1398 PINMUX_DATA(PJ8_DATA, PJ8MD_000),
1385 PINMUX_DATA(DV_DATA8_MARK, PJ8MD_001), 1399 PINMUX_DATA(DV_DATA8_MARK, PJ8MD_001),
1386 PINMUX_DATA(LCD_DATA8_MARK, PJ8MD_010), 1400 PINMUX_DATA(LCD_DATA8_PJ8_MARK, PJ8MD_010),
1387 PINMUX_DATA(PINT0_PJ_MARK, PJ8MD_011), 1401 PINMUX_DATA(PINT0_PJ_MARK, PJ8MD_011),
1388 PINMUX_DATA(PWM2A_MARK, PJ8MD_100), 1402 PINMUX_DATA(PWM2A_MARK, PJ8MD_100),
1389 PINMUX_DATA(CTS5_MARK, PJ8MD_101), 1403 PINMUX_DATA(CTS5_MARK, PJ8MD_101),
1390 1404
1391 PINMUX_DATA(PJ7_DATA, PJ7MD_000), 1405 PINMUX_DATA(PJ7_DATA, PJ7MD_000),
1392 PINMUX_DATA(DV_DATA7_MARK, PJ7MD_001), 1406 PINMUX_DATA(DV_DATA7_MARK, PJ7MD_001),
1393 PINMUX_DATA(LCD_DATA7_MARK, PJ7MD_010), 1407 PINMUX_DATA(LCD_DATA7_PJ7_MARK, PJ7MD_010),
1394 PINMUX_DATA(SD_D2_MARK, PJ7MD_011), 1408 PINMUX_DATA(SD_D2_MARK, PJ7MD_011),
1395 PINMUX_DATA(PWM1H_MARK, PJ7MD_100), 1409 PINMUX_DATA(PWM1H_MARK, PJ7MD_100),
1396 1410
1397 PINMUX_DATA(PJ6_DATA, PJ6MD_000), 1411 PINMUX_DATA(PJ6_DATA, PJ6MD_000),
1398 PINMUX_DATA(DV_DATA6_MARK, PJ6MD_001), 1412 PINMUX_DATA(DV_DATA6_MARK, PJ6MD_001),
1399 PINMUX_DATA(LCD_DATA6_MARK, PJ6MD_010), 1413 PINMUX_DATA(LCD_DATA6_PJ6_MARK, PJ6MD_010),
1400 PINMUX_DATA(SD_D3_MARK, PJ6MD_011), 1414 PINMUX_DATA(SD_D3_MARK, PJ6MD_011),
1401 PINMUX_DATA(PWM1G_MARK, PJ6MD_100), 1415 PINMUX_DATA(PWM1G_MARK, PJ6MD_100),
1402 1416
1403 PINMUX_DATA(PJ5_DATA, PJ5MD_000), 1417 PINMUX_DATA(PJ5_DATA, PJ5MD_000),
1404 PINMUX_DATA(DV_DATA5_MARK, PJ5MD_001), 1418 PINMUX_DATA(DV_DATA5_MARK, PJ5MD_001),
1405 PINMUX_DATA(LCD_DATA5_MARK, PJ5MD_010), 1419 PINMUX_DATA(LCD_DATA5_PJ5_MARK, PJ5MD_010),
1406 PINMUX_DATA(SD_CMD_MARK, PJ5MD_011), 1420 PINMUX_DATA(SD_CMD_MARK, PJ5MD_011),
1407 PINMUX_DATA(PWM1F_MARK, PJ5MD_100), 1421 PINMUX_DATA(PWM1F_MARK, PJ5MD_100),
1408 1422
1409 PINMUX_DATA(PJ4_DATA, PJ4MD_000), 1423 PINMUX_DATA(PJ4_DATA, PJ4MD_000),
1410 PINMUX_DATA(DV_DATA4_MARK, PJ4MD_001), 1424 PINMUX_DATA(DV_DATA4_MARK, PJ4MD_001),
1411 PINMUX_DATA(LCD_DATA4_MARK, PJ4MD_010), 1425 PINMUX_DATA(LCD_DATA4_PJ4_MARK, PJ4MD_010),
1412 PINMUX_DATA(SD_CLK_MARK, PJ4MD_011), 1426 PINMUX_DATA(SD_CLK_MARK, PJ4MD_011),
1413 PINMUX_DATA(PWM1E_MARK, PJ4MD_100), 1427 PINMUX_DATA(PWM1E_MARK, PJ4MD_100),
1414 1428
1415 PINMUX_DATA(PJ3_DATA, PJ3MD_000), 1429 PINMUX_DATA(PJ3_DATA, PJ3MD_000),
1416 PINMUX_DATA(DV_DATA3_MARK, PJ3MD_001), 1430 PINMUX_DATA(DV_DATA3_MARK, PJ3MD_001),
1417 PINMUX_DATA(LCD_DATA3_MARK, PJ3MD_010), 1431 PINMUX_DATA(LCD_DATA3_PJ3_MARK, PJ3MD_010),
1418 PINMUX_DATA(SD_D0_MARK, PJ3MD_011), 1432 PINMUX_DATA(SD_D0_MARK, PJ3MD_011),
1419 PINMUX_DATA(PWM1D_MARK, PJ3MD_100), 1433 PINMUX_DATA(PWM1D_MARK, PJ3MD_100),
1420 1434
1421 PINMUX_DATA(PJ2_DATA, PJ2MD_000), 1435 PINMUX_DATA(PJ2_DATA, PJ2MD_000),
1422 PINMUX_DATA(DV_DATA2_MARK, PJ2MD_001), 1436 PINMUX_DATA(DV_DATA2_MARK, PJ2MD_001),
1423 PINMUX_DATA(LCD_DATA2_MARK, PJ2MD_010), 1437 PINMUX_DATA(LCD_DATA2_PJ2_MARK, PJ2MD_010),
1424 PINMUX_DATA(SD_D1_MARK, PJ2MD_011), 1438 PINMUX_DATA(SD_D1_MARK, PJ2MD_011),
1425 PINMUX_DATA(PWM1C_MARK, PJ2MD_100), 1439 PINMUX_DATA(PWM1C_MARK, PJ2MD_100),
1426 1440
1427 PINMUX_DATA(PJ1_DATA, PJ1MD_000), 1441 PINMUX_DATA(PJ1_DATA, PJ1MD_000),
1428 PINMUX_DATA(DV_DATA1_MARK, PJ1MD_001), 1442 PINMUX_DATA(DV_DATA1_MARK, PJ1MD_001),
1429 PINMUX_DATA(LCD_DATA1_MARK, PJ1MD_010), 1443 PINMUX_DATA(LCD_DATA1_PJ1_MARK, PJ1MD_010),
1430 PINMUX_DATA(SD_WP_MARK, PJ1MD_011), 1444 PINMUX_DATA(SD_WP_MARK, PJ1MD_011),
1431 PINMUX_DATA(PWM1B_MARK, PJ1MD_100), 1445 PINMUX_DATA(PWM1B_MARK, PJ1MD_100),
1432 1446
1433 PINMUX_DATA(PJ0_DATA, PJ0MD_000), 1447 PINMUX_DATA(PJ0_DATA, PJ0MD_000),
1434 PINMUX_DATA(DV_DATA0_MARK, PJ0MD_001), 1448 PINMUX_DATA(DV_DATA0_MARK, PJ0MD_001),
1435 PINMUX_DATA(LCD_DATA0_MARK, PJ0MD_010), 1449 PINMUX_DATA(LCD_DATA0_PJ0_MARK, PJ0MD_010),
1436 PINMUX_DATA(SD_CD_MARK, PJ0MD_011), 1450 PINMUX_DATA(SD_CD_MARK, PJ0MD_011),
1437 PINMUX_DATA(PWM1A_MARK, PJ0MD_100), 1451 PINMUX_DATA(PWM1A_MARK, PJ0MD_100),
1438}; 1452};
@@ -1877,30 +1891,55 @@ static struct pinmux_gpio pinmux_gpios[] = {
1877 PINMUX_GPIO(GPIO_FN_LCD_HSYNC, LCD_HSYNC_MARK), 1891 PINMUX_GPIO(GPIO_FN_LCD_HSYNC, LCD_HSYNC_MARK),
1878 PINMUX_GPIO(GPIO_FN_LCD_DE, LCD_DE_MARK), 1892 PINMUX_GPIO(GPIO_FN_LCD_DE, LCD_DE_MARK),
1879 1893
1880 PINMUX_GPIO(GPIO_FN_LCD_DATA23, LCD_DATA23_MARK), 1894 PINMUX_GPIO(GPIO_FN_LCD_DATA23_PG23, LCD_DATA23_PG23_MARK),
1881 PINMUX_GPIO(GPIO_FN_LCD_DATA22, LCD_DATA22_MARK), 1895 PINMUX_GPIO(GPIO_FN_LCD_DATA22_PG22, LCD_DATA22_PG22_MARK),
1882 PINMUX_GPIO(GPIO_FN_LCD_DATA21, LCD_DATA21_MARK), 1896 PINMUX_GPIO(GPIO_FN_LCD_DATA21_PG21, LCD_DATA21_PG21_MARK),
1883 PINMUX_GPIO(GPIO_FN_LCD_DATA20, LCD_DATA20_MARK), 1897 PINMUX_GPIO(GPIO_FN_LCD_DATA20_PG20, LCD_DATA20_PG20_MARK),
1884 PINMUX_GPIO(GPIO_FN_LCD_DATA19, LCD_DATA19_MARK), 1898 PINMUX_GPIO(GPIO_FN_LCD_DATA19_PG19, LCD_DATA19_PG19_MARK),
1885 PINMUX_GPIO(GPIO_FN_LCD_DATA18, LCD_DATA18_MARK), 1899 PINMUX_GPIO(GPIO_FN_LCD_DATA18_PG18, LCD_DATA18_PG18_MARK),
1886 PINMUX_GPIO(GPIO_FN_LCD_DATA17, LCD_DATA17_MARK), 1900 PINMUX_GPIO(GPIO_FN_LCD_DATA17_PG17, LCD_DATA17_PG17_MARK),
1887 PINMUX_GPIO(GPIO_FN_LCD_DATA16, LCD_DATA16_MARK), 1901 PINMUX_GPIO(GPIO_FN_LCD_DATA16_PG16, LCD_DATA16_PG16_MARK),
1888 PINMUX_GPIO(GPIO_FN_LCD_DATA15, LCD_DATA15_MARK), 1902 PINMUX_GPIO(GPIO_FN_LCD_DATA15_PG15, LCD_DATA15_PG15_MARK),
1889 PINMUX_GPIO(GPIO_FN_LCD_DATA14, LCD_DATA14_MARK), 1903 PINMUX_GPIO(GPIO_FN_LCD_DATA14_PG14, LCD_DATA14_PG14_MARK),
1890 PINMUX_GPIO(GPIO_FN_LCD_DATA13, LCD_DATA13_MARK), 1904 PINMUX_GPIO(GPIO_FN_LCD_DATA13_PG13, LCD_DATA13_PG13_MARK),
1891 PINMUX_GPIO(GPIO_FN_LCD_DATA12, LCD_DATA12_MARK), 1905 PINMUX_GPIO(GPIO_FN_LCD_DATA12_PG12, LCD_DATA12_PG12_MARK),
1892 PINMUX_GPIO(GPIO_FN_LCD_DATA11, LCD_DATA11_MARK), 1906 PINMUX_GPIO(GPIO_FN_LCD_DATA11_PG11, LCD_DATA11_PG11_MARK),
1893 PINMUX_GPIO(GPIO_FN_LCD_DATA10, LCD_DATA10_MARK), 1907 PINMUX_GPIO(GPIO_FN_LCD_DATA10_PG10, LCD_DATA10_PG10_MARK),
1894 PINMUX_GPIO(GPIO_FN_LCD_DATA9, LCD_DATA9_MARK), 1908 PINMUX_GPIO(GPIO_FN_LCD_DATA9_PG9, LCD_DATA9_PG9_MARK),
1895 PINMUX_GPIO(GPIO_FN_LCD_DATA8, LCD_DATA8_MARK), 1909 PINMUX_GPIO(GPIO_FN_LCD_DATA8_PG8, LCD_DATA8_PG8_MARK),
1896 PINMUX_GPIO(GPIO_FN_LCD_DATA7, LCD_DATA7_MARK), 1910 PINMUX_GPIO(GPIO_FN_LCD_DATA7_PG7, LCD_DATA7_PG7_MARK),
1897 PINMUX_GPIO(GPIO_FN_LCD_DATA6, LCD_DATA6_MARK), 1911 PINMUX_GPIO(GPIO_FN_LCD_DATA6_PG6, LCD_DATA6_PG6_MARK),
1898 PINMUX_GPIO(GPIO_FN_LCD_DATA5, LCD_DATA5_MARK), 1912 PINMUX_GPIO(GPIO_FN_LCD_DATA5_PG5, LCD_DATA5_PG5_MARK),
1899 PINMUX_GPIO(GPIO_FN_LCD_DATA4, LCD_DATA4_MARK), 1913 PINMUX_GPIO(GPIO_FN_LCD_DATA4_PG4, LCD_DATA4_PG4_MARK),
1900 PINMUX_GPIO(GPIO_FN_LCD_DATA3, LCD_DATA3_MARK), 1914 PINMUX_GPIO(GPIO_FN_LCD_DATA3_PG3, LCD_DATA3_PG3_MARK),
1901 PINMUX_GPIO(GPIO_FN_LCD_DATA2, LCD_DATA2_MARK), 1915 PINMUX_GPIO(GPIO_FN_LCD_DATA2_PG2, LCD_DATA2_PG2_MARK),
1902 PINMUX_GPIO(GPIO_FN_LCD_DATA1, LCD_DATA1_MARK), 1916 PINMUX_GPIO(GPIO_FN_LCD_DATA1_PG1, LCD_DATA1_PG1_MARK),
1903 PINMUX_GPIO(GPIO_FN_LCD_DATA0, LCD_DATA0_MARK), 1917 PINMUX_GPIO(GPIO_FN_LCD_DATA0_PG0, LCD_DATA0_PG0_MARK),
1918
1919 PINMUX_GPIO(GPIO_FN_LCD_DATA23_PJ23, LCD_DATA23_PJ23_MARK),
1920 PINMUX_GPIO(GPIO_FN_LCD_DATA22_PJ22, LCD_DATA22_PJ22_MARK),
1921 PINMUX_GPIO(GPIO_FN_LCD_DATA21_PJ21, LCD_DATA21_PJ21_MARK),
1922 PINMUX_GPIO(GPIO_FN_LCD_DATA20_PJ20, LCD_DATA20_PJ20_MARK),
1923 PINMUX_GPIO(GPIO_FN_LCD_DATA19_PJ19, LCD_DATA19_PJ19_MARK),
1924 PINMUX_GPIO(GPIO_FN_LCD_DATA18_PJ18, LCD_DATA18_PJ18_MARK),
1925 PINMUX_GPIO(GPIO_FN_LCD_DATA17_PJ17, LCD_DATA17_PJ17_MARK),
1926 PINMUX_GPIO(GPIO_FN_LCD_DATA16_PJ16, LCD_DATA16_PJ16_MARK),
1927 PINMUX_GPIO(GPIO_FN_LCD_DATA15_PJ15, LCD_DATA15_PJ15_MARK),
1928 PINMUX_GPIO(GPIO_FN_LCD_DATA14_PJ14, LCD_DATA14_PJ14_MARK),
1929 PINMUX_GPIO(GPIO_FN_LCD_DATA13_PJ13, LCD_DATA13_PJ13_MARK),
1930 PINMUX_GPIO(GPIO_FN_LCD_DATA12_PJ12, LCD_DATA12_PJ12_MARK),
1931 PINMUX_GPIO(GPIO_FN_LCD_DATA11_PJ11, LCD_DATA11_PJ11_MARK),
1932 PINMUX_GPIO(GPIO_FN_LCD_DATA10_PJ10, LCD_DATA10_PJ10_MARK),
1933 PINMUX_GPIO(GPIO_FN_LCD_DATA9_PJ9, LCD_DATA9_PJ9_MARK),
1934 PINMUX_GPIO(GPIO_FN_LCD_DATA8_PJ8, LCD_DATA8_PJ8_MARK),
1935 PINMUX_GPIO(GPIO_FN_LCD_DATA7_PJ7, LCD_DATA7_PJ7_MARK),
1936 PINMUX_GPIO(GPIO_FN_LCD_DATA6_PJ6, LCD_DATA6_PJ6_MARK),
1937 PINMUX_GPIO(GPIO_FN_LCD_DATA5_PJ5, LCD_DATA5_PJ5_MARK),
1938 PINMUX_GPIO(GPIO_FN_LCD_DATA4_PJ4, LCD_DATA4_PJ4_MARK),
1939 PINMUX_GPIO(GPIO_FN_LCD_DATA3_PJ3, LCD_DATA3_PJ3_MARK),
1940 PINMUX_GPIO(GPIO_FN_LCD_DATA2_PJ2, LCD_DATA2_PJ2_MARK),
1941 PINMUX_GPIO(GPIO_FN_LCD_DATA1_PJ1, LCD_DATA1_PJ1_MARK),
1942 PINMUX_GPIO(GPIO_FN_LCD_DATA0_PJ0, LCD_DATA0_PJ0_MARK),
1904 1943
1905 PINMUX_GPIO(GPIO_FN_LCD_M_DISP, LCD_M_DISP_MARK), 1944 PINMUX_GPIO(GPIO_FN_LCD_M_DISP, LCD_M_DISP_MARK),
1906}; 1945};
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 7b57bf1dc855..ebe7a7d97215 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -273,7 +273,7 @@ void __init setup_arch(char **cmdline_p)
273 data_resource.start = virt_to_phys(_etext); 273 data_resource.start = virt_to_phys(_etext);
274 data_resource.end = virt_to_phys(_edata)-1; 274 data_resource.end = virt_to_phys(_edata)-1;
275 bss_resource.start = virt_to_phys(__bss_start); 275 bss_resource.start = virt_to_phys(__bss_start);
276 bss_resource.end = virt_to_phys(_ebss)-1; 276 bss_resource.end = virt_to_phys(__bss_stop)-1;
277 277
278#ifdef CONFIG_CMDLINE_OVERWRITE 278#ifdef CONFIG_CMDLINE_OVERWRITE
279 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); 279 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c
index 3896f26efa4a..2a0a596ebf67 100644
--- a/arch/sh/kernel/sh_ksyms_32.c
+++ b/arch/sh/kernel/sh_ksyms_32.c
@@ -19,7 +19,6 @@ EXPORT_SYMBOL(csum_partial);
19EXPORT_SYMBOL(csum_partial_copy_generic); 19EXPORT_SYMBOL(csum_partial_copy_generic);
20EXPORT_SYMBOL(copy_page); 20EXPORT_SYMBOL(copy_page);
21EXPORT_SYMBOL(__clear_user); 21EXPORT_SYMBOL(__clear_user);
22EXPORT_SYMBOL(_ebss);
23EXPORT_SYMBOL(empty_zero_page); 22EXPORT_SYMBOL(empty_zero_page);
24 23
25#define DECLARE_EXPORT(name) \ 24#define DECLARE_EXPORT(name) \
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index c98905f71e28..db88cbf9eafd 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -78,7 +78,6 @@ SECTIONS
78 . = ALIGN(PAGE_SIZE); 78 . = ALIGN(PAGE_SIZE);
79 __init_end = .; 79 __init_end = .;
80 BSS_SECTION(0, PAGE_SIZE, 4) 80 BSS_SECTION(0, PAGE_SIZE, 4)
81 _ebss = .; /* uClinux MTD sucks */
82 _end = . ; 81 _end = . ;
83 82
84 STABS_DEBUG 83 STABS_DEBUG
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S
index 84a57761f17e..60164e65d665 100644
--- a/arch/sh/lib/mcount.S
+++ b/arch/sh/lib/mcount.S
@@ -39,7 +39,7 @@
39 * 39 *
40 * Make sure the stack pointer contains a valid address. Valid 40 * Make sure the stack pointer contains a valid address. Valid
41 * addresses for kernel stacks are anywhere after the bss 41 * addresses for kernel stacks are anywhere after the bss
42 * (after _ebss) and anywhere in init_thread_union (init_stack). 42 * (after __bss_stop) and anywhere in init_thread_union (init_stack).
43 */ 43 */
44#define STACK_CHECK() \ 44#define STACK_CHECK() \
45 mov #(THREAD_SIZE >> 10), r0; \ 45 mov #(THREAD_SIZE >> 10), r0; \
@@ -60,7 +60,7 @@
60 cmp/hi r2, r1; \ 60 cmp/hi r2, r1; \
61 bf stack_panic; \ 61 bf stack_panic; \
62 \ 62 \
63 /* If sp > _ebss then we're OK. */ \ 63 /* If sp > __bss_stop then we're OK. */ \
64 mov.l .L_ebss, r1; \ 64 mov.l .L_ebss, r1; \
65 cmp/hi r1, r15; \ 65 cmp/hi r1, r15; \
66 bt 1f; \ 66 bt 1f; \
@@ -70,7 +70,7 @@
70 cmp/hs r1, r15; \ 70 cmp/hs r1, r15; \
71 bf stack_panic; \ 71 bf stack_panic; \
72 \ 72 \
73 /* If sp > init_stack && sp < _ebss, not OK. */ \ 73 /* If sp > init_stack && sp < __bss_stop, not OK. */ \
74 add r0, r1; \ 74 add r0, r1; \
75 cmp/hs r1, r15; \ 75 cmp/hs r1, r15; \
76 bt stack_panic; \ 76 bt stack_panic; \
@@ -292,8 +292,6 @@ stack_panic:
292 nop 292 nop
293 293
294 .align 2 294 .align 2
295.L_ebss:
296 .long _ebss
297.L_init_thread_union: 295.L_init_thread_union:
298 .long init_thread_union 296 .long init_thread_union
299.Lpanic: 297.Lpanic:
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 0dc1f5786081..11c6c9603e71 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -502,12 +502,12 @@ SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality)
502{ 502{
503 int ret; 503 int ret;
504 504
505 if (current->personality == PER_LINUX32 && 505 if (personality(current->personality) == PER_LINUX32 &&
506 personality == PER_LINUX) 506 personality(personality) == PER_LINUX)
507 personality = PER_LINUX32; 507 personality |= PER_LINUX32;
508 ret = sys_personality(personality); 508 ret = sys_personality(personality);
509 if (ret == PER_LINUX32) 509 if (personality(ret) == PER_LINUX32)
510 ret = PER_LINUX; 510 ret &= ~PER_LINUX32;
511 511
512 return ret; 512 return ret;
513} 513}
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 6026fdd1b2ed..d58edf5fefdb 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2020,6 +2020,9 @@ EXPORT_SYMBOL(_PAGE_CACHE);
2020#ifdef CONFIG_SPARSEMEM_VMEMMAP 2020#ifdef CONFIG_SPARSEMEM_VMEMMAP
2021unsigned long vmemmap_table[VMEMMAP_SIZE]; 2021unsigned long vmemmap_table[VMEMMAP_SIZE];
2022 2022
2023static long __meminitdata addr_start, addr_end;
2024static int __meminitdata node_start;
2025
2023int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) 2026int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node)
2024{ 2027{
2025 unsigned long vstart = (unsigned long) start; 2028 unsigned long vstart = (unsigned long) start;
@@ -2050,15 +2053,30 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node)
2050 2053
2051 *vmem_pp = pte_base | __pa(block); 2054 *vmem_pp = pte_base | __pa(block);
2052 2055
2053 printk(KERN_INFO "[%p-%p] page_structs=%lu " 2056 /* check to see if we have contiguous blocks */
2054 "node=%d entry=%lu/%lu\n", start, block, nr, 2057 if (addr_end != addr || node_start != node) {
2055 node, 2058 if (addr_start)
2056 addr >> VMEMMAP_CHUNK_SHIFT, 2059 printk(KERN_DEBUG " [%lx-%lx] on node %d\n",
2057 VMEMMAP_SIZE); 2060 addr_start, addr_end-1, node_start);
2061 addr_start = addr;
2062 node_start = node;
2063 }
2064 addr_end = addr + VMEMMAP_CHUNK;
2058 } 2065 }
2059 } 2066 }
2060 return 0; 2067 return 0;
2061} 2068}
2069
2070void __meminit vmemmap_populate_print_last(void)
2071{
2072 if (addr_start) {
2073 printk(KERN_DEBUG " [%lx-%lx] on node %d\n",
2074 addr_start, addr_end-1, node_start);
2075 addr_start = 0;
2076 addr_end = 0;
2077 node_start = 0;
2078 }
2079}
2062#endif /* CONFIG_SPARSEMEM_VMEMMAP */ 2080#endif /* CONFIG_SPARSEMEM_VMEMMAP */
2063 2081
2064static void prot_init_common(unsigned long page_none, 2082static void prot_init_common(unsigned long page_none,
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ba2657c49217..8ec3a1aa4abd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1527,7 +1527,7 @@ config SECCOMP
1527 If unsure, say Y. Only embedded should say N here. 1527 If unsure, say Y. Only embedded should say N here.
1528 1528
1529config CC_STACKPROTECTOR 1529config CC_STACKPROTECTOR
1530 bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" 1530 bool "Enable -fstack-protector buffer overflow detection"
1531 ---help--- 1531 ---help---
1532 This option turns on the -fstack-protector GCC feature. This 1532 This option turns on the -fstack-protector GCC feature. This
1533 feature puts, at the beginning of functions, a canary value on 1533 feature puts, at the beginning of functions, a canary value on
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 441520e4174f..a3ac52b29cbf 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -33,6 +33,14 @@
33#define MCI_STATUS_PCC (1ULL<<57) /* processor context corrupt */ 33#define MCI_STATUS_PCC (1ULL<<57) /* processor context corrupt */
34#define MCI_STATUS_S (1ULL<<56) /* Signaled machine check */ 34#define MCI_STATUS_S (1ULL<<56) /* Signaled machine check */
35#define MCI_STATUS_AR (1ULL<<55) /* Action required */ 35#define MCI_STATUS_AR (1ULL<<55) /* Action required */
36#define MCACOD 0xffff /* MCA Error Code */
37
38/* Architecturally defined codes from SDM Vol. 3B Chapter 15 */
39#define MCACOD_SCRUB 0x00C0 /* 0xC0-0xCF Memory Scrubbing */
40#define MCACOD_SCRUBMSK 0xfff0
41#define MCACOD_L3WB 0x017A /* L3 Explicit Writeback */
42#define MCACOD_DATA 0x0134 /* Data Load */
43#define MCACOD_INSTR 0x0150 /* Instruction Fetch */
36 44
37/* MCi_MISC register defines */ 45/* MCi_MISC register defines */
38#define MCI_MISC_ADDR_LSB(m) ((m) & 0x3f) 46#define MCI_MISC_ADDR_LSB(m) ((m) & 0x3f)
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index dab39350e51e..cb4e43bce98a 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -196,11 +196,16 @@ static inline u32 get_ibs_caps(void) { return 0; }
196extern void perf_events_lapic_init(void); 196extern void perf_events_lapic_init(void);
197 197
198/* 198/*
199 * Abuse bit 3 of the cpu eflags register to indicate proper PEBS IP fixups. 199 * Abuse bits {3,5} of the cpu eflags register. These flags are otherwise
200 * This flag is otherwise unused and ABI specified to be 0, so nobody should 200 * unused and ABI specified to be 0, so nobody should care what we do with
201 * care what we do with it. 201 * them.
202 *
203 * EXACT - the IP points to the exact instruction that triggered the
204 * event (HW bugs exempt).
205 * VM - original X86_VM_MASK; see set_linear_ip().
202 */ 206 */
203#define PERF_EFLAGS_EXACT (1UL << 3) 207#define PERF_EFLAGS_EXACT (1UL << 3)
208#define PERF_EFLAGS_VM (1UL << 5)
204 209
205struct pt_regs; 210struct pt_regs;
206extern unsigned long perf_instruction_pointer(struct pt_regs *regs); 211extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 95bf99de9058..1b8e5a03d942 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -25,10 +25,6 @@ unsigned long acpi_realmode_flags;
25static char temp_stack[4096]; 25static char temp_stack[4096];
26#endif 26#endif
27 27
28asmlinkage void acpi_enter_s3(void)
29{
30 acpi_enter_sleep_state(3, wake_sleep_flags);
31}
32/** 28/**
33 * acpi_suspend_lowlevel - save kernel state 29 * acpi_suspend_lowlevel - save kernel state
34 * 30 *
diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
index 5653a5791ec9..67f59f8c6956 100644
--- a/arch/x86/kernel/acpi/sleep.h
+++ b/arch/x86/kernel/acpi/sleep.h
@@ -2,7 +2,6 @@
2 * Variables and functions used by the code in sleep.c 2 * Variables and functions used by the code in sleep.c
3 */ 3 */
4 4
5#include <linux/linkage.h>
6#include <asm/realmode.h> 5#include <asm/realmode.h>
7 6
8extern unsigned long saved_video_mode; 7extern unsigned long saved_video_mode;
@@ -11,7 +10,6 @@ extern long saved_magic;
11extern int wakeup_pmode_return; 10extern int wakeup_pmode_return;
12 11
13extern u8 wake_sleep_flags; 12extern u8 wake_sleep_flags;
14extern asmlinkage void acpi_enter_s3(void);
15 13
16extern unsigned long acpi_copy_wakeup_routine(unsigned long); 14extern unsigned long acpi_copy_wakeup_routine(unsigned long);
17extern void wakeup_long64(void); 15extern void wakeup_long64(void);
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
index 72610839f03b..13ab720573e3 100644
--- a/arch/x86/kernel/acpi/wakeup_32.S
+++ b/arch/x86/kernel/acpi/wakeup_32.S
@@ -74,7 +74,9 @@ restore_registers:
74ENTRY(do_suspend_lowlevel) 74ENTRY(do_suspend_lowlevel)
75 call save_processor_state 75 call save_processor_state
76 call save_registers 76 call save_registers
77 call acpi_enter_s3 77 pushl $3
78 call acpi_enter_sleep_state
79 addl $4, %esp
78 80
79# In case of S3 failure, we'll emerge here. Jump 81# In case of S3 failure, we'll emerge here. Jump
80# to ret_point to recover 82# to ret_point to recover
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
index 014d1d28c397..8ea5164cbd04 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -71,7 +71,9 @@ ENTRY(do_suspend_lowlevel)
71 movq %rsi, saved_rsi 71 movq %rsi, saved_rsi
72 72
73 addq $8, %rsp 73 addq $8, %rsp
74 call acpi_enter_s3 74 movl $3, %edi
75 xorl %eax, %eax
76 call acpi_enter_sleep_state
75 /* in case something went wrong, restore the machine status and go on */ 77 /* in case something went wrong, restore the machine status and go on */
76 jmp resume_point 78 jmp resume_point
77 79
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 931280ff8299..afb7ff79a29f 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -224,7 +224,7 @@ void __init arch_init_ideal_nops(void)
224 ideal_nops = intel_nops; 224 ideal_nops = intel_nops;
225#endif 225#endif
226 } 226 }
227 227 break;
228 default: 228 default:
229#ifdef CONFIG_X86_64 229#ifdef CONFIG_X86_64
230 ideal_nops = k8_nops; 230 ideal_nops = k8_nops;
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 406eee784684..a6c64aaddf9a 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1204,7 +1204,7 @@ static void __clear_irq_vector(int irq, struct irq_cfg *cfg)
1204 BUG_ON(!cfg->vector); 1204 BUG_ON(!cfg->vector);
1205 1205
1206 vector = cfg->vector; 1206 vector = cfg->vector;
1207 for_each_cpu(cpu, cfg->domain) 1207 for_each_cpu_and(cpu, cfg->domain, cpu_online_mask)
1208 per_cpu(vector_irq, cpu)[vector] = -1; 1208 per_cpu(vector_irq, cpu)[vector] = -1;
1209 1209
1210 cfg->vector = 0; 1210 cfg->vector = 0;
@@ -1212,7 +1212,7 @@ static void __clear_irq_vector(int irq, struct irq_cfg *cfg)
1212 1212
1213 if (likely(!cfg->move_in_progress)) 1213 if (likely(!cfg->move_in_progress))
1214 return; 1214 return;
1215 for_each_cpu(cpu, cfg->old_domain) { 1215 for_each_cpu_and(cpu, cfg->old_domain, cpu_online_mask) {
1216 for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; 1216 for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS;
1217 vector++) { 1217 vector++) {
1218 if (per_cpu(vector_irq, cpu)[vector] != irq) 1218 if (per_cpu(vector_irq, cpu)[vector] != irq)
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index 413c2ced887c..13017626f9a8 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -55,13 +55,6 @@ static struct severity {
55#define MCI_UC_S (MCI_STATUS_UC|MCI_STATUS_S) 55#define MCI_UC_S (MCI_STATUS_UC|MCI_STATUS_S)
56#define MCI_UC_SAR (MCI_STATUS_UC|MCI_STATUS_S|MCI_STATUS_AR) 56#define MCI_UC_SAR (MCI_STATUS_UC|MCI_STATUS_S|MCI_STATUS_AR)
57#define MCI_ADDR (MCI_STATUS_ADDRV|MCI_STATUS_MISCV) 57#define MCI_ADDR (MCI_STATUS_ADDRV|MCI_STATUS_MISCV)
58#define MCACOD 0xffff
59/* Architecturally defined codes from SDM Vol. 3B Chapter 15 */
60#define MCACOD_SCRUB 0x00C0 /* 0xC0-0xCF Memory Scrubbing */
61#define MCACOD_SCRUBMSK 0xfff0
62#define MCACOD_L3WB 0x017A /* L3 Explicit Writeback */
63#define MCACOD_DATA 0x0134 /* Data Load */
64#define MCACOD_INSTR 0x0150 /* Instruction Fetch */
65 58
66 MCESEV( 59 MCESEV(
67 NO, "Invalid", 60 NO, "Invalid",
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 5e095f873e3e..292d0258311c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -103,6 +103,8 @@ DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = {
103 103
104static DEFINE_PER_CPU(struct work_struct, mce_work); 104static DEFINE_PER_CPU(struct work_struct, mce_work);
105 105
106static void (*quirk_no_way_out)(int bank, struct mce *m, struct pt_regs *regs);
107
106/* 108/*
107 * CPU/chipset specific EDAC code can register a notifier call here to print 109 * CPU/chipset specific EDAC code can register a notifier call here to print
108 * MCE errors in a human-readable form. 110 * MCE errors in a human-readable form.
@@ -650,14 +652,18 @@ EXPORT_SYMBOL_GPL(machine_check_poll);
650 * Do a quick check if any of the events requires a panic. 652 * Do a quick check if any of the events requires a panic.
651 * This decides if we keep the events around or clear them. 653 * This decides if we keep the events around or clear them.
652 */ 654 */
653static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp) 655static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
656 struct pt_regs *regs)
654{ 657{
655 int i, ret = 0; 658 int i, ret = 0;
656 659
657 for (i = 0; i < banks; i++) { 660 for (i = 0; i < banks; i++) {
658 m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i)); 661 m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
659 if (m->status & MCI_STATUS_VAL) 662 if (m->status & MCI_STATUS_VAL) {
660 __set_bit(i, validp); 663 __set_bit(i, validp);
664 if (quirk_no_way_out)
665 quirk_no_way_out(i, m, regs);
666 }
661 if (mce_severity(m, tolerant, msg) >= MCE_PANIC_SEVERITY) 667 if (mce_severity(m, tolerant, msg) >= MCE_PANIC_SEVERITY)
662 ret = 1; 668 ret = 1;
663 } 669 }
@@ -1040,7 +1046,7 @@ void do_machine_check(struct pt_regs *regs, long error_code)
1040 *final = m; 1046 *final = m;
1041 1047
1042 memset(valid_banks, 0, sizeof(valid_banks)); 1048 memset(valid_banks, 0, sizeof(valid_banks));
1043 no_way_out = mce_no_way_out(&m, &msg, valid_banks); 1049 no_way_out = mce_no_way_out(&m, &msg, valid_banks, regs);
1044 1050
1045 barrier(); 1051 barrier();
1046 1052
@@ -1418,6 +1424,34 @@ static void __mcheck_cpu_init_generic(void)
1418 } 1424 }
1419} 1425}
1420 1426
1427/*
1428 * During IFU recovery Sandy Bridge -EP4S processors set the RIPV and
1429 * EIPV bits in MCG_STATUS to zero on the affected logical processor (SDM
1430 * Vol 3B Table 15-20). But this confuses both the code that determines
1431 * whether the machine check occurred in kernel or user mode, and also
1432 * the severity assessment code. Pretend that EIPV was set, and take the
1433 * ip/cs values from the pt_regs that mce_gather_info() ignored earlier.
1434 */
1435static void quirk_sandybridge_ifu(int bank, struct mce *m, struct pt_regs *regs)
1436{
1437 if (bank != 0)
1438 return;
1439 if ((m->mcgstatus & (MCG_STATUS_EIPV|MCG_STATUS_RIPV)) != 0)
1440 return;
1441 if ((m->status & (MCI_STATUS_OVER|MCI_STATUS_UC|
1442 MCI_STATUS_EN|MCI_STATUS_MISCV|MCI_STATUS_ADDRV|
1443 MCI_STATUS_PCC|MCI_STATUS_S|MCI_STATUS_AR|
1444 MCACOD)) !=
1445 (MCI_STATUS_UC|MCI_STATUS_EN|
1446 MCI_STATUS_MISCV|MCI_STATUS_ADDRV|MCI_STATUS_S|
1447 MCI_STATUS_AR|MCACOD_INSTR))
1448 return;
1449
1450 m->mcgstatus |= MCG_STATUS_EIPV;
1451 m->ip = regs->ip;
1452 m->cs = regs->cs;
1453}
1454
1421/* Add per CPU specific workarounds here */ 1455/* Add per CPU specific workarounds here */
1422static int __cpuinit __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c) 1456static int __cpuinit __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
1423{ 1457{
@@ -1515,6 +1549,9 @@ static int __cpuinit __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
1515 */ 1549 */
1516 if (c->x86 == 6 && c->x86_model <= 13 && mce_bootlog < 0) 1550 if (c->x86 == 6 && c->x86_model <= 13 && mce_bootlog < 0)
1517 mce_bootlog = 0; 1551 mce_bootlog = 0;
1552
1553 if (c->x86 == 6 && c->x86_model == 45)
1554 quirk_no_way_out = quirk_sandybridge_ifu;
1518 } 1555 }
1519 if (monarch_timeout < 0) 1556 if (monarch_timeout < 0)
1520 monarch_timeout = 0; 1557 monarch_timeout = 0;
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 29557aa06dda..915b876edd1e 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -32,6 +32,8 @@
32#include <asm/smp.h> 32#include <asm/smp.h>
33#include <asm/alternative.h> 33#include <asm/alternative.h>
34#include <asm/timer.h> 34#include <asm/timer.h>
35#include <asm/desc.h>
36#include <asm/ldt.h>
35 37
36#include "perf_event.h" 38#include "perf_event.h"
37 39
@@ -1738,6 +1740,29 @@ valid_user_frame(const void __user *fp, unsigned long size)
1738 return (__range_not_ok(fp, size, TASK_SIZE) == 0); 1740 return (__range_not_ok(fp, size, TASK_SIZE) == 0);
1739} 1741}
1740 1742
1743static unsigned long get_segment_base(unsigned int segment)
1744{
1745 struct desc_struct *desc;
1746 int idx = segment >> 3;
1747
1748 if ((segment & SEGMENT_TI_MASK) == SEGMENT_LDT) {
1749 if (idx > LDT_ENTRIES)
1750 return 0;
1751
1752 if (idx > current->active_mm->context.size)
1753 return 0;
1754
1755 desc = current->active_mm->context.ldt;
1756 } else {
1757 if (idx > GDT_ENTRIES)
1758 return 0;
1759
1760 desc = __this_cpu_ptr(&gdt_page.gdt[0]);
1761 }
1762
1763 return get_desc_base(desc + idx);
1764}
1765
1741#ifdef CONFIG_COMPAT 1766#ifdef CONFIG_COMPAT
1742 1767
1743#include <asm/compat.h> 1768#include <asm/compat.h>
@@ -1746,13 +1771,17 @@ static inline int
1746perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) 1771perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry)
1747{ 1772{
1748 /* 32-bit process in 64-bit kernel. */ 1773 /* 32-bit process in 64-bit kernel. */
1774 unsigned long ss_base, cs_base;
1749 struct stack_frame_ia32 frame; 1775 struct stack_frame_ia32 frame;
1750 const void __user *fp; 1776 const void __user *fp;
1751 1777
1752 if (!test_thread_flag(TIF_IA32)) 1778 if (!test_thread_flag(TIF_IA32))
1753 return 0; 1779 return 0;
1754 1780
1755 fp = compat_ptr(regs->bp); 1781 cs_base = get_segment_base(regs->cs);
1782 ss_base = get_segment_base(regs->ss);
1783
1784 fp = compat_ptr(ss_base + regs->bp);
1756 while (entry->nr < PERF_MAX_STACK_DEPTH) { 1785 while (entry->nr < PERF_MAX_STACK_DEPTH) {
1757 unsigned long bytes; 1786 unsigned long bytes;
1758 frame.next_frame = 0; 1787 frame.next_frame = 0;
@@ -1765,8 +1794,8 @@ perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry)
1765 if (!valid_user_frame(fp, sizeof(frame))) 1794 if (!valid_user_frame(fp, sizeof(frame)))
1766 break; 1795 break;
1767 1796
1768 perf_callchain_store(entry, frame.return_address); 1797 perf_callchain_store(entry, cs_base + frame.return_address);
1769 fp = compat_ptr(frame.next_frame); 1798 fp = compat_ptr(ss_base + frame.next_frame);
1770 } 1799 }
1771 return 1; 1800 return 1;
1772} 1801}
@@ -1789,6 +1818,12 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
1789 return; 1818 return;
1790 } 1819 }
1791 1820
1821 /*
1822 * We don't know what to do with VM86 stacks.. ignore them for now.
1823 */
1824 if (regs->flags & (X86_VM_MASK | PERF_EFLAGS_VM))
1825 return;
1826
1792 fp = (void __user *)regs->bp; 1827 fp = (void __user *)regs->bp;
1793 1828
1794 perf_callchain_store(entry, regs->ip); 1829 perf_callchain_store(entry, regs->ip);
@@ -1816,16 +1851,50 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
1816 } 1851 }
1817} 1852}
1818 1853
1819unsigned long perf_instruction_pointer(struct pt_regs *regs) 1854/*
1855 * Deal with code segment offsets for the various execution modes:
1856 *
1857 * VM86 - the good olde 16 bit days, where the linear address is
1858 * 20 bits and we use regs->ip + 0x10 * regs->cs.
1859 *
1860 * IA32 - Where we need to look at GDT/LDT segment descriptor tables
1861 * to figure out what the 32bit base address is.
1862 *
1863 * X32 - has TIF_X32 set, but is running in x86_64
1864 *
1865 * X86_64 - CS,DS,SS,ES are all zero based.
1866 */
1867static unsigned long code_segment_base(struct pt_regs *regs)
1820{ 1868{
1821 unsigned long ip; 1869 /*
1870 * If we are in VM86 mode, add the segment offset to convert to a
1871 * linear address.
1872 */
1873 if (regs->flags & X86_VM_MASK)
1874 return 0x10 * regs->cs;
1875
1876 /*
1877 * For IA32 we look at the GDT/LDT segment base to convert the
1878 * effective IP to a linear address.
1879 */
1880#ifdef CONFIG_X86_32
1881 if (user_mode(regs) && regs->cs != __USER_CS)
1882 return get_segment_base(regs->cs);
1883#else
1884 if (test_thread_flag(TIF_IA32)) {
1885 if (user_mode(regs) && regs->cs != __USER32_CS)
1886 return get_segment_base(regs->cs);
1887 }
1888#endif
1889 return 0;
1890}
1822 1891
1892unsigned long perf_instruction_pointer(struct pt_regs *regs)
1893{
1823 if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) 1894 if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
1824 ip = perf_guest_cbs->get_guest_ip(); 1895 return perf_guest_cbs->get_guest_ip();
1825 else
1826 ip = instruction_pointer(regs);
1827 1896
1828 return ip; 1897 return regs->ip + code_segment_base(regs);
1829} 1898}
1830 1899
1831unsigned long perf_misc_flags(struct pt_regs *regs) 1900unsigned long perf_misc_flags(struct pt_regs *regs)
@@ -1838,7 +1907,7 @@ unsigned long perf_misc_flags(struct pt_regs *regs)
1838 else 1907 else
1839 misc |= PERF_RECORD_MISC_GUEST_KERNEL; 1908 misc |= PERF_RECORD_MISC_GUEST_KERNEL;
1840 } else { 1909 } else {
1841 if (!kernel_ip(regs->ip)) 1910 if (user_mode(regs))
1842 misc |= PERF_RECORD_MISC_USER; 1911 misc |= PERF_RECORD_MISC_USER;
1843 else 1912 else
1844 misc |= PERF_RECORD_MISC_KERNEL; 1913 misc |= PERF_RECORD_MISC_KERNEL;
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
index 821d53b696d1..6605a81ba339 100644
--- a/arch/x86/kernel/cpu/perf_event.h
+++ b/arch/x86/kernel/cpu/perf_event.h
@@ -516,6 +516,26 @@ static inline bool kernel_ip(unsigned long ip)
516#endif 516#endif
517} 517}
518 518
519/*
520 * Not all PMUs provide the right context information to place the reported IP
521 * into full context. Specifically segment registers are typically not
522 * supplied.
523 *
524 * Assuming the address is a linear address (it is for IBS), we fake the CS and
525 * vm86 mode using the known zero-based code segment and 'fix up' the registers
526 * to reflect this.
527 *
528 * Intel PEBS/LBR appear to typically provide the effective address, nothing
529 * much we can do about that but pray and treat it like a linear address.
530 */
531static inline void set_linear_ip(struct pt_regs *regs, unsigned long ip)
532{
533 regs->cs = kernel_ip(ip) ? __KERNEL_CS : __USER_CS;
534 if (regs->flags & X86_VM_MASK)
535 regs->flags ^= (PERF_EFLAGS_VM | X86_VM_MASK);
536 regs->ip = ip;
537}
538
519#ifdef CONFIG_CPU_SUP_AMD 539#ifdef CONFIG_CPU_SUP_AMD
520 540
521int amd_pmu_init(void); 541int amd_pmu_init(void);
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
index da9bcdcd9856..7bfb5bec8630 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
@@ -13,6 +13,8 @@
13 13
14#include <asm/apic.h> 14#include <asm/apic.h>
15 15
16#include "perf_event.h"
17
16static u32 ibs_caps; 18static u32 ibs_caps;
17 19
18#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_AMD) 20#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_AMD)
@@ -536,7 +538,7 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
536 if (check_rip && (ibs_data.regs[2] & IBS_RIP_INVALID)) { 538 if (check_rip && (ibs_data.regs[2] & IBS_RIP_INVALID)) {
537 regs.flags &= ~PERF_EFLAGS_EXACT; 539 regs.flags &= ~PERF_EFLAGS_EXACT;
538 } else { 540 } else {
539 instruction_pointer_set(&regs, ibs_data.regs[1]); 541 set_linear_ip(&regs, ibs_data.regs[1]);
540 regs.flags |= PERF_EFLAGS_EXACT; 542 regs.flags |= PERF_EFLAGS_EXACT;
541 } 543 }
542 544
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c
index 629ae0b7ad90..e38d97bf4259 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
@@ -499,7 +499,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
499 * We sampled a branch insn, rewind using the LBR stack 499 * We sampled a branch insn, rewind using the LBR stack
500 */ 500 */
501 if (ip == to) { 501 if (ip == to) {
502 regs->ip = from; 502 set_linear_ip(regs, from);
503 return 1; 503 return 1;
504 } 504 }
505 505
@@ -529,7 +529,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
529 } while (to < ip); 529 } while (to < ip);
530 530
531 if (to == ip) { 531 if (to == ip) {
532 regs->ip = old_to; 532 set_linear_ip(regs, old_to);
533 return 1; 533 return 1;
534 } 534 }
535 535
@@ -569,7 +569,8 @@ static void __intel_pmu_pebs_event(struct perf_event *event,
569 * A possible PERF_SAMPLE_REGS will have to transfer all regs. 569 * A possible PERF_SAMPLE_REGS will have to transfer all regs.
570 */ 570 */
571 regs = *iregs; 571 regs = *iregs;
572 regs.ip = pebs->ip; 572 regs.flags = pebs->flags;
573 set_linear_ip(&regs, pebs->ip);
573 regs.bp = pebs->bp; 574 regs.bp = pebs->bp;
574 regs.sp = pebs->sp; 575 regs.sp = pebs->sp;
575 576
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
index f3851892e077..c9e5dc56630a 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
@@ -5,7 +5,7 @@
5#include "perf_event.h" 5#include "perf_event.h"
6 6
7#define UNCORE_PMU_NAME_LEN 32 7#define UNCORE_PMU_NAME_LEN 32
8#define UNCORE_PMU_HRTIMER_INTERVAL (60 * NSEC_PER_SEC) 8#define UNCORE_PMU_HRTIMER_INTERVAL (60LL * NSEC_PER_SEC)
9 9
10#define UNCORE_FIXED_EVENT 0xff 10#define UNCORE_FIXED_EVENT 0xff
11#define UNCORE_PMC_IDX_MAX_GENERIC 8 11#define UNCORE_PMC_IDX_MAX_GENERIC 8
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 1f5f1d5d2a02..7ad683d78645 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -328,6 +328,7 @@ void fixup_irqs(void)
328 chip->irq_retrigger(data); 328 chip->irq_retrigger(data);
329 raw_spin_unlock(&desc->lock); 329 raw_spin_unlock(&desc->lock);
330 } 330 }
331 __this_cpu_write(vector_irq[vector], -1);
331 } 332 }
332} 333}
333#endif 334#endif
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c
index 1d5d31ea686b..dc1404bf8e4b 100644
--- a/arch/x86/kernel/kdebugfs.c
+++ b/arch/x86/kernel/kdebugfs.c
@@ -107,7 +107,7 @@ static int __init create_setup_data_nodes(struct dentry *parent)
107{ 107{
108 struct setup_data_node *node; 108 struct setup_data_node *node;
109 struct setup_data *data; 109 struct setup_data *data;
110 int error = -ENOMEM; 110 int error;
111 struct dentry *d; 111 struct dentry *d;
112 struct page *pg; 112 struct page *pg;
113 u64 pa_data; 113 u64 pa_data;
@@ -121,8 +121,10 @@ static int __init create_setup_data_nodes(struct dentry *parent)
121 121
122 while (pa_data) { 122 while (pa_data) {
123 node = kmalloc(sizeof(*node), GFP_KERNEL); 123 node = kmalloc(sizeof(*node), GFP_KERNEL);
124 if (!node) 124 if (!node) {
125 error = -ENOMEM;
125 goto err_dir; 126 goto err_dir;
127 }
126 128
127 pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT); 129 pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT);
128 if (PageHighMem(pg)) { 130 if (PageHighMem(pg)) {
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index 1df8fb9e1d5d..e498b18f010c 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -316,6 +316,11 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val)
316 addr &= 1; 316 addr &= 1;
317 if (addr == 0) { 317 if (addr == 0) {
318 if (val & 0x10) { 318 if (val & 0x10) {
319 u8 edge_irr = s->irr & ~s->elcr;
320 int i;
321 bool found;
322 struct kvm_vcpu *vcpu;
323
319 s->init4 = val & 1; 324 s->init4 = val & 1;
320 s->last_irr = 0; 325 s->last_irr = 0;
321 s->irr &= s->elcr; 326 s->irr &= s->elcr;
@@ -333,6 +338,18 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val)
333 if (val & 0x08) 338 if (val & 0x08)
334 pr_pic_unimpl( 339 pr_pic_unimpl(
335 "level sensitive irq not supported"); 340 "level sensitive irq not supported");
341
342 kvm_for_each_vcpu(i, vcpu, s->pics_state->kvm)
343 if (kvm_apic_accept_pic_intr(vcpu)) {
344 found = true;
345 break;
346 }
347
348
349 if (found)
350 for (irq = 0; irq < PIC_NUM_PINS/2; irq++)
351 if (edge_irr & (1 << irq))
352 pic_clear_isr(s, irq);
336 } else if (val & 0x08) { 353 } else if (val & 0x08) {
337 if (val & 0x04) 354 if (val & 0x04)
338 s->poll = 1; 355 s->poll = 1;
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c39b60707e02..c00f03de1b79 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1488,13 +1488,6 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx)
1488 loadsegment(ds, vmx->host_state.ds_sel); 1488 loadsegment(ds, vmx->host_state.ds_sel);
1489 loadsegment(es, vmx->host_state.es_sel); 1489 loadsegment(es, vmx->host_state.es_sel);
1490 } 1490 }
1491#else
1492 /*
1493 * The sysexit path does not restore ds/es, so we must set them to
1494 * a reasonable value ourselves.
1495 */
1496 loadsegment(ds, __USER_DS);
1497 loadsegment(es, __USER_DS);
1498#endif 1491#endif
1499 reload_tss(); 1492 reload_tss();
1500#ifdef CONFIG_X86_64 1493#ifdef CONFIG_X86_64
@@ -6370,6 +6363,19 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
6370#endif 6363#endif
6371 ); 6364 );
6372 6365
6366#ifndef CONFIG_X86_64
6367 /*
6368 * The sysexit path does not restore ds/es, so we must set them to
6369 * a reasonable value ourselves.
6370 *
6371 * We can't defer this to vmx_load_host_state() since that function
6372 * may be executed in interrupt context, which saves and restore segments
6373 * around it, nullifying its effect.
6374 */
6375 loadsegment(ds, __USER_DS);
6376 loadsegment(es, __USER_DS);
6377#endif
6378
6373 vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP) 6379 vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP)
6374 | (1 << VCPU_EXREG_RFLAGS) 6380 | (1 << VCPU_EXREG_RFLAGS)
6375 | (1 << VCPU_EXREG_CPL) 6381 | (1 << VCPU_EXREG_CPL)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 59b59508ff07..42bce48f6928 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -925,6 +925,10 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
925 */ 925 */
926 getboottime(&boot); 926 getboottime(&boot);
927 927
928 if (kvm->arch.kvmclock_offset) {
929 struct timespec ts = ns_to_timespec(kvm->arch.kvmclock_offset);
930 boot = timespec_sub(boot, ts);
931 }
928 wc.sec = boot.tv_sec; 932 wc.sec = boot.tv_sec;
929 wc.nsec = boot.tv_nsec; 933 wc.nsec = boot.tv_nsec;
930 wc.version = version; 934 wc.version = version;
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index 4599c3e8bcb6..4ddf497ca65b 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -142,23 +142,23 @@ static inline int save_add_info(void) {return 0;}
142#endif 142#endif
143 143
144/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ 144/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
145void __init 145int __init
146acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) 146acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
147{ 147{
148 u64 start, end; 148 u64 start, end;
149 int node, pxm; 149 int node, pxm;
150 150
151 if (srat_disabled()) 151 if (srat_disabled())
152 return; 152 return -1;
153 if (ma->header.length != sizeof(struct acpi_srat_mem_affinity)) { 153 if (ma->header.length != sizeof(struct acpi_srat_mem_affinity)) {
154 bad_srat(); 154 bad_srat();
155 return; 155 return -1;
156 } 156 }
157 if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0) 157 if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0)
158 return; 158 return -1;
159 159
160 if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) && !save_add_info()) 160 if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) && !save_add_info())
161 return; 161 return -1;
162 start = ma->base_address; 162 start = ma->base_address;
163 end = start + ma->length; 163 end = start + ma->length;
164 pxm = ma->proximity_domain; 164 pxm = ma->proximity_domain;
@@ -168,12 +168,12 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
168 if (node < 0) { 168 if (node < 0) {
169 printk(KERN_ERR "SRAT: Too many proximity domains.\n"); 169 printk(KERN_ERR "SRAT: Too many proximity domains.\n");
170 bad_srat(); 170 bad_srat();
171 return; 171 return -1;
172 } 172 }
173 173
174 if (numa_add_memblk(node, start, end) < 0) { 174 if (numa_add_memblk(node, start, end) < 0) {
175 bad_srat(); 175 bad_srat();
176 return; 176 return -1;
177 } 177 }
178 178
179 node_set(node, numa_nodes_parsed); 179 node_set(node, numa_nodes_parsed);
@@ -181,6 +181,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
181 printk(KERN_INFO "SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n", 181 printk(KERN_INFO "SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n",
182 node, pxm, 182 node, pxm,
183 (unsigned long long) start, (unsigned long long) end - 1); 183 (unsigned long long) start, (unsigned long long) end - 1);
184 return 0;
184} 185}
185 186
186void __init acpi_numa_arch_fixup(void) {} 187void __init acpi_numa_arch_fixup(void) {}
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl
index 51171aeff0dc..29aed7ac2c02 100644
--- a/arch/x86/syscalls/syscall_64.tbl
+++ b/arch/x86/syscalls/syscall_64.tbl
@@ -318,7 +318,7 @@
318309 common getcpu sys_getcpu 318309 common getcpu sys_getcpu
319310 64 process_vm_readv sys_process_vm_readv 319310 64 process_vm_readv sys_process_vm_readv
320311 64 process_vm_writev sys_process_vm_writev 320311 64 process_vm_writev sys_process_vm_writev
321312 64 kcmp sys_kcmp 321312 common kcmp sys_kcmp
322 322
323# 323#
324# x32-specific system call numbers start at 512 to avoid cache impact 324# x32-specific system call numbers start at 512 to avoid cache impact
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 64effdc6da94..b2e91d40a4cb 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -194,6 +194,11 @@ RESERVE_BRK(p2m_mid_mfn, PAGE_SIZE * (MAX_DOMAIN_PAGES / (P2M_PER_PAGE * P2M_MID
194 * boundary violation will require three middle nodes. */ 194 * boundary violation will require three middle nodes. */
195RESERVE_BRK(p2m_mid_identity, PAGE_SIZE * 2 * 3); 195RESERVE_BRK(p2m_mid_identity, PAGE_SIZE * 2 * 3);
196 196
197/* When we populate back during bootup, the amount of pages can vary. The
198 * max we have is seen is 395979, but that does not mean it can't be more.
199 * But some machines can have 3GB I/O holes even. So lets reserve enough
200 * for 4GB of I/O and E820 holes. */
201RESERVE_BRK(p2m_populated, PMD_SIZE * 4);
197static inline unsigned p2m_top_index(unsigned long pfn) 202static inline unsigned p2m_top_index(unsigned long pfn)
198{ 203{
199 BUG_ON(pfn >= MAX_P2M_PFN); 204 BUG_ON(pfn >= MAX_P2M_PFN);