diff options
Diffstat (limited to 'arch')
133 files changed, 1105 insertions, 412 deletions
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index d069526bd767..60c83abfde70 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h | |||
@@ -37,6 +37,7 @@ struct thread_info { | |||
37 | .task = &tsk, \ | 37 | .task = &tsk, \ |
38 | .exec_domain = &default_exec_domain, \ | 38 | .exec_domain = &default_exec_domain, \ |
39 | .addr_limit = KERNEL_DS, \ | 39 | .addr_limit = KERNEL_DS, \ |
40 | .preempt_count = INIT_PREEMPT_COUNT, \ | ||
40 | .restart_block = { \ | 41 | .restart_block = { \ |
41 | .fn = do_no_restart_syscall, \ | 42 | .fn = do_no_restart_syscall, \ |
42 | }, \ | 43 | }, \ |
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 1e9ad52c460e..e072041d19f8 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
11 | #include <linux/smp_lock.h> | ||
12 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
13 | #include <linux/ptrace.h> | 12 | #include <linux/ptrace.h> |
14 | #include <linux/user.h> | 13 | #include <linux/user.h> |
diff --git a/arch/arm/configs/u300_defconfig b/arch/arm/configs/u300_defconfig index 4762d9001298..7d61ae6e75da 100644 --- a/arch/arm/configs/u300_defconfig +++ b/arch/arm/configs/u300_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.31-rc1 | 3 | # Linux kernel version: 2.6.31-rc3 |
4 | # Thu Jul 2 00:16:59 2009 | 4 | # Thu Jul 16 23:36:10 2009 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
@@ -9,7 +9,6 @@ CONFIG_GENERIC_GPIO=y | |||
9 | CONFIG_GENERIC_TIME=y | 9 | CONFIG_GENERIC_TIME=y |
10 | CONFIG_GENERIC_CLOCKEVENTS=y | 10 | CONFIG_GENERIC_CLOCKEVENTS=y |
11 | CONFIG_MMU=y | 11 | CONFIG_MMU=y |
12 | CONFIG_HAVE_TCM=y | ||
13 | CONFIG_GENERIC_HARDIRQS=y | 12 | CONFIG_GENERIC_HARDIRQS=y |
14 | CONFIG_STACKTRACE_SUPPORT=y | 13 | CONFIG_STACKTRACE_SUPPORT=y |
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | 14 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y |
@@ -113,7 +112,7 @@ CONFIG_MODULE_UNLOAD=y | |||
113 | # CONFIG_MODVERSIONS is not set | 112 | # CONFIG_MODVERSIONS is not set |
114 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 113 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
115 | CONFIG_BLOCK=y | 114 | CONFIG_BLOCK=y |
116 | CONFIG_LBDAF=y | 115 | # CONFIG_LBDAF is not set |
117 | # CONFIG_BLK_DEV_BSG is not set | 116 | # CONFIG_BLK_DEV_BSG is not set |
118 | # CONFIG_BLK_DEV_INTEGRITY is not set | 117 | # CONFIG_BLK_DEV_INTEGRITY is not set |
119 | 118 | ||
@@ -542,13 +541,14 @@ CONFIG_INPUT_EVDEV=y | |||
542 | # | 541 | # |
543 | CONFIG_INPUT_KEYBOARD=y | 542 | CONFIG_INPUT_KEYBOARD=y |
544 | # CONFIG_KEYBOARD_ATKBD is not set | 543 | # CONFIG_KEYBOARD_ATKBD is not set |
545 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
546 | # CONFIG_KEYBOARD_LKKBD is not set | 544 | # CONFIG_KEYBOARD_LKKBD is not set |
547 | # CONFIG_KEYBOARD_XTKBD is not set | 545 | # CONFIG_KEYBOARD_GPIO is not set |
546 | # CONFIG_KEYBOARD_MATRIX is not set | ||
547 | # CONFIG_KEYBOARD_LM8323 is not set | ||
548 | # CONFIG_KEYBOARD_NEWTON is not set | 548 | # CONFIG_KEYBOARD_NEWTON is not set |
549 | # CONFIG_KEYBOARD_STOWAWAY is not set | 549 | # CONFIG_KEYBOARD_STOWAWAY is not set |
550 | # CONFIG_KEYBOARD_LM8323 is not set | 550 | # CONFIG_KEYBOARD_SUNKBD is not set |
551 | # CONFIG_KEYBOARD_GPIO is not set | 551 | # CONFIG_KEYBOARD_XTKBD is not set |
552 | # CONFIG_INPUT_MOUSE is not set | 552 | # CONFIG_INPUT_MOUSE is not set |
553 | # CONFIG_INPUT_JOYSTICK is not set | 553 | # CONFIG_INPUT_JOYSTICK is not set |
554 | # CONFIG_INPUT_TABLET is not set | 554 | # CONFIG_INPUT_TABLET is not set |
@@ -911,7 +911,6 @@ CONFIG_REGULATOR=y | |||
911 | # CONFIG_JFS_FS is not set | 911 | # CONFIG_JFS_FS is not set |
912 | # CONFIG_FS_POSIX_ACL is not set | 912 | # CONFIG_FS_POSIX_ACL is not set |
913 | # CONFIG_XFS_FS is not set | 913 | # CONFIG_XFS_FS is not set |
914 | # CONFIG_GFS2_FS is not set | ||
915 | # CONFIG_OCFS2_FS is not set | 914 | # CONFIG_OCFS2_FS is not set |
916 | # CONFIG_BTRFS_FS is not set | 915 | # CONFIG_BTRFS_FS is not set |
917 | CONFIG_FILE_LOCKING=y | 916 | CONFIG_FILE_LOCKING=y |
@@ -1122,7 +1121,6 @@ CONFIG_GENERIC_FIND_LAST_BIT=y | |||
1122 | # CONFIG_CRC32 is not set | 1121 | # CONFIG_CRC32 is not set |
1123 | # CONFIG_CRC7 is not set | 1122 | # CONFIG_CRC7 is not set |
1124 | # CONFIG_LIBCRC32C is not set | 1123 | # CONFIG_LIBCRC32C is not set |
1125 | CONFIG_GENERIC_ALLOCATOR=y | ||
1126 | CONFIG_HAS_IOMEM=y | 1124 | CONFIG_HAS_IOMEM=y |
1127 | CONFIG_HAS_IOPORT=y | 1125 | CONFIG_HAS_IOPORT=y |
1128 | CONFIG_HAS_DMA=y | 1126 | CONFIG_HAS_DMA=y |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 4f8848260ee2..73394e50cbca 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -73,7 +73,7 @@ struct thread_info { | |||
73 | .task = &tsk, \ | 73 | .task = &tsk, \ |
74 | .exec_domain = &default_exec_domain, \ | 74 | .exec_domain = &default_exec_domain, \ |
75 | .flags = 0, \ | 75 | .flags = 0, \ |
76 | .preempt_count = 1, \ | 76 | .preempt_count = INIT_PREEMPT_COUNT, \ |
77 | .addr_limit = KERNEL_DS, \ | 77 | .addr_limit = KERNEL_DS, \ |
78 | .cpu_domain = domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ | 78 | .cpu_domain = domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ |
79 | domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ | 79 | domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ |
diff --git a/arch/arm/mach-ep93xx/dma-m2p.c b/arch/arm/mach-ep93xx/dma-m2p.c index a2df5bb7dff0..dbcac9c40a28 100644 --- a/arch/arm/mach-ep93xx/dma-m2p.c +++ b/arch/arm/mach-ep93xx/dma-m2p.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/err.h> | 33 | #include <linux/err.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/io.h> | ||
36 | 37 | ||
37 | #include <mach/dma.h> | 38 | #include <mach/dma.h> |
38 | #include <mach/hardware.h> | 39 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-kirkwood/mpp.h b/arch/arm/mach-kirkwood/mpp.h index e021a80c2caf..bc74278ed311 100644 --- a/arch/arm/mach-kirkwood/mpp.h +++ b/arch/arm/mach-kirkwood/mpp.h | |||
@@ -289,7 +289,7 @@ | |||
289 | 289 | ||
290 | #define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1 ) | 290 | #define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1 ) |
291 | #define MPP48_TSMP12 MPP( 48, 0x1, 1, 1, 0, 0, 0, 1 ) | 291 | #define MPP48_TSMP12 MPP( 48, 0x1, 1, 1, 0, 0, 0, 1 ) |
292 | #define MPP48_TDM_DTX MPP( 48. 0x2, 0, 1, 0, 0, 0, 1 ) | 292 | #define MPP48_TDM_DTX MPP( 48, 0x2, 0, 1, 0, 0, 0, 1 ) |
293 | 293 | ||
294 | #define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1 ) | 294 | #define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1 ) |
295 | #define MPP49_TSMP9 MPP( 49, 0x1, 1, 1, 0, 0, 0, 1 ) | 295 | #define MPP49_TSMP9 MPP( 49, 0x1, 1, 1, 0, 0, 0, 1 ) |
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 17a21a291e2f..851f2458bf65 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -36,6 +36,14 @@ config MACH_PCM037 | |||
36 | Include support for Phytec pcm037 platform. This includes | 36 | Include support for Phytec pcm037 platform. This includes |
37 | specific configurations for the board and its peripherals. | 37 | specific configurations for the board and its peripherals. |
38 | 38 | ||
39 | config MACH_PCM037_EET | ||
40 | bool "Support pcm037 EET board extensions" | ||
41 | depends on MACH_PCM037 | ||
42 | help | ||
43 | Add support for PCM037 EET baseboard extensions. If you are using the | ||
44 | OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel | ||
45 | command-line parameter. | ||
46 | |||
39 | config MACH_MX31LITE | 47 | config MACH_MX31LITE |
40 | bool "Support MX31 LITEKIT (LogicPD)" | 48 | bool "Support MX31 LITEKIT (LogicPD)" |
41 | select ARCH_MX31 | 49 | select ARCH_MX31 |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 0322696bd11a..6b9775471be6 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o | |||
11 | obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o | 11 | obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o |
12 | obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o | 12 | obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o |
13 | obj-$(CONFIG_MACH_PCM037) += pcm037.o | 13 | obj-$(CONFIG_MACH_PCM037) += pcm037.o |
14 | obj-$(CONFIG_MACH_PCM037_EET) += pcm037_eet.o | ||
14 | obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o | 15 | obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o |
15 | obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ | 16 | obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ |
16 | mx31moboard-marxbot.o | 17 | mx31moboard-marxbot.o |
diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c index 541181090b37..ee331fd6b1bd 100644 --- a/arch/arm/mach-mx3/armadillo5x0.c +++ b/arch/arm/mach-mx3/armadillo5x0.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/mtd/physmap.h> | ||
35 | #include <linux/io.h> | ||
34 | 36 | ||
35 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
36 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
@@ -46,8 +48,10 @@ | |||
46 | #include <mach/mmc.h> | 48 | #include <mach/mmc.h> |
47 | #include <mach/ipu.h> | 49 | #include <mach/ipu.h> |
48 | #include <mach/mx3fb.h> | 50 | #include <mach/mx3fb.h> |
51 | #include <mach/mxc_nand.h> | ||
49 | 52 | ||
50 | #include "devices.h" | 53 | #include "devices.h" |
54 | #include "crm_regs.h" | ||
51 | 55 | ||
52 | static int armadillo5x0_pins[] = { | 56 | static int armadillo5x0_pins[] = { |
53 | /* UART1 */ | 57 | /* UART1 */ |
@@ -93,7 +97,56 @@ static int armadillo5x0_pins[] = { | |||
93 | MX31_PIN_FPSHIFT__FPSHIFT, | 97 | MX31_PIN_FPSHIFT__FPSHIFT, |
94 | MX31_PIN_DRDY0__DRDY0, | 98 | MX31_PIN_DRDY0__DRDY0, |
95 | IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ | 99 | IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ |
100 | }; | ||
96 | 101 | ||
102 | /* | ||
103 | * NAND Flash | ||
104 | */ | ||
105 | static struct mxc_nand_platform_data armadillo5x0_nand_flash_pdata = { | ||
106 | .width = 1, | ||
107 | .hw_ecc = 1, | ||
108 | }; | ||
109 | |||
110 | /* | ||
111 | * MTD NOR Flash | ||
112 | */ | ||
113 | static struct mtd_partition armadillo5x0_nor_flash_partitions[] = { | ||
114 | { | ||
115 | .name = "nor.bootloader", | ||
116 | .offset = 0x00000000, | ||
117 | .size = 4*32*1024, | ||
118 | }, { | ||
119 | .name = "nor.kernel", | ||
120 | .offset = MTDPART_OFS_APPEND, | ||
121 | .size = 16*128*1024, | ||
122 | }, { | ||
123 | .name = "nor.userland", | ||
124 | .offset = MTDPART_OFS_APPEND, | ||
125 | .size = 110*128*1024, | ||
126 | }, { | ||
127 | .name = "nor.config", | ||
128 | .offset = MTDPART_OFS_APPEND, | ||
129 | .size = 1*128*1024, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { | ||
134 | .width = 2, | ||
135 | .parts = armadillo5x0_nor_flash_partitions, | ||
136 | .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), | ||
137 | }; | ||
138 | |||
139 | static struct resource armadillo5x0_nor_flash_resource = { | ||
140 | .flags = IORESOURCE_MEM, | ||
141 | .start = CS0_BASE_ADDR, | ||
142 | .end = CS0_BASE_ADDR + SZ_64M - 1, | ||
143 | }; | ||
144 | |||
145 | static struct platform_device armadillo5x0_nor_flash = { | ||
146 | .name = "physmap-flash", | ||
147 | .id = -1, | ||
148 | .num_resources = 1, | ||
149 | .resource = &armadillo5x0_nor_flash_resource, | ||
97 | }; | 150 | }; |
98 | 151 | ||
99 | /* | 152 | /* |
@@ -272,6 +325,16 @@ static void __init armadillo5x0_init(void) | |||
272 | /* Register FB */ | 325 | /* Register FB */ |
273 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 326 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
274 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 327 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
328 | |||
329 | /* Register NOR Flash */ | ||
330 | mxc_register_device(&armadillo5x0_nor_flash, | ||
331 | &armadillo5x0_nor_flash_pdata); | ||
332 | |||
333 | /* Register NAND Flash */ | ||
334 | mxc_register_device(&mxc_nand_device, &armadillo5x0_nand_flash_pdata); | ||
335 | |||
336 | /* set NAND page size to 2k if not configured via boot mode pins */ | ||
337 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); | ||
275 | } | 338 | } |
276 | 339 | ||
277 | static void __init armadillo5x0_timer_init(void) | 340 | static void __init armadillo5x0_timer_init(void) |
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index d927eddcad46..9e87e08fb121 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/serial.h> | 23 | #include <linux/serial.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/dma-mapping.h> | ||
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
27 | #include <mach/irqs.h> | 26 | #include <mach/irqs.h> |
28 | #include <mach/common.h> | 27 | #include <mach/common.h> |
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index c6f61a1f06c8..840cfda341d0 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | 21 | #include <linux/dma-mapping.h> | |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/mtd/plat-ram.h> | 24 | #include <linux/mtd/plat-ram.h> |
@@ -33,29 +33,67 @@ | |||
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/fsl_devices.h> | 34 | #include <linux/fsl_devices.h> |
35 | 35 | ||
36 | #include <mach/hardware.h> | 36 | #include <media/soc_camera.h> |
37 | |||
37 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
40 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
42 | #include <mach/board-pcm037.h> | ||
41 | #include <mach/common.h> | 43 | #include <mach/common.h> |
44 | #include <mach/hardware.h> | ||
45 | #include <mach/i2c.h> | ||
42 | #include <mach/imx-uart.h> | 46 | #include <mach/imx-uart.h> |
43 | #include <mach/iomux-mx3.h> | 47 | #include <mach/iomux-mx3.h> |
44 | #include <mach/ipu.h> | 48 | #include <mach/ipu.h> |
45 | #include <mach/board-pcm037.h> | 49 | #include <mach/mmc.h> |
50 | #include <mach/mx3_camera.h> | ||
46 | #include <mach/mx3fb.h> | 51 | #include <mach/mx3fb.h> |
47 | #include <mach/mxc_nand.h> | 52 | #include <mach/mxc_nand.h> |
48 | #include <mach/mmc.h> | ||
49 | #ifdef CONFIG_I2C_IMX | ||
50 | #include <mach/i2c.h> | ||
51 | #endif | ||
52 | 53 | ||
53 | #include "devices.h" | 54 | #include "devices.h" |
55 | #include "pcm037.h" | ||
56 | |||
57 | static enum pcm037_board_variant pcm037_instance = PCM037_PCM970; | ||
58 | |||
59 | static int __init pcm037_variant_setup(char *str) | ||
60 | { | ||
61 | if (!strcmp("eet", str)) | ||
62 | pcm037_instance = PCM037_EET; | ||
63 | else if (strcmp("pcm970", str)) | ||
64 | pr_warning("Unknown pcm037 baseboard variant %s\n", str); | ||
65 | |||
66 | return 1; | ||
67 | } | ||
68 | |||
69 | /* Supported values: "pcm970" (default) and "eet" */ | ||
70 | __setup("pcm037_variant=", pcm037_variant_setup); | ||
71 | |||
72 | enum pcm037_board_variant pcm037_variant(void) | ||
73 | { | ||
74 | return pcm037_instance; | ||
75 | } | ||
76 | |||
77 | /* UART1 with RTS/CTS handshake signals */ | ||
78 | static unsigned int pcm037_uart1_handshake_pins[] = { | ||
79 | MX31_PIN_CTS1__CTS1, | ||
80 | MX31_PIN_RTS1__RTS1, | ||
81 | MX31_PIN_TXD1__TXD1, | ||
82 | MX31_PIN_RXD1__RXD1, | ||
83 | }; | ||
84 | |||
85 | /* UART1 without RTS/CTS handshake signals */ | ||
86 | static unsigned int pcm037_uart1_pins[] = { | ||
87 | MX31_PIN_TXD1__TXD1, | ||
88 | MX31_PIN_RXD1__RXD1, | ||
89 | }; | ||
54 | 90 | ||
55 | static unsigned int pcm037_pins[] = { | 91 | static unsigned int pcm037_pins[] = { |
56 | /* I2C */ | 92 | /* I2C */ |
57 | MX31_PIN_CSPI2_MOSI__SCL, | 93 | MX31_PIN_CSPI2_MOSI__SCL, |
58 | MX31_PIN_CSPI2_MISO__SDA, | 94 | MX31_PIN_CSPI2_MISO__SDA, |
95 | MX31_PIN_CSPI2_SS2__I2C3_SDA, | ||
96 | MX31_PIN_CSPI2_SCLK__I2C3_SCL, | ||
59 | /* SDHC1 */ | 97 | /* SDHC1 */ |
60 | MX31_PIN_SD1_DATA3__SD1_DATA3, | 98 | MX31_PIN_SD1_DATA3__SD1_DATA3, |
61 | MX31_PIN_SD1_DATA2__SD1_DATA2, | 99 | MX31_PIN_SD1_DATA2__SD1_DATA2, |
@@ -73,11 +111,6 @@ static unsigned int pcm037_pins[] = { | |||
73 | MX31_PIN_CSPI1_SS0__SS0, | 111 | MX31_PIN_CSPI1_SS0__SS0, |
74 | MX31_PIN_CSPI1_SS1__SS1, | 112 | MX31_PIN_CSPI1_SS1__SS1, |
75 | MX31_PIN_CSPI1_SS2__SS2, | 113 | MX31_PIN_CSPI1_SS2__SS2, |
76 | /* UART1 */ | ||
77 | MX31_PIN_CTS1__CTS1, | ||
78 | MX31_PIN_RTS1__RTS1, | ||
79 | MX31_PIN_TXD1__TXD1, | ||
80 | MX31_PIN_RXD1__RXD1, | ||
81 | /* UART2 */ | 114 | /* UART2 */ |
82 | MX31_PIN_TXD2__TXD2, | 115 | MX31_PIN_TXD2__TXD2, |
83 | MX31_PIN_RXD2__RXD2, | 116 | MX31_PIN_RXD2__RXD2, |
@@ -120,6 +153,22 @@ static unsigned int pcm037_pins[] = { | |||
120 | MX31_PIN_D3_SPL__D3_SPL, | 153 | MX31_PIN_D3_SPL__D3_SPL, |
121 | MX31_PIN_D3_CLS__D3_CLS, | 154 | MX31_PIN_D3_CLS__D3_CLS, |
122 | MX31_PIN_LCS0__GPI03_23, | 155 | MX31_PIN_LCS0__GPI03_23, |
156 | /* CSI */ | ||
157 | IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_GPIO), | ||
158 | MX31_PIN_CSI_D6__CSI_D6, | ||
159 | MX31_PIN_CSI_D7__CSI_D7, | ||
160 | MX31_PIN_CSI_D8__CSI_D8, | ||
161 | MX31_PIN_CSI_D9__CSI_D9, | ||
162 | MX31_PIN_CSI_D10__CSI_D10, | ||
163 | MX31_PIN_CSI_D11__CSI_D11, | ||
164 | MX31_PIN_CSI_D12__CSI_D12, | ||
165 | MX31_PIN_CSI_D13__CSI_D13, | ||
166 | MX31_PIN_CSI_D14__CSI_D14, | ||
167 | MX31_PIN_CSI_D15__CSI_D15, | ||
168 | MX31_PIN_CSI_HSYNC__CSI_HSYNC, | ||
169 | MX31_PIN_CSI_MCLK__CSI_MCLK, | ||
170 | MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, | ||
171 | MX31_PIN_CSI_VSYNC__CSI_VSYNC, | ||
123 | }; | 172 | }; |
124 | 173 | ||
125 | static struct physmap_flash_data pcm037_flash_data = { | 174 | static struct physmap_flash_data pcm037_flash_data = { |
@@ -250,19 +299,43 @@ static struct mxc_nand_platform_data pcm037_nand_board_info = { | |||
250 | .hw_ecc = 1, | 299 | .hw_ecc = 1, |
251 | }; | 300 | }; |
252 | 301 | ||
253 | #ifdef CONFIG_I2C_IMX | ||
254 | static struct imxi2c_platform_data pcm037_i2c_1_data = { | 302 | static struct imxi2c_platform_data pcm037_i2c_1_data = { |
255 | .bitrate = 100000, | 303 | .bitrate = 100000, |
256 | }; | 304 | }; |
257 | 305 | ||
306 | static struct imxi2c_platform_data pcm037_i2c_2_data = { | ||
307 | .bitrate = 20000, | ||
308 | }; | ||
309 | |||
258 | static struct at24_platform_data board_eeprom = { | 310 | static struct at24_platform_data board_eeprom = { |
259 | .byte_len = 4096, | 311 | .byte_len = 4096, |
260 | .page_size = 32, | 312 | .page_size = 32, |
261 | .flags = AT24_FLAG_ADDR16, | 313 | .flags = AT24_FLAG_ADDR16, |
262 | }; | 314 | }; |
263 | 315 | ||
316 | static int pcm037_camera_power(struct device *dev, int on) | ||
317 | { | ||
318 | /* disable or enable the camera in X7 or X8 PCM970 connector */ | ||
319 | gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), !on); | ||
320 | return 0; | ||
321 | } | ||
322 | |||
323 | static struct i2c_board_info pcm037_i2c_2_devices[] = { | ||
324 | { | ||
325 | I2C_BOARD_INFO("mt9t031", 0x5d), | ||
326 | }, | ||
327 | }; | ||
328 | |||
329 | static struct soc_camera_link iclink = { | ||
330 | .bus_id = 0, /* Must match with the camera ID */ | ||
331 | .power = pcm037_camera_power, | ||
332 | .board_info = &pcm037_i2c_2_devices[0], | ||
333 | .i2c_adapter_id = 2, | ||
334 | .module_name = "mt9t031", | ||
335 | }; | ||
336 | |||
264 | static struct i2c_board_info pcm037_i2c_devices[] = { | 337 | static struct i2c_board_info pcm037_i2c_devices[] = { |
265 | { | 338 | { |
266 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ | 339 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ |
267 | .platform_data = &board_eeprom, | 340 | .platform_data = &board_eeprom, |
268 | }, { | 341 | }, { |
@@ -270,7 +343,14 @@ static struct i2c_board_info pcm037_i2c_devices[] = { | |||
270 | .type = "pcf8563", | 343 | .type = "pcf8563", |
271 | } | 344 | } |
272 | }; | 345 | }; |
273 | #endif | 346 | |
347 | static struct platform_device pcm037_camera = { | ||
348 | .name = "soc-camera-pdrv", | ||
349 | .id = 0, | ||
350 | .dev = { | ||
351 | .platform_data = &iclink, | ||
352 | }, | ||
353 | }; | ||
274 | 354 | ||
275 | /* Not connected by default */ | 355 | /* Not connected by default */ |
276 | #ifdef PCM970_SDHC_RW_SWITCH | 356 | #ifdef PCM970_SDHC_RW_SWITCH |
@@ -334,9 +414,41 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
334 | .exit = pcm970_sdhc1_exit, | 414 | .exit = pcm970_sdhc1_exit, |
335 | }; | 415 | }; |
336 | 416 | ||
417 | struct mx3_camera_pdata camera_pdata = { | ||
418 | .dma_dev = &mx3_ipu.dev, | ||
419 | .flags = MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10, | ||
420 | .mclk_10khz = 2000, | ||
421 | }; | ||
422 | |||
423 | static int __init pcm037_camera_alloc_dma(const size_t buf_size) | ||
424 | { | ||
425 | dma_addr_t dma_handle; | ||
426 | void *buf; | ||
427 | int dma; | ||
428 | |||
429 | if (buf_size < 2 * 1024 * 1024) | ||
430 | return -EINVAL; | ||
431 | |||
432 | buf = dma_alloc_coherent(NULL, buf_size, &dma_handle, GFP_KERNEL); | ||
433 | if (!buf) { | ||
434 | pr_err("%s: cannot allocate camera buffer-memory\n", __func__); | ||
435 | return -ENOMEM; | ||
436 | } | ||
437 | |||
438 | memset(buf, 0, buf_size); | ||
439 | |||
440 | dma = dma_declare_coherent_memory(&mx3_camera.dev, | ||
441 | dma_handle, dma_handle, buf_size, | ||
442 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); | ||
443 | |||
444 | /* The way we call dma_declare_coherent_memory only a malloc can fail */ | ||
445 | return dma & DMA_MEMORY_MAP ? 0 : -ENOMEM; | ||
446 | } | ||
447 | |||
337 | static struct platform_device *devices[] __initdata = { | 448 | static struct platform_device *devices[] __initdata = { |
338 | &pcm037_flash, | 449 | &pcm037_flash, |
339 | &pcm037_sram_device, | 450 | &pcm037_sram_device, |
451 | &pcm037_camera, | ||
340 | }; | 452 | }; |
341 | 453 | ||
342 | static struct ipu_platform_data mx3_ipu_data = { | 454 | static struct ipu_platform_data mx3_ipu_data = { |
@@ -377,6 +489,22 @@ static const struct fb_videomode fb_modedb[] = { | |||
377 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, | 489 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, |
378 | .vmode = FB_VMODE_NONINTERLACED, | 490 | .vmode = FB_VMODE_NONINTERLACED, |
379 | .flag = 0, | 491 | .flag = 0, |
492 | }, { | ||
493 | /* 240x320 @ 60 Hz */ | ||
494 | .name = "CMEL-OLED", | ||
495 | .refresh = 60, | ||
496 | .xres = 240, | ||
497 | .yres = 320, | ||
498 | .pixclock = 185925, | ||
499 | .left_margin = 9, | ||
500 | .right_margin = 16, | ||
501 | .upper_margin = 7, | ||
502 | .lower_margin = 9, | ||
503 | .hsync_len = 1, | ||
504 | .vsync_len = 1, | ||
505 | .sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT, | ||
506 | .vmode = FB_VMODE_NONINTERLACED, | ||
507 | .flag = 0, | ||
380 | }, | 508 | }, |
381 | }; | 509 | }; |
382 | 510 | ||
@@ -397,6 +525,14 @@ static void __init mxc_board_init(void) | |||
397 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), | 525 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), |
398 | "pcm037"); | 526 | "pcm037"); |
399 | 527 | ||
528 | if (pcm037_variant() == PCM037_EET) | ||
529 | mxc_iomux_setup_multiple_pins(pcm037_uart1_pins, | ||
530 | ARRAY_SIZE(pcm037_uart1_pins), "pcm037_uart1"); | ||
531 | else | ||
532 | mxc_iomux_setup_multiple_pins(pcm037_uart1_handshake_pins, | ||
533 | ARRAY_SIZE(pcm037_uart1_handshake_pins), | ||
534 | "pcm037_uart1"); | ||
535 | |||
400 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 536 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
401 | 537 | ||
402 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 538 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
@@ -415,18 +551,30 @@ static void __init mxc_board_init(void) | |||
415 | } | 551 | } |
416 | 552 | ||
417 | 553 | ||
418 | #ifdef CONFIG_I2C_IMX | 554 | /* I2C adapters and devices */ |
419 | i2c_register_board_info(1, pcm037_i2c_devices, | 555 | i2c_register_board_info(1, pcm037_i2c_devices, |
420 | ARRAY_SIZE(pcm037_i2c_devices)); | 556 | ARRAY_SIZE(pcm037_i2c_devices)); |
421 | 557 | ||
422 | mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); | 558 | mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); |
423 | #endif | 559 | mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); |
560 | |||
424 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 561 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); |
425 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 562 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); |
426 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 563 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
427 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 564 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
428 | if (!gpio_usbotg_hs_activate()) | 565 | if (!gpio_usbotg_hs_activate()) |
429 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 566 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); |
567 | |||
568 | /* CSI */ | ||
569 | /* Camera power: default - off */ | ||
570 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), "mt9t031-power"); | ||
571 | if (!ret) | ||
572 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1); | ||
573 | else | ||
574 | iclink.power = NULL; | ||
575 | |||
576 | if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) | ||
577 | mxc_register_device(&mx3_camera, &camera_pdata); | ||
430 | } | 578 | } |
431 | 579 | ||
432 | static void __init pcm037_timer_init(void) | 580 | static void __init pcm037_timer_init(void) |
@@ -448,4 +596,3 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") | |||
448 | .init_machine = mxc_board_init, | 596 | .init_machine = mxc_board_init, |
449 | .timer = &pcm037_timer, | 597 | .timer = &pcm037_timer, |
450 | MACHINE_END | 598 | MACHINE_END |
451 | |||
diff --git a/arch/arm/mach-mx3/pcm037.h b/arch/arm/mach-mx3/pcm037.h new file mode 100644 index 000000000000..d6929721a5fd --- /dev/null +++ b/arch/arm/mach-mx3/pcm037.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef __PCM037_H__ | ||
2 | #define __PCM037_H__ | ||
3 | |||
4 | enum pcm037_board_variant { | ||
5 | PCM037_PCM970, | ||
6 | PCM037_EET, | ||
7 | }; | ||
8 | |||
9 | extern enum pcm037_board_variant pcm037_variant(void); | ||
10 | |||
11 | #endif | ||
diff --git a/arch/arm/mach-mx3/pcm037_eet.c b/arch/arm/mach-mx3/pcm037_eet.c new file mode 100644 index 000000000000..fe52fb1bb8b7 --- /dev/null +++ b/arch/arm/mach-mx3/pcm037_eet.c | |||
@@ -0,0 +1,204 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 | ||
3 | * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/gpio.h> | ||
10 | #include <linux/gpio_keys.h> | ||
11 | #include <linux/input.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | #include <linux/spi/spi.h> | ||
14 | |||
15 | #include <mach/common.h> | ||
16 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
17 | #include <mach/spi.h> | ||
18 | #endif | ||
19 | #include <mach/iomux-mx3.h> | ||
20 | |||
21 | #include <asm/mach-types.h> | ||
22 | |||
23 | #include "pcm037.h" | ||
24 | #include "devices.h" | ||
25 | |||
26 | static unsigned int pcm037_eet_pins[] = { | ||
27 | /* SPI #1 */ | ||
28 | MX31_PIN_CSPI1_MISO__MISO, | ||
29 | MX31_PIN_CSPI1_MOSI__MOSI, | ||
30 | MX31_PIN_CSPI1_SCLK__SCLK, | ||
31 | MX31_PIN_CSPI1_SPI_RDY__SPI_RDY, | ||
32 | MX31_PIN_CSPI1_SS0__SS0, | ||
33 | MX31_PIN_CSPI1_SS1__SS1, | ||
34 | MX31_PIN_CSPI1_SS2__SS2, | ||
35 | |||
36 | /* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */ | ||
37 | IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_GPIO), | ||
38 | /* GPIO keys */ | ||
39 | IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO), /* 0 */ | ||
40 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), /* 1 */ | ||
41 | IOMUX_MODE(MX31_PIN_GPIO1_2, IOMUX_CONFIG_GPIO), /* 2 */ | ||
42 | IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO), /* 3 */ | ||
43 | IOMUX_MODE(MX31_PIN_SVEN0, IOMUX_CONFIG_GPIO), /* 32 */ | ||
44 | IOMUX_MODE(MX31_PIN_STX0, IOMUX_CONFIG_GPIO), /* 33 */ | ||
45 | IOMUX_MODE(MX31_PIN_SRX0, IOMUX_CONFIG_GPIO), /* 34 */ | ||
46 | IOMUX_MODE(MX31_PIN_SIMPD0, IOMUX_CONFIG_GPIO), /* 35 */ | ||
47 | IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_GPIO), /* 38 */ | ||
48 | IOMUX_MODE(MX31_PIN_CTS1, IOMUX_CONFIG_GPIO), /* 39 */ | ||
49 | IOMUX_MODE(MX31_PIN_KEY_ROW4, IOMUX_CONFIG_GPIO), /* 50 */ | ||
50 | IOMUX_MODE(MX31_PIN_KEY_ROW5, IOMUX_CONFIG_GPIO), /* 51 */ | ||
51 | IOMUX_MODE(MX31_PIN_KEY_ROW6, IOMUX_CONFIG_GPIO), /* 52 */ | ||
52 | IOMUX_MODE(MX31_PIN_KEY_ROW7, IOMUX_CONFIG_GPIO), /* 53 */ | ||
53 | |||
54 | /* LEDs */ | ||
55 | IOMUX_MODE(MX31_PIN_DTR_DTE1, IOMUX_CONFIG_GPIO), /* 44 */ | ||
56 | IOMUX_MODE(MX31_PIN_DSR_DTE1, IOMUX_CONFIG_GPIO), /* 45 */ | ||
57 | IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_GPIO), /* 55 */ | ||
58 | IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_GPIO), /* 56 */ | ||
59 | }; | ||
60 | |||
61 | /* SPI */ | ||
62 | static struct spi_board_info pcm037_spi_dev[] = { | ||
63 | { | ||
64 | .modalias = "dac124s085", | ||
65 | .max_speed_hz = 400000, | ||
66 | .bus_num = 0, | ||
67 | .chip_select = 0, /* Index in pcm037_spi1_cs[] */ | ||
68 | .mode = SPI_CPHA, | ||
69 | }, | ||
70 | }; | ||
71 | |||
72 | /* Platform Data for MXC CSPI */ | ||
73 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
74 | static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; | ||
75 | |||
76 | struct spi_imx_master pcm037_spi1_master = { | ||
77 | .chipselect = pcm037_spi1_cs, | ||
78 | .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), | ||
79 | }; | ||
80 | #endif | ||
81 | |||
82 | /* GPIO-keys input device */ | ||
83 | static struct gpio_keys_button pcm037_gpio_keys[] = { | ||
84 | { | ||
85 | .type = EV_KEY, | ||
86 | .code = KEY_L, | ||
87 | .gpio = 0, | ||
88 | .desc = "Wheel Manual", | ||
89 | .wakeup = 0, | ||
90 | }, { | ||
91 | .type = EV_KEY, | ||
92 | .code = KEY_A, | ||
93 | .gpio = 1, | ||
94 | .desc = "Wheel AF", | ||
95 | .wakeup = 0, | ||
96 | }, { | ||
97 | .type = EV_KEY, | ||
98 | .code = KEY_V, | ||
99 | .gpio = 2, | ||
100 | .desc = "Wheel View", | ||
101 | .wakeup = 0, | ||
102 | }, { | ||
103 | .type = EV_KEY, | ||
104 | .code = KEY_M, | ||
105 | .gpio = 3, | ||
106 | .desc = "Wheel Menu", | ||
107 | .wakeup = 0, | ||
108 | }, { | ||
109 | .type = EV_KEY, | ||
110 | .code = KEY_UP, | ||
111 | .gpio = 32, | ||
112 | .desc = "Nav Pad Up", | ||
113 | .wakeup = 0, | ||
114 | }, { | ||
115 | .type = EV_KEY, | ||
116 | .code = KEY_RIGHT, | ||
117 | .gpio = 33, | ||
118 | .desc = "Nav Pad Right", | ||
119 | .wakeup = 0, | ||
120 | }, { | ||
121 | .type = EV_KEY, | ||
122 | .code = KEY_DOWN, | ||
123 | .gpio = 34, | ||
124 | .desc = "Nav Pad Down", | ||
125 | .wakeup = 0, | ||
126 | }, { | ||
127 | .type = EV_KEY, | ||
128 | .code = KEY_LEFT, | ||
129 | .gpio = 35, | ||
130 | .desc = "Nav Pad Left", | ||
131 | .wakeup = 0, | ||
132 | }, { | ||
133 | .type = EV_KEY, | ||
134 | .code = KEY_ENTER, | ||
135 | .gpio = 38, | ||
136 | .desc = "Nav Pad Ok", | ||
137 | .wakeup = 0, | ||
138 | }, { | ||
139 | .type = EV_KEY, | ||
140 | .code = KEY_O, | ||
141 | .gpio = 39, | ||
142 | .desc = "Wheel Off", | ||
143 | .wakeup = 0, | ||
144 | }, { | ||
145 | .type = EV_KEY, | ||
146 | .code = BTN_FORWARD, | ||
147 | .gpio = 50, | ||
148 | .desc = "Focus Forward", | ||
149 | .wakeup = 0, | ||
150 | }, { | ||
151 | .type = EV_KEY, | ||
152 | .code = BTN_BACK, | ||
153 | .gpio = 51, | ||
154 | .desc = "Focus Backward", | ||
155 | .wakeup = 0, | ||
156 | }, { | ||
157 | .type = EV_KEY, | ||
158 | .code = BTN_MIDDLE, | ||
159 | .gpio = 52, | ||
160 | .desc = "Release Half", | ||
161 | .wakeup = 0, | ||
162 | }, { | ||
163 | .type = EV_KEY, | ||
164 | .code = BTN_EXTRA, | ||
165 | .gpio = 53, | ||
166 | .desc = "Release Full", | ||
167 | .wakeup = 0, | ||
168 | }, | ||
169 | }; | ||
170 | |||
171 | static struct gpio_keys_platform_data pcm037_gpio_keys_platform_data = { | ||
172 | .buttons = pcm037_gpio_keys, | ||
173 | .nbuttons = ARRAY_SIZE(pcm037_gpio_keys), | ||
174 | .rep = 0, /* No auto-repeat */ | ||
175 | }; | ||
176 | |||
177 | static struct platform_device pcm037_gpio_keys_device = { | ||
178 | .name = "gpio-keys", | ||
179 | .id = -1, | ||
180 | .dev = { | ||
181 | .platform_data = &pcm037_gpio_keys_platform_data, | ||
182 | }, | ||
183 | }; | ||
184 | |||
185 | static int eet_init_devices(void) | ||
186 | { | ||
187 | if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) | ||
188 | return 0; | ||
189 | |||
190 | mxc_iomux_setup_multiple_pins(pcm037_eet_pins, | ||
191 | ARRAY_SIZE(pcm037_eet_pins), "pcm037_eet"); | ||
192 | |||
193 | /* SPI */ | ||
194 | spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); | ||
195 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
196 | mxc_register_device(&mxc_spi_device0, &pcm037_spi1_master); | ||
197 | #endif | ||
198 | |||
199 | platform_device_register(&pcm037_gpio_keys_device); | ||
200 | |||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | late_initcall(eet_init_devices); | ||
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa300.h b/arch/arm/mach-pxa/include/mach/mfp-pxa300.h index ae8441192ef0..7139e0dc26d1 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa300.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa300.h | |||
@@ -567,9 +567,9 @@ | |||
567 | #define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3) | 567 | #define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3) |
568 | #define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1) | 568 | #define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1) |
569 | 569 | ||
570 | #define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, MFP_AF0, MFP_DS01X) | 570 | #define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, AF0, DS01X) |
571 | #define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, MFP_AF0, MFP_DS01X) | 571 | #define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, AF0, DS01X) |
572 | #define ULPI_STP MFP_CFG_DRV(ULPI_STP, MFP_AF0, MFP_DS01X) | 572 | #define ULPI_STP MFP_CFG_DRV(ULPI_STP, AF0, DS01X) |
573 | #endif /* CONFIG_CPU_PXA310 */ | 573 | #endif /* CONFIG_CPU_PXA310 */ |
574 | 574 | ||
575 | #endif /* __ASM_ARCH_MFP_PXA300_H */ | 575 | #endif /* __ASM_ARCH_MFP_PXA300_H */ |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 6f678d93bf4e..09b7b1a10cad 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -250,7 +250,7 @@ static DEFINE_PXA3_CKEN(pxa3xx_mmc2, MMC2, 19500000, 0); | |||
250 | static struct clk_lookup pxa3xx_clkregs[] = { | 250 | static struct clk_lookup pxa3xx_clkregs[] = { |
251 | INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"), | 251 | INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"), |
252 | /* Power I2C clock is always on */ | 252 | /* Power I2C clock is always on */ |
253 | INIT_CLKREG(&clk_dummy, "pxa2xx-i2c.1", NULL), | 253 | INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL), |
254 | INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL), | 254 | INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL), |
255 | INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"), | 255 | INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"), |
256 | INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"), | 256 | INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"), |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 9ea9c05093cd..facbd49eec67 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -208,8 +208,7 @@ struct platform_device realview_i2c_device = { | |||
208 | 208 | ||
209 | static struct i2c_board_info realview_i2c_board_info[] = { | 209 | static struct i2c_board_info realview_i2c_board_info[] = { |
210 | { | 210 | { |
211 | I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1), | 211 | I2C_BOARD_INFO("ds1338", 0xd0 >> 1), |
212 | .type = "ds1338", | ||
213 | }, | 212 | }, |
214 | }; | 213 | }; |
215 | 214 | ||
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 89b3ccf35e1b..7936085dd758 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -455,8 +455,8 @@ void __init u300_init_irq(void) | |||
455 | for (i = 0; i < NR_IRQS; i++) | 455 | for (i = 0; i < NR_IRQS; i++) |
456 | set_bit(i, (unsigned long *) &mask[0]); | 456 | set_bit(i, (unsigned long *) &mask[0]); |
457 | u300_enable_intcon_clock(); | 457 | u300_enable_intcon_clock(); |
458 | vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], 0); | 458 | vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]); |
459 | vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], 0); | 459 | vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]); |
460 | } | 460 | } |
461 | 461 | ||
462 | 462 | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 69214fc8bd19..31093af7d052 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -342,8 +342,7 @@ static struct platform_device versatile_i2c_device = { | |||
342 | 342 | ||
343 | static struct i2c_board_info versatile_i2c_board_info[] = { | 343 | static struct i2c_board_info versatile_i2c_board_info[] = { |
344 | { | 344 | { |
345 | I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1), | 345 | I2C_BOARD_INFO("ds1338", 0xd0 >> 1), |
346 | .type = "ds1338", | ||
347 | }, | 346 | }, |
348 | }; | 347 | }; |
349 | 348 | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h index 27f8d1b2bc6b..2eb182f73876 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h | |||
@@ -602,6 +602,8 @@ enum iomux_pins { | |||
602 | #define MX31_PIN_I2C_DAT__SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) | 602 | #define MX31_PIN_I2C_DAT__SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) |
603 | #define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) | 603 | #define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) |
604 | #define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) | 604 | #define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) |
605 | #define MX31_PIN_CSPI2_SS2__I2C3_SDA IOMUX_MODE(MX31_PIN_CSPI2_SS2, IOMUX_CONFIG_ALT1) | ||
606 | #define MX31_PIN_CSPI2_SCLK__I2C3_SCL IOMUX_MODE(MX31_PIN_CSPI2_SCLK, IOMUX_CONFIG_ALT1) | ||
605 | #define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC) | 607 | #define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC) |
606 | #define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC) | 608 | #define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC) |
607 | #define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC) | 609 | #define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC) |
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c index abc79d44acaa..98548c6903a0 100644 --- a/arch/arm/plat-pxa/gpio.c +++ b/arch/arm/plat-pxa/gpio.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/sysdev.h> | 18 | #include <linux/sysdev.h> |
19 | #include <linux/bootmem.h> | 19 | #include <linux/slab.h> |
20 | 20 | ||
21 | #include <mach/gpio.h> | 21 | #include <mach/gpio.h> |
22 | 22 | ||
@@ -112,17 +112,12 @@ static int __init pxa_init_gpio_chip(int gpio_end) | |||
112 | int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1; | 112 | int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1; |
113 | struct pxa_gpio_chip *chips; | 113 | struct pxa_gpio_chip *chips; |
114 | 114 | ||
115 | /* this is early, we have to use bootmem allocator, and we really | 115 | chips = kzalloc(nbanks * sizeof(struct pxa_gpio_chip), GFP_KERNEL); |
116 | * want this to be allocated dynamically for different 'gpio_end' | ||
117 | */ | ||
118 | chips = alloc_bootmem_low(nbanks * sizeof(struct pxa_gpio_chip)); | ||
119 | if (chips == NULL) { | 116 | if (chips == NULL) { |
120 | pr_err("%s: failed to allocate GPIO chips\n", __func__); | 117 | pr_err("%s: failed to allocate GPIO chips\n", __func__); |
121 | return -ENOMEM; | 118 | return -ENOMEM; |
122 | } | 119 | } |
123 | 120 | ||
124 | memset(chips, 0, nbanks * sizeof(struct pxa_gpio_chip)); | ||
125 | |||
126 | for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) { | 121 | for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) { |
127 | struct gpio_chip *c = &chips[i].chip; | 122 | struct gpio_chip *c = &chips[i].chip; |
128 | 123 | ||
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h index 4442f8d2d423..fc42de5ca209 100644 --- a/arch/avr32/include/asm/thread_info.h +++ b/arch/avr32/include/asm/thread_info.h | |||
@@ -40,7 +40,7 @@ struct thread_info { | |||
40 | .exec_domain = &default_exec_domain, \ | 40 | .exec_domain = &default_exec_domain, \ |
41 | .flags = 0, \ | 41 | .flags = 0, \ |
42 | .cpu = 0, \ | 42 | .cpu = 0, \ |
43 | .preempt_count = 1, \ | 43 | .preempt_count = INIT_PREEMPT_COUNT, \ |
44 | .restart_block = { \ | 44 | .restart_block = { \ |
45 | .fn = do_no_restart_syscall \ | 45 | .fn = do_no_restart_syscall \ |
46 | } \ | 46 | } \ |
diff --git a/arch/blackfin/include/asm/context.S b/arch/blackfin/include/asm/context.S index 16561ab18b38..f8a664f022b1 100644 --- a/arch/blackfin/include/asm/context.S +++ b/arch/blackfin/include/asm/context.S | |||
@@ -223,9 +223,10 @@ | |||
223 | [--sp] = RETN; | 223 | [--sp] = RETN; |
224 | [--sp] = RETE; | 224 | [--sp] = RETE; |
225 | [--sp] = SEQSTAT; | 225 | [--sp] = SEQSTAT; |
226 | #ifdef CONFIG_KGDB | 226 | #ifdef CONFIG_DEBUG_KERNEL |
227 | r1.l = lo(IPEND); | 227 | p1.l = lo(IPEND); |
228 | r1.h = hi(IPEND); | 228 | p1.h = hi(IPEND); |
229 | r1 = [p1]; | ||
229 | [--sp] = r1; | 230 | [--sp] = r1; |
230 | #else | 231 | #else |
231 | [--sp] = r0; /* Skip IPEND as well. */ | 232 | [--sp] = r0; /* Skip IPEND as well. */ |
diff --git a/arch/blackfin/include/asm/cpu.h b/arch/blackfin/include/asm/cpu.h index 565b8136855e..fadfa82f93b2 100644 --- a/arch/blackfin/include/asm/cpu.h +++ b/arch/blackfin/include/asm/cpu.h | |||
@@ -32,7 +32,6 @@ struct blackfin_cpudata { | |||
32 | struct task_struct *idle; | 32 | struct task_struct *idle; |
33 | unsigned int imemctl; | 33 | unsigned int imemctl; |
34 | unsigned int dmemctl; | 34 | unsigned int dmemctl; |
35 | unsigned long loops_per_jiffy; | ||
36 | unsigned long dcache_invld_count; | 35 | unsigned long dcache_invld_count; |
37 | unsigned long icache_invld_count; | 36 | unsigned long icache_invld_count; |
38 | }; | 37 | }; |
diff --git a/arch/blackfin/include/asm/hardirq.h b/arch/blackfin/include/asm/hardirq.h index cbd52f86bb9f..0b78b873df51 100644 --- a/arch/blackfin/include/asm/hardirq.h +++ b/arch/blackfin/include/asm/hardirq.h | |||
@@ -6,6 +6,9 @@ | |||
6 | extern void ack_bad_irq(unsigned int irq); | 6 | extern void ack_bad_irq(unsigned int irq); |
7 | #define ack_bad_irq ack_bad_irq | 7 | #define ack_bad_irq ack_bad_irq |
8 | 8 | ||
9 | /* Define until common code gets sane defaults */ | ||
10 | #define HARDIRQ_BITS 9 | ||
11 | |||
9 | #include <asm-generic/hardirq.h> | 12 | #include <asm-generic/hardirq.h> |
10 | 13 | ||
11 | #endif | 14 | #endif |
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h index d0be99be8308..a36ad8dac068 100644 --- a/arch/blackfin/include/asm/processor.h +++ b/arch/blackfin/include/asm/processor.h | |||
@@ -105,23 +105,16 @@ static inline uint32_t __pure bfin_revid(void) | |||
105 | /* Always use CHIPID, to work around ANOMALY_05000234 */ | 105 | /* Always use CHIPID, to work around ANOMALY_05000234 */ |
106 | uint32_t revid = (bfin_read_CHIPID() & CHIPID_VERSION) >> 28; | 106 | uint32_t revid = (bfin_read_CHIPID() & CHIPID_VERSION) >> 28; |
107 | 107 | ||
108 | #ifdef CONFIG_BF52x | 108 | #ifdef _BOOTROM_GET_DXE_ADDRESS_TWI |
109 | /* ANOMALY_05000357 | 109 | /* |
110 | * ANOMALY_05000364 | ||
110 | * Incorrect Revision Number in DSPID Register | 111 | * Incorrect Revision Number in DSPID Register |
111 | */ | 112 | */ |
112 | if (revid == 0) | 113 | if (ANOMALY_05000364 && |
113 | switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) { | 114 | bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI) == 0x2796) |
114 | case 0x0010: | 115 | revid = 1; |
115 | revid = 0; | ||
116 | break; | ||
117 | case 0x2796: | ||
118 | revid = 1; | ||
119 | break; | ||
120 | default: | ||
121 | revid = 0xFFFF; | ||
122 | break; | ||
123 | } | ||
124 | #endif | 116 | #endif |
117 | |||
125 | return revid; | 118 | return revid; |
126 | } | 119 | } |
127 | 120 | ||
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h index 2920087516f2..2bbfdd950afc 100644 --- a/arch/blackfin/include/asm/thread_info.h +++ b/arch/blackfin/include/asm/thread_info.h | |||
@@ -77,7 +77,7 @@ struct thread_info { | |||
77 | .exec_domain = &default_exec_domain, \ | 77 | .exec_domain = &default_exec_domain, \ |
78 | .flags = 0, \ | 78 | .flags = 0, \ |
79 | .cpu = 0, \ | 79 | .cpu = 0, \ |
80 | .preempt_count = 1, \ | 80 | .preempt_count = INIT_PREEMPT_COUNT, \ |
81 | .restart_block = { \ | 81 | .restart_block = { \ |
82 | .fn = do_no_restart_syscall, \ | 82 | .fn = do_no_restart_syscall, \ |
83 | }, \ | 83 | }, \ |
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index e0bf8cc06907..9f9b82816652 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -253,32 +253,31 @@ void __init early_dma_memcpy(void *pdst, const void *psrc, size_t size) | |||
253 | BUG_ON(src % 4); | 253 | BUG_ON(src % 4); |
254 | BUG_ON(size % 4); | 254 | BUG_ON(size % 4); |
255 | 255 | ||
256 | /* Force a sync in case a previous config reset on this channel | ||
257 | * occurred. This is needed so subsequent writes to DMA registers | ||
258 | * are not spuriously lost/corrupted. | ||
259 | */ | ||
260 | __builtin_bfin_ssync(); | ||
261 | |||
262 | src_ch = 0; | 256 | src_ch = 0; |
263 | /* Find an avalible memDMA channel */ | 257 | /* Find an avalible memDMA channel */ |
264 | while (1) { | 258 | while (1) { |
265 | if (!src_ch || src_ch == (struct dma_register *)MDMA_S1_NEXT_DESC_PTR) { | 259 | if (src_ch == (struct dma_register *)MDMA_S0_NEXT_DESC_PTR) { |
266 | dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR; | ||
267 | src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR; | ||
268 | } else { | ||
269 | dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR; | 260 | dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR; |
270 | src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR; | 261 | src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR; |
262 | } else { | ||
263 | dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR; | ||
264 | src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR; | ||
271 | } | 265 | } |
272 | 266 | ||
273 | if (!bfin_read16(&src_ch->cfg)) { | 267 | if (!bfin_read16(&src_ch->cfg)) |
268 | break; | ||
269 | else if (bfin_read16(&dst_ch->irq_status) & DMA_DONE) { | ||
270 | bfin_write16(&src_ch->cfg, 0); | ||
274 | break; | 271 | break; |
275 | } else { | ||
276 | if (bfin_read16(&src_ch->irq_status) & DMA_DONE) | ||
277 | bfin_write16(&src_ch->cfg, 0); | ||
278 | } | 272 | } |
279 | |||
280 | } | 273 | } |
281 | 274 | ||
275 | /* Force a sync in case a previous config reset on this channel | ||
276 | * occurred. This is needed so subsequent writes to DMA registers | ||
277 | * are not spuriously lost/corrupted. | ||
278 | */ | ||
279 | __builtin_bfin_ssync(); | ||
280 | |||
282 | /* Destination */ | 281 | /* Destination */ |
283 | bfin_write32(&dst_ch->start_addr, dst); | 282 | bfin_write32(&dst_ch->start_addr, dst); |
284 | bfin_write16(&dst_ch->x_count, size >> 2); | 283 | bfin_write16(&dst_ch->x_count, size >> 2); |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index beffa00a93c3..6b9446271371 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -686,14 +686,12 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
686 | *port_fer[bank] = gpio_bank_saved[bank].fer; | 686 | *port_fer[bank] = gpio_bank_saved[bank].fer; |
687 | #endif | 687 | #endif |
688 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; | 688 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; |
689 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data | ||
690 | & gpio_bank_saved[bank].dir; | ||
689 | gpio_array[bank]->dir = gpio_bank_saved[bank].dir; | 691 | gpio_array[bank]->dir = gpio_bank_saved[bank].dir; |
690 | gpio_array[bank]->polar = gpio_bank_saved[bank].polar; | 692 | gpio_array[bank]->polar = gpio_bank_saved[bank].polar; |
691 | gpio_array[bank]->edge = gpio_bank_saved[bank].edge; | 693 | gpio_array[bank]->edge = gpio_bank_saved[bank].edge; |
692 | gpio_array[bank]->both = gpio_bank_saved[bank].both; | 694 | gpio_array[bank]->both = gpio_bank_saved[bank].both; |
693 | |||
694 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data | ||
695 | | gpio_bank_saved[bank].dir; | ||
696 | |||
697 | gpio_array[bank]->maska = gpio_bank_saved[bank].maska; | 695 | gpio_array[bank]->maska = gpio_bank_saved[bank].maska; |
698 | } | 696 | } |
699 | AWA_DUMMY_READ(maska); | 697 | AWA_DUMMY_READ(maska); |
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index d6c067782e63..685f160a5a36 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c | |||
@@ -72,13 +72,24 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /* Cover L1 memory. One 4M area for code and data each is enough. */ | 74 | /* Cover L1 memory. One 4M area for code and data each is enough. */ |
75 | if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { | 75 | if (cpu == 0) { |
76 | d_tbl[i_d].addr = L1_DATA_A_START; | 76 | if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { |
77 | d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; | 77 | d_tbl[i_d].addr = L1_DATA_A_START; |
78 | d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; | ||
79 | } | ||
80 | i_tbl[i_i].addr = L1_CODE_START; | ||
81 | i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; | ||
78 | } | 82 | } |
79 | i_tbl[i_i].addr = L1_CODE_START; | 83 | #ifdef CONFIG_SMP |
80 | i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; | 84 | else { |
81 | 85 | if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { | |
86 | d_tbl[i_d].addr = COREB_L1_DATA_A_START; | ||
87 | d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; | ||
88 | } | ||
89 | i_tbl[i_i].addr = COREB_L1_CODE_START; | ||
90 | i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; | ||
91 | } | ||
92 | #endif | ||
82 | first_switched_dcplb = i_d; | 93 | first_switched_dcplb = i_d; |
83 | first_switched_icplb = i_i; | 94 | first_switched_icplb = i_i; |
84 | 95 | ||
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 79cad0ac5892..9da36bab7ccb 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -361,7 +361,7 @@ static inline | |||
361 | int in_mem_const(unsigned long addr, unsigned long size, | 361 | int in_mem_const(unsigned long addr, unsigned long size, |
362 | unsigned long const_addr, unsigned long const_size) | 362 | unsigned long const_addr, unsigned long const_size) |
363 | { | 363 | { |
364 | return in_mem_const_off(addr, 0, size, const_addr, const_size); | 364 | return in_mem_const_off(addr, size, 0, const_addr, const_size); |
365 | } | 365 | } |
366 | #define IN_ASYNC(bnum, bctlnum) \ | 366 | #define IN_ASYNC(bnum, bctlnum) \ |
367 | ({ \ | 367 | ({ \ |
@@ -390,13 +390,13 @@ int bfin_mem_access_type(unsigned long addr, unsigned long size) | |||
390 | if (in_mem_const(addr, size, L1_DATA_B_START, L1_DATA_B_LENGTH)) | 390 | if (in_mem_const(addr, size, L1_DATA_B_START, L1_DATA_B_LENGTH)) |
391 | return cpu == 0 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; | 391 | return cpu == 0 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; |
392 | #ifdef COREB_L1_CODE_START | 392 | #ifdef COREB_L1_CODE_START |
393 | if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH)) | 393 | if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH)) |
394 | return cpu == 1 ? BFIN_MEM_ACCESS_ITEST : BFIN_MEM_ACCESS_IDMA; | 394 | return cpu == 1 ? BFIN_MEM_ACCESS_ITEST : BFIN_MEM_ACCESS_IDMA; |
395 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) | 395 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) |
396 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE_ONLY : -EFAULT; | 396 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE_ONLY : -EFAULT; |
397 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH)) | 397 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH)) |
398 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; | 398 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; |
399 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH)) | 399 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH)) |
400 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; | 400 | return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; |
401 | #endif | 401 | #endif |
402 | if (in_mem_const(addr, size, L2_START, L2_LENGTH)) | 402 | if (in_mem_const(addr, size, L2_START, L2_LENGTH)) |
@@ -472,13 +472,13 @@ int _access_ok(unsigned long addr, unsigned long size) | |||
472 | if (in_mem_const_off(addr, size, _ebss_b_l1 - _sdata_b_l1, L1_DATA_B_START, L1_DATA_B_LENGTH)) | 472 | if (in_mem_const_off(addr, size, _ebss_b_l1 - _sdata_b_l1, L1_DATA_B_START, L1_DATA_B_LENGTH)) |
473 | return 1; | 473 | return 1; |
474 | #ifdef COREB_L1_CODE_START | 474 | #ifdef COREB_L1_CODE_START |
475 | if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH)) | 475 | if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH)) |
476 | return 1; | 476 | return 1; |
477 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) | 477 | if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) |
478 | return 1; | 478 | return 1; |
479 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH)) | 479 | if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH)) |
480 | return 1; | 480 | return 1; |
481 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH)) | 481 | if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH)) |
482 | return 1; | 482 | return 1; |
483 | #endif | 483 | #endif |
484 | if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH)) | 484 | if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH)) |
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index d76618db50df..6a387eec6b65 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
34 | #include <linux/smp_lock.h> | ||
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
36 | #include <linux/ptrace.h> | 35 | #include <linux/ptrace.h> |
37 | #include <linux/user.h> | 36 | #include <linux/user.h> |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 6136c33e919f..6225edae488e 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu) | |||
168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); | 168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); |
169 | 169 | ||
170 | cpudata->idle = current; | 170 | cpudata->idle = current; |
171 | cpudata->loops_per_jiffy = loops_per_jiffy; | ||
172 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); | 171 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); |
173 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); | 172 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); |
174 | } | 173 | } |
@@ -568,17 +567,23 @@ static __init void memory_setup(void) | |||
568 | # endif /* ANOMALY_05000263 */ | 567 | # endif /* ANOMALY_05000263 */ |
569 | # endif /* CONFIG_ROMFS_FS */ | 568 | # endif /* CONFIG_ROMFS_FS */ |
570 | 569 | ||
571 | memory_end -= mtd_size; | 570 | /* Since the default MTD_UCLINUX has no magic number, we just blindly |
572 | 571 | * read 8 past the end of the kernel's image, and look at it. | |
573 | if (mtd_size == 0) { | 572 | * When no image is attached, mtd_size is set to a random number |
574 | console_init(); | 573 | * Do some basic sanity checks before operating on things |
575 | panic("Don't boot kernel without rootfs attached."); | 574 | */ |
575 | if (mtd_size == 0 || memory_end <= mtd_size) { | ||
576 | pr_emerg("Could not find valid ram mtd attached.\n"); | ||
577 | } else { | ||
578 | memory_end -= mtd_size; | ||
579 | |||
580 | /* Relocate MTD image to the top of memory after the uncached memory area */ | ||
581 | uclinux_ram_map.phys = memory_mtd_start = memory_end; | ||
582 | uclinux_ram_map.size = mtd_size; | ||
583 | pr_info("Found mtd parition at 0x%p, (len=0x%lx), moving to 0x%p\n", | ||
584 | _end, mtd_size, (void *)memory_mtd_start); | ||
585 | dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size); | ||
576 | } | 586 | } |
577 | |||
578 | /* Relocate MTD image to the top of memory after the uncached memory area */ | ||
579 | uclinux_ram_map.phys = memory_mtd_start = memory_end; | ||
580 | uclinux_ram_map.size = mtd_size; | ||
581 | dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size); | ||
582 | #endif /* CONFIG_MTD_UCLINUX */ | 587 | #endif /* CONFIG_MTD_UCLINUX */ |
583 | 588 | ||
584 | #if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) | 589 | #if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) |
@@ -868,13 +873,6 @@ void __init setup_arch(char **cmdline_p) | |||
868 | else | 873 | else |
869 | printk(KERN_CONT "and Disabled\n"); | 874 | printk(KERN_CONT "and Disabled\n"); |
870 | 875 | ||
871 | #if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) | ||
872 | /* we need to initialize the Flashrom device here since we might | ||
873 | * do things with flash early on in the boot | ||
874 | */ | ||
875 | flash_probe(); | ||
876 | #endif | ||
877 | |||
878 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); | 876 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); |
879 | 877 | ||
880 | /* Newer parts mirror SWRST bits in SYSCR */ | 878 | /* Newer parts mirror SWRST bits in SYSCR */ |
@@ -938,10 +936,6 @@ void __init setup_arch(char **cmdline_p) | |||
938 | CPU, bfin_revid()); | 936 | CPU, bfin_revid()); |
939 | } | 937 | } |
940 | 938 | ||
941 | /* We can't run on BF548-0.1 due to ANOMALY 05000448 */ | ||
942 | if (bfin_cpuid() == 0x27de && bfin_revid() == 1) | ||
943 | panic("You can't run on this processor due to 05000448"); | ||
944 | |||
945 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); | 939 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); |
946 | 940 | ||
947 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", | 941 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", |
@@ -1164,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1164 | sclk/1000000, sclk%1000000); | 1158 | sclk/1000000, sclk%1000000); |
1165 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | 1159 | seq_printf(m, "bogomips\t: %lu.%02lu\n" |
1166 | "Calibration\t: %lu loops\n", | 1160 | "Calibration\t: %lu loops\n", |
1167 | (cpudata->loops_per_jiffy * HZ) / 500000, | 1161 | (loops_per_jiffy * HZ) / 500000, |
1168 | ((cpudata->loops_per_jiffy * HZ) / 5000) % 100, | 1162 | ((loops_per_jiffy * HZ) / 5000) % 100, |
1169 | (cpudata->loops_per_jiffy * HZ)); | 1163 | (loops_per_jiffy * HZ)); |
1170 | 1164 | ||
1171 | /* Check Cache configutation */ | 1165 | /* Check Cache configutation */ |
1172 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { | 1166 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { |
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c index a8f1329c15a4..3da60fb13ce4 100644 --- a/arch/blackfin/kernel/sys_bfin.c +++ b/arch/blackfin/kernel/sys_bfin.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 29 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/smp_lock.h> | ||
33 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
34 | #include <linux/sem.h> | 33 | #include <linux/sem.h> |
35 | #include <linux/msg.h> | 34 | #include <linux/msg.h> |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 8a1caf2bb5b9..bf2b2d1f8ae5 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -570,11 +570,12 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
570 | if (kernel_mode_regs(fp) || (current && !current->mm)) { | 570 | if (kernel_mode_regs(fp) || (current && !current->mm)) { |
571 | console_verbose(); | 571 | console_verbose(); |
572 | oops_in_progress = 1; | 572 | oops_in_progress = 1; |
573 | if (strerror) | ||
574 | verbose_printk(strerror); | ||
575 | } | 573 | } |
576 | 574 | ||
577 | if (sig != SIGTRAP) { | 575 | if (sig != SIGTRAP) { |
576 | if (strerror) | ||
577 | verbose_printk(strerror); | ||
578 | |||
578 | dump_bfin_process(fp); | 579 | dump_bfin_process(fp); |
579 | dump_bfin_mem(fp); | 580 | dump_bfin_mem(fp); |
580 | show_regs(fp); | 581 | show_regs(fp); |
@@ -619,7 +620,9 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
619 | force_sig_info(sig, &info, current); | 620 | force_sig_info(sig, &info, current); |
620 | } | 621 | } |
621 | 622 | ||
622 | if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) | 623 | if ((ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) || |
624 | (ANOMALY_05000281 && trapnr == VEC_HWERR) || | ||
625 | (ANOMALY_05000189 && (trapnr == VEC_CPLB_I_VL || trapnr == VEC_CPLB_VL))) | ||
623 | fp->pc = SAFE_USER_INSTRUCTION; | 626 | fp->pc = SAFE_USER_INSTRUCTION; |
624 | 627 | ||
625 | traps_done: | 628 | traps_done: |
diff --git a/arch/blackfin/lib/lshrdi3.c b/arch/blackfin/lib/lshrdi3.c index 84b9c5592220..e57bf6fbdf3f 100644 --- a/arch/blackfin/lib/lshrdi3.c +++ b/arch/blackfin/lib/lshrdi3.c | |||
@@ -27,21 +27,7 @@ | |||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define BITS_PER_UNIT 8 | 30 | #include "gcclib.h" |
31 | |||
32 | typedef int SItype __attribute__ ((mode(SI))); | ||
33 | typedef unsigned int USItype __attribute__ ((mode(SI))); | ||
34 | typedef int DItype __attribute__ ((mode(DI))); | ||
35 | typedef int word_type __attribute__ ((mode(__word__))); | ||
36 | |||
37 | struct DIstruct { | ||
38 | SItype high, low; | ||
39 | }; | ||
40 | |||
41 | typedef union { | ||
42 | struct DIstruct s; | ||
43 | DItype ll; | ||
44 | } DIunion; | ||
45 | 31 | ||
46 | #ifdef CONFIG_ARITHMETIC_OPS_L1 | 32 | #ifdef CONFIG_ARITHMETIC_OPS_L1 |
47 | DItype __lshrdi3(DItype u, word_type b)__attribute__((l1_text)); | 33 | DItype __lshrdi3(DItype u, word_type b)__attribute__((l1_text)); |
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index d9791106be9f..809be268e42d 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -534,7 +534,7 @@ static struct platform_device i2c_bfin_twi_device = { | |||
534 | #endif | 534 | #endif |
535 | 535 | ||
536 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 536 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
537 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 537 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
538 | { | 538 | { |
539 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 539 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
540 | }, | 540 | }, |
diff --git a/arch/blackfin/mach-bf518/include/mach/anomaly.h b/arch/blackfin/mach-bf518/include/mach/anomaly.h index 426e064062a0..753ed810e1c6 100644 --- a/arch/blackfin/mach-bf518/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf518/include/mach/anomaly.h | |||
@@ -82,6 +82,7 @@ | |||
82 | #define ANOMALY_05000179 (0) | 82 | #define ANOMALY_05000179 (0) |
83 | #define ANOMALY_05000182 (0) | 83 | #define ANOMALY_05000182 (0) |
84 | #define ANOMALY_05000183 (0) | 84 | #define ANOMALY_05000183 (0) |
85 | #define ANOMALY_05000189 (0) | ||
85 | #define ANOMALY_05000198 (0) | 86 | #define ANOMALY_05000198 (0) |
86 | #define ANOMALY_05000202 (0) | 87 | #define ANOMALY_05000202 (0) |
87 | #define ANOMALY_05000215 (0) | 88 | #define ANOMALY_05000215 (0) |
@@ -117,6 +118,7 @@ | |||
117 | #define ANOMALY_05000357 (0) | 118 | #define ANOMALY_05000357 (0) |
118 | #define ANOMALY_05000362 (1) | 119 | #define ANOMALY_05000362 (1) |
119 | #define ANOMALY_05000363 (0) | 120 | #define ANOMALY_05000363 (0) |
121 | #define ANOMALY_05000364 (0) | ||
120 | #define ANOMALY_05000371 (0) | 122 | #define ANOMALY_05000371 (0) |
121 | #define ANOMALY_05000380 (0) | 123 | #define ANOMALY_05000380 (0) |
122 | #define ANOMALY_05000386 (0) | 124 | #define ANOMALY_05000386 (0) |
diff --git a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h index 0fb2ce5d840e..dbade93395eb 100644 --- a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) | 56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) |
57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) | 57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) |
58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) | 58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) |
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | 59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) |
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index f4867ce0c618..b09484f538f4 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -793,7 +793,7 @@ static struct platform_device i2c_bfin_twi_device = { | |||
793 | #endif | 793 | #endif |
794 | 794 | ||
795 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 795 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
796 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 796 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
797 | { | 797 | { |
798 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 798 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
799 | .type = "pcf8574_lcd", | 799 | .type = "pcf8574_lcd", |
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index b2f30f06b73e..2ad68cd10ae6 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -591,7 +591,7 @@ static struct platform_device i2c_bfin_twi_device = { | |||
591 | #endif | 591 | #endif |
592 | 592 | ||
593 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 593 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
594 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 594 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
595 | { | 595 | { |
596 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 596 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
597 | }, | 597 | }, |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 799a1d1fa890..75e563d3f9d4 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -858,7 +858,7 @@ static struct platform_device i2c_bfin_twi_device = { | |||
858 | #endif | 858 | #endif |
859 | 859 | ||
860 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 860 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
861 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 861 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
862 | { | 862 | { |
863 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 863 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
864 | }, | 864 | }, |
diff --git a/arch/blackfin/mach-bf527/include/mach/anomaly.h b/arch/blackfin/mach-bf527/include/mach/anomaly.h index 0d63f7406168..c438ca89d8c9 100644 --- a/arch/blackfin/mach-bf527/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf527/include/mach/anomaly.h | |||
@@ -176,6 +176,8 @@ | |||
176 | #define ANOMALY_05000443 (1) | 176 | #define ANOMALY_05000443 (1) |
177 | /* The WURESET Bit in the SYSCR Register is not Functional */ | 177 | /* The WURESET Bit in the SYSCR Register is not Functional */ |
178 | #define ANOMALY_05000445 (1) | 178 | #define ANOMALY_05000445 (1) |
179 | /* USB DMA Short Packet Data Corruption */ | ||
180 | #define ANOMALY_05000450 (1) | ||
179 | /* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ | 181 | /* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ |
180 | #define ANOMALY_05000451 (1) | 182 | #define ANOMALY_05000451 (1) |
181 | /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ | 183 | /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ |
@@ -201,6 +203,7 @@ | |||
201 | #define ANOMALY_05000179 (0) | 203 | #define ANOMALY_05000179 (0) |
202 | #define ANOMALY_05000182 (0) | 204 | #define ANOMALY_05000182 (0) |
203 | #define ANOMALY_05000183 (0) | 205 | #define ANOMALY_05000183 (0) |
206 | #define ANOMALY_05000189 (0) | ||
204 | #define ANOMALY_05000198 (0) | 207 | #define ANOMALY_05000198 (0) |
205 | #define ANOMALY_05000202 (0) | 208 | #define ANOMALY_05000202 (0) |
206 | #define ANOMALY_05000215 (0) | 209 | #define ANOMALY_05000215 (0) |
@@ -238,6 +241,5 @@ | |||
238 | #define ANOMALY_05000412 (0) | 241 | #define ANOMALY_05000412 (0) |
239 | #define ANOMALY_05000447 (0) | 242 | #define ANOMALY_05000447 (0) |
240 | #define ANOMALY_05000448 (0) | 243 | #define ANOMALY_05000448 (0) |
241 | #define ANOMALY_05000450 (0) | ||
242 | 244 | ||
243 | #endif | 245 | #endif |
diff --git a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h index a625659dd67f..ebd6cebc1fbc 100644 --- a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) | 56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) |
57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) | 57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) |
58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) | 58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) |
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | 59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index a68ade8a3ca2..3d743ccaff6a 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -453,7 +453,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
453 | .irq = 39, | 453 | .irq = 39, |
454 | }, | 454 | }, |
455 | #endif | 455 | #endif |
456 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 456 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
457 | { | 457 | { |
458 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 458 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
459 | }, | 459 | }, |
diff --git a/arch/blackfin/mach-bf533/include/mach/anomaly.h b/arch/blackfin/mach-bf533/include/mach/anomaly.h index 70a0ad69c610..cd83db2fb1a1 100644 --- a/arch/blackfin/mach-bf533/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf533/include/mach/anomaly.h | |||
@@ -335,6 +335,7 @@ | |||
335 | #define ANOMALY_05000323 (0) | 335 | #define ANOMALY_05000323 (0) |
336 | #define ANOMALY_05000353 (1) | 336 | #define ANOMALY_05000353 (1) |
337 | #define ANOMALY_05000362 (1) | 337 | #define ANOMALY_05000362 (1) |
338 | #define ANOMALY_05000364 (0) | ||
338 | #define ANOMALY_05000380 (0) | 339 | #define ANOMALY_05000380 (0) |
339 | #define ANOMALY_05000386 (1) | 340 | #define ANOMALY_05000386 (1) |
340 | #define ANOMALY_05000389 (0) | 341 | #define ANOMALY_05000389 (0) |
diff --git a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h index a3789d7ccf8c..4062e24e759b 100644 --- a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) | 56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) |
57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) | 57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) |
58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) | 58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) |
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | 59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index c1f76dd2c4ed..bd656907b8c0 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -1313,10 +1313,10 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
1313 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | 1313 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) |
1314 | { | 1314 | { |
1315 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), | 1315 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), |
1316 | .irq = IRQ_PF5, | 1316 | .irq = IRQ_PG5, |
1317 | }, | 1317 | }, |
1318 | #endif | 1318 | #endif |
1319 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 1319 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
1320 | { | 1320 | { |
1321 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 1321 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
1322 | }, | 1322 | }, |
diff --git a/arch/blackfin/mach-bf537/include/mach/anomaly.h b/arch/blackfin/mach-bf537/include/mach/anomaly.h index 57c128cc3b64..e66aa131f517 100644 --- a/arch/blackfin/mach-bf537/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf537/include/mach/anomaly.h | |||
@@ -167,6 +167,7 @@ | |||
167 | #define ANOMALY_05000179 (0) | 167 | #define ANOMALY_05000179 (0) |
168 | #define ANOMALY_05000182 (0) | 168 | #define ANOMALY_05000182 (0) |
169 | #define ANOMALY_05000183 (0) | 169 | #define ANOMALY_05000183 (0) |
170 | #define ANOMALY_05000189 (0) | ||
170 | #define ANOMALY_05000198 (0) | 171 | #define ANOMALY_05000198 (0) |
171 | #define ANOMALY_05000202 (0) | 172 | #define ANOMALY_05000202 (0) |
172 | #define ANOMALY_05000215 (0) | 173 | #define ANOMALY_05000215 (0) |
@@ -186,6 +187,7 @@ | |||
186 | #define ANOMALY_05000353 (1) | 187 | #define ANOMALY_05000353 (1) |
187 | #define ANOMALY_05000362 (1) | 188 | #define ANOMALY_05000362 (1) |
188 | #define ANOMALY_05000363 (0) | 189 | #define ANOMALY_05000363 (0) |
190 | #define ANOMALY_05000364 (0) | ||
189 | #define ANOMALY_05000380 (0) | 191 | #define ANOMALY_05000380 (0) |
190 | #define ANOMALY_05000386 (1) | 192 | #define ANOMALY_05000386 (1) |
191 | #define ANOMALY_05000389 (0) | 193 | #define ANOMALY_05000389 (0) |
diff --git a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h index b86662fb9de7..e95d54f9af6c 100644 --- a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) | 56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) |
57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) | 57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) |
58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) | 58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) |
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | 59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) |
diff --git a/arch/blackfin/mach-bf538/include/mach/anomaly.h b/arch/blackfin/mach-bf538/include/mach/anomaly.h index c97acdf85cd3..451cf8a82a42 100644 --- a/arch/blackfin/mach-bf538/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf538/include/mach/anomaly.h | |||
@@ -137,6 +137,7 @@ | |||
137 | #define ANOMALY_05000158 (0) | 137 | #define ANOMALY_05000158 (0) |
138 | #define ANOMALY_05000171 (0) | 138 | #define ANOMALY_05000171 (0) |
139 | #define ANOMALY_05000182 (0) | 139 | #define ANOMALY_05000182 (0) |
140 | #define ANOMALY_05000189 (0) | ||
140 | #define ANOMALY_05000198 (0) | 141 | #define ANOMALY_05000198 (0) |
141 | #define ANOMALY_05000202 (0) | 142 | #define ANOMALY_05000202 (0) |
142 | #define ANOMALY_05000215 (0) | 143 | #define ANOMALY_05000215 (0) |
@@ -160,6 +161,7 @@ | |||
160 | #define ANOMALY_05000353 (1) | 161 | #define ANOMALY_05000353 (1) |
161 | #define ANOMALY_05000362 (1) | 162 | #define ANOMALY_05000362 (1) |
162 | #define ANOMALY_05000363 (0) | 163 | #define ANOMALY_05000363 (0) |
164 | #define ANOMALY_05000364 (0) | ||
163 | #define ANOMALY_05000380 (0) | 165 | #define ANOMALY_05000380 (0) |
164 | #define ANOMALY_05000386 (1) | 166 | #define ANOMALY_05000386 (1) |
165 | #define ANOMALY_05000389 (0) | 167 | #define ANOMALY_05000389 (0) |
diff --git a/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h index c536551eb4b8..999f239fe1a6 100644 --- a/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) | 56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) |
57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) | 57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) |
58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) | 58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) |
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | 59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 81f5b95cc361..dc0dd9b2bcef 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -864,7 +864,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { | |||
864 | 864 | ||
865 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ | 865 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ |
866 | static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { | 866 | static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { |
867 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 867 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
868 | { | 868 | { |
869 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 869 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
870 | }, | 870 | }, |
diff --git a/arch/blackfin/mach-bf548/include/mach/anomaly.h b/arch/blackfin/mach-bf548/include/mach/anomaly.h index 18a4cd24f673..cd040fe0bc5c 100644 --- a/arch/blackfin/mach-bf548/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf548/include/mach/anomaly.h | |||
@@ -195,6 +195,7 @@ | |||
195 | #define ANOMALY_05000179 (0) | 195 | #define ANOMALY_05000179 (0) |
196 | #define ANOMALY_05000182 (0) | 196 | #define ANOMALY_05000182 (0) |
197 | #define ANOMALY_05000183 (0) | 197 | #define ANOMALY_05000183 (0) |
198 | #define ANOMALY_05000189 (0) | ||
198 | #define ANOMALY_05000198 (0) | 199 | #define ANOMALY_05000198 (0) |
199 | #define ANOMALY_05000202 (0) | 200 | #define ANOMALY_05000202 (0) |
200 | #define ANOMALY_05000215 (0) | 201 | #define ANOMALY_05000215 (0) |
@@ -226,6 +227,7 @@ | |||
226 | #define ANOMALY_05000323 (0) | 227 | #define ANOMALY_05000323 (0) |
227 | #define ANOMALY_05000362 (1) | 228 | #define ANOMALY_05000362 (1) |
228 | #define ANOMALY_05000363 (0) | 229 | #define ANOMALY_05000363 (0) |
230 | #define ANOMALY_05000364 (0) | ||
229 | #define ANOMALY_05000380 (0) | 231 | #define ANOMALY_05000380 (0) |
230 | #define ANOMALY_05000400 (0) | 232 | #define ANOMALY_05000400 (0) |
231 | #define ANOMALY_05000412 (0) | 233 | #define ANOMALY_05000412 (0) |
diff --git a/arch/blackfin/mach-bf561/include/mach/anomaly.h b/arch/blackfin/mach-bf561/include/mach/anomaly.h index 94b8e277f09d..a5312b2d267e 100644 --- a/arch/blackfin/mach-bf561/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf561/include/mach/anomaly.h | |||
@@ -288,6 +288,7 @@ | |||
288 | #define ANOMALY_05000273 (0) | 288 | #define ANOMALY_05000273 (0) |
289 | #define ANOMALY_05000311 (0) | 289 | #define ANOMALY_05000311 (0) |
290 | #define ANOMALY_05000353 (1) | 290 | #define ANOMALY_05000353 (1) |
291 | #define ANOMALY_05000364 (0) | ||
291 | #define ANOMALY_05000380 (0) | 292 | #define ANOMALY_05000380 (0) |
292 | #define ANOMALY_05000386 (1) | 293 | #define ANOMALY_05000386 (1) |
293 | #define ANOMALY_05000389 (0) | 294 | #define ANOMALY_05000389 (0) |
diff --git a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h index a1b50878553f..fd5e8878b8c4 100644 --- a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) | 56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) |
57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) | 57 | #define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) |
58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) | 58 | #define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) |
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | 59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) |
diff --git a/arch/blackfin/mach-bf561/include/mach/mem_map.h b/arch/blackfin/mach-bf561/include/mach/mem_map.h index a63e15c86d90..5b96ea549a04 100644 --- a/arch/blackfin/mach-bf561/include/mach/mem_map.h +++ b/arch/blackfin/mach-bf561/include/mach/mem_map.h | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | /* Memory Map for ADSP-BF561 processors */ | 38 | /* Memory Map for ADSP-BF561 processors */ |
39 | 39 | ||
40 | #ifdef CONFIG_BF561 | ||
41 | #define COREA_L1_CODE_START 0xFFA00000 | 40 | #define COREA_L1_CODE_START 0xFFA00000 |
42 | #define COREA_L1_DATA_A_START 0xFF800000 | 41 | #define COREA_L1_DATA_A_START 0xFF800000 |
43 | #define COREA_L1_DATA_B_START 0xFF900000 | 42 | #define COREA_L1_DATA_B_START 0xFF900000 |
@@ -74,6 +73,28 @@ | |||
74 | #define BFIN_DCACHESIZE (0*1024) | 73 | #define BFIN_DCACHESIZE (0*1024) |
75 | #define BFIN_DSUPBANKS 0 | 74 | #define BFIN_DSUPBANKS 0 |
76 | #endif /*CONFIG_BFIN_DCACHE*/ | 75 | #endif /*CONFIG_BFIN_DCACHE*/ |
76 | |||
77 | /* | ||
78 | * If we are in SMP mode, then the cache settings of Core B will match | ||
79 | * the settings of Core A. If we aren't, then we assume Core B is not | ||
80 | * using any cache. This allows the rest of the kernel to work with | ||
81 | * the core in either mode as we are only loading user code into it and | ||
82 | * it is the user's problem to make sure they aren't doing something | ||
83 | * stupid there. | ||
84 | * | ||
85 | * Note that we treat the L1 code region as a contiguous blob to make | ||
86 | * the rest of the kernel simpler. Easier to check one region than a | ||
87 | * bunch of small ones. Again, possible misbehavior here is the fault | ||
88 | * of the user -- don't try to use memory that doesn't exist. | ||
89 | */ | ||
90 | #ifdef CONFIG_SMP | ||
91 | # define COREB_L1_CODE_LENGTH L1_CODE_LENGTH | ||
92 | # define COREB_L1_DATA_A_LENGTH L1_DATA_A_LENGTH | ||
93 | # define COREB_L1_DATA_B_LENGTH L1_DATA_B_LENGTH | ||
94 | #else | ||
95 | # define COREB_L1_CODE_LENGTH 0x14000 | ||
96 | # define COREB_L1_DATA_A_LENGTH 0x8000 | ||
97 | # define COREB_L1_DATA_B_LENGTH 0x8000 | ||
77 | #endif | 98 | #endif |
78 | 99 | ||
79 | /* Level 2 Memory */ | 100 | /* Level 2 Memory */ |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 5a4e7c7fd92c..fb1795d5be2a 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -218,7 +218,7 @@ ENTRY(_ex_single_step) | |||
218 | /* Single stepping only a single instruction, so clear the trace | 218 | /* Single stepping only a single instruction, so clear the trace |
219 | * bit here. */ | 219 | * bit here. */ |
220 | r7 = syscfg; | 220 | r7 = syscfg; |
221 | bitclr (r7, 0); | 221 | bitclr (r7, SYSCFG_SSSTEP_P); |
222 | syscfg = R7; | 222 | syscfg = R7; |
223 | jump _ex_trap_c; | 223 | jump _ex_trap_c; |
224 | 224 | ||
@@ -251,7 +251,7 @@ ENTRY(_ex_single_step) | |||
251 | if !cc jump _bfin_return_from_exception; | 251 | if !cc jump _bfin_return_from_exception; |
252 | 252 | ||
253 | r7 = syscfg; | 253 | r7 = syscfg; |
254 | bitclr (r7, 0); | 254 | bitclr (r7, SYSCFG_SSSTEP_P); /* Turn off single step */ |
255 | syscfg = R7; | 255 | syscfg = R7; |
256 | 256 | ||
257 | /* Fall through to _bfin_return_from_exception. */ | 257 | /* Fall through to _bfin_return_from_exception. */ |
@@ -342,9 +342,11 @@ ENTRY(_ex_trap_c) | |||
342 | r6 = retx; | 342 | r6 = retx; |
343 | [p5 + PDA_RETX] = r6; | 343 | [p5 + PDA_RETX] = r6; |
344 | #endif | 344 | #endif |
345 | /* Save the state of single stepping */ | ||
345 | r6 = SYSCFG; | 346 | r6 = SYSCFG; |
346 | [p5 + PDA_SYSCFG] = r6; | 347 | [p5 + PDA_SYSCFG] = r6; |
347 | BITCLR(r6, 0); | 348 | /* Clear it while we handle the exception in IRQ5 mode */ |
349 | BITCLR(r6, SYSCFG_SSSTEP_P); | ||
348 | SYSCFG = r6; | 350 | SYSCFG = r6; |
349 | 351 | ||
350 | /* Disable all interrupts, but make sure level 5 is enabled so | 352 | /* Disable all interrupts, but make sure level 5 is enabled so |
@@ -367,7 +369,7 @@ ENDPROC(_ex_trap_c) | |||
367 | * exception. This is a unrecoverable event, so crash. | 369 | * exception. This is a unrecoverable event, so crash. |
368 | * Note: this cannot be ENTRY() as we jump here with "if cc jump" ... | 370 | * Note: this cannot be ENTRY() as we jump here with "if cc jump" ... |
369 | */ | 371 | */ |
370 | _double_fault: | 372 | ENTRY(_double_fault) |
371 | /* Turn caches & protection off, to ensure we don't get any more | 373 | /* Turn caches & protection off, to ensure we don't get any more |
372 | * double exceptions | 374 | * double exceptions |
373 | */ | 375 | */ |
@@ -872,7 +874,7 @@ ENTRY(_ret_from_exception) | |||
872 | raise 15; /* raise evt15 to do signal or reschedule */ | 874 | raise 15; /* raise evt15 to do signal or reschedule */ |
873 | 4: | 875 | 4: |
874 | r0 = syscfg; | 876 | r0 = syscfg; |
875 | bitclr(r0, 0); | 877 | bitclr(r0, SYSCFG_SSSTEP_P); /* Turn off single step */ |
876 | syscfg = r0; | 878 | syscfg = r0; |
877 | 5: | 879 | 5: |
878 | rts; | 880 | rts; |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 61840059dfac..349ee3f5466a 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -211,6 +211,8 @@ int smp_call_function(void (*func)(void *info), void *info, int wait) | |||
211 | return 0; | 211 | return 0; |
212 | 212 | ||
213 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 213 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
214 | if (!msg) | ||
215 | return -ENOMEM; | ||
214 | INIT_LIST_HEAD(&msg->list); | 216 | INIT_LIST_HEAD(&msg->list); |
215 | msg->call_struct.func = func; | 217 | msg->call_struct.func = func; |
216 | msg->call_struct.info = info; | 218 | msg->call_struct.info = info; |
@@ -252,6 +254,8 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | |||
252 | cpu_set(cpu, callmap); | 254 | cpu_set(cpu, callmap); |
253 | 255 | ||
254 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 256 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
257 | if (!msg) | ||
258 | return -ENOMEM; | ||
255 | INIT_LIST_HEAD(&msg->list); | 259 | INIT_LIST_HEAD(&msg->list); |
256 | msg->call_struct.func = func; | 260 | msg->call_struct.func = func; |
257 | msg->call_struct.info = info; | 261 | msg->call_struct.info = info; |
@@ -287,6 +291,8 @@ void smp_send_reschedule(int cpu) | |||
287 | return; | 291 | return; |
288 | 292 | ||
289 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 293 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
294 | if (!msg) | ||
295 | return; | ||
290 | memset(msg, 0, sizeof(msg)); | 296 | memset(msg, 0, sizeof(msg)); |
291 | INIT_LIST_HEAD(&msg->list); | 297 | INIT_LIST_HEAD(&msg->list); |
292 | msg->type = BFIN_IPI_RESCHEDULE; | 298 | msg->type = BFIN_IPI_RESCHEDULE; |
@@ -314,6 +320,8 @@ void smp_send_stop(void) | |||
314 | return; | 320 | return; |
315 | 321 | ||
316 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 322 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
323 | if (!msg) | ||
324 | return; | ||
317 | memset(msg, 0, sizeof(msg)); | 325 | memset(msg, 0, sizeof(msg)); |
318 | INIT_LIST_HEAD(&msg->list); | 326 | INIT_LIST_HEAD(&msg->list); |
319 | msg->type = BFIN_IPI_CPU_STOP; | 327 | msg->type = BFIN_IPI_CPU_STOP; |
@@ -450,7 +458,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
450 | unsigned int cpu; | 458 | unsigned int cpu; |
451 | 459 | ||
452 | for_each_online_cpu(cpu) | 460 | for_each_online_cpu(cpu) |
453 | bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy; | 461 | bogosum += loops_per_jiffy; |
454 | 462 | ||
455 | printk(KERN_INFO "SMP: Total of %d processors activated " | 463 | printk(KERN_INFO "SMP: Total of %d processors activated " |
456 | "(%lu.%02lu BogoMIPS).\n", | 464 | "(%lu.%02lu BogoMIPS).\n", |
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h index bc5b2935ca53..c3aade36c330 100644 --- a/arch/cris/include/asm/thread_info.h +++ b/arch/cris/include/asm/thread_info.h | |||
@@ -50,8 +50,6 @@ struct thread_info { | |||
50 | 50 | ||
51 | /* | 51 | /* |
52 | * macros/functions for gaining access to the thread information structure | 52 | * macros/functions for gaining access to the thread information structure |
53 | * | ||
54 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
55 | */ | 53 | */ |
56 | #ifndef __ASSEMBLY__ | 54 | #ifndef __ASSEMBLY__ |
57 | #define INIT_THREAD_INFO(tsk) \ | 55 | #define INIT_THREAD_INFO(tsk) \ |
@@ -60,7 +58,7 @@ struct thread_info { | |||
60 | .exec_domain = &default_exec_domain, \ | 58 | .exec_domain = &default_exec_domain, \ |
61 | .flags = 0, \ | 59 | .flags = 0, \ |
62 | .cpu = 0, \ | 60 | .cpu = 0, \ |
63 | .preempt_count = 1, \ | 61 | .preempt_count = INIT_PREEMPT_COUNT, \ |
64 | .addr_limit = KERNEL_DS, \ | 62 | .addr_limit = KERNEL_DS, \ |
65 | .restart_block = { \ | 63 | .restart_block = { \ |
66 | .fn = do_no_restart_syscall, \ | 64 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/cris/kernel/sys_cris.c b/arch/cris/kernel/sys_cris.c index a79fbd87021b..2ad962c7e88e 100644 --- a/arch/cris/kernel/sys_cris.c +++ b/arch/cris/kernel/sys_cris.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/smp_lock.h> | ||
19 | #include <linux/sem.h> | 18 | #include <linux/sem.h> |
20 | #include <linux/msg.h> | 19 | #include <linux/msg.h> |
21 | #include <linux/shm.h> | 20 | #include <linux/shm.h> |
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h index e8a5ed7be021..e608e056bb53 100644 --- a/arch/frv/include/asm/thread_info.h +++ b/arch/frv/include/asm/thread_info.h | |||
@@ -56,8 +56,6 @@ struct thread_info { | |||
56 | 56 | ||
57 | /* | 57 | /* |
58 | * macros/functions for gaining access to the thread information structure | 58 | * macros/functions for gaining access to the thread information structure |
59 | * | ||
60 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
61 | */ | 59 | */ |
62 | #ifndef __ASSEMBLY__ | 60 | #ifndef __ASSEMBLY__ |
63 | 61 | ||
@@ -67,7 +65,7 @@ struct thread_info { | |||
67 | .exec_domain = &default_exec_domain, \ | 65 | .exec_domain = &default_exec_domain, \ |
68 | .flags = 0, \ | 66 | .flags = 0, \ |
69 | .cpu = 0, \ | 67 | .cpu = 0, \ |
70 | .preempt_count = 1, \ | 68 | .preempt_count = INIT_PREEMPT_COUNT, \ |
71 | .addr_limit = KERNEL_DS, \ | 69 | .addr_limit = KERNEL_DS, \ |
72 | .restart_block = { \ | 70 | .restart_block = { \ |
73 | .fn = do_no_restart_syscall, \ | 71 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/h8300/include/asm/thread_info.h b/arch/h8300/include/asm/thread_info.h index 700014d2155f..8bbc8b0ee45d 100644 --- a/arch/h8300/include/asm/thread_info.h +++ b/arch/h8300/include/asm/thread_info.h | |||
@@ -36,7 +36,7 @@ struct thread_info { | |||
36 | .exec_domain = &default_exec_domain, \ | 36 | .exec_domain = &default_exec_domain, \ |
37 | .flags = 0, \ | 37 | .flags = 0, \ |
38 | .cpu = 0, \ | 38 | .cpu = 0, \ |
39 | .preempt_count = 1, \ | 39 | .preempt_count = INIT_PREEMPT_COUNT, \ |
40 | .restart_block = { \ | 40 | .restart_block = { \ |
41 | .fn = do_no_restart_syscall, \ | 41 | .fn = do_no_restart_syscall, \ |
42 | }, \ | 42 | }, \ |
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h index 0c26157cffa5..b6395ad1500a 100644 --- a/arch/ia64/include/asm/fpu.h +++ b/arch/ia64/include/asm/fpu.h | |||
@@ -6,6 +6,8 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | ||
10 | |||
9 | /* floating point status register: */ | 11 | /* floating point status register: */ |
10 | #define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */ | 12 | #define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */ |
11 | #define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */ | 13 | #define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */ |
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index ae6922626bf4..8ce2e388e37c 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -48,7 +48,7 @@ struct thread_info { | |||
48 | .flags = 0, \ | 48 | .flags = 0, \ |
49 | .cpu = 0, \ | 49 | .cpu = 0, \ |
50 | .addr_limit = KERNEL_DS, \ | 50 | .addr_limit = KERNEL_DS, \ |
51 | .preempt_count = 0, \ | 51 | .preempt_count = INIT_PREEMPT_COUNT, \ |
52 | .restart_block = { \ | 52 | .restart_block = { \ |
53 | .fn = do_no_restart_syscall, \ | 53 | .fn = do_no_restart_syscall, \ |
54 | }, \ | 54 | }, \ |
diff --git a/arch/ia64/include/asm/xen/hypervisor.h b/arch/ia64/include/asm/xen/hypervisor.h index e425227a418e..88afb54501e4 100644 --- a/arch/ia64/include/asm/xen/hypervisor.h +++ b/arch/ia64/include/asm/xen/hypervisor.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #ifndef _ASM_IA64_XEN_HYPERVISOR_H | 33 | #ifndef _ASM_IA64_XEN_HYPERVISOR_H |
34 | #define _ASM_IA64_XEN_HYPERVISOR_H | 34 | #define _ASM_IA64_XEN_HYPERVISOR_H |
35 | 35 | ||
36 | #include <linux/err.h> | ||
36 | #include <xen/interface/xen.h> | 37 | #include <xen/interface/xen.h> |
37 | #include <xen/interface/version.h> /* to compile feature.c */ | 38 | #include <xen/interface/version.h> /* to compile feature.c */ |
38 | #include <xen/features.h> /* to comiple xen-netfront.c */ | 39 | #include <xen/features.h> /* to comiple xen-netfront.c */ |
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c index 086a2aeb0404..39a3cd0a4173 100644 --- a/arch/ia64/kernel/dma-mapping.c +++ b/arch/ia64/kernel/dma-mapping.c | |||
@@ -6,6 +6,14 @@ int iommu_detected __read_mostly; | |||
6 | struct dma_map_ops *dma_ops; | 6 | struct dma_map_ops *dma_ops; |
7 | EXPORT_SYMBOL(dma_ops); | 7 | EXPORT_SYMBOL(dma_ops); |
8 | 8 | ||
9 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) | ||
10 | |||
11 | static int __init dma_init(void) | ||
12 | { | ||
13 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); | ||
14 | } | ||
15 | fs_initcall(dma_init); | ||
16 | |||
9 | struct dma_map_ops *dma_get_ops(struct device *dev) | 17 | struct dma_map_ops *dma_get_ops(struct device *dev) |
10 | { | 18 | { |
11 | return dma_ops; | 19 | return dma_ops; |
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 92c9689b7d97..9daa87fdb018 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
18 | #include <linux/smp_lock.h> | ||
19 | #include <linux/user.h> | 18 | #include <linux/user.h> |
20 | #include <linux/security.h> | 19 | #include <linux/security.h> |
21 | #include <linux/audit.h> | 20 | #include <linux/audit.h> |
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index 8589d462df27..07bb5bd00e2a 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h | |||
@@ -57,8 +57,6 @@ struct thread_info { | |||
57 | 57 | ||
58 | /* | 58 | /* |
59 | * macros/functions for gaining access to the thread information structure | 59 | * macros/functions for gaining access to the thread information structure |
60 | * | ||
61 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
62 | */ | 60 | */ |
63 | #ifndef __ASSEMBLY__ | 61 | #ifndef __ASSEMBLY__ |
64 | 62 | ||
@@ -68,7 +66,7 @@ struct thread_info { | |||
68 | .exec_domain = &default_exec_domain, \ | 66 | .exec_domain = &default_exec_domain, \ |
69 | .flags = 0, \ | 67 | .flags = 0, \ |
70 | .cpu = 0, \ | 68 | .cpu = 0, \ |
71 | .preempt_count = 1, \ | 69 | .preempt_count = INIT_PREEMPT_COUNT, \ |
72 | .addr_limit = KERNEL_DS, \ | 70 | .addr_limit = KERNEL_DS, \ |
73 | .restart_block = { \ | 71 | .restart_block = { \ |
74 | .fn = do_no_restart_syscall, \ | 72 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index bf0abe9e1f73..98b8feb12ed8 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/smp_lock.h> | ||
23 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
24 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
25 | #include <linux/user.h> | 24 | #include <linux/user.h> |
diff --git a/arch/m68k/include/asm/thread_info_mm.h b/arch/m68k/include/asm/thread_info_mm.h index af0fda46e94b..6ea5c33b3c56 100644 --- a/arch/m68k/include/asm/thread_info_mm.h +++ b/arch/m68k/include/asm/thread_info_mm.h | |||
@@ -19,6 +19,7 @@ struct thread_info { | |||
19 | { \ | 19 | { \ |
20 | .task = &tsk, \ | 20 | .task = &tsk, \ |
21 | .exec_domain = &default_exec_domain, \ | 21 | .exec_domain = &default_exec_domain, \ |
22 | .preempt_count = INIT_PREEMPT_COUNT, \ | ||
22 | .restart_block = { \ | 23 | .restart_block = { \ |
23 | .fn = do_no_restart_syscall, \ | 24 | .fn = do_no_restart_syscall, \ |
24 | }, \ | 25 | }, \ |
diff --git a/arch/m68k/include/asm/thread_info_no.h b/arch/m68k/include/asm/thread_info_no.h index 82529f424ea3..c2bde5e24b0b 100644 --- a/arch/m68k/include/asm/thread_info_no.h +++ b/arch/m68k/include/asm/thread_info_no.h | |||
@@ -49,6 +49,7 @@ struct thread_info { | |||
49 | .exec_domain = &default_exec_domain, \ | 49 | .exec_domain = &default_exec_domain, \ |
50 | .flags = 0, \ | 50 | .flags = 0, \ |
51 | .cpu = 0, \ | 51 | .cpu = 0, \ |
52 | .preempt_count = INIT_PREEMPT_COUNT, \ | ||
52 | .restart_block = { \ | 53 | .restart_block = { \ |
53 | .fn = do_no_restart_syscall, \ | 54 | .fn = do_no_restart_syscall, \ |
54 | }, \ | 55 | }, \ |
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h index 7fac44498445..6e92885d381a 100644 --- a/arch/microblaze/include/asm/thread_info.h +++ b/arch/microblaze/include/asm/thread_info.h | |||
@@ -75,8 +75,6 @@ struct thread_info { | |||
75 | 75 | ||
76 | /* | 76 | /* |
77 | * macros/functions for gaining access to the thread information structure | 77 | * macros/functions for gaining access to the thread information structure |
78 | * | ||
79 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
80 | */ | 78 | */ |
81 | #define INIT_THREAD_INFO(tsk) \ | 79 | #define INIT_THREAD_INFO(tsk) \ |
82 | { \ | 80 | { \ |
@@ -84,7 +82,7 @@ struct thread_info { | |||
84 | .exec_domain = &default_exec_domain, \ | 82 | .exec_domain = &default_exec_domain, \ |
85 | .flags = 0, \ | 83 | .flags = 0, \ |
86 | .cpu = 0, \ | 84 | .cpu = 0, \ |
87 | .preempt_count = 1, \ | 85 | .preempt_count = INIT_PREEMPT_COUNT, \ |
88 | .addr_limit = KERNEL_DS, \ | 86 | .addr_limit = KERNEL_DS, \ |
89 | .restart_block = { \ | 87 | .restart_block = { \ |
90 | .fn = do_no_restart_syscall, \ | 88 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index b86aa623e36d..53ff39af6a5c 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/smp_lock.h> | ||
31 | #include <linux/ptrace.h> | 30 | #include <linux/ptrace.h> |
32 | #include <linux/signal.h> | 31 | #include <linux/signal.h> |
33 | 32 | ||
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 493819c25fba..1c80e4fc40ce 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
24 | #include <linux/smp_lock.h> | ||
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
26 | #include <linux/signal.h> | 25 | #include <linux/signal.h> |
27 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index 8c9ebac5da10..e000bce09b2b 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/smp_lock.h> | ||
19 | #include <linux/syscalls.h> | 18 | #include <linux/syscalls.h> |
20 | #include <linux/sem.h> | 19 | #include <linux/sem.h> |
21 | #include <linux/msg.h> | 20 | #include <linux/msg.h> |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 143a48136a4b..f9df720d2e40 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -39,8 +39,6 @@ struct thread_info { | |||
39 | 39 | ||
40 | /* | 40 | /* |
41 | * macros/functions for gaining access to the thread information structure | 41 | * macros/functions for gaining access to the thread information structure |
42 | * | ||
43 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
44 | */ | 42 | */ |
45 | #define INIT_THREAD_INFO(tsk) \ | 43 | #define INIT_THREAD_INFO(tsk) \ |
46 | { \ | 44 | { \ |
@@ -48,7 +46,7 @@ struct thread_info { | |||
48 | .exec_domain = &default_exec_domain, \ | 46 | .exec_domain = &default_exec_domain, \ |
49 | .flags = _TIF_FIXADE, \ | 47 | .flags = _TIF_FIXADE, \ |
50 | .cpu = 0, \ | 48 | .cpu = 0, \ |
51 | .preempt_count = 1, \ | 49 | .preempt_count = INIT_PREEMPT_COUNT, \ |
52 | .addr_limit = KERNEL_DS, \ | 50 | .addr_limit = KERNEL_DS, \ |
53 | .restart_block = { \ | 51 | .restart_block = { \ |
54 | .fn = do_no_restart_syscall, \ | 52 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index c4f9ac17474a..32644b4a0714 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
24 | #include <linux/smp.h> | 24 | #include <linux/smp.h> |
25 | #include <linux/smp_lock.h> | ||
26 | #include <linux/user.h> | 25 | #include <linux/user.h> |
27 | #include <linux/security.h> | 26 | #include <linux/security.h> |
28 | 27 | ||
diff --git a/arch/mips/mm/hugetlbpage.c b/arch/mips/mm/hugetlbpage.c index 471c09aa1614..8c2834f5919d 100644 --- a/arch/mips/mm/hugetlbpage.c +++ b/arch/mips/mm/hugetlbpage.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/hugetlb.h> | 17 | #include <linux/hugetlb.h> |
18 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
19 | #include <linux/smp_lock.h> | ||
20 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
21 | #include <linux/err.h> | 20 | #include <linux/err.h> |
22 | #include <linux/sysctl.h> | 21 | #include <linux/sysctl.h> |
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h index 78a3881f3c12..58d64f8b2cc3 100644 --- a/arch/mn10300/include/asm/thread_info.h +++ b/arch/mn10300/include/asm/thread_info.h | |||
@@ -65,8 +65,6 @@ struct thread_info { | |||
65 | 65 | ||
66 | /* | 66 | /* |
67 | * macros/functions for gaining access to the thread information structure | 67 | * macros/functions for gaining access to the thread information structure |
68 | * | ||
69 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
70 | */ | 68 | */ |
71 | #ifndef __ASSEMBLY__ | 69 | #ifndef __ASSEMBLY__ |
72 | 70 | ||
@@ -76,7 +74,7 @@ struct thread_info { | |||
76 | .exec_domain = &default_exec_domain, \ | 74 | .exec_domain = &default_exec_domain, \ |
77 | .flags = 0, \ | 75 | .flags = 0, \ |
78 | .cpu = 0, \ | 76 | .cpu = 0, \ |
79 | .preempt_count = 1, \ | 77 | .preempt_count = INIT_PREEMPT_COUNT, \ |
80 | .addr_limit = KERNEL_DS, \ | 78 | .addr_limit = KERNEL_DS, \ |
81 | .restart_block = { \ | 79 | .restart_block = { \ |
82 | .fn = do_no_restart_syscall, \ | 80 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/mn10300/kernel/ptrace.c b/arch/mn10300/kernel/ptrace.c index e143339ad28e..cf847dabc1bd 100644 --- a/arch/mn10300/kernel/ptrace.c +++ b/arch/mn10300/kernel/ptrace.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/smp_lock.h> | ||
17 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
18 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
19 | #include <linux/user.h> | 18 | #include <linux/user.h> |
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index 9f7572a0f578..feb2f2e810db 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
15 | #include <linux/smp_lock.h> | ||
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
18 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
diff --git a/arch/mn10300/kernel/sys_mn10300.c b/arch/mn10300/kernel/sys_mn10300.c index bca5a84dc72c..3e52a1054327 100644 --- a/arch/mn10300/kernel/sys_mn10300.c +++ b/arch/mn10300/kernel/sys_mn10300.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/syscalls.h> | 13 | #include <linux/syscalls.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/smp_lock.h> | ||
17 | #include <linux/sem.h> | 16 | #include <linux/sem.h> |
18 | #include <linux/msg.h> | 17 | #include <linux/msg.h> |
19 | #include <linux/shm.h> | 18 | #include <linux/shm.h> |
@@ -21,7 +20,6 @@ | |||
21 | #include <linux/mman.h> | 20 | #include <linux/mman.h> |
22 | #include <linux/file.h> | 21 | #include <linux/file.h> |
23 | #include <linux/utsname.h> | 22 | #include <linux/utsname.h> |
24 | #include <linux/syscalls.h> | ||
25 | #include <linux/tty.h> | 23 | #include <linux/tty.h> |
26 | 24 | ||
27 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c index 0dfdc5001124..91365adba4f5 100644 --- a/arch/mn10300/kernel/traps.c +++ b/arch/mn10300/kernel/traps.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/smp_lock.h> | ||
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
diff --git a/arch/mn10300/kernel/vmlinux.lds.S b/arch/mn10300/kernel/vmlinux.lds.S index c96ba3da95ac..f4aa07934654 100644 --- a/arch/mn10300/kernel/vmlinux.lds.S +++ b/arch/mn10300/kernel/vmlinux.lds.S | |||
@@ -107,7 +107,7 @@ SECTIONS | |||
107 | __init_end = .; | 107 | __init_end = .; |
108 | /* freed after init ends here */ | 108 | /* freed after init ends here */ |
109 | 109 | ||
110 | BSS(4) | 110 | BSS_SECTION(0, PAGE_SIZE, 4) |
111 | 111 | ||
112 | _end = . ; | 112 | _end = . ; |
113 | 113 | ||
diff --git a/arch/mn10300/mm/fault.c b/arch/mn10300/mm/fault.c index a62e1e138bc1..53bb17d0f068 100644 --- a/arch/mn10300/mm/fault.c +++ b/arch/mn10300/mm/fault.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/mman.h> | 20 | #include <linux/mman.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/smp_lock.h> | ||
24 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
26 | #include <linux/vt_kern.h> /* For unblank_screen() */ | 25 | #include <linux/vt_kern.h> /* For unblank_screen() */ |
diff --git a/arch/mn10300/mm/misalignment.c b/arch/mn10300/mm/misalignment.c index 94c4a4358065..30016251f658 100644 --- a/arch/mn10300/mm/misalignment.c +++ b/arch/mn10300/mm/misalignment.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/smp_lock.h> | ||
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index 0407959da489..4ce0edfbe969 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h | |||
@@ -23,7 +23,7 @@ struct thread_info { | |||
23 | .flags = 0, \ | 23 | .flags = 0, \ |
24 | .cpu = 0, \ | 24 | .cpu = 0, \ |
25 | .addr_limit = KERNEL_DS, \ | 25 | .addr_limit = KERNEL_DS, \ |
26 | .preempt_count = 1, \ | 26 | .preempt_count = INIT_PREEMPT_COUNT, \ |
27 | .restart_block = { \ | 27 | .restart_block = { \ |
28 | .fn = do_no_restart_syscall \ | 28 | .fn = do_no_restart_syscall \ |
29 | } \ | 29 | } \ |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 9aba5a38a7c4..c8b329255678 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -46,15 +46,13 @@ struct thread_info { | |||
46 | 46 | ||
47 | /* | 47 | /* |
48 | * macros/functions for gaining access to the thread information structure | 48 | * macros/functions for gaining access to the thread information structure |
49 | * | ||
50 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
51 | */ | 49 | */ |
52 | #define INIT_THREAD_INFO(tsk) \ | 50 | #define INIT_THREAD_INFO(tsk) \ |
53 | { \ | 51 | { \ |
54 | .task = &tsk, \ | 52 | .task = &tsk, \ |
55 | .exec_domain = &default_exec_domain, \ | 53 | .exec_domain = &default_exec_domain, \ |
56 | .cpu = 0, \ | 54 | .cpu = 0, \ |
57 | .preempt_count = 1, \ | 55 | .preempt_count = INIT_PREEMPT_COUNT, \ |
58 | .restart_block = { \ | 56 | .restart_block = { \ |
59 | .fn = do_no_restart_syscall, \ | 57 | .fn = do_no_restart_syscall, \ |
60 | }, \ | 58 | }, \ |
diff --git a/arch/powerpc/kernel/power7-pmu.c b/arch/powerpc/kernel/power7-pmu.c index 5d755ef7ac8f..5a9f5cbd40a4 100644 --- a/arch/powerpc/kernel/power7-pmu.c +++ b/arch/powerpc/kernel/power7-pmu.c | |||
@@ -358,6 +358,7 @@ static struct power_pmu power7_pmu = { | |||
358 | .get_constraint = power7_get_constraint, | 358 | .get_constraint = power7_get_constraint, |
359 | .get_alternatives = power7_get_alternatives, | 359 | .get_alternatives = power7_get_alternatives, |
360 | .disable_pmc = power7_disable_pmc, | 360 | .disable_pmc = power7_disable_pmc, |
361 | .flags = PPMU_ALT_SIPR, | ||
361 | .n_generic = ARRAY_SIZE(power7_generic_events), | 362 | .n_generic = ARRAY_SIZE(power7_generic_events), |
362 | .generic_events = power7_generic_events, | 363 | .generic_events = power7_generic_events, |
363 | .cache_events = &power7_cache_events, | 364 | .cache_events = &power7_cache_events, |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 9fa2c7dcd05a..ef149880c145 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -736,15 +736,16 @@ void user_disable_single_step(struct task_struct *task) | |||
736 | { | 736 | { |
737 | struct pt_regs *regs = task->thread.regs; | 737 | struct pt_regs *regs = task->thread.regs; |
738 | 738 | ||
739 | |||
740 | #if defined(CONFIG_BOOKE) | ||
741 | /* If DAC then do not single step, skip */ | ||
742 | if (task->thread.dabr) | ||
743 | return; | ||
744 | #endif | ||
745 | |||
746 | if (regs != NULL) { | 739 | if (regs != NULL) { |
747 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | 740 | #if defined(CONFIG_BOOKE) |
741 | /* If DAC don't clear DBCRO_IDM or MSR_DE */ | ||
742 | if (task->thread.dabr) | ||
743 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT); | ||
744 | else { | ||
745 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); | ||
746 | regs->msr &= ~MSR_DE; | ||
747 | } | ||
748 | #elif defined(CONFIG_40x) | ||
748 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); | 749 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); |
749 | regs->msr &= ~MSR_DE; | 750 | regs->msr &= ~MSR_DE; |
750 | #else | 751 | #else |
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 297632cba047..8a6daf4129f6 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
24 | #include <linux/smp_lock.h> | ||
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
27 | #include <linux/regset.h> | 26 | #include <linux/regset.h> |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index ef36cbbc5882..ea4d64644d02 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -80,10 +80,10 @@ _GLOBAL(load_up_altivec) | |||
80 | mtvscr vr0 | 80 | mtvscr vr0 |
81 | REST_32VRS(0,r4,r5) | 81 | REST_32VRS(0,r4,r5) |
82 | #ifndef CONFIG_SMP | 82 | #ifndef CONFIG_SMP |
83 | /* Update last_task_used_math to 'current' */ | 83 | /* Update last_task_used_altivec to 'current' */ |
84 | subi r4,r5,THREAD /* Back to 'current' */ | 84 | subi r4,r5,THREAD /* Back to 'current' */ |
85 | fromreal(r4) | 85 | fromreal(r4) |
86 | PPC_STL r4,ADDROFF(last_task_used_math)(r3) | 86 | PPC_STL r4,ADDROFF(last_task_used_altivec)(r3) |
87 | #endif /* CONFIG_SMP */ | 87 | #endif /* CONFIG_SMP */ |
88 | /* restore registers and return */ | 88 | /* restore registers and return */ |
89 | blr | 89 | blr |
@@ -172,7 +172,7 @@ _GLOBAL(load_up_vsx) | |||
172 | oris r12,r12,MSR_VSX@h | 172 | oris r12,r12,MSR_VSX@h |
173 | std r12,_MSR(r1) | 173 | std r12,_MSR(r1) |
174 | #ifndef CONFIG_SMP | 174 | #ifndef CONFIG_SMP |
175 | /* Update last_task_used_math to 'current' */ | 175 | /* Update last_task_used_vsx to 'current' */ |
176 | ld r4,PACACURRENT(r13) | 176 | ld r4,PACACURRENT(r13) |
177 | std r4,0(r3) | 177 | std r4,0(r3) |
178 | #endif /* CONFIG_SMP */ | 178 | #endif /* CONFIG_SMP */ |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index e577839f3073..2ae5d72f47ed 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -95,6 +95,11 @@ config S390 | |||
95 | select HAVE_ARCH_TRACEHOOK | 95 | select HAVE_ARCH_TRACEHOOK |
96 | select INIT_ALL_POSSIBLE | 96 | select INIT_ALL_POSSIBLE |
97 | select HAVE_PERF_COUNTERS | 97 | select HAVE_PERF_COUNTERS |
98 | select GENERIC_ATOMIC64 if !64BIT | ||
99 | |||
100 | config SCHED_OMIT_FRAME_POINTER | ||
101 | bool | ||
102 | default y | ||
98 | 103 | ||
99 | source "init/Kconfig" | 104 | source "init/Kconfig" |
100 | 105 | ||
@@ -116,6 +121,9 @@ config 32BIT | |||
116 | bool | 121 | bool |
117 | default y if !64BIT | 122 | default y if !64BIT |
118 | 123 | ||
124 | config KTIME_SCALAR | ||
125 | def_bool 32BIT | ||
126 | |||
119 | config SMP | 127 | config SMP |
120 | bool "Symmetric multi-processing support" | 128 | bool "Symmetric multi-processing support" |
121 | ---help--- | 129 | ---help--- |
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h index fca9dffcc669..c7d0abfb0f00 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
@@ -268,7 +268,12 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, | |||
268 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) | 268 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) |
269 | 269 | ||
270 | #undef __CSG_LOOP | 270 | #undef __CSG_LOOP |
271 | #endif | 271 | |
272 | #else /* __s390x__ */ | ||
273 | |||
274 | #include <asm-generic/atomic64.h> | ||
275 | |||
276 | #endif /* __s390x__ */ | ||
272 | 277 | ||
273 | #define smp_mb__before_atomic_dec() smp_mb() | 278 | #define smp_mb__before_atomic_dec() smp_mb() |
274 | #define smp_mb__after_atomic_dec() smp_mb() | 279 | #define smp_mb__after_atomic_dec() smp_mb() |
diff --git a/arch/s390/include/asm/perf_counter.h b/arch/s390/include/asm/perf_counter.h index a7205a3828cb..7015188c2cc2 100644 --- a/arch/s390/include/asm/perf_counter.h +++ b/arch/s390/include/asm/perf_counter.h | |||
@@ -6,3 +6,5 @@ | |||
6 | 6 | ||
7 | static inline void set_perf_counter_pending(void) {} | 7 | static inline void set_perf_counter_pending(void) {} |
8 | static inline void clear_perf_counter_pending(void) {} | 8 | static inline void clear_perf_counter_pending(void) {} |
9 | |||
10 | #define PERF_COUNTER_INDEX_OFFSET 0 | ||
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 925bcc649035..ba1cab9fc1f9 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -61,7 +61,7 @@ struct thread_info { | |||
61 | .exec_domain = &default_exec_domain, \ | 61 | .exec_domain = &default_exec_domain, \ |
62 | .flags = 0, \ | 62 | .flags = 0, \ |
63 | .cpu = 0, \ | 63 | .cpu = 0, \ |
64 | .preempt_count = 1, \ | 64 | .preempt_count = INIT_PREEMPT_COUNT, \ |
65 | .restart_block = { \ | 65 | .restart_block = { \ |
66 | .fn = do_no_restart_syscall, \ | 66 | .fn = do_no_restart_syscall, \ |
67 | }, \ | 67 | }, \ |
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index d2f270c995d9..db943a7ec513 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/smp_lock.h> | ||
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index b8bf4b140065..371a2d88f4ac 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -70,6 +70,7 @@ struct shutdown_action { | |||
70 | char *name; | 70 | char *name; |
71 | void (*fn) (struct shutdown_trigger *trigger); | 71 | void (*fn) (struct shutdown_trigger *trigger); |
72 | int (*init) (void); | 72 | int (*init) (void); |
73 | int init_rc; | ||
73 | }; | 74 | }; |
74 | 75 | ||
75 | static char *ipl_type_str(enum ipl_type type) | 76 | static char *ipl_type_str(enum ipl_type type) |
@@ -1486,11 +1487,13 @@ static int set_trigger(const char *buf, struct shutdown_trigger *trigger, | |||
1486 | int i; | 1487 | int i; |
1487 | 1488 | ||
1488 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { | 1489 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { |
1489 | if (!shutdown_actions_list[i]) | ||
1490 | continue; | ||
1491 | if (sysfs_streq(buf, shutdown_actions_list[i]->name)) { | 1490 | if (sysfs_streq(buf, shutdown_actions_list[i]->name)) { |
1492 | trigger->action = shutdown_actions_list[i]; | 1491 | if (shutdown_actions_list[i]->init_rc) { |
1493 | return len; | 1492 | return shutdown_actions_list[i]->init_rc; |
1493 | } else { | ||
1494 | trigger->action = shutdown_actions_list[i]; | ||
1495 | return len; | ||
1496 | } | ||
1494 | } | 1497 | } |
1495 | } | 1498 | } |
1496 | return -EINVAL; | 1499 | return -EINVAL; |
@@ -1640,8 +1643,8 @@ static void __init shutdown_actions_init(void) | |||
1640 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { | 1643 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { |
1641 | if (!shutdown_actions_list[i]->init) | 1644 | if (!shutdown_actions_list[i]->init) |
1642 | continue; | 1645 | continue; |
1643 | if (shutdown_actions_list[i]->init()) | 1646 | shutdown_actions_list[i]->init_rc = |
1644 | shutdown_actions_list[i] = NULL; | 1647 | shutdown_actions_list[i]->init(); |
1645 | } | 1648 | } |
1646 | } | 1649 | } |
1647 | 1650 | ||
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 490b39934d65..43acd73105b7 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/smp.h> | 28 | #include <linux/smp.h> |
29 | #include <linux/smp_lock.h> | ||
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
31 | #include <linux/ptrace.h> | 30 | #include <linux/ptrace.h> |
32 | #include <linux/user.h> | 31 | #include <linux/user.h> |
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index ab6735df2d21..97975ec7a274 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile | |||
@@ -3,6 +3,6 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y += delay.o string.o uaccess_std.o uaccess_pt.o | 5 | lib-y += delay.o string.o uaccess_std.o uaccess_pt.o |
6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o | 6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o ucmpdi2.o |
7 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o | 7 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o |
8 | lib-$(CONFIG_SMP) += spinlock.o | 8 | lib-$(CONFIG_SMP) += spinlock.o |
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 3f5f680726ed..97c1eca83cc2 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
@@ -36,9 +36,11 @@ static void __udelay_disabled(unsigned long usecs) | |||
36 | cr0 = (cr0_saved & 0xffff00e0) | 0x00000800; | 36 | cr0 = (cr0_saved & 0xffff00e0) | 0x00000800; |
37 | __ctl_load(cr0 , 0, 0); | 37 | __ctl_load(cr0 , 0, 0); |
38 | mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT; | 38 | mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT; |
39 | lockdep_off(); | ||
39 | trace_hardirqs_on(); | 40 | trace_hardirqs_on(); |
40 | __load_psw_mask(mask); | 41 | __load_psw_mask(mask); |
41 | local_irq_disable(); | 42 | local_irq_disable(); |
43 | lockdep_on(); | ||
42 | __ctl_load(cr0_saved, 0, 0); | 44 | __ctl_load(cr0_saved, 0, 0); |
43 | local_tick_enable(clock_saved); | 45 | local_tick_enable(clock_saved); |
44 | set_clock_comparator(S390_lowcore.clock_comparator); | 46 | set_clock_comparator(S390_lowcore.clock_comparator); |
diff --git a/arch/s390/lib/ucmpdi2.c b/arch/s390/lib/ucmpdi2.c new file mode 100644 index 000000000000..3e05ff532582 --- /dev/null +++ b/arch/s390/lib/ucmpdi2.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include <linux/module.h> | ||
2 | |||
3 | union ull_union { | ||
4 | unsigned long long ull; | ||
5 | struct { | ||
6 | unsigned int high; | ||
7 | unsigned int low; | ||
8 | } ui; | ||
9 | }; | ||
10 | |||
11 | int __ucmpdi2(unsigned long long a, unsigned long long b) | ||
12 | { | ||
13 | union ull_union au = {.ull = a}; | ||
14 | union ull_union bu = {.ull = b}; | ||
15 | |||
16 | if (au.ui.high < bu.ui.high) | ||
17 | return 0; | ||
18 | else if (au.ui.high > bu.ui.high) | ||
19 | return 2; | ||
20 | if (au.ui.low < bu.ui.low) | ||
21 | return 0; | ||
22 | else if (au.ui.low > bu.ui.low) | ||
23 | return 2; | ||
24 | return 1; | ||
25 | } | ||
26 | EXPORT_SYMBOL(__ucmpdi2); | ||
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 74eb26bf1970..e5e119fe03b2 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/compat.h> | 22 | #include <linux/compat.h> |
23 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
24 | #include <linux/kdebug.h> | 24 | #include <linux/kdebug.h> |
25 | #include <linux/smp_lock.h> | ||
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/console.h> | 26 | #include <linux/console.h> |
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index f09ac4806294..d570ac2e5cb9 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -51,7 +51,7 @@ struct thread_info { | |||
51 | .exec_domain = &default_exec_domain, \ | 51 | .exec_domain = &default_exec_domain, \ |
52 | .flags = 0, \ | 52 | .flags = 0, \ |
53 | .cpu = 0, \ | 53 | .cpu = 0, \ |
54 | .preempt_count = 1, \ | 54 | .preempt_count = INIT_PREEMPT_COUNT, \ |
55 | .addr_limit = KERNEL_DS, \ | 55 | .addr_limit = KERNEL_DS, \ |
56 | .restart_block = { \ | 56 | .restart_block = { \ |
57 | .fn = do_no_restart_syscall, \ | 57 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/sh/mm/tlb-sh3.c b/arch/sh/mm/tlb-sh3.c index 7fbfd5a11ffa..17cb7c3adf22 100644 --- a/arch/sh/mm/tlb-sh3.c +++ b/arch/sh/mm/tlb-sh3.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/mman.h> | 18 | #include <linux/mman.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
21 | #include <linux/smp_lock.h> | ||
22 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
23 | 22 | ||
24 | #include <asm/system.h> | 23 | #include <asm/system.h> |
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 0f7b0e5fb1c7..844d73a0340c 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -54,8 +54,6 @@ struct thread_info { | |||
54 | 54 | ||
55 | /* | 55 | /* |
56 | * macros/functions for gaining access to the thread information structure | 56 | * macros/functions for gaining access to the thread information structure |
57 | * | ||
58 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
59 | */ | 57 | */ |
60 | #define INIT_THREAD_INFO(tsk) \ | 58 | #define INIT_THREAD_INFO(tsk) \ |
61 | { \ | 59 | { \ |
@@ -64,7 +62,7 @@ struct thread_info { | |||
64 | .exec_domain = &default_exec_domain, \ | 62 | .exec_domain = &default_exec_domain, \ |
65 | .flags = 0, \ | 63 | .flags = 0, \ |
66 | .cpu = 0, \ | 64 | .cpu = 0, \ |
67 | .preempt_count = 1, \ | 65 | .preempt_count = INIT_PREEMPT_COUNT, \ |
68 | .restart_block = { \ | 66 | .restart_block = { \ |
69 | .fn = do_no_restart_syscall, \ | 67 | .fn = do_no_restart_syscall, \ |
70 | }, \ | 68 | }, \ |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 65865726b283..1b45a7bbe407 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -125,8 +125,6 @@ struct thread_info { | |||
125 | 125 | ||
126 | /* | 126 | /* |
127 | * macros/functions for gaining access to the thread information structure | 127 | * macros/functions for gaining access to the thread information structure |
128 | * | ||
129 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
130 | */ | 128 | */ |
131 | #ifndef __ASSEMBLY__ | 129 | #ifndef __ASSEMBLY__ |
132 | 130 | ||
@@ -135,7 +133,7 @@ struct thread_info { | |||
135 | .task = &tsk, \ | 133 | .task = &tsk, \ |
136 | .flags = ((unsigned long)ASI_P) << TI_FLAG_CURRENT_DS_SHIFT, \ | 134 | .flags = ((unsigned long)ASI_P) << TI_FLAG_CURRENT_DS_SHIFT, \ |
137 | .exec_domain = &default_exec_domain, \ | 135 | .exec_domain = &default_exec_domain, \ |
138 | .preempt_count = 1, \ | 136 | .preempt_count = INIT_PREEMPT_COUNT, \ |
139 | .restart_block = { \ | 137 | .restart_block = { \ |
140 | .fn = do_no_restart_syscall, \ | 138 | .fn = do_no_restart_syscall, \ |
141 | }, \ | 139 | }, \ |
diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c index 8ce6285a06d5..7e3dfd9bb97e 100644 --- a/arch/sparc/kernel/ptrace_32.c +++ b/arch/sparc/kernel/ptrace_32.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
17 | #include <linux/user.h> | 17 | #include <linux/user.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/smp_lock.h> | ||
20 | #include <linux/security.h> | 19 | #include <linux/security.h> |
21 | #include <linux/signal.h> | 20 | #include <linux/signal.h> |
22 | #include <linux/regset.h> | 21 | #include <linux/regset.h> |
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index a941c610e7ce..4ae91dc2feb9 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
18 | #include <linux/user.h> | 18 | #include <linux/user.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/smp_lock.h> | ||
21 | #include <linux/security.h> | 20 | #include <linux/security.h> |
22 | #include <linux/seccomp.h> | 21 | #include <linux/seccomp.h> |
23 | #include <linux/audit.h> | 22 | #include <linux/audit.h> |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 5c12e79b4bdf..da1218e8ee87 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/smp_lock.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/param.h> | 15 | #include <linux/param.h> |
17 | #include <linux/string.h> | 16 | #include <linux/string.h> |
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c index 358283341b47..c0490c7bbde0 100644 --- a/arch/sparc/kernel/traps_32.c +++ b/arch/sparc/kernel/traps_32.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/smp_lock.h> | ||
17 | #include <linux/kdebug.h> | 16 | #include <linux/kdebug.h> |
18 | 17 | ||
19 | #include <asm/delay.h> | 18 | #include <asm/delay.h> |
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index 753d128ed158..c28c71449a6c 100644 --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c | |||
@@ -224,7 +224,12 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, | |||
224 | if (!strcmp(type, "domain-services-port")) | 224 | if (!strcmp(type, "domain-services-port")) |
225 | bus_id_name = "ds"; | 225 | bus_id_name = "ds"; |
226 | 226 | ||
227 | if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) { | 227 | /* |
228 | * 20 char is the old driver-core name size limit, which is no more. | ||
229 | * This check can probably be removed after review and possible | ||
230 | * adaption of the vio users name length handling. | ||
231 | */ | ||
232 | if (strlen(bus_id_name) >= 20 - 4) { | ||
228 | printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", | 233 | printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", |
229 | bus_id_name); | 234 | bus_id_name); |
230 | return NULL; | 235 | return NULL; |
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h index 62274ab9471f..fd911f855367 100644 --- a/arch/um/include/asm/thread_info.h +++ b/arch/um/include/asm/thread_info.h | |||
@@ -32,7 +32,7 @@ struct thread_info { | |||
32 | .exec_domain = &default_exec_domain, \ | 32 | .exec_domain = &default_exec_domain, \ |
33 | .flags = 0, \ | 33 | .flags = 0, \ |
34 | .cpu = 0, \ | 34 | .cpu = 0, \ |
35 | .preempt_count = 1, \ | 35 | .preempt_count = INIT_PREEMPT_COUNT, \ |
36 | .addr_limit = KERNEL_DS, \ | 36 | .addr_limit = KERNEL_DS, \ |
37 | .restart_block = { \ | 37 | .restart_block = { \ |
38 | .fn = do_no_restart_syscall, \ | 38 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/x86/include/asm/atomic_32.h b/arch/x86/include/asm/atomic_32.h index 2503d4e64c2a..dc5a667ff791 100644 --- a/arch/x86/include/asm/atomic_32.h +++ b/arch/x86/include/asm/atomic_32.h | |||
@@ -19,7 +19,10 @@ | |||
19 | * | 19 | * |
20 | * Atomically reads the value of @v. | 20 | * Atomically reads the value of @v. |
21 | */ | 21 | */ |
22 | #define atomic_read(v) ((v)->counter) | 22 | static inline int atomic_read(const atomic_t *v) |
23 | { | ||
24 | return v->counter; | ||
25 | } | ||
23 | 26 | ||
24 | /** | 27 | /** |
25 | * atomic_set - set atomic variable | 28 | * atomic_set - set atomic variable |
@@ -28,7 +31,10 @@ | |||
28 | * | 31 | * |
29 | * Atomically sets the value of @v to @i. | 32 | * Atomically sets the value of @v to @i. |
30 | */ | 33 | */ |
31 | #define atomic_set(v, i) (((v)->counter) = (i)) | 34 | static inline void atomic_set(atomic_t *v, int i) |
35 | { | ||
36 | v->counter = i; | ||
37 | } | ||
32 | 38 | ||
33 | /** | 39 | /** |
34 | * atomic_add - add integer to atomic variable | 40 | * atomic_add - add integer to atomic variable |
@@ -200,8 +206,15 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
200 | return atomic_add_return(-i, v); | 206 | return atomic_add_return(-i, v); |
201 | } | 207 | } |
202 | 208 | ||
203 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 209 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) |
204 | #define atomic_xchg(v, new) (xchg(&((v)->counter), (new))) | 210 | { |
211 | return cmpxchg(&v->counter, old, new); | ||
212 | } | ||
213 | |||
214 | static inline int atomic_xchg(atomic_t *v, int new) | ||
215 | { | ||
216 | return xchg(&v->counter, new); | ||
217 | } | ||
205 | 218 | ||
206 | /** | 219 | /** |
207 | * atomic_add_unless - add unless the number is already a given value | 220 | * atomic_add_unless - add unless the number is already a given value |
@@ -250,45 +263,12 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
250 | /* An 64bit atomic type */ | 263 | /* An 64bit atomic type */ |
251 | 264 | ||
252 | typedef struct { | 265 | typedef struct { |
253 | unsigned long long counter; | 266 | u64 __aligned(8) counter; |
254 | } atomic64_t; | 267 | } atomic64_t; |
255 | 268 | ||
256 | #define ATOMIC64_INIT(val) { (val) } | 269 | #define ATOMIC64_INIT(val) { (val) } |
257 | 270 | ||
258 | /** | 271 | extern u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old_val, u64 new_val); |
259 | * atomic64_read - read atomic64 variable | ||
260 | * @ptr: pointer of type atomic64_t | ||
261 | * | ||
262 | * Atomically reads the value of @v. | ||
263 | * Doesn't imply a read memory barrier. | ||
264 | */ | ||
265 | #define __atomic64_read(ptr) ((ptr)->counter) | ||
266 | |||
267 | static inline unsigned long long | ||
268 | cmpxchg8b(unsigned long long *ptr, unsigned long long old, unsigned long long new) | ||
269 | { | ||
270 | asm volatile( | ||
271 | |||
272 | LOCK_PREFIX "cmpxchg8b (%[ptr])\n" | ||
273 | |||
274 | : "=A" (old) | ||
275 | |||
276 | : [ptr] "D" (ptr), | ||
277 | "A" (old), | ||
278 | "b" (ll_low(new)), | ||
279 | "c" (ll_high(new)) | ||
280 | |||
281 | : "memory"); | ||
282 | |||
283 | return old; | ||
284 | } | ||
285 | |||
286 | static inline unsigned long long | ||
287 | atomic64_cmpxchg(atomic64_t *ptr, unsigned long long old_val, | ||
288 | unsigned long long new_val) | ||
289 | { | ||
290 | return cmpxchg8b(&ptr->counter, old_val, new_val); | ||
291 | } | ||
292 | 272 | ||
293 | /** | 273 | /** |
294 | * atomic64_xchg - xchg atomic64 variable | 274 | * atomic64_xchg - xchg atomic64 variable |
@@ -298,18 +278,7 @@ atomic64_cmpxchg(atomic64_t *ptr, unsigned long long old_val, | |||
298 | * Atomically xchgs the value of @ptr to @new_val and returns | 278 | * Atomically xchgs the value of @ptr to @new_val and returns |
299 | * the old value. | 279 | * the old value. |
300 | */ | 280 | */ |
301 | 281 | extern u64 atomic64_xchg(atomic64_t *ptr, u64 new_val); | |
302 | static inline unsigned long long | ||
303 | atomic64_xchg(atomic64_t *ptr, unsigned long long new_val) | ||
304 | { | ||
305 | unsigned long long old_val; | ||
306 | |||
307 | do { | ||
308 | old_val = atomic_read(ptr); | ||
309 | } while (atomic64_cmpxchg(ptr, old_val, new_val) != old_val); | ||
310 | |||
311 | return old_val; | ||
312 | } | ||
313 | 282 | ||
314 | /** | 283 | /** |
315 | * atomic64_set - set atomic64 variable | 284 | * atomic64_set - set atomic64 variable |
@@ -318,10 +287,7 @@ atomic64_xchg(atomic64_t *ptr, unsigned long long new_val) | |||
318 | * | 287 | * |
319 | * Atomically sets the value of @ptr to @new_val. | 288 | * Atomically sets the value of @ptr to @new_val. |
320 | */ | 289 | */ |
321 | static inline void atomic64_set(atomic64_t *ptr, unsigned long long new_val) | 290 | extern void atomic64_set(atomic64_t *ptr, u64 new_val); |
322 | { | ||
323 | atomic64_xchg(ptr, new_val); | ||
324 | } | ||
325 | 291 | ||
326 | /** | 292 | /** |
327 | * atomic64_read - read atomic64 variable | 293 | * atomic64_read - read atomic64 variable |
@@ -329,17 +295,30 @@ static inline void atomic64_set(atomic64_t *ptr, unsigned long long new_val) | |||
329 | * | 295 | * |
330 | * Atomically reads the value of @ptr and returns it. | 296 | * Atomically reads the value of @ptr and returns it. |
331 | */ | 297 | */ |
332 | static inline unsigned long long atomic64_read(atomic64_t *ptr) | 298 | static inline u64 atomic64_read(atomic64_t *ptr) |
333 | { | 299 | { |
334 | unsigned long long curr_val; | 300 | u64 res; |
335 | 301 | ||
336 | do { | 302 | /* |
337 | curr_val = __atomic64_read(ptr); | 303 | * Note, we inline this atomic64_t primitive because |
338 | } while (atomic64_cmpxchg(ptr, curr_val, curr_val) != curr_val); | 304 | * it only clobbers EAX/EDX and leaves the others |
339 | 305 | * untouched. We also (somewhat subtly) rely on the | |
340 | return curr_val; | 306 | * fact that cmpxchg8b returns the current 64-bit value |
307 | * of the memory location we are touching: | ||
308 | */ | ||
309 | asm volatile( | ||
310 | "mov %%ebx, %%eax\n\t" | ||
311 | "mov %%ecx, %%edx\n\t" | ||
312 | LOCK_PREFIX "cmpxchg8b %1\n" | ||
313 | : "=&A" (res) | ||
314 | : "m" (*ptr) | ||
315 | ); | ||
316 | |||
317 | return res; | ||
341 | } | 318 | } |
342 | 319 | ||
320 | extern u64 atomic64_read(atomic64_t *ptr); | ||
321 | |||
343 | /** | 322 | /** |
344 | * atomic64_add_return - add and return | 323 | * atomic64_add_return - add and return |
345 | * @delta: integer value to add | 324 | * @delta: integer value to add |
@@ -347,34 +326,14 @@ static inline unsigned long long atomic64_read(atomic64_t *ptr) | |||
347 | * | 326 | * |
348 | * Atomically adds @delta to @ptr and returns @delta + *@ptr | 327 | * Atomically adds @delta to @ptr and returns @delta + *@ptr |
349 | */ | 328 | */ |
350 | static inline unsigned long long | 329 | extern u64 atomic64_add_return(u64 delta, atomic64_t *ptr); |
351 | atomic64_add_return(unsigned long long delta, atomic64_t *ptr) | ||
352 | { | ||
353 | unsigned long long old_val, new_val; | ||
354 | |||
355 | do { | ||
356 | old_val = atomic_read(ptr); | ||
357 | new_val = old_val + delta; | ||
358 | |||
359 | } while (atomic64_cmpxchg(ptr, old_val, new_val) != old_val); | ||
360 | |||
361 | return new_val; | ||
362 | } | ||
363 | |||
364 | static inline long atomic64_sub_return(unsigned long long delta, atomic64_t *ptr) | ||
365 | { | ||
366 | return atomic64_add_return(-delta, ptr); | ||
367 | } | ||
368 | 330 | ||
369 | static inline long atomic64_inc_return(atomic64_t *ptr) | 331 | /* |
370 | { | 332 | * Other variants with different arithmetic operators: |
371 | return atomic64_add_return(1, ptr); | 333 | */ |
372 | } | 334 | extern u64 atomic64_sub_return(u64 delta, atomic64_t *ptr); |
373 | 335 | extern u64 atomic64_inc_return(atomic64_t *ptr); | |
374 | static inline long atomic64_dec_return(atomic64_t *ptr) | 336 | extern u64 atomic64_dec_return(atomic64_t *ptr); |
375 | { | ||
376 | return atomic64_sub_return(1, ptr); | ||
377 | } | ||
378 | 337 | ||
379 | /** | 338 | /** |
380 | * atomic64_add - add integer to atomic64 variable | 339 | * atomic64_add - add integer to atomic64 variable |
@@ -383,10 +342,7 @@ static inline long atomic64_dec_return(atomic64_t *ptr) | |||
383 | * | 342 | * |
384 | * Atomically adds @delta to @ptr. | 343 | * Atomically adds @delta to @ptr. |
385 | */ | 344 | */ |
386 | static inline void atomic64_add(unsigned long long delta, atomic64_t *ptr) | 345 | extern void atomic64_add(u64 delta, atomic64_t *ptr); |
387 | { | ||
388 | atomic64_add_return(delta, ptr); | ||
389 | } | ||
390 | 346 | ||
391 | /** | 347 | /** |
392 | * atomic64_sub - subtract the atomic64 variable | 348 | * atomic64_sub - subtract the atomic64 variable |
@@ -395,10 +351,7 @@ static inline void atomic64_add(unsigned long long delta, atomic64_t *ptr) | |||
395 | * | 351 | * |
396 | * Atomically subtracts @delta from @ptr. | 352 | * Atomically subtracts @delta from @ptr. |
397 | */ | 353 | */ |
398 | static inline void atomic64_sub(unsigned long long delta, atomic64_t *ptr) | 354 | extern void atomic64_sub(u64 delta, atomic64_t *ptr); |
399 | { | ||
400 | atomic64_add(-delta, ptr); | ||
401 | } | ||
402 | 355 | ||
403 | /** | 356 | /** |
404 | * atomic64_sub_and_test - subtract value from variable and test result | 357 | * atomic64_sub_and_test - subtract value from variable and test result |
@@ -409,13 +362,7 @@ static inline void atomic64_sub(unsigned long long delta, atomic64_t *ptr) | |||
409 | * true if the result is zero, or false for all | 362 | * true if the result is zero, or false for all |
410 | * other cases. | 363 | * other cases. |
411 | */ | 364 | */ |
412 | static inline int | 365 | extern int atomic64_sub_and_test(u64 delta, atomic64_t *ptr); |
413 | atomic64_sub_and_test(unsigned long long delta, atomic64_t *ptr) | ||
414 | { | ||
415 | unsigned long long old_val = atomic64_sub_return(delta, ptr); | ||
416 | |||
417 | return old_val == 0; | ||
418 | } | ||
419 | 366 | ||
420 | /** | 367 | /** |
421 | * atomic64_inc - increment atomic64 variable | 368 | * atomic64_inc - increment atomic64 variable |
@@ -423,10 +370,7 @@ atomic64_sub_and_test(unsigned long long delta, atomic64_t *ptr) | |||
423 | * | 370 | * |
424 | * Atomically increments @ptr by 1. | 371 | * Atomically increments @ptr by 1. |
425 | */ | 372 | */ |
426 | static inline void atomic64_inc(atomic64_t *ptr) | 373 | extern void atomic64_inc(atomic64_t *ptr); |
427 | { | ||
428 | atomic64_add(1, ptr); | ||
429 | } | ||
430 | 374 | ||
431 | /** | 375 | /** |
432 | * atomic64_dec - decrement atomic64 variable | 376 | * atomic64_dec - decrement atomic64 variable |
@@ -434,10 +378,7 @@ static inline void atomic64_inc(atomic64_t *ptr) | |||
434 | * | 378 | * |
435 | * Atomically decrements @ptr by 1. | 379 | * Atomically decrements @ptr by 1. |
436 | */ | 380 | */ |
437 | static inline void atomic64_dec(atomic64_t *ptr) | 381 | extern void atomic64_dec(atomic64_t *ptr); |
438 | { | ||
439 | atomic64_sub(1, ptr); | ||
440 | } | ||
441 | 382 | ||
442 | /** | 383 | /** |
443 | * atomic64_dec_and_test - decrement and test | 384 | * atomic64_dec_and_test - decrement and test |
@@ -447,10 +388,7 @@ static inline void atomic64_dec(atomic64_t *ptr) | |||
447 | * returns true if the result is 0, or false for all other | 388 | * returns true if the result is 0, or false for all other |
448 | * cases. | 389 | * cases. |
449 | */ | 390 | */ |
450 | static inline int atomic64_dec_and_test(atomic64_t *ptr) | 391 | extern int atomic64_dec_and_test(atomic64_t *ptr); |
451 | { | ||
452 | return atomic64_sub_and_test(1, ptr); | ||
453 | } | ||
454 | 392 | ||
455 | /** | 393 | /** |
456 | * atomic64_inc_and_test - increment and test | 394 | * atomic64_inc_and_test - increment and test |
@@ -460,10 +398,7 @@ static inline int atomic64_dec_and_test(atomic64_t *ptr) | |||
460 | * and returns true if the result is zero, or false for all | 398 | * and returns true if the result is zero, or false for all |
461 | * other cases. | 399 | * other cases. |
462 | */ | 400 | */ |
463 | static inline int atomic64_inc_and_test(atomic64_t *ptr) | 401 | extern int atomic64_inc_and_test(atomic64_t *ptr); |
464 | { | ||
465 | return atomic64_sub_and_test(-1, ptr); | ||
466 | } | ||
467 | 402 | ||
468 | /** | 403 | /** |
469 | * atomic64_add_negative - add and test if negative | 404 | * atomic64_add_negative - add and test if negative |
@@ -474,13 +409,7 @@ static inline int atomic64_inc_and_test(atomic64_t *ptr) | |||
474 | * if the result is negative, or false when | 409 | * if the result is negative, or false when |
475 | * result is greater than or equal to zero. | 410 | * result is greater than or equal to zero. |
476 | */ | 411 | */ |
477 | static inline int | 412 | extern int atomic64_add_negative(u64 delta, atomic64_t *ptr); |
478 | atomic64_add_negative(unsigned long long delta, atomic64_t *ptr) | ||
479 | { | ||
480 | long long old_val = atomic64_add_return(delta, ptr); | ||
481 | |||
482 | return old_val < 0; | ||
483 | } | ||
484 | 413 | ||
485 | #include <asm-generic/atomic-long.h> | 414 | #include <asm-generic/atomic-long.h> |
486 | #endif /* _ASM_X86_ATOMIC_32_H */ | 415 | #endif /* _ASM_X86_ATOMIC_32_H */ |
diff --git a/arch/x86/include/asm/atomic_64.h b/arch/x86/include/asm/atomic_64.h index 0d6360220007..d605dc268e79 100644 --- a/arch/x86/include/asm/atomic_64.h +++ b/arch/x86/include/asm/atomic_64.h | |||
@@ -18,7 +18,10 @@ | |||
18 | * | 18 | * |
19 | * Atomically reads the value of @v. | 19 | * Atomically reads the value of @v. |
20 | */ | 20 | */ |
21 | #define atomic_read(v) ((v)->counter) | 21 | static inline int atomic_read(const atomic_t *v) |
22 | { | ||
23 | return v->counter; | ||
24 | } | ||
22 | 25 | ||
23 | /** | 26 | /** |
24 | * atomic_set - set atomic variable | 27 | * atomic_set - set atomic variable |
@@ -27,7 +30,10 @@ | |||
27 | * | 30 | * |
28 | * Atomically sets the value of @v to @i. | 31 | * Atomically sets the value of @v to @i. |
29 | */ | 32 | */ |
30 | #define atomic_set(v, i) (((v)->counter) = (i)) | 33 | static inline void atomic_set(atomic_t *v, int i) |
34 | { | ||
35 | v->counter = i; | ||
36 | } | ||
31 | 37 | ||
32 | /** | 38 | /** |
33 | * atomic_add - add integer to atomic variable | 39 | * atomic_add - add integer to atomic variable |
@@ -192,7 +198,10 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
192 | * Atomically reads the value of @v. | 198 | * Atomically reads the value of @v. |
193 | * Doesn't imply a read memory barrier. | 199 | * Doesn't imply a read memory barrier. |
194 | */ | 200 | */ |
195 | #define atomic64_read(v) ((v)->counter) | 201 | static inline long atomic64_read(const atomic64_t *v) |
202 | { | ||
203 | return v->counter; | ||
204 | } | ||
196 | 205 | ||
197 | /** | 206 | /** |
198 | * atomic64_set - set atomic64 variable | 207 | * atomic64_set - set atomic64 variable |
@@ -201,7 +210,10 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
201 | * | 210 | * |
202 | * Atomically sets the value of @v to @i. | 211 | * Atomically sets the value of @v to @i. |
203 | */ | 212 | */ |
204 | #define atomic64_set(v, i) (((v)->counter) = (i)) | 213 | static inline void atomic64_set(atomic64_t *v, long i) |
214 | { | ||
215 | v->counter = i; | ||
216 | } | ||
205 | 217 | ||
206 | /** | 218 | /** |
207 | * atomic64_add - add integer to atomic64 variable | 219 | * atomic64_add - add integer to atomic64 variable |
@@ -355,11 +367,25 @@ static inline long atomic64_sub_return(long i, atomic64_t *v) | |||
355 | #define atomic64_inc_return(v) (atomic64_add_return(1, (v))) | 367 | #define atomic64_inc_return(v) (atomic64_add_return(1, (v))) |
356 | #define atomic64_dec_return(v) (atomic64_sub_return(1, (v))) | 368 | #define atomic64_dec_return(v) (atomic64_sub_return(1, (v))) |
357 | 369 | ||
358 | #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 370 | static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new) |
359 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) | 371 | { |
372 | return cmpxchg(&v->counter, old, new); | ||
373 | } | ||
374 | |||
375 | static inline long atomic64_xchg(atomic64_t *v, long new) | ||
376 | { | ||
377 | return xchg(&v->counter, new); | ||
378 | } | ||
360 | 379 | ||
361 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 380 | static inline long atomic_cmpxchg(atomic_t *v, int old, int new) |
362 | #define atomic_xchg(v, new) (xchg(&((v)->counter), (new))) | 381 | { |
382 | return cmpxchg(&v->counter, old, new); | ||
383 | } | ||
384 | |||
385 | static inline long atomic_xchg(atomic_t *v, int new) | ||
386 | { | ||
387 | return xchg(&v->counter, new); | ||
388 | } | ||
363 | 389 | ||
364 | /** | 390 | /** |
365 | * atomic_add_unless - add unless the number is a given value | 391 | * atomic_add_unless - add unless the number is a given value |
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index daf866ed0612..330ee807f89e 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -161,6 +161,7 @@ extern int io_apic_set_pci_routing(struct device *dev, int irq, | |||
161 | struct io_apic_irq_attr *irq_attr); | 161 | struct io_apic_irq_attr *irq_attr); |
162 | extern int (*ioapic_renumber_irq)(int ioapic, int irq); | 162 | extern int (*ioapic_renumber_irq)(int ioapic, int irq); |
163 | extern void ioapic_init_mappings(void); | 163 | extern void ioapic_init_mappings(void); |
164 | extern void ioapic_insert_resources(void); | ||
164 | 165 | ||
165 | extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); | 166 | extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); |
166 | extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); | 167 | extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); |
@@ -180,6 +181,7 @@ extern void ioapic_write_entry(int apic, int pin, | |||
180 | #define io_apic_assign_pci_irqs 0 | 181 | #define io_apic_assign_pci_irqs 0 |
181 | static const int timer_through_8259 = 0; | 182 | static const int timer_through_8259 = 0; |
182 | static inline void ioapic_init_mappings(void) { } | 183 | static inline void ioapic_init_mappings(void) { } |
184 | static inline void ioapic_insert_resources(void) { } | ||
183 | 185 | ||
184 | static inline void probe_nr_irqs_gsi(void) { } | 186 | static inline void probe_nr_irqs_gsi(void) { } |
185 | #endif | 187 | #endif |
diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h index d31c4a684078..33600a66755f 100644 --- a/arch/x86/include/asm/lguest_hcall.h +++ b/arch/x86/include/asm/lguest_hcall.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/hw_irq.h> | 30 | #include <asm/hw_irq.h> |
31 | #include <asm/kvm_para.h> | 31 | #include <asm/kvm_para.h> |
32 | 32 | ||
33 | /*G:031 But first, how does our Guest contact the Host to ask for privileged | 33 | /*G:030 But first, how does our Guest contact the Host to ask for privileged |
34 | * operations? There are two ways: the direct way is to make a "hypercall", | 34 | * operations? There are two ways: the direct way is to make a "hypercall", |
35 | * to make requests of the Host Itself. | 35 | * to make requests of the Host Itself. |
36 | * | 36 | * |
diff --git a/arch/x86/include/asm/stacktrace.h b/arch/x86/include/asm/stacktrace.h index f517944b2b17..cf86a5e73815 100644 --- a/arch/x86/include/asm/stacktrace.h +++ b/arch/x86/include/asm/stacktrace.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | extern int kstack_depth_to_print; | 4 | extern int kstack_depth_to_print; |
5 | 5 | ||
6 | int x86_is_stack_id(int id, char *name); | ||
7 | |||
6 | /* Generic stack tracer with callbacks */ | 8 | /* Generic stack tracer with callbacks */ |
7 | 9 | ||
8 | struct stacktrace_ops { | 10 | struct stacktrace_ops { |
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index b0783520988b..fad7d40b75f8 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -49,7 +49,7 @@ struct thread_info { | |||
49 | .exec_domain = &default_exec_domain, \ | 49 | .exec_domain = &default_exec_domain, \ |
50 | .flags = 0, \ | 50 | .flags = 0, \ |
51 | .cpu = 0, \ | 51 | .cpu = 0, \ |
52 | .preempt_count = 1, \ | 52 | .preempt_count = INIT_PREEMPT_COUNT, \ |
53 | .addr_limit = KERNEL_DS, \ | 53 | .addr_limit = KERNEL_DS, \ |
54 | .restart_block = { \ | 54 | .restart_block = { \ |
55 | .fn = do_no_restart_syscall, \ | 55 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c index 69328ac8de9c..8952a5890281 100644 --- a/arch/x86/kernel/apic/es7000_32.c +++ b/arch/x86/kernel/apic/es7000_32.c | |||
@@ -652,7 +652,8 @@ static int es7000_mps_oem_check_cluster(struct mpc_table *mpc, char *oem, | |||
652 | return ret && es7000_apic_is_cluster(); | 652 | return ret && es7000_apic_is_cluster(); |
653 | } | 653 | } |
654 | 654 | ||
655 | struct apic apic_es7000_cluster = { | 655 | /* We've been warned by a false positive warning.Use __refdata to keep calm. */ |
656 | struct apic __refdata apic_es7000_cluster = { | ||
656 | 657 | ||
657 | .name = "es7000", | 658 | .name = "es7000", |
658 | .probe = probe_es7000, | 659 | .probe = probe_es7000, |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 90b5e6efa938..2284a4812b68 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -4181,28 +4181,20 @@ fake_ioapic_page: | |||
4181 | } | 4181 | } |
4182 | } | 4182 | } |
4183 | 4183 | ||
4184 | static int __init ioapic_insert_resources(void) | 4184 | void __init ioapic_insert_resources(void) |
4185 | { | 4185 | { |
4186 | int i; | 4186 | int i; |
4187 | struct resource *r = ioapic_resources; | 4187 | struct resource *r = ioapic_resources; |
4188 | 4188 | ||
4189 | if (!r) { | 4189 | if (!r) { |
4190 | if (nr_ioapics > 0) { | 4190 | if (nr_ioapics > 0) |
4191 | printk(KERN_ERR | 4191 | printk(KERN_ERR |
4192 | "IO APIC resources couldn't be allocated.\n"); | 4192 | "IO APIC resources couldn't be allocated.\n"); |
4193 | return -1; | 4193 | return; |
4194 | } | ||
4195 | return 0; | ||
4196 | } | 4194 | } |
4197 | 4195 | ||
4198 | for (i = 0; i < nr_ioapics; i++) { | 4196 | for (i = 0; i < nr_ioapics; i++) { |
4199 | insert_resource(&iomem_resource, r); | 4197 | insert_resource(&iomem_resource, r); |
4200 | r++; | 4198 | r++; |
4201 | } | 4199 | } |
4202 | |||
4203 | return 0; | ||
4204 | } | 4200 | } |
4205 | |||
4206 | /* Insert the IO APIC resources after PCI initialization has occured to handle | ||
4207 | * IO APICS that are mapped in on a BAR in PCI space. */ | ||
4208 | late_initcall(ioapic_insert_resources); | ||
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c index 533e59c6fc82..ca96e68f0d23 100644 --- a/arch/x86/kernel/apic/numaq_32.c +++ b/arch/x86/kernel/apic/numaq_32.c | |||
@@ -493,7 +493,8 @@ static void numaq_setup_portio_remap(void) | |||
493 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); | 493 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); |
494 | } | 494 | } |
495 | 495 | ||
496 | struct apic apic_numaq = { | 496 | /* Use __refdata to keep false positive warning calm. */ |
497 | struct apic __refdata apic_numaq = { | ||
497 | 498 | ||
498 | .name = "NUMAQ", | 499 | .name = "NUMAQ", |
499 | .probe = probe_numaq, | 500 | .probe = probe_numaq, |
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index d4cf4ce19aac..36c3dc7b8991 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c | |||
@@ -1561,6 +1561,7 @@ void callchain_store(struct perf_callchain_entry *entry, u64 ip) | |||
1561 | 1561 | ||
1562 | static DEFINE_PER_CPU(struct perf_callchain_entry, irq_entry); | 1562 | static DEFINE_PER_CPU(struct perf_callchain_entry, irq_entry); |
1563 | static DEFINE_PER_CPU(struct perf_callchain_entry, nmi_entry); | 1563 | static DEFINE_PER_CPU(struct perf_callchain_entry, nmi_entry); |
1564 | static DEFINE_PER_CPU(int, in_nmi_frame); | ||
1564 | 1565 | ||
1565 | 1566 | ||
1566 | static void | 1567 | static void |
@@ -1576,7 +1577,9 @@ static void backtrace_warning(void *data, char *msg) | |||
1576 | 1577 | ||
1577 | static int backtrace_stack(void *data, char *name) | 1578 | static int backtrace_stack(void *data, char *name) |
1578 | { | 1579 | { |
1579 | /* Process all stacks: */ | 1580 | per_cpu(in_nmi_frame, smp_processor_id()) = |
1581 | x86_is_stack_id(NMI_STACK, name); | ||
1582 | |||
1580 | return 0; | 1583 | return 0; |
1581 | } | 1584 | } |
1582 | 1585 | ||
@@ -1584,6 +1587,9 @@ static void backtrace_address(void *data, unsigned long addr, int reliable) | |||
1584 | { | 1587 | { |
1585 | struct perf_callchain_entry *entry = data; | 1588 | struct perf_callchain_entry *entry = data; |
1586 | 1589 | ||
1590 | if (per_cpu(in_nmi_frame, smp_processor_id())) | ||
1591 | return; | ||
1592 | |||
1587 | if (reliable) | 1593 | if (reliable) |
1588 | callchain_store(entry, addr); | 1594 | callchain_store(entry, addr); |
1589 | } | 1595 | } |
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c index d593cd1f58dc..bca5fba91c9e 100644 --- a/arch/x86/kernel/dumpstack_32.c +++ b/arch/x86/kernel/dumpstack_32.c | |||
@@ -19,6 +19,12 @@ | |||
19 | 19 | ||
20 | #include "dumpstack.h" | 20 | #include "dumpstack.h" |
21 | 21 | ||
22 | /* Just a stub for now */ | ||
23 | int x86_is_stack_id(int id, char *name) | ||
24 | { | ||
25 | return 0; | ||
26 | } | ||
27 | |||
22 | void dump_trace(struct task_struct *task, struct pt_regs *regs, | 28 | void dump_trace(struct task_struct *task, struct pt_regs *regs, |
23 | unsigned long *stack, unsigned long bp, | 29 | unsigned long *stack, unsigned long bp, |
24 | const struct stacktrace_ops *ops, void *data) | 30 | const struct stacktrace_ops *ops, void *data) |
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index d35db5993fd6..54b0a3276766 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -19,10 +19,8 @@ | |||
19 | 19 | ||
20 | #include "dumpstack.h" | 20 | #include "dumpstack.h" |
21 | 21 | ||
22 | static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | 22 | |
23 | unsigned *usedp, char **idp) | 23 | static char x86_stack_ids[][8] = { |
24 | { | ||
25 | static char ids[][8] = { | ||
26 | [DEBUG_STACK - 1] = "#DB", | 24 | [DEBUG_STACK - 1] = "#DB", |
27 | [NMI_STACK - 1] = "NMI", | 25 | [NMI_STACK - 1] = "NMI", |
28 | [DOUBLEFAULT_STACK - 1] = "#DF", | 26 | [DOUBLEFAULT_STACK - 1] = "#DF", |
@@ -33,6 +31,15 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
33 | N_EXCEPTION_STACKS + DEBUG_STKSZ / EXCEPTION_STKSZ - 2] = "#DB[?]" | 31 | N_EXCEPTION_STACKS + DEBUG_STKSZ / EXCEPTION_STKSZ - 2] = "#DB[?]" |
34 | #endif | 32 | #endif |
35 | }; | 33 | }; |
34 | |||
35 | int x86_is_stack_id(int id, char *name) | ||
36 | { | ||
37 | return x86_stack_ids[id - 1] == name; | ||
38 | } | ||
39 | |||
40 | static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | ||
41 | unsigned *usedp, char **idp) | ||
42 | { | ||
36 | unsigned k; | 43 | unsigned k; |
37 | 44 | ||
38 | /* | 45 | /* |
@@ -61,7 +68,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
61 | if (*usedp & (1U << k)) | 68 | if (*usedp & (1U << k)) |
62 | break; | 69 | break; |
63 | *usedp |= 1U << k; | 70 | *usedp |= 1U << k; |
64 | *idp = ids[k]; | 71 | *idp = x86_stack_ids[k]; |
65 | return (unsigned long *)end; | 72 | return (unsigned long *)end; |
66 | } | 73 | } |
67 | /* | 74 | /* |
@@ -81,12 +88,13 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
81 | do { | 88 | do { |
82 | ++j; | 89 | ++j; |
83 | end -= EXCEPTION_STKSZ; | 90 | end -= EXCEPTION_STKSZ; |
84 | ids[j][4] = '1' + (j - N_EXCEPTION_STACKS); | 91 | x86_stack_ids[j][4] = '1' + |
92 | (j - N_EXCEPTION_STACKS); | ||
85 | } while (stack < end - EXCEPTION_STKSZ); | 93 | } while (stack < end - EXCEPTION_STKSZ); |
86 | if (*usedp & (1U << j)) | 94 | if (*usedp & (1U << j)) |
87 | break; | 95 | break; |
88 | *usedp |= 1U << j; | 96 | *usedp |= 1U << j; |
89 | *idp = ids[j]; | 97 | *idp = x86_stack_ids[j]; |
90 | return (unsigned long *)end; | 98 | return (unsigned long *)end; |
91 | } | 99 | } |
92 | #endif | 100 | #endif |
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c index 4f9c55f3a7c0..03801f2f761f 100644 --- a/arch/x86/kernel/pvclock.c +++ b/arch/x86/kernel/pvclock.c | |||
@@ -60,7 +60,7 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift) | |||
60 | "adc %5,%%edx ; " | 60 | "adc %5,%%edx ; " |
61 | : "=A" (product), "=r" (tmp1), "=r" (tmp2) | 61 | : "=A" (product), "=r" (tmp1), "=r" (tmp2) |
62 | : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) ); | 62 | : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) ); |
63 | #elif __x86_64__ | 63 | #elif defined(__x86_64__) |
64 | __asm__ ( | 64 | __asm__ ( |
65 | "mul %%rdx ; shrd $32,%%rdx,%%rax" | 65 | "mul %%rdx ; shrd $32,%%rdx,%%rax" |
66 | : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) ); | 66 | : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) ); |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 7bc65f0f62c4..f2bf1f73d468 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -379,6 +379,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx, | |||
379 | 379 | ||
380 | native_cpuid(ax, bx, cx, dx); | 380 | native_cpuid(ax, bx, cx, dx); |
381 | switch (function) { | 381 | switch (function) { |
382 | case 0: /* ID and highest CPUID. Futureproof a little by sticking to | ||
383 | * older ones. */ | ||
384 | if (*ax > 5) | ||
385 | *ax = 5; | ||
386 | break; | ||
382 | case 1: /* Basic feature request. */ | 387 | case 1: /* Basic feature request. */ |
383 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ | 388 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ |
384 | *cx &= 0x00002201; | 389 | *cx &= 0x00002201; |
@@ -1079,7 +1084,7 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf, | |||
1079 | return insn_len; | 1084 | return insn_len; |
1080 | } | 1085 | } |
1081 | 1086 | ||
1082 | /*G:030 Once we get to lguest_init(), we know we're a Guest. The various | 1087 | /*G:029 Once we get to lguest_init(), we know we're a Guest. The various |
1083 | * pv_ops structures in the kernel provide points for (almost) every routine we | 1088 | * pv_ops structures in the kernel provide points for (almost) every routine we |
1084 | * have to override to avoid privileged instructions. */ | 1089 | * have to override to avoid privileged instructions. */ |
1085 | __init void lguest_init(void) | 1090 | __init void lguest_init(void) |
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index f9d35632666b..07c31899c9c2 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile | |||
@@ -10,6 +10,7 @@ lib-y += usercopy_$(BITS).o getuser.o putuser.o | |||
10 | lib-y += memcpy_$(BITS).o | 10 | lib-y += memcpy_$(BITS).o |
11 | 11 | ||
12 | ifeq ($(CONFIG_X86_32),y) | 12 | ifeq ($(CONFIG_X86_32),y) |
13 | obj-y += atomic64_32.o | ||
13 | lib-y += checksum_32.o | 14 | lib-y += checksum_32.o |
14 | lib-y += strstr_32.o | 15 | lib-y += strstr_32.o |
15 | lib-y += semaphore_32.o string_32.o | 16 | lib-y += semaphore_32.o string_32.o |
diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c new file mode 100644 index 000000000000..824fa0be55a3 --- /dev/null +++ b/arch/x86/lib/atomic64_32.c | |||
@@ -0,0 +1,230 @@ | |||
1 | #include <linux/compiler.h> | ||
2 | #include <linux/module.h> | ||
3 | #include <linux/types.h> | ||
4 | |||
5 | #include <asm/processor.h> | ||
6 | #include <asm/cmpxchg.h> | ||
7 | #include <asm/atomic.h> | ||
8 | |||
9 | static noinline u64 cmpxchg8b(u64 *ptr, u64 old, u64 new) | ||
10 | { | ||
11 | u32 low = new; | ||
12 | u32 high = new >> 32; | ||
13 | |||
14 | asm volatile( | ||
15 | LOCK_PREFIX "cmpxchg8b %1\n" | ||
16 | : "+A" (old), "+m" (*ptr) | ||
17 | : "b" (low), "c" (high) | ||
18 | ); | ||
19 | return old; | ||
20 | } | ||
21 | |||
22 | u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old_val, u64 new_val) | ||
23 | { | ||
24 | return cmpxchg8b(&ptr->counter, old_val, new_val); | ||
25 | } | ||
26 | EXPORT_SYMBOL(atomic64_cmpxchg); | ||
27 | |||
28 | /** | ||
29 | * atomic64_xchg - xchg atomic64 variable | ||
30 | * @ptr: pointer to type atomic64_t | ||
31 | * @new_val: value to assign | ||
32 | * | ||
33 | * Atomically xchgs the value of @ptr to @new_val and returns | ||
34 | * the old value. | ||
35 | */ | ||
36 | u64 atomic64_xchg(atomic64_t *ptr, u64 new_val) | ||
37 | { | ||
38 | /* | ||
39 | * Try first with a (possibly incorrect) assumption about | ||
40 | * what we have there. We'll do two loops most likely, | ||
41 | * but we'll get an ownership MESI transaction straight away | ||
42 | * instead of a read transaction followed by a | ||
43 | * flush-for-ownership transaction: | ||
44 | */ | ||
45 | u64 old_val, real_val = 0; | ||
46 | |||
47 | do { | ||
48 | old_val = real_val; | ||
49 | |||
50 | real_val = atomic64_cmpxchg(ptr, old_val, new_val); | ||
51 | |||
52 | } while (real_val != old_val); | ||
53 | |||
54 | return old_val; | ||
55 | } | ||
56 | EXPORT_SYMBOL(atomic64_xchg); | ||
57 | |||
58 | /** | ||
59 | * atomic64_set - set atomic64 variable | ||
60 | * @ptr: pointer to type atomic64_t | ||
61 | * @new_val: value to assign | ||
62 | * | ||
63 | * Atomically sets the value of @ptr to @new_val. | ||
64 | */ | ||
65 | void atomic64_set(atomic64_t *ptr, u64 new_val) | ||
66 | { | ||
67 | atomic64_xchg(ptr, new_val); | ||
68 | } | ||
69 | EXPORT_SYMBOL(atomic64_set); | ||
70 | |||
71 | /** | ||
72 | EXPORT_SYMBOL(atomic64_read); | ||
73 | * atomic64_add_return - add and return | ||
74 | * @delta: integer value to add | ||
75 | * @ptr: pointer to type atomic64_t | ||
76 | * | ||
77 | * Atomically adds @delta to @ptr and returns @delta + *@ptr | ||
78 | */ | ||
79 | noinline u64 atomic64_add_return(u64 delta, atomic64_t *ptr) | ||
80 | { | ||
81 | /* | ||
82 | * Try first with a (possibly incorrect) assumption about | ||
83 | * what we have there. We'll do two loops most likely, | ||
84 | * but we'll get an ownership MESI transaction straight away | ||
85 | * instead of a read transaction followed by a | ||
86 | * flush-for-ownership transaction: | ||
87 | */ | ||
88 | u64 old_val, new_val, real_val = 0; | ||
89 | |||
90 | do { | ||
91 | old_val = real_val; | ||
92 | new_val = old_val + delta; | ||
93 | |||
94 | real_val = atomic64_cmpxchg(ptr, old_val, new_val); | ||
95 | |||
96 | } while (real_val != old_val); | ||
97 | |||
98 | return new_val; | ||
99 | } | ||
100 | EXPORT_SYMBOL(atomic64_add_return); | ||
101 | |||
102 | u64 atomic64_sub_return(u64 delta, atomic64_t *ptr) | ||
103 | { | ||
104 | return atomic64_add_return(-delta, ptr); | ||
105 | } | ||
106 | EXPORT_SYMBOL(atomic64_sub_return); | ||
107 | |||
108 | u64 atomic64_inc_return(atomic64_t *ptr) | ||
109 | { | ||
110 | return atomic64_add_return(1, ptr); | ||
111 | } | ||
112 | EXPORT_SYMBOL(atomic64_inc_return); | ||
113 | |||
114 | u64 atomic64_dec_return(atomic64_t *ptr) | ||
115 | { | ||
116 | return atomic64_sub_return(1, ptr); | ||
117 | } | ||
118 | EXPORT_SYMBOL(atomic64_dec_return); | ||
119 | |||
120 | /** | ||
121 | * atomic64_add - add integer to atomic64 variable | ||
122 | * @delta: integer value to add | ||
123 | * @ptr: pointer to type atomic64_t | ||
124 | * | ||
125 | * Atomically adds @delta to @ptr. | ||
126 | */ | ||
127 | void atomic64_add(u64 delta, atomic64_t *ptr) | ||
128 | { | ||
129 | atomic64_add_return(delta, ptr); | ||
130 | } | ||
131 | EXPORT_SYMBOL(atomic64_add); | ||
132 | |||
133 | /** | ||
134 | * atomic64_sub - subtract the atomic64 variable | ||
135 | * @delta: integer value to subtract | ||
136 | * @ptr: pointer to type atomic64_t | ||
137 | * | ||
138 | * Atomically subtracts @delta from @ptr. | ||
139 | */ | ||
140 | void atomic64_sub(u64 delta, atomic64_t *ptr) | ||
141 | { | ||
142 | atomic64_add(-delta, ptr); | ||
143 | } | ||
144 | EXPORT_SYMBOL(atomic64_sub); | ||
145 | |||
146 | /** | ||
147 | * atomic64_sub_and_test - subtract value from variable and test result | ||
148 | * @delta: integer value to subtract | ||
149 | * @ptr: pointer to type atomic64_t | ||
150 | * | ||
151 | * Atomically subtracts @delta from @ptr and returns | ||
152 | * true if the result is zero, or false for all | ||
153 | * other cases. | ||
154 | */ | ||
155 | int atomic64_sub_and_test(u64 delta, atomic64_t *ptr) | ||
156 | { | ||
157 | u64 new_val = atomic64_sub_return(delta, ptr); | ||
158 | |||
159 | return new_val == 0; | ||
160 | } | ||
161 | EXPORT_SYMBOL(atomic64_sub_and_test); | ||
162 | |||
163 | /** | ||
164 | * atomic64_inc - increment atomic64 variable | ||
165 | * @ptr: pointer to type atomic64_t | ||
166 | * | ||
167 | * Atomically increments @ptr by 1. | ||
168 | */ | ||
169 | void atomic64_inc(atomic64_t *ptr) | ||
170 | { | ||
171 | atomic64_add(1, ptr); | ||
172 | } | ||
173 | EXPORT_SYMBOL(atomic64_inc); | ||
174 | |||
175 | /** | ||
176 | * atomic64_dec - decrement atomic64 variable | ||
177 | * @ptr: pointer to type atomic64_t | ||
178 | * | ||
179 | * Atomically decrements @ptr by 1. | ||
180 | */ | ||
181 | void atomic64_dec(atomic64_t *ptr) | ||
182 | { | ||
183 | atomic64_sub(1, ptr); | ||
184 | } | ||
185 | EXPORT_SYMBOL(atomic64_dec); | ||
186 | |||
187 | /** | ||
188 | * atomic64_dec_and_test - decrement and test | ||
189 | * @ptr: pointer to type atomic64_t | ||
190 | * | ||
191 | * Atomically decrements @ptr by 1 and | ||
192 | * returns true if the result is 0, or false for all other | ||
193 | * cases. | ||
194 | */ | ||
195 | int atomic64_dec_and_test(atomic64_t *ptr) | ||
196 | { | ||
197 | return atomic64_sub_and_test(1, ptr); | ||
198 | } | ||
199 | EXPORT_SYMBOL(atomic64_dec_and_test); | ||
200 | |||
201 | /** | ||
202 | * atomic64_inc_and_test - increment and test | ||
203 | * @ptr: pointer to type atomic64_t | ||
204 | * | ||
205 | * Atomically increments @ptr by 1 | ||
206 | * and returns true if the result is zero, or false for all | ||
207 | * other cases. | ||
208 | */ | ||
209 | int atomic64_inc_and_test(atomic64_t *ptr) | ||
210 | { | ||
211 | return atomic64_sub_and_test(-1, ptr); | ||
212 | } | ||
213 | EXPORT_SYMBOL(atomic64_inc_and_test); | ||
214 | |||
215 | /** | ||
216 | * atomic64_add_negative - add and test if negative | ||
217 | * @delta: integer value to add | ||
218 | * @ptr: pointer to type atomic64_t | ||
219 | * | ||
220 | * Atomically adds @delta to @ptr and returns true | ||
221 | * if the result is negative, or false when | ||
222 | * result is greater than or equal to zero. | ||
223 | */ | ||
224 | int atomic64_add_negative(u64 delta, atomic64_t *ptr) | ||
225 | { | ||
226 | s64 new_val = atomic64_add_return(delta, ptr); | ||
227 | |||
228 | return new_val < 0; | ||
229 | } | ||
230 | EXPORT_SYMBOL(atomic64_add_negative); | ||
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 85307cc6e45f..bfae139182ff 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -697,7 +697,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code, | |||
697 | if (!printk_ratelimit()) | 697 | if (!printk_ratelimit()) |
698 | return; | 698 | return; |
699 | 699 | ||
700 | printk(KERN_CONT "%s%s[%d]: segfault at %lx ip %p sp %p error %lx", | 700 | printk("%s%s[%d]: segfault at %lx ip %p sp %p error %lx", |
701 | task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, | 701 | task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, |
702 | tsk->comm, task_pid_nr(tsk), address, | 702 | tsk->comm, task_pid_nr(tsk), address, |
703 | (void *)regs->ip, (void *)regs->sp, error_code); | 703 | (void *)regs->ip, (void *)regs->sp, error_code); |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index b07dd8d0b321..89b9a5cd63da 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -390,7 +390,7 @@ static int __init p4_init(char **cpu_type) | |||
390 | static int force_arch_perfmon; | 390 | static int force_arch_perfmon; |
391 | static int force_cpu_type(const char *str, struct kernel_param *kp) | 391 | static int force_cpu_type(const char *str, struct kernel_param *kp) |
392 | { | 392 | { |
393 | if (!strcmp(str, "archperfmon")) { | 393 | if (!strcmp(str, "arch_perfmon")) { |
394 | force_arch_perfmon = 1; | 394 | force_arch_perfmon = 1; |
395 | printk(KERN_INFO "oprofile: forcing architectural perfmon\n"); | 395 | printk(KERN_INFO "oprofile: forcing architectural perfmon\n"); |
396 | } | 396 | } |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 0fb56db16d18..52e62e57fedd 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/pat.h> | 35 | #include <asm/pat.h> |
36 | #include <asm/e820.h> | 36 | #include <asm/e820.h> |
37 | #include <asm/pci_x86.h> | 37 | #include <asm/pci_x86.h> |
38 | #include <asm/io_apic.h> | ||
38 | 39 | ||
39 | 40 | ||
40 | static int | 41 | static int |
@@ -227,6 +228,12 @@ void __init pcibios_resource_survey(void) | |||
227 | pcibios_allocate_resources(1); | 228 | pcibios_allocate_resources(1); |
228 | 229 | ||
229 | e820_reserve_resources_late(); | 230 | e820_reserve_resources_late(); |
231 | /* | ||
232 | * Insert the IO APIC resources after PCI initialization has | ||
233 | * occured to handle IO APICS that are mapped in on a BAR in | ||
234 | * PCI space, but before trying to assign unassigned pci res. | ||
235 | */ | ||
236 | ioapic_insert_resources(); | ||
230 | } | 237 | } |
231 | 238 | ||
232 | /** | 239 | /** |
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h index 0f4fe1faf9ba..13165641cc51 100644 --- a/arch/xtensa/include/asm/thread_info.h +++ b/arch/xtensa/include/asm/thread_info.h | |||
@@ -80,8 +80,6 @@ struct thread_info { | |||
80 | 80 | ||
81 | /* | 81 | /* |
82 | * macros/functions for gaining access to the thread information structure | 82 | * macros/functions for gaining access to the thread information structure |
83 | * | ||
84 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
85 | */ | 83 | */ |
86 | 84 | ||
87 | #ifndef __ASSEMBLY__ | 85 | #ifndef __ASSEMBLY__ |
@@ -92,7 +90,7 @@ struct thread_info { | |||
92 | .exec_domain = &default_exec_domain, \ | 90 | .exec_domain = &default_exec_domain, \ |
93 | .flags = 0, \ | 91 | .flags = 0, \ |
94 | .cpu = 0, \ | 92 | .cpu = 0, \ |
95 | .preempt_count = 1, \ | 93 | .preempt_count = INIT_PREEMPT_COUNT, \ |
96 | .addr_limit = KERNEL_DS, \ | 94 | .addr_limit = KERNEL_DS, \ |
97 | .restart_block = { \ | 95 | .restart_block = { \ |
98 | .fn = do_no_restart_syscall, \ | 96 | .fn = do_no_restart_syscall, \ |