diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-12-17 17:00:49 -0500 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-12-17 17:00:49 -0500 |
commit | a4581b35e1bc80becf240238bc787a5ec2727db0 (patch) | |
tree | 34cbf36101639403a766e74deb36e7015d871b39 /arch | |
parent | f940b88d3a57594289455ea99a93a8ddc5c4af06 (diff) | |
parent | 384703b8e6cd4c8ef08512e596024e028c91c339 (diff) |
Merge commit 'v3.2-rc6' into fbdev-next
Diffstat (limited to 'arch')
317 files changed, 2170 insertions, 1639 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 44789eff983f..776d76b8cb69 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -220,8 +220,9 @@ config NEED_MACH_MEMORY_H | |||
220 | be avoided when possible. | 220 | be avoided when possible. |
221 | 221 | ||
222 | config PHYS_OFFSET | 222 | config PHYS_OFFSET |
223 | hex "Physical address of main memory" | 223 | hex "Physical address of main memory" if MMU |
224 | depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H | 224 | depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H |
225 | default DRAM_BASE if !MMU | ||
225 | help | 226 | help |
226 | Please provide the physical address corresponding to the | 227 | Please provide the physical address corresponding to the |
227 | location of main memory in your system. | 228 | location of main memory in your system. |
@@ -1231,7 +1232,7 @@ config ARM_ERRATA_742231 | |||
1231 | capabilities of the processor. | 1232 | capabilities of the processor. |
1232 | 1233 | ||
1233 | config PL310_ERRATA_588369 | 1234 | config PL310_ERRATA_588369 |
1234 | bool "Clean & Invalidate maintenance operations do not invalidate clean lines" | 1235 | bool "PL310 errata: Clean & Invalidate maintenance operations do not invalidate clean lines" |
1235 | depends on CACHE_L2X0 | 1236 | depends on CACHE_L2X0 |
1236 | help | 1237 | help |
1237 | The PL310 L2 cache controller implements three types of Clean & | 1238 | The PL310 L2 cache controller implements three types of Clean & |
@@ -1256,7 +1257,7 @@ config ARM_ERRATA_720789 | |||
1256 | entries regardless of the ASID. | 1257 | entries regardless of the ASID. |
1257 | 1258 | ||
1258 | config PL310_ERRATA_727915 | 1259 | config PL310_ERRATA_727915 |
1259 | bool "Background Clean & Invalidate by Way operation can cause data corruption" | 1260 | bool "PL310 errata: Background Clean & Invalidate by Way operation can cause data corruption" |
1260 | depends on CACHE_L2X0 | 1261 | depends on CACHE_L2X0 |
1261 | help | 1262 | help |
1262 | PL310 implements the Clean & Invalidate by Way L2 cache maintenance | 1263 | PL310 implements the Clean & Invalidate by Way L2 cache maintenance |
@@ -1289,8 +1290,8 @@ config ARM_ERRATA_751472 | |||
1289 | operation is received by a CPU before the ICIALLUIS has completed, | 1290 | operation is received by a CPU before the ICIALLUIS has completed, |
1290 | potentially leading to corrupted entries in the cache or TLB. | 1291 | potentially leading to corrupted entries in the cache or TLB. |
1291 | 1292 | ||
1292 | config ARM_ERRATA_753970 | 1293 | config PL310_ERRATA_753970 |
1293 | bool "ARM errata: cache sync operation may be faulty" | 1294 | bool "PL310 errata: cache sync operation may be faulty" |
1294 | depends on CACHE_PL310 | 1295 | depends on CACHE_PL310 |
1295 | help | 1296 | help |
1296 | This option enables the workaround for the 753970 PL310 (r3p0) erratum. | 1297 | This option enables the workaround for the 753970 PL310 (r3p0) erratum. |
@@ -1352,6 +1353,18 @@ config ARM_ERRATA_764369 | |||
1352 | relevant cache maintenance functions and sets a specific bit | 1353 | relevant cache maintenance functions and sets a specific bit |
1353 | in the diagnostic control register of the SCU. | 1354 | in the diagnostic control register of the SCU. |
1354 | 1355 | ||
1356 | config PL310_ERRATA_769419 | ||
1357 | bool "PL310 errata: no automatic Store Buffer drain" | ||
1358 | depends on CACHE_L2X0 | ||
1359 | help | ||
1360 | On revisions of the PL310 prior to r3p2, the Store Buffer does | ||
1361 | not automatically drain. This can cause normal, non-cacheable | ||
1362 | writes to be retained when the memory system is idle, leading | ||
1363 | to suboptimal I/O performance for drivers using coherent DMA. | ||
1364 | This option adds a write barrier to the cpu_idle loop so that, | ||
1365 | on systems with an outer cache, the store buffer is drained | ||
1366 | explicitly. | ||
1367 | |||
1355 | endmenu | 1368 | endmenu |
1356 | 1369 | ||
1357 | source "arch/arm/common/Kconfig" | 1370 | source "arch/arm/common/Kconfig" |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 176062ac7f07..5df26a9976a2 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -65,6 +65,8 @@ $(obj)/%.dtb: $(src)/dts/%.dts | |||
65 | 65 | ||
66 | $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) | 66 | $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) |
67 | 67 | ||
68 | clean-files := *.dtb | ||
69 | |||
68 | quiet_cmd_uimage = UIMAGE $@ | 70 | quiet_cmd_uimage = UIMAGE $@ |
69 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ | 71 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ |
70 | -C none -a $(LOADADDR) -e $(STARTADDR) \ | 72 | -C none -a $(LOADADDR) -e $(STARTADDR) \ |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 0e6ae470c94f..410a546060a2 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -526,7 +526,8 @@ static void __init gic_pm_init(struct gic_chip_data *gic) | |||
526 | sizeof(u32)); | 526 | sizeof(u32)); |
527 | BUG_ON(!gic->saved_ppi_conf); | 527 | BUG_ON(!gic->saved_ppi_conf); |
528 | 528 | ||
529 | cpu_pm_register_notifier(&gic_notifier_block); | 529 | if (gic == &gic_data[0]) |
530 | cpu_pm_register_notifier(&gic_notifier_block); | ||
530 | } | 531 | } |
531 | #else | 532 | #else |
532 | static void __init gic_pm_init(struct gic_chip_data *gic) | 533 | static void __init gic_pm_init(struct gic_chip_data *gic) |
@@ -581,13 +582,16 @@ void __init gic_init(unsigned int gic_nr, int irq_start, | |||
581 | * For primary GICs, skip over SGIs. | 582 | * For primary GICs, skip over SGIs. |
582 | * For secondary GICs, skip over PPIs, too. | 583 | * For secondary GICs, skip over PPIs, too. |
583 | */ | 584 | */ |
585 | domain->hwirq_base = 32; | ||
584 | if (gic_nr == 0) { | 586 | if (gic_nr == 0) { |
585 | gic_cpu_base_addr = cpu_base; | 587 | gic_cpu_base_addr = cpu_base; |
586 | domain->hwirq_base = 16; | 588 | |
587 | if (irq_start > 0) | 589 | if ((irq_start & 31) > 0) { |
588 | irq_start = (irq_start & ~31) + 16; | 590 | domain->hwirq_base = 16; |
589 | } else | 591 | if (irq_start != -1) |
590 | domain->hwirq_base = 32; | 592 | irq_start = (irq_start & ~31) + 16; |
593 | } | ||
594 | } | ||
591 | 595 | ||
592 | /* | 596 | /* |
593 | * Find out how many interrupts are supported. | 597 | * Find out how many interrupts are supported. |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 7129cfbdacd6..f407a6b35d3d 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
@@ -1211,8 +1211,8 @@ static inline u32 _prepare_ccr(const struct pl330_reqcfg *rqc) | |||
1211 | ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); | 1211 | ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); |
1212 | ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); | 1212 | ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); |
1213 | 1213 | ||
1214 | ccr |= (rqc->dcctl << CC_SRCCCTRL_SHFT); | 1214 | ccr |= (rqc->scctl << CC_SRCCCTRL_SHFT); |
1215 | ccr |= (rqc->scctl << CC_DSTCCTRL_SHFT); | 1215 | ccr |= (rqc->dcctl << CC_DSTCCTRL_SHFT); |
1216 | 1216 | ||
1217 | ccr |= (rqc->swap << CC_SWAP_SHFT); | 1217 | ccr |= (rqc->swap << CC_SWAP_SHFT); |
1218 | 1218 | ||
@@ -1623,6 +1623,11 @@ static inline int _alloc_event(struct pl330_thread *thrd) | |||
1623 | return -1; | 1623 | return -1; |
1624 | } | 1624 | } |
1625 | 1625 | ||
1626 | static bool _chan_ns(const struct pl330_info *pi, int i) | ||
1627 | { | ||
1628 | return pi->pcfg.irq_ns & (1 << i); | ||
1629 | } | ||
1630 | |||
1626 | /* Upon success, returns IdentityToken for the | 1631 | /* Upon success, returns IdentityToken for the |
1627 | * allocated channel, NULL otherwise. | 1632 | * allocated channel, NULL otherwise. |
1628 | */ | 1633 | */ |
@@ -1647,7 +1652,8 @@ void *pl330_request_channel(const struct pl330_info *pi) | |||
1647 | 1652 | ||
1648 | for (i = 0; i < chans; i++) { | 1653 | for (i = 0; i < chans; i++) { |
1649 | thrd = &pl330->channels[i]; | 1654 | thrd = &pl330->channels[i]; |
1650 | if (thrd->free) { | 1655 | if ((thrd->free) && (!_manager_ns(thrd) || |
1656 | _chan_ns(pi, i))) { | ||
1651 | thrd->ev = _alloc_event(thrd); | 1657 | thrd->ev = _alloc_event(thrd); |
1652 | if (thrd->ev >= 0) { | 1658 | if (thrd->ev >= 0) { |
1653 | thrd->free = false; | 1659 | thrd->free = false; |
diff --git a/arch/arm/configs/at91cap9adk_defconfig b/arch/arm/configs/at91cap9_defconfig index ffb1edd93363..8826eb218e73 100644 --- a/arch/arm/configs/at91cap9adk_defconfig +++ b/arch/arm/configs/at91cap9_defconfig | |||
@@ -38,7 +38,6 @@ CONFIG_IP_PNP_RARP=y | |||
38 | # CONFIG_IPV6 is not set | 38 | # CONFIG_IPV6 is not set |
39 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 39 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
40 | CONFIG_MTD=y | 40 | CONFIG_MTD=y |
41 | CONFIG_MTD_PARTITIONS=y | ||
42 | CONFIG_MTD_CMDLINE_PARTS=y | 41 | CONFIG_MTD_CMDLINE_PARTS=y |
43 | CONFIG_MTD_CHAR=y | 42 | CONFIG_MTD_CHAR=y |
44 | CONFIG_MTD_BLOCK=y | 43 | CONFIG_MTD_BLOCK=y |
@@ -52,16 +51,12 @@ CONFIG_MTD_NAND_ATMEL=y | |||
52 | CONFIG_BLK_DEV_LOOP=y | 51 | CONFIG_BLK_DEV_LOOP=y |
53 | CONFIG_BLK_DEV_RAM=y | 52 | CONFIG_BLK_DEV_RAM=y |
54 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 53 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
55 | CONFIG_ATMEL_SSC=y | ||
56 | CONFIG_SCSI=y | 54 | CONFIG_SCSI=y |
57 | CONFIG_BLK_DEV_SD=y | 55 | CONFIG_BLK_DEV_SD=y |
58 | CONFIG_SCSI_MULTI_LUN=y | 56 | CONFIG_SCSI_MULTI_LUN=y |
59 | CONFIG_NETDEVICES=y | 57 | CONFIG_NETDEVICES=y |
60 | CONFIG_NET_ETHERNET=y | ||
61 | CONFIG_MII=y | 58 | CONFIG_MII=y |
62 | CONFIG_MACB=y | 59 | CONFIG_MACB=y |
63 | # CONFIG_NETDEV_1000 is not set | ||
64 | # CONFIG_NETDEV_10000 is not set | ||
65 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 60 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
66 | CONFIG_INPUT_EVDEV=y | 61 | CONFIG_INPUT_EVDEV=y |
67 | # CONFIG_INPUT_KEYBOARD is not set | 62 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -81,7 +76,6 @@ CONFIG_WATCHDOG=y | |||
81 | CONFIG_WATCHDOG_NOWAYOUT=y | 76 | CONFIG_WATCHDOG_NOWAYOUT=y |
82 | CONFIG_FB=y | 77 | CONFIG_FB=y |
83 | CONFIG_FB_ATMEL=y | 78 | CONFIG_FB_ATMEL=y |
84 | # CONFIG_VGA_CONSOLE is not set | ||
85 | CONFIG_LOGO=y | 79 | CONFIG_LOGO=y |
86 | # CONFIG_LOGO_LINUX_MONO is not set | 80 | # CONFIG_LOGO_LINUX_MONO is not set |
87 | # CONFIG_LOGO_LINUX_CLUT224 is not set | 81 | # CONFIG_LOGO_LINUX_CLUT224 is not set |
@@ -99,7 +93,6 @@ CONFIG_MMC_AT91=m | |||
99 | CONFIG_RTC_CLASS=y | 93 | CONFIG_RTC_CLASS=y |
100 | CONFIG_RTC_DRV_AT91SAM9=y | 94 | CONFIG_RTC_DRV_AT91SAM9=y |
101 | CONFIG_EXT2_FS=y | 95 | CONFIG_EXT2_FS=y |
102 | CONFIG_INOTIFY=y | ||
103 | CONFIG_VFAT_FS=y | 96 | CONFIG_VFAT_FS=y |
104 | CONFIG_TMPFS=y | 97 | CONFIG_TMPFS=y |
105 | CONFIG_JFFS2_FS=y | 98 | CONFIG_JFFS2_FS=y |
diff --git a/arch/arm/configs/at91rm9200_defconfig b/arch/arm/configs/at91rm9200_defconfig index 38cb7c985426..bbe4e1a1f5d8 100644 --- a/arch/arm/configs/at91rm9200_defconfig +++ b/arch/arm/configs/at91rm9200_defconfig | |||
@@ -5,7 +5,6 @@ CONFIG_SYSVIPC=y | |||
5 | CONFIG_IKCONFIG=y | 5 | CONFIG_IKCONFIG=y |
6 | CONFIG_IKCONFIG_PROC=y | 6 | CONFIG_IKCONFIG_PROC=y |
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
9 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
10 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_FORCE_LOAD=y | 10 | CONFIG_MODULE_FORCE_LOAD=y |
@@ -56,7 +55,6 @@ CONFIG_IP_PNP=y | |||
56 | CONFIG_IP_PNP_DHCP=y | 55 | CONFIG_IP_PNP_DHCP=y |
57 | CONFIG_IP_PNP_BOOTP=y | 56 | CONFIG_IP_PNP_BOOTP=y |
58 | CONFIG_NET_IPIP=m | 57 | CONFIG_NET_IPIP=m |
59 | CONFIG_NET_IPGRE=m | ||
60 | CONFIG_INET_AH=m | 58 | CONFIG_INET_AH=m |
61 | CONFIG_INET_ESP=m | 59 | CONFIG_INET_ESP=m |
62 | CONFIG_INET_IPCOMP=m | 60 | CONFIG_INET_IPCOMP=m |
@@ -75,18 +73,8 @@ CONFIG_IPV6_TUNNEL=m | |||
75 | CONFIG_BRIDGE=m | 73 | CONFIG_BRIDGE=m |
76 | CONFIG_VLAN_8021Q=m | 74 | CONFIG_VLAN_8021Q=m |
77 | CONFIG_BT=m | 75 | CONFIG_BT=m |
78 | CONFIG_BT_L2CAP=m | ||
79 | CONFIG_BT_SCO=m | ||
80 | CONFIG_BT_RFCOMM=m | ||
81 | CONFIG_BT_RFCOMM_TTY=y | ||
82 | CONFIG_BT_BNEP=m | ||
83 | CONFIG_BT_BNEP_MC_FILTER=y | ||
84 | CONFIG_BT_BNEP_PROTO_FILTER=y | ||
85 | CONFIG_BT_HIDP=m | ||
86 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 76 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
87 | CONFIG_MTD=y | 77 | CONFIG_MTD=y |
88 | CONFIG_MTD_CONCAT=y | ||
89 | CONFIG_MTD_PARTITIONS=y | ||
90 | CONFIG_MTD_CMDLINE_PARTS=y | 78 | CONFIG_MTD_CMDLINE_PARTS=y |
91 | CONFIG_MTD_AFS_PARTS=y | 79 | CONFIG_MTD_AFS_PARTS=y |
92 | CONFIG_MTD_CHAR=y | 80 | CONFIG_MTD_CHAR=y |
@@ -108,8 +96,6 @@ CONFIG_BLK_DEV_LOOP=y | |||
108 | CONFIG_BLK_DEV_NBD=y | 96 | CONFIG_BLK_DEV_NBD=y |
109 | CONFIG_BLK_DEV_RAM=y | 97 | CONFIG_BLK_DEV_RAM=y |
110 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 98 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
111 | CONFIG_ATMEL_TCLIB=y | ||
112 | CONFIG_EEPROM_LEGACY=m | ||
113 | CONFIG_SCSI=y | 99 | CONFIG_SCSI=y |
114 | CONFIG_BLK_DEV_SD=y | 100 | CONFIG_BLK_DEV_SD=y |
115 | CONFIG_BLK_DEV_SR=m | 101 | CONFIG_BLK_DEV_SR=m |
@@ -119,14 +105,23 @@ CONFIG_SCSI_MULTI_LUN=y | |||
119 | # CONFIG_SCSI_LOWLEVEL is not set | 105 | # CONFIG_SCSI_LOWLEVEL is not set |
120 | CONFIG_NETDEVICES=y | 106 | CONFIG_NETDEVICES=y |
121 | CONFIG_TUN=m | 107 | CONFIG_TUN=m |
108 | CONFIG_ARM_AT91_ETHER=y | ||
122 | CONFIG_PHYLIB=y | 109 | CONFIG_PHYLIB=y |
123 | CONFIG_DAVICOM_PHY=y | 110 | CONFIG_DAVICOM_PHY=y |
124 | CONFIG_SMSC_PHY=y | 111 | CONFIG_SMSC_PHY=y |
125 | CONFIG_MICREL_PHY=y | 112 | CONFIG_MICREL_PHY=y |
126 | CONFIG_NET_ETHERNET=y | 113 | CONFIG_PPP=y |
127 | CONFIG_ARM_AT91_ETHER=y | 114 | CONFIG_PPP_BSDCOMP=y |
128 | # CONFIG_NETDEV_1000 is not set | 115 | CONFIG_PPP_DEFLATE=y |
129 | # CONFIG_NETDEV_10000 is not set | 116 | CONFIG_PPP_FILTER=y |
117 | CONFIG_PPP_MPPE=m | ||
118 | CONFIG_PPP_MULTILINK=y | ||
119 | CONFIG_PPPOE=m | ||
120 | CONFIG_PPP_ASYNC=y | ||
121 | CONFIG_SLIP=m | ||
122 | CONFIG_SLIP_COMPRESSED=y | ||
123 | CONFIG_SLIP_SMART=y | ||
124 | CONFIG_SLIP_MODE_SLIP6=y | ||
130 | CONFIG_USB_CATC=m | 125 | CONFIG_USB_CATC=m |
131 | CONFIG_USB_KAWETH=m | 126 | CONFIG_USB_KAWETH=m |
132 | CONFIG_USB_PEGASUS=m | 127 | CONFIG_USB_PEGASUS=m |
@@ -139,18 +134,6 @@ CONFIG_USB_NET_RNDIS_HOST=m | |||
139 | CONFIG_USB_ALI_M5632=y | 134 | CONFIG_USB_ALI_M5632=y |
140 | CONFIG_USB_AN2720=y | 135 | CONFIG_USB_AN2720=y |
141 | CONFIG_USB_EPSON2888=y | 136 | CONFIG_USB_EPSON2888=y |
142 | CONFIG_PPP=y | ||
143 | CONFIG_PPP_MULTILINK=y | ||
144 | CONFIG_PPP_FILTER=y | ||
145 | CONFIG_PPP_ASYNC=y | ||
146 | CONFIG_PPP_DEFLATE=y | ||
147 | CONFIG_PPP_BSDCOMP=y | ||
148 | CONFIG_PPP_MPPE=m | ||
149 | CONFIG_PPPOE=m | ||
150 | CONFIG_SLIP=m | ||
151 | CONFIG_SLIP_COMPRESSED=y | ||
152 | CONFIG_SLIP_SMART=y | ||
153 | CONFIG_SLIP_MODE_SLIP6=y | ||
154 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 137 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
155 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 | 138 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 |
156 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 | 139 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 |
@@ -158,9 +141,9 @@ CONFIG_INPUT_EVDEV=y | |||
158 | CONFIG_KEYBOARD_GPIO=y | 141 | CONFIG_KEYBOARD_GPIO=y |
159 | # CONFIG_INPUT_MOUSE is not set | 142 | # CONFIG_INPUT_MOUSE is not set |
160 | CONFIG_INPUT_TOUCHSCREEN=y | 143 | CONFIG_INPUT_TOUCHSCREEN=y |
144 | CONFIG_LEGACY_PTY_COUNT=32 | ||
161 | CONFIG_SERIAL_ATMEL=y | 145 | CONFIG_SERIAL_ATMEL=y |
162 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 146 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
163 | CONFIG_LEGACY_PTY_COUNT=32 | ||
164 | CONFIG_HW_RANDOM=y | 147 | CONFIG_HW_RANDOM=y |
165 | CONFIG_I2C=y | 148 | CONFIG_I2C=y |
166 | CONFIG_I2C_CHARDEV=y | 149 | CONFIG_I2C_CHARDEV=y |
@@ -290,7 +273,6 @@ CONFIG_NFS_V3_ACL=y | |||
290 | CONFIG_NFS_V4=y | 273 | CONFIG_NFS_V4=y |
291 | CONFIG_ROOT_NFS=y | 274 | CONFIG_ROOT_NFS=y |
292 | CONFIG_NFSD=y | 275 | CONFIG_NFSD=y |
293 | CONFIG_SMB_FS=m | ||
294 | CONFIG_CIFS=m | 276 | CONFIG_CIFS=m |
295 | CONFIG_PARTITION_ADVANCED=y | 277 | CONFIG_PARTITION_ADVANCED=y |
296 | CONFIG_MAC_PARTITION=y | 278 | CONFIG_MAC_PARTITION=y |
@@ -335,7 +317,6 @@ CONFIG_NLS_UTF8=y | |||
335 | CONFIG_MAGIC_SYSRQ=y | 317 | CONFIG_MAGIC_SYSRQ=y |
336 | CONFIG_DEBUG_FS=y | 318 | CONFIG_DEBUG_FS=y |
337 | CONFIG_DEBUG_KERNEL=y | 319 | CONFIG_DEBUG_KERNEL=y |
338 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
339 | # CONFIG_FTRACE is not set | 320 | # CONFIG_FTRACE is not set |
340 | CONFIG_CRYPTO_PCBC=y | 321 | CONFIG_CRYPTO_PCBC=y |
341 | CONFIG_CRYPTO_SHA1=y | 322 | CONFIG_CRYPTO_SHA1=y |
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260_defconfig index f8a9226413bf..505b3765f87e 100644 --- a/arch/arm/configs/at91sam9260ek_defconfig +++ b/arch/arm/configs/at91sam9260_defconfig | |||
@@ -12,11 +12,23 @@ CONFIG_MODULE_UNLOAD=y | |||
12 | # CONFIG_IOSCHED_CFQ is not set | 12 | # CONFIG_IOSCHED_CFQ is not set |
13 | CONFIG_ARCH_AT91=y | 13 | CONFIG_ARCH_AT91=y |
14 | CONFIG_ARCH_AT91SAM9260=y | 14 | CONFIG_ARCH_AT91SAM9260=y |
15 | CONFIG_ARCH_AT91SAM9260_SAM9XE=y | ||
15 | CONFIG_MACH_AT91SAM9260EK=y | 16 | CONFIG_MACH_AT91SAM9260EK=y |
17 | CONFIG_MACH_CAM60=y | ||
18 | CONFIG_MACH_SAM9_L9260=y | ||
19 | CONFIG_MACH_AFEB9260=y | ||
20 | CONFIG_MACH_USB_A9260=y | ||
21 | CONFIG_MACH_QIL_A9260=y | ||
22 | CONFIG_MACH_CPU9260=y | ||
23 | CONFIG_MACH_FLEXIBITY=y | ||
24 | CONFIG_MACH_SNAPPER_9260=y | ||
25 | CONFIG_MACH_AT91SAM_DT=y | ||
16 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | 26 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y |
17 | # CONFIG_ARM_THUMB is not set | 27 | # CONFIG_ARM_THUMB is not set |
18 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 28 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
19 | CONFIG_ZBOOT_ROM_BSS=0x0 | 29 | CONFIG_ZBOOT_ROM_BSS=0x0 |
30 | CONFIG_ARM_APPENDED_DTB=y | ||
31 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
20 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | 32 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" |
21 | CONFIG_FPE_NWFPE=y | 33 | CONFIG_FPE_NWFPE=y |
22 | CONFIG_NET=y | 34 | CONFIG_NET=y |
@@ -33,12 +45,10 @@ CONFIG_IP_PNP_BOOTP=y | |||
33 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 45 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
34 | CONFIG_BLK_DEV_RAM=y | 46 | CONFIG_BLK_DEV_RAM=y |
35 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 47 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
36 | CONFIG_ATMEL_SSC=y | ||
37 | CONFIG_SCSI=y | 48 | CONFIG_SCSI=y |
38 | CONFIG_BLK_DEV_SD=y | 49 | CONFIG_BLK_DEV_SD=y |
39 | CONFIG_SCSI_MULTI_LUN=y | 50 | CONFIG_SCSI_MULTI_LUN=y |
40 | CONFIG_NETDEVICES=y | 51 | CONFIG_NETDEVICES=y |
41 | CONFIG_NET_ETHERNET=y | ||
42 | CONFIG_MII=y | 52 | CONFIG_MII=y |
43 | CONFIG_MACB=y | 53 | CONFIG_MACB=y |
44 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 54 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
@@ -55,7 +65,6 @@ CONFIG_I2C_GPIO=y | |||
55 | CONFIG_WATCHDOG=y | 65 | CONFIG_WATCHDOG=y |
56 | CONFIG_WATCHDOG_NOWAYOUT=y | 66 | CONFIG_WATCHDOG_NOWAYOUT=y |
57 | CONFIG_AT91SAM9X_WATCHDOG=y | 67 | CONFIG_AT91SAM9X_WATCHDOG=y |
58 | # CONFIG_VGA_CONSOLE is not set | ||
59 | # CONFIG_USB_HID is not set | 68 | # CONFIG_USB_HID is not set |
60 | CONFIG_USB=y | 69 | CONFIG_USB=y |
61 | CONFIG_USB_DEVICEFS=y | 70 | CONFIG_USB_DEVICEFS=y |
@@ -71,7 +80,6 @@ CONFIG_USB_G_SERIAL=m | |||
71 | CONFIG_RTC_CLASS=y | 80 | CONFIG_RTC_CLASS=y |
72 | CONFIG_RTC_DRV_AT91SAM9=y | 81 | CONFIG_RTC_DRV_AT91SAM9=y |
73 | CONFIG_EXT2_FS=y | 82 | CONFIG_EXT2_FS=y |
74 | CONFIG_INOTIFY=y | ||
75 | CONFIG_VFAT_FS=y | 83 | CONFIG_VFAT_FS=y |
76 | CONFIG_TMPFS=y | 84 | CONFIG_TMPFS=y |
77 | CONFIG_CRAMFS=y | 85 | CONFIG_CRAMFS=y |
diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20_defconfig index 9e90e6d79297..9123568d9a8d 100644 --- a/arch/arm/configs/at91sam9g20ek_defconfig +++ b/arch/arm/configs/at91sam9g20_defconfig | |||
@@ -14,6 +14,15 @@ CONFIG_ARCH_AT91=y | |||
14 | CONFIG_ARCH_AT91SAM9G20=y | 14 | CONFIG_ARCH_AT91SAM9G20=y |
15 | CONFIG_MACH_AT91SAM9G20EK=y | 15 | CONFIG_MACH_AT91SAM9G20EK=y |
16 | CONFIG_MACH_AT91SAM9G20EK_2MMC=y | 16 | CONFIG_MACH_AT91SAM9G20EK_2MMC=y |
17 | CONFIG_MACH_CPU9G20=y | ||
18 | CONFIG_MACH_ACMENETUSFOXG20=y | ||
19 | CONFIG_MACH_PORTUXG20=y | ||
20 | CONFIG_MACH_STAMP9G20=y | ||
21 | CONFIG_MACH_PCONTROL_G20=y | ||
22 | CONFIG_MACH_GSIA18S=y | ||
23 | CONFIG_MACH_USB_A9G20=y | ||
24 | CONFIG_MACH_SNAPPER_9260=y | ||
25 | CONFIG_MACH_AT91SAM_DT=y | ||
17 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | 26 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y |
18 | # CONFIG_ARM_THUMB is not set | 27 | # CONFIG_ARM_THUMB is not set |
19 | CONFIG_AEABI=y | 28 | CONFIG_AEABI=y |
@@ -21,9 +30,10 @@ CONFIG_LEDS=y | |||
21 | CONFIG_LEDS_CPU=y | 30 | CONFIG_LEDS_CPU=y |
22 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 31 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
23 | CONFIG_ZBOOT_ROM_BSS=0x0 | 32 | CONFIG_ZBOOT_ROM_BSS=0x0 |
33 | CONFIG_ARM_APPENDED_DTB=y | ||
34 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
24 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | 35 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" |
25 | CONFIG_FPE_NWFPE=y | 36 | CONFIG_FPE_NWFPE=y |
26 | CONFIG_PM=y | ||
27 | CONFIG_NET=y | 37 | CONFIG_NET=y |
28 | CONFIG_PACKET=y | 38 | CONFIG_PACKET=y |
29 | CONFIG_UNIX=y | 39 | CONFIG_UNIX=y |
@@ -37,8 +47,6 @@ CONFIG_IP_PNP_BOOTP=y | |||
37 | # CONFIG_IPV6 is not set | 47 | # CONFIG_IPV6 is not set |
38 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 48 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
39 | CONFIG_MTD=y | 49 | CONFIG_MTD=y |
40 | CONFIG_MTD_CONCAT=y | ||
41 | CONFIG_MTD_PARTITIONS=y | ||
42 | CONFIG_MTD_CMDLINE_PARTS=y | 50 | CONFIG_MTD_CMDLINE_PARTS=y |
43 | CONFIG_MTD_CHAR=y | 51 | CONFIG_MTD_CHAR=y |
44 | CONFIG_MTD_BLOCK=y | 52 | CONFIG_MTD_BLOCK=y |
@@ -48,17 +56,13 @@ CONFIG_MTD_NAND_ATMEL=y | |||
48 | CONFIG_BLK_DEV_LOOP=y | 56 | CONFIG_BLK_DEV_LOOP=y |
49 | CONFIG_BLK_DEV_RAM=y | 57 | CONFIG_BLK_DEV_RAM=y |
50 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 58 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
51 | CONFIG_ATMEL_SSC=y | ||
52 | CONFIG_SCSI=y | 59 | CONFIG_SCSI=y |
53 | CONFIG_BLK_DEV_SD=y | 60 | CONFIG_BLK_DEV_SD=y |
54 | CONFIG_SCSI_MULTI_LUN=y | 61 | CONFIG_SCSI_MULTI_LUN=y |
55 | # CONFIG_SCSI_LOWLEVEL is not set | 62 | # CONFIG_SCSI_LOWLEVEL is not set |
56 | CONFIG_NETDEVICES=y | 63 | CONFIG_NETDEVICES=y |
57 | CONFIG_NET_ETHERNET=y | ||
58 | CONFIG_MII=y | 64 | CONFIG_MII=y |
59 | CONFIG_MACB=y | 65 | CONFIG_MACB=y |
60 | # CONFIG_NETDEV_1000 is not set | ||
61 | # CONFIG_NETDEV_10000 is not set | ||
62 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 66 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
63 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 | 67 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 |
64 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 | 68 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 |
@@ -66,15 +70,14 @@ CONFIG_INPUT_EVDEV=y | |||
66 | # CONFIG_KEYBOARD_ATKBD is not set | 70 | # CONFIG_KEYBOARD_ATKBD is not set |
67 | CONFIG_KEYBOARD_GPIO=y | 71 | CONFIG_KEYBOARD_GPIO=y |
68 | # CONFIG_INPUT_MOUSE is not set | 72 | # CONFIG_INPUT_MOUSE is not set |
73 | CONFIG_LEGACY_PTY_COUNT=16 | ||
69 | CONFIG_SERIAL_ATMEL=y | 74 | CONFIG_SERIAL_ATMEL=y |
70 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 75 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
71 | CONFIG_LEGACY_PTY_COUNT=16 | ||
72 | CONFIG_HW_RANDOM=y | 76 | CONFIG_HW_RANDOM=y |
73 | CONFIG_SPI=y | 77 | CONFIG_SPI=y |
74 | CONFIG_SPI_ATMEL=y | 78 | CONFIG_SPI_ATMEL=y |
75 | CONFIG_SPI_SPIDEV=y | 79 | CONFIG_SPI_SPIDEV=y |
76 | # CONFIG_HWMON is not set | 80 | # CONFIG_HWMON is not set |
77 | # CONFIG_VGA_CONSOLE is not set | ||
78 | CONFIG_SOUND=y | 81 | CONFIG_SOUND=y |
79 | CONFIG_SND=y | 82 | CONFIG_SND=y |
80 | CONFIG_SND_SEQUENCER=y | 83 | CONFIG_SND_SEQUENCER=y |
@@ -82,7 +85,6 @@ CONFIG_SND_MIXER_OSS=y | |||
82 | CONFIG_SND_PCM_OSS=y | 85 | CONFIG_SND_PCM_OSS=y |
83 | CONFIG_SND_SEQUENCER_OSS=y | 86 | CONFIG_SND_SEQUENCER_OSS=y |
84 | # CONFIG_SND_VERBOSE_PROCFS is not set | 87 | # CONFIG_SND_VERBOSE_PROCFS is not set |
85 | CONFIG_SND_AT73C213=y | ||
86 | CONFIG_USB=y | 88 | CONFIG_USB=y |
87 | CONFIG_USB_DEVICEFS=y | 89 | CONFIG_USB_DEVICEFS=y |
88 | # CONFIG_USB_DEVICE_CLASS is not set | 90 | # CONFIG_USB_DEVICE_CLASS is not set |
@@ -105,7 +107,6 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y | |||
105 | CONFIG_RTC_CLASS=y | 107 | CONFIG_RTC_CLASS=y |
106 | CONFIG_RTC_DRV_AT91SAM9=y | 108 | CONFIG_RTC_DRV_AT91SAM9=y |
107 | CONFIG_EXT2_FS=y | 109 | CONFIG_EXT2_FS=y |
108 | CONFIG_INOTIFY=y | ||
109 | CONFIG_MSDOS_FS=y | 110 | CONFIG_MSDOS_FS=y |
110 | CONFIG_VFAT_FS=y | 111 | CONFIG_VFAT_FS=y |
111 | CONFIG_TMPFS=y | 112 | CONFIG_TMPFS=y |
diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig index c5876d244f4b..606d48f3b8f8 100644 --- a/arch/arm/configs/at91sam9g45_defconfig +++ b/arch/arm/configs/at91sam9g45_defconfig | |||
@@ -18,6 +18,7 @@ CONFIG_MODULE_UNLOAD=y | |||
18 | CONFIG_ARCH_AT91=y | 18 | CONFIG_ARCH_AT91=y |
19 | CONFIG_ARCH_AT91SAM9G45=y | 19 | CONFIG_ARCH_AT91SAM9G45=y |
20 | CONFIG_MACH_AT91SAM9M10G45EK=y | 20 | CONFIG_MACH_AT91SAM9M10G45EK=y |
21 | CONFIG_MACH_AT91SAM_DT=y | ||
21 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | 22 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y |
22 | CONFIG_AT91_SLOW_CLOCK=y | 23 | CONFIG_AT91_SLOW_CLOCK=y |
23 | CONFIG_AEABI=y | 24 | CONFIG_AEABI=y |
@@ -73,11 +74,8 @@ CONFIG_SCSI_MULTI_LUN=y | |||
73 | # CONFIG_SCSI_LOWLEVEL is not set | 74 | # CONFIG_SCSI_LOWLEVEL is not set |
74 | CONFIG_NETDEVICES=y | 75 | CONFIG_NETDEVICES=y |
75 | CONFIG_MII=y | 76 | CONFIG_MII=y |
76 | CONFIG_DAVICOM_PHY=y | ||
77 | CONFIG_NET_ETHERNET=y | ||
78 | CONFIG_MACB=y | 77 | CONFIG_MACB=y |
79 | # CONFIG_NETDEV_1000 is not set | 78 | CONFIG_DAVICOM_PHY=y |
80 | # CONFIG_NETDEV_10000 is not set | ||
81 | CONFIG_LIBERTAS_THINFIRM=m | 79 | CONFIG_LIBERTAS_THINFIRM=m |
82 | CONFIG_LIBERTAS_THINFIRM_USB=m | 80 | CONFIG_LIBERTAS_THINFIRM_USB=m |
83 | CONFIG_AT76C50X_USB=m | 81 | CONFIG_AT76C50X_USB=m |
@@ -131,7 +129,6 @@ CONFIG_I2C_GPIO=y | |||
131 | CONFIG_SPI=y | 129 | CONFIG_SPI=y |
132 | CONFIG_SPI_ATMEL=y | 130 | CONFIG_SPI_ATMEL=y |
133 | # CONFIG_HWMON is not set | 131 | # CONFIG_HWMON is not set |
134 | # CONFIG_MFD_SUPPORT is not set | ||
135 | CONFIG_FB=y | 132 | CONFIG_FB=y |
136 | CONFIG_FB_ATMEL=y | 133 | CONFIG_FB_ATMEL=y |
137 | CONFIG_FB_UDL=m | 134 | CONFIG_FB_UDL=m |
diff --git a/arch/arm/configs/at91sam9rlek_defconfig b/arch/arm/configs/at91sam9rl_defconfig index 75621e4d03fc..ad562ee64209 100644 --- a/arch/arm/configs/at91sam9rlek_defconfig +++ b/arch/arm/configs/at91sam9rl_defconfig | |||
@@ -23,8 +23,6 @@ CONFIG_NET=y | |||
23 | CONFIG_UNIX=y | 23 | CONFIG_UNIX=y |
24 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 24 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
25 | CONFIG_MTD=y | 25 | CONFIG_MTD=y |
26 | CONFIG_MTD_CONCAT=y | ||
27 | CONFIG_MTD_PARTITIONS=y | ||
28 | CONFIG_MTD_CMDLINE_PARTS=y | 26 | CONFIG_MTD_CMDLINE_PARTS=y |
29 | CONFIG_MTD_CHAR=y | 27 | CONFIG_MTD_CHAR=y |
30 | CONFIG_MTD_BLOCK=y | 28 | CONFIG_MTD_BLOCK=y |
@@ -35,7 +33,6 @@ CONFIG_BLK_DEV_LOOP=y | |||
35 | CONFIG_BLK_DEV_RAM=y | 33 | CONFIG_BLK_DEV_RAM=y |
36 | CONFIG_BLK_DEV_RAM_COUNT=4 | 34 | CONFIG_BLK_DEV_RAM_COUNT=4 |
37 | CONFIG_BLK_DEV_RAM_SIZE=24576 | 35 | CONFIG_BLK_DEV_RAM_SIZE=24576 |
38 | CONFIG_ATMEL_SSC=y | ||
39 | CONFIG_SCSI=y | 36 | CONFIG_SCSI=y |
40 | CONFIG_BLK_DEV_SD=y | 37 | CONFIG_BLK_DEV_SD=y |
41 | CONFIG_SCSI_MULTI_LUN=y | 38 | CONFIG_SCSI_MULTI_LUN=y |
@@ -62,13 +59,11 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
62 | CONFIG_AT91SAM9X_WATCHDOG=y | 59 | CONFIG_AT91SAM9X_WATCHDOG=y |
63 | CONFIG_FB=y | 60 | CONFIG_FB=y |
64 | CONFIG_FB_ATMEL=y | 61 | CONFIG_FB_ATMEL=y |
65 | # CONFIG_VGA_CONSOLE is not set | ||
66 | CONFIG_MMC=y | 62 | CONFIG_MMC=y |
67 | CONFIG_MMC_AT91=m | 63 | CONFIG_MMC_AT91=m |
68 | CONFIG_RTC_CLASS=y | 64 | CONFIG_RTC_CLASS=y |
69 | CONFIG_RTC_DRV_AT91SAM9=y | 65 | CONFIG_RTC_DRV_AT91SAM9=y |
70 | CONFIG_EXT2_FS=y | 66 | CONFIG_EXT2_FS=y |
71 | CONFIG_INOTIFY=y | ||
72 | CONFIG_MSDOS_FS=y | 67 | CONFIG_MSDOS_FS=y |
73 | CONFIG_VFAT_FS=y | 68 | CONFIG_VFAT_FS=y |
74 | CONFIG_TMPFS=y | 69 | CONFIG_TMPFS=y |
diff --git a/arch/arm/configs/ezx_defconfig b/arch/arm/configs/ezx_defconfig index 227a477346ed..d95763d5f0d8 100644 --- a/arch/arm/configs/ezx_defconfig +++ b/arch/arm/configs/ezx_defconfig | |||
@@ -287,7 +287,7 @@ CONFIG_USB=y | |||
287 | # CONFIG_USB_DEVICE_CLASS is not set | 287 | # CONFIG_USB_DEVICE_CLASS is not set |
288 | CONFIG_USB_OHCI_HCD=y | 288 | CONFIG_USB_OHCI_HCD=y |
289 | CONFIG_USB_GADGET=y | 289 | CONFIG_USB_GADGET=y |
290 | CONFIG_USB_GADGET_PXA27X=y | 290 | CONFIG_USB_PXA27X=y |
291 | CONFIG_USB_ETH=m | 291 | CONFIG_USB_ETH=m |
292 | # CONFIG_USB_ETH_RNDIS is not set | 292 | # CONFIG_USB_ETH_RNDIS is not set |
293 | CONFIG_MMC=y | 293 | CONFIG_MMC=y |
diff --git a/arch/arm/configs/imote2_defconfig b/arch/arm/configs/imote2_defconfig index 176ec22af034..fd996bb13022 100644 --- a/arch/arm/configs/imote2_defconfig +++ b/arch/arm/configs/imote2_defconfig | |||
@@ -263,7 +263,7 @@ CONFIG_USB=y | |||
263 | # CONFIG_USB_DEVICE_CLASS is not set | 263 | # CONFIG_USB_DEVICE_CLASS is not set |
264 | CONFIG_USB_OHCI_HCD=y | 264 | CONFIG_USB_OHCI_HCD=y |
265 | CONFIG_USB_GADGET=y | 265 | CONFIG_USB_GADGET=y |
266 | CONFIG_USB_GADGET_PXA27X=y | 266 | CONFIG_USB_PXA27X=y |
267 | CONFIG_USB_ETH=m | 267 | CONFIG_USB_ETH=m |
268 | # CONFIG_USB_ETH_RNDIS is not set | 268 | # CONFIG_USB_ETH_RNDIS is not set |
269 | CONFIG_MMC=y | 269 | CONFIG_MMC=y |
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig index a88e64d4e9a5..443675d317e6 100644 --- a/arch/arm/configs/magician_defconfig +++ b/arch/arm/configs/magician_defconfig | |||
@@ -132,7 +132,7 @@ CONFIG_USB_MON=m | |||
132 | CONFIG_USB_OHCI_HCD=y | 132 | CONFIG_USB_OHCI_HCD=y |
133 | CONFIG_USB_GADGET=y | 133 | CONFIG_USB_GADGET=y |
134 | CONFIG_USB_GADGET_VBUS_DRAW=500 | 134 | CONFIG_USB_GADGET_VBUS_DRAW=500 |
135 | CONFIG_USB_GADGET_PXA27X=y | 135 | CONFIG_USB_PXA27X=y |
136 | CONFIG_USB_ETH=m | 136 | CONFIG_USB_ETH=m |
137 | # CONFIG_USB_ETH_RNDIS is not set | 137 | # CONFIG_USB_ETH_RNDIS is not set |
138 | CONFIG_USB_GADGETFS=m | 138 | CONFIG_USB_GADGETFS=m |
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig index 7b63462b349d..945a34f2a34d 100644 --- a/arch/arm/configs/omap1_defconfig +++ b/arch/arm/configs/omap1_defconfig | |||
@@ -48,13 +48,7 @@ CONFIG_MACH_SX1=y | |||
48 | CONFIG_MACH_NOKIA770=y | 48 | CONFIG_MACH_NOKIA770=y |
49 | CONFIG_MACH_AMS_DELTA=y | 49 | CONFIG_MACH_AMS_DELTA=y |
50 | CONFIG_MACH_OMAP_GENERIC=y | 50 | CONFIG_MACH_OMAP_GENERIC=y |
51 | CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER=y | ||
52 | CONFIG_OMAP_ARM_216MHZ=y | ||
53 | CONFIG_OMAP_ARM_195MHZ=y | ||
54 | CONFIG_OMAP_ARM_192MHZ=y | ||
55 | CONFIG_OMAP_ARM_182MHZ=y | 51 | CONFIG_OMAP_ARM_182MHZ=y |
56 | CONFIG_OMAP_ARM_168MHZ=y | ||
57 | # CONFIG_OMAP_ARM_60MHZ is not set | ||
58 | # CONFIG_ARM_THUMB is not set | 52 | # CONFIG_ARM_THUMB is not set |
59 | CONFIG_PCCARD=y | 53 | CONFIG_PCCARD=y |
60 | CONFIG_OMAP_CF=y | 54 | CONFIG_OMAP_CF=y |
diff --git a/arch/arm/configs/u300_defconfig b/arch/arm/configs/u300_defconfig index 4a5a12681be2..374000ec4e4e 100644 --- a/arch/arm/configs/u300_defconfig +++ b/arch/arm/configs/u300_defconfig | |||
@@ -14,8 +14,6 @@ CONFIG_MODULE_UNLOAD=y | |||
14 | CONFIG_ARCH_U300=y | 14 | CONFIG_ARCH_U300=y |
15 | CONFIG_MACH_U300=y | 15 | CONFIG_MACH_U300=y |
16 | CONFIG_MACH_U300_BS335=y | 16 | CONFIG_MACH_U300_BS335=y |
17 | CONFIG_MACH_U300_DUAL_RAM=y | ||
18 | CONFIG_U300_DEBUG=y | ||
19 | CONFIG_MACH_U300_SPIDUMMY=y | 17 | CONFIG_MACH_U300_SPIDUMMY=y |
20 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
21 | CONFIG_HIGH_RES_TIMERS=y | 19 | CONFIG_HIGH_RES_TIMERS=y |
@@ -26,19 +24,21 @@ CONFIG_ZBOOT_ROM_BSS=0x0 | |||
26 | CONFIG_CMDLINE="root=/dev/ram0 rw rootfstype=rootfs console=ttyAMA0,115200n8 lpj=515072" | 24 | CONFIG_CMDLINE="root=/dev/ram0 rw rootfstype=rootfs console=ttyAMA0,115200n8 lpj=515072" |
27 | CONFIG_CPU_IDLE=y | 25 | CONFIG_CPU_IDLE=y |
28 | CONFIG_FPE_NWFPE=y | 26 | CONFIG_FPE_NWFPE=y |
29 | CONFIG_PM=y | ||
30 | # CONFIG_SUSPEND is not set | 27 | # CONFIG_SUSPEND is not set |
31 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 28 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
32 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 29 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
33 | # CONFIG_MISC_DEVICES is not set | 30 | CONFIG_MTD=y |
31 | CONFIG_MTD_CMDLINE_PARTS=y | ||
32 | CONFIG_MTD_NAND=y | ||
33 | CONFIG_MTD_NAND_FSMC=y | ||
34 | # CONFIG_INPUT_MOUSEDEV is not set | 34 | # CONFIG_INPUT_MOUSEDEV is not set |
35 | CONFIG_INPUT_EVDEV=y | 35 | CONFIG_INPUT_EVDEV=y |
36 | # CONFIG_KEYBOARD_ATKBD is not set | 36 | # CONFIG_KEYBOARD_ATKBD is not set |
37 | # CONFIG_INPUT_MOUSE is not set | 37 | # CONFIG_INPUT_MOUSE is not set |
38 | # CONFIG_SERIO is not set | 38 | # CONFIG_SERIO is not set |
39 | CONFIG_LEGACY_PTY_COUNT=16 | ||
39 | CONFIG_SERIAL_AMBA_PL011=y | 40 | CONFIG_SERIAL_AMBA_PL011=y |
40 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | 41 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y |
41 | CONFIG_LEGACY_PTY_COUNT=16 | ||
42 | # CONFIG_HW_RANDOM is not set | 42 | # CONFIG_HW_RANDOM is not set |
43 | CONFIG_I2C=y | 43 | CONFIG_I2C=y |
44 | # CONFIG_HWMON is not set | 44 | # CONFIG_HWMON is not set |
@@ -51,6 +51,7 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y | |||
51 | # CONFIG_HID_SUPPORT is not set | 51 | # CONFIG_HID_SUPPORT is not set |
52 | # CONFIG_USB_SUPPORT is not set | 52 | # CONFIG_USB_SUPPORT is not set |
53 | CONFIG_MMC=y | 53 | CONFIG_MMC=y |
54 | CONFIG_MMC_CLKGATE=y | ||
54 | CONFIG_MMC_ARMMMCI=y | 55 | CONFIG_MMC_ARMMMCI=y |
55 | CONFIG_RTC_CLASS=y | 56 | CONFIG_RTC_CLASS=y |
56 | # CONFIG_RTC_HCTOSYS is not set | 57 | # CONFIG_RTC_HCTOSYS is not set |
@@ -65,10 +66,8 @@ CONFIG_NLS_CODEPAGE_437=y | |||
65 | CONFIG_NLS_ISO8859_1=y | 66 | CONFIG_NLS_ISO8859_1=y |
66 | CONFIG_PRINTK_TIME=y | 67 | CONFIG_PRINTK_TIME=y |
67 | CONFIG_DEBUG_FS=y | 68 | CONFIG_DEBUG_FS=y |
68 | CONFIG_DEBUG_KERNEL=y | ||
69 | # CONFIG_SCHED_DEBUG is not set | 69 | # CONFIG_SCHED_DEBUG is not set |
70 | CONFIG_TIMER_STATS=y | 70 | CONFIG_TIMER_STATS=y |
71 | # CONFIG_DEBUG_PREEMPT is not set | 71 | # CONFIG_DEBUG_PREEMPT is not set |
72 | CONFIG_DEBUG_INFO=y | 72 | CONFIG_DEBUG_INFO=y |
73 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
74 | # CONFIG_CRC32 is not set | 73 | # CONFIG_CRC32 is not set |
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index 97d31a4663da..2d7b6e7b7271 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_MODULE_UNLOAD=y | |||
10 | CONFIG_ARCH_U8500=y | 10 | CONFIG_ARCH_U8500=y |
11 | CONFIG_UX500_SOC_DB5500=y | 11 | CONFIG_UX500_SOC_DB5500=y |
12 | CONFIG_UX500_SOC_DB8500=y | 12 | CONFIG_UX500_SOC_DB8500=y |
13 | CONFIG_MACH_U8500=y | 13 | CONFIG_MACH_HREFV60=y |
14 | CONFIG_MACH_SNOWBALL=y | 14 | CONFIG_MACH_SNOWBALL=y |
15 | CONFIG_MACH_U5500=y | 15 | CONFIG_MACH_U5500=y |
16 | CONFIG_NO_HZ=y | 16 | CONFIG_NO_HZ=y |
@@ -24,6 +24,7 @@ CONFIG_CPU_FREQ=y | |||
24 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 24 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
25 | CONFIG_VFP=y | 25 | CONFIG_VFP=y |
26 | CONFIG_NEON=y | 26 | CONFIG_NEON=y |
27 | CONFIG_PM_RUNTIME=y | ||
27 | CONFIG_NET=y | 28 | CONFIG_NET=y |
28 | CONFIG_PACKET=y | 29 | CONFIG_PACKET=y |
29 | CONFIG_UNIX=y | 30 | CONFIG_UNIX=y |
@@ -41,11 +42,8 @@ CONFIG_MISC_DEVICES=y | |||
41 | CONFIG_AB8500_PWM=y | 42 | CONFIG_AB8500_PWM=y |
42 | CONFIG_SENSORS_BH1780=y | 43 | CONFIG_SENSORS_BH1780=y |
43 | CONFIG_NETDEVICES=y | 44 | CONFIG_NETDEVICES=y |
44 | CONFIG_SMSC_PHY=y | ||
45 | CONFIG_NET_ETHERNET=y | ||
46 | CONFIG_SMSC911X=y | 45 | CONFIG_SMSC911X=y |
47 | # CONFIG_NETDEV_1000 is not set | 46 | CONFIG_SMSC_PHY=y |
48 | # CONFIG_NETDEV_10000 is not set | ||
49 | # CONFIG_WLAN is not set | 47 | # CONFIG_WLAN is not set |
50 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 48 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
51 | CONFIG_INPUT_EVDEV=y | 49 | CONFIG_INPUT_EVDEV=y |
@@ -72,15 +70,12 @@ CONFIG_SPI=y | |||
72 | CONFIG_SPI_PL022=y | 70 | CONFIG_SPI_PL022=y |
73 | CONFIG_GPIO_STMPE=y | 71 | CONFIG_GPIO_STMPE=y |
74 | CONFIG_GPIO_TC3589X=y | 72 | CONFIG_GPIO_TC3589X=y |
75 | # CONFIG_HWMON is not set | ||
76 | CONFIG_MFD_STMPE=y | 73 | CONFIG_MFD_STMPE=y |
77 | CONFIG_MFD_TC3589X=y | 74 | CONFIG_MFD_TC3589X=y |
75 | CONFIG_AB5500_CORE=y | ||
78 | CONFIG_AB8500_CORE=y | 76 | CONFIG_AB8500_CORE=y |
79 | CONFIG_REGULATOR_AB8500=y | 77 | CONFIG_REGULATOR_AB8500=y |
80 | # CONFIG_HID_SUPPORT is not set | 78 | # CONFIG_HID_SUPPORT is not set |
81 | CONFIG_USB_MUSB_HDRC=y | ||
82 | CONFIG_USB_GADGET_MUSB_HDRC=y | ||
83 | CONFIG_MUSB_PIO_ONLY=y | ||
84 | CONFIG_USB_GADGET=y | 79 | CONFIG_USB_GADGET=y |
85 | CONFIG_AB8500_USB=y | 80 | CONFIG_AB8500_USB=y |
86 | CONFIG_MMC=y | 81 | CONFIG_MMC=y |
@@ -97,6 +92,7 @@ CONFIG_DMADEVICES=y | |||
97 | CONFIG_STE_DMA40=y | 92 | CONFIG_STE_DMA40=y |
98 | CONFIG_STAGING=y | 93 | CONFIG_STAGING=y |
99 | CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y | 94 | CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y |
95 | CONFIG_HSEM_U8500=y | ||
100 | CONFIG_EXT2_FS=y | 96 | CONFIG_EXT2_FS=y |
101 | CONFIG_EXT2_FS_XATTR=y | 97 | CONFIG_EXT2_FS_XATTR=y |
102 | CONFIG_EXT2_FS_POSIX_ACL=y | 98 | CONFIG_EXT2_FS_POSIX_ACL=y |
diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig index 59577ad3f4ef..547a3c1e59db 100644 --- a/arch/arm/configs/zeus_defconfig +++ b/arch/arm/configs/zeus_defconfig | |||
@@ -140,7 +140,7 @@ CONFIG_USB_SERIAL=m | |||
140 | CONFIG_USB_SERIAL_GENERIC=y | 140 | CONFIG_USB_SERIAL_GENERIC=y |
141 | CONFIG_USB_SERIAL_MCT_U232=m | 141 | CONFIG_USB_SERIAL_MCT_U232=m |
142 | CONFIG_USB_GADGET=m | 142 | CONFIG_USB_GADGET=m |
143 | CONFIG_USB_GADGET_PXA27X=y | 143 | CONFIG_USB_PXA27X=y |
144 | CONFIG_USB_ETH=m | 144 | CONFIG_USB_ETH=m |
145 | CONFIG_USB_GADGETFS=m | 145 | CONFIG_USB_GADGETFS=m |
146 | CONFIG_USB_FILE_STORAGE=m | 146 | CONFIG_USB_FILE_STORAGE=m |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 1db1143a9483..7df239bcdf27 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __ASM_ARM_HARDWARE_L2X0_H | 20 | #ifndef __ASM_ARM_HARDWARE_L2X0_H |
21 | #define __ASM_ARM_HARDWARE_L2X0_H | 21 | #define __ASM_ARM_HARDWARE_L2X0_H |
22 | 22 | ||
23 | #include <linux/errno.h> | ||
24 | |||
23 | #define L2X0_CACHE_ID 0x000 | 25 | #define L2X0_CACHE_ID 0x000 |
24 | #define L2X0_CACHE_TYPE 0x004 | 26 | #define L2X0_CACHE_TYPE 0x004 |
25 | #define L2X0_CTRL 0x100 | 27 | #define L2X0_CTRL 0x100 |
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 7d19425dd496..2b0efc3104ac 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -13,6 +13,7 @@ | |||
13 | struct tag; | 13 | struct tag; |
14 | struct meminfo; | 14 | struct meminfo; |
15 | struct sys_timer; | 15 | struct sys_timer; |
16 | struct pt_regs; | ||
16 | 17 | ||
17 | struct machine_desc { | 18 | struct machine_desc { |
18 | unsigned int nr; /* architecture number */ | 19 | unsigned int nr; /* architecture number */ |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 71d99b83cdb9..0bda22c094a6 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -55,16 +55,6 @@ reserve_pmu(enum arm_pmu_type type); | |||
55 | extern void | 55 | extern void |
56 | release_pmu(enum arm_pmu_type type); | 56 | release_pmu(enum arm_pmu_type type); |
57 | 57 | ||
58 | /** | ||
59 | * init_pmu() - Initialise the PMU. | ||
60 | * | ||
61 | * Initialise the system ready for PMU enabling. This should typically set the | ||
62 | * IRQ affinity and nothing else. The users (oprofile/perf events etc) will do | ||
63 | * the actual hardware initialisation. | ||
64 | */ | ||
65 | extern int | ||
66 | init_pmu(enum arm_pmu_type type); | ||
67 | |||
68 | #else /* CONFIG_CPU_HAS_PMU */ | 58 | #else /* CONFIG_CPU_HAS_PMU */ |
69 | 59 | ||
70 | #include <linux/err.h> | 60 | #include <linux/err.h> |
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h index a7e457ed27c3..58b8b84adcd2 100644 --- a/arch/arm/include/asm/topology.h +++ b/arch/arm/include/asm/topology.h | |||
@@ -25,7 +25,7 @@ extern struct cputopo_arm cpu_topology[NR_CPUS]; | |||
25 | 25 | ||
26 | void init_cpu_topology(void); | 26 | void init_cpu_topology(void); |
27 | void store_cpu_topology(unsigned int cpuid); | 27 | void store_cpu_topology(unsigned int cpuid); |
28 | const struct cpumask *cpu_coregroup_mask(unsigned int cpu); | 28 | const struct cpumask *cpu_coregroup_mask(int cpu); |
29 | 29 | ||
30 | #else | 30 | #else |
31 | 31 | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index c60a2944f95b..4a1123783806 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -402,6 +402,8 @@ | |||
402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) | 402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) |
403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) | 403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) |
404 | #define __NR_setns (__NR_SYSCALL_BASE+375) | 404 | #define __NR_setns (__NR_SYSCALL_BASE+375) |
405 | #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) | ||
406 | #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) | ||
405 | 407 | ||
406 | /* | 408 | /* |
407 | * The following SWIs are ARM private. | 409 | * The following SWIs are ARM private. |
diff --git a/arch/arm/include/asm/unwind.h b/arch/arm/include/asm/unwind.h index a5edf421005c..d1c3f3a71c94 100644 --- a/arch/arm/include/asm/unwind.h +++ b/arch/arm/include/asm/unwind.h | |||
@@ -30,14 +30,15 @@ enum unwind_reason_code { | |||
30 | }; | 30 | }; |
31 | 31 | ||
32 | struct unwind_idx { | 32 | struct unwind_idx { |
33 | unsigned long addr; | 33 | unsigned long addr_offset; |
34 | unsigned long insn; | 34 | unsigned long insn; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | struct unwind_table { | 37 | struct unwind_table { |
38 | struct list_head list; | 38 | struct list_head list; |
39 | struct unwind_idx *start; | 39 | const struct unwind_idx *start; |
40 | struct unwind_idx *stop; | 40 | const struct unwind_idx *origin; |
41 | const struct unwind_idx *stop; | ||
41 | unsigned long begin_addr; | 42 | unsigned long begin_addr; |
42 | unsigned long end_addr; | 43 | unsigned long end_addr; |
43 | }; | 44 | }; |
@@ -49,15 +50,6 @@ extern struct unwind_table *unwind_table_add(unsigned long start, | |||
49 | extern void unwind_table_del(struct unwind_table *tab); | 50 | extern void unwind_table_del(struct unwind_table *tab); |
50 | extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk); | 51 | extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk); |
51 | 52 | ||
52 | #ifdef CONFIG_ARM_UNWIND | ||
53 | extern int __init unwind_init(void); | ||
54 | #else | ||
55 | static inline int __init unwind_init(void) | ||
56 | { | ||
57 | return 0; | ||
58 | } | ||
59 | #endif | ||
60 | |||
61 | #endif /* !__ASSEMBLY__ */ | 53 | #endif /* !__ASSEMBLY__ */ |
62 | 54 | ||
63 | #ifdef CONFIG_ARM_UNWIND | 55 | #ifdef CONFIG_ARM_UNWIND |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 9943e9e74a1b..463ff4a0ec8a 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -385,6 +385,8 @@ | |||
385 | CALL(sys_syncfs) | 385 | CALL(sys_syncfs) |
386 | CALL(sys_sendmmsg) | 386 | CALL(sys_sendmmsg) |
387 | /* 375 */ CALL(sys_setns) | 387 | /* 375 */ CALL(sys_setns) |
388 | CALL(sys_process_vm_readv) | ||
389 | CALL(sys_process_vm_writev) | ||
388 | #ifndef syscalls_counted | 390 | #ifndef syscalls_counted |
389 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 391 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
390 | #define syscalls_counted | 392 | #define syscalls_counted |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 9ad50c4208ae..b145f16c91bc 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -497,7 +497,7 @@ ENDPROC(__und_usr) | |||
497 | .popsection | 497 | .popsection |
498 | .pushsection __ex_table,"a" | 498 | .pushsection __ex_table,"a" |
499 | .long 1b, 4b | 499 | .long 1b, 4b |
500 | #if __LINUX_ARM_ARCH__ >= 7 | 500 | #if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7 |
501 | .long 2b, 4b | 501 | .long 2b, 4b |
502 | .long 3b, 4b | 502 | .long 3b, 4b |
503 | #endif | 503 | #endif |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 566c54c2a1fe..08c82fd844a8 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -360,7 +360,7 @@ __secondary_data: | |||
360 | * r13 = *virtual* address to jump to upon completion | 360 | * r13 = *virtual* address to jump to upon completion |
361 | */ | 361 | */ |
362 | __enable_mmu: | 362 | __enable_mmu: |
363 | #ifdef CONFIG_ALIGNMENT_TRAP | 363 | #if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 6 |
364 | orr r0, r0, #CR_A | 364 | orr r0, r0, #CR_A |
365 | #else | 365 | #else |
366 | bic r0, r0, #CR_A | 366 | bic r0, r0, #CR_A |
diff --git a/arch/arm/kernel/kprobes-arm.c b/arch/arm/kernel/kprobes-arm.c index 9fe8910308af..8a30c89da70e 100644 --- a/arch/arm/kernel/kprobes-arm.c +++ b/arch/arm/kernel/kprobes-arm.c | |||
@@ -519,10 +519,12 @@ static const union decode_item arm_cccc_0000_____1001_table[] = { | |||
519 | static const union decode_item arm_cccc_0001_____1001_table[] = { | 519 | static const union decode_item arm_cccc_0001_____1001_table[] = { |
520 | /* Synchronization primitives */ | 520 | /* Synchronization primitives */ |
521 | 521 | ||
522 | #if __LINUX_ARM_ARCH__ < 6 | ||
523 | /* Deprecated on ARMv6 and may be UNDEFINED on v7 */ | ||
522 | /* SMP/SWPB cccc 0001 0x00 xxxx xxxx xxxx 1001 xxxx */ | 524 | /* SMP/SWPB cccc 0001 0x00 xxxx xxxx xxxx 1001 xxxx */ |
523 | DECODE_EMULATEX (0x0fb000f0, 0x01000090, emulate_rd12rn16rm0_rwflags_nopc, | 525 | DECODE_EMULATEX (0x0fb000f0, 0x01000090, emulate_rd12rn16rm0_rwflags_nopc, |
524 | REGS(NOPC, NOPC, 0, 0, NOPC)), | 526 | REGS(NOPC, NOPC, 0, 0, NOPC)), |
525 | 527 | #endif | |
526 | /* LDREX/STREX{,D,B,H} cccc 0001 1xxx xxxx xxxx xxxx 1001 xxxx */ | 528 | /* LDREX/STREX{,D,B,H} cccc 0001 1xxx xxxx xxxx xxxx 1001 xxxx */ |
527 | /* And unallocated instructions... */ | 529 | /* And unallocated instructions... */ |
528 | DECODE_END | 530 | DECODE_END |
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index fc82de8bdcce..ba32b393b3f0 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c | |||
@@ -427,18 +427,25 @@ void kprobe_arm_test_cases(void) | |||
427 | 427 | ||
428 | TEST_GROUP("Synchronization primitives") | 428 | TEST_GROUP("Synchronization primitives") |
429 | 429 | ||
430 | /* | 430 | #if __LINUX_ARM_ARCH__ < 6 |
431 | * Use hard coded constants for SWP instructions to avoid warnings | 431 | TEST_RP("swp lr, r",7,VAL2,", [r",8,0,"]") |
432 | * about deprecated instructions. | 432 | TEST_R( "swpvs r0, r",1,VAL1,", [sp]") |
433 | */ | 433 | TEST_RP("swp sp, r",14,VAL2,", [r",12,13*4,"]") |
434 | TEST_RP( ".word 0xe108e097 @ swp lr, r",7,VAL2,", [r",8,0,"]") | 434 | #else |
435 | TEST_R( ".word 0x610d0091 @ swpvs r0, r",1,VAL1,", [sp]") | 435 | TEST_UNSUPPORTED(".word 0xe108e097 @ swp lr, r7, [r8]") |
436 | TEST_RP( ".word 0xe10cd09e @ swp sp, r",14,VAL2,", [r",12,13*4,"]") | 436 | TEST_UNSUPPORTED(".word 0x610d0091 @ swpvs r0, r1, [sp]") |
437 | TEST_UNSUPPORTED(".word 0xe10cd09e @ swp sp, r14 [r12]") | ||
438 | #endif | ||
437 | TEST_UNSUPPORTED(".word 0xe102f091 @ swp pc, r1, [r2]") | 439 | TEST_UNSUPPORTED(".word 0xe102f091 @ swp pc, r1, [r2]") |
438 | TEST_UNSUPPORTED(".word 0xe102009f @ swp r0, pc, [r2]") | 440 | TEST_UNSUPPORTED(".word 0xe102009f @ swp r0, pc, [r2]") |
439 | TEST_UNSUPPORTED(".word 0xe10f0091 @ swp r0, r1, [pc]") | 441 | TEST_UNSUPPORTED(".word 0xe10f0091 @ swp r0, r1, [pc]") |
440 | TEST_RP( ".word 0xe148e097 @ swpb lr, r",7,VAL2,", [r",8,0,"]") | 442 | #if __LINUX_ARM_ARCH__ < 6 |
441 | TEST_R( ".word 0x614d0091 @ swpvsb r0, r",1,VAL1,", [sp]") | 443 | TEST_RP("swpb lr, r",7,VAL2,", [r",8,0,"]") |
444 | TEST_R( "swpvsb r0, r",1,VAL1,", [sp]") | ||
445 | #else | ||
446 | TEST_UNSUPPORTED(".word 0xe148e097 @ swpb lr, r7, [r8]") | ||
447 | TEST_UNSUPPORTED(".word 0x614d0091 @ swpvsb r0, r1, [sp]") | ||
448 | #endif | ||
442 | TEST_UNSUPPORTED(".word 0xe142f091 @ swpb pc, r1, [r2]") | 449 | TEST_UNSUPPORTED(".word 0xe142f091 @ swpb pc, r1, [r2]") |
443 | 450 | ||
444 | TEST_UNSUPPORTED(".word 0xe1100090") /* Unallocated space */ | 451 | TEST_UNSUPPORTED(".word 0xe1100090") /* Unallocated space */ |
@@ -550,7 +557,7 @@ void kprobe_arm_test_cases(void) | |||
550 | TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]") | 557 | TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]") |
551 | TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!") | 558 | TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!") |
552 | TEST_RPR( "strcsd r",12,VAL2,", [r",11,48,", -r",10,24,"]!") | 559 | TEST_RPR( "strcsd r",12,VAL2,", [r",11,48,", -r",10,24,"]!") |
553 | TEST_RPR( "strd r",2, VAL1,", [r",3, 24,"], r",4,48,"") | 560 | TEST_RPR( "strd r",2, VAL1,", [r",5, 24,"], r",4,48,"") |
554 | TEST_RPR( "strd r",10,VAL2,", [r",9, 48,"], -r",7,24,"") | 561 | TEST_RPR( "strd r",10,VAL2,", [r",9, 48,"], -r",7,24,"") |
555 | TEST_UNSUPPORTED(".word 0xe1afc0fa @ strd r12, [pc, r10]!") | 562 | TEST_UNSUPPORTED(".word 0xe1afc0fa @ strd r12, [pc, r10]!") |
556 | 563 | ||
diff --git a/arch/arm/kernel/kprobes-test-thumb.c b/arch/arm/kernel/kprobes-test-thumb.c index 5e726c31c45a..5d8b85792222 100644 --- a/arch/arm/kernel/kprobes-test-thumb.c +++ b/arch/arm/kernel/kprobes-test-thumb.c | |||
@@ -222,8 +222,8 @@ void kprobe_thumb16_test_cases(void) | |||
222 | DONT_TEST_IN_ITBLOCK( | 222 | DONT_TEST_IN_ITBLOCK( |
223 | TEST_BF_R( "cbnz r",0,0, ", 2f") | 223 | TEST_BF_R( "cbnz r",0,0, ", 2f") |
224 | TEST_BF_R( "cbz r",2,-1,", 2f") | 224 | TEST_BF_R( "cbz r",2,-1,", 2f") |
225 | TEST_BF_RX( "cbnz r",4,1, ", 2f",0x20) | 225 | TEST_BF_RX( "cbnz r",4,1, ", 2f", SPACE_0x20) |
226 | TEST_BF_RX( "cbz r",7,0, ", 2f",0x40) | 226 | TEST_BF_RX( "cbz r",7,0, ", 2f", SPACE_0x40) |
227 | ) | 227 | ) |
228 | TEST_R("sxth r0, r",7, HH1,"") | 228 | TEST_R("sxth r0, r",7, HH1,"") |
229 | TEST_R("sxth r7, r",0, HH2,"") | 229 | TEST_R("sxth r7, r",0, HH2,"") |
@@ -246,7 +246,7 @@ DONT_TEST_IN_ITBLOCK( | |||
246 | TESTCASE_START(code) \ | 246 | TESTCASE_START(code) \ |
247 | TEST_ARG_PTR(13, offset) \ | 247 | TEST_ARG_PTR(13, offset) \ |
248 | TEST_ARG_END("") \ | 248 | TEST_ARG_END("") \ |
249 | TEST_BRANCH_F(code,0) \ | 249 | TEST_BRANCH_F(code) \ |
250 | TESTCASE_END | 250 | TESTCASE_END |
251 | 251 | ||
252 | TEST("push {r0}") | 252 | TEST("push {r0}") |
@@ -319,8 +319,8 @@ CONDITION_INSTRUCTIONS(8, | |||
319 | 319 | ||
320 | TEST_BF( "b 2f") | 320 | TEST_BF( "b 2f") |
321 | TEST_BB( "b 2b") | 321 | TEST_BB( "b 2b") |
322 | TEST_BF_X("b 2f", 0x400) | 322 | TEST_BF_X("b 2f", SPACE_0x400) |
323 | TEST_BB_X("b 2b", 0x400) | 323 | TEST_BB_X("b 2b", SPACE_0x400) |
324 | 324 | ||
325 | TEST_GROUP("Testing instructions in IT blocks") | 325 | TEST_GROUP("Testing instructions in IT blocks") |
326 | 326 | ||
@@ -746,7 +746,7 @@ CONDITION_INSTRUCTIONS(22, | |||
746 | TEST_BB("bne.w 2b") | 746 | TEST_BB("bne.w 2b") |
747 | TEST_BF("bgt.w 2f") | 747 | TEST_BF("bgt.w 2f") |
748 | TEST_BB("blt.w 2b") | 748 | TEST_BB("blt.w 2b") |
749 | TEST_BF_X("bpl.w 2f",0x1000) | 749 | TEST_BF_X("bpl.w 2f", SPACE_0x1000) |
750 | ) | 750 | ) |
751 | 751 | ||
752 | TEST_UNSUPPORTED("msr cpsr, r0") | 752 | TEST_UNSUPPORTED("msr cpsr, r0") |
@@ -786,11 +786,11 @@ CONDITION_INSTRUCTIONS(22, | |||
786 | 786 | ||
787 | TEST_BF( "b.w 2f") | 787 | TEST_BF( "b.w 2f") |
788 | TEST_BB( "b.w 2b") | 788 | TEST_BB( "b.w 2b") |
789 | TEST_BF_X("b.w 2f", 0x1000) | 789 | TEST_BF_X("b.w 2f", SPACE_0x1000) |
790 | 790 | ||
791 | TEST_BF( "bl.w 2f") | 791 | TEST_BF( "bl.w 2f") |
792 | TEST_BB( "bl.w 2b") | 792 | TEST_BB( "bl.w 2b") |
793 | TEST_BB_X("bl.w 2b", 0x1000) | 793 | TEST_BB_X("bl.w 2b", SPACE_0x1000) |
794 | 794 | ||
795 | TEST_X( "blx __dummy_arm_subroutine", | 795 | TEST_X( "blx __dummy_arm_subroutine", |
796 | ".arm \n\t" | 796 | ".arm \n\t" |
diff --git a/arch/arm/kernel/kprobes-test.h b/arch/arm/kernel/kprobes-test.h index 0dc5d77b9356..e28a869b1ae4 100644 --- a/arch/arm/kernel/kprobes-test.h +++ b/arch/arm/kernel/kprobes-test.h | |||
@@ -149,23 +149,31 @@ struct test_arg_end { | |||
149 | "1: "instruction" \n\t" \ | 149 | "1: "instruction" \n\t" \ |
150 | " nop \n\t" | 150 | " nop \n\t" |
151 | 151 | ||
152 | #define TEST_BRANCH_F(instruction, xtra_dist) \ | 152 | #define TEST_BRANCH_F(instruction) \ |
153 | TEST_INSTRUCTION(instruction) \ | 153 | TEST_INSTRUCTION(instruction) \ |
154 | ".if "#xtra_dist" \n\t" \ | ||
155 | " b 99f \n\t" \ | 154 | " b 99f \n\t" \ |
156 | ".space "#xtra_dist" \n\t" \ | 155 | "2: nop \n\t" |
157 | ".endif \n\t" \ | 156 | |
157 | #define TEST_BRANCH_B(instruction) \ | ||
158 | " b 50f \n\t" \ | ||
159 | " b 99f \n\t" \ | ||
160 | "2: nop \n\t" \ | ||
161 | " b 99f \n\t" \ | ||
162 | TEST_INSTRUCTION(instruction) | ||
163 | |||
164 | #define TEST_BRANCH_FX(instruction, codex) \ | ||
165 | TEST_INSTRUCTION(instruction) \ | ||
166 | " b 99f \n\t" \ | ||
167 | codex" \n\t" \ | ||
158 | " b 99f \n\t" \ | 168 | " b 99f \n\t" \ |
159 | "2: nop \n\t" | 169 | "2: nop \n\t" |
160 | 170 | ||
161 | #define TEST_BRANCH_B(instruction, xtra_dist) \ | 171 | #define TEST_BRANCH_BX(instruction, codex) \ |
162 | " b 50f \n\t" \ | 172 | " b 50f \n\t" \ |
163 | " b 99f \n\t" \ | 173 | " b 99f \n\t" \ |
164 | "2: nop \n\t" \ | 174 | "2: nop \n\t" \ |
165 | " b 99f \n\t" \ | 175 | " b 99f \n\t" \ |
166 | ".if "#xtra_dist" \n\t" \ | 176 | codex" \n\t" \ |
167 | ".space "#xtra_dist" \n\t" \ | ||
168 | ".endif \n\t" \ | ||
169 | TEST_INSTRUCTION(instruction) | 177 | TEST_INSTRUCTION(instruction) |
170 | 178 | ||
171 | #define TESTCASE_END \ | 179 | #define TESTCASE_END \ |
@@ -301,47 +309,60 @@ struct test_arg_end { | |||
301 | TESTCASE_START(code1 #reg1 code2) \ | 309 | TESTCASE_START(code1 #reg1 code2) \ |
302 | TEST_ARG_PTR(reg1, val1) \ | 310 | TEST_ARG_PTR(reg1, val1) \ |
303 | TEST_ARG_END("") \ | 311 | TEST_ARG_END("") \ |
304 | TEST_BRANCH_F(code1 #reg1 code2, 0) \ | 312 | TEST_BRANCH_F(code1 #reg1 code2) \ |
305 | TESTCASE_END | 313 | TESTCASE_END |
306 | 314 | ||
307 | #define TEST_BF_X(code, xtra_dist) \ | 315 | #define TEST_BF(code) \ |
308 | TESTCASE_START(code) \ | 316 | TESTCASE_START(code) \ |
309 | TEST_ARG_END("") \ | 317 | TEST_ARG_END("") \ |
310 | TEST_BRANCH_F(code, xtra_dist) \ | 318 | TEST_BRANCH_F(code) \ |
311 | TESTCASE_END | 319 | TESTCASE_END |
312 | 320 | ||
313 | #define TEST_BB_X(code, xtra_dist) \ | 321 | #define TEST_BB(code) \ |
314 | TESTCASE_START(code) \ | 322 | TESTCASE_START(code) \ |
315 | TEST_ARG_END("") \ | 323 | TEST_ARG_END("") \ |
316 | TEST_BRANCH_B(code, xtra_dist) \ | 324 | TEST_BRANCH_B(code) \ |
317 | TESTCASE_END | 325 | TESTCASE_END |
318 | 326 | ||
319 | #define TEST_BF_RX(code1, reg, val, code2, xtra_dist) \ | 327 | #define TEST_BF_R(code1, reg, val, code2) \ |
320 | TESTCASE_START(code1 #reg code2) \ | 328 | TESTCASE_START(code1 #reg code2) \ |
321 | TEST_ARG_REG(reg, val) \ | 329 | TEST_ARG_REG(reg, val) \ |
322 | TEST_ARG_END("") \ | 330 | TEST_ARG_END("") \ |
323 | TEST_BRANCH_F(code1 #reg code2, xtra_dist) \ | 331 | TEST_BRANCH_F(code1 #reg code2) \ |
324 | TESTCASE_END | 332 | TESTCASE_END |
325 | 333 | ||
326 | #define TEST_BB_RX(code1, reg, val, code2, xtra_dist) \ | 334 | #define TEST_BB_R(code1, reg, val, code2) \ |
327 | TESTCASE_START(code1 #reg code2) \ | 335 | TESTCASE_START(code1 #reg code2) \ |
328 | TEST_ARG_REG(reg, val) \ | 336 | TEST_ARG_REG(reg, val) \ |
329 | TEST_ARG_END("") \ | 337 | TEST_ARG_END("") \ |
330 | TEST_BRANCH_B(code1 #reg code2, xtra_dist) \ | 338 | TEST_BRANCH_B(code1 #reg code2) \ |
331 | TESTCASE_END | 339 | TESTCASE_END |
332 | 340 | ||
333 | #define TEST_BF(code) TEST_BF_X(code, 0) | ||
334 | #define TEST_BB(code) TEST_BB_X(code, 0) | ||
335 | |||
336 | #define TEST_BF_R(code1, reg, val, code2) TEST_BF_RX(code1, reg, val, code2, 0) | ||
337 | #define TEST_BB_R(code1, reg, val, code2) TEST_BB_RX(code1, reg, val, code2, 0) | ||
338 | |||
339 | #define TEST_BF_RR(code1, reg1, val1, code2, reg2, val2, code3) \ | 341 | #define TEST_BF_RR(code1, reg1, val1, code2, reg2, val2, code3) \ |
340 | TESTCASE_START(code1 #reg1 code2 #reg2 code3) \ | 342 | TESTCASE_START(code1 #reg1 code2 #reg2 code3) \ |
341 | TEST_ARG_REG(reg1, val1) \ | 343 | TEST_ARG_REG(reg1, val1) \ |
342 | TEST_ARG_REG(reg2, val2) \ | 344 | TEST_ARG_REG(reg2, val2) \ |
343 | TEST_ARG_END("") \ | 345 | TEST_ARG_END("") \ |
344 | TEST_BRANCH_F(code1 #reg1 code2 #reg2 code3, 0) \ | 346 | TEST_BRANCH_F(code1 #reg1 code2 #reg2 code3) \ |
347 | TESTCASE_END | ||
348 | |||
349 | #define TEST_BF_X(code, codex) \ | ||
350 | TESTCASE_START(code) \ | ||
351 | TEST_ARG_END("") \ | ||
352 | TEST_BRANCH_FX(code, codex) \ | ||
353 | TESTCASE_END | ||
354 | |||
355 | #define TEST_BB_X(code, codex) \ | ||
356 | TESTCASE_START(code) \ | ||
357 | TEST_ARG_END("") \ | ||
358 | TEST_BRANCH_BX(code, codex) \ | ||
359 | TESTCASE_END | ||
360 | |||
361 | #define TEST_BF_RX(code1, reg, val, code2, codex) \ | ||
362 | TESTCASE_START(code1 #reg code2) \ | ||
363 | TEST_ARG_REG(reg, val) \ | ||
364 | TEST_ARG_END("") \ | ||
365 | TEST_BRANCH_FX(code1 #reg code2, codex) \ | ||
345 | TESTCASE_END | 366 | TESTCASE_END |
346 | 367 | ||
347 | #define TEST_X(code, codex) \ | 368 | #define TEST_X(code, codex) \ |
@@ -372,6 +393,25 @@ struct test_arg_end { | |||
372 | TESTCASE_END | 393 | TESTCASE_END |
373 | 394 | ||
374 | 395 | ||
396 | /* | ||
397 | * Macros for defining space directives spread over multiple lines. | ||
398 | * These are required so the compiler guesses better the length of inline asm | ||
399 | * code and will spill the literal pool early enough to avoid generating PC | ||
400 | * relative loads with out of range offsets. | ||
401 | */ | ||
402 | #define TWICE(x) x x | ||
403 | #define SPACE_0x8 TWICE(".space 4\n\t") | ||
404 | #define SPACE_0x10 TWICE(SPACE_0x8) | ||
405 | #define SPACE_0x20 TWICE(SPACE_0x10) | ||
406 | #define SPACE_0x40 TWICE(SPACE_0x20) | ||
407 | #define SPACE_0x80 TWICE(SPACE_0x40) | ||
408 | #define SPACE_0x100 TWICE(SPACE_0x80) | ||
409 | #define SPACE_0x200 TWICE(SPACE_0x100) | ||
410 | #define SPACE_0x400 TWICE(SPACE_0x200) | ||
411 | #define SPACE_0x800 TWICE(SPACE_0x400) | ||
412 | #define SPACE_0x1000 TWICE(SPACE_0x800) | ||
413 | |||
414 | |||
375 | /* Various values used in test cases... */ | 415 | /* Various values used in test cases... */ |
376 | #define N(val) (val ^ 0xffffffff) | 416 | #define N(val) (val ^ 0xffffffff) |
377 | #define VAL1 0x12345678 | 417 | #define VAL1 0x12345678 |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index c1b4463dcc83..e59bbd496c39 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -32,24 +32,6 @@ static atomic_t waiting_for_crash_ipi; | |||
32 | 32 | ||
33 | int machine_kexec_prepare(struct kimage *image) | 33 | int machine_kexec_prepare(struct kimage *image) |
34 | { | 34 | { |
35 | unsigned long page_list; | ||
36 | void *reboot_code_buffer; | ||
37 | page_list = image->head & PAGE_MASK; | ||
38 | |||
39 | reboot_code_buffer = page_address(image->control_code_page); | ||
40 | |||
41 | /* Prepare parameters for reboot_code_buffer*/ | ||
42 | kexec_start_address = image->start; | ||
43 | kexec_indirection_page = page_list; | ||
44 | kexec_mach_type = machine_arch_type; | ||
45 | kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET; | ||
46 | |||
47 | /* copy our kernel relocation code to the control code page */ | ||
48 | memcpy(reboot_code_buffer, | ||
49 | relocate_new_kernel, relocate_new_kernel_size); | ||
50 | |||
51 | flush_icache_range((unsigned long) reboot_code_buffer, | ||
52 | (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); | ||
53 | return 0; | 35 | return 0; |
54 | } | 36 | } |
55 | 37 | ||
@@ -100,14 +82,31 @@ void (*kexec_reinit)(void); | |||
100 | 82 | ||
101 | void machine_kexec(struct kimage *image) | 83 | void machine_kexec(struct kimage *image) |
102 | { | 84 | { |
85 | unsigned long page_list; | ||
103 | unsigned long reboot_code_buffer_phys; | 86 | unsigned long reboot_code_buffer_phys; |
104 | void *reboot_code_buffer; | 87 | void *reboot_code_buffer; |
105 | 88 | ||
89 | |||
90 | page_list = image->head & PAGE_MASK; | ||
91 | |||
106 | /* we need both effective and real address here */ | 92 | /* we need both effective and real address here */ |
107 | reboot_code_buffer_phys = | 93 | reboot_code_buffer_phys = |
108 | page_to_pfn(image->control_code_page) << PAGE_SHIFT; | 94 | page_to_pfn(image->control_code_page) << PAGE_SHIFT; |
109 | reboot_code_buffer = page_address(image->control_code_page); | 95 | reboot_code_buffer = page_address(image->control_code_page); |
110 | 96 | ||
97 | /* Prepare parameters for reboot_code_buffer*/ | ||
98 | kexec_start_address = image->start; | ||
99 | kexec_indirection_page = page_list; | ||
100 | kexec_mach_type = machine_arch_type; | ||
101 | kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET; | ||
102 | |||
103 | /* copy our kernel relocation code to the control code page */ | ||
104 | memcpy(reboot_code_buffer, | ||
105 | relocate_new_kernel, relocate_new_kernel_size); | ||
106 | |||
107 | |||
108 | flush_icache_range((unsigned long) reboot_code_buffer, | ||
109 | (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); | ||
111 | printk(KERN_INFO "Bye!\n"); | 110 | printk(KERN_INFO "Bye!\n"); |
112 | 111 | ||
113 | if (kexec_reinit) | 112 | if (kexec_reinit) |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 24e2347be6b1..88b0941ce51e 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -343,19 +343,25 @@ validate_group(struct perf_event *event) | |||
343 | { | 343 | { |
344 | struct perf_event *sibling, *leader = event->group_leader; | 344 | struct perf_event *sibling, *leader = event->group_leader; |
345 | struct pmu_hw_events fake_pmu; | 345 | struct pmu_hw_events fake_pmu; |
346 | DECLARE_BITMAP(fake_used_mask, ARMPMU_MAX_HWEVENTS); | ||
346 | 347 | ||
347 | memset(&fake_pmu, 0, sizeof(fake_pmu)); | 348 | /* |
349 | * Initialise the fake PMU. We only need to populate the | ||
350 | * used_mask for the purposes of validation. | ||
351 | */ | ||
352 | memset(fake_used_mask, 0, sizeof(fake_used_mask)); | ||
353 | fake_pmu.used_mask = fake_used_mask; | ||
348 | 354 | ||
349 | if (!validate_event(&fake_pmu, leader)) | 355 | if (!validate_event(&fake_pmu, leader)) |
350 | return -ENOSPC; | 356 | return -EINVAL; |
351 | 357 | ||
352 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { | 358 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { |
353 | if (!validate_event(&fake_pmu, sibling)) | 359 | if (!validate_event(&fake_pmu, sibling)) |
354 | return -ENOSPC; | 360 | return -EINVAL; |
355 | } | 361 | } |
356 | 362 | ||
357 | if (!validate_event(&fake_pmu, event)) | 363 | if (!validate_event(&fake_pmu, event)) |
358 | return -ENOSPC; | 364 | return -EINVAL; |
359 | 365 | ||
360 | return 0; | 366 | return 0; |
361 | } | 367 | } |
@@ -396,6 +402,9 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu) | |||
396 | int i, err, irq, irqs; | 402 | int i, err, irq, irqs; |
397 | struct platform_device *pmu_device = armpmu->plat_device; | 403 | struct platform_device *pmu_device = armpmu->plat_device; |
398 | 404 | ||
405 | if (!pmu_device) | ||
406 | return -ENODEV; | ||
407 | |||
399 | err = reserve_pmu(armpmu->type); | 408 | err = reserve_pmu(armpmu->type); |
400 | if (err) { | 409 | if (err) { |
401 | pr_warning("unable to reserve pmu\n"); | 410 | pr_warning("unable to reserve pmu\n"); |
@@ -631,6 +640,9 @@ static struct platform_device_id armpmu_plat_device_ids[] = { | |||
631 | 640 | ||
632 | static int __devinit armpmu_device_probe(struct platform_device *pdev) | 641 | static int __devinit armpmu_device_probe(struct platform_device *pdev) |
633 | { | 642 | { |
643 | if (!cpu_pmu) | ||
644 | return -ENODEV; | ||
645 | |||
634 | cpu_pmu->plat_device = pdev; | 646 | cpu_pmu->plat_device = pdev; |
635 | return 0; | 647 | return 0; |
636 | } | 648 | } |
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c index 2c3407ee8576..2334bf8a650a 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c | |||
@@ -33,3 +33,4 @@ release_pmu(enum arm_pmu_type type) | |||
33 | { | 33 | { |
34 | clear_bit_unlock(type, pmu_lock); | 34 | clear_bit_unlock(type, pmu_lock); |
35 | } | 35 | } |
36 | EXPORT_SYMBOL_GPL(release_pmu); | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 75316f0dd02a..3d0c6fb74ae4 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -192,6 +192,9 @@ void cpu_idle(void) | |||
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | local_irq_disable(); | 194 | local_irq_disable(); |
195 | #ifdef CONFIG_PL310_ERRATA_769419 | ||
196 | wmb(); | ||
197 | #endif | ||
195 | if (hlt_counter) { | 198 | if (hlt_counter) { |
196 | local_irq_enable(); | 199 | local_irq_enable(); |
197 | cpu_relax(); | 200 | cpu_relax(); |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 7e7977ab994f..8fc2c8fcbdc6 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -461,8 +461,10 @@ static void __init setup_processor(void) | |||
461 | cpu_name, read_cpuid_id(), read_cpuid_id() & 15, | 461 | cpu_name, read_cpuid_id(), read_cpuid_id() & 15, |
462 | proc_arch[cpu_architecture()], cr_alignment); | 462 | proc_arch[cpu_architecture()], cr_alignment); |
463 | 463 | ||
464 | sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS); | 464 | snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c", |
465 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); | 465 | list->arch_name, ENDIANNESS); |
466 | snprintf(elf_platform, ELF_PLATFORM_SIZE, "%s%c", | ||
467 | list->elf_name, ENDIANNESS); | ||
466 | elf_hwcap = list->elf_hwcap; | 468 | elf_hwcap = list->elf_hwcap; |
467 | #ifndef CONFIG_ARM_THUMB | 469 | #ifndef CONFIG_ARM_THUMB |
468 | elf_hwcap &= ~HWCAP_THUMB; | 470 | elf_hwcap &= ~HWCAP_THUMB; |
@@ -893,8 +895,6 @@ void __init setup_arch(char **cmdline_p) | |||
893 | { | 895 | { |
894 | struct machine_desc *mdesc; | 896 | struct machine_desc *mdesc; |
895 | 897 | ||
896 | unwind_init(); | ||
897 | |||
898 | setup_processor(); | 898 | setup_processor(); |
899 | mdesc = setup_machine_fdt(__atags_pointer); | 899 | mdesc = setup_machine_fdt(__atags_pointer); |
900 | if (!mdesc) | 900 | if (!mdesc) |
@@ -902,6 +902,12 @@ void __init setup_arch(char **cmdline_p) | |||
902 | machine_desc = mdesc; | 902 | machine_desc = mdesc; |
903 | machine_name = mdesc->name; | 903 | machine_name = mdesc->name; |
904 | 904 | ||
905 | #ifdef CONFIG_ZONE_DMA | ||
906 | if (mdesc->dma_zone_size) { | ||
907 | extern unsigned long arm_dma_zone_size; | ||
908 | arm_dma_zone_size = mdesc->dma_zone_size; | ||
909 | } | ||
910 | #endif | ||
905 | if (mdesc->soft_reboot) | 911 | if (mdesc->soft_reboot) |
906 | reboot_setup("s"); | 912 | reboot_setup("s"); |
907 | 913 | ||
@@ -932,12 +938,6 @@ void __init setup_arch(char **cmdline_p) | |||
932 | 938 | ||
933 | tcm_init(); | 939 | tcm_init(); |
934 | 940 | ||
935 | #ifdef CONFIG_ZONE_DMA | ||
936 | if (mdesc->dma_zone_size) { | ||
937 | extern unsigned long arm_dma_zone_size; | ||
938 | arm_dma_zone_size = mdesc->dma_zone_size; | ||
939 | } | ||
940 | #endif | ||
941 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 941 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
942 | handle_arch_irq = mdesc->handle_irq; | 942 | handle_arch_irq = mdesc->handle_irq; |
943 | #endif | 943 | #endif |
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 1040c00405d0..8200deaa14f6 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c | |||
@@ -43,7 +43,7 @@ | |||
43 | 43 | ||
44 | struct cputopo_arm cpu_topology[NR_CPUS]; | 44 | struct cputopo_arm cpu_topology[NR_CPUS]; |
45 | 45 | ||
46 | const struct cpumask *cpu_coregroup_mask(unsigned int cpu) | 46 | const struct cpumask *cpu_coregroup_mask(int cpu) |
47 | { | 47 | { |
48 | return &cpu_topology[cpu].core_sibling; | 48 | return &cpu_topology[cpu].core_sibling; |
49 | } | 49 | } |
diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index e7e8365795c3..00df012c4678 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c | |||
@@ -67,7 +67,7 @@ EXPORT_SYMBOL(__aeabi_unwind_cpp_pr2); | |||
67 | 67 | ||
68 | struct unwind_ctrl_block { | 68 | struct unwind_ctrl_block { |
69 | unsigned long vrs[16]; /* virtual register set */ | 69 | unsigned long vrs[16]; /* virtual register set */ |
70 | unsigned long *insn; /* pointer to the current instructions word */ | 70 | const unsigned long *insn; /* pointer to the current instructions word */ |
71 | int entries; /* number of entries left to interpret */ | 71 | int entries; /* number of entries left to interpret */ |
72 | int byte; /* current byte number in the instructions word */ | 72 | int byte; /* current byte number in the instructions word */ |
73 | }; | 73 | }; |
@@ -83,8 +83,9 @@ enum regs { | |||
83 | PC = 15 | 83 | PC = 15 |
84 | }; | 84 | }; |
85 | 85 | ||
86 | extern struct unwind_idx __start_unwind_idx[]; | 86 | extern const struct unwind_idx __start_unwind_idx[]; |
87 | extern struct unwind_idx __stop_unwind_idx[]; | 87 | static const struct unwind_idx *__origin_unwind_idx; |
88 | extern const struct unwind_idx __stop_unwind_idx[]; | ||
88 | 89 | ||
89 | static DEFINE_SPINLOCK(unwind_lock); | 90 | static DEFINE_SPINLOCK(unwind_lock); |
90 | static LIST_HEAD(unwind_tables); | 91 | static LIST_HEAD(unwind_tables); |
@@ -98,45 +99,99 @@ static LIST_HEAD(unwind_tables); | |||
98 | }) | 99 | }) |
99 | 100 | ||
100 | /* | 101 | /* |
101 | * Binary search in the unwind index. The entries entries are | 102 | * Binary search in the unwind index. The entries are |
102 | * guaranteed to be sorted in ascending order by the linker. | 103 | * guaranteed to be sorted in ascending order by the linker. |
104 | * | ||
105 | * start = first entry | ||
106 | * origin = first entry with positive offset (or stop if there is no such entry) | ||
107 | * stop - 1 = last entry | ||
103 | */ | 108 | */ |
104 | static struct unwind_idx *search_index(unsigned long addr, | 109 | static const struct unwind_idx *search_index(unsigned long addr, |
105 | struct unwind_idx *first, | 110 | const struct unwind_idx *start, |
106 | struct unwind_idx *last) | 111 | const struct unwind_idx *origin, |
112 | const struct unwind_idx *stop) | ||
107 | { | 113 | { |
108 | pr_debug("%s(%08lx, %p, %p)\n", __func__, addr, first, last); | 114 | unsigned long addr_prel31; |
115 | |||
116 | pr_debug("%s(%08lx, %p, %p, %p)\n", | ||
117 | __func__, addr, start, origin, stop); | ||
118 | |||
119 | /* | ||
120 | * only search in the section with the matching sign. This way the | ||
121 | * prel31 numbers can be compared as unsigned longs. | ||
122 | */ | ||
123 | if (addr < (unsigned long)start) | ||
124 | /* negative offsets: [start; origin) */ | ||
125 | stop = origin; | ||
126 | else | ||
127 | /* positive offsets: [origin; stop) */ | ||
128 | start = origin; | ||
129 | |||
130 | /* prel31 for address relavive to start */ | ||
131 | addr_prel31 = (addr - (unsigned long)start) & 0x7fffffff; | ||
109 | 132 | ||
110 | if (addr < first->addr) { | 133 | while (start < stop - 1) { |
134 | const struct unwind_idx *mid = start + ((stop - start) >> 1); | ||
135 | |||
136 | /* | ||
137 | * As addr_prel31 is relative to start an offset is needed to | ||
138 | * make it relative to mid. | ||
139 | */ | ||
140 | if (addr_prel31 - ((unsigned long)mid - (unsigned long)start) < | ||
141 | mid->addr_offset) | ||
142 | stop = mid; | ||
143 | else { | ||
144 | /* keep addr_prel31 relative to start */ | ||
145 | addr_prel31 -= ((unsigned long)mid - | ||
146 | (unsigned long)start); | ||
147 | start = mid; | ||
148 | } | ||
149 | } | ||
150 | |||
151 | if (likely(start->addr_offset <= addr_prel31)) | ||
152 | return start; | ||
153 | else { | ||
111 | pr_warning("unwind: Unknown symbol address %08lx\n", addr); | 154 | pr_warning("unwind: Unknown symbol address %08lx\n", addr); |
112 | return NULL; | 155 | return NULL; |
113 | } else if (addr >= last->addr) | 156 | } |
114 | return last; | 157 | } |
115 | 158 | ||
116 | while (first < last - 1) { | 159 | static const struct unwind_idx *unwind_find_origin( |
117 | struct unwind_idx *mid = first + ((last - first + 1) >> 1); | 160 | const struct unwind_idx *start, const struct unwind_idx *stop) |
161 | { | ||
162 | pr_debug("%s(%p, %p)\n", __func__, start, stop); | ||
163 | while (start < stop) { | ||
164 | const struct unwind_idx *mid = start + ((stop - start) >> 1); | ||
118 | 165 | ||
119 | if (addr < mid->addr) | 166 | if (mid->addr_offset >= 0x40000000) |
120 | last = mid; | 167 | /* negative offset */ |
168 | start = mid + 1; | ||
121 | else | 169 | else |
122 | first = mid; | 170 | /* positive offset */ |
171 | stop = mid; | ||
123 | } | 172 | } |
124 | 173 | pr_debug("%s -> %p\n", __func__, stop); | |
125 | return first; | 174 | return stop; |
126 | } | 175 | } |
127 | 176 | ||
128 | static struct unwind_idx *unwind_find_idx(unsigned long addr) | 177 | static const struct unwind_idx *unwind_find_idx(unsigned long addr) |
129 | { | 178 | { |
130 | struct unwind_idx *idx = NULL; | 179 | const struct unwind_idx *idx = NULL; |
131 | unsigned long flags; | 180 | unsigned long flags; |
132 | 181 | ||
133 | pr_debug("%s(%08lx)\n", __func__, addr); | 182 | pr_debug("%s(%08lx)\n", __func__, addr); |
134 | 183 | ||
135 | if (core_kernel_text(addr)) | 184 | if (core_kernel_text(addr)) { |
185 | if (unlikely(!__origin_unwind_idx)) | ||
186 | __origin_unwind_idx = | ||
187 | unwind_find_origin(__start_unwind_idx, | ||
188 | __stop_unwind_idx); | ||
189 | |||
136 | /* main unwind table */ | 190 | /* main unwind table */ |
137 | idx = search_index(addr, __start_unwind_idx, | 191 | idx = search_index(addr, __start_unwind_idx, |
138 | __stop_unwind_idx - 1); | 192 | __origin_unwind_idx, |
139 | else { | 193 | __stop_unwind_idx); |
194 | } else { | ||
140 | /* module unwind tables */ | 195 | /* module unwind tables */ |
141 | struct unwind_table *table; | 196 | struct unwind_table *table; |
142 | 197 | ||
@@ -145,7 +200,8 @@ static struct unwind_idx *unwind_find_idx(unsigned long addr) | |||
145 | if (addr >= table->begin_addr && | 200 | if (addr >= table->begin_addr && |
146 | addr < table->end_addr) { | 201 | addr < table->end_addr) { |
147 | idx = search_index(addr, table->start, | 202 | idx = search_index(addr, table->start, |
148 | table->stop - 1); | 203 | table->origin, |
204 | table->stop); | ||
149 | /* Move-to-front to exploit common traces */ | 205 | /* Move-to-front to exploit common traces */ |
150 | list_move(&table->list, &unwind_tables); | 206 | list_move(&table->list, &unwind_tables); |
151 | break; | 207 | break; |
@@ -274,7 +330,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl) | |||
274 | int unwind_frame(struct stackframe *frame) | 330 | int unwind_frame(struct stackframe *frame) |
275 | { | 331 | { |
276 | unsigned long high, low; | 332 | unsigned long high, low; |
277 | struct unwind_idx *idx; | 333 | const struct unwind_idx *idx; |
278 | struct unwind_ctrl_block ctrl; | 334 | struct unwind_ctrl_block ctrl; |
279 | 335 | ||
280 | /* only go to a higher address on the stack */ | 336 | /* only go to a higher address on the stack */ |
@@ -399,7 +455,6 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size, | |||
399 | unsigned long text_size) | 455 | unsigned long text_size) |
400 | { | 456 | { |
401 | unsigned long flags; | 457 | unsigned long flags; |
402 | struct unwind_idx *idx; | ||
403 | struct unwind_table *tab = kmalloc(sizeof(*tab), GFP_KERNEL); | 458 | struct unwind_table *tab = kmalloc(sizeof(*tab), GFP_KERNEL); |
404 | 459 | ||
405 | pr_debug("%s(%08lx, %08lx, %08lx, %08lx)\n", __func__, start, size, | 460 | pr_debug("%s(%08lx, %08lx, %08lx, %08lx)\n", __func__, start, size, |
@@ -408,15 +463,12 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size, | |||
408 | if (!tab) | 463 | if (!tab) |
409 | return tab; | 464 | return tab; |
410 | 465 | ||
411 | tab->start = (struct unwind_idx *)start; | 466 | tab->start = (const struct unwind_idx *)start; |
412 | tab->stop = (struct unwind_idx *)(start + size); | 467 | tab->stop = (const struct unwind_idx *)(start + size); |
468 | tab->origin = unwind_find_origin(tab->start, tab->stop); | ||
413 | tab->begin_addr = text_addr; | 469 | tab->begin_addr = text_addr; |
414 | tab->end_addr = text_addr + text_size; | 470 | tab->end_addr = text_addr + text_size; |
415 | 471 | ||
416 | /* Convert the symbol addresses to absolute values */ | ||
417 | for (idx = tab->start; idx < tab->stop; idx++) | ||
418 | idx->addr = prel31_to_addr(&idx->addr); | ||
419 | |||
420 | spin_lock_irqsave(&unwind_lock, flags); | 472 | spin_lock_irqsave(&unwind_lock, flags); |
421 | list_add_tail(&tab->list, &unwind_tables); | 473 | list_add_tail(&tab->list, &unwind_tables); |
422 | spin_unlock_irqrestore(&unwind_lock, flags); | 474 | spin_unlock_irqrestore(&unwind_lock, flags); |
@@ -437,16 +489,3 @@ void unwind_table_del(struct unwind_table *tab) | |||
437 | 489 | ||
438 | kfree(tab); | 490 | kfree(tab); |
439 | } | 491 | } |
440 | |||
441 | int __init unwind_init(void) | ||
442 | { | ||
443 | struct unwind_idx *idx; | ||
444 | |||
445 | /* Convert the symbol addresses to absolute values */ | ||
446 | for (idx = __start_unwind_idx; idx < __stop_unwind_idx; idx++) | ||
447 | idx->addr = prel31_to_addr(&idx->addr); | ||
448 | |||
449 | pr_debug("unwind: ARM stack unwinding initialised\n"); | ||
450 | |||
451 | return 0; | ||
452 | } | ||
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index 10d868a5a481..d6408d1ee543 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h | |||
@@ -1,5 +1,9 @@ | |||
1 | #include <asm/unwind.h> | ||
2 | |||
1 | #if __LINUX_ARM_ARCH__ >= 6 | 3 | #if __LINUX_ARM_ARCH__ >= 6 |
2 | .macro bitop, instr | 4 | .macro bitop, name, instr |
5 | ENTRY( \name ) | ||
6 | UNWIND( .fnstart ) | ||
3 | ands ip, r1, #3 | 7 | ands ip, r1, #3 |
4 | strneb r1, [ip] @ assert word-aligned | 8 | strneb r1, [ip] @ assert word-aligned |
5 | mov r2, #1 | 9 | mov r2, #1 |
@@ -13,9 +17,13 @@ | |||
13 | cmp r0, #0 | 17 | cmp r0, #0 |
14 | bne 1b | 18 | bne 1b |
15 | bx lr | 19 | bx lr |
20 | UNWIND( .fnend ) | ||
21 | ENDPROC(\name ) | ||
16 | .endm | 22 | .endm |
17 | 23 | ||
18 | .macro testop, instr, store | 24 | .macro testop, name, instr, store |
25 | ENTRY( \name ) | ||
26 | UNWIND( .fnstart ) | ||
19 | ands ip, r1, #3 | 27 | ands ip, r1, #3 |
20 | strneb r1, [ip] @ assert word-aligned | 28 | strneb r1, [ip] @ assert word-aligned |
21 | mov r2, #1 | 29 | mov r2, #1 |
@@ -34,9 +42,13 @@ | |||
34 | cmp r0, #0 | 42 | cmp r0, #0 |
35 | movne r0, #1 | 43 | movne r0, #1 |
36 | 2: bx lr | 44 | 2: bx lr |
45 | UNWIND( .fnend ) | ||
46 | ENDPROC(\name ) | ||
37 | .endm | 47 | .endm |
38 | #else | 48 | #else |
39 | .macro bitop, instr | 49 | .macro bitop, name, instr |
50 | ENTRY( \name ) | ||
51 | UNWIND( .fnstart ) | ||
40 | ands ip, r1, #3 | 52 | ands ip, r1, #3 |
41 | strneb r1, [ip] @ assert word-aligned | 53 | strneb r1, [ip] @ assert word-aligned |
42 | and r2, r0, #31 | 54 | and r2, r0, #31 |
@@ -49,6 +61,8 @@ | |||
49 | str r2, [r1, r0, lsl #2] | 61 | str r2, [r1, r0, lsl #2] |
50 | restore_irqs ip | 62 | restore_irqs ip |
51 | mov pc, lr | 63 | mov pc, lr |
64 | UNWIND( .fnend ) | ||
65 | ENDPROC(\name ) | ||
52 | .endm | 66 | .endm |
53 | 67 | ||
54 | /** | 68 | /** |
@@ -59,7 +73,9 @@ | |||
59 | * Note: we can trivially conditionalise the store instruction | 73 | * Note: we can trivially conditionalise the store instruction |
60 | * to avoid dirtying the data cache. | 74 | * to avoid dirtying the data cache. |
61 | */ | 75 | */ |
62 | .macro testop, instr, store | 76 | .macro testop, name, instr, store |
77 | ENTRY( \name ) | ||
78 | UNWIND( .fnstart ) | ||
63 | ands ip, r1, #3 | 79 | ands ip, r1, #3 |
64 | strneb r1, [ip] @ assert word-aligned | 80 | strneb r1, [ip] @ assert word-aligned |
65 | and r3, r0, #31 | 81 | and r3, r0, #31 |
@@ -73,5 +89,7 @@ | |||
73 | moveq r0, #0 | 89 | moveq r0, #0 |
74 | restore_irqs ip | 90 | restore_irqs ip |
75 | mov pc, lr | 91 | mov pc, lr |
92 | UNWIND( .fnend ) | ||
93 | ENDPROC(\name ) | ||
76 | .endm | 94 | .endm |
77 | #endif | 95 | #endif |
diff --git a/arch/arm/lib/changebit.S b/arch/arm/lib/changebit.S index 68ed5b62e839..f4027862172f 100644 --- a/arch/arm/lib/changebit.S +++ b/arch/arm/lib/changebit.S | |||
@@ -12,6 +12,4 @@ | |||
12 | #include "bitops.h" | 12 | #include "bitops.h" |
13 | .text | 13 | .text |
14 | 14 | ||
15 | ENTRY(_change_bit) | 15 | bitop _change_bit, eor |
16 | bitop eor | ||
17 | ENDPROC(_change_bit) | ||
diff --git a/arch/arm/lib/clearbit.S b/arch/arm/lib/clearbit.S index 4c04c3b51eeb..f6b75fb64d30 100644 --- a/arch/arm/lib/clearbit.S +++ b/arch/arm/lib/clearbit.S | |||
@@ -12,6 +12,4 @@ | |||
12 | #include "bitops.h" | 12 | #include "bitops.h" |
13 | .text | 13 | .text |
14 | 14 | ||
15 | ENTRY(_clear_bit) | 15 | bitop _clear_bit, bic |
16 | bitop bic | ||
17 | ENDPROC(_clear_bit) | ||
diff --git a/arch/arm/lib/setbit.S b/arch/arm/lib/setbit.S index bbee5c66a23e..618fedae4b37 100644 --- a/arch/arm/lib/setbit.S +++ b/arch/arm/lib/setbit.S | |||
@@ -12,6 +12,4 @@ | |||
12 | #include "bitops.h" | 12 | #include "bitops.h" |
13 | .text | 13 | .text |
14 | 14 | ||
15 | ENTRY(_set_bit) | 15 | bitop _set_bit, orr |
16 | bitop orr | ||
17 | ENDPROC(_set_bit) | ||
diff --git a/arch/arm/lib/testchangebit.S b/arch/arm/lib/testchangebit.S index 15a4d431f229..4becdc3a59cb 100644 --- a/arch/arm/lib/testchangebit.S +++ b/arch/arm/lib/testchangebit.S | |||
@@ -12,6 +12,4 @@ | |||
12 | #include "bitops.h" | 12 | #include "bitops.h" |
13 | .text | 13 | .text |
14 | 14 | ||
15 | ENTRY(_test_and_change_bit) | 15 | testop _test_and_change_bit, eor, str |
16 | testop eor, str | ||
17 | ENDPROC(_test_and_change_bit) | ||
diff --git a/arch/arm/lib/testclearbit.S b/arch/arm/lib/testclearbit.S index 521b66b5b95d..918841dcce7a 100644 --- a/arch/arm/lib/testclearbit.S +++ b/arch/arm/lib/testclearbit.S | |||
@@ -12,6 +12,4 @@ | |||
12 | #include "bitops.h" | 12 | #include "bitops.h" |
13 | .text | 13 | .text |
14 | 14 | ||
15 | ENTRY(_test_and_clear_bit) | 15 | testop _test_and_clear_bit, bicne, strne |
16 | testop bicne, strne | ||
17 | ENDPROC(_test_and_clear_bit) | ||
diff --git a/arch/arm/lib/testsetbit.S b/arch/arm/lib/testsetbit.S index 1c98cc2185bb..8d1b2fe9e487 100644 --- a/arch/arm/lib/testsetbit.S +++ b/arch/arm/lib/testsetbit.S | |||
@@ -12,6 +12,4 @@ | |||
12 | #include "bitops.h" | 12 | #include "bitops.h" |
13 | .text | 13 | .text |
14 | 14 | ||
15 | ENTRY(_test_and_set_bit) | 15 | testop _test_and_set_bit, orreq, streq |
16 | testop orreq, streq | ||
17 | ENDPROC(_test_and_set_bit) | ||
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 66591fa53e05..ad930688358c 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -83,7 +83,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
83 | * USB Device (Gadget) | 83 | * USB Device (Gadget) |
84 | * -------------------------------------------------------------------- */ | 84 | * -------------------------------------------------------------------- */ |
85 | 85 | ||
86 | #ifdef CONFIG_USB_GADGET_AT91 | 86 | #ifdef CONFIG_USB_AT91 |
87 | static struct at91_udc_data udc_data; | 87 | static struct at91_udc_data udc_data; |
88 | 88 | ||
89 | static struct resource udc_resources[] = { | 89 | static struct resource udc_resources[] = { |
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index b84a9f642f59..0d20677fbef0 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -195,9 +195,9 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
195 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | 195 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), |
196 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | 196 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), |
197 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), | 197 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), |
198 | CLKDEV_CON_DEV_ID("t3_clk", "atmel_tcb.1", &tc3_clk), | 198 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk), |
199 | CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk), | 199 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), |
200 | CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk), | 200 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), |
201 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), | 201 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), |
202 | /* more usart lookup table for DT entries */ | 202 | /* more usart lookup table for DT entries */ |
203 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), | 203 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 25e3464fb07f..629fa9774972 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -84,7 +84,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
84 | * USB Device (Gadget) | 84 | * USB Device (Gadget) |
85 | * -------------------------------------------------------------------- */ | 85 | * -------------------------------------------------------------------- */ |
86 | 86 | ||
87 | #ifdef CONFIG_USB_GADGET_AT91 | 87 | #ifdef CONFIG_USB_AT91 |
88 | static struct at91_udc_data udc_data; | 88 | static struct at91_udc_data udc_data; |
89 | 89 | ||
90 | static struct resource udc_resources[] = { | 90 | static struct resource udc_resources[] = { |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index ae78f4d03b73..a178b58b0b9c 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -87,7 +87,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
87 | * USB Device (Gadget) | 87 | * USB Device (Gadget) |
88 | * -------------------------------------------------------------------- */ | 88 | * -------------------------------------------------------------------- */ |
89 | 89 | ||
90 | #ifdef CONFIG_USB_GADGET_AT91 | 90 | #ifdef CONFIG_USB_AT91 |
91 | static struct at91_udc_data udc_data; | 91 | static struct at91_udc_data udc_data; |
92 | 92 | ||
93 | static struct resource udc_resources[] = { | 93 | static struct resource udc_resources[] = { |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index ad017eb1f8df..d5fbac9ff4fa 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -92,7 +92,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
92 | * USB Device (Gadget) | 92 | * USB Device (Gadget) |
93 | * -------------------------------------------------------------------- */ | 93 | * -------------------------------------------------------------------- */ |
94 | 94 | ||
95 | #ifdef CONFIG_USB_GADGET_AT91 | 95 | #ifdef CONFIG_USB_AT91 |
96 | static struct at91_udc_data udc_data; | 96 | static struct at91_udc_data udc_data; |
97 | 97 | ||
98 | static struct resource udc_resources[] = { | 98 | static struct resource udc_resources[] = { |
diff --git a/arch/arm/mach-at91/include/mach/system_rev.h b/arch/arm/mach-at91/include/mach/system_rev.h index 8f4866045b41..ec164a4124c9 100644 --- a/arch/arm/mach-at91/include/mach/system_rev.h +++ b/arch/arm/mach-at91/include/mach/system_rev.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define BOARD_HAVE_NAND_16BIT (1 << 31) | 19 | #define BOARD_HAVE_NAND_16BIT (1 << 31) |
20 | static inline int board_have_nand_16bit(void) | 20 | static inline int board_have_nand_16bit(void) |
21 | { | 21 | { |
22 | return system_rev & BOARD_HAVE_NAND_16BIT; | 22 | return (system_rev & BOARD_HAVE_NAND_16BIT) ? 1 : 0; |
23 | } | 23 | } |
24 | 24 | ||
25 | #endif /* __ARCH_SYSTEM_REV_H__ */ | 25 | #endif /* __ARCH_SYSTEM_REV_H__ */ |
diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-bcmring/core.c index 43eadbcc29ed..430da120a297 100644 --- a/arch/arm/mach-bcmring/core.c +++ b/arch/arm/mach-bcmring/core.c | |||
@@ -235,7 +235,7 @@ void __init bcmring_init_timer(void) | |||
235 | */ | 235 | */ |
236 | bcmring_clocksource_init(); | 236 | bcmring_clocksource_init(); |
237 | 237 | ||
238 | sp804_clockevents_register(TIMER0_VA_BASE, IRQ_TIMER0, "timer0"); | 238 | sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMER0, "timer0"); |
239 | } | 239 | } |
240 | 240 | ||
241 | struct sys_timer bcmring_timer = { | 241 | struct sys_timer bcmring_timer = { |
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index b52b8de91bde..f4d4d6d174d0 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/pfn.h> | 37 | #include <linux/pfn.h> |
38 | #include <linux/atomic.h> | 38 | #include <linux/atomic.h> |
39 | #include <linux/sched.h> | ||
39 | #include <mach/dma.h> | 40 | #include <mach/dma.h> |
40 | 41 | ||
41 | /* I don't quite understand why dc4 fails when this is set to 1 and DMA is enabled */ | 42 | /* I don't quite understand why dc4 fails when this is set to 1 and DMA is enabled */ |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 1d7d24995226..6659a90dbcad 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -753,7 +753,7 @@ static struct snd_platform_data da850_evm_snd_data = { | |||
753 | .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction), | 753 | .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction), |
754 | .tdm_slots = 2, | 754 | .tdm_slots = 2, |
755 | .serial_dir = da850_iis_serializer_direction, | 755 | .serial_dir = da850_iis_serializer_direction, |
756 | .asp_chan_q = EVENTQ_1, | 756 | .asp_chan_q = EVENTQ_0, |
757 | .version = MCASP_VERSION_2, | 757 | .version = MCASP_VERSION_2, |
758 | .txnumevt = 1, | 758 | .txnumevt = 1, |
759 | .rxnumevt = 1, | 759 | .rxnumevt = 1, |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 1918ae711428..46e1f4173b97 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -107,7 +107,7 @@ static struct mtd_partition davinci_nand_partitions[] = { | |||
107 | /* UBL (a few copies) plus U-Boot */ | 107 | /* UBL (a few copies) plus U-Boot */ |
108 | .name = "bootloader", | 108 | .name = "bootloader", |
109 | .offset = 0, | 109 | .offset = 0, |
110 | .size = 28 * NAND_BLOCK_SIZE, | 110 | .size = 30 * NAND_BLOCK_SIZE, |
111 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | 111 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
112 | }, { | 112 | }, { |
113 | /* U-Boot environment */ | 113 | /* U-Boot environment */ |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index e574d7f837a8..635bf7740157 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -564,7 +564,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) | |||
564 | int val; | 564 | int val; |
565 | u32 value; | 565 | u32 value; |
566 | 566 | ||
567 | if (!vpif_vsclkdis_reg || !cpld_client) | 567 | if (!vpif_vidclkctl_reg || !cpld_client) |
568 | return -ENXIO; | 568 | return -ENXIO; |
569 | 569 | ||
570 | val = i2c_smbus_read_byte(cpld_client); | 570 | val = i2c_smbus_read_byte(cpld_client); |
@@ -572,7 +572,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) | |||
572 | return val; | 572 | return val; |
573 | 573 | ||
574 | spin_lock_irqsave(&vpif_reg_lock, flags); | 574 | spin_lock_irqsave(&vpif_reg_lock, flags); |
575 | value = __raw_readl(vpif_vsclkdis_reg); | 575 | value = __raw_readl(vpif_vidclkctl_reg); |
576 | if (mux_mode) { | 576 | if (mux_mode) { |
577 | val &= VPIF_INPUT_TWO_CHANNEL; | 577 | val &= VPIF_INPUT_TWO_CHANNEL; |
578 | value |= VIDCH1CLK; | 578 | value |= VIDCH1CLK; |
@@ -580,7 +580,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) | |||
580 | val |= VPIF_INPUT_ONE_CHANNEL; | 580 | val |= VPIF_INPUT_ONE_CHANNEL; |
581 | value &= ~VIDCH1CLK; | 581 | value &= ~VIDCH1CLK; |
582 | } | 582 | } |
583 | __raw_writel(value, vpif_vsclkdis_reg); | 583 | __raw_writel(value, vpif_vidclkctl_reg); |
584 | spin_unlock_irqrestore(&vpif_reg_lock, flags); | 584 | spin_unlock_irqrestore(&vpif_reg_lock, flags); |
585 | 585 | ||
586 | err = i2c_smbus_write_byte(cpld_client, val); | 586 | err = i2c_smbus_write_byte(cpld_client, val); |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 0b68ed534f8e..af27c130595f 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -161,7 +161,6 @@ static struct clk dsp_clk = { | |||
161 | .name = "dsp", | 161 | .name = "dsp", |
162 | .parent = &pll1_sysclk1, | 162 | .parent = &pll1_sysclk1, |
163 | .lpsc = DM646X_LPSC_C64X_CPU, | 163 | .lpsc = DM646X_LPSC_C64X_CPU, |
164 | .flags = PSC_DSP, | ||
165 | .usecount = 1, /* REVISIT how to disable? */ | 164 | .usecount = 1, /* REVISIT how to disable? */ |
166 | }; | 165 | }; |
167 | 166 | ||
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h index fa59c097223d..8bc3fc256171 100644 --- a/arch/arm/mach-davinci/include/mach/psc.h +++ b/arch/arm/mach-davinci/include/mach/psc.h | |||
@@ -233,7 +233,7 @@ | |||
233 | #define PTCMD 0x120 | 233 | #define PTCMD 0x120 |
234 | #define PTSTAT 0x128 | 234 | #define PTSTAT 0x128 |
235 | #define PDSTAT 0x200 | 235 | #define PDSTAT 0x200 |
236 | #define PDCTL1 0x304 | 236 | #define PDCTL 0x300 |
237 | #define MDSTAT 0x800 | 237 | #define MDSTAT 0x800 |
238 | #define MDCTL 0xA00 | 238 | #define MDCTL 0xA00 |
239 | 239 | ||
@@ -244,7 +244,10 @@ | |||
244 | #define PSC_STATE_ENABLE 3 | 244 | #define PSC_STATE_ENABLE 3 |
245 | 245 | ||
246 | #define MDSTAT_STATE_MASK 0x3f | 246 | #define MDSTAT_STATE_MASK 0x3f |
247 | #define PDSTAT_STATE_MASK 0x1f | ||
247 | #define MDCTL_FORCE BIT(31) | 248 | #define MDCTL_FORCE BIT(31) |
249 | #define PDCTL_NEXT BIT(1) | ||
250 | #define PDCTL_EPCGOOD BIT(8) | ||
248 | 251 | ||
249 | #ifndef __ASSEMBLER__ | 252 | #ifndef __ASSEMBLER__ |
250 | 253 | ||
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c index 1fb6bdff38c1..d7e210f4b55c 100644 --- a/arch/arm/mach-davinci/psc.c +++ b/arch/arm/mach-davinci/psc.c | |||
@@ -52,7 +52,7 @@ int __init davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id) | |||
52 | void davinci_psc_config(unsigned int domain, unsigned int ctlr, | 52 | void davinci_psc_config(unsigned int domain, unsigned int ctlr, |
53 | unsigned int id, bool enable, u32 flags) | 53 | unsigned int id, bool enable, u32 flags) |
54 | { | 54 | { |
55 | u32 epcpr, ptcmd, ptstat, pdstat, pdctl1, mdstat, mdctl; | 55 | u32 epcpr, ptcmd, ptstat, pdstat, pdctl, mdstat, mdctl; |
56 | void __iomem *psc_base; | 56 | void __iomem *psc_base; |
57 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 57 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
58 | u32 next_state = PSC_STATE_ENABLE; | 58 | u32 next_state = PSC_STATE_ENABLE; |
@@ -79,11 +79,11 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr, | |||
79 | mdctl |= MDCTL_FORCE; | 79 | mdctl |= MDCTL_FORCE; |
80 | __raw_writel(mdctl, psc_base + MDCTL + 4 * id); | 80 | __raw_writel(mdctl, psc_base + MDCTL + 4 * id); |
81 | 81 | ||
82 | pdstat = __raw_readl(psc_base + PDSTAT); | 82 | pdstat = __raw_readl(psc_base + PDSTAT + 4 * domain); |
83 | if ((pdstat & 0x00000001) == 0) { | 83 | if ((pdstat & PDSTAT_STATE_MASK) == 0) { |
84 | pdctl1 = __raw_readl(psc_base + PDCTL1); | 84 | pdctl = __raw_readl(psc_base + PDCTL + 4 * domain); |
85 | pdctl1 |= 0x1; | 85 | pdctl |= PDCTL_NEXT; |
86 | __raw_writel(pdctl1, psc_base + PDCTL1); | 86 | __raw_writel(pdctl, psc_base + PDCTL + 4 * domain); |
87 | 87 | ||
88 | ptcmd = 1 << domain; | 88 | ptcmd = 1 << domain; |
89 | __raw_writel(ptcmd, psc_base + PTCMD); | 89 | __raw_writel(ptcmd, psc_base + PTCMD); |
@@ -92,9 +92,9 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr, | |||
92 | epcpr = __raw_readl(psc_base + EPCPR); | 92 | epcpr = __raw_readl(psc_base + EPCPR); |
93 | } while ((((epcpr >> domain) & 1) == 0)); | 93 | } while ((((epcpr >> domain) & 1) == 0)); |
94 | 94 | ||
95 | pdctl1 = __raw_readl(psc_base + PDCTL1); | 95 | pdctl = __raw_readl(psc_base + PDCTL + 4 * domain); |
96 | pdctl1 |= 0x100; | 96 | pdctl |= PDCTL_EPCGOOD; |
97 | __raw_writel(pdctl1, psc_base + PDCTL1); | 97 | __raw_writel(pdctl, psc_base + PDCTL + 4 * domain); |
98 | } else { | 98 | } else { |
99 | ptcmd = 1 << domain; | 99 | ptcmd = 1 << domain; |
100 | __raw_writel(ptcmd, psc_base + PTCMD); | 100 | __raw_writel(ptcmd, psc_base + PTCMD); |
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 35f6502144ae..4ebb382c5979 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/cpuidle.h> | 13 | #include <linux/cpuidle.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/export.h> | ||
16 | #include <linux/time.h> | ||
15 | 17 | ||
16 | #include <asm/proc-fns.h> | 18 | #include <asm/proc-fns.h> |
17 | 19 | ||
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c index 97343df8f132..85b5527d0918 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/arch/arm/mach-exynos/mct.c | |||
@@ -44,8 +44,6 @@ struct mct_clock_event_device { | |||
44 | char name[10]; | 44 | char name[10]; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static DEFINE_PER_CPU(struct mct_clock_event_device, percpu_mct_tick); | ||
48 | |||
49 | static void exynos4_mct_write(unsigned int value, void *addr) | 47 | static void exynos4_mct_write(unsigned int value, void *addr) |
50 | { | 48 | { |
51 | void __iomem *stat_addr; | 49 | void __iomem *stat_addr; |
@@ -264,6 +262,9 @@ static void exynos4_clockevent_init(void) | |||
264 | } | 262 | } |
265 | 263 | ||
266 | #ifdef CONFIG_LOCAL_TIMERS | 264 | #ifdef CONFIG_LOCAL_TIMERS |
265 | |||
266 | static DEFINE_PER_CPU(struct mct_clock_event_device, percpu_mct_tick); | ||
267 | |||
267 | /* Clock event handling */ | 268 | /* Clock event handling */ |
268 | static void exynos4_mct_tick_stop(struct mct_clock_event_device *mevt) | 269 | static void exynos4_mct_tick_stop(struct mct_clock_event_device *mevt) |
269 | { | 270 | { |
@@ -428,9 +429,13 @@ int __cpuinit local_timer_setup(struct clock_event_device *evt) | |||
428 | 429 | ||
429 | void local_timer_stop(struct clock_event_device *evt) | 430 | void local_timer_stop(struct clock_event_device *evt) |
430 | { | 431 | { |
432 | unsigned int cpu = smp_processor_id(); | ||
431 | evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); | 433 | evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); |
432 | if (mct_int_type == MCT_INT_SPI) | 434 | if (mct_int_type == MCT_INT_SPI) |
433 | disable_irq(evt->irq); | 435 | if (cpu == 0) |
436 | remove_irq(evt->irq, &mct_tick0_event_irq); | ||
437 | else | ||
438 | remove_irq(evt->irq, &mct_tick1_event_irq); | ||
434 | else | 439 | else |
435 | disable_percpu_irq(IRQ_MCT_LOCALTIMER); | 440 | disable_percpu_irq(IRQ_MCT_LOCALTIMER); |
436 | } | 441 | } |
@@ -443,6 +448,7 @@ static void __init exynos4_timer_resources(void) | |||
443 | 448 | ||
444 | clk_rate = clk_get_rate(mct_clk); | 449 | clk_rate = clk_get_rate(mct_clk); |
445 | 450 | ||
451 | #ifdef CONFIG_LOCAL_TIMERS | ||
446 | if (mct_int_type == MCT_INT_PPI) { | 452 | if (mct_int_type == MCT_INT_PPI) { |
447 | int err; | 453 | int err; |
448 | 454 | ||
@@ -452,6 +458,7 @@ static void __init exynos4_timer_resources(void) | |||
452 | WARN(err, "MCT: can't request IRQ %d (%d)\n", | 458 | WARN(err, "MCT: can't request IRQ %d (%d)\n", |
453 | IRQ_MCT_LOCALTIMER, err); | 459 | IRQ_MCT_LOCALTIMER, err); |
454 | } | 460 | } |
461 | #endif /* CONFIG_LOCAL_TIMERS */ | ||
455 | } | 462 | } |
456 | 463 | ||
457 | static void __init exynos4_timer_init(void) | 464 | static void __init exynos4_timer_init(void) |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index b82dcf08e747..88660d500f5b 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
24 | #include <linux/of_address.h> | 24 | #include <linux/of_address.h> |
25 | #include <linux/smp.h> | ||
25 | 26 | ||
26 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
27 | #include <asm/unified.h> | 28 | #include <asm/unified.h> |
@@ -72,6 +73,9 @@ static void __init highbank_map_io(void) | |||
72 | 73 | ||
73 | void highbank_set_cpu_jump(int cpu, void *jump_addr) | 74 | void highbank_set_cpu_jump(int cpu, void *jump_addr) |
74 | { | 75 | { |
76 | #ifdef CONFIG_SMP | ||
77 | cpu = cpu_logical_map(cpu); | ||
78 | #endif | ||
75 | writel(BSYM(virt_to_phys(jump_addr)), HB_JUMP_TABLE_VIRT(cpu)); | 79 | writel(BSYM(virt_to_phys(jump_addr)), HB_JUMP_TABLE_VIRT(cpu)); |
76 | __cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16); | 80 | __cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16); |
77 | outer_clean_range(HB_JUMP_TABLE_PHYS(cpu), | 81 | outer_clean_range(HB_JUMP_TABLE_PHYS(cpu), |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 5f7f9c2a34ae..c44aa974e79c 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -10,11 +10,6 @@ config HAVE_IMX_MMDC | |||
10 | config HAVE_IMX_SRC | 10 | config HAVE_IMX_SRC |
11 | bool | 11 | bool |
12 | 12 | ||
13 | # | ||
14 | # ARCH_MX31 and ARCH_MX35 are left for compatibility | ||
15 | # Some usages assume that having one of them implies not having (e.g.) ARCH_MX2. | ||
16 | # To easily distinguish good and reviewed from unreviewed usages new (and IMHO | ||
17 | # more sensible) names are used: SOC_IMX31 and SOC_IMX35 | ||
18 | config ARCH_MX1 | 13 | config ARCH_MX1 |
19 | bool | 14 | bool |
20 | 15 | ||
@@ -27,12 +22,6 @@ config ARCH_MX25 | |||
27 | config MACH_MX27 | 22 | config MACH_MX27 |
28 | bool | 23 | bool |
29 | 24 | ||
30 | config ARCH_MX31 | ||
31 | bool | ||
32 | |||
33 | config ARCH_MX35 | ||
34 | bool | ||
35 | |||
36 | config SOC_IMX1 | 25 | config SOC_IMX1 |
37 | bool | 26 | bool |
38 | select ARCH_MX1 | 27 | select ARCH_MX1 |
@@ -72,7 +61,6 @@ config SOC_IMX31 | |||
72 | select CPU_V6 | 61 | select CPU_V6 |
73 | select IMX_HAVE_PLATFORM_MXC_RNGA | 62 | select IMX_HAVE_PLATFORM_MXC_RNGA |
74 | select ARCH_MXC_AUDMUX_V2 | 63 | select ARCH_MXC_AUDMUX_V2 |
75 | select ARCH_MX31 | ||
76 | select MXC_AVIC | 64 | select MXC_AVIC |
77 | select SMP_ON_UP if SMP | 65 | select SMP_ON_UP if SMP |
78 | 66 | ||
@@ -82,7 +70,6 @@ config SOC_IMX35 | |||
82 | select ARCH_MXC_IOMUX_V3 | 70 | select ARCH_MXC_IOMUX_V3 |
83 | select ARCH_MXC_AUDMUX_V2 | 71 | select ARCH_MXC_AUDMUX_V2 |
84 | select HAVE_EPIT | 72 | select HAVE_EPIT |
85 | select ARCH_MX35 | ||
86 | select MXC_AVIC | 73 | select MXC_AVIC |
87 | select SMP_ON_UP if SMP | 74 | select SMP_ON_UP if SMP |
88 | 75 | ||
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 613a1b993bff..039a7abb165a 100644 --- a/arch/arm/mach-imx/clock-imx6q.c +++ b/arch/arm/mach-imx/clock-imx6q.c | |||
@@ -1953,14 +1953,17 @@ static struct map_desc imx6q_clock_desc[] = { | |||
1953 | imx_map_entry(MX6Q, ANATOP, MT_DEVICE), | 1953 | imx_map_entry(MX6Q, ANATOP, MT_DEVICE), |
1954 | }; | 1954 | }; |
1955 | 1955 | ||
1956 | void __init imx6q_clock_map_io(void) | ||
1957 | { | ||
1958 | iotable_init(imx6q_clock_desc, ARRAY_SIZE(imx6q_clock_desc)); | ||
1959 | } | ||
1960 | |||
1956 | int __init mx6q_clocks_init(void) | 1961 | int __init mx6q_clocks_init(void) |
1957 | { | 1962 | { |
1958 | struct device_node *np; | 1963 | struct device_node *np; |
1959 | void __iomem *base; | 1964 | void __iomem *base; |
1960 | int i, irq; | 1965 | int i, irq; |
1961 | 1966 | ||
1962 | iotable_init(imx6q_clock_desc, ARRAY_SIZE(imx6q_clock_desc)); | ||
1963 | |||
1964 | /* retrieve the freqency of fixed clocks from device tree */ | 1967 | /* retrieve the freqency of fixed clocks from device tree */ |
1965 | for_each_compatible_node(np, NULL, "fixed-clock") { | 1968 | for_each_compatible_node(np, NULL, "fixed-clock") { |
1966 | u32 rate; | 1969 | u32 rate; |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 8bf5fa349484..8deb012189b5 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -34,16 +34,18 @@ static void __init imx6q_map_io(void) | |||
34 | { | 34 | { |
35 | imx_lluart_map_io(); | 35 | imx_lluart_map_io(); |
36 | imx_scu_map_io(); | 36 | imx_scu_map_io(); |
37 | imx6q_clock_map_io(); | ||
37 | } | 38 | } |
38 | 39 | ||
39 | static void __init imx6q_gpio_add_irq_domain(struct device_node *np, | 40 | static int __init imx6q_gpio_add_irq_domain(struct device_node *np, |
40 | struct device_node *interrupt_parent) | 41 | struct device_node *interrupt_parent) |
41 | { | 42 | { |
42 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS - | 43 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; |
43 | 32 * 7; /* imx6q gets 7 gpio ports */ | ||
44 | 44 | ||
45 | gpio_irq_base -= 32; | ||
45 | irq_domain_add_simple(np, gpio_irq_base); | 46 | irq_domain_add_simple(np, gpio_irq_base); |
46 | gpio_irq_base += 32; | 47 | |
48 | return 0; | ||
47 | } | 49 | } |
48 | 50 | ||
49 | static const struct of_device_id imx6q_irq_match[] __initconst = { | 51 | static const struct of_device_id imx6q_irq_match[] __initconst = { |
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 9f0e82ec3398..31807d2a8b7b 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -33,29 +33,32 @@ | |||
33 | static void imx3_idle(void) | 33 | static void imx3_idle(void) |
34 | { | 34 | { |
35 | unsigned long reg = 0; | 35 | unsigned long reg = 0; |
36 | __asm__ __volatile__( | 36 | |
37 | /* disable I and D cache */ | 37 | if (!need_resched()) |
38 | "mrc p15, 0, %0, c1, c0, 0\n" | 38 | __asm__ __volatile__( |
39 | "bic %0, %0, #0x00001000\n" | 39 | /* disable I and D cache */ |
40 | "bic %0, %0, #0x00000004\n" | 40 | "mrc p15, 0, %0, c1, c0, 0\n" |
41 | "mcr p15, 0, %0, c1, c0, 0\n" | 41 | "bic %0, %0, #0x00001000\n" |
42 | /* invalidate I cache */ | 42 | "bic %0, %0, #0x00000004\n" |
43 | "mov %0, #0\n" | 43 | "mcr p15, 0, %0, c1, c0, 0\n" |
44 | "mcr p15, 0, %0, c7, c5, 0\n" | 44 | /* invalidate I cache */ |
45 | /* clear and invalidate D cache */ | 45 | "mov %0, #0\n" |
46 | "mov %0, #0\n" | 46 | "mcr p15, 0, %0, c7, c5, 0\n" |
47 | "mcr p15, 0, %0, c7, c14, 0\n" | 47 | /* clear and invalidate D cache */ |
48 | /* WFI */ | 48 | "mov %0, #0\n" |
49 | "mov %0, #0\n" | 49 | "mcr p15, 0, %0, c7, c14, 0\n" |
50 | "mcr p15, 0, %0, c7, c0, 4\n" | 50 | /* WFI */ |
51 | "nop\n" "nop\n" "nop\n" "nop\n" | 51 | "mov %0, #0\n" |
52 | "nop\n" "nop\n" "nop\n" | 52 | "mcr p15, 0, %0, c7, c0, 4\n" |
53 | /* enable I and D cache */ | 53 | "nop\n" "nop\n" "nop\n" "nop\n" |
54 | "mrc p15, 0, %0, c1, c0, 0\n" | 54 | "nop\n" "nop\n" "nop\n" |
55 | "orr %0, %0, #0x00001000\n" | 55 | /* enable I and D cache */ |
56 | "orr %0, %0, #0x00000004\n" | 56 | "mrc p15, 0, %0, c1, c0, 0\n" |
57 | "mcr p15, 0, %0, c1, c0, 0\n" | 57 | "orr %0, %0, #0x00001000\n" |
58 | : "=r" (reg)); | 58 | "orr %0, %0, #0x00000004\n" |
59 | "mcr p15, 0, %0, c1, c0, 0\n" | ||
60 | : "=r" (reg)); | ||
61 | local_irq_enable(); | ||
59 | } | 62 | } |
60 | 63 | ||
61 | static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size, | 64 | static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size, |
@@ -108,6 +111,7 @@ void imx3_init_l2x0(void) | |||
108 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); | 111 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); |
109 | } | 112 | } |
110 | 113 | ||
114 | #ifdef CONFIG_SOC_IMX31 | ||
111 | static struct map_desc mx31_io_desc[] __initdata = { | 115 | static struct map_desc mx31_io_desc[] __initdata = { |
112 | imx_map_entry(MX31, X_MEMC, MT_DEVICE), | 116 | imx_map_entry(MX31, X_MEMC, MT_DEVICE), |
113 | imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED), | 117 | imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED), |
@@ -126,33 +130,11 @@ void __init mx31_map_io(void) | |||
126 | iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc)); | 130 | iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc)); |
127 | } | 131 | } |
128 | 132 | ||
129 | static struct map_desc mx35_io_desc[] __initdata = { | ||
130 | imx_map_entry(MX35, X_MEMC, MT_DEVICE), | ||
131 | imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED), | ||
132 | imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED), | ||
133 | imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED), | ||
134 | imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED), | ||
135 | }; | ||
136 | |||
137 | void __init mx35_map_io(void) | ||
138 | { | ||
139 | iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); | ||
140 | } | ||
141 | |||
142 | void __init imx31_init_early(void) | 133 | void __init imx31_init_early(void) |
143 | { | 134 | { |
144 | mxc_set_cpu_type(MXC_CPU_MX31); | 135 | mxc_set_cpu_type(MXC_CPU_MX31); |
145 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | 136 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); |
146 | imx_idle = imx3_idle; | 137 | pm_idle = imx3_idle; |
147 | imx_ioremap = imx3_ioremap; | ||
148 | } | ||
149 | |||
150 | void __init imx35_init_early(void) | ||
151 | { | ||
152 | mxc_set_cpu_type(MXC_CPU_MX35); | ||
153 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); | ||
154 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | ||
155 | imx_idle = imx3_idle; | ||
156 | imx_ioremap = imx3_ioremap; | 138 | imx_ioremap = imx3_ioremap; |
157 | } | 139 | } |
158 | 140 | ||
@@ -161,11 +143,6 @@ void __init mx31_init_irq(void) | |||
161 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); | 143 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); |
162 | } | 144 | } |
163 | 145 | ||
164 | void __init mx35_init_irq(void) | ||
165 | { | ||
166 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); | ||
167 | } | ||
168 | |||
169 | static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = { | 146 | static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = { |
170 | .per_2_per_addr = 1677, | 147 | .per_2_per_addr = 1677, |
171 | }; | 148 | }; |
@@ -199,6 +176,35 @@ void __init imx31_soc_init(void) | |||
199 | 176 | ||
200 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); | 177 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); |
201 | } | 178 | } |
179 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
180 | |||
181 | #ifdef CONFIG_SOC_IMX35 | ||
182 | static struct map_desc mx35_io_desc[] __initdata = { | ||
183 | imx_map_entry(MX35, X_MEMC, MT_DEVICE), | ||
184 | imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED), | ||
185 | imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED), | ||
186 | imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED), | ||
187 | imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED), | ||
188 | }; | ||
189 | |||
190 | void __init mx35_map_io(void) | ||
191 | { | ||
192 | iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); | ||
193 | } | ||
194 | |||
195 | void __init imx35_init_early(void) | ||
196 | { | ||
197 | mxc_set_cpu_type(MXC_CPU_MX35); | ||
198 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); | ||
199 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | ||
200 | pm_idle = imx3_idle; | ||
201 | imx_ioremap = imx3_ioremap; | ||
202 | } | ||
203 | |||
204 | void __init mx35_init_irq(void) | ||
205 | { | ||
206 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); | ||
207 | } | ||
202 | 208 | ||
203 | static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = { | 209 | static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = { |
204 | .ap_2_ap_addr = 642, | 210 | .ap_2_ap_addr = 642, |
@@ -254,3 +260,4 @@ void __init imx35_soc_init(void) | |||
254 | 260 | ||
255 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); | 261 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); |
256 | } | 262 | } |
263 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c index 36cacbd0dcc2..a8e33681b732 100644 --- a/arch/arm/mach-imx/src.c +++ b/arch/arm/mach-imx/src.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/of_address.h> | 16 | #include <linux/of_address.h> |
17 | #include <linux/smp.h> | ||
17 | #include <asm/unified.h> | 18 | #include <asm/unified.h> |
18 | 19 | ||
19 | #define SRC_SCR 0x000 | 20 | #define SRC_SCR 0x000 |
@@ -23,10 +24,15 @@ | |||
23 | 24 | ||
24 | static void __iomem *src_base; | 25 | static void __iomem *src_base; |
25 | 26 | ||
27 | #ifndef CONFIG_SMP | ||
28 | #define cpu_logical_map(cpu) 0 | ||
29 | #endif | ||
30 | |||
26 | void imx_enable_cpu(int cpu, bool enable) | 31 | void imx_enable_cpu(int cpu, bool enable) |
27 | { | 32 | { |
28 | u32 mask, val; | 33 | u32 mask, val; |
29 | 34 | ||
35 | cpu = cpu_logical_map(cpu); | ||
30 | mask = 1 << (BP_SRC_SCR_CORE1_ENABLE + cpu - 1); | 36 | mask = 1 << (BP_SRC_SCR_CORE1_ENABLE + cpu - 1); |
31 | val = readl_relaxed(src_base + SRC_SCR); | 37 | val = readl_relaxed(src_base + SRC_SCR); |
32 | val = enable ? val | mask : val & ~mask; | 38 | val = enable ? val | mask : val & ~mask; |
@@ -35,6 +41,7 @@ void imx_enable_cpu(int cpu, bool enable) | |||
35 | 41 | ||
36 | void imx_set_cpu_jump(int cpu, void *jump_addr) | 42 | void imx_set_cpu_jump(int cpu, void *jump_addr) |
37 | { | 43 | { |
44 | cpu = cpu_logical_map(cpu); | ||
38 | writel_relaxed(BSYM(virt_to_phys(jump_addr)), | 45 | writel_relaxed(BSYM(virt_to_phys(jump_addr)), |
39 | src_base + SRC_GPR1 + cpu * 8); | 46 | src_base + SRC_GPR1 + cpu * 8); |
40 | } | 47 | } |
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c index 69156568bc41..4665767a4f79 100644 --- a/arch/arm/mach-mmp/gplugd.c +++ b/arch/arm/mach-mmp/gplugd.c | |||
@@ -182,7 +182,7 @@ static void __init gplugd_init(void) | |||
182 | 182 | ||
183 | /* on-chip devices */ | 183 | /* on-chip devices */ |
184 | pxa168_add_uart(3); | 184 | pxa168_add_uart(3); |
185 | pxa168_add_ssp(0); | 185 | pxa168_add_ssp(1); |
186 | pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(gplugd_i2c_board_info)); | 186 | pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(gplugd_i2c_board_info)); |
187 | 187 | ||
188 | pxa168_add_eth(&gplugd_eth_platform_data); | 188 | pxa168_add_eth(&gplugd_eth_platform_data); |
diff --git a/arch/arm/mach-mmp/include/mach/gpio-pxa.h b/arch/arm/mach-mmp/include/mach/gpio-pxa.h index d14eeaf16322..99b4ce1b6562 100644 --- a/arch/arm/mach-mmp/include/mach/gpio-pxa.h +++ b/arch/arm/mach-mmp/include/mach/gpio-pxa.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) | 7 | #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) |
8 | 8 | ||
9 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | 9 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) |
10 | #define GPIO_REG(x) (GPIO_REGS_VIRT + (x)) | 10 | #define GPIO_REG(x) (*(volatile u32 *)(GPIO_REGS_VIRT + (x))) |
11 | 11 | ||
12 | #define NR_BUILTIN_GPIO IRQ_GPIO_NUM | 12 | #define NR_BUILTIN_GPIO IRQ_GPIO_NUM |
13 | 13 | ||
diff --git a/arch/arm/mach-msm/devices-iommu.c b/arch/arm/mach-msm/devices-iommu.c index 24030d0da6e3..0fb7a17df398 100644 --- a/arch/arm/mach-msm/devices-iommu.c +++ b/arch/arm/mach-msm/devices-iommu.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/bootmem.h> | 20 | #include <linux/bootmem.h> |
21 | #include <linux/module.h> | ||
21 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
22 | #include <mach/iommu.h> | 23 | #include <mach/iommu.h> |
23 | 24 | ||
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 5c837603ff0f..24994bb52147 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -362,7 +362,7 @@ static void __init mx51_babbage_init(void) | |||
362 | { | 362 | { |
363 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; | 363 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; |
364 | iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21, | 364 | iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21, |
365 | PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); | 365 | PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH); |
366 | 366 | ||
367 | imx51_soc_init(); | 367 | imx51_soc_init(); |
368 | 368 | ||
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index 6bea31ab8f85..64bbfcea6f35 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c | |||
@@ -106,7 +106,7 @@ static inline void mx53_evk_fec_reset(void) | |||
106 | gpio_set_value(MX53_EVK_FEC_PHY_RST, 1); | 106 | gpio_set_value(MX53_EVK_FEC_PHY_RST, 1); |
107 | } | 107 | } |
108 | 108 | ||
109 | static struct fec_platform_data mx53_evk_fec_pdata = { | 109 | static const struct fec_platform_data mx53_evk_fec_pdata __initconst = { |
110 | .phy = PHY_INTERFACE_MODE_RMII, | 110 | .phy = PHY_INTERFACE_MODE_RMII, |
111 | }; | 111 | }; |
112 | 112 | ||
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 7678f7734db6..237bdecd9331 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -242,7 +242,7 @@ static inline void mx53_loco_fec_reset(void) | |||
242 | gpio_set_value(LOCO_FEC_PHY_RST, 1); | 242 | gpio_set_value(LOCO_FEC_PHY_RST, 1); |
243 | } | 243 | } |
244 | 244 | ||
245 | static struct fec_platform_data mx53_loco_fec_data = { | 245 | static const struct fec_platform_data mx53_loco_fec_data __initconst = { |
246 | .phy = PHY_INTERFACE_MODE_RMII, | 246 | .phy = PHY_INTERFACE_MODE_RMII, |
247 | }; | 247 | }; |
248 | 248 | ||
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c index 59c0845eb4a6..d42132a80e8f 100644 --- a/arch/arm/mach-mx5/board-mx53_smd.c +++ b/arch/arm/mach-mx5/board-mx53_smd.c | |||
@@ -104,7 +104,7 @@ static inline void mx53_smd_fec_reset(void) | |||
104 | gpio_set_value(SMD_FEC_PHY_RST, 1); | 104 | gpio_set_value(SMD_FEC_PHY_RST, 1); |
105 | } | 105 | } |
106 | 106 | ||
107 | static struct fec_platform_data mx53_smd_fec_data = { | 107 | static const struct fec_platform_data mx53_smd_fec_data __initconst = { |
108 | .phy = PHY_INTERFACE_MODE_RMII, | 108 | .phy = PHY_INTERFACE_MODE_RMII, |
109 | }; | 109 | }; |
110 | 110 | ||
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c index 5c5328257dca..5e2e7a843860 100644 --- a/arch/arm/mach-mx5/cpu.c +++ b/arch/arm/mach-mx5/cpu.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | #include <asm/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | static int mx5_cpu_rev = -1; | 21 | static int mx5_cpu_rev = -1; |
22 | 22 | ||
@@ -67,7 +67,8 @@ static int __init mx51_neon_fixup(void) | |||
67 | if (!cpu_is_mx51()) | 67 | if (!cpu_is_mx51()) |
68 | return 0; | 68 | return 0; |
69 | 69 | ||
70 | if (mx51_revision() < IMX_CHIP_REVISION_3_0 && (elf_hwcap & HWCAP_NEON)) { | 70 | if (mx51_revision() < IMX_CHIP_REVISION_3_0 && |
71 | (elf_hwcap & HWCAP_NEON)) { | ||
71 | elf_hwcap &= ~HWCAP_NEON; | 72 | elf_hwcap &= ~HWCAP_NEON; |
72 | pr_info("Turning off NEON support, detected broken NEON implementation\n"); | 73 | pr_info("Turning off NEON support, detected broken NEON implementation\n"); |
73 | } | 74 | } |
diff --git a/arch/arm/mach-mx5/imx51-dt.c b/arch/arm/mach-mx5/imx51-dt.c index ccc61585659b..596edd967dbf 100644 --- a/arch/arm/mach-mx5/imx51-dt.c +++ b/arch/arm/mach-mx5/imx51-dt.c | |||
@@ -44,20 +44,22 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { | |||
44 | { /* sentinel */ } | 44 | { /* sentinel */ } |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static void __init imx51_tzic_add_irq_domain(struct device_node *np, | 47 | static int __init imx51_tzic_add_irq_domain(struct device_node *np, |
48 | struct device_node *interrupt_parent) | 48 | struct device_node *interrupt_parent) |
49 | { | 49 | { |
50 | irq_domain_add_simple(np, 0); | 50 | irq_domain_add_simple(np, 0); |
51 | return 0; | ||
51 | } | 52 | } |
52 | 53 | ||
53 | static void __init imx51_gpio_add_irq_domain(struct device_node *np, | 54 | static int __init imx51_gpio_add_irq_domain(struct device_node *np, |
54 | struct device_node *interrupt_parent) | 55 | struct device_node *interrupt_parent) |
55 | { | 56 | { |
56 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS - | 57 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; |
57 | 32 * 4; /* imx51 gets 4 gpio ports */ | ||
58 | 58 | ||
59 | gpio_irq_base -= 32; | ||
59 | irq_domain_add_simple(np, gpio_irq_base); | 60 | irq_domain_add_simple(np, gpio_irq_base); |
60 | gpio_irq_base += 32; | 61 | |
62 | return 0; | ||
61 | } | 63 | } |
62 | 64 | ||
63 | static const struct of_device_id imx51_irq_match[] __initconst = { | 65 | static const struct of_device_id imx51_irq_match[] __initconst = { |
diff --git a/arch/arm/mach-mx5/imx53-dt.c b/arch/arm/mach-mx5/imx53-dt.c index ccaa0b81b768..85bfd5ff21b0 100644 --- a/arch/arm/mach-mx5/imx53-dt.c +++ b/arch/arm/mach-mx5/imx53-dt.c | |||
@@ -48,20 +48,22 @@ static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { | |||
48 | { /* sentinel */ } | 48 | { /* sentinel */ } |
49 | }; | 49 | }; |
50 | 50 | ||
51 | static void __init imx53_tzic_add_irq_domain(struct device_node *np, | 51 | static int __init imx53_tzic_add_irq_domain(struct device_node *np, |
52 | struct device_node *interrupt_parent) | 52 | struct device_node *interrupt_parent) |
53 | { | 53 | { |
54 | irq_domain_add_simple(np, 0); | 54 | irq_domain_add_simple(np, 0); |
55 | return 0; | ||
55 | } | 56 | } |
56 | 57 | ||
57 | static void __init imx53_gpio_add_irq_domain(struct device_node *np, | 58 | static int __init imx53_gpio_add_irq_domain(struct device_node *np, |
58 | struct device_node *interrupt_parent) | 59 | struct device_node *interrupt_parent) |
59 | { | 60 | { |
60 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS - | 61 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; |
61 | 32 * 7; /* imx53 gets 7 gpio ports */ | ||
62 | 62 | ||
63 | gpio_irq_base -= 32; | ||
63 | irq_domain_add_simple(np, gpio_irq_base); | 64 | irq_domain_add_simple(np, gpio_irq_base); |
64 | gpio_irq_base += 32; | 65 | |
66 | return 0; | ||
65 | } | 67 | } |
66 | 68 | ||
67 | static const struct of_device_id imx53_irq_match[] __initconst = { | 69 | static const struct of_device_id imx53_irq_match[] __initconst = { |
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c index 26eacc9d0d90..df4a508f240a 100644 --- a/arch/arm/mach-mx5/mm.c +++ b/arch/arm/mach-mx5/mm.c | |||
@@ -23,7 +23,9 @@ | |||
23 | 23 | ||
24 | static void imx5_idle(void) | 24 | static void imx5_idle(void) |
25 | { | 25 | { |
26 | mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF); | 26 | if (!need_resched()) |
27 | mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF); | ||
28 | local_irq_enable(); | ||
27 | } | 29 | } |
28 | 30 | ||
29 | /* | 31 | /* |
@@ -89,7 +91,7 @@ void __init imx51_init_early(void) | |||
89 | mxc_set_cpu_type(MXC_CPU_MX51); | 91 | mxc_set_cpu_type(MXC_CPU_MX51); |
90 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | 92 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); |
91 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); | 93 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); |
92 | imx_idle = imx5_idle; | 94 | pm_idle = imx5_idle; |
93 | } | 95 | } |
94 | 96 | ||
95 | void __init imx53_init_early(void) | 97 | void __init imx53_init_early(void) |
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 229ae3494216..da6e4aad177c 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
@@ -404,7 +404,7 @@ static int name##_set_rate(struct clk *clk, unsigned long rate) \ | |||
404 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_##dr); \ | 404 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_##dr); \ |
405 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ | 405 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ |
406 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ | 406 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ |
407 | if (reg | (1 << clk->enable_shift)) { \ | 407 | if (reg & (1 << clk->enable_shift)) { \ |
408 | pr_err("%s: clock is gated\n", __func__); \ | 408 | pr_err("%s: clock is gated\n", __func__); \ |
409 | return -EINVAL; \ | 409 | return -EINVAL; \ |
410 | } \ | 410 | } \ |
diff --git a/arch/arm/mach-mxs/include/mach/mx28.h b/arch/arm/mach-mxs/include/mach/mx28.h index 75d86118b76a..30c7990f3c01 100644 --- a/arch/arm/mach-mxs/include/mach/mx28.h +++ b/arch/arm/mach-mxs/include/mach/mx28.h | |||
@@ -104,8 +104,8 @@ | |||
104 | #define MX28_INT_CAN1 9 | 104 | #define MX28_INT_CAN1 9 |
105 | #define MX28_INT_LRADC_TOUCH 10 | 105 | #define MX28_INT_LRADC_TOUCH 10 |
106 | #define MX28_INT_HSADC 13 | 106 | #define MX28_INT_HSADC 13 |
107 | #define MX28_INT_IRADC_THRESH0 14 | 107 | #define MX28_INT_LRADC_THRESH0 14 |
108 | #define MX28_INT_IRADC_THRESH1 15 | 108 | #define MX28_INT_LRADC_THRESH1 15 |
109 | #define MX28_INT_LRADC_CH0 16 | 109 | #define MX28_INT_LRADC_CH0 16 |
110 | #define MX28_INT_LRADC_CH1 17 | 110 | #define MX28_INT_LRADC_CH1 17 |
111 | #define MX28_INT_LRADC_CH2 18 | 111 | #define MX28_INT_LRADC_CH2 18 |
diff --git a/arch/arm/mach-mxs/include/mach/mxs.h b/arch/arm/mach-mxs/include/mach/mxs.h index 0d2d2b470998..bde5f6634747 100644 --- a/arch/arm/mach-mxs/include/mach/mxs.h +++ b/arch/arm/mach-mxs/include/mach/mxs.h | |||
@@ -30,6 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | #define cpu_is_mx23() ( \ | 31 | #define cpu_is_mx23() ( \ |
32 | machine_is_mx23evk() || \ | 32 | machine_is_mx23evk() || \ |
33 | machine_is_stmp378x() || \ | ||
33 | 0) | 34 | 0) |
34 | #define cpu_is_mx28() ( \ | 35 | #define cpu_is_mx28() ( \ |
35 | machine_is_mx28evk() || \ | 36 | machine_is_mx28evk() || \ |
diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c index 3b1681e4f49a..6b00577b7025 100644 --- a/arch/arm/mach-mxs/mach-m28evk.c +++ b/arch/arm/mach-mxs/mach-m28evk.c | |||
@@ -361,6 +361,6 @@ static struct sys_timer m28evk_timer = { | |||
361 | MACHINE_START(M28EVK, "DENX M28 EVK") | 361 | MACHINE_START(M28EVK, "DENX M28 EVK") |
362 | .map_io = mx28_map_io, | 362 | .map_io = mx28_map_io, |
363 | .init_irq = mx28_init_irq, | 363 | .init_irq = mx28_init_irq, |
364 | .init_machine = m28evk_init, | ||
365 | .timer = &m28evk_timer, | 364 | .timer = &m28evk_timer, |
365 | .init_machine = m28evk_init, | ||
366 | MACHINE_END | 366 | MACHINE_END |
diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c index 177e53123a02..6834dea38c04 100644 --- a/arch/arm/mach-mxs/mach-stmp378x_devb.c +++ b/arch/arm/mach-mxs/mach-stmp378x_devb.c | |||
@@ -115,6 +115,6 @@ static struct sys_timer stmp378x_dvb_timer = { | |||
115 | MACHINE_START(STMP378X, "STMP378X") | 115 | MACHINE_START(STMP378X, "STMP378X") |
116 | .map_io = mx23_map_io, | 116 | .map_io = mx23_map_io, |
117 | .init_irq = mx23_init_irq, | 117 | .init_irq = mx23_init_irq, |
118 | .init_machine = stmp378x_dvb_init, | ||
119 | .timer = &stmp378x_dvb_timer, | 118 | .timer = &stmp378x_dvb_timer, |
119 | .init_machine = stmp378x_dvb_init, | ||
120 | MACHINE_END | 120 | MACHINE_END |
diff --git a/arch/arm/mach-mxs/module-tx28.c b/arch/arm/mach-mxs/module-tx28.c index 0fcff47009cf..9a7b08b2a925 100644 --- a/arch/arm/mach-mxs/module-tx28.c +++ b/arch/arm/mach-mxs/module-tx28.c | |||
@@ -66,11 +66,11 @@ static const iomux_cfg_t tx28_fec1_pads[] __initconst = { | |||
66 | MX28_PAD_ENET0_CRS__ENET1_RX_EN, | 66 | MX28_PAD_ENET0_CRS__ENET1_RX_EN, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static struct fec_platform_data tx28_fec0_data = { | 69 | static const struct fec_platform_data tx28_fec0_data __initconst = { |
70 | .phy = PHY_INTERFACE_MODE_RMII, | 70 | .phy = PHY_INTERFACE_MODE_RMII, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static struct fec_platform_data tx28_fec1_data = { | 73 | static const struct fec_platform_data tx28_fec1_data __initconst = { |
74 | .phy = PHY_INTERFACE_MODE_RMII, | 74 | .phy = PHY_INTERFACE_MODE_RMII, |
75 | }; | 75 | }; |
76 | 76 | ||
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index e0a028161dde..73f287d6429b 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig | |||
@@ -171,14 +171,6 @@ config MACH_OMAP_GENERIC | |||
171 | comment "OMAP CPU Speed" | 171 | comment "OMAP CPU Speed" |
172 | depends on ARCH_OMAP1 | 172 | depends on ARCH_OMAP1 |
173 | 173 | ||
174 | config OMAP_CLOCKS_SET_BY_BOOTLOADER | ||
175 | bool "OMAP clocks set by bootloader" | ||
176 | depends on ARCH_OMAP1 | ||
177 | help | ||
178 | Enable this option to prevent the kernel from overriding the clock | ||
179 | frequencies programmed by bootloader for MPU, DSP, MMUs, TC, | ||
180 | internal LCD controller and MPU peripherals. | ||
181 | |||
182 | config OMAP_ARM_216MHZ | 174 | config OMAP_ARM_216MHZ |
183 | bool "OMAP ARM 216 MHz CPU (1710 only)" | 175 | bool "OMAP ARM 216 MHz CPU (1710 only)" |
184 | depends on ARCH_OMAP1 && ARCH_OMAP16XX | 176 | depends on ARCH_OMAP1 && ARCH_OMAP16XX |
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 51bae31cf361..b0f15d234a12 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -302,8 +302,6 @@ static void __init ams_delta_init(void) | |||
302 | omap_cfg_reg(J19_1610_CAM_D6); | 302 | omap_cfg_reg(J19_1610_CAM_D6); |
303 | omap_cfg_reg(J18_1610_CAM_D7); | 303 | omap_cfg_reg(J18_1610_CAM_D7); |
304 | 304 | ||
305 | iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); | ||
306 | |||
307 | omap_board_config = ams_delta_config; | 305 | omap_board_config = ams_delta_config; |
308 | omap_board_config_size = ARRAY_SIZE(ams_delta_config); | 306 | omap_board_config_size = ARRAY_SIZE(ams_delta_config); |
309 | omap_serial_init(); | 307 | omap_serial_init(); |
@@ -373,10 +371,16 @@ static int __init ams_delta_modem_init(void) | |||
373 | } | 371 | } |
374 | arch_initcall(ams_delta_modem_init); | 372 | arch_initcall(ams_delta_modem_init); |
375 | 373 | ||
374 | static void __init ams_delta_map_io(void) | ||
375 | { | ||
376 | omap15xx_map_io(); | ||
377 | iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); | ||
378 | } | ||
379 | |||
376 | MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") | 380 | MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") |
377 | /* Maintainer: Jonathan McDowell <noodles@earth.li> */ | 381 | /* Maintainer: Jonathan McDowell <noodles@earth.li> */ |
378 | .atag_offset = 0x100, | 382 | .atag_offset = 0x100, |
379 | .map_io = omap15xx_map_io, | 383 | .map_io = ams_delta_map_io, |
380 | .init_early = omap1_init_early, | 384 | .init_early = omap1_init_early, |
381 | .reserve = omap_reserve, | 385 | .reserve = omap_reserve, |
382 | .init_irq = omap1_init_irq, | 386 | .init_irq = omap1_init_irq, |
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h index eaf09efb91ca..16b1423b454a 100644 --- a/arch/arm/mach-omap1/clock.h +++ b/arch/arm/mach-omap1/clock.h | |||
@@ -17,7 +17,8 @@ | |||
17 | 17 | ||
18 | #include <plat/clock.h> | 18 | #include <plat/clock.h> |
19 | 19 | ||
20 | extern int __init omap1_clk_init(void); | 20 | int omap1_clk_init(void); |
21 | void omap1_clk_late_init(void); | ||
21 | extern int omap1_clk_enable(struct clk *clk); | 22 | extern int omap1_clk_enable(struct clk *clk); |
22 | extern void omap1_clk_disable(struct clk *clk); | 23 | extern void omap1_clk_disable(struct clk *clk); |
23 | extern long omap1_clk_round_rate(struct clk *clk, unsigned long rate); | 24 | extern long omap1_clk_round_rate(struct clk *clk, unsigned long rate); |
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index 92400b9eb69f..9ff90a744a21 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/cpufreq.h> | ||
20 | #include <linux/delay.h> | ||
19 | #include <linux/io.h> | 21 | #include <linux/io.h> |
20 | 22 | ||
21 | #include <asm/mach-types.h> /* for machine_is_* */ | 23 | #include <asm/mach-types.h> /* for machine_is_* */ |
@@ -767,6 +769,15 @@ static struct clk_functions omap1_clk_functions = { | |||
767 | .clk_disable_unused = omap1_clk_disable_unused, | 769 | .clk_disable_unused = omap1_clk_disable_unused, |
768 | }; | 770 | }; |
769 | 771 | ||
772 | static void __init omap1_show_rates(void) | ||
773 | { | ||
774 | pr_notice("Clocking rate (xtal/DPLL1/MPU): " | ||
775 | "%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n", | ||
776 | ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10, | ||
777 | ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, | ||
778 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); | ||
779 | } | ||
780 | |||
770 | int __init omap1_clk_init(void) | 781 | int __init omap1_clk_init(void) |
771 | { | 782 | { |
772 | struct omap_clk *c; | 783 | struct omap_clk *c; |
@@ -835,9 +846,12 @@ int __init omap1_clk_init(void) | |||
835 | /* We want to be in syncronous scalable mode */ | 846 | /* We want to be in syncronous scalable mode */ |
836 | omap_writew(0x1000, ARM_SYSST); | 847 | omap_writew(0x1000, ARM_SYSST); |
837 | 848 | ||
838 | #ifdef CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER | 849 | |
839 | /* Use values set by bootloader. Determine PLL rate and recalculate | 850 | /* |
840 | * dependent clocks as if kernel had changed PLL or divisors. | 851 | * Initially use the values set by bootloader. Determine PLL rate and |
852 | * recalculate dependent clocks as if kernel had changed PLL or | ||
853 | * divisors. See also omap1_clk_late_init() that can reprogram dpll1 | ||
854 | * after the SRAM is initialized. | ||
841 | */ | 855 | */ |
842 | { | 856 | { |
843 | unsigned pll_ctl_val = omap_readw(DPLL_CTL); | 857 | unsigned pll_ctl_val = omap_readw(DPLL_CTL); |
@@ -862,25 +876,10 @@ int __init omap1_clk_init(void) | |||
862 | } | 876 | } |
863 | } | 877 | } |
864 | } | 878 | } |
865 | #else | ||
866 | /* Find the highest supported frequency and enable it */ | ||
867 | if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) { | ||
868 | printk(KERN_ERR "System frequencies not set. Check your config.\n"); | ||
869 | /* Guess sane values (60MHz) */ | ||
870 | omap_writew(0x2290, DPLL_CTL); | ||
871 | omap_writew(cpu_is_omap7xx() ? 0x3005 : 0x1005, ARM_CKCTL); | ||
872 | ck_dpll1.rate = 60000000; | ||
873 | } | ||
874 | #endif | ||
875 | propagate_rate(&ck_dpll1); | 879 | propagate_rate(&ck_dpll1); |
876 | /* Cache rates for clocks connected to ck_ref (not dpll1) */ | 880 | /* Cache rates for clocks connected to ck_ref (not dpll1) */ |
877 | propagate_rate(&ck_ref); | 881 | propagate_rate(&ck_ref); |
878 | printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): " | 882 | omap1_show_rates(); |
879 | "%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n", | ||
880 | ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10, | ||
881 | ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, | ||
882 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); | ||
883 | |||
884 | if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { | 883 | if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { |
885 | /* Select slicer output as OMAP input clock */ | 884 | /* Select slicer output as OMAP input clock */ |
886 | omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, | 885 | omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, |
@@ -925,3 +924,27 @@ int __init omap1_clk_init(void) | |||
925 | 924 | ||
926 | return 0; | 925 | return 0; |
927 | } | 926 | } |
927 | |||
928 | #define OMAP1_DPLL1_SANE_VALUE 60000000 | ||
929 | |||
930 | void __init omap1_clk_late_init(void) | ||
931 | { | ||
932 | unsigned long rate = ck_dpll1.rate; | ||
933 | |||
934 | if (rate >= OMAP1_DPLL1_SANE_VALUE) | ||
935 | return; | ||
936 | |||
937 | /* System booting at unusable rate, force reprogramming of DPLL1 */ | ||
938 | ck_dpll1_p->rate = 0; | ||
939 | |||
940 | /* Find the highest supported frequency and enable it */ | ||
941 | if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) { | ||
942 | pr_err("System frequencies not set, using default. Check your config.\n"); | ||
943 | omap_writew(0x2290, DPLL_CTL); | ||
944 | omap_writew(cpu_is_omap7xx() ? 0x2005 : 0x0005, ARM_CKCTL); | ||
945 | ck_dpll1.rate = OMAP1_DPLL1_SANE_VALUE; | ||
946 | } | ||
947 | propagate_rate(&ck_dpll1); | ||
948 | omap1_show_rates(); | ||
949 | loops_per_jiffy = cpufreq_scale(loops_per_jiffy, rate, ck_dpll1.rate); | ||
950 | } | ||
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 48ef9888e820..475cb2f50d87 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <plat/omap7xx.h> | 30 | #include <plat/omap7xx.h> |
31 | #include <plat/mcbsp.h> | 31 | #include <plat/mcbsp.h> |
32 | 32 | ||
33 | #include "clock.h" | ||
34 | |||
33 | /*-------------------------------------------------------------------------*/ | 35 | /*-------------------------------------------------------------------------*/ |
34 | 36 | ||
35 | #if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE) | 37 | #if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE) |
@@ -293,6 +295,7 @@ static int __init omap1_init_devices(void) | |||
293 | return -ENODEV; | 295 | return -ENODEV; |
294 | 296 | ||
295 | omap_sram_init(); | 297 | omap_sram_init(); |
298 | omap1_clk_late_init(); | ||
296 | 299 | ||
297 | /* please keep these calls, and their implementations above, | 300 | /* please keep these calls, and their implementations above, |
298 | * in alphabetical order so they're easier to sort through. | 301 | * in alphabetical order so they're easier to sort through. |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 503414718905..e1293aa513d3 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -334,6 +334,7 @@ config MACH_OMAP4_PANDA | |||
334 | config OMAP3_EMU | 334 | config OMAP3_EMU |
335 | bool "OMAP3 debugging peripherals" | 335 | bool "OMAP3 debugging peripherals" |
336 | depends on ARCH_OMAP3 | 336 | depends on ARCH_OMAP3 |
337 | select ARM_AMBA | ||
337 | select OC_ETM | 338 | select OC_ETM |
338 | help | 339 | help |
339 | Say Y here to enable debugging hardware of omap3 | 340 | Say Y here to enable debugging hardware of omap3 |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 69ab1c069134..b009f17dee56 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ | 6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ |
7 | common.o gpio.o dma.o wd_timer.o | 7 | common.o gpio.o dma.o wd_timer.o display.o |
8 | 8 | ||
9 | omap-2-3-common = irq.o sdrc.o | 9 | omap-2-3-common = irq.o sdrc.o |
10 | hwmod-common = omap_hwmod.o \ | 10 | hwmod-common = omap_hwmod.o \ |
@@ -264,7 +264,4 @@ smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o | |||
264 | obj-y += $(smsc911x-m) $(smsc911x-y) | 264 | obj-y += $(smsc911x-m) $(smsc911x-y) |
265 | obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o | 265 | obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o |
266 | 266 | ||
267 | disp-$(CONFIG_OMAP2_DSS) := display.o | ||
268 | obj-y += $(disp-m) $(disp-y) | ||
269 | |||
270 | obj-y += common-board-devices.o twl-common.o | 267 | obj-y += common-board-devices.o twl-common.o |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index ba1aa07bdb29..c15c5c9c9085 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -193,7 +193,7 @@ static struct platform_device rx51_charger_device = { | |||
193 | static void __init rx51_charger_init(void) | 193 | static void __init rx51_charger_init(void) |
194 | { | 194 | { |
195 | WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO, | 195 | WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO, |
196 | GPIOF_OUT_INIT_LOW, "isp1704_reset")); | 196 | GPIOF_OUT_INIT_HIGH, "isp1704_reset")); |
197 | 197 | ||
198 | platform_device_register(&rx51_charger_device); | 198 | platform_device_register(&rx51_charger_device); |
199 | } | 199 | } |
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 1fe35c24fba2..942bb4f19f9f 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/cpuidle.h> | 26 | #include <linux/cpuidle.h> |
27 | #include <linux/export.h> | ||
27 | 28 | ||
28 | #include <plat/prcm.h> | 29 | #include <plat/prcm.h> |
29 | #include <plat/irqs.h> | 30 | #include <plat/irqs.h> |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index adb2756e242f..dce9905d64bb 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -27,8 +27,35 @@ | |||
27 | #include <plat/omap_hwmod.h> | 27 | #include <plat/omap_hwmod.h> |
28 | #include <plat/omap_device.h> | 28 | #include <plat/omap_device.h> |
29 | #include <plat/omap-pm.h> | 29 | #include <plat/omap-pm.h> |
30 | #include <plat/common.h> | ||
30 | 31 | ||
31 | #include "control.h" | 32 | #include "control.h" |
33 | #include "display.h" | ||
34 | |||
35 | #define DISPC_CONTROL 0x0040 | ||
36 | #define DISPC_CONTROL2 0x0238 | ||
37 | #define DISPC_IRQSTATUS 0x0018 | ||
38 | |||
39 | #define DSS_SYSCONFIG 0x10 | ||
40 | #define DSS_SYSSTATUS 0x14 | ||
41 | #define DSS_CONTROL 0x40 | ||
42 | #define DSS_SDI_CONTROL 0x44 | ||
43 | #define DSS_PLL_CONTROL 0x48 | ||
44 | |||
45 | #define LCD_EN_MASK (0x1 << 0) | ||
46 | #define DIGIT_EN_MASK (0x1 << 1) | ||
47 | |||
48 | #define FRAMEDONE_IRQ_SHIFT 0 | ||
49 | #define EVSYNC_EVEN_IRQ_SHIFT 2 | ||
50 | #define EVSYNC_ODD_IRQ_SHIFT 3 | ||
51 | #define FRAMEDONE2_IRQ_SHIFT 22 | ||
52 | #define FRAMEDONETV_IRQ_SHIFT 24 | ||
53 | |||
54 | /* | ||
55 | * FRAMEDONE_IRQ_TIMEOUT: how long (in milliseconds) to wait during DISPC | ||
56 | * reset before deciding that something has gone wrong | ||
57 | */ | ||
58 | #define FRAMEDONE_IRQ_TIMEOUT 100 | ||
32 | 59 | ||
33 | static struct platform_device omap_display_device = { | 60 | static struct platform_device omap_display_device = { |
34 | .name = "omapdss", | 61 | .name = "omapdss", |
@@ -172,3 +199,135 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) | |||
172 | 199 | ||
173 | return r; | 200 | return r; |
174 | } | 201 | } |
202 | |||
203 | static void dispc_disable_outputs(void) | ||
204 | { | ||
205 | u32 v, irq_mask = 0; | ||
206 | bool lcd_en, digit_en, lcd2_en = false; | ||
207 | int i; | ||
208 | struct omap_dss_dispc_dev_attr *da; | ||
209 | struct omap_hwmod *oh; | ||
210 | |||
211 | oh = omap_hwmod_lookup("dss_dispc"); | ||
212 | if (!oh) { | ||
213 | WARN(1, "display: could not disable outputs during reset - could not find dss_dispc hwmod\n"); | ||
214 | return; | ||
215 | } | ||
216 | |||
217 | if (!oh->dev_attr) { | ||
218 | pr_err("display: could not disable outputs during reset due to missing dev_attr\n"); | ||
219 | return; | ||
220 | } | ||
221 | |||
222 | da = (struct omap_dss_dispc_dev_attr *)oh->dev_attr; | ||
223 | |||
224 | /* store value of LCDENABLE and DIGITENABLE bits */ | ||
225 | v = omap_hwmod_read(oh, DISPC_CONTROL); | ||
226 | lcd_en = v & LCD_EN_MASK; | ||
227 | digit_en = v & DIGIT_EN_MASK; | ||
228 | |||
229 | /* store value of LCDENABLE for LCD2 */ | ||
230 | if (da->manager_count > 2) { | ||
231 | v = omap_hwmod_read(oh, DISPC_CONTROL2); | ||
232 | lcd2_en = v & LCD_EN_MASK; | ||
233 | } | ||
234 | |||
235 | if (!(lcd_en | digit_en | lcd2_en)) | ||
236 | return; /* no managers currently enabled */ | ||
237 | |||
238 | /* | ||
239 | * If any manager was enabled, we need to disable it before | ||
240 | * DSS clocks are disabled or DISPC module is reset | ||
241 | */ | ||
242 | if (lcd_en) | ||
243 | irq_mask |= 1 << FRAMEDONE_IRQ_SHIFT; | ||
244 | |||
245 | if (digit_en) { | ||
246 | if (da->has_framedonetv_irq) { | ||
247 | irq_mask |= 1 << FRAMEDONETV_IRQ_SHIFT; | ||
248 | } else { | ||
249 | irq_mask |= 1 << EVSYNC_EVEN_IRQ_SHIFT | | ||
250 | 1 << EVSYNC_ODD_IRQ_SHIFT; | ||
251 | } | ||
252 | } | ||
253 | |||
254 | if (lcd2_en) | ||
255 | irq_mask |= 1 << FRAMEDONE2_IRQ_SHIFT; | ||
256 | |||
257 | /* | ||
258 | * clear any previous FRAMEDONE, FRAMEDONETV, | ||
259 | * EVSYNC_EVEN/ODD or FRAMEDONE2 interrupts | ||
260 | */ | ||
261 | omap_hwmod_write(irq_mask, oh, DISPC_IRQSTATUS); | ||
262 | |||
263 | /* disable LCD and TV managers */ | ||
264 | v = omap_hwmod_read(oh, DISPC_CONTROL); | ||
265 | v &= ~(LCD_EN_MASK | DIGIT_EN_MASK); | ||
266 | omap_hwmod_write(v, oh, DISPC_CONTROL); | ||
267 | |||
268 | /* disable LCD2 manager */ | ||
269 | if (da->manager_count > 2) { | ||
270 | v = omap_hwmod_read(oh, DISPC_CONTROL2); | ||
271 | v &= ~LCD_EN_MASK; | ||
272 | omap_hwmod_write(v, oh, DISPC_CONTROL2); | ||
273 | } | ||
274 | |||
275 | i = 0; | ||
276 | while ((omap_hwmod_read(oh, DISPC_IRQSTATUS) & irq_mask) != | ||
277 | irq_mask) { | ||
278 | i++; | ||
279 | if (i > FRAMEDONE_IRQ_TIMEOUT) { | ||
280 | pr_err("didn't get FRAMEDONE1/2 or TV interrupt\n"); | ||
281 | break; | ||
282 | } | ||
283 | mdelay(1); | ||
284 | } | ||
285 | } | ||
286 | |||
287 | #define MAX_MODULE_SOFTRESET_WAIT 10000 | ||
288 | int omap_dss_reset(struct omap_hwmod *oh) | ||
289 | { | ||
290 | struct omap_hwmod_opt_clk *oc; | ||
291 | int c = 0; | ||
292 | int i, r; | ||
293 | |||
294 | if (!(oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS)) { | ||
295 | pr_err("dss_core: hwmod data doesn't contain reset data\n"); | ||
296 | return -EINVAL; | ||
297 | } | ||
298 | |||
299 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | ||
300 | if (oc->_clk) | ||
301 | clk_enable(oc->_clk); | ||
302 | |||
303 | dispc_disable_outputs(); | ||
304 | |||
305 | /* clear SDI registers */ | ||
306 | if (cpu_is_omap3430()) { | ||
307 | omap_hwmod_write(0x0, oh, DSS_SDI_CONTROL); | ||
308 | omap_hwmod_write(0x0, oh, DSS_PLL_CONTROL); | ||
309 | } | ||
310 | |||
311 | /* | ||
312 | * clear DSS_CONTROL register to switch DSS clock sources to | ||
313 | * PRCM clock, if any | ||
314 | */ | ||
315 | omap_hwmod_write(0x0, oh, DSS_CONTROL); | ||
316 | |||
317 | omap_test_timeout((omap_hwmod_read(oh, oh->class->sysc->syss_offs) | ||
318 | & SYSS_RESETDONE_MASK), | ||
319 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
320 | |||
321 | if (c == MAX_MODULE_SOFTRESET_WAIT) | ||
322 | pr_warning("dss_core: waiting for reset to finish failed\n"); | ||
323 | else | ||
324 | pr_debug("dss_core: softreset done\n"); | ||
325 | |||
326 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | ||
327 | if (oc->_clk) | ||
328 | clk_disable(oc->_clk); | ||
329 | |||
330 | r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0; | ||
331 | |||
332 | return r; | ||
333 | } | ||
diff --git a/arch/arm/mach-omap2/display.h b/arch/arm/mach-omap2/display.h new file mode 100644 index 000000000000..b871b017b352 --- /dev/null +++ b/arch/arm/mach-omap2/display.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * display.h - OMAP2+ integration-specific DSS header | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published by | ||
8 | * the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along with | ||
16 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ARCH_ARM_MACH_OMAP2_DISPLAY_H | ||
20 | #define __ARCH_ARM_MACH_OMAP2_DISPLAY_H | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | |||
24 | struct omap_dss_dispc_dev_attr { | ||
25 | u8 manager_count; | ||
26 | bool has_framedonetv_irq; | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm/mach-omap2/io.h b/arch/arm/mach-omap2/io.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/arm/mach-omap2/io.h +++ /dev/null | |||
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 292eee3be15f..28fcb27005d2 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -145,6 +145,9 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) | |||
145 | pdata->reg_size = 4; | 145 | pdata->reg_size = 4; |
146 | pdata->has_ccr = true; | 146 | pdata->has_ccr = true; |
147 | } | 147 | } |
148 | pdata->set_clk_src = omap2_mcbsp_set_clk_src; | ||
149 | if (id == 1) | ||
150 | pdata->mux_signal = omap2_mcbsp1_mux_rx_clk; | ||
148 | 151 | ||
149 | if (oh->class->rev == MCBSP_CONFIG_TYPE3) { | 152 | if (oh->class->rev == MCBSP_CONFIG_TYPE3) { |
150 | if (id == 2) | 153 | if (id == 2) |
@@ -174,9 +177,6 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) | |||
174 | name, oh->name); | 177 | name, oh->name); |
175 | return PTR_ERR(pdev); | 178 | return PTR_ERR(pdev); |
176 | } | 179 | } |
177 | pdata->set_clk_src = omap2_mcbsp_set_clk_src; | ||
178 | if (id == 1) | ||
179 | pdata->mux_signal = omap2_mcbsp1_mux_rx_clk; | ||
180 | omap_mcbsp_count++; | 180 | omap_mcbsp_count++; |
181 | return 0; | 181 | return 0; |
182 | } | 182 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 6b3088db83b7..207a2ff9a8c4 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -749,7 +749,7 @@ static int _count_mpu_irqs(struct omap_hwmod *oh) | |||
749 | ohii = &oh->mpu_irqs[i++]; | 749 | ohii = &oh->mpu_irqs[i++]; |
750 | } while (ohii->irq != -1); | 750 | } while (ohii->irq != -1); |
751 | 751 | ||
752 | return i; | 752 | return i-1; |
753 | } | 753 | } |
754 | 754 | ||
755 | /** | 755 | /** |
@@ -772,7 +772,7 @@ static int _count_sdma_reqs(struct omap_hwmod *oh) | |||
772 | ohdi = &oh->sdma_reqs[i++]; | 772 | ohdi = &oh->sdma_reqs[i++]; |
773 | } while (ohdi->dma_req != -1); | 773 | } while (ohdi->dma_req != -1); |
774 | 774 | ||
775 | return i; | 775 | return i-1; |
776 | } | 776 | } |
777 | 777 | ||
778 | /** | 778 | /** |
@@ -795,7 +795,7 @@ static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os) | |||
795 | mem = &os->addr[i++]; | 795 | mem = &os->addr[i++]; |
796 | } while (mem->pa_start != mem->pa_end); | 796 | } while (mem->pa_start != mem->pa_end); |
797 | 797 | ||
798 | return i; | 798 | return i-1; |
799 | } | 799 | } |
800 | 800 | ||
801 | /** | 801 | /** |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index 6d7206213525..a5409ce3f323 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -875,6 +875,10 @@ static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = { | |||
875 | }; | 875 | }; |
876 | 876 | ||
877 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | 877 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
878 | /* | ||
879 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core | ||
880 | * driver does not use these clocks. | ||
881 | */ | ||
878 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | 882 | { .role = "tv_clk", .clk = "dss_54m_fck" }, |
879 | { .role = "sys_clk", .clk = "dss2_fck" }, | 883 | { .role = "sys_clk", .clk = "dss2_fck" }, |
880 | }; | 884 | }; |
@@ -899,7 +903,7 @@ static struct omap_hwmod omap2420_dss_core_hwmod = { | |||
899 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves), | 903 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves), |
900 | .masters = omap2420_dss_masters, | 904 | .masters = omap2420_dss_masters, |
901 | .masters_cnt = ARRAY_SIZE(omap2420_dss_masters), | 905 | .masters_cnt = ARRAY_SIZE(omap2420_dss_masters), |
902 | .flags = HWMOD_NO_IDLEST, | 906 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
903 | }; | 907 | }; |
904 | 908 | ||
905 | /* l4_core -> dss_dispc */ | 909 | /* l4_core -> dss_dispc */ |
@@ -939,6 +943,7 @@ static struct omap_hwmod omap2420_dss_dispc_hwmod = { | |||
939 | .slaves = omap2420_dss_dispc_slaves, | 943 | .slaves = omap2420_dss_dispc_slaves, |
940 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves), | 944 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves), |
941 | .flags = HWMOD_NO_IDLEST, | 945 | .flags = HWMOD_NO_IDLEST, |
946 | .dev_attr = &omap2_3_dss_dispc_dev_attr | ||
942 | }; | 947 | }; |
943 | 948 | ||
944 | /* l4_core -> dss_rfbi */ | 949 | /* l4_core -> dss_rfbi */ |
@@ -961,6 +966,10 @@ static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = { | |||
961 | &omap2420_l4_core__dss_rfbi, | 966 | &omap2420_l4_core__dss_rfbi, |
962 | }; | 967 | }; |
963 | 968 | ||
969 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | ||
970 | { .role = "ick", .clk = "dss_ick" }, | ||
971 | }; | ||
972 | |||
964 | static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | 973 | static struct omap_hwmod omap2420_dss_rfbi_hwmod = { |
965 | .name = "dss_rfbi", | 974 | .name = "dss_rfbi", |
966 | .class = &omap2_rfbi_hwmod_class, | 975 | .class = &omap2_rfbi_hwmod_class, |
@@ -972,6 +981,8 @@ static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | |||
972 | .module_offs = CORE_MOD, | 981 | .module_offs = CORE_MOD, |
973 | }, | 982 | }, |
974 | }, | 983 | }, |
984 | .opt_clks = dss_rfbi_opt_clks, | ||
985 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | ||
975 | .slaves = omap2420_dss_rfbi_slaves, | 986 | .slaves = omap2420_dss_rfbi_slaves, |
976 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves), | 987 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves), |
977 | .flags = HWMOD_NO_IDLEST, | 988 | .flags = HWMOD_NO_IDLEST, |
@@ -981,7 +992,7 @@ static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | |||
981 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { | 992 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { |
982 | .master = &omap2420_l4_core_hwmod, | 993 | .master = &omap2420_l4_core_hwmod, |
983 | .slave = &omap2420_dss_venc_hwmod, | 994 | .slave = &omap2420_dss_venc_hwmod, |
984 | .clk = "dss_54m_fck", | 995 | .clk = "dss_ick", |
985 | .addr = omap2_dss_venc_addrs, | 996 | .addr = omap2_dss_venc_addrs, |
986 | .fw = { | 997 | .fw = { |
987 | .omap2 = { | 998 | .omap2 = { |
@@ -1001,7 +1012,7 @@ static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = { | |||
1001 | static struct omap_hwmod omap2420_dss_venc_hwmod = { | 1012 | static struct omap_hwmod omap2420_dss_venc_hwmod = { |
1002 | .name = "dss_venc", | 1013 | .name = "dss_venc", |
1003 | .class = &omap2_venc_hwmod_class, | 1014 | .class = &omap2_venc_hwmod_class, |
1004 | .main_clk = "dss1_fck", | 1015 | .main_clk = "dss_54m_fck", |
1005 | .prcm = { | 1016 | .prcm = { |
1006 | .omap2 = { | 1017 | .omap2 = { |
1007 | .prcm_reg_id = 1, | 1018 | .prcm_reg_id = 1, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index a2580d01c3ff..c4f56cb60d7d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -942,6 +942,10 @@ static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = { | |||
942 | }; | 942 | }; |
943 | 943 | ||
944 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | 944 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
945 | /* | ||
946 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core | ||
947 | * driver does not use these clocks. | ||
948 | */ | ||
945 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | 949 | { .role = "tv_clk", .clk = "dss_54m_fck" }, |
946 | { .role = "sys_clk", .clk = "dss2_fck" }, | 950 | { .role = "sys_clk", .clk = "dss2_fck" }, |
947 | }; | 951 | }; |
@@ -966,7 +970,7 @@ static struct omap_hwmod omap2430_dss_core_hwmod = { | |||
966 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves), | 970 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves), |
967 | .masters = omap2430_dss_masters, | 971 | .masters = omap2430_dss_masters, |
968 | .masters_cnt = ARRAY_SIZE(omap2430_dss_masters), | 972 | .masters_cnt = ARRAY_SIZE(omap2430_dss_masters), |
969 | .flags = HWMOD_NO_IDLEST, | 973 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
970 | }; | 974 | }; |
971 | 975 | ||
972 | /* l4_core -> dss_dispc */ | 976 | /* l4_core -> dss_dispc */ |
@@ -1000,6 +1004,7 @@ static struct omap_hwmod omap2430_dss_dispc_hwmod = { | |||
1000 | .slaves = omap2430_dss_dispc_slaves, | 1004 | .slaves = omap2430_dss_dispc_slaves, |
1001 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves), | 1005 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves), |
1002 | .flags = HWMOD_NO_IDLEST, | 1006 | .flags = HWMOD_NO_IDLEST, |
1007 | .dev_attr = &omap2_3_dss_dispc_dev_attr | ||
1003 | }; | 1008 | }; |
1004 | 1009 | ||
1005 | /* l4_core -> dss_rfbi */ | 1010 | /* l4_core -> dss_rfbi */ |
@@ -1016,6 +1021,10 @@ static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = { | |||
1016 | &omap2430_l4_core__dss_rfbi, | 1021 | &omap2430_l4_core__dss_rfbi, |
1017 | }; | 1022 | }; |
1018 | 1023 | ||
1024 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | ||
1025 | { .role = "ick", .clk = "dss_ick" }, | ||
1026 | }; | ||
1027 | |||
1019 | static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | 1028 | static struct omap_hwmod omap2430_dss_rfbi_hwmod = { |
1020 | .name = "dss_rfbi", | 1029 | .name = "dss_rfbi", |
1021 | .class = &omap2_rfbi_hwmod_class, | 1030 | .class = &omap2_rfbi_hwmod_class, |
@@ -1027,6 +1036,8 @@ static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | |||
1027 | .module_offs = CORE_MOD, | 1036 | .module_offs = CORE_MOD, |
1028 | }, | 1037 | }, |
1029 | }, | 1038 | }, |
1039 | .opt_clks = dss_rfbi_opt_clks, | ||
1040 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | ||
1030 | .slaves = omap2430_dss_rfbi_slaves, | 1041 | .slaves = omap2430_dss_rfbi_slaves, |
1031 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves), | 1042 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves), |
1032 | .flags = HWMOD_NO_IDLEST, | 1043 | .flags = HWMOD_NO_IDLEST, |
@@ -1036,7 +1047,7 @@ static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | |||
1036 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { | 1047 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { |
1037 | .master = &omap2430_l4_core_hwmod, | 1048 | .master = &omap2430_l4_core_hwmod, |
1038 | .slave = &omap2430_dss_venc_hwmod, | 1049 | .slave = &omap2430_dss_venc_hwmod, |
1039 | .clk = "dss_54m_fck", | 1050 | .clk = "dss_ick", |
1040 | .addr = omap2_dss_venc_addrs, | 1051 | .addr = omap2_dss_venc_addrs, |
1041 | .flags = OCPIF_SWSUP_IDLE, | 1052 | .flags = OCPIF_SWSUP_IDLE, |
1042 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1053 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
@@ -1050,7 +1061,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = { | |||
1050 | static struct omap_hwmod omap2430_dss_venc_hwmod = { | 1061 | static struct omap_hwmod omap2430_dss_venc_hwmod = { |
1051 | .name = "dss_venc", | 1062 | .name = "dss_venc", |
1052 | .class = &omap2_venc_hwmod_class, | 1063 | .class = &omap2_venc_hwmod_class, |
1053 | .main_clk = "dss1_fck", | 1064 | .main_clk = "dss_54m_fck", |
1054 | .prcm = { | 1065 | .prcm = { |
1055 | .omap2 = { | 1066 | .omap2 = { |
1056 | .prcm_reg_id = 1, | 1067 | .prcm_reg_id = 1, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c index c451729d289a..c11273da5dcc 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <plat/omap_hwmod.h> | 11 | #include <plat/omap_hwmod.h> |
12 | #include <plat/serial.h> | 12 | #include <plat/serial.h> |
13 | #include <plat/dma.h> | 13 | #include <plat/dma.h> |
14 | #include <plat/common.h> | ||
14 | 15 | ||
15 | #include <mach/irqs.h> | 16 | #include <mach/irqs.h> |
16 | 17 | ||
@@ -43,13 +44,15 @@ static struct omap_hwmod_class_sysconfig omap2_dss_sysc = { | |||
43 | .rev_offs = 0x0000, | 44 | .rev_offs = 0x0000, |
44 | .sysc_offs = 0x0010, | 45 | .sysc_offs = 0x0010, |
45 | .syss_offs = 0x0014, | 46 | .syss_offs = 0x0014, |
46 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | 47 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
48 | SYSS_HAS_RESET_STATUS), | ||
47 | .sysc_fields = &omap_hwmod_sysc_type1, | 49 | .sysc_fields = &omap_hwmod_sysc_type1, |
48 | }; | 50 | }; |
49 | 51 | ||
50 | struct omap_hwmod_class omap2_dss_hwmod_class = { | 52 | struct omap_hwmod_class omap2_dss_hwmod_class = { |
51 | .name = "dss", | 53 | .name = "dss", |
52 | .sysc = &omap2_dss_sysc, | 54 | .sysc = &omap2_dss_sysc, |
55 | .reset = omap_dss_reset, | ||
53 | }; | 56 | }; |
54 | 57 | ||
55 | /* | 58 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index bc9035ec87fc..7f8915ad5099 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -1369,9 +1369,14 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = { | |||
1369 | }; | 1369 | }; |
1370 | 1370 | ||
1371 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | 1371 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
1372 | { .role = "tv_clk", .clk = "dss_tv_fck" }, | 1372 | /* |
1373 | { .role = "video_clk", .clk = "dss_96m_fck" }, | 1373 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core |
1374 | * driver does not use these clocks. | ||
1375 | */ | ||
1374 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, | 1376 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, |
1377 | { .role = "tv_clk", .clk = "dss_tv_fck" }, | ||
1378 | /* required only on OMAP3430 */ | ||
1379 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, | ||
1375 | }; | 1380 | }; |
1376 | 1381 | ||
1377 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { | 1382 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { |
@@ -1394,11 +1399,12 @@ static struct omap_hwmod omap3430es1_dss_core_hwmod = { | |||
1394 | .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves), | 1399 | .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves), |
1395 | .masters = omap3xxx_dss_masters, | 1400 | .masters = omap3xxx_dss_masters, |
1396 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | 1401 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), |
1397 | .flags = HWMOD_NO_IDLEST, | 1402 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1398 | }; | 1403 | }; |
1399 | 1404 | ||
1400 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { | 1405 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { |
1401 | .name = "dss_core", | 1406 | .name = "dss_core", |
1407 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1402 | .class = &omap2_dss_hwmod_class, | 1408 | .class = &omap2_dss_hwmod_class, |
1403 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ | 1409 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ |
1404 | .sdma_reqs = omap3xxx_dss_sdma_chs, | 1410 | .sdma_reqs = omap3xxx_dss_sdma_chs, |
@@ -1456,6 +1462,7 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { | |||
1456 | .slaves = omap3xxx_dss_dispc_slaves, | 1462 | .slaves = omap3xxx_dss_dispc_slaves, |
1457 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves), | 1463 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves), |
1458 | .flags = HWMOD_NO_IDLEST, | 1464 | .flags = HWMOD_NO_IDLEST, |
1465 | .dev_attr = &omap2_3_dss_dispc_dev_attr | ||
1459 | }; | 1466 | }; |
1460 | 1467 | ||
1461 | /* | 1468 | /* |
@@ -1486,6 +1493,7 @@ static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { | |||
1486 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { | 1493 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { |
1487 | .master = &omap3xxx_l4_core_hwmod, | 1494 | .master = &omap3xxx_l4_core_hwmod, |
1488 | .slave = &omap3xxx_dss_dsi1_hwmod, | 1495 | .slave = &omap3xxx_dss_dsi1_hwmod, |
1496 | .clk = "dss_ick", | ||
1489 | .addr = omap3xxx_dss_dsi1_addrs, | 1497 | .addr = omap3xxx_dss_dsi1_addrs, |
1490 | .fw = { | 1498 | .fw = { |
1491 | .omap2 = { | 1499 | .omap2 = { |
@@ -1502,6 +1510,10 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = { | |||
1502 | &omap3xxx_l4_core__dss_dsi1, | 1510 | &omap3xxx_l4_core__dss_dsi1, |
1503 | }; | 1511 | }; |
1504 | 1512 | ||
1513 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { | ||
1514 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, | ||
1515 | }; | ||
1516 | |||
1505 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { | 1517 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { |
1506 | .name = "dss_dsi1", | 1518 | .name = "dss_dsi1", |
1507 | .class = &omap3xxx_dsi_hwmod_class, | 1519 | .class = &omap3xxx_dsi_hwmod_class, |
@@ -1514,6 +1526,8 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { | |||
1514 | .module_offs = OMAP3430_DSS_MOD, | 1526 | .module_offs = OMAP3430_DSS_MOD, |
1515 | }, | 1527 | }, |
1516 | }, | 1528 | }, |
1529 | .opt_clks = dss_dsi1_opt_clks, | ||
1530 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), | ||
1517 | .slaves = omap3xxx_dss_dsi1_slaves, | 1531 | .slaves = omap3xxx_dss_dsi1_slaves, |
1518 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves), | 1532 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves), |
1519 | .flags = HWMOD_NO_IDLEST, | 1533 | .flags = HWMOD_NO_IDLEST, |
@@ -1540,6 +1554,10 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = { | |||
1540 | &omap3xxx_l4_core__dss_rfbi, | 1554 | &omap3xxx_l4_core__dss_rfbi, |
1541 | }; | 1555 | }; |
1542 | 1556 | ||
1557 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | ||
1558 | { .role = "ick", .clk = "dss_ick" }, | ||
1559 | }; | ||
1560 | |||
1543 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | 1561 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { |
1544 | .name = "dss_rfbi", | 1562 | .name = "dss_rfbi", |
1545 | .class = &omap2_rfbi_hwmod_class, | 1563 | .class = &omap2_rfbi_hwmod_class, |
@@ -1551,6 +1569,8 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | |||
1551 | .module_offs = OMAP3430_DSS_MOD, | 1569 | .module_offs = OMAP3430_DSS_MOD, |
1552 | }, | 1570 | }, |
1553 | }, | 1571 | }, |
1572 | .opt_clks = dss_rfbi_opt_clks, | ||
1573 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | ||
1554 | .slaves = omap3xxx_dss_rfbi_slaves, | 1574 | .slaves = omap3xxx_dss_rfbi_slaves, |
1555 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves), | 1575 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves), |
1556 | .flags = HWMOD_NO_IDLEST, | 1576 | .flags = HWMOD_NO_IDLEST, |
@@ -1560,7 +1580,7 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | |||
1560 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { | 1580 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { |
1561 | .master = &omap3xxx_l4_core_hwmod, | 1581 | .master = &omap3xxx_l4_core_hwmod, |
1562 | .slave = &omap3xxx_dss_venc_hwmod, | 1582 | .slave = &omap3xxx_dss_venc_hwmod, |
1563 | .clk = "dss_tv_fck", | 1583 | .clk = "dss_ick", |
1564 | .addr = omap2_dss_venc_addrs, | 1584 | .addr = omap2_dss_venc_addrs, |
1565 | .fw = { | 1585 | .fw = { |
1566 | .omap2 = { | 1586 | .omap2 = { |
@@ -1578,10 +1598,15 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = { | |||
1578 | &omap3xxx_l4_core__dss_venc, | 1598 | &omap3xxx_l4_core__dss_venc, |
1579 | }; | 1599 | }; |
1580 | 1600 | ||
1601 | static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = { | ||
1602 | /* required only on OMAP3430 */ | ||
1603 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, | ||
1604 | }; | ||
1605 | |||
1581 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { | 1606 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { |
1582 | .name = "dss_venc", | 1607 | .name = "dss_venc", |
1583 | .class = &omap2_venc_hwmod_class, | 1608 | .class = &omap2_venc_hwmod_class, |
1584 | .main_clk = "dss1_alwon_fck", | 1609 | .main_clk = "dss_tv_fck", |
1585 | .prcm = { | 1610 | .prcm = { |
1586 | .omap2 = { | 1611 | .omap2 = { |
1587 | .prcm_reg_id = 1, | 1612 | .prcm_reg_id = 1, |
@@ -1589,6 +1614,8 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = { | |||
1589 | .module_offs = OMAP3430_DSS_MOD, | 1614 | .module_offs = OMAP3430_DSS_MOD, |
1590 | }, | 1615 | }, |
1591 | }, | 1616 | }, |
1617 | .opt_clks = dss_venc_opt_clks, | ||
1618 | .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks), | ||
1592 | .slaves = omap3xxx_dss_venc_slaves, | 1619 | .slaves = omap3xxx_dss_venc_slaves, |
1593 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves), | 1620 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves), |
1594 | .flags = HWMOD_NO_IDLEST, | 1621 | .flags = HWMOD_NO_IDLEST, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 7695e5d43316..daaf165af696 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
31 | #include <plat/i2c.h> | 31 | #include <plat/i2c.h> |
32 | #include <plat/dmtimer.h> | 32 | #include <plat/dmtimer.h> |
33 | #include <plat/common.h> | ||
33 | 34 | ||
34 | #include "omap_hwmod_common_data.h" | 35 | #include "omap_hwmod_common_data.h" |
35 | 36 | ||
@@ -1187,6 +1188,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = { | |||
1187 | static struct omap_hwmod_class omap44xx_dss_hwmod_class = { | 1188 | static struct omap_hwmod_class omap44xx_dss_hwmod_class = { |
1188 | .name = "dss", | 1189 | .name = "dss", |
1189 | .sysc = &omap44xx_dss_sysc, | 1190 | .sysc = &omap44xx_dss_sysc, |
1191 | .reset = omap_dss_reset, | ||
1190 | }; | 1192 | }; |
1191 | 1193 | ||
1192 | /* dss */ | 1194 | /* dss */ |
@@ -1240,12 +1242,12 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = { | |||
1240 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | 1242 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
1241 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | 1243 | { .role = "sys_clk", .clk = "dss_sys_clk" }, |
1242 | { .role = "tv_clk", .clk = "dss_tv_clk" }, | 1244 | { .role = "tv_clk", .clk = "dss_tv_clk" }, |
1243 | { .role = "dss_clk", .clk = "dss_dss_clk" }, | 1245 | { .role = "hdmi_clk", .clk = "dss_48mhz_clk" }, |
1244 | { .role = "video_clk", .clk = "dss_48mhz_clk" }, | ||
1245 | }; | 1246 | }; |
1246 | 1247 | ||
1247 | static struct omap_hwmod omap44xx_dss_hwmod = { | 1248 | static struct omap_hwmod omap44xx_dss_hwmod = { |
1248 | .name = "dss_core", | 1249 | .name = "dss_core", |
1250 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1249 | .class = &omap44xx_dss_hwmod_class, | 1251 | .class = &omap44xx_dss_hwmod_class, |
1250 | .clkdm_name = "l3_dss_clkdm", | 1252 | .clkdm_name = "l3_dss_clkdm", |
1251 | .main_clk = "dss_dss_clk", | 1253 | .main_clk = "dss_dss_clk", |
@@ -1325,6 +1327,11 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = { | |||
1325 | { } | 1327 | { } |
1326 | }; | 1328 | }; |
1327 | 1329 | ||
1330 | static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = { | ||
1331 | .manager_count = 3, | ||
1332 | .has_framedonetv_irq = 1 | ||
1333 | }; | ||
1334 | |||
1328 | /* l4_per -> dss_dispc */ | 1335 | /* l4_per -> dss_dispc */ |
1329 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = { | 1336 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = { |
1330 | .master = &omap44xx_l4_per_hwmod, | 1337 | .master = &omap44xx_l4_per_hwmod, |
@@ -1340,12 +1347,6 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = { | |||
1340 | &omap44xx_l4_per__dss_dispc, | 1347 | &omap44xx_l4_per__dss_dispc, |
1341 | }; | 1348 | }; |
1342 | 1349 | ||
1343 | static struct omap_hwmod_opt_clk dss_dispc_opt_clks[] = { | ||
1344 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | ||
1345 | { .role = "tv_clk", .clk = "dss_tv_clk" }, | ||
1346 | { .role = "hdmi_clk", .clk = "dss_48mhz_clk" }, | ||
1347 | }; | ||
1348 | |||
1349 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | 1350 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { |
1350 | .name = "dss_dispc", | 1351 | .name = "dss_dispc", |
1351 | .class = &omap44xx_dispc_hwmod_class, | 1352 | .class = &omap44xx_dispc_hwmod_class, |
@@ -1359,10 +1360,9 @@ static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | |||
1359 | .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, | 1360 | .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, |
1360 | }, | 1361 | }, |
1361 | }, | 1362 | }, |
1362 | .opt_clks = dss_dispc_opt_clks, | ||
1363 | .opt_clks_cnt = ARRAY_SIZE(dss_dispc_opt_clks), | ||
1364 | .slaves = omap44xx_dss_dispc_slaves, | 1363 | .slaves = omap44xx_dss_dispc_slaves, |
1365 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), | 1364 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), |
1365 | .dev_attr = &omap44xx_dss_dispc_dev_attr | ||
1366 | }; | 1366 | }; |
1367 | 1367 | ||
1368 | /* | 1368 | /* |
@@ -1624,7 +1624,7 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { | |||
1624 | .clkdm_name = "l3_dss_clkdm", | 1624 | .clkdm_name = "l3_dss_clkdm", |
1625 | .mpu_irqs = omap44xx_dss_hdmi_irqs, | 1625 | .mpu_irqs = omap44xx_dss_hdmi_irqs, |
1626 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, | 1626 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, |
1627 | .main_clk = "dss_dss_clk", | 1627 | .main_clk = "dss_48mhz_clk", |
1628 | .prcm = { | 1628 | .prcm = { |
1629 | .omap4 = { | 1629 | .omap4 = { |
1630 | .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET, | 1630 | .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET, |
@@ -1785,7 +1785,7 @@ static struct omap_hwmod omap44xx_dss_venc_hwmod = { | |||
1785 | .name = "dss_venc", | 1785 | .name = "dss_venc", |
1786 | .class = &omap44xx_venc_hwmod_class, | 1786 | .class = &omap44xx_venc_hwmod_class, |
1787 | .clkdm_name = "l3_dss_clkdm", | 1787 | .clkdm_name = "l3_dss_clkdm", |
1788 | .main_clk = "dss_dss_clk", | 1788 | .main_clk = "dss_tv_clk", |
1789 | .prcm = { | 1789 | .prcm = { |
1790 | .omap4 = { | 1790 | .omap4 = { |
1791 | .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET, | 1791 | .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c index de832ebc93a9..51e5418899fb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c | |||
@@ -49,3 +49,7 @@ struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2 = { | |||
49 | .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT, | 49 | .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | struct omap_dss_dispc_dev_attr omap2_3_dss_dispc_dev_attr = { | ||
53 | .manager_count = 2, | ||
54 | .has_framedonetv_irq = 0 | ||
55 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h index 39a7c37f4587..ad5d8f04c0b8 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <plat/omap_hwmod.h> | 17 | #include <plat/omap_hwmod.h> |
18 | 18 | ||
19 | #include "display.h" | ||
20 | |||
19 | /* Common address space across OMAP2xxx */ | 21 | /* Common address space across OMAP2xxx */ |
20 | extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[]; | 22 | extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[]; |
21 | extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[]; | 23 | extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[]; |
@@ -111,4 +113,6 @@ extern struct omap_hwmod_class omap2xxx_dma_hwmod_class; | |||
111 | extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class; | 113 | extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class; |
112 | extern struct omap_hwmod_class omap2xxx_mcspi_class; | 114 | extern struct omap_hwmod_class omap2xxx_mcspi_class; |
113 | 115 | ||
116 | extern struct omap_dss_dispc_dev_attr omap2_3_dss_dispc_dev_attr; | ||
117 | |||
114 | #endif | 118 | #endif |
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c index 6a66aa5e2a5b..d15225ff5c49 100644 --- a/arch/arm/mach-omap2/omap_l3_noc.c +++ b/arch/arm/mach-omap2/omap_l3_noc.c | |||
@@ -237,7 +237,7 @@ static int __devexit omap4_l3_remove(struct platform_device *pdev) | |||
237 | static const struct of_device_id l3_noc_match[] = { | 237 | static const struct of_device_id l3_noc_match[] = { |
238 | {.compatible = "ti,omap4-l3-noc", }, | 238 | {.compatible = "ti,omap4-l3-noc", }, |
239 | {}, | 239 | {}, |
240 | } | 240 | }; |
241 | MODULE_DEVICE_TABLE(of, l3_noc_match); | 241 | MODULE_DEVICE_TABLE(of, l3_noc_match); |
242 | #else | 242 | #else |
243 | #define l3_noc_match NULL | 243 | #define l3_noc_match NULL |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 1e79bdf313e3..00bff46ca48b 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "powerdomain.h" | 24 | #include "powerdomain.h" |
25 | #include "clockdomain.h" | 25 | #include "clockdomain.h" |
26 | #include "pm.h" | 26 | #include "pm.h" |
27 | #include "twl-common.h" | ||
27 | 28 | ||
28 | static struct omap_device_pm_latency *pm_lats; | 29 | static struct omap_device_pm_latency *pm_lats; |
29 | 30 | ||
@@ -226,11 +227,8 @@ postcore_initcall(omap2_common_pm_init); | |||
226 | 227 | ||
227 | static int __init omap2_common_pm_late_init(void) | 228 | static int __init omap2_common_pm_late_init(void) |
228 | { | 229 | { |
229 | /* Init the OMAP TWL parameters */ | ||
230 | omap3_twl_init(); | ||
231 | omap4_twl_init(); | ||
232 | |||
233 | /* Init the voltage layer */ | 230 | /* Init the voltage layer */ |
231 | omap_pmic_late_init(); | ||
234 | omap_voltage_late_init(); | 232 | omap_voltage_late_init(); |
235 | 233 | ||
236 | /* Initialize the voltages */ | 234 | /* Initialize the voltages */ |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 6a4f6839a7d9..cf246b39bac7 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -139,7 +139,7 @@ static irqreturn_t sr_interrupt(int irq, void *data) | |||
139 | sr_write_reg(sr_info, ERRCONFIG_V1, status); | 139 | sr_write_reg(sr_info, ERRCONFIG_V1, status); |
140 | } else if (sr_info->ip_type == SR_TYPE_V2) { | 140 | } else if (sr_info->ip_type == SR_TYPE_V2) { |
141 | /* Read the status bits */ | 141 | /* Read the status bits */ |
142 | sr_read_reg(sr_info, IRQSTATUS); | 142 | status = sr_read_reg(sr_info, IRQSTATUS); |
143 | 143 | ||
144 | /* Clear them by writing back */ | 144 | /* Clear them by writing back */ |
145 | sr_write_reg(sr_info, IRQSTATUS, status); | 145 | sr_write_reg(sr_info, IRQSTATUS, status); |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 522435772168..10b20c652e5d 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <plat/usb.h> | 30 | #include <plat/usb.h> |
31 | 31 | ||
32 | #include "twl-common.h" | 32 | #include "twl-common.h" |
33 | #include "pm.h" | ||
33 | 34 | ||
34 | static struct i2c_board_info __initdata pmic_i2c_board_info = { | 35 | static struct i2c_board_info __initdata pmic_i2c_board_info = { |
35 | .addr = 0x48, | 36 | .addr = 0x48, |
@@ -48,6 +49,16 @@ void __init omap_pmic_init(int bus, u32 clkrate, | |||
48 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); | 49 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); |
49 | } | 50 | } |
50 | 51 | ||
52 | void __init omap_pmic_late_init(void) | ||
53 | { | ||
54 | /* Init the OMAP TWL parameters (if PMIC has been registerd) */ | ||
55 | if (!pmic_i2c_board_info.irq) | ||
56 | return; | ||
57 | |||
58 | omap3_twl_init(); | ||
59 | omap4_twl_init(); | ||
60 | } | ||
61 | |||
51 | #if defined(CONFIG_ARCH_OMAP3) | 62 | #if defined(CONFIG_ARCH_OMAP3) |
52 | static struct twl4030_usb_data omap3_usb_pdata = { | 63 | static struct twl4030_usb_data omap3_usb_pdata = { |
53 | .usb_mode = T2_USB_MODE_ULPI, | 64 | .usb_mode = T2_USB_MODE_ULPI, |
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h index 5e83a5bd37fb..275dde8cb27a 100644 --- a/arch/arm/mach-omap2/twl-common.h +++ b/arch/arm/mach-omap2/twl-common.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __OMAP_PMIC_COMMON__ | 1 | #ifndef __OMAP_PMIC_COMMON__ |
2 | #define __OMAP_PMIC_COMMON__ | 2 | #define __OMAP_PMIC_COMMON__ |
3 | 3 | ||
4 | #include <plat/irqs.h> | ||
5 | |||
4 | #define TWL_COMMON_PDATA_USB (1 << 0) | 6 | #define TWL_COMMON_PDATA_USB (1 << 0) |
5 | #define TWL_COMMON_PDATA_BCI (1 << 1) | 7 | #define TWL_COMMON_PDATA_BCI (1 << 1) |
6 | #define TWL_COMMON_PDATA_MADC (1 << 2) | 8 | #define TWL_COMMON_PDATA_MADC (1 << 2) |
@@ -30,6 +32,7 @@ struct twl4030_platform_data; | |||
30 | 32 | ||
31 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | 33 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, |
32 | struct twl4030_platform_data *pmic_data); | 34 | struct twl4030_platform_data *pmic_data); |
35 | void omap_pmic_late_init(void); | ||
33 | 36 | ||
34 | static inline void omap2_pmic_init(const char *pmic_type, | 37 | static inline void omap2_pmic_init(const char *pmic_type, |
35 | struct twl4030_platform_data *pmic_data) | 38 | struct twl4030_platform_data *pmic_data) |
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c index cb53160f6c5d..26ebb57719df 100644 --- a/arch/arm/mach-prima2/pm.c +++ b/arch/arm/mach-prima2/pm.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/suspend.h> | 10 | #include <linux/suspend.h> |
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/module.h> | ||
12 | #include <linux/of.h> | 13 | #include <linux/of.h> |
13 | #include <linux/of_address.h> | 14 | #include <linux/of_address.h> |
14 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c index ef555c041962..a12b689a8702 100644 --- a/arch/arm/mach-prima2/prima2.c +++ b/arch/arm/mach-prima2/prima2.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <asm/sizes.h> | ||
11 | #include <asm/mach-types.h> | 12 | #include <asm/mach-types.h> |
12 | #include <asm/mach/arch.h> | 13 | #include <asm/mach/arch.h> |
13 | #include <linux/of.h> | 14 | #include <linux/of.h> |
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index fc0b8544e174..4b81f59a4cba 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -307,7 +307,7 @@ static inline void balloon3_mmc_init(void) {} | |||
307 | /****************************************************************************** | 307 | /****************************************************************************** |
308 | * USB Gadget | 308 | * USB Gadget |
309 | ******************************************************************************/ | 309 | ******************************************************************************/ |
310 | #if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE) | 310 | #if defined(CONFIG_USB_PXA27X)||defined(CONFIG_USB_PXA27X_MODULE) |
311 | static void balloon3_udc_command(int cmd) | 311 | static void balloon3_udc_command(int cmd) |
312 | { | 312 | { |
313 | if (cmd == PXA2XX_UDC_CMD_CONNECT) | 313 | if (cmd == PXA2XX_UDC_CMD_CONNECT) |
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c index 692e1ffc5586..d23b92b80488 100644 --- a/arch/arm/mach-pxa/colibri-pxa320.c +++ b/arch/arm/mach-pxa/colibri-pxa320.c | |||
@@ -146,7 +146,7 @@ static void __init colibri_pxa320_init_eth(void) | |||
146 | static inline void __init colibri_pxa320_init_eth(void) {} | 146 | static inline void __init colibri_pxa320_init_eth(void) {} |
147 | #endif /* CONFIG_AX88796 */ | 147 | #endif /* CONFIG_AX88796 */ |
148 | 148 | ||
149 | #if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE) | 149 | #if defined(CONFIG_USB_PXA27X)||defined(CONFIG_USB_PXA27X_MODULE) |
150 | static struct gpio_vbus_mach_info colibri_pxa320_gpio_vbus_info = { | 150 | static struct gpio_vbus_mach_info colibri_pxa320_gpio_vbus_info = { |
151 | .gpio_vbus = mfp_to_gpio(MFP_PIN_GPIO96), | 151 | .gpio_vbus = mfp_to_gpio(MFP_PIN_GPIO96), |
152 | .gpio_pullup = -1, | 152 | .gpio_pullup = -1, |
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index 9c8208ca0415..ffdd70dad327 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c | |||
@@ -106,7 +106,7 @@ static void __init gumstix_mmc_init(void) | |||
106 | } | 106 | } |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | #ifdef CONFIG_USB_GADGET_PXA25X | 109 | #ifdef CONFIG_USB_PXA25X |
110 | static struct gpio_vbus_mach_info gumstix_udc_info = { | 110 | static struct gpio_vbus_mach_info gumstix_udc_info = { |
111 | .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn, | 111 | .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn, |
112 | .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx, | 112 | .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx, |
diff --git a/arch/arm/mach-pxa/include/mach/palm27x.h b/arch/arm/mach-pxa/include/mach/palm27x.h index f80bbe246afe..d4eac3d6ffb5 100644 --- a/arch/arm/mach-pxa/include/mach/palm27x.h +++ b/arch/arm/mach-pxa/include/mach/palm27x.h | |||
@@ -37,8 +37,8 @@ extern void __init palm27x_lcd_init(int power, | |||
37 | #define palm27x_lcd_init(power, mode) do {} while (0) | 37 | #define palm27x_lcd_init(power, mode) do {} while (0) |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CONFIG_USB_GADGET_PXA27X) || \ | 40 | #if defined(CONFIG_USB_PXA27X) || \ |
41 | defined(CONFIG_USB_GADGET_PXA27X_MODULE) | 41 | defined(CONFIG_USB_PXA27X_MODULE) |
42 | extern void __init palm27x_udc_init(int vbus, int pullup, | 42 | extern void __init palm27x_udc_init(int vbus, int pullup, |
43 | int vbus_inverted); | 43 | int vbus_inverted); |
44 | #else | 44 | #else |
diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c index 325c245c0a0d..fbc10d7b95d1 100644 --- a/arch/arm/mach-pxa/palm27x.c +++ b/arch/arm/mach-pxa/palm27x.c | |||
@@ -164,8 +164,8 @@ void __init palm27x_lcd_init(int power, struct pxafb_mode_info *mode) | |||
164 | /****************************************************************************** | 164 | /****************************************************************************** |
165 | * USB Gadget | 165 | * USB Gadget |
166 | ******************************************************************************/ | 166 | ******************************************************************************/ |
167 | #if defined(CONFIG_USB_GADGET_PXA27X) || \ | 167 | #if defined(CONFIG_USB_PXA27X) || \ |
168 | defined(CONFIG_USB_GADGET_PXA27X_MODULE) | 168 | defined(CONFIG_USB_PXA27X_MODULE) |
169 | static struct gpio_vbus_mach_info palm27x_udc_info = { | 169 | static struct gpio_vbus_mach_info palm27x_udc_info = { |
170 | .gpio_vbus_inverted = 1, | 170 | .gpio_vbus_inverted = 1, |
171 | }; | 171 | }; |
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index 6ec7caefb37c..2c24c67fd92b 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
@@ -338,7 +338,7 @@ static inline void palmtc_mkp_init(void) {} | |||
338 | /****************************************************************************** | 338 | /****************************************************************************** |
339 | * UDC | 339 | * UDC |
340 | ******************************************************************************/ | 340 | ******************************************************************************/ |
341 | #if defined(CONFIG_USB_GADGET_PXA25X)||defined(CONFIG_USB_GADGET_PXA25X_MODULE) | 341 | #if defined(CONFIG_USB_PXA25X)||defined(CONFIG_USB_PXA25X_MODULE) |
342 | static struct gpio_vbus_mach_info palmtc_udc_info = { | 342 | static struct gpio_vbus_mach_info palmtc_udc_info = { |
343 | .gpio_vbus = GPIO_NR_PALMTC_USB_DETECT_N, | 343 | .gpio_vbus = GPIO_NR_PALMTC_USB_DETECT_N, |
344 | .gpio_vbus_inverted = 1, | 344 | .gpio_vbus_inverted = 1, |
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index a7539a6ed1ff..ca0c6615028c 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
@@ -343,7 +343,7 @@ static inline void vpac270_uhc_init(void) {} | |||
343 | /****************************************************************************** | 343 | /****************************************************************************** |
344 | * USB Gadget | 344 | * USB Gadget |
345 | ******************************************************************************/ | 345 | ******************************************************************************/ |
346 | #if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE) | 346 | #if defined(CONFIG_USB_PXA27X)||defined(CONFIG_USB_PXA27X_MODULE) |
347 | static struct gpio_vbus_mach_info vpac270_gpio_vbus_info = { | 347 | static struct gpio_vbus_mach_info vpac270_gpio_vbus_info = { |
348 | .gpio_vbus = GPIO41_VPAC270_UDC_DETECT, | 348 | .gpio_vbus = GPIO41_VPAC270_UDC_DETECT, |
349 | .gpio_pullup = -1, | 349 | .gpio_pullup = -1, |
diff --git a/arch/arm/mach-s3c64xx/dev-spi.c b/arch/arm/mach-s3c64xx/dev-spi.c index 5e6b42089eb4..3341fd118723 100644 --- a/arch/arm/mach-s3c64xx/dev-spi.c +++ b/arch/arm/mach-s3c64xx/dev-spi.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/export.h> | ||
13 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
15 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index 66668565ee75..f208154b1382 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/export.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | 14 | ||
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c index 7a3bc32df425..51c00f2453c6 100644 --- a/arch/arm/mach-s3c64xx/s3c6400.c +++ b/arch/arm/mach-s3c64xx/s3c6400.c | |||
@@ -70,7 +70,7 @@ void __init s3c6400_init_irq(void) | |||
70 | s3c64xx_init_irq(~0 & ~(0xf << 5), ~0); | 70 | s3c64xx_init_irq(~0 & ~(0xf << 5), ~0); |
71 | } | 71 | } |
72 | 72 | ||
73 | struct sysdev_class s3c6400_sysclass = { | 73 | static struct sysdev_class s3c6400_sysclass = { |
74 | .name = "s3c6400-core", | 74 | .name = "s3c6400-core", |
75 | }; | 75 | }; |
76 | 76 | ||
diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c index 83d2afb79e9f..2cf80026c58d 100644 --- a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c +++ b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <plat/fb.h> | 20 | #include <plat/fb.h> |
21 | #include <plat/gpio-cfg.h> | 21 | #include <plat/gpio-cfg.h> |
22 | 22 | ||
23 | extern void s3c64xx_fb_gpio_setup_24bpp(void) | 23 | void s3c64xx_fb_gpio_setup_24bpp(void) |
24 | { | 24 | { |
25 | s3c_gpio_cfgrange_nopull(S3C64XX_GPI(0), 16, S3C_GPIO_SFN(2)); | 25 | s3c_gpio_cfgrange_nopull(S3C64XX_GPI(0), 16, S3C_GPIO_SFN(2)); |
26 | s3c_gpio_cfgrange_nopull(S3C64XX_GPJ(0), 12, S3C_GPIO_SFN(2)); | 26 | s3c_gpio_cfgrange_nopull(S3C64XX_GPJ(0), 12, S3C_GPIO_SFN(2)); |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index a9106c392398..8662ef6e5681 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -273,6 +273,7 @@ static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = { | |||
273 | 273 | ||
274 | static struct platform_pwm_backlight_data smdkv210_bl_data = { | 274 | static struct platform_pwm_backlight_data smdkv210_bl_data = { |
275 | .pwm_id = 3, | 275 | .pwm_id = 3, |
276 | .pwm_period_ns = 1000, | ||
276 | }; | 277 | }; |
277 | 278 | ||
278 | static void __init smdkv210_map_io(void) | 279 | static void __init smdkv210_map_io(void) |
diff --git a/arch/arm/mach-sa1100/Makefile.boot b/arch/arm/mach-sa1100/Makefile.boot index 5a616f6e5612..f7951aa04562 100644 --- a/arch/arm/mach-sa1100/Makefile.boot +++ b/arch/arm/mach-sa1100/Makefile.boot | |||
@@ -1,5 +1,5 @@ | |||
1 | ifeq ($(CONFIG_ARCH_SA1100),y) | 1 | ifeq ($(CONFIG_SA1111),y) |
2 | zreladdr-$(CONFIG_SA1111) += 0xc0208000 | 2 | zreladdr-y += 0xc0208000 |
3 | else | 3 | else |
4 | zreladdr-y += 0xc0008000 | 4 | zreladdr-y += 0xc0008000 |
5 | endif | 5 | endif |
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 0a5b22942fd3..34bbcbfb1706 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/bitrev.h> | 22 | #include <linux/bitrev.h> |
23 | #include <linux/console.h> | ||
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <asm/tlbflush.h> | 26 | #include <asm/tlbflush.h> |
@@ -106,9 +107,8 @@ static int pd_power_down(struct generic_pm_domain *genpd) | |||
106 | return 0; | 107 | return 0; |
107 | } | 108 | } |
108 | 109 | ||
109 | static int pd_power_up(struct generic_pm_domain *genpd) | 110 | static int __pd_power_up(struct sh7372_pm_domain *sh7372_pd, bool do_resume) |
110 | { | 111 | { |
111 | struct sh7372_pm_domain *sh7372_pd = to_sh7372_pd(genpd); | ||
112 | unsigned int mask = 1 << sh7372_pd->bit_shift; | 112 | unsigned int mask = 1 << sh7372_pd->bit_shift; |
113 | unsigned int retry_count; | 113 | unsigned int retry_count; |
114 | int ret = 0; | 114 | int ret = 0; |
@@ -123,13 +123,13 @@ static int pd_power_up(struct generic_pm_domain *genpd) | |||
123 | 123 | ||
124 | for (retry_count = 2 * PSTR_RETRIES; retry_count; retry_count--) { | 124 | for (retry_count = 2 * PSTR_RETRIES; retry_count; retry_count--) { |
125 | if (!(__raw_readl(SWUCR) & mask)) | 125 | if (!(__raw_readl(SWUCR) & mask)) |
126 | goto out; | 126 | break; |
127 | if (retry_count > PSTR_RETRIES) | 127 | if (retry_count > PSTR_RETRIES) |
128 | udelay(PSTR_DELAY_US); | 128 | udelay(PSTR_DELAY_US); |
129 | else | 129 | else |
130 | cpu_relax(); | 130 | cpu_relax(); |
131 | } | 131 | } |
132 | if (__raw_readl(SWUCR) & mask) | 132 | if (!retry_count) |
133 | ret = -EIO; | 133 | ret = -EIO; |
134 | 134 | ||
135 | if (!sh7372_pd->no_debug) | 135 | if (!sh7372_pd->no_debug) |
@@ -137,12 +137,17 @@ static int pd_power_up(struct generic_pm_domain *genpd) | |||
137 | mask, __raw_readl(PSTR)); | 137 | mask, __raw_readl(PSTR)); |
138 | 138 | ||
139 | out: | 139 | out: |
140 | if (ret == 0 && sh7372_pd->resume) | 140 | if (ret == 0 && sh7372_pd->resume && do_resume) |
141 | sh7372_pd->resume(); | 141 | sh7372_pd->resume(); |
142 | 142 | ||
143 | return ret; | 143 | return ret; |
144 | } | 144 | } |
145 | 145 | ||
146 | static int pd_power_up(struct generic_pm_domain *genpd) | ||
147 | { | ||
148 | return __pd_power_up(to_sh7372_pd(genpd), true); | ||
149 | } | ||
150 | |||
146 | static void sh7372_a4r_suspend(void) | 151 | static void sh7372_a4r_suspend(void) |
147 | { | 152 | { |
148 | sh7372_intcs_suspend(); | 153 | sh7372_intcs_suspend(); |
@@ -174,7 +179,7 @@ void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) | |||
174 | genpd->active_wakeup = pd_active_wakeup; | 179 | genpd->active_wakeup = pd_active_wakeup; |
175 | genpd->power_off = pd_power_down; | 180 | genpd->power_off = pd_power_down; |
176 | genpd->power_on = pd_power_up; | 181 | genpd->power_on = pd_power_up; |
177 | genpd->power_on(&sh7372_pd->genpd); | 182 | __pd_power_up(sh7372_pd, false); |
178 | } | 183 | } |
179 | 184 | ||
180 | void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, | 185 | void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, |
@@ -227,11 +232,23 @@ struct sh7372_pm_domain sh7372_a3sp = { | |||
227 | .no_debug = true, | 232 | .no_debug = true, |
228 | }; | 233 | }; |
229 | 234 | ||
235 | static void sh7372_a3sp_init(void) | ||
236 | { | ||
237 | /* serial consoles make use of SCIF hardware located in A3SP, | ||
238 | * keep such power domain on if "no_console_suspend" is set. | ||
239 | */ | ||
240 | sh7372_a3sp.stay_on = !console_suspend_enabled; | ||
241 | } | ||
242 | |||
230 | struct sh7372_pm_domain sh7372_a3sg = { | 243 | struct sh7372_pm_domain sh7372_a3sg = { |
231 | .bit_shift = 13, | 244 | .bit_shift = 13, |
232 | }; | 245 | }; |
233 | 246 | ||
234 | #endif /* CONFIG_PM */ | 247 | #else /* !CONFIG_PM */ |
248 | |||
249 | static inline void sh7372_a3sp_init(void) {} | ||
250 | |||
251 | #endif /* !CONFIG_PM */ | ||
235 | 252 | ||
236 | #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) | 253 | #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) |
237 | static int sh7372_do_idle_core_standby(unsigned long unused) | 254 | static int sh7372_do_idle_core_standby(unsigned long unused) |
@@ -465,6 +482,8 @@ void __init sh7372_pm_init(void) | |||
465 | /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */ | 482 | /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */ |
466 | __raw_writel(0, PDNSEL); | 483 | __raw_writel(0, PDNSEL); |
467 | 484 | ||
485 | sh7372_a3sp_init(); | ||
486 | |||
468 | sh7372_suspend_init(); | 487 | sh7372_suspend_init(); |
469 | sh7372_cpuidle_init(); | 488 | sh7372_cpuidle_init(); |
470 | } | 489 | } |
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index 7a1fa6adb7c3..5b0c38abacc1 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c | |||
@@ -422,7 +422,7 @@ struct platform_device nuc900_device_kpi = { | |||
422 | 422 | ||
423 | /* LCD controller*/ | 423 | /* LCD controller*/ |
424 | 424 | ||
425 | static struct nuc900fb_display __initdata nuc900_lcd_info[] = { | 425 | static struct nuc900fb_display nuc900_lcd_info[] = { |
426 | /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */ | 426 | /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */ |
427 | [0] = { | 427 | [0] = { |
428 | .type = LCM_DCCS_VA_SRC_RGB565, | 428 | .type = LCM_DCCS_VA_SRC_RGB565, |
@@ -445,7 +445,7 @@ static struct nuc900fb_display __initdata nuc900_lcd_info[] = { | |||
445 | }, | 445 | }, |
446 | }; | 446 | }; |
447 | 447 | ||
448 | static struct nuc900fb_mach_info nuc900_fb_info __initdata = { | 448 | static struct nuc900fb_mach_info nuc900_fb_info = { |
449 | #if defined(CONFIG_GPM1040A0_320X240) | 449 | #if defined(CONFIG_GPM1040A0_320X240) |
450 | .displays = &nuc900_lcd_info[0], | 450 | .displays = &nuc900_lcd_info[0], |
451 | #else | 451 | #else |
diff --git a/arch/arm/mach-w90x900/include/mach/mfp.h b/arch/arm/mach-w90x900/include/mach/mfp.h index 94c0e71617c6..23ef1f573abd 100644 --- a/arch/arm/mach-w90x900/include/mach/mfp.h +++ b/arch/arm/mach-w90x900/include/mach/mfp.h | |||
@@ -19,6 +19,7 @@ | |||
19 | extern void mfp_set_groupf(struct device *dev); | 19 | extern void mfp_set_groupf(struct device *dev); |
20 | extern void mfp_set_groupc(struct device *dev); | 20 | extern void mfp_set_groupc(struct device *dev); |
21 | extern void mfp_set_groupi(struct device *dev); | 21 | extern void mfp_set_groupi(struct device *dev); |
22 | extern void mfp_set_groupg(struct device *dev); | 22 | extern void mfp_set_groupg(struct device *dev, const char *subname); |
23 | extern void mfp_set_groupd(struct device *dev, const char *subname); | ||
23 | 24 | ||
24 | #endif /* __ASM_ARCH_MFP_H */ | 25 | #endif /* __ASM_ARCH_MFP_H */ |
diff --git a/arch/arm/mach-w90x900/include/mach/nuc900_spi.h b/arch/arm/mach-w90x900/include/mach/nuc900_spi.h index bd94819e314f..2c4e0c128501 100644 --- a/arch/arm/mach-w90x900/include/mach/nuc900_spi.h +++ b/arch/arm/mach-w90x900/include/mach/nuc900_spi.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #ifndef __ASM_ARCH_SPI_H | 14 | #ifndef __ASM_ARCH_SPI_H |
15 | #define __ASM_ARCH_SPI_H | 15 | #define __ASM_ARCH_SPI_H |
16 | 16 | ||
17 | extern void mfp_set_groupg(struct device *dev); | 17 | extern void mfp_set_groupg(struct device *dev, const char *subname); |
18 | 18 | ||
19 | struct nuc900_spi_info { | 19 | struct nuc900_spi_info { |
20 | unsigned int num_cs; | 20 | unsigned int num_cs; |
diff --git a/arch/arm/mach-w90x900/mfp.c b/arch/arm/mach-w90x900/mfp.c index fb7fb627b1a5..9dd74612bb87 100644 --- a/arch/arm/mach-w90x900/mfp.c +++ b/arch/arm/mach-w90x900/mfp.c | |||
@@ -26,10 +26,8 @@ | |||
26 | #define REG_MFSEL (W90X900_VA_GCR + 0xC) | 26 | #define REG_MFSEL (W90X900_VA_GCR + 0xC) |
27 | 27 | ||
28 | #define GPSELF (0x01 << 1) | 28 | #define GPSELF (0x01 << 1) |
29 | |||
30 | #define GPSELC (0x03 << 2) | 29 | #define GPSELC (0x03 << 2) |
31 | #define ENKPI (0x02 << 2) | 30 | #define GPSELD (0x0f << 4) |
32 | #define ENNAND (0x01 << 2) | ||
33 | 31 | ||
34 | #define GPSELEI0 (0x01 << 26) | 32 | #define GPSELEI0 (0x01 << 26) |
35 | #define GPSELEI1 (0x01 << 27) | 33 | #define GPSELEI1 (0x01 << 27) |
@@ -37,11 +35,16 @@ | |||
37 | #define GPIOG0TO1 (0x03 << 14) | 35 | #define GPIOG0TO1 (0x03 << 14) |
38 | #define GPIOG2TO3 (0x03 << 16) | 36 | #define GPIOG2TO3 (0x03 << 16) |
39 | #define GPIOG22TO23 (0x03 << 22) | 37 | #define GPIOG22TO23 (0x03 << 22) |
38 | #define GPIOG18TO20 (0x07 << 18) | ||
40 | 39 | ||
41 | #define ENSPI (0x0a << 14) | 40 | #define ENSPI (0x0a << 14) |
42 | #define ENI2C0 (0x01 << 14) | 41 | #define ENI2C0 (0x01 << 14) |
43 | #define ENI2C1 (0x01 << 16) | 42 | #define ENI2C1 (0x01 << 16) |
44 | #define ENAC97 (0x02 << 22) | 43 | #define ENAC97 (0x02 << 22) |
44 | #define ENSD1 (0x02 << 18) | ||
45 | #define ENSD0 (0x0a << 4) | ||
46 | #define ENKPI (0x02 << 2) | ||
47 | #define ENNAND (0x01 << 2) | ||
45 | 48 | ||
46 | static DEFINE_MUTEX(mfp_mutex); | 49 | static DEFINE_MUTEX(mfp_mutex); |
47 | 50 | ||
@@ -127,16 +130,19 @@ void mfp_set_groupi(struct device *dev) | |||
127 | } | 130 | } |
128 | EXPORT_SYMBOL(mfp_set_groupi); | 131 | EXPORT_SYMBOL(mfp_set_groupi); |
129 | 132 | ||
130 | void mfp_set_groupg(struct device *dev) | 133 | void mfp_set_groupg(struct device *dev, const char *subname) |
131 | { | 134 | { |
132 | unsigned long mfpen; | 135 | unsigned long mfpen; |
133 | const char *dev_id; | 136 | const char *dev_id; |
134 | 137 | ||
135 | BUG_ON(!dev); | 138 | BUG_ON((!dev) && (!subname)); |
136 | 139 | ||
137 | mutex_lock(&mfp_mutex); | 140 | mutex_lock(&mfp_mutex); |
138 | 141 | ||
139 | dev_id = dev_name(dev); | 142 | if (subname != NULL) |
143 | dev_id = subname; | ||
144 | else | ||
145 | dev_id = dev_name(dev); | ||
140 | 146 | ||
141 | mfpen = __raw_readl(REG_MFSEL); | 147 | mfpen = __raw_readl(REG_MFSEL); |
142 | 148 | ||
@@ -152,6 +158,9 @@ void mfp_set_groupg(struct device *dev) | |||
152 | } else if (strcmp(dev_id, "nuc900-audio") == 0) { | 158 | } else if (strcmp(dev_id, "nuc900-audio") == 0) { |
153 | mfpen &= ~(GPIOG22TO23); | 159 | mfpen &= ~(GPIOG22TO23); |
154 | mfpen |= ENAC97;/*enable AC97*/ | 160 | mfpen |= ENAC97;/*enable AC97*/ |
161 | } else if (strcmp(dev_id, "nuc900-mmc-port1") == 0) { | ||
162 | mfpen &= ~(GPIOG18TO20); | ||
163 | mfpen |= (ENSD1 | 0x01);/*enable sd1*/ | ||
155 | } else { | 164 | } else { |
156 | mfpen &= ~(GPIOG0TO1 | GPIOG2TO3);/*GPIOG[3:0]*/ | 165 | mfpen &= ~(GPIOG0TO1 | GPIOG2TO3);/*GPIOG[3:0]*/ |
157 | } | 166 | } |
@@ -162,3 +171,30 @@ void mfp_set_groupg(struct device *dev) | |||
162 | } | 171 | } |
163 | EXPORT_SYMBOL(mfp_set_groupg); | 172 | EXPORT_SYMBOL(mfp_set_groupg); |
164 | 173 | ||
174 | void mfp_set_groupd(struct device *dev, const char *subname) | ||
175 | { | ||
176 | unsigned long mfpen; | ||
177 | const char *dev_id; | ||
178 | |||
179 | BUG_ON((!dev) && (!subname)); | ||
180 | |||
181 | mutex_lock(&mfp_mutex); | ||
182 | |||
183 | if (subname != NULL) | ||
184 | dev_id = subname; | ||
185 | else | ||
186 | dev_id = dev_name(dev); | ||
187 | |||
188 | mfpen = __raw_readl(REG_MFSEL); | ||
189 | |||
190 | if (strcmp(dev_id, "nuc900-mmc-port0") == 0) { | ||
191 | mfpen &= ~GPSELD;/*enable sd0*/ | ||
192 | mfpen |= ENSD0; | ||
193 | } else | ||
194 | mfpen &= (~GPSELD); | ||
195 | |||
196 | __raw_writel(mfpen, REG_MFSEL); | ||
197 | |||
198 | mutex_unlock(&mfp_mutex); | ||
199 | } | ||
200 | EXPORT_SYMBOL(mfp_set_groupd); | ||
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 8ac9e9f84790..b1e192ba8c24 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -61,7 +61,7 @@ static inline void cache_sync(void) | |||
61 | { | 61 | { |
62 | void __iomem *base = l2x0_base; | 62 | void __iomem *base = l2x0_base; |
63 | 63 | ||
64 | #ifdef CONFIG_ARM_ERRATA_753970 | 64 | #ifdef CONFIG_PL310_ERRATA_753970 |
65 | /* write to an unmmapped register */ | 65 | /* write to an unmmapped register */ |
66 | writel_relaxed(0, base + L2X0_DUMMY_REG); | 66 | writel_relaxed(0, base + L2X0_DUMMY_REG); |
67 | #else | 67 | #else |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index e4e7f6cba1ab..1aa664a1999f 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -168,7 +168,7 @@ static int __init consistent_init(void) | |||
168 | pte_t *pte; | 168 | pte_t *pte; |
169 | int i = 0; | 169 | int i = 0; |
170 | unsigned long base = consistent_base; | 170 | unsigned long base = consistent_base; |
171 | unsigned long num_ptes = (CONSISTENT_END - base) >> PGDIR_SHIFT; | 171 | unsigned long num_ptes = (CONSISTENT_END - base) >> PMD_SHIFT; |
172 | 172 | ||
173 | consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL); | 173 | consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL); |
174 | if (!consistent_pte) { | 174 | if (!consistent_pte) { |
@@ -332,6 +332,15 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, | |||
332 | struct page *page; | 332 | struct page *page; |
333 | void *addr; | 333 | void *addr; |
334 | 334 | ||
335 | /* | ||
336 | * Following is a work-around (a.k.a. hack) to prevent pages | ||
337 | * with __GFP_COMP being passed to split_page() which cannot | ||
338 | * handle them. The real problem is that this flag probably | ||
339 | * should be 0 on ARM as it is not supported on this | ||
340 | * platform; see CONFIG_HUGETLBFS. | ||
341 | */ | ||
342 | gfp &= ~(__GFP_COMP); | ||
343 | |||
335 | *handle = ~0; | 344 | *handle = ~0; |
336 | size = PAGE_ALIGN(size); | 345 | size = PAGE_ALIGN(size); |
337 | 346 | ||
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 74be05f3e03a..44b628e4d6ea 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -9,8 +9,7 @@ | |||
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/personality.h> | 10 | #include <linux/personality.h> |
11 | #include <linux/random.h> | 11 | #include <linux/random.h> |
12 | #include <asm/cputype.h> | 12 | #include <asm/cachetype.h> |
13 | #include <asm/system.h> | ||
14 | 13 | ||
15 | #define COLOUR_ALIGN(addr,pgoff) \ | 14 | #define COLOUR_ALIGN(addr,pgoff) \ |
16 | ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ | 15 | ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ |
@@ -32,25 +31,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
32 | struct mm_struct *mm = current->mm; | 31 | struct mm_struct *mm = current->mm; |
33 | struct vm_area_struct *vma; | 32 | struct vm_area_struct *vma; |
34 | unsigned long start_addr; | 33 | unsigned long start_addr; |
35 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 34 | int do_align = 0; |
36 | unsigned int cache_type; | 35 | int aliasing = cache_is_vipt_aliasing(); |
37 | int do_align = 0, aliasing = 0; | ||
38 | 36 | ||
39 | /* | 37 | /* |
40 | * We only need to do colour alignment if either the I or D | 38 | * We only need to do colour alignment if either the I or D |
41 | * caches alias. This is indicated by bits 9 and 21 of the | 39 | * caches alias. |
42 | * cache type register. | ||
43 | */ | 40 | */ |
44 | cache_type = read_cpuid_cachetype(); | 41 | if (aliasing) |
45 | if (cache_type != read_cpuid_id()) { | 42 | do_align = filp || (flags & MAP_SHARED); |
46 | aliasing = (cache_type | cache_type >> 12) & (1 << 11); | ||
47 | if (aliasing) | ||
48 | do_align = filp || flags & MAP_SHARED; | ||
49 | } | ||
50 | #else | ||
51 | #define do_align 0 | ||
52 | #define aliasing 0 | ||
53 | #endif | ||
54 | 43 | ||
55 | /* | 44 | /* |
56 | * We enforce the MAP_FIXED case. | 45 | * We enforce the MAP_FIXED case. |
diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index 74aac96cda20..adbff706ef6f 100644 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * the CPU clock speed on the fly. | 17 | * the CPU clock speed on the fly. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/module.h> | ||
20 | #include <linux/cpufreq.h> | 21 | #include <linux/cpufreq.h> |
21 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
22 | #include <linux/err.h> | 23 | #include <linux/err.h> |
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 83b745a5e1b7..c75f254abd85 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -85,7 +85,6 @@ enum mxc_cpu_pwr_mode { | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode); | 87 | extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode); |
88 | extern void (*imx_idle)(void); | ||
89 | extern void imx_print_silicon_rev(const char *cpu, int srev); | 88 | extern void imx_print_silicon_rev(const char *cpu, int srev); |
90 | 89 | ||
91 | void avic_handle_irq(struct pt_regs *); | 90 | void avic_handle_irq(struct pt_regs *); |
@@ -133,4 +132,5 @@ extern void imx53_qsb_common_init(void); | |||
133 | extern void imx53_smd_common_init(void); | 132 | extern void imx53_smd_common_init(void); |
134 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | 133 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); |
135 | extern void imx6q_pm_init(void); | 134 | extern void imx6q_pm_init(void); |
135 | extern void imx6q_clock_map_io(void); | ||
136 | #endif | 136 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 00a78193c681..a4d36d601d55 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h | |||
@@ -50,20 +50,6 @@ | |||
50 | #define IMX_CHIP_REVISION_3_3 0x33 | 50 | #define IMX_CHIP_REVISION_3_3 0x33 |
51 | #define IMX_CHIP_REVISION_UNKNOWN 0xff | 51 | #define IMX_CHIP_REVISION_UNKNOWN 0xff |
52 | 52 | ||
53 | #define IMX_CHIP_REVISION_1_0_STRING "1.0" | ||
54 | #define IMX_CHIP_REVISION_1_1_STRING "1.1" | ||
55 | #define IMX_CHIP_REVISION_1_2_STRING "1.2" | ||
56 | #define IMX_CHIP_REVISION_1_3_STRING "1.3" | ||
57 | #define IMX_CHIP_REVISION_2_0_STRING "2.0" | ||
58 | #define IMX_CHIP_REVISION_2_1_STRING "2.1" | ||
59 | #define IMX_CHIP_REVISION_2_2_STRING "2.2" | ||
60 | #define IMX_CHIP_REVISION_2_3_STRING "2.3" | ||
61 | #define IMX_CHIP_REVISION_3_0_STRING "3.0" | ||
62 | #define IMX_CHIP_REVISION_3_1_STRING "3.1" | ||
63 | #define IMX_CHIP_REVISION_3_2_STRING "3.2" | ||
64 | #define IMX_CHIP_REVISION_3_3_STRING "3.3" | ||
65 | #define IMX_CHIP_REVISION_UNKNOWN_STRING "unknown" | ||
66 | |||
67 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
68 | extern unsigned int __mxc_cpu_type; | 54 | extern unsigned int __mxc_cpu_type; |
69 | #endif | 55 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h index cf88b3593fba..b9895d250167 100644 --- a/arch/arm/plat-mxc/include/mach/system.h +++ b/arch/arm/plat-mxc/include/mach/system.h | |||
@@ -17,14 +17,9 @@ | |||
17 | #ifndef __ASM_ARCH_MXC_SYSTEM_H__ | 17 | #ifndef __ASM_ARCH_MXC_SYSTEM_H__ |
18 | #define __ASM_ARCH_MXC_SYSTEM_H__ | 18 | #define __ASM_ARCH_MXC_SYSTEM_H__ |
19 | 19 | ||
20 | extern void (*imx_idle)(void); | ||
21 | |||
22 | static inline void arch_idle(void) | 20 | static inline void arch_idle(void) |
23 | { | 21 | { |
24 | if (imx_idle != NULL) | 22 | cpu_do_idle(); |
25 | (imx_idle)(); | ||
26 | else | ||
27 | cpu_do_idle(); | ||
28 | } | 23 | } |
29 | 24 | ||
30 | void arch_reset(char mode, const char *cmd); | 25 | void arch_reset(char mode, const char *cmd); |
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 42d74ea59084..845de59f07ed 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -32,6 +32,9 @@ | |||
32 | #define MX3_PWMSAR 0x0C /* PWM Sample Register */ | 32 | #define MX3_PWMSAR 0x0C /* PWM Sample Register */ |
33 | #define MX3_PWMPR 0x10 /* PWM Period Register */ | 33 | #define MX3_PWMPR 0x10 /* PWM Period Register */ |
34 | #define MX3_PWMCR_PRESCALER(x) (((x - 1) & 0xFFF) << 4) | 34 | #define MX3_PWMCR_PRESCALER(x) (((x - 1) & 0xFFF) << 4) |
35 | #define MX3_PWMCR_DOZEEN (1 << 24) | ||
36 | #define MX3_PWMCR_WAITEN (1 << 23) | ||
37 | #define MX3_PWMCR_DBGEN (1 << 22) | ||
35 | #define MX3_PWMCR_CLKSRC_IPG_HIGH (2 << 16) | 38 | #define MX3_PWMCR_CLKSRC_IPG_HIGH (2 << 16) |
36 | #define MX3_PWMCR_CLKSRC_IPG (1 << 16) | 39 | #define MX3_PWMCR_CLKSRC_IPG (1 << 16) |
37 | #define MX3_PWMCR_EN (1 << 0) | 40 | #define MX3_PWMCR_EN (1 << 0) |
@@ -77,7 +80,9 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) | |||
77 | writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); | 80 | writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); |
78 | writel(period_cycles, pwm->mmio_base + MX3_PWMPR); | 81 | writel(period_cycles, pwm->mmio_base + MX3_PWMPR); |
79 | 82 | ||
80 | cr = MX3_PWMCR_PRESCALER(prescale) | MX3_PWMCR_EN; | 83 | cr = MX3_PWMCR_PRESCALER(prescale) | |
84 | MX3_PWMCR_DOZEEN | MX3_PWMCR_WAITEN | | ||
85 | MX3_PWMCR_DBGEN | MX3_PWMCR_EN; | ||
81 | 86 | ||
82 | if (cpu_is_mx25()) | 87 | if (cpu_is_mx25()) |
83 | cr |= MX3_PWMCR_CLKSRC_IPG; | 88 | cr |= MX3_PWMCR_CLKSRC_IPG; |
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c index 9dad8dcc2ea9..d65fb31a55ca 100644 --- a/arch/arm/plat-mxc/system.c +++ b/arch/arm/plat-mxc/system.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/module.h> | ||
24 | 25 | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <mach/common.h> | 27 | #include <mach/common.h> |
@@ -28,8 +29,8 @@ | |||
28 | #include <asm/system.h> | 29 | #include <asm/system.h> |
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | 31 | ||
31 | void (*imx_idle)(void) = NULL; | ||
32 | void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int) = NULL; | 32 | void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int) = NULL; |
33 | EXPORT_SYMBOL_GPL(imx_ioremap); | ||
33 | 34 | ||
34 | static void __iomem *wdog_base; | 35 | static void __iomem *wdog_base; |
35 | 36 | ||
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 197ca03c3f7d..eb73ab40e955 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -165,8 +165,8 @@ struct dpll_data { | |||
165 | u8 auto_recal_bit; | 165 | u8 auto_recal_bit; |
166 | u8 recal_en_bit; | 166 | u8 recal_en_bit; |
167 | u8 recal_st_bit; | 167 | u8 recal_st_bit; |
168 | u8 flags; | ||
169 | # endif | 168 | # endif |
169 | u8 flags; | ||
170 | }; | 170 | }; |
171 | 171 | ||
172 | #endif | 172 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index c50df4814f6f..3ff3e36580f2 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | 31 | ||
32 | #include <plat/i2c.h> | 32 | #include <plat/i2c.h> |
33 | #include <plat/omap_hwmod.h> | ||
33 | 34 | ||
34 | struct sys_timer; | 35 | struct sys_timer; |
35 | 36 | ||
@@ -55,6 +56,8 @@ void am35xx_init_early(void); | |||
55 | void ti816x_init_early(void); | 56 | void ti816x_init_early(void); |
56 | void omap4430_init_early(void); | 57 | void omap4430_init_early(void); |
57 | 58 | ||
59 | extern int omap_dss_reset(struct omap_hwmod *); | ||
60 | |||
58 | void omap_sram_init(void); | 61 | void omap_sram_init(void); |
59 | 62 | ||
60 | /* | 63 | /* |
diff --git a/arch/arm/plat-s3c24xx/cpu-freq-debugfs.c b/arch/arm/plat-s3c24xx/cpu-freq-debugfs.c index a9276667c2fb..c7adad0e8de0 100644 --- a/arch/arm/plat-s3c24xx/cpu-freq-debugfs.c +++ b/arch/arm/plat-s3c24xx/cpu-freq-debugfs.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/module.h> | 15 | #include <linux/export.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
diff --git a/arch/arm/plat-s5p/sysmmu.c b/arch/arm/plat-s5p/sysmmu.c index e1cbc728c775..c8bec9c7655d 100644 --- a/arch/arm/plat-s5p/sysmmu.c +++ b/arch/arm/plat-s5p/sysmmu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/export.h> | ||
14 | 15 | ||
15 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
16 | 17 | ||
diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c index e657305644cc..a976c023b286 100644 --- a/arch/arm/plat-samsung/dev-backlight.c +++ b/arch/arm/plat-samsung/dev-backlight.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/pwm_backlight.h> | 17 | #include <linux/pwm_backlight.h> |
18 | #include <linux/slab.h> | ||
19 | 18 | ||
20 | #include <plat/devs.h> | 19 | #include <plat/devs.h> |
21 | #include <plat/gpio-cfg.h> | 20 | #include <plat/gpio-cfg.h> |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index d48245bb02b3..df8155b9d4d1 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #ifndef __PLAT_GPIO_CFG_H | 24 | #ifndef __PLAT_GPIO_CFG_H |
25 | #define __PLAT_GPIO_CFG_H __FILE__ | 25 | #define __PLAT_GPIO_CFG_H __FILE__ |
26 | 26 | ||
27 | #include<linux/types.h> | ||
28 | |||
27 | typedef unsigned int __bitwise__ samsung_gpio_pull_t; | 29 | typedef unsigned int __bitwise__ samsung_gpio_pull_t; |
28 | typedef unsigned int __bitwise__ s5p_gpio_drvstr_t; | 30 | typedef unsigned int __bitwise__ s5p_gpio_drvstr_t; |
29 | 31 | ||
diff --git a/arch/arm/plat-samsung/pd.c b/arch/arm/plat-samsung/pd.c index efe1d564473e..312b510d86b7 100644 --- a/arch/arm/plat-samsung/pd.c +++ b/arch/arm/plat-samsung/pd.c | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/module.h> | 14 | #include <linux/export.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/pm_runtime.h> | 17 | #include <linux/pm_runtime.h> |
diff --git a/arch/arm/plat-samsung/pwm.c b/arch/arm/plat-samsung/pwm.c index dc1185dcf80d..c559d8438c70 100644 --- a/arch/arm/plat-samsung/pwm.c +++ b/arch/arm/plat-samsung/pwm.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * the Free Software Foundation; either version 2 of the License. | 11 | * the Free Software Foundation; either version 2 of the License. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/export.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 5bdeef969847..ccbe16f47227 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -1123,5 +1123,6 @@ blissc MACH_BLISSC BLISSC 3491 | |||
1123 | thales_adc MACH_THALES_ADC THALES_ADC 3492 | 1123 | thales_adc MACH_THALES_ADC THALES_ADC 3492 |
1124 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 | 1124 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 |
1125 | atdgp318 MACH_ATDGP318 ATDGP318 3494 | 1125 | atdgp318 MACH_ATDGP318 ATDGP318 3494 |
1126 | m28evk MACH_M28EVK M28EVK 3613 | ||
1126 | smdk4212 MACH_SMDK4212 SMDK4212 3638 | 1127 | smdk4212 MACH_SMDK4212 SMDK4212 3638 |
1127 | smdk4412 MACH_SMDK4412 SMDK4412 3765 | 1128 | smdk4412 MACH_SMDK4412 SMDK4412 3765 |
diff --git a/arch/cris/arch-v10/drivers/Kconfig b/arch/cris/arch-v10/drivers/Kconfig index 32d90867a984..5f2cdb3e428c 100644 --- a/arch/cris/arch-v10/drivers/Kconfig +++ b/arch/cris/arch-v10/drivers/Kconfig | |||
@@ -3,7 +3,7 @@ if ETRAX_ARCH_V10 | |||
3 | config ETRAX_ETHERNET | 3 | config ETRAX_ETHERNET |
4 | bool "Ethernet support" | 4 | bool "Ethernet support" |
5 | depends on ETRAX_ARCH_V10 | 5 | depends on ETRAX_ARCH_V10 |
6 | select NET_ETHERNET | 6 | select ETHERNET |
7 | select NET_CORE | 7 | select NET_CORE |
8 | select MII | 8 | select MII |
9 | help | 9 | help |
diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig index e47e9c3401b0..de43aadcdbc4 100644 --- a/arch/cris/arch-v32/drivers/Kconfig +++ b/arch/cris/arch-v32/drivers/Kconfig | |||
@@ -3,7 +3,7 @@ if ETRAX_ARCH_V32 | |||
3 | config ETRAX_ETHERNET | 3 | config ETRAX_ETHERNET |
4 | bool "Ethernet support" | 4 | bool "Ethernet support" |
5 | depends on ETRAX_ARCH_V32 | 5 | depends on ETRAX_ARCH_V32 |
6 | select NET_ETHERNET | 6 | select ETHERNET |
7 | select NET_CORE | 7 | select NET_CORE |
8 | select MII | 8 | select MII |
9 | help | 9 | help |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 43f984e93970..303192fc9260 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -350,10 +350,12 @@ | |||
350 | #define __NR_clock_adjtime 342 | 350 | #define __NR_clock_adjtime 342 |
351 | #define __NR_syncfs 343 | 351 | #define __NR_syncfs 343 |
352 | #define __NR_setns 344 | 352 | #define __NR_setns 344 |
353 | #define __NR_process_vm_readv 345 | ||
354 | #define __NR_process_vm_writev 346 | ||
353 | 355 | ||
354 | #ifdef __KERNEL__ | 356 | #ifdef __KERNEL__ |
355 | 357 | ||
356 | #define NR_syscalls 345 | 358 | #define NR_syscalls 347 |
357 | 359 | ||
358 | #define __ARCH_WANT_IPC_PARSE_VERSION | 360 | #define __ARCH_WANT_IPC_PARSE_VERSION |
359 | #define __ARCH_WANT_OLD_READDIR | 361 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index c468f2edaa85..ce827b376110 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
@@ -365,4 +365,6 @@ ENTRY(sys_call_table) | |||
365 | .long sys_clock_adjtime | 365 | .long sys_clock_adjtime |
366 | .long sys_syncfs | 366 | .long sys_syncfs |
367 | .long sys_setns | 367 | .long sys_setns |
368 | .long sys_process_vm_readv /* 345 */ | ||
369 | .long sys_process_vm_writev | ||
368 | 370 | ||
diff --git a/arch/microblaze/include/asm/namei.h b/arch/microblaze/include/asm/namei.h deleted file mode 100644 index 61d60b8a07d5..000000000000 --- a/arch/microblaze/include/asm/namei.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_MICROBLAZE_NAMEI_H | ||
10 | #define _ASM_MICROBLAZE_NAMEI_H | ||
11 | |||
12 | #ifdef __KERNEL__ | ||
13 | |||
14 | /* This dummy routine maybe changed to something useful | ||
15 | * for /usr/gnemul/ emulation stuff. | ||
16 | * Look at asm-sparc/namei.h for details. | ||
17 | */ | ||
18 | #define __emul_prefix() NULL | ||
19 | |||
20 | #endif /* __KERNEL__ */ | ||
21 | |||
22 | #endif /* _ASM_MICROBLAZE_NAMEI_H */ | ||
diff --git a/arch/mips/cavium-octeon/flash_setup.c b/arch/mips/cavium-octeon/flash_setup.c index 975c20327bb1..0a430e06f5e5 100644 --- a/arch/mips/cavium-octeon/flash_setup.c +++ b/arch/mips/cavium-octeon/flash_setup.c | |||
@@ -17,8 +17,6 @@ | |||
17 | 17 | ||
18 | static struct map_info flash_map; | 18 | static struct map_info flash_map; |
19 | static struct mtd_info *mymtd; | 19 | static struct mtd_info *mymtd; |
20 | static int nr_parts; | ||
21 | static struct mtd_partition *parts; | ||
22 | static const char *part_probe_types[] = { | 20 | static const char *part_probe_types[] = { |
23 | "cmdlinepart", | 21 | "cmdlinepart", |
24 | #ifdef CONFIG_MTD_REDBOOT_PARTS | 22 | #ifdef CONFIG_MTD_REDBOOT_PARTS |
@@ -61,11 +59,8 @@ static int __init flash_init(void) | |||
61 | mymtd = do_map_probe("cfi_probe", &flash_map); | 59 | mymtd = do_map_probe("cfi_probe", &flash_map); |
62 | if (mymtd) { | 60 | if (mymtd) { |
63 | mymtd->owner = THIS_MODULE; | 61 | mymtd->owner = THIS_MODULE; |
64 | 62 | mtd_device_parse_register(mymtd, part_probe_types, | |
65 | nr_parts = parse_mtd_partitions(mymtd, | 63 | 0, NULL, 0); |
66 | part_probe_types, | ||
67 | &parts, 0); | ||
68 | mtd_device_register(mymtd, parts, nr_parts); | ||
69 | } else { | 64 | } else { |
70 | pr_err("Failed to register MTD device for flash\n"); | 65 | pr_err("Failed to register MTD device for flash\n"); |
71 | } | 66 | } |
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index 8b606423bbd7..efcfff4d4627 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
@@ -207,8 +207,9 @@ void octeon_prepare_cpus(unsigned int max_cpus) | |||
207 | * the other bits alone. | 207 | * the other bits alone. |
208 | */ | 208 | */ |
209 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff); | 209 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff); |
210 | if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED, | 210 | if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, |
211 | "SMP-IPI", mailbox_interrupt)) { | 211 | IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI", |
212 | mailbox_interrupt)) { | ||
212 | panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); | 213 | panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); |
213 | } | 214 | } |
214 | } | 215 | } |
diff --git a/arch/mips/emma/common/prom.c b/arch/mips/emma/common/prom.c index 708f08761406..cae42259d6da 100644 --- a/arch/mips/emma/common/prom.c +++ b/arch/mips/emma/common/prom.c | |||
@@ -50,7 +50,7 @@ void __init prom_init(void) | |||
50 | 50 | ||
51 | /* arg[0] is "g", the rest is boot parameters */ | 51 | /* arg[0] is "g", the rest is boot parameters */ |
52 | for (i = 1; i < argc; i++) { | 52 | for (i = 1; i < argc; i++) { |
53 | if (strlen(arcs_cmdline) + strlen(arg[i] + 1) | 53 | if (strlen(arcs_cmdline) + strlen(arg[i]) + 1 |
54 | >= sizeof(arcs_cmdline)) | 54 | >= sizeof(arcs_cmdline)) |
55 | break; | 55 | break; |
56 | strcat(arcs_cmdline, arg[i]); | 56 | strcat(arcs_cmdline, arg[i]); |
diff --git a/arch/mips/include/asm/mach-bcm47xx/gpio.h b/arch/mips/include/asm/mach-bcm47xx/gpio.h index 76961cabeedf..2ef17e8df403 100644 --- a/arch/mips/include/asm/mach-bcm47xx/gpio.h +++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h | |||
@@ -36,6 +36,8 @@ static inline int gpio_get_value(unsigned gpio) | |||
36 | return -EINVAL; | 36 | return -EINVAL; |
37 | } | 37 | } |
38 | 38 | ||
39 | #define gpio_get_value_cansleep gpio_get_value | ||
40 | |||
39 | static inline void gpio_set_value(unsigned gpio, int value) | 41 | static inline void gpio_set_value(unsigned gpio, int value) |
40 | { | 42 | { |
41 | switch (bcm47xx_bus_type) { | 43 | switch (bcm47xx_bus_type) { |
@@ -54,6 +56,19 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
54 | } | 56 | } |
55 | } | 57 | } |
56 | 58 | ||
59 | #define gpio_set_value_cansleep gpio_set_value | ||
60 | |||
61 | static inline int gpio_cansleep(unsigned gpio) | ||
62 | { | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | static inline int gpio_is_valid(unsigned gpio) | ||
67 | { | ||
68 | return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES); | ||
69 | } | ||
70 | |||
71 | |||
57 | static inline int gpio_direction_input(unsigned gpio) | 72 | static inline int gpio_direction_input(unsigned gpio) |
58 | { | 73 | { |
59 | switch (bcm47xx_bus_type) { | 74 | switch (bcm47xx_bus_type) { |
@@ -137,7 +152,4 @@ static inline int gpio_polarity(unsigned gpio, int value) | |||
137 | } | 152 | } |
138 | 153 | ||
139 | 154 | ||
140 | /* cansleep wrappers */ | ||
141 | #include <asm-generic/gpio.h> | ||
142 | |||
143 | #endif /* __BCM47XX_GPIO_H */ | 155 | #endif /* __BCM47XX_GPIO_H */ |
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index ecea7871dec2..d8dad5340ea3 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
@@ -365,16 +365,18 @@ | |||
365 | #define __NR_syncfs (__NR_Linux + 342) | 365 | #define __NR_syncfs (__NR_Linux + 342) |
366 | #define __NR_sendmmsg (__NR_Linux + 343) | 366 | #define __NR_sendmmsg (__NR_Linux + 343) |
367 | #define __NR_setns (__NR_Linux + 344) | 367 | #define __NR_setns (__NR_Linux + 344) |
368 | #define __NR_process_vm_readv (__NR_Linux + 345) | ||
369 | #define __NR_process_vm_writev (__NR_Linux + 346) | ||
368 | 370 | ||
369 | /* | 371 | /* |
370 | * Offset of the last Linux o32 flavoured syscall | 372 | * Offset of the last Linux o32 flavoured syscall |
371 | */ | 373 | */ |
372 | #define __NR_Linux_syscalls 344 | 374 | #define __NR_Linux_syscalls 346 |
373 | 375 | ||
374 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 376 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
375 | 377 | ||
376 | #define __NR_O32_Linux 4000 | 378 | #define __NR_O32_Linux 4000 |
377 | #define __NR_O32_Linux_syscalls 344 | 379 | #define __NR_O32_Linux_syscalls 346 |
378 | 380 | ||
379 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 381 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
380 | 382 | ||
@@ -686,16 +688,18 @@ | |||
686 | #define __NR_syncfs (__NR_Linux + 301) | 688 | #define __NR_syncfs (__NR_Linux + 301) |
687 | #define __NR_sendmmsg (__NR_Linux + 302) | 689 | #define __NR_sendmmsg (__NR_Linux + 302) |
688 | #define __NR_setns (__NR_Linux + 303) | 690 | #define __NR_setns (__NR_Linux + 303) |
691 | #define __NR_process_vm_readv (__NR_Linux + 304) | ||
692 | #define __NR_process_vm_writev (__NR_Linux + 305) | ||
689 | 693 | ||
690 | /* | 694 | /* |
691 | * Offset of the last Linux 64-bit flavoured syscall | 695 | * Offset of the last Linux 64-bit flavoured syscall |
692 | */ | 696 | */ |
693 | #define __NR_Linux_syscalls 303 | 697 | #define __NR_Linux_syscalls 305 |
694 | 698 | ||
695 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 699 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
696 | 700 | ||
697 | #define __NR_64_Linux 5000 | 701 | #define __NR_64_Linux 5000 |
698 | #define __NR_64_Linux_syscalls 303 | 702 | #define __NR_64_Linux_syscalls 305 |
699 | 703 | ||
700 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 704 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
701 | 705 | ||
@@ -1012,16 +1016,18 @@ | |||
1012 | #define __NR_syncfs (__NR_Linux + 306) | 1016 | #define __NR_syncfs (__NR_Linux + 306) |
1013 | #define __NR_sendmmsg (__NR_Linux + 307) | 1017 | #define __NR_sendmmsg (__NR_Linux + 307) |
1014 | #define __NR_setns (__NR_Linux + 308) | 1018 | #define __NR_setns (__NR_Linux + 308) |
1019 | #define __NR_process_vm_readv (__NR_Linux + 309) | ||
1020 | #define __NR_process_vm_writev (__NR_Linux + 310) | ||
1015 | 1021 | ||
1016 | /* | 1022 | /* |
1017 | * Offset of the last N32 flavoured syscall | 1023 | * Offset of the last N32 flavoured syscall |
1018 | */ | 1024 | */ |
1019 | #define __NR_Linux_syscalls 308 | 1025 | #define __NR_Linux_syscalls 310 |
1020 | 1026 | ||
1021 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1027 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
1022 | 1028 | ||
1023 | #define __NR_N32_Linux 6000 | 1029 | #define __NR_N32_Linux 6000 |
1024 | #define __NR_N32_Linux_syscalls 308 | 1030 | #define __NR_N32_Linux_syscalls 310 |
1025 | 1031 | ||
1026 | #ifdef __KERNEL__ | 1032 | #ifdef __KERNEL__ |
1027 | 1033 | ||
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index 98c5a9737c14..e2d8e199be32 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -103,19 +103,10 @@ static int c0_compare_int_pending(void) | |||
103 | 103 | ||
104 | /* | 104 | /* |
105 | * Compare interrupt can be routed and latched outside the core, | 105 | * Compare interrupt can be routed and latched outside the core, |
106 | * so a single execution hazard barrier may not be enough to give | 106 | * so wait up to worst case number of cycle counter ticks for timer interrupt |
107 | * it time to clear as seen in the Cause register. 4 time the | 107 | * changes to propagate to the cause register. |
108 | * pipeline depth seems reasonably conservative, and empirically | ||
109 | * works better in configurations with high CPU/bus clock ratios. | ||
110 | */ | 108 | */ |
111 | 109 | #define COMPARE_INT_SEEN_TICKS 50 | |
112 | #define compare_change_hazard() \ | ||
113 | do { \ | ||
114 | irq_disable_hazard(); \ | ||
115 | irq_disable_hazard(); \ | ||
116 | irq_disable_hazard(); \ | ||
117 | irq_disable_hazard(); \ | ||
118 | } while (0) | ||
119 | 110 | ||
120 | int c0_compare_int_usable(void) | 111 | int c0_compare_int_usable(void) |
121 | { | 112 | { |
@@ -126,8 +117,12 @@ int c0_compare_int_usable(void) | |||
126 | * IP7 already pending? Try to clear it by acking the timer. | 117 | * IP7 already pending? Try to clear it by acking the timer. |
127 | */ | 118 | */ |
128 | if (c0_compare_int_pending()) { | 119 | if (c0_compare_int_pending()) { |
129 | write_c0_compare(read_c0_count()); | 120 | cnt = read_c0_count(); |
130 | compare_change_hazard(); | 121 | write_c0_compare(cnt); |
122 | back_to_back_c0_hazard(); | ||
123 | while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS)) | ||
124 | if (!c0_compare_int_pending()) | ||
125 | break; | ||
131 | if (c0_compare_int_pending()) | 126 | if (c0_compare_int_pending()) |
132 | return 0; | 127 | return 0; |
133 | } | 128 | } |
@@ -136,7 +131,7 @@ int c0_compare_int_usable(void) | |||
136 | cnt = read_c0_count(); | 131 | cnt = read_c0_count(); |
137 | cnt += delta; | 132 | cnt += delta; |
138 | write_c0_compare(cnt); | 133 | write_c0_compare(cnt); |
139 | compare_change_hazard(); | 134 | back_to_back_c0_hazard(); |
140 | if ((int)(read_c0_count() - cnt) < 0) | 135 | if ((int)(read_c0_count() - cnt) < 0) |
141 | break; | 136 | break; |
142 | /* increase delta if the timer was already expired */ | 137 | /* increase delta if the timer was already expired */ |
@@ -145,12 +140,17 @@ int c0_compare_int_usable(void) | |||
145 | while ((int)(read_c0_count() - cnt) <= 0) | 140 | while ((int)(read_c0_count() - cnt) <= 0) |
146 | ; /* Wait for expiry */ | 141 | ; /* Wait for expiry */ |
147 | 142 | ||
148 | compare_change_hazard(); | 143 | while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS)) |
144 | if (c0_compare_int_pending()) | ||
145 | break; | ||
149 | if (!c0_compare_int_pending()) | 146 | if (!c0_compare_int_pending()) |
150 | return 0; | 147 | return 0; |
151 | 148 | cnt = read_c0_count(); | |
152 | write_c0_compare(read_c0_count()); | 149 | write_c0_compare(cnt); |
153 | compare_change_hazard(); | 150 | back_to_back_c0_hazard(); |
151 | while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS)) | ||
152 | if (!c0_compare_int_pending()) | ||
153 | break; | ||
154 | if (c0_compare_int_pending()) | 154 | if (c0_compare_int_pending()) |
155 | return 0; | 155 | return 0; |
156 | 156 | ||
diff --git a/arch/mips/kernel/cpufreq/loongson2_clock.c b/arch/mips/kernel/cpufreq/loongson2_clock.c index cefc6e259baf..5426779d9fdb 100644 --- a/arch/mips/kernel/cpufreq/loongson2_clock.c +++ b/arch/mips/kernel/cpufreq/loongson2_clock.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * for more details. | 7 | * for more details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/module.h> | ||
10 | #include <linux/cpufreq.h> | 11 | #include <linux/cpufreq.h> |
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | 13 | ||
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index 4f2971bcf8e5..315fc0b250f8 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
@@ -623,7 +623,7 @@ static int mipspmu_event_init(struct perf_event *event) | |||
623 | if (!atomic_inc_not_zero(&active_events)) { | 623 | if (!atomic_inc_not_zero(&active_events)) { |
624 | if (atomic_read(&active_events) > MIPS_MAX_HWEVENTS) { | 624 | if (atomic_read(&active_events) > MIPS_MAX_HWEVENTS) { |
625 | atomic_dec(&active_events); | 625 | atomic_dec(&active_events); |
626 | return -ENOSPC; | 626 | return -EINVAL; |
627 | } | 627 | } |
628 | 628 | ||
629 | mutex_lock(&pmu_reserve_mutex); | 629 | mutex_lock(&pmu_reserve_mutex); |
@@ -732,15 +732,15 @@ static int validate_group(struct perf_event *event) | |||
732 | memset(&fake_cpuc, 0, sizeof(fake_cpuc)); | 732 | memset(&fake_cpuc, 0, sizeof(fake_cpuc)); |
733 | 733 | ||
734 | if (!validate_event(&fake_cpuc, leader)) | 734 | if (!validate_event(&fake_cpuc, leader)) |
735 | return -ENOSPC; | 735 | return -EINVAL; |
736 | 736 | ||
737 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { | 737 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { |
738 | if (!validate_event(&fake_cpuc, sibling)) | 738 | if (!validate_event(&fake_cpuc, sibling)) |
739 | return -ENOSPC; | 739 | return -EINVAL; |
740 | } | 740 | } |
741 | 741 | ||
742 | if (!validate_event(&fake_cpuc, event)) | 742 | if (!validate_event(&fake_cpuc, event)) |
743 | return -ENOSPC; | 743 | return -EINVAL; |
744 | 744 | ||
745 | return 0; | 745 | return 0; |
746 | } | 746 | } |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 47920657968d..a632bc144efa 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -591,6 +591,8 @@ einval: li v0, -ENOSYS | |||
591 | sys sys_syncfs 1 | 591 | sys sys_syncfs 1 |
592 | sys sys_sendmmsg 4 | 592 | sys sys_sendmmsg 4 |
593 | sys sys_setns 2 | 593 | sys sys_setns 2 |
594 | sys sys_process_vm_readv 6 /* 4345 */ | ||
595 | sys sys_process_vm_writev 6 | ||
594 | .endm | 596 | .endm |
595 | 597 | ||
596 | /* We pre-compute the number of _instruction_ bytes needed to | 598 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index fb7334bea731..3b5a5e9ae49c 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -430,4 +430,6 @@ sys_call_table: | |||
430 | PTR sys_syncfs | 430 | PTR sys_syncfs |
431 | PTR sys_sendmmsg | 431 | PTR sys_sendmmsg |
432 | PTR sys_setns | 432 | PTR sys_setns |
433 | PTR sys_process_vm_readv | ||
434 | PTR sys_process_vm_writev /* 5305 */ | ||
433 | .size sys_call_table,.-sys_call_table | 435 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 6de1f598346e..6be6f7020923 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -430,4 +430,6 @@ EXPORT(sysn32_call_table) | |||
430 | PTR sys_syncfs | 430 | PTR sys_syncfs |
431 | PTR compat_sys_sendmmsg | 431 | PTR compat_sys_sendmmsg |
432 | PTR sys_setns | 432 | PTR sys_setns |
433 | PTR compat_sys_process_vm_readv | ||
434 | PTR compat_sys_process_vm_writev /* 6310 */ | ||
433 | .size sysn32_call_table,.-sysn32_call_table | 435 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 1d813169e453..54228553691d 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -548,4 +548,6 @@ sys_call_table: | |||
548 | PTR sys_syncfs | 548 | PTR sys_syncfs |
549 | PTR compat_sys_sendmmsg | 549 | PTR compat_sys_sendmmsg |
550 | PTR sys_setns | 550 | PTR sys_setns |
551 | PTR compat_sys_process_vm_readv /* 4345 */ | ||
552 | PTR compat_sys_process_vm_writev | ||
551 | .size sys_call_table,.-sys_call_table | 553 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 261ccbc07740..5c8a49d55054 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1596,7 +1596,8 @@ void __cpuinit per_cpu_trap_init(void) | |||
1596 | } | 1596 | } |
1597 | #endif /* CONFIG_MIPS_MT_SMTC */ | 1597 | #endif /* CONFIG_MIPS_MT_SMTC */ |
1598 | 1598 | ||
1599 | cpu_data[cpu].asid_cache = ASID_FIRST_VERSION; | 1599 | if (!cpu_data[cpu].asid_cache) |
1600 | cpu_data[cpu].asid_cache = ASID_FIRST_VERSION; | ||
1600 | 1601 | ||
1601 | atomic_inc(&init_mm.mm_count); | 1602 | atomic_inc(&init_mm.mm_count); |
1602 | current->active_mm = &init_mm; | 1603 | current->active_mm = &init_mm; |
diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c index 7e9c0ffc11a5..77ed70fc2fe5 100644 --- a/arch/mips/lantiq/clk.c +++ b/arch/mips/lantiq/clk.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | 7 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> |
8 | */ | 8 | */ |
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
diff --git a/arch/mips/lantiq/devices.c b/arch/mips/lantiq/devices.c index 44a36771c819..de1cb2bcd79a 100644 --- a/arch/mips/lantiq/devices.c +++ b/arch/mips/lantiq/devices.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c index 56ba007bf1e5..e34fcfd0d5ca 100644 --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | 6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
11 | #include <asm/bootinfo.h> | 11 | #include <asm/bootinfo.h> |
12 | #include <asm/time.h> | 12 | #include <asm/time.h> |
diff --git a/arch/mips/lantiq/setup.c b/arch/mips/lantiq/setup.c index 9b8af77ed0f9..1ff6c9d6cb93 100644 --- a/arch/mips/lantiq/setup.c +++ b/arch/mips/lantiq/setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <asm/bootinfo.h> | 13 | #include <asm/bootinfo.h> |
diff --git a/arch/mips/lantiq/xway/clk-ase.c b/arch/mips/lantiq/xway/clk-ase.c index 22d823acd536..652258309c9c 100644 --- a/arch/mips/lantiq/xway/clk-ase.c +++ b/arch/mips/lantiq/xway/clk-ase.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/clk.h> | 12 | #include <linux/clk.h> |
13 | 13 | ||
diff --git a/arch/mips/lantiq/xway/clk-xway.c b/arch/mips/lantiq/xway/clk-xway.c index ddd39593c581..696b1a3e0642 100644 --- a/arch/mips/lantiq/xway/clk-xway.c +++ b/arch/mips/lantiq/xway/clk-xway.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/clk.h> | 12 | #include <linux/clk.h> |
13 | 13 | ||
diff --git a/arch/mips/lantiq/xway/devices.c b/arch/mips/lantiq/xway/devices.c index d0e32ab2ea07..d614aa7ff07f 100644 --- a/arch/mips/lantiq/xway/devices.c +++ b/arch/mips/lantiq/xway/devices.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/mtd/physmap.h> | 13 | #include <linux/mtd/physmap.h> |
diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c index 4278a459d6c4..cbb6ae5747b9 100644 --- a/arch/mips/lantiq/xway/dma.c +++ b/arch/mips/lantiq/xway/dma.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | #include <linux/export.h> | ||
22 | 23 | ||
23 | #include <lantiq_soc.h> | 24 | #include <lantiq_soc.h> |
24 | #include <xway_dma.h> | 25 | #include <xway_dma.h> |
diff --git a/arch/mips/lantiq/xway/gpio.c b/arch/mips/lantiq/xway/gpio.c index a321451a5455..d2fa98f3c78d 100644 --- a/arch/mips/lantiq/xway/gpio.c +++ b/arch/mips/lantiq/xway/gpio.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/gpio.h> | 12 | #include <linux/gpio.h> |
13 | #include <linux/ioport.h> | 13 | #include <linux/ioport.h> |
diff --git a/arch/mips/lantiq/xway/gpio_ebu.c b/arch/mips/lantiq/xway/gpio_ebu.c index a479355abdb9..b91c7f17f10f 100644 --- a/arch/mips/lantiq/xway/gpio_ebu.c +++ b/arch/mips/lantiq/xway/gpio_ebu.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
diff --git a/arch/mips/lantiq/xway/gpio_stp.c b/arch/mips/lantiq/xway/gpio_stp.c index 67d59d690340..ff9991cddeaa 100644 --- a/arch/mips/lantiq/xway/gpio_stp.c +++ b/arch/mips/lantiq/xway/gpio_stp.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/module.h> | 12 | #include <linux/export.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
diff --git a/arch/mips/lantiq/xway/prom-ase.c b/arch/mips/lantiq/xway/prom-ase.c index abe49f4db57f..ae4959ae865c 100644 --- a/arch/mips/lantiq/xway/prom-ase.c +++ b/arch/mips/lantiq/xway/prom-ase.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | 6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
11 | #include <asm/bootinfo.h> | 11 | #include <asm/bootinfo.h> |
12 | #include <asm/time.h> | 12 | #include <asm/time.h> |
diff --git a/arch/mips/lantiq/xway/prom-xway.c b/arch/mips/lantiq/xway/prom-xway.c index 1686692ac24d..2228133ca356 100644 --- a/arch/mips/lantiq/xway/prom-xway.c +++ b/arch/mips/lantiq/xway/prom-xway.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | 6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
11 | #include <asm/bootinfo.h> | 11 | #include <asm/bootinfo.h> |
12 | #include <asm/time.h> | 12 | #include <asm/time.h> |
diff --git a/arch/mips/lantiq/xway/reset.c b/arch/mips/lantiq/xway/reset.c index a1be36d0e490..3d41f0bb5bf7 100644 --- a/arch/mips/lantiq/xway/reset.c +++ b/arch/mips/lantiq/xway/reset.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | #include <linux/ioport.h> | 11 | #include <linux/ioport.h> |
12 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
13 | #include <linux/module.h> | 13 | #include <linux/export.h> |
14 | #include <asm/reboot.h> | 14 | #include <asm/reboot.h> |
15 | 15 | ||
16 | #include <lantiq_soc.h> | 16 | #include <lantiq_soc.h> |
diff --git a/arch/mips/nxp/pnx8550/common/pci.c b/arch/mips/nxp/pnx8550/common/pci.c deleted file mode 100644 index 98e86ddb86cc..000000000000 --- a/arch/mips/nxp/pnx8550/common/pci.c +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * BRIEF MODULE DESCRIPTION | ||
4 | * | ||
5 | * Author: source@mvista.com | ||
6 | * | ||
7 | * This program is free software; you can distribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License (Version 2) as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
14 | * for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
19 | */ | ||
20 | #include <linux/types.h> | ||
21 | #include <linux/pci.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | |||
25 | #include <pci.h> | ||
26 | #include <glb.h> | ||
27 | #include <nand.h> | ||
28 | |||
29 | static struct resource pci_io_resource = { | ||
30 | .start = PNX8550_PCIIO + 0x1000, /* reserve regacy I/O space */ | ||
31 | .end = PNX8550_PCIIO + PNX8550_PCIIO_SIZE, | ||
32 | .name = "pci IO space", | ||
33 | .flags = IORESOURCE_IO | ||
34 | }; | ||
35 | |||
36 | static struct resource pci_mem_resource = { | ||
37 | .start = PNX8550_PCIMEM, | ||
38 | .end = PNX8550_PCIMEM + PNX8550_PCIMEM_SIZE - 1, | ||
39 | .name = "pci memory space", | ||
40 | .flags = IORESOURCE_MEM | ||
41 | }; | ||
42 | |||
43 | extern struct pci_ops pnx8550_pci_ops; | ||
44 | |||
45 | static struct pci_controller pnx8550_controller = { | ||
46 | .pci_ops = &pnx8550_pci_ops, | ||
47 | .io_map_base = PNX8550_PORT_BASE, | ||
48 | .io_resource = &pci_io_resource, | ||
49 | .mem_resource = &pci_mem_resource, | ||
50 | }; | ||
51 | |||
52 | /* Return the total size of DRAM-memory, (RANK0 + RANK1) */ | ||
53 | static inline unsigned long get_system_mem_size(void) | ||
54 | { | ||
55 | /* Read IP2031_RANK0_ADDR_LO */ | ||
56 | unsigned long dram_r0_lo = inl(PCI_BASE | 0x65010); | ||
57 | /* Read IP2031_RANK1_ADDR_HI */ | ||
58 | unsigned long dram_r1_hi = inl(PCI_BASE | 0x65018); | ||
59 | |||
60 | return dram_r1_hi - dram_r0_lo + 1; | ||
61 | } | ||
62 | |||
63 | static int __init pnx8550_pci_setup(void) | ||
64 | { | ||
65 | int pci_mem_code; | ||
66 | int mem_size = get_system_mem_size() >> 20; | ||
67 | |||
68 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers | ||
69 | Bit 1:Enable DAC Powerdown | ||
70 | -> 0:DACs are enabled and are working normally | ||
71 | 1:DACs are powerdown | ||
72 | Bit 0:Enable of PCI inta output | ||
73 | -> 0 = Disable PCI inta output | ||
74 | 1 = Enable PCI inta output | ||
75 | */ | ||
76 | PNX8550_GLB2_ENAB_INTA_O = 0; | ||
77 | |||
78 | /* Calc the PCI mem size code */ | ||
79 | if (mem_size >= 128) | ||
80 | pci_mem_code = SIZE_128M; | ||
81 | else if (mem_size >= 64) | ||
82 | pci_mem_code = SIZE_64M; | ||
83 | else if (mem_size >= 32) | ||
84 | pci_mem_code = SIZE_32M; | ||
85 | else | ||
86 | pci_mem_code = SIZE_16M; | ||
87 | |||
88 | /* Set PCI_XIO registers */ | ||
89 | outl(pci_mem_resource.start, PCI_BASE | PCI_BASE1_LO); | ||
90 | outl(pci_mem_resource.end + 1, PCI_BASE | PCI_BASE1_HI); | ||
91 | outl(pci_io_resource.start, PCI_BASE | PCI_BASE2_LO); | ||
92 | outl(pci_io_resource.end, PCI_BASE | PCI_BASE2_HI); | ||
93 | |||
94 | /* Send memory transaction via PCI_BASE2 */ | ||
95 | outl(0x00000001, PCI_BASE | PCI_IO); | ||
96 | |||
97 | /* Unlock the setup register */ | ||
98 | outl(0xca, PCI_BASE | PCI_UNLOCKREG); | ||
99 | |||
100 | /* | ||
101 | * BAR0 of PNX8550 (pci base 10) must be zero in order for ide | ||
102 | * to work, and in order for bus_to_baddr to work without any | ||
103 | * hacks. | ||
104 | */ | ||
105 | outl(0x00000000, PCI_BASE | PCI_BASE10); | ||
106 | |||
107 | /* | ||
108 | *These two bars are set by default or the boot code. | ||
109 | * However, it's safer to set them here so we're not boot | ||
110 | * code dependent. | ||
111 | */ | ||
112 | outl(0x1be00000, PCI_BASE | PCI_BASE14); /* PNX MMIO */ | ||
113 | outl(PNX8550_NAND_BASE_ADDR, PCI_BASE | PCI_BASE18); /* XIO */ | ||
114 | |||
115 | outl(PCI_EN_TA | | ||
116 | PCI_EN_PCI2MMI | | ||
117 | PCI_EN_XIO | | ||
118 | PCI_SETUP_BASE18_SIZE(SIZE_32M) | | ||
119 | PCI_SETUP_BASE18_EN | | ||
120 | PCI_SETUP_BASE14_EN | | ||
121 | PCI_SETUP_BASE10_PREF | | ||
122 | PCI_SETUP_BASE10_SIZE(pci_mem_code) | | ||
123 | PCI_SETUP_CFGMANAGE_EN | | ||
124 | PCI_SETUP_PCIARB_EN, | ||
125 | PCI_BASE | | ||
126 | PCI_SETUP); /* PCI_SETUP */ | ||
127 | outl(0x00000000, PCI_BASE | PCI_CTRL); /* PCI_CONTROL */ | ||
128 | |||
129 | register_pci_controller(&pnx8550_controller); | ||
130 | |||
131 | return 0; | ||
132 | } | ||
133 | |||
134 | arch_initcall(pnx8550_pci_setup); | ||
diff --git a/arch/mips/nxp/pnx8550/common/setup.c b/arch/mips/nxp/pnx8550/common/setup.c deleted file mode 100644 index 71adac323323..000000000000 --- a/arch/mips/nxp/pnx8550/common/setup.c +++ /dev/null | |||
@@ -1,143 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * 2.6 port, Embedded Alley Solutions, Inc | ||
4 | * | ||
5 | * Based on Per Hallsmark, per.hallsmark@mvista.com | ||
6 | * | ||
7 | * This program is free software; you can distribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License (Version 2) as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
14 | * for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/ioport.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <linux/serial_pnx8xxx.h> | ||
28 | #include <linux/pm.h> | ||
29 | |||
30 | #include <asm/cpu.h> | ||
31 | #include <asm/bootinfo.h> | ||
32 | #include <asm/irq.h> | ||
33 | #include <asm/mipsregs.h> | ||
34 | #include <asm/reboot.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/time.h> | ||
37 | |||
38 | #include <glb.h> | ||
39 | #include <int.h> | ||
40 | #include <pci.h> | ||
41 | #include <uart.h> | ||
42 | #include <nand.h> | ||
43 | |||
44 | extern void __init board_setup(void); | ||
45 | extern void pnx8550_machine_restart(char *); | ||
46 | extern void pnx8550_machine_halt(void); | ||
47 | extern void pnx8550_machine_power_off(void); | ||
48 | extern struct resource ioport_resource; | ||
49 | extern struct resource iomem_resource; | ||
50 | extern char *prom_getcmdline(void); | ||
51 | |||
52 | struct resource standard_io_resources[] = { | ||
53 | { | ||
54 | .start = 0x00, | ||
55 | .end = 0x1f, | ||
56 | .name = "dma1", | ||
57 | .flags = IORESOURCE_BUSY | ||
58 | }, { | ||
59 | .start = 0x40, | ||
60 | .end = 0x5f, | ||
61 | .name = "timer", | ||
62 | .flags = IORESOURCE_BUSY | ||
63 | }, { | ||
64 | .start = 0x80, | ||
65 | .end = 0x8f, | ||
66 | .name = "dma page reg", | ||
67 | .flags = IORESOURCE_BUSY | ||
68 | }, { | ||
69 | .start = 0xc0, | ||
70 | .end = 0xdf, | ||
71 | .name = "dma2", | ||
72 | .flags = IORESOURCE_BUSY | ||
73 | }, | ||
74 | }; | ||
75 | |||
76 | #define STANDARD_IO_RESOURCES ARRAY_SIZE(standard_io_resources) | ||
77 | |||
78 | extern struct resource pci_io_resource; | ||
79 | extern struct resource pci_mem_resource; | ||
80 | |||
81 | /* Return the total size of DRAM-memory, (RANK0 + RANK1) */ | ||
82 | unsigned long get_system_mem_size(void) | ||
83 | { | ||
84 | /* Read IP2031_RANK0_ADDR_LO */ | ||
85 | unsigned long dram_r0_lo = inl(PCI_BASE | 0x65010); | ||
86 | /* Read IP2031_RANK1_ADDR_HI */ | ||
87 | unsigned long dram_r1_hi = inl(PCI_BASE | 0x65018); | ||
88 | |||
89 | return dram_r1_hi - dram_r0_lo + 1; | ||
90 | } | ||
91 | |||
92 | int pnx8550_console_port = -1; | ||
93 | |||
94 | void __init plat_mem_setup(void) | ||
95 | { | ||
96 | int i; | ||
97 | char* argptr; | ||
98 | |||
99 | board_setup(); /* board specific setup */ | ||
100 | |||
101 | _machine_restart = pnx8550_machine_restart; | ||
102 | _machine_halt = pnx8550_machine_halt; | ||
103 | pm_power_off = pnx8550_machine_power_off; | ||
104 | |||
105 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers | ||
106 | Bit 1:Enable DAC Powerdown | ||
107 | -> 0:DACs are enabled and are working normally | ||
108 | 1:DACs are powerdown | ||
109 | Bit 0:Enable of PCI inta output | ||
110 | -> 0 = Disable PCI inta output | ||
111 | 1 = Enable PCI inta output | ||
112 | */ | ||
113 | PNX8550_GLB2_ENAB_INTA_O = 0; | ||
114 | |||
115 | /* IO/MEM resources. */ | ||
116 | set_io_port_base(PNX8550_PORT_BASE); | ||
117 | ioport_resource.start = 0; | ||
118 | ioport_resource.end = ~0; | ||
119 | iomem_resource.start = 0; | ||
120 | iomem_resource.end = ~0; | ||
121 | |||
122 | /* Request I/O space for devices on this board */ | ||
123 | for (i = 0; i < STANDARD_IO_RESOURCES; i++) | ||
124 | request_resource(&ioport_resource, standard_io_resources + i); | ||
125 | |||
126 | /* Place the Mode Control bit for GPIO pin 16 in primary function */ | ||
127 | /* Pin 16 is used by UART1, UA1_TX */ | ||
128 | outl((PNX8550_GPIO_MODE_PRIMOP << PNX8550_GPIO_MC_16_BIT) | | ||
129 | (PNX8550_GPIO_MODE_PRIMOP << PNX8550_GPIO_MC_17_BIT), | ||
130 | PNX8550_GPIO_MC1); | ||
131 | |||
132 | argptr = prom_getcmdline(); | ||
133 | if ((argptr = strstr(argptr, "console=ttyS")) != NULL) { | ||
134 | argptr += strlen("console=ttyS"); | ||
135 | pnx8550_console_port = *argptr == '0' ? 0 : 1; | ||
136 | |||
137 | /* We must initialize the UART (console) before early printk */ | ||
138 | /* Set LCR to 8-bit and BAUD to 38400 (no 5) */ | ||
139 | ip3106_lcr(UART_BASE, pnx8550_console_port) = | ||
140 | PNX8XXX_UART_LCR_8BIT; | ||
141 | ip3106_baud(UART_BASE, pnx8550_console_port) = 5; | ||
142 | } | ||
143 | } | ||
diff --git a/arch/mips/pci/pci-alchemy.c b/arch/mips/pci/pci-alchemy.c index 4ee57104e47b..b5ce041cdafb 100644 --- a/arch/mips/pci/pci-alchemy.c +++ b/arch/mips/pci/pci-alchemy.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Support for all devices (greater than 16) added by David Gathright. | 7 | * Support for all devices (greater than 16) added by David Gathright. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/export.h> | ||
10 | #include <linux/types.h> | 11 | #include <linux/types.h> |
11 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c index 8656388b34bd..be1e1afe12c3 100644 --- a/arch/mips/pci/pci-lantiq.c +++ b/arch/mips/pci/pci-lantiq.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
16 | #include <linux/export.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | 18 | ||
18 | #include <asm/pci.h> | 19 | #include <asm/pci.h> |
diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c index cf4c868715ac..dcc926e06fce 100644 --- a/arch/mips/pmc-sierra/yosemite/prom.c +++ b/arch/mips/pmc-sierra/yosemite/prom.c | |||
@@ -102,7 +102,7 @@ void __init prom_init(void) | |||
102 | 102 | ||
103 | /* Get the boot parameters */ | 103 | /* Get the boot parameters */ |
104 | for (i = 1; i < argc; i++) { | 104 | for (i = 1; i < argc; i++) { |
105 | if (strlen(arcs_cmdline) + strlen(arg[i] + 1) >= | 105 | if (strlen(arcs_cmdline) + strlen(arg[i]) + 1 >= |
106 | sizeof(arcs_cmdline)) | 106 | sizeof(arcs_cmdline)) |
107 | break; | 107 | break; |
108 | 108 | ||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b177caa56d95..951e18f5335b 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -345,7 +345,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE | |||
345 | 345 | ||
346 | config KEXEC | 346 | config KEXEC |
347 | bool "kexec system call (EXPERIMENTAL)" | 347 | bool "kexec system call (EXPERIMENTAL)" |
348 | depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP && !47x)) && EXPERIMENTAL | 348 | depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP && !PPC_47x)) && EXPERIMENTAL |
349 | help | 349 | help |
350 | kexec is a system call that implements the ability to shutdown your | 350 | kexec is a system call that implements the ability to shutdown your |
351 | current kernel, and to start another kernel. It is like a reboot | 351 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 57af16edc192..70ba0c0a1223 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -255,12 +255,6 @@ checkbin: | |||
255 | echo 'disable kernel modules' ; \ | 255 | echo 'disable kernel modules' ; \ |
256 | false ; \ | 256 | false ; \ |
257 | fi | 257 | fi |
258 | @if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \ | ||
259 | echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \ | ||
260 | echo 'correctly with old versions of binutils.' ; \ | ||
261 | echo '*** Please upgrade your binutils to 2.12.1 or newer' ; \ | ||
262 | false ; \ | ||
263 | fi | ||
264 | 258 | ||
265 | CLEAN_FILES += $(TOUT) | 259 | CLEAN_FILES += $(TOUT) |
266 | 260 | ||
diff --git a/arch/powerpc/boot/dts/p1023rds.dts b/arch/powerpc/boot/dts/p1023rds.dts index d9b776740a67..d3b478242ea9 100644 --- a/arch/powerpc/boot/dts/p1023rds.dts +++ b/arch/powerpc/boot/dts/p1023rds.dts | |||
@@ -449,6 +449,7 @@ | |||
449 | interrupt-parent = <&mpic>; | 449 | interrupt-parent = <&mpic>; |
450 | interrupts = <16 2>; | 450 | interrupts = <16 2>; |
451 | interrupt-map-mask = <0xf800 0 0 7>; | 451 | interrupt-map-mask = <0xf800 0 0 7>; |
452 | /* IRQ[0:3] are pulled up on board, set to active-low */ | ||
452 | interrupt-map = < | 453 | interrupt-map = < |
453 | /* IDSEL 0x0 */ | 454 | /* IDSEL 0x0 */ |
454 | 0000 0 0 1 &mpic 0 1 | 455 | 0000 0 0 1 &mpic 0 1 |
@@ -488,11 +489,15 @@ | |||
488 | interrupt-parent = <&mpic>; | 489 | interrupt-parent = <&mpic>; |
489 | interrupts = <16 2>; | 490 | interrupts = <16 2>; |
490 | interrupt-map-mask = <0xf800 0 0 7>; | 491 | interrupt-map-mask = <0xf800 0 0 7>; |
492 | /* | ||
493 | * IRQ[4:6] only for PCIe, set to active-high, | ||
494 | * IRQ[7] is pulled up on board, set to active-low | ||
495 | */ | ||
491 | interrupt-map = < | 496 | interrupt-map = < |
492 | /* IDSEL 0x0 */ | 497 | /* IDSEL 0x0 */ |
493 | 0000 0 0 1 &mpic 4 1 | 498 | 0000 0 0 1 &mpic 4 2 |
494 | 0000 0 0 2 &mpic 5 1 | 499 | 0000 0 0 2 &mpic 5 2 |
495 | 0000 0 0 3 &mpic 6 1 | 500 | 0000 0 0 3 &mpic 6 2 |
496 | 0000 0 0 4 &mpic 7 1 | 501 | 0000 0 0 4 &mpic 7 1 |
497 | >; | 502 | >; |
498 | ranges = <0x2000000 0x0 0xa0000000 | 503 | ranges = <0x2000000 0x0 0xa0000000 |
@@ -527,12 +532,16 @@ | |||
527 | interrupt-parent = <&mpic>; | 532 | interrupt-parent = <&mpic>; |
528 | interrupts = <16 2>; | 533 | interrupts = <16 2>; |
529 | interrupt-map-mask = <0xf800 0 0 7>; | 534 | interrupt-map-mask = <0xf800 0 0 7>; |
535 | /* | ||
536 | * IRQ[8:10] are pulled up on board, set to active-low | ||
537 | * IRQ[11] only for PCIe, set to active-high, | ||
538 | */ | ||
530 | interrupt-map = < | 539 | interrupt-map = < |
531 | /* IDSEL 0x0 */ | 540 | /* IDSEL 0x0 */ |
532 | 0000 0 0 1 &mpic 8 1 | 541 | 0000 0 0 1 &mpic 8 1 |
533 | 0000 0 0 2 &mpic 9 1 | 542 | 0000 0 0 2 &mpic 9 1 |
534 | 0000 0 0 3 &mpic 10 1 | 543 | 0000 0 0 3 &mpic 10 1 |
535 | 0000 0 0 4 &mpic 11 1 | 544 | 0000 0 0 4 &mpic 11 2 |
536 | >; | 545 | >; |
537 | ranges = <0x2000000 0x0 0x80000000 | 546 | ranges = <0x2000000 0x0 0x80000000 |
538 | 0x2000000 0x0 0x80000000 | 547 | 0x2000000 0x0 0x80000000 |
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 6cdf1c0d2c8a..3b98d7354341 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig | |||
@@ -52,6 +52,8 @@ CONFIG_MTD_CFI=y | |||
52 | CONFIG_MTD_JEDECPROBE=y | 52 | CONFIG_MTD_JEDECPROBE=y |
53 | CONFIG_MTD_CFI_AMDSTD=y | 53 | CONFIG_MTD_CFI_AMDSTD=y |
54 | CONFIG_MTD_PHYSMAP_OF=y | 54 | CONFIG_MTD_PHYSMAP_OF=y |
55 | CONFIG_MTD_NAND=m | ||
56 | CONFIG_MTD_NAND_NDFC=m | ||
55 | CONFIG_MTD_UBI=m | 57 | CONFIG_MTD_UBI=m |
56 | CONFIG_MTD_UBI_GLUEBI=m | 58 | CONFIG_MTD_UBI_GLUEBI=m |
57 | CONFIG_PROC_DEVICETREE=y | 59 | CONFIG_PROC_DEVICETREE=y |
diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h index e2a4c26ad377..02e41b53488d 100644 --- a/arch/powerpc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h | |||
@@ -49,13 +49,13 @@ static __inline__ int atomic_add_return(int a, atomic_t *v) | |||
49 | int t; | 49 | int t; |
50 | 50 | ||
51 | __asm__ __volatile__( | 51 | __asm__ __volatile__( |
52 | PPC_RELEASE_BARRIER | 52 | PPC_ATOMIC_ENTRY_BARRIER |
53 | "1: lwarx %0,0,%2 # atomic_add_return\n\ | 53 | "1: lwarx %0,0,%2 # atomic_add_return\n\ |
54 | add %0,%1,%0\n" | 54 | add %0,%1,%0\n" |
55 | PPC405_ERR77(0,%2) | 55 | PPC405_ERR77(0,%2) |
56 | " stwcx. %0,0,%2 \n\ | 56 | " stwcx. %0,0,%2 \n\ |
57 | bne- 1b" | 57 | bne- 1b" |
58 | PPC_ACQUIRE_BARRIER | 58 | PPC_ATOMIC_EXIT_BARRIER |
59 | : "=&r" (t) | 59 | : "=&r" (t) |
60 | : "r" (a), "r" (&v->counter) | 60 | : "r" (a), "r" (&v->counter) |
61 | : "cc", "memory"); | 61 | : "cc", "memory"); |
@@ -85,13 +85,13 @@ static __inline__ int atomic_sub_return(int a, atomic_t *v) | |||
85 | int t; | 85 | int t; |
86 | 86 | ||
87 | __asm__ __volatile__( | 87 | __asm__ __volatile__( |
88 | PPC_RELEASE_BARRIER | 88 | PPC_ATOMIC_ENTRY_BARRIER |
89 | "1: lwarx %0,0,%2 # atomic_sub_return\n\ | 89 | "1: lwarx %0,0,%2 # atomic_sub_return\n\ |
90 | subf %0,%1,%0\n" | 90 | subf %0,%1,%0\n" |
91 | PPC405_ERR77(0,%2) | 91 | PPC405_ERR77(0,%2) |
92 | " stwcx. %0,0,%2 \n\ | 92 | " stwcx. %0,0,%2 \n\ |
93 | bne- 1b" | 93 | bne- 1b" |
94 | PPC_ACQUIRE_BARRIER | 94 | PPC_ATOMIC_EXIT_BARRIER |
95 | : "=&r" (t) | 95 | : "=&r" (t) |
96 | : "r" (a), "r" (&v->counter) | 96 | : "r" (a), "r" (&v->counter) |
97 | : "cc", "memory"); | 97 | : "cc", "memory"); |
@@ -119,13 +119,13 @@ static __inline__ int atomic_inc_return(atomic_t *v) | |||
119 | int t; | 119 | int t; |
120 | 120 | ||
121 | __asm__ __volatile__( | 121 | __asm__ __volatile__( |
122 | PPC_RELEASE_BARRIER | 122 | PPC_ATOMIC_ENTRY_BARRIER |
123 | "1: lwarx %0,0,%1 # atomic_inc_return\n\ | 123 | "1: lwarx %0,0,%1 # atomic_inc_return\n\ |
124 | addic %0,%0,1\n" | 124 | addic %0,%0,1\n" |
125 | PPC405_ERR77(0,%1) | 125 | PPC405_ERR77(0,%1) |
126 | " stwcx. %0,0,%1 \n\ | 126 | " stwcx. %0,0,%1 \n\ |
127 | bne- 1b" | 127 | bne- 1b" |
128 | PPC_ACQUIRE_BARRIER | 128 | PPC_ATOMIC_EXIT_BARRIER |
129 | : "=&r" (t) | 129 | : "=&r" (t) |
130 | : "r" (&v->counter) | 130 | : "r" (&v->counter) |
131 | : "cc", "xer", "memory"); | 131 | : "cc", "xer", "memory"); |
@@ -163,13 +163,13 @@ static __inline__ int atomic_dec_return(atomic_t *v) | |||
163 | int t; | 163 | int t; |
164 | 164 | ||
165 | __asm__ __volatile__( | 165 | __asm__ __volatile__( |
166 | PPC_RELEASE_BARRIER | 166 | PPC_ATOMIC_ENTRY_BARRIER |
167 | "1: lwarx %0,0,%1 # atomic_dec_return\n\ | 167 | "1: lwarx %0,0,%1 # atomic_dec_return\n\ |
168 | addic %0,%0,-1\n" | 168 | addic %0,%0,-1\n" |
169 | PPC405_ERR77(0,%1) | 169 | PPC405_ERR77(0,%1) |
170 | " stwcx. %0,0,%1\n\ | 170 | " stwcx. %0,0,%1\n\ |
171 | bne- 1b" | 171 | bne- 1b" |
172 | PPC_ACQUIRE_BARRIER | 172 | PPC_ATOMIC_EXIT_BARRIER |
173 | : "=&r" (t) | 173 | : "=&r" (t) |
174 | : "r" (&v->counter) | 174 | : "r" (&v->counter) |
175 | : "cc", "xer", "memory"); | 175 | : "cc", "xer", "memory"); |
@@ -194,7 +194,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) | |||
194 | int t; | 194 | int t; |
195 | 195 | ||
196 | __asm__ __volatile__ ( | 196 | __asm__ __volatile__ ( |
197 | PPC_RELEASE_BARRIER | 197 | PPC_ATOMIC_ENTRY_BARRIER |
198 | "1: lwarx %0,0,%1 # __atomic_add_unless\n\ | 198 | "1: lwarx %0,0,%1 # __atomic_add_unless\n\ |
199 | cmpw 0,%0,%3 \n\ | 199 | cmpw 0,%0,%3 \n\ |
200 | beq- 2f \n\ | 200 | beq- 2f \n\ |
@@ -202,7 +202,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) | |||
202 | PPC405_ERR77(0,%2) | 202 | PPC405_ERR77(0,%2) |
203 | " stwcx. %0,0,%1 \n\ | 203 | " stwcx. %0,0,%1 \n\ |
204 | bne- 1b \n" | 204 | bne- 1b \n" |
205 | PPC_ACQUIRE_BARRIER | 205 | PPC_ATOMIC_EXIT_BARRIER |
206 | " subf %0,%2,%0 \n\ | 206 | " subf %0,%2,%0 \n\ |
207 | 2:" | 207 | 2:" |
208 | : "=&r" (t) | 208 | : "=&r" (t) |
@@ -226,7 +226,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
226 | int t; | 226 | int t; |
227 | 227 | ||
228 | __asm__ __volatile__( | 228 | __asm__ __volatile__( |
229 | PPC_RELEASE_BARRIER | 229 | PPC_ATOMIC_ENTRY_BARRIER |
230 | "1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ | 230 | "1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ |
231 | cmpwi %0,1\n\ | 231 | cmpwi %0,1\n\ |
232 | addi %0,%0,-1\n\ | 232 | addi %0,%0,-1\n\ |
@@ -234,7 +234,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
234 | PPC405_ERR77(0,%1) | 234 | PPC405_ERR77(0,%1) |
235 | " stwcx. %0,0,%1\n\ | 235 | " stwcx. %0,0,%1\n\ |
236 | bne- 1b" | 236 | bne- 1b" |
237 | PPC_ACQUIRE_BARRIER | 237 | PPC_ATOMIC_EXIT_BARRIER |
238 | "\n\ | 238 | "\n\ |
239 | 2:" : "=&b" (t) | 239 | 2:" : "=&b" (t) |
240 | : "r" (&v->counter) | 240 | : "r" (&v->counter) |
@@ -285,12 +285,12 @@ static __inline__ long atomic64_add_return(long a, atomic64_t *v) | |||
285 | long t; | 285 | long t; |
286 | 286 | ||
287 | __asm__ __volatile__( | 287 | __asm__ __volatile__( |
288 | PPC_RELEASE_BARRIER | 288 | PPC_ATOMIC_ENTRY_BARRIER |
289 | "1: ldarx %0,0,%2 # atomic64_add_return\n\ | 289 | "1: ldarx %0,0,%2 # atomic64_add_return\n\ |
290 | add %0,%1,%0\n\ | 290 | add %0,%1,%0\n\ |
291 | stdcx. %0,0,%2 \n\ | 291 | stdcx. %0,0,%2 \n\ |
292 | bne- 1b" | 292 | bne- 1b" |
293 | PPC_ACQUIRE_BARRIER | 293 | PPC_ATOMIC_EXIT_BARRIER |
294 | : "=&r" (t) | 294 | : "=&r" (t) |
295 | : "r" (a), "r" (&v->counter) | 295 | : "r" (a), "r" (&v->counter) |
296 | : "cc", "memory"); | 296 | : "cc", "memory"); |
@@ -319,12 +319,12 @@ static __inline__ long atomic64_sub_return(long a, atomic64_t *v) | |||
319 | long t; | 319 | long t; |
320 | 320 | ||
321 | __asm__ __volatile__( | 321 | __asm__ __volatile__( |
322 | PPC_RELEASE_BARRIER | 322 | PPC_ATOMIC_ENTRY_BARRIER |
323 | "1: ldarx %0,0,%2 # atomic64_sub_return\n\ | 323 | "1: ldarx %0,0,%2 # atomic64_sub_return\n\ |
324 | subf %0,%1,%0\n\ | 324 | subf %0,%1,%0\n\ |
325 | stdcx. %0,0,%2 \n\ | 325 | stdcx. %0,0,%2 \n\ |
326 | bne- 1b" | 326 | bne- 1b" |
327 | PPC_ACQUIRE_BARRIER | 327 | PPC_ATOMIC_EXIT_BARRIER |
328 | : "=&r" (t) | 328 | : "=&r" (t) |
329 | : "r" (a), "r" (&v->counter) | 329 | : "r" (a), "r" (&v->counter) |
330 | : "cc", "memory"); | 330 | : "cc", "memory"); |
@@ -351,12 +351,12 @@ static __inline__ long atomic64_inc_return(atomic64_t *v) | |||
351 | long t; | 351 | long t; |
352 | 352 | ||
353 | __asm__ __volatile__( | 353 | __asm__ __volatile__( |
354 | PPC_RELEASE_BARRIER | 354 | PPC_ATOMIC_ENTRY_BARRIER |
355 | "1: ldarx %0,0,%1 # atomic64_inc_return\n\ | 355 | "1: ldarx %0,0,%1 # atomic64_inc_return\n\ |
356 | addic %0,%0,1\n\ | 356 | addic %0,%0,1\n\ |
357 | stdcx. %0,0,%1 \n\ | 357 | stdcx. %0,0,%1 \n\ |
358 | bne- 1b" | 358 | bne- 1b" |
359 | PPC_ACQUIRE_BARRIER | 359 | PPC_ATOMIC_EXIT_BARRIER |
360 | : "=&r" (t) | 360 | : "=&r" (t) |
361 | : "r" (&v->counter) | 361 | : "r" (&v->counter) |
362 | : "cc", "xer", "memory"); | 362 | : "cc", "xer", "memory"); |
@@ -393,12 +393,12 @@ static __inline__ long atomic64_dec_return(atomic64_t *v) | |||
393 | long t; | 393 | long t; |
394 | 394 | ||
395 | __asm__ __volatile__( | 395 | __asm__ __volatile__( |
396 | PPC_RELEASE_BARRIER | 396 | PPC_ATOMIC_ENTRY_BARRIER |
397 | "1: ldarx %0,0,%1 # atomic64_dec_return\n\ | 397 | "1: ldarx %0,0,%1 # atomic64_dec_return\n\ |
398 | addic %0,%0,-1\n\ | 398 | addic %0,%0,-1\n\ |
399 | stdcx. %0,0,%1\n\ | 399 | stdcx. %0,0,%1\n\ |
400 | bne- 1b" | 400 | bne- 1b" |
401 | PPC_ACQUIRE_BARRIER | 401 | PPC_ATOMIC_EXIT_BARRIER |
402 | : "=&r" (t) | 402 | : "=&r" (t) |
403 | : "r" (&v->counter) | 403 | : "r" (&v->counter) |
404 | : "cc", "xer", "memory"); | 404 | : "cc", "xer", "memory"); |
@@ -418,13 +418,13 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v) | |||
418 | long t; | 418 | long t; |
419 | 419 | ||
420 | __asm__ __volatile__( | 420 | __asm__ __volatile__( |
421 | PPC_RELEASE_BARRIER | 421 | PPC_ATOMIC_ENTRY_BARRIER |
422 | "1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\ | 422 | "1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\ |
423 | addic. %0,%0,-1\n\ | 423 | addic. %0,%0,-1\n\ |
424 | blt- 2f\n\ | 424 | blt- 2f\n\ |
425 | stdcx. %0,0,%1\n\ | 425 | stdcx. %0,0,%1\n\ |
426 | bne- 1b" | 426 | bne- 1b" |
427 | PPC_ACQUIRE_BARRIER | 427 | PPC_ATOMIC_EXIT_BARRIER |
428 | "\n\ | 428 | "\n\ |
429 | 2:" : "=&r" (t) | 429 | 2:" : "=&r" (t) |
430 | : "r" (&v->counter) | 430 | : "r" (&v->counter) |
@@ -450,14 +450,14 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
450 | long t; | 450 | long t; |
451 | 451 | ||
452 | __asm__ __volatile__ ( | 452 | __asm__ __volatile__ ( |
453 | PPC_RELEASE_BARRIER | 453 | PPC_ATOMIC_ENTRY_BARRIER |
454 | "1: ldarx %0,0,%1 # __atomic_add_unless\n\ | 454 | "1: ldarx %0,0,%1 # __atomic_add_unless\n\ |
455 | cmpd 0,%0,%3 \n\ | 455 | cmpd 0,%0,%3 \n\ |
456 | beq- 2f \n\ | 456 | beq- 2f \n\ |
457 | add %0,%2,%0 \n" | 457 | add %0,%2,%0 \n" |
458 | " stdcx. %0,0,%1 \n\ | 458 | " stdcx. %0,0,%1 \n\ |
459 | bne- 1b \n" | 459 | bne- 1b \n" |
460 | PPC_ACQUIRE_BARRIER | 460 | PPC_ATOMIC_EXIT_BARRIER |
461 | " subf %0,%2,%0 \n\ | 461 | " subf %0,%2,%0 \n\ |
462 | 2:" | 462 | 2:" |
463 | : "=&r" (t) | 463 | : "=&r" (t) |
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index e137afcc10fa..efdc92618b38 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h | |||
@@ -124,14 +124,14 @@ static __inline__ unsigned long fn( \ | |||
124 | return (old & mask); \ | 124 | return (old & mask); \ |
125 | } | 125 | } |
126 | 126 | ||
127 | DEFINE_TESTOP(test_and_set_bits, or, PPC_RELEASE_BARRIER, | 127 | DEFINE_TESTOP(test_and_set_bits, or, PPC_ATOMIC_ENTRY_BARRIER, |
128 | PPC_ACQUIRE_BARRIER, 0) | 128 | PPC_ATOMIC_EXIT_BARRIER, 0) |
129 | DEFINE_TESTOP(test_and_set_bits_lock, or, "", | 129 | DEFINE_TESTOP(test_and_set_bits_lock, or, "", |
130 | PPC_ACQUIRE_BARRIER, 1) | 130 | PPC_ACQUIRE_BARRIER, 1) |
131 | DEFINE_TESTOP(test_and_clear_bits, andc, PPC_RELEASE_BARRIER, | 131 | DEFINE_TESTOP(test_and_clear_bits, andc, PPC_ATOMIC_ENTRY_BARRIER, |
132 | PPC_ACQUIRE_BARRIER, 0) | 132 | PPC_ATOMIC_EXIT_BARRIER, 0) |
133 | DEFINE_TESTOP(test_and_change_bits, xor, PPC_RELEASE_BARRIER, | 133 | DEFINE_TESTOP(test_and_change_bits, xor, PPC_ATOMIC_ENTRY_BARRIER, |
134 | PPC_ACQUIRE_BARRIER, 0) | 134 | PPC_ATOMIC_EXIT_BARRIER, 0) |
135 | 135 | ||
136 | static __inline__ int test_and_set_bit(unsigned long nr, | 136 | static __inline__ int test_and_set_bit(unsigned long nr, |
137 | volatile unsigned long *addr) | 137 | volatile unsigned long *addr) |
diff --git a/arch/powerpc/include/asm/futex.h b/arch/powerpc/include/asm/futex.h index c94e4a3fe2ef..2a9cf845473b 100644 --- a/arch/powerpc/include/asm/futex.h +++ b/arch/powerpc/include/asm/futex.h | |||
@@ -11,12 +11,13 @@ | |||
11 | 11 | ||
12 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 12 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
13 | __asm__ __volatile ( \ | 13 | __asm__ __volatile ( \ |
14 | PPC_RELEASE_BARRIER \ | 14 | PPC_ATOMIC_ENTRY_BARRIER \ |
15 | "1: lwarx %0,0,%2\n" \ | 15 | "1: lwarx %0,0,%2\n" \ |
16 | insn \ | 16 | insn \ |
17 | PPC405_ERR77(0, %2) \ | 17 | PPC405_ERR77(0, %2) \ |
18 | "2: stwcx. %1,0,%2\n" \ | 18 | "2: stwcx. %1,0,%2\n" \ |
19 | "bne- 1b\n" \ | 19 | "bne- 1b\n" \ |
20 | PPC_ATOMIC_EXIT_BARRIER \ | ||
20 | "li %1,0\n" \ | 21 | "li %1,0\n" \ |
21 | "3: .section .fixup,\"ax\"\n" \ | 22 | "3: .section .fixup,\"ax\"\n" \ |
22 | "4: li %1,%3\n" \ | 23 | "4: li %1,%3\n" \ |
@@ -92,14 +93,14 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
92 | return -EFAULT; | 93 | return -EFAULT; |
93 | 94 | ||
94 | __asm__ __volatile__ ( | 95 | __asm__ __volatile__ ( |
95 | PPC_RELEASE_BARRIER | 96 | PPC_ATOMIC_ENTRY_BARRIER |
96 | "1: lwarx %1,0,%3 # futex_atomic_cmpxchg_inatomic\n\ | 97 | "1: lwarx %1,0,%3 # futex_atomic_cmpxchg_inatomic\n\ |
97 | cmpw 0,%1,%4\n\ | 98 | cmpw 0,%1,%4\n\ |
98 | bne- 3f\n" | 99 | bne- 3f\n" |
99 | PPC405_ERR77(0,%3) | 100 | PPC405_ERR77(0,%3) |
100 | "2: stwcx. %5,0,%3\n\ | 101 | "2: stwcx. %5,0,%3\n\ |
101 | bne- 1b\n" | 102 | bne- 1b\n" |
102 | PPC_ACQUIRE_BARRIER | 103 | PPC_ATOMIC_EXIT_BARRIER |
103 | "3: .section .fixup,\"ax\"\n\ | 104 | "3: .section .fixup,\"ax\"\n\ |
104 | 4: li %0,%6\n\ | 105 | 4: li %0,%6\n\ |
105 | b 3b\n\ | 106 | b 3b\n\ |
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h index 08fe69edcd10..0ad432bc81d6 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/asm/kvm.h | |||
@@ -149,12 +149,6 @@ struct kvm_regs { | |||
149 | #define KVM_SREGS_E_UPDATE_DBSR (1 << 3) | 149 | #define KVM_SREGS_E_UPDATE_DBSR (1 << 3) |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * Book3S special bits to indicate contents in the struct by maintaining | ||
153 | * backwards compatibility with older structs. If adding a new field, | ||
154 | * please make sure to add a flag for that new field */ | ||
155 | #define KVM_SREGS_S_HIOR (1 << 0) | ||
156 | |||
157 | /* | ||
158 | * In KVM_SET_SREGS, reserved/pad fields must be left untouched from a | 152 | * In KVM_SET_SREGS, reserved/pad fields must be left untouched from a |
159 | * previous KVM_GET_REGS. | 153 | * previous KVM_GET_REGS. |
160 | * | 154 | * |
@@ -179,8 +173,6 @@ struct kvm_sregs { | |||
179 | __u64 ibat[8]; | 173 | __u64 ibat[8]; |
180 | __u64 dbat[8]; | 174 | __u64 dbat[8]; |
181 | } ppc32; | 175 | } ppc32; |
182 | __u64 flags; /* KVM_SREGS_S_ */ | ||
183 | __u64 hior; | ||
184 | } s; | 176 | } s; |
185 | struct { | 177 | struct { |
186 | union { | 178 | union { |
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index a384ffdf33de..d4df013ad779 100644 --- a/arch/powerpc/include/asm/kvm_book3s.h +++ b/arch/powerpc/include/asm/kvm_book3s.h | |||
@@ -90,8 +90,6 @@ struct kvmppc_vcpu_book3s { | |||
90 | #endif | 90 | #endif |
91 | int context_id[SID_CONTEXTS]; | 91 | int context_id[SID_CONTEXTS]; |
92 | 92 | ||
93 | bool hior_sregs; /* HIOR is set by SREGS, not PVR */ | ||
94 | |||
95 | struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE]; | 93 | struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE]; |
96 | struct hlist_head hpte_hash_pte_long[HPTEG_HASH_NUM_PTE_LONG]; | 94 | struct hlist_head hpte_hash_pte_long[HPTEG_HASH_NUM_PTE_LONG]; |
97 | struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE]; | 95 | struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE]; |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 28cdbd9f399c..03c48e819c8e 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | #define MSR_ MSR_ME | MSR_CE | 32 | #define MSR_ MSR_ME | MSR_CE |
33 | #define MSR_KERNEL MSR_ | MSR_64BIT | 33 | #define MSR_KERNEL MSR_ | MSR_64BIT |
34 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | MSR_DE | 34 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE |
35 | #define MSR_USER64 MSR_USER32 | MSR_64BIT | 35 | #define MSR_USER64 MSR_USER32 | MSR_64BIT |
36 | #elif defined (CONFIG_40x) | 36 | #elif defined (CONFIG_40x) |
37 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) | 37 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) |
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index 6fbce725c710..a0f358d4a00c 100644 --- a/arch/powerpc/include/asm/sections.h +++ b/arch/powerpc/include/asm/sections.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #ifdef __powerpc64__ | 9 | #ifdef __powerpc64__ |
10 | 10 | ||
11 | extern char _end[]; | 11 | extern char __end_interrupts[]; |
12 | 12 | ||
13 | static inline int in_kernel_text(unsigned long addr) | 13 | static inline int in_kernel_text(unsigned long addr) |
14 | { | 14 | { |
diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch.h index d7cab44643c5..e682a7143edb 100644 --- a/arch/powerpc/include/asm/synch.h +++ b/arch/powerpc/include/asm/synch.h | |||
@@ -13,6 +13,7 @@ | |||
13 | extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup; | 13 | extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup; |
14 | extern void do_lwsync_fixups(unsigned long value, void *fixup_start, | 14 | extern void do_lwsync_fixups(unsigned long value, void *fixup_start, |
15 | void *fixup_end); | 15 | void *fixup_end); |
16 | extern void do_final_fixups(void); | ||
16 | 17 | ||
17 | static inline void eieio(void) | 18 | static inline void eieio(void) |
18 | { | 19 | { |
@@ -41,11 +42,15 @@ static inline void isync(void) | |||
41 | START_LWSYNC_SECTION(97); \ | 42 | START_LWSYNC_SECTION(97); \ |
42 | isync; \ | 43 | isync; \ |
43 | MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup); | 44 | MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup); |
44 | #define PPC_ACQUIRE_BARRIER "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER) | 45 | #define PPC_ACQUIRE_BARRIER "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER) |
45 | #define PPC_RELEASE_BARRIER stringify_in_c(LWSYNC) "\n" | 46 | #define PPC_RELEASE_BARRIER stringify_in_c(LWSYNC) "\n" |
47 | #define PPC_ATOMIC_ENTRY_BARRIER "\n" stringify_in_c(LWSYNC) "\n" | ||
48 | #define PPC_ATOMIC_EXIT_BARRIER "\n" stringify_in_c(sync) "\n" | ||
46 | #else | 49 | #else |
47 | #define PPC_ACQUIRE_BARRIER | 50 | #define PPC_ACQUIRE_BARRIER |
48 | #define PPC_RELEASE_BARRIER | 51 | #define PPC_RELEASE_BARRIER |
52 | #define PPC_ATOMIC_ENTRY_BARRIER | ||
53 | #define PPC_ATOMIC_EXIT_BARRIER | ||
49 | #endif | 54 | #endif |
50 | 55 | ||
51 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 56212bc0ab08..4f80cf1ce77b 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -215,7 +215,22 @@ reenable_mmu: /* re-enable mmu so we can */ | |||
215 | stw r9,8(r1) | 215 | stw r9,8(r1) |
216 | stw r11,12(r1) | 216 | stw r11,12(r1) |
217 | stw r3,ORIG_GPR3(r1) | 217 | stw r3,ORIG_GPR3(r1) |
218 | /* | ||
219 | * The trace_hardirqs_off will use CALLER_ADDR0 and CALLER_ADDR1. | ||
220 | * If from user mode there is only one stack frame on the stack, and | ||
221 | * accessing CALLER_ADDR1 will cause oops. So we need create a dummy | ||
222 | * stack frame to make trace_hardirqs_off happy. | ||
223 | */ | ||
224 | andi. r12,r12,MSR_PR | ||
225 | beq 11f | ||
226 | stwu r1,-16(r1) | ||
227 | bl trace_hardirqs_off | ||
228 | addi r1,r1,16 | ||
229 | b 12f | ||
230 | |||
231 | 11: | ||
218 | bl trace_hardirqs_off | 232 | bl trace_hardirqs_off |
233 | 12: | ||
219 | lwz r0,GPR0(r1) | 234 | lwz r0,GPR0(r1) |
220 | lwz r3,ORIG_GPR3(r1) | 235 | lwz r3,ORIG_GPR3(r1) |
221 | lwz r4,GPR4(r1) | 236 | lwz r4,GPR4(r1) |
diff --git a/arch/powerpc/kernel/jump_label.c b/arch/powerpc/kernel/jump_label.c index 368d158d665d..a1ed8a8c7cb4 100644 --- a/arch/powerpc/kernel/jump_label.c +++ b/arch/powerpc/kernel/jump_label.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/jump_label.h> | 11 | #include <linux/jump_label.h> |
12 | #include <asm/code-patching.h> | 12 | #include <asm/code-patching.h> |
13 | 13 | ||
14 | #ifdef HAVE_JUMP_LABEL | ||
14 | void arch_jump_label_transform(struct jump_entry *entry, | 15 | void arch_jump_label_transform(struct jump_entry *entry, |
15 | enum jump_label_type type) | 16 | enum jump_label_type type) |
16 | { | 17 | { |
@@ -21,3 +22,4 @@ void arch_jump_label_transform(struct jump_entry *entry, | |||
21 | else | 22 | else |
22 | patch_instruction(addr, PPC_INST_NOP); | 23 | patch_instruction(addr, PPC_INST_NOP); |
23 | } | 24 | } |
25 | #endif | ||
diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c index 35f27646c4ff..2985338d0e10 100644 --- a/arch/powerpc/kernel/kvm.c +++ b/arch/powerpc/kernel/kvm.c | |||
@@ -132,7 +132,6 @@ static void kvm_patch_ins_b(u32 *inst, int addr) | |||
132 | /* On relocatable kernels interrupts handlers and our code | 132 | /* On relocatable kernels interrupts handlers and our code |
133 | can be in different regions, so we don't patch them */ | 133 | can be in different regions, so we don't patch them */ |
134 | 134 | ||
135 | extern u32 __end_interrupts; | ||
136 | if ((ulong)inst < (ulong)&__end_interrupts) | 135 | if ((ulong)inst < (ulong)&__end_interrupts) |
137 | return; | 136 | return; |
138 | #endif | 137 | #endif |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index f7d760ab5ca1..7cd07b42ca1a 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -738,7 +738,7 @@ relocate_new_kernel: | |||
738 | mr r5, r31 | 738 | mr r5, r31 |
739 | 739 | ||
740 | li r0, 0 | 740 | li r0, 0 |
741 | #elif defined(CONFIG_44x) && !defined(CONFIG_47x) | 741 | #elif defined(CONFIG_44x) && !defined(CONFIG_PPC_47x) |
742 | 742 | ||
743 | /* | 743 | /* |
744 | * Code for setting up 1:1 mapping for PPC440x for KEXEC | 744 | * Code for setting up 1:1 mapping for PPC440x for KEXEC |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 9054ca9ab4f9..6457574c0b2f 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -486,28 +486,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
486 | new_thread = &new->thread; | 486 | new_thread = &new->thread; |
487 | old_thread = ¤t->thread; | 487 | old_thread = ¤t->thread; |
488 | 488 | ||
489 | #if defined(CONFIG_PPC_BOOK3E_64) | ||
490 | /* XXX Current Book3E code doesn't deal with kernel side DBCR0, | ||
491 | * we always hold the user values, so we set it now. | ||
492 | * | ||
493 | * However, we ensure the kernel MSR:DE is appropriately cleared too | ||
494 | * to avoid spurrious single step exceptions in the kernel. | ||
495 | * | ||
496 | * This will have to change to merge with the ppc32 code at some point, | ||
497 | * but I don't like much what ppc32 is doing today so there's some | ||
498 | * thinking needed there | ||
499 | */ | ||
500 | if ((new_thread->dbcr0 | old_thread->dbcr0) & DBCR0_IDM) { | ||
501 | u32 dbcr0; | ||
502 | |||
503 | mtmsr(mfmsr() & ~MSR_DE); | ||
504 | isync(); | ||
505 | dbcr0 = mfspr(SPRN_DBCR0); | ||
506 | dbcr0 = (dbcr0 & DBCR0_EDM) | new_thread->dbcr0; | ||
507 | mtspr(SPRN_DBCR0, dbcr0); | ||
508 | } | ||
509 | #endif /* CONFIG_PPC64_BOOK3E */ | ||
510 | |||
511 | #ifdef CONFIG_PPC64 | 489 | #ifdef CONFIG_PPC64 |
512 | /* | 490 | /* |
513 | * Collect processor utilization data per process | 491 | * Collect processor utilization data per process |
@@ -657,7 +635,7 @@ void show_regs(struct pt_regs * regs) | |||
657 | if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR)) | 635 | if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR)) |
658 | printk("CFAR: "REG"\n", regs->orig_gpr3); | 636 | printk("CFAR: "REG"\n", regs->orig_gpr3); |
659 | if (trap == 0x300 || trap == 0x600) | 637 | if (trap == 0x300 || trap == 0x600) |
660 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | 638 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) |
661 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); | 639 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); |
662 | #else | 640 | #else |
663 | printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr); | 641 | printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr); |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index b4fa66127495..cc584865b3df 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1579,10 +1579,8 @@ static void __init prom_instantiate_rtas(void) | |||
1579 | return; | 1579 | return; |
1580 | 1580 | ||
1581 | base = alloc_down(size, PAGE_SIZE, 0); | 1581 | base = alloc_down(size, PAGE_SIZE, 0); |
1582 | if (base == 0) { | 1582 | if (base == 0) |
1583 | prom_printf("RTAS allocation failed !\n"); | 1583 | prom_panic("Could not allocate memory for RTAS\n"); |
1584 | return; | ||
1585 | } | ||
1586 | 1584 | ||
1587 | rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); | 1585 | rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); |
1588 | if (!IHANDLE_VALID(rtas_inst)) { | 1586 | if (!IHANDLE_VALID(rtas_inst)) { |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index c1ce86357ecb..ac7610815113 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -107,6 +107,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr) | |||
107 | PTRRELOC(&__start___lwsync_fixup), | 107 | PTRRELOC(&__start___lwsync_fixup), |
108 | PTRRELOC(&__stop___lwsync_fixup)); | 108 | PTRRELOC(&__stop___lwsync_fixup)); |
109 | 109 | ||
110 | do_final_fixups(); | ||
111 | |||
110 | return KERNELBASE + offset; | 112 | return KERNELBASE + offset; |
111 | } | 113 | } |
112 | 114 | ||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 1a9dea80a69b..fb9bb46e7e88 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -359,6 +359,7 @@ void __init setup_system(void) | |||
359 | &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup); | 359 | &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup); |
360 | do_lwsync_fixups(cur_cpu_spec->cpu_features, | 360 | do_lwsync_fixups(cur_cpu_spec->cpu_features, |
361 | &__start___lwsync_fixup, &__stop___lwsync_fixup); | 361 | &__start___lwsync_fixup, &__stop___lwsync_fixup); |
362 | do_final_fixups(); | ||
362 | 363 | ||
363 | /* | 364 | /* |
364 | * Unflatten the device-tree passed by prom_init or kexec | 365 | * Unflatten the device-tree passed by prom_init or kexec |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 78b76dc54dfb..836a5a19eb2c 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -97,7 +97,7 @@ static inline int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set) | |||
97 | compat_sigset_t cset; | 97 | compat_sigset_t cset; |
98 | 98 | ||
99 | switch (_NSIG_WORDS) { | 99 | switch (_NSIG_WORDS) { |
100 | case 4: cset.sig[5] = set->sig[3] & 0xffffffffull; | 100 | case 4: cset.sig[6] = set->sig[3] & 0xffffffffull; |
101 | cset.sig[7] = set->sig[3] >> 32; | 101 | cset.sig[7] = set->sig[3] >> 32; |
102 | case 3: cset.sig[4] = set->sig[2] & 0xffffffffull; | 102 | case 3: cset.sig[4] = set->sig[2] & 0xffffffffull; |
103 | cset.sig[5] = set->sig[2] >> 32; | 103 | cset.sig[5] = set->sig[2] >> 32; |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 4e5908264d1a..5459d148a0f6 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -1298,14 +1298,12 @@ void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) | |||
1298 | 1298 | ||
1299 | if (user_mode(regs)) { | 1299 | if (user_mode(regs)) { |
1300 | current->thread.dbcr0 &= ~DBCR0_IC; | 1300 | current->thread.dbcr0 &= ~DBCR0_IC; |
1301 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | ||
1302 | if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0, | 1301 | if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0, |
1303 | current->thread.dbcr1)) | 1302 | current->thread.dbcr1)) |
1304 | regs->msr |= MSR_DE; | 1303 | regs->msr |= MSR_DE; |
1305 | else | 1304 | else |
1306 | /* Make sure the IDM bit is off */ | 1305 | /* Make sure the IDM bit is off */ |
1307 | current->thread.dbcr0 &= ~DBCR0_IDM; | 1306 | current->thread.dbcr0 &= ~DBCR0_IDM; |
1308 | #endif | ||
1309 | } | 1307 | } |
1310 | 1308 | ||
1311 | _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); | 1309 | _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 0cdbc07cec14..0cb137a9b038 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/processor.h> | 44 | #include <asm/processor.h> |
45 | #include <asm/cputhreads.h> | 45 | #include <asm/cputhreads.h> |
46 | #include <asm/page.h> | 46 | #include <asm/page.h> |
47 | #include <asm/hvcall.h> | ||
47 | #include <linux/gfp.h> | 48 | #include <linux/gfp.h> |
48 | #include <linux/sched.h> | 49 | #include <linux/sched.h> |
49 | #include <linux/vmalloc.h> | 50 | #include <linux/vmalloc.h> |
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index bc4d50dec78b..3c791e1eb675 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -151,16 +151,14 @@ void kvmppc_set_pvr(struct kvm_vcpu *vcpu, u32 pvr) | |||
151 | #ifdef CONFIG_PPC_BOOK3S_64 | 151 | #ifdef CONFIG_PPC_BOOK3S_64 |
152 | if ((pvr >= 0x330000) && (pvr < 0x70330000)) { | 152 | if ((pvr >= 0x330000) && (pvr < 0x70330000)) { |
153 | kvmppc_mmu_book3s_64_init(vcpu); | 153 | kvmppc_mmu_book3s_64_init(vcpu); |
154 | if (!to_book3s(vcpu)->hior_sregs) | 154 | to_book3s(vcpu)->hior = 0xfff00000; |
155 | to_book3s(vcpu)->hior = 0xfff00000; | ||
156 | to_book3s(vcpu)->msr_mask = 0xffffffffffffffffULL; | 155 | to_book3s(vcpu)->msr_mask = 0xffffffffffffffffULL; |
157 | vcpu->arch.cpu_type = KVM_CPU_3S_64; | 156 | vcpu->arch.cpu_type = KVM_CPU_3S_64; |
158 | } else | 157 | } else |
159 | #endif | 158 | #endif |
160 | { | 159 | { |
161 | kvmppc_mmu_book3s_32_init(vcpu); | 160 | kvmppc_mmu_book3s_32_init(vcpu); |
162 | if (!to_book3s(vcpu)->hior_sregs) | 161 | to_book3s(vcpu)->hior = 0; |
163 | to_book3s(vcpu)->hior = 0; | ||
164 | to_book3s(vcpu)->msr_mask = 0xffffffffULL; | 162 | to_book3s(vcpu)->msr_mask = 0xffffffffULL; |
165 | vcpu->arch.cpu_type = KVM_CPU_3S_32; | 163 | vcpu->arch.cpu_type = KVM_CPU_3S_32; |
166 | } | 164 | } |
@@ -797,9 +795,6 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, | |||
797 | } | 795 | } |
798 | } | 796 | } |
799 | 797 | ||
800 | if (sregs->u.s.flags & KVM_SREGS_S_HIOR) | ||
801 | sregs->u.s.hior = to_book3s(vcpu)->hior; | ||
802 | |||
803 | return 0; | 798 | return 0; |
804 | } | 799 | } |
805 | 800 | ||
@@ -836,11 +831,6 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
836 | /* Flush the MMU after messing with the segments */ | 831 | /* Flush the MMU after messing with the segments */ |
837 | kvmppc_mmu_pte_flush(vcpu, 0, 0); | 832 | kvmppc_mmu_pte_flush(vcpu, 0, 0); |
838 | 833 | ||
839 | if (sregs->u.s.flags & KVM_SREGS_S_HIOR) { | ||
840 | to_book3s(vcpu)->hior_sregs = true; | ||
841 | to_book3s(vcpu)->hior = sregs->u.s.hior; | ||
842 | } | ||
843 | |||
844 | return 0; | 834 | return 0; |
845 | } | 835 | } |
846 | 836 | ||
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index efbf9ad87203..607fbdf24b84 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -208,7 +208,6 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
208 | case KVM_CAP_PPC_BOOKE_SREGS: | 208 | case KVM_CAP_PPC_BOOKE_SREGS: |
209 | #else | 209 | #else |
210 | case KVM_CAP_PPC_SEGSTATE: | 210 | case KVM_CAP_PPC_SEGSTATE: |
211 | case KVM_CAP_PPC_HIOR: | ||
212 | case KVM_CAP_PPC_PAPR: | 211 | case KVM_CAP_PPC_PAPR: |
213 | #endif | 212 | #endif |
214 | case KVM_CAP_PPC_UNSET_IRQ: | 213 | case KVM_CAP_PPC_UNSET_IRQ: |
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c index 0d08d0171392..7a8a7487cee8 100644 --- a/arch/powerpc/lib/feature-fixups.c +++ b/arch/powerpc/lib/feature-fixups.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <asm/cputable.h> | 19 | #include <asm/cputable.h> |
20 | #include <asm/code-patching.h> | 20 | #include <asm/code-patching.h> |
21 | #include <asm/page.h> | ||
22 | #include <asm/sections.h> | ||
21 | 23 | ||
22 | 24 | ||
23 | struct fixup_entry { | 25 | struct fixup_entry { |
@@ -128,6 +130,27 @@ void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end) | |||
128 | } | 130 | } |
129 | } | 131 | } |
130 | 132 | ||
133 | void do_final_fixups(void) | ||
134 | { | ||
135 | #if defined(CONFIG_PPC64) && defined(CONFIG_RELOCATABLE) | ||
136 | int *src, *dest; | ||
137 | unsigned long length; | ||
138 | |||
139 | if (PHYSICAL_START == 0) | ||
140 | return; | ||
141 | |||
142 | src = (int *)(KERNELBASE + PHYSICAL_START); | ||
143 | dest = (int *)KERNELBASE; | ||
144 | length = (__end_interrupts - _stext) / sizeof(int); | ||
145 | |||
146 | while (length--) { | ||
147 | patch_instruction(dest, *src); | ||
148 | src++; | ||
149 | dest++; | ||
150 | } | ||
151 | #endif | ||
152 | } | ||
153 | |||
131 | #ifdef CONFIG_FTR_FIXUP_SELFTEST | 154 | #ifdef CONFIG_FTR_FIXUP_SELFTEST |
132 | 155 | ||
133 | #define check(x) \ | 156 | #define check(x) \ |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 5964371303ac..8558b572e55d 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/of_fdt.h> | 15 | #include <linux/of_fdt.h> |
16 | #include <linux/memblock.h> | 16 | #include <linux/memblock.h> |
17 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
18 | #include <linux/moduleparam.h> | ||
18 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
19 | #include <asm/pgalloc.h> | 20 | #include <asm/pgalloc.h> |
20 | #include <asm/tlb.h> | 21 | #include <asm/tlb.h> |
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 45023e26aea3..d7946be298b6 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -203,7 +203,7 @@ config P3060_QDS | |||
203 | select PPC_E500MC | 203 | select PPC_E500MC |
204 | select PHYS_64BIT | 204 | select PHYS_64BIT |
205 | select SWIOTLB | 205 | select SWIOTLB |
206 | select MPC8xxx_GPIO | 206 | select GPIO_MPC8XXX |
207 | select HAS_RAPIDIO | 207 | select HAS_RAPIDIO |
208 | select PPC_EPAPR_HV_PIC | 208 | select PPC_EPAPR_HV_PIC |
209 | help | 209 | help |
diff --git a/arch/powerpc/platforms/85xx/p3060_qds.c b/arch/powerpc/platforms/85xx/p3060_qds.c index 01dcf44871e9..081cf4ac1881 100644 --- a/arch/powerpc/platforms/85xx/p3060_qds.c +++ b/arch/powerpc/platforms/85xx/p3060_qds.c | |||
@@ -70,7 +70,7 @@ define_machine(p3060_qds) { | |||
70 | .power_save = e500_idle, | 70 | .power_save = e500_idle, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | machine_device_initcall(p3060_qds, declare_of_platform_devices); | 73 | machine_device_initcall(p3060_qds, corenet_ds_publish_devices); |
74 | 74 | ||
75 | #ifdef CONFIG_SWIOTLB | 75 | #ifdef CONFIG_SWIOTLB |
76 | machine_arch_initcall(p3060_qds, swiotlb_setup_bus_notifier); | 76 | machine_arch_initcall(p3060_qds, swiotlb_setup_bus_notifier); |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index e4588721ef34..3fe6d927ad70 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -347,7 +347,7 @@ config SIMPLE_GPIO | |||
347 | 347 | ||
348 | config MCU_MPC8349EMITX | 348 | config MCU_MPC8349EMITX |
349 | bool "MPC8349E-mITX MCU driver" | 349 | bool "MPC8349E-mITX MCU driver" |
350 | depends on I2C && PPC_83xx | 350 | depends on I2C=y && PPC_83xx |
351 | select GENERIC_GPIO | 351 | select GENERIC_GPIO |
352 | select ARCH_REQUIRE_GPIOLIB | 352 | select ARCH_REQUIRE_GPIOLIB |
353 | help | 353 | help |
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 404bc52b7806..1d6f4f478fe2 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -88,6 +88,7 @@ struct ps3_private { | |||
88 | struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); | 88 | struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); |
89 | u64 ppe_id; | 89 | u64 ppe_id; |
90 | u64 thread_id; | 90 | u64 thread_id; |
91 | unsigned long ipi_mask; | ||
91 | }; | 92 | }; |
92 | 93 | ||
93 | static DEFINE_PER_CPU(struct ps3_private, ps3_private); | 94 | static DEFINE_PER_CPU(struct ps3_private, ps3_private); |
@@ -144,7 +145,11 @@ static void ps3_chip_unmask(struct irq_data *d) | |||
144 | static void ps3_chip_eoi(struct irq_data *d) | 145 | static void ps3_chip_eoi(struct irq_data *d) |
145 | { | 146 | { |
146 | const struct ps3_private *pd = irq_data_get_irq_chip_data(d); | 147 | const struct ps3_private *pd = irq_data_get_irq_chip_data(d); |
147 | lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq); | 148 | |
149 | /* non-IPIs are EOIed here. */ | ||
150 | |||
151 | if (!test_bit(63 - d->irq, &pd->ipi_mask)) | ||
152 | lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq); | ||
148 | } | 153 | } |
149 | 154 | ||
150 | /** | 155 | /** |
@@ -691,6 +696,16 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) | |||
691 | cpu, virq, pd->bmp.ipi_debug_brk_mask); | 696 | cpu, virq, pd->bmp.ipi_debug_brk_mask); |
692 | } | 697 | } |
693 | 698 | ||
699 | void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq) | ||
700 | { | ||
701 | struct ps3_private *pd = &per_cpu(ps3_private, cpu); | ||
702 | |||
703 | set_bit(63 - virq, &pd->ipi_mask); | ||
704 | |||
705 | DBG("%s:%d: cpu %u, virq %u, ipi_mask %lxh\n", __func__, __LINE__, | ||
706 | cpu, virq, pd->ipi_mask); | ||
707 | } | ||
708 | |||
694 | static unsigned int ps3_get_irq(void) | 709 | static unsigned int ps3_get_irq(void) |
695 | { | 710 | { |
696 | struct ps3_private *pd = &__get_cpu_var(ps3_private); | 711 | struct ps3_private *pd = &__get_cpu_var(ps3_private); |
@@ -720,6 +735,12 @@ static unsigned int ps3_get_irq(void) | |||
720 | BUG(); | 735 | BUG(); |
721 | } | 736 | } |
722 | #endif | 737 | #endif |
738 | |||
739 | /* IPIs are EOIed here. */ | ||
740 | |||
741 | if (test_bit(63 - plug, &pd->ipi_mask)) | ||
742 | lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, plug); | ||
743 | |||
723 | return plug; | 744 | return plug; |
724 | } | 745 | } |
725 | 746 | ||
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h index 9a196a88eda7..1a633ed0fe98 100644 --- a/arch/powerpc/platforms/ps3/platform.h +++ b/arch/powerpc/platforms/ps3/platform.h | |||
@@ -43,6 +43,7 @@ void ps3_mm_shutdown(void); | |||
43 | void ps3_init_IRQ(void); | 43 | void ps3_init_IRQ(void); |
44 | void ps3_shutdown_IRQ(int cpu); | 44 | void ps3_shutdown_IRQ(int cpu); |
45 | void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq); | 45 | void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq); |
46 | void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq); | ||
46 | 47 | ||
47 | /* smp */ | 48 | /* smp */ |
48 | 49 | ||
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c index 4c44794faac0..efc1cd8c034a 100644 --- a/arch/powerpc/platforms/ps3/smp.c +++ b/arch/powerpc/platforms/ps3/smp.c | |||
@@ -59,46 +59,49 @@ static void ps3_smp_message_pass(int cpu, int msg) | |||
59 | 59 | ||
60 | static int ps3_smp_probe(void) | 60 | static int ps3_smp_probe(void) |
61 | { | 61 | { |
62 | return 2; | 62 | int cpu; |
63 | } | ||
64 | 63 | ||
65 | static void __init ps3_smp_setup_cpu(int cpu) | 64 | for (cpu = 0; cpu < 2; cpu++) { |
66 | { | 65 | int result; |
67 | int result; | 66 | unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu); |
68 | unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu); | 67 | int i; |
69 | int i; | ||
70 | 68 | ||
71 | DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu); | 69 | DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu); |
72 | 70 | ||
73 | /* | 71 | /* |
74 | * Check assumptions on ps3_ipi_virqs[] indexing. If this | 72 | * Check assumptions on ps3_ipi_virqs[] indexing. If this |
75 | * check fails, then a different mapping of PPC_MSG_ | 73 | * check fails, then a different mapping of PPC_MSG_ |
76 | * to index needs to be setup. | 74 | * to index needs to be setup. |
77 | */ | 75 | */ |
78 | 76 | ||
79 | BUILD_BUG_ON(PPC_MSG_CALL_FUNCTION != 0); | 77 | BUILD_BUG_ON(PPC_MSG_CALL_FUNCTION != 0); |
80 | BUILD_BUG_ON(PPC_MSG_RESCHEDULE != 1); | 78 | BUILD_BUG_ON(PPC_MSG_RESCHEDULE != 1); |
81 | BUILD_BUG_ON(PPC_MSG_CALL_FUNC_SINGLE != 2); | 79 | BUILD_BUG_ON(PPC_MSG_CALL_FUNC_SINGLE != 2); |
82 | BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3); | 80 | BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3); |
83 | 81 | ||
84 | for (i = 0; i < MSG_COUNT; i++) { | 82 | for (i = 0; i < MSG_COUNT; i++) { |
85 | result = ps3_event_receive_port_setup(cpu, &virqs[i]); | 83 | result = ps3_event_receive_port_setup(cpu, &virqs[i]); |
86 | 84 | ||
87 | if (result) | 85 | if (result) |
88 | continue; | 86 | continue; |
89 | 87 | ||
90 | DBG("%s:%d: (%d, %d) => virq %u\n", | 88 | DBG("%s:%d: (%d, %d) => virq %u\n", |
91 | __func__, __LINE__, cpu, i, virqs[i]); | 89 | __func__, __LINE__, cpu, i, virqs[i]); |
92 | 90 | ||
93 | result = smp_request_message_ipi(virqs[i], i); | 91 | result = smp_request_message_ipi(virqs[i], i); |
94 | 92 | ||
95 | if (result) | 93 | if (result) |
96 | virqs[i] = NO_IRQ; | 94 | virqs[i] = NO_IRQ; |
97 | } | 95 | else |
96 | ps3_register_ipi_irq(cpu, virqs[i]); | ||
97 | } | ||
98 | 98 | ||
99 | ps3_register_ipi_debug_brk(cpu, virqs[PPC_MSG_DEBUGGER_BREAK]); | 99 | ps3_register_ipi_debug_brk(cpu, virqs[PPC_MSG_DEBUGGER_BREAK]); |
100 | 100 | ||
101 | DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu); | 101 | DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu); |
102 | } | ||
103 | |||
104 | return 2; | ||
102 | } | 105 | } |
103 | 106 | ||
104 | void ps3_smp_cleanup_cpu(int cpu) | 107 | void ps3_smp_cleanup_cpu(int cpu) |
@@ -121,7 +124,6 @@ static struct smp_ops_t ps3_smp_ops = { | |||
121 | .probe = ps3_smp_probe, | 124 | .probe = ps3_smp_probe, |
122 | .message_pass = ps3_smp_message_pass, | 125 | .message_pass = ps3_smp_message_pass, |
123 | .kick_cpu = smp_generic_kick_cpu, | 126 | .kick_cpu = smp_generic_kick_cpu, |
124 | .setup_cpu = ps3_smp_setup_cpu, | ||
125 | }; | 127 | }; |
126 | 128 | ||
127 | void smp_init_ps3(void) | 129 | void smp_init_ps3(void) |
diff --git a/arch/powerpc/sysdev/ehv_pic.c b/arch/powerpc/sysdev/ehv_pic.c index af1a5df46b3e..b6731e4a6646 100644 --- a/arch/powerpc/sysdev/ehv_pic.c +++ b/arch/powerpc/sysdev/ehv_pic.c | |||
@@ -280,6 +280,7 @@ void __init ehv_pic_init(void) | |||
280 | 280 | ||
281 | if (!ehv_pic->irqhost) { | 281 | if (!ehv_pic->irqhost) { |
282 | of_node_put(np); | 282 | of_node_put(np); |
283 | kfree(ehv_pic); | ||
283 | return; | 284 | return; |
284 | } | 285 | } |
285 | 286 | ||
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c index c4d96fa32ba5..d5c3c90ee698 100644 --- a/arch/powerpc/sysdev/fsl_lbc.c +++ b/arch/powerpc/sysdev/fsl_lbc.c | |||
@@ -328,6 +328,7 @@ static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) | |||
328 | err: | 328 | err: |
329 | iounmap(fsl_lbc_ctrl_dev->regs); | 329 | iounmap(fsl_lbc_ctrl_dev->regs); |
330 | kfree(fsl_lbc_ctrl_dev); | 330 | kfree(fsl_lbc_ctrl_dev); |
331 | fsl_lbc_ctrl_dev = NULL; | ||
331 | return ret; | 332 | return ret; |
332 | } | 333 | } |
333 | 334 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 3363fbc964f8..ceb09cbd2329 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
@@ -216,7 +216,7 @@ int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier) | |||
216 | /* Errata QE_General4, which affects some MPC832x and MPC836x SOCs, says | 216 | /* Errata QE_General4, which affects some MPC832x and MPC836x SOCs, says |
217 | that the BRG divisor must be even if you're not using divide-by-16 | 217 | that the BRG divisor must be even if you're not using divide-by-16 |
218 | mode. */ | 218 | mode. */ |
219 | if (!div16 && (divisor & 1)) | 219 | if (!div16 && (divisor & 1) && (divisor > 3)) |
220 | divisor++; | 220 | divisor++; |
221 | 221 | ||
222 | tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) | | 222 | tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) | |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index a9fbd43395f7..373679b3744a 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -572,6 +572,7 @@ config KEXEC | |||
572 | config CRASH_DUMP | 572 | config CRASH_DUMP |
573 | bool "kernel crash dumps" | 573 | bool "kernel crash dumps" |
574 | depends on 64BIT | 574 | depends on 64BIT |
575 | select KEXEC | ||
575 | help | 576 | help |
576 | Generate crash dump after being started by kexec. | 577 | Generate crash dump after being started by kexec. |
577 | Crash dump kernels are loaded in the main kernel with kexec-tools | 578 | Crash dump kernels are loaded in the main kernel with kexec-tools |
diff --git a/arch/s390/crypto/crypt_s390.h b/arch/s390/crypto/crypt_s390.h index 49676771bd66..ffd1ac255f19 100644 --- a/arch/s390/crypto/crypt_s390.h +++ b/arch/s390/crypto/crypt_s390.h | |||
@@ -368,9 +368,12 @@ static inline int crypt_s390_func_available(int func, | |||
368 | 368 | ||
369 | if (facility_mask & CRYPT_S390_MSA && !test_facility(17)) | 369 | if (facility_mask & CRYPT_S390_MSA && !test_facility(17)) |
370 | return 0; | 370 | return 0; |
371 | if (facility_mask & CRYPT_S390_MSA3 && !test_facility(76)) | 371 | |
372 | if (facility_mask & CRYPT_S390_MSA3 && | ||
373 | (!test_facility(2) || !test_facility(76))) | ||
372 | return 0; | 374 | return 0; |
373 | if (facility_mask & CRYPT_S390_MSA4 && !test_facility(77)) | 375 | if (facility_mask & CRYPT_S390_MSA4 && |
376 | (!test_facility(2) || !test_facility(77))) | ||
374 | return 0; | 377 | return 0; |
375 | 378 | ||
376 | switch (func & CRYPT_S390_OP_MASK) { | 379 | switch (func & CRYPT_S390_OP_MASK) { |
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 24e18473d926..b0c235cb6ad5 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -47,7 +47,7 @@ struct sca_block { | |||
47 | #define KVM_HPAGE_MASK(x) (~(KVM_HPAGE_SIZE(x) - 1)) | 47 | #define KVM_HPAGE_MASK(x) (~(KVM_HPAGE_SIZE(x) - 1)) |
48 | #define KVM_PAGES_PER_HPAGE(x) (KVM_HPAGE_SIZE(x) / PAGE_SIZE) | 48 | #define KVM_PAGES_PER_HPAGE(x) (KVM_HPAGE_SIZE(x) / PAGE_SIZE) |
49 | 49 | ||
50 | #define CPUSTAT_HOST 0x80000000 | 50 | #define CPUSTAT_STOPPED 0x80000000 |
51 | #define CPUSTAT_WAIT 0x10000000 | 51 | #define CPUSTAT_WAIT 0x10000000 |
52 | #define CPUSTAT_ECALL_PEND 0x08000000 | 52 | #define CPUSTAT_ECALL_PEND 0x08000000 |
53 | #define CPUSTAT_STOP_INT 0x04000000 | 53 | #define CPUSTAT_STOP_INT 0x04000000 |
@@ -139,6 +139,7 @@ struct kvm_vcpu_stat { | |||
139 | u32 instruction_stfl; | 139 | u32 instruction_stfl; |
140 | u32 instruction_tprot; | 140 | u32 instruction_tprot; |
141 | u32 instruction_sigp_sense; | 141 | u32 instruction_sigp_sense; |
142 | u32 instruction_sigp_sense_running; | ||
142 | u32 instruction_sigp_external_call; | 143 | u32 instruction_sigp_external_call; |
143 | u32 instruction_sigp_emergency; | 144 | u32 instruction_sigp_emergency; |
144 | u32 instruction_sigp_stop; | 145 | u32 instruction_sigp_stop; |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 34ede0ea85a9..4f289ff0b7fe 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -593,14 +593,16 @@ static inline pgste_t pgste_update_all(pte_t *ptep, pgste_t pgste) | |||
593 | unsigned long address, bits; | 593 | unsigned long address, bits; |
594 | unsigned char skey; | 594 | unsigned char skey; |
595 | 595 | ||
596 | if (!pte_present(*ptep)) | ||
597 | return pgste; | ||
596 | address = pte_val(*ptep) & PAGE_MASK; | 598 | address = pte_val(*ptep) & PAGE_MASK; |
597 | skey = page_get_storage_key(address); | 599 | skey = page_get_storage_key(address); |
598 | bits = skey & (_PAGE_CHANGED | _PAGE_REFERENCED); | 600 | bits = skey & (_PAGE_CHANGED | _PAGE_REFERENCED); |
599 | /* Clear page changed & referenced bit in the storage key */ | 601 | /* Clear page changed & referenced bit in the storage key */ |
600 | if (bits) { | 602 | if (bits & _PAGE_CHANGED) |
601 | skey ^= bits; | 603 | page_set_storage_key(address, skey ^ bits, 1); |
602 | page_set_storage_key(address, skey, 1); | 604 | else if (bits) |
603 | } | 605 | page_reset_referenced(address); |
604 | /* Transfer page changed & referenced bit to guest bits in pgste */ | 606 | /* Transfer page changed & referenced bit to guest bits in pgste */ |
605 | pgste_val(pgste) |= bits << 48; /* RCP_GR_BIT & RCP_GC_BIT */ | 607 | pgste_val(pgste) |= bits << 48; /* RCP_GR_BIT & RCP_GC_BIT */ |
606 | /* Get host changed & referenced bits from pgste */ | 608 | /* Get host changed & referenced bits from pgste */ |
@@ -625,6 +627,8 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste) | |||
625 | #ifdef CONFIG_PGSTE | 627 | #ifdef CONFIG_PGSTE |
626 | int young; | 628 | int young; |
627 | 629 | ||
630 | if (!pte_present(*ptep)) | ||
631 | return pgste; | ||
628 | young = page_reset_referenced(pte_val(*ptep) & PAGE_MASK); | 632 | young = page_reset_referenced(pte_val(*ptep) & PAGE_MASK); |
629 | /* Transfer page referenced bit to pte software bit (host view) */ | 633 | /* Transfer page referenced bit to pte software bit (host view) */ |
630 | if (young || (pgste_val(pgste) & RCP_HR_BIT)) | 634 | if (young || (pgste_val(pgste) & RCP_HR_BIT)) |
@@ -638,13 +642,15 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste) | |||
638 | 642 | ||
639 | } | 643 | } |
640 | 644 | ||
641 | static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste) | 645 | static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste, pte_t entry) |
642 | { | 646 | { |
643 | #ifdef CONFIG_PGSTE | 647 | #ifdef CONFIG_PGSTE |
644 | unsigned long address; | 648 | unsigned long address; |
645 | unsigned long okey, nkey; | 649 | unsigned long okey, nkey; |
646 | 650 | ||
647 | address = pte_val(*ptep) & PAGE_MASK; | 651 | if (!pte_present(entry)) |
652 | return; | ||
653 | address = pte_val(entry) & PAGE_MASK; | ||
648 | okey = nkey = page_get_storage_key(address); | 654 | okey = nkey = page_get_storage_key(address); |
649 | nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT); | 655 | nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT); |
650 | /* Set page access key and fetch protection bit from pgste */ | 656 | /* Set page access key and fetch protection bit from pgste */ |
@@ -712,7 +718,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
712 | 718 | ||
713 | if (mm_has_pgste(mm)) { | 719 | if (mm_has_pgste(mm)) { |
714 | pgste = pgste_get_lock(ptep); | 720 | pgste = pgste_get_lock(ptep); |
715 | pgste_set_pte(ptep, pgste); | 721 | pgste_set_pte(ptep, pgste, entry); |
716 | *ptep = entry; | 722 | *ptep = entry; |
717 | pgste_set_unlock(ptep, pgste); | 723 | pgste_set_unlock(ptep, pgste); |
718 | } else | 724 | } else |
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index 5a099714df04..097183c70407 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h | |||
@@ -82,6 +82,7 @@ extern unsigned int user_mode; | |||
82 | #define MACHINE_FLAG_LPAR (1UL << 12) | 82 | #define MACHINE_FLAG_LPAR (1UL << 12) |
83 | #define MACHINE_FLAG_SPP (1UL << 13) | 83 | #define MACHINE_FLAG_SPP (1UL << 13) |
84 | #define MACHINE_FLAG_TOPOLOGY (1UL << 14) | 84 | #define MACHINE_FLAG_TOPOLOGY (1UL << 14) |
85 | #define MACHINE_FLAG_STCKF (1UL << 15) | ||
85 | 86 | ||
86 | #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) | 87 | #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) |
87 | #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) | 88 | #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) |
@@ -100,6 +101,7 @@ extern unsigned int user_mode; | |||
100 | #define MACHINE_HAS_PFMF (0) | 101 | #define MACHINE_HAS_PFMF (0) |
101 | #define MACHINE_HAS_SPP (0) | 102 | #define MACHINE_HAS_SPP (0) |
102 | #define MACHINE_HAS_TOPOLOGY (0) | 103 | #define MACHINE_HAS_TOPOLOGY (0) |
104 | #define MACHINE_HAS_STCKF (0) | ||
103 | #else /* __s390x__ */ | 105 | #else /* __s390x__ */ |
104 | #define MACHINE_HAS_IEEE (1) | 106 | #define MACHINE_HAS_IEEE (1) |
105 | #define MACHINE_HAS_CSP (1) | 107 | #define MACHINE_HAS_CSP (1) |
@@ -111,6 +113,7 @@ extern unsigned int user_mode; | |||
111 | #define MACHINE_HAS_PFMF (S390_lowcore.machine_flags & MACHINE_FLAG_PFMF) | 113 | #define MACHINE_HAS_PFMF (S390_lowcore.machine_flags & MACHINE_FLAG_PFMF) |
112 | #define MACHINE_HAS_SPP (S390_lowcore.machine_flags & MACHINE_FLAG_SPP) | 114 | #define MACHINE_HAS_SPP (S390_lowcore.machine_flags & MACHINE_FLAG_SPP) |
113 | #define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY) | 115 | #define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY) |
116 | #define MACHINE_HAS_STCKF (S390_lowcore.machine_flags & MACHINE_FLAG_STCKF) | ||
114 | #endif /* __s390x__ */ | 117 | #endif /* __s390x__ */ |
115 | 118 | ||
116 | #define ZFCPDUMP_HSA_SIZE (32UL<<20) | 119 | #define ZFCPDUMP_HSA_SIZE (32UL<<20) |
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index d610bef9c5e9..c447a27a7fdb 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
@@ -90,7 +90,7 @@ static inline unsigned long long get_clock_fast(void) | |||
90 | { | 90 | { |
91 | unsigned long long clk; | 91 | unsigned long long clk; |
92 | 92 | ||
93 | if (test_facility(25)) | 93 | if (MACHINE_HAS_STCKF) |
94 | asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc"); | 94 | asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc"); |
95 | else | 95 | else |
96 | clk = get_clock(); | 96 | clk = get_clock(); |
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h index 404bdb9671b4..58de4c91c333 100644 --- a/arch/s390/include/asm/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
@@ -277,7 +277,9 @@ | |||
277 | #define __NR_clock_adjtime 337 | 277 | #define __NR_clock_adjtime 337 |
278 | #define __NR_syncfs 338 | 278 | #define __NR_syncfs 338 |
279 | #define __NR_setns 339 | 279 | #define __NR_setns 339 |
280 | #define NR_syscalls 340 | 280 | #define __NR_process_vm_readv 340 |
281 | #define __NR_process_vm_writev 341 | ||
282 | #define NR_syscalls 342 | ||
281 | 283 | ||
282 | /* | 284 | /* |
283 | * There are some system calls that are not present on 64 bit, some | 285 | * There are some system calls that are not present on 64 bit, some |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 5006a1d9f5d0..18c51df9fe06 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1627,3 +1627,23 @@ ENTRY(sys_setns_wrapper) | |||
1627 | lgfr %r2,%r2 # int | 1627 | lgfr %r2,%r2 # int |
1628 | lgfr %r3,%r3 # int | 1628 | lgfr %r3,%r3 # int |
1629 | jg sys_setns | 1629 | jg sys_setns |
1630 | |||
1631 | ENTRY(compat_sys_process_vm_readv_wrapper) | ||
1632 | lgfr %r2,%r2 # compat_pid_t | ||
1633 | llgtr %r3,%r3 # struct compat_iovec __user * | ||
1634 | llgfr %r4,%r4 # unsigned long | ||
1635 | llgtr %r5,%r5 # struct compat_iovec __user * | ||
1636 | llgfr %r6,%r6 # unsigned long | ||
1637 | llgf %r0,164(%r15) # unsigned long | ||
1638 | stg %r0,160(%r15) | ||
1639 | jg sys_process_vm_readv | ||
1640 | |||
1641 | ENTRY(compat_sys_process_vm_writev_wrapper) | ||
1642 | lgfr %r2,%r2 # compat_pid_t | ||
1643 | llgtr %r3,%r3 # struct compat_iovec __user * | ||
1644 | llgfr %r4,%r4 # unsigned long | ||
1645 | llgtr %r5,%r5 # struct compat_iovec __user * | ||
1646 | llgfr %r6,%r6 # unsigned long | ||
1647 | llgf %r0,164(%r15) # unsigned long | ||
1648 | stg %r0,160(%r15) | ||
1649 | jg sys_process_vm_writev | ||
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 37394b3413e2..c9ffe0025197 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -390,6 +390,8 @@ static __init void detect_machine_facilities(void) | |||
390 | S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS; | 390 | S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS; |
391 | if (test_facility(40)) | 391 | if (test_facility(40)) |
392 | S390_lowcore.machine_flags |= MACHINE_FLAG_SPP; | 392 | S390_lowcore.machine_flags |= MACHINE_FLAG_SPP; |
393 | if (test_facility(25)) | ||
394 | S390_lowcore.machine_flags |= MACHINE_FLAG_STCKF; | ||
393 | #endif | 395 | #endif |
394 | } | 396 | } |
395 | 397 | ||
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 450931a45b68..573bc29551ef 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -296,13 +296,6 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
296 | ((data & PSW_MASK_EA) && !(data & PSW_MASK_BA)))) | 296 | ((data & PSW_MASK_EA) && !(data & PSW_MASK_BA)))) |
297 | /* Invalid psw mask. */ | 297 | /* Invalid psw mask. */ |
298 | return -EINVAL; | 298 | return -EINVAL; |
299 | if (addr == (addr_t) &dummy->regs.psw.addr) | ||
300 | /* | ||
301 | * The debugger changed the instruction address, | ||
302 | * reset system call restart, see signal.c:do_signal | ||
303 | */ | ||
304 | task_thread_info(child)->system_call = 0; | ||
305 | |||
306 | *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data; | 299 | *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data; |
307 | 300 | ||
308 | } else if (addr < (addr_t) (&dummy->regs.orig_gpr2)) { | 301 | } else if (addr < (addr_t) (&dummy->regs.orig_gpr2)) { |
@@ -614,11 +607,6 @@ static int __poke_user_compat(struct task_struct *child, | |||
614 | /* Transfer 31 bit amode bit to psw mask. */ | 607 | /* Transfer 31 bit amode bit to psw mask. */ |
615 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_BA) | | 608 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_BA) | |
616 | (__u64)(tmp & PSW32_ADDR_AMODE); | 609 | (__u64)(tmp & PSW32_ADDR_AMODE); |
617 | /* | ||
618 | * The debugger changed the instruction address, | ||
619 | * reset system call restart, see signal.c:do_signal | ||
620 | */ | ||
621 | task_thread_info(child)->system_call = 0; | ||
622 | } else { | 610 | } else { |
623 | /* gpr 0-15 */ | 611 | /* gpr 0-15 */ |
624 | *(__u32*)((addr_t) ®s->psw + addr*2 + 4) = tmp; | 612 | *(__u32*)((addr_t) ®s->psw + addr*2 + 4) = tmp; |
@@ -905,6 +893,14 @@ static int s390_last_break_get(struct task_struct *target, | |||
905 | return 0; | 893 | return 0; |
906 | } | 894 | } |
907 | 895 | ||
896 | static int s390_last_break_set(struct task_struct *target, | ||
897 | const struct user_regset *regset, | ||
898 | unsigned int pos, unsigned int count, | ||
899 | const void *kbuf, const void __user *ubuf) | ||
900 | { | ||
901 | return 0; | ||
902 | } | ||
903 | |||
908 | #endif | 904 | #endif |
909 | 905 | ||
910 | static int s390_system_call_get(struct task_struct *target, | 906 | static int s390_system_call_get(struct task_struct *target, |
@@ -951,6 +947,7 @@ static const struct user_regset s390_regsets[] = { | |||
951 | .size = sizeof(long), | 947 | .size = sizeof(long), |
952 | .align = sizeof(long), | 948 | .align = sizeof(long), |
953 | .get = s390_last_break_get, | 949 | .get = s390_last_break_get, |
950 | .set = s390_last_break_set, | ||
954 | }, | 951 | }, |
955 | #endif | 952 | #endif |
956 | [REGSET_SYSTEM_CALL] = { | 953 | [REGSET_SYSTEM_CALL] = { |
@@ -1116,6 +1113,14 @@ static int s390_compat_last_break_get(struct task_struct *target, | |||
1116 | return 0; | 1113 | return 0; |
1117 | } | 1114 | } |
1118 | 1115 | ||
1116 | static int s390_compat_last_break_set(struct task_struct *target, | ||
1117 | const struct user_regset *regset, | ||
1118 | unsigned int pos, unsigned int count, | ||
1119 | const void *kbuf, const void __user *ubuf) | ||
1120 | { | ||
1121 | return 0; | ||
1122 | } | ||
1123 | |||
1119 | static const struct user_regset s390_compat_regsets[] = { | 1124 | static const struct user_regset s390_compat_regsets[] = { |
1120 | [REGSET_GENERAL] = { | 1125 | [REGSET_GENERAL] = { |
1121 | .core_note_type = NT_PRSTATUS, | 1126 | .core_note_type = NT_PRSTATUS, |
@@ -1139,6 +1144,7 @@ static const struct user_regset s390_compat_regsets[] = { | |||
1139 | .size = sizeof(long), | 1144 | .size = sizeof(long), |
1140 | .align = sizeof(long), | 1145 | .align = sizeof(long), |
1141 | .get = s390_compat_last_break_get, | 1146 | .get = s390_compat_last_break_get, |
1147 | .set = s390_compat_last_break_set, | ||
1142 | }, | 1148 | }, |
1143 | [REGSET_SYSTEM_CALL] = { | 1149 | [REGSET_SYSTEM_CALL] = { |
1144 | .core_note_type = NT_S390_SYSTEM_CALL, | 1150 | .core_note_type = NT_S390_SYSTEM_CALL, |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 8ac6bfa2786c..e54c4ff8abaa 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -211,6 +211,8 @@ static void __init setup_zfcpdump(unsigned int console_devno) | |||
211 | 211 | ||
212 | if (ipl_info.type != IPL_TYPE_FCP_DUMP) | 212 | if (ipl_info.type != IPL_TYPE_FCP_DUMP) |
213 | return; | 213 | return; |
214 | if (OLDMEM_BASE) | ||
215 | return; | ||
214 | if (console_devno != -1) | 216 | if (console_devno != -1) |
215 | sprintf(str, " cio_ignore=all,!0.0.%04x,!0.0.%04x", | 217 | sprintf(str, " cio_ignore=all,!0.0.%04x,!0.0.%04x", |
216 | ipl_info.data.fcp.dev_id.devno, console_devno); | 218 | ipl_info.data.fcp.dev_id.devno, console_devno); |
@@ -482,7 +484,7 @@ static void __init setup_memory_end(void) | |||
482 | 484 | ||
483 | 485 | ||
484 | #ifdef CONFIG_ZFCPDUMP | 486 | #ifdef CONFIG_ZFCPDUMP |
485 | if (ipl_info.type == IPL_TYPE_FCP_DUMP) { | 487 | if (ipl_info.type == IPL_TYPE_FCP_DUMP && !OLDMEM_BASE) { |
486 | memory_end = ZFCPDUMP_HSA_SIZE; | 488 | memory_end = ZFCPDUMP_HSA_SIZE; |
487 | memory_end_set = 1; | 489 | memory_end_set = 1; |
488 | } | 490 | } |
@@ -577,7 +579,7 @@ static unsigned long __init find_crash_base(unsigned long crash_size, | |||
577 | *msg = "first memory chunk must be at least crashkernel size"; | 579 | *msg = "first memory chunk must be at least crashkernel size"; |
578 | return 0; | 580 | return 0; |
579 | } | 581 | } |
580 | if (is_kdump_kernel() && (crash_size == OLDMEM_SIZE)) | 582 | if (OLDMEM_BASE && crash_size == OLDMEM_SIZE) |
581 | return OLDMEM_BASE; | 583 | return OLDMEM_BASE; |
582 | 584 | ||
583 | for (i = MEMORY_CHUNKS - 1; i >= 0; i--) { | 585 | for (i = MEMORY_CHUNKS - 1; i >= 0; i--) { |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 05a85bc14c98..7f6f9f354545 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -460,9 +460,9 @@ void do_signal(struct pt_regs *regs) | |||
460 | regs->svc_code >> 16); | 460 | regs->svc_code >> 16); |
461 | break; | 461 | break; |
462 | } | 462 | } |
463 | /* No longer in a system call */ | ||
464 | clear_thread_flag(TIF_SYSCALL); | ||
465 | } | 463 | } |
464 | /* No longer in a system call */ | ||
465 | clear_thread_flag(TIF_SYSCALL); | ||
466 | 466 | ||
467 | if ((is_compat_task() ? | 467 | if ((is_compat_task() ? |
468 | handle_signal32(signr, &ka, &info, oldset, regs) : | 468 | handle_signal32(signr, &ka, &info, oldset, regs) : |
@@ -486,6 +486,7 @@ void do_signal(struct pt_regs *regs) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | /* No handlers present - check for system call restart */ | 488 | /* No handlers present - check for system call restart */ |
489 | clear_thread_flag(TIF_SYSCALL); | ||
489 | if (current_thread_info()->system_call) { | 490 | if (current_thread_info()->system_call) { |
490 | regs->svc_code = current_thread_info()->system_call; | 491 | regs->svc_code = current_thread_info()->system_call; |
491 | switch (regs->gprs[2]) { | 492 | switch (regs->gprs[2]) { |
@@ -500,9 +501,6 @@ void do_signal(struct pt_regs *regs) | |||
500 | regs->gprs[2] = regs->orig_gpr2; | 501 | regs->gprs[2] = regs->orig_gpr2; |
501 | set_thread_flag(TIF_SYSCALL); | 502 | set_thread_flag(TIF_SYSCALL); |
502 | break; | 503 | break; |
503 | default: | ||
504 | clear_thread_flag(TIF_SYSCALL); | ||
505 | break; | ||
506 | } | 504 | } |
507 | } | 505 | } |
508 | 506 | ||
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 73eb08c874fb..bcab2f04ba58 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -348,3 +348,5 @@ SYSCALL(sys_open_by_handle_at,sys_open_by_handle_at,compat_sys_open_by_handle_at | |||
348 | SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper) | 348 | SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper) |
349 | SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper) | 349 | SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper) |
350 | SYSCALL(sys_setns,sys_setns,sys_setns_wrapper) | 350 | SYSCALL(sys_setns,sys_setns,sys_setns_wrapper) |
351 | SYSCALL(sys_process_vm_readv,sys_process_vm_readv,compat_sys_process_vm_readv_wrapper) /* 340 */ | ||
352 | SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev_wrapper) | ||
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 77b8942b9a15..fdb5b8cb260f 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -68,8 +68,10 @@ static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu) | |||
68 | return mask; | 68 | return mask; |
69 | } | 69 | } |
70 | 70 | ||
71 | static void add_cpus_to_mask(struct topology_cpu *tl_cpu, | 71 | static struct mask_info *add_cpus_to_mask(struct topology_cpu *tl_cpu, |
72 | struct mask_info *book, struct mask_info *core) | 72 | struct mask_info *book, |
73 | struct mask_info *core, | ||
74 | int z10) | ||
73 | { | 75 | { |
74 | unsigned int cpu; | 76 | unsigned int cpu; |
75 | 77 | ||
@@ -88,10 +90,16 @@ static void add_cpus_to_mask(struct topology_cpu *tl_cpu, | |||
88 | cpu_book_id[lcpu] = book->id; | 90 | cpu_book_id[lcpu] = book->id; |
89 | #endif | 91 | #endif |
90 | cpumask_set_cpu(lcpu, &core->mask); | 92 | cpumask_set_cpu(lcpu, &core->mask); |
91 | cpu_core_id[lcpu] = core->id; | 93 | if (z10) { |
94 | cpu_core_id[lcpu] = rcpu; | ||
95 | core = core->next; | ||
96 | } else { | ||
97 | cpu_core_id[lcpu] = core->id; | ||
98 | } | ||
92 | smp_cpu_polarization[lcpu] = tl_cpu->pp; | 99 | smp_cpu_polarization[lcpu] = tl_cpu->pp; |
93 | } | 100 | } |
94 | } | 101 | } |
102 | return core; | ||
95 | } | 103 | } |
96 | 104 | ||
97 | static void clear_masks(void) | 105 | static void clear_masks(void) |
@@ -123,18 +131,41 @@ static void tl_to_cores(struct sysinfo_15_1_x *info) | |||
123 | { | 131 | { |
124 | #ifdef CONFIG_SCHED_BOOK | 132 | #ifdef CONFIG_SCHED_BOOK |
125 | struct mask_info *book = &book_info; | 133 | struct mask_info *book = &book_info; |
134 | struct cpuid cpu_id; | ||
126 | #else | 135 | #else |
127 | struct mask_info *book = NULL; | 136 | struct mask_info *book = NULL; |
128 | #endif | 137 | #endif |
129 | struct mask_info *core = &core_info; | 138 | struct mask_info *core = &core_info; |
130 | union topology_entry *tle, *end; | 139 | union topology_entry *tle, *end; |
140 | int z10 = 0; | ||
131 | 141 | ||
132 | 142 | #ifdef CONFIG_SCHED_BOOK | |
143 | get_cpu_id(&cpu_id); | ||
144 | z10 = cpu_id.machine == 0x2097 || cpu_id.machine == 0x2098; | ||
145 | #endif | ||
133 | spin_lock_irq(&topology_lock); | 146 | spin_lock_irq(&topology_lock); |
134 | clear_masks(); | 147 | clear_masks(); |
135 | tle = info->tle; | 148 | tle = info->tle; |
136 | end = (union topology_entry *)((unsigned long)info + info->length); | 149 | end = (union topology_entry *)((unsigned long)info + info->length); |
137 | while (tle < end) { | 150 | while (tle < end) { |
151 | #ifdef CONFIG_SCHED_BOOK | ||
152 | if (z10) { | ||
153 | switch (tle->nl) { | ||
154 | case 1: | ||
155 | book = book->next; | ||
156 | book->id = tle->container.id; | ||
157 | break; | ||
158 | case 0: | ||
159 | core = add_cpus_to_mask(&tle->cpu, book, core, z10); | ||
160 | break; | ||
161 | default: | ||
162 | clear_masks(); | ||
163 | goto out; | ||
164 | } | ||
165 | tle = next_tle(tle); | ||
166 | continue; | ||
167 | } | ||
168 | #endif | ||
138 | switch (tle->nl) { | 169 | switch (tle->nl) { |
139 | #ifdef CONFIG_SCHED_BOOK | 170 | #ifdef CONFIG_SCHED_BOOK |
140 | case 2: | 171 | case 2: |
@@ -147,7 +178,7 @@ static void tl_to_cores(struct sysinfo_15_1_x *info) | |||
147 | core->id = tle->container.id; | 178 | core->id = tle->container.id; |
148 | break; | 179 | break; |
149 | case 0: | 180 | case 0: |
150 | add_cpus_to_mask(&tle->cpu, book, core); | 181 | add_cpus_to_mask(&tle->cpu, book, core, z10); |
151 | break; | 182 | break; |
152 | default: | 183 | default: |
153 | clear_masks(); | 184 | clear_masks(); |
@@ -328,8 +359,8 @@ void __init s390_init_cpu_topology(void) | |||
328 | for (i = 0; i < TOPOLOGY_NR_MAG; i++) | 359 | for (i = 0; i < TOPOLOGY_NR_MAG; i++) |
329 | printk(" %d", info->mag[i]); | 360 | printk(" %d", info->mag[i]); |
330 | printk(" / %d\n", info->mnest); | 361 | printk(" / %d\n", info->mnest); |
331 | alloc_masks(info, &core_info, 2); | 362 | alloc_masks(info, &core_info, 1); |
332 | #ifdef CONFIG_SCHED_BOOK | 363 | #ifdef CONFIG_SCHED_BOOK |
333 | alloc_masks(info, &book_info, 3); | 364 | alloc_masks(info, &book_info, 2); |
334 | #endif | 365 | #endif |
335 | } | 366 | } |
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index 56fe6bc81fee..e4c79ebb40e6 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S | |||
@@ -43,6 +43,8 @@ SECTIONS | |||
43 | 43 | ||
44 | NOTES :text :note | 44 | NOTES :text :note |
45 | 45 | ||
46 | .dummy : { *(.dummy) } :data | ||
47 | |||
46 | RODATA | 48 | RODATA |
47 | 49 | ||
48 | #ifdef CONFIG_SHARED_KERNEL | 50 | #ifdef CONFIG_SHARED_KERNEL |
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index 87cedd61be04..8943e82cd4d9 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c | |||
@@ -70,7 +70,7 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu) | |||
70 | return -EOPNOTSUPP; | 70 | return -EOPNOTSUPP; |
71 | } | 71 | } |
72 | 72 | ||
73 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | 73 | atomic_set_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags); |
74 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM; | 74 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM; |
75 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL; | 75 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL; |
76 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT; | 76 | vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT; |
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index c7c51898984e..02434543eabb 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -132,7 +132,6 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
132 | int rc = 0; | 132 | int rc = 0; |
133 | 133 | ||
134 | vcpu->stat.exit_stop_request++; | 134 | vcpu->stat.exit_stop_request++; |
135 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | ||
136 | spin_lock_bh(&vcpu->arch.local_int.lock); | 135 | spin_lock_bh(&vcpu->arch.local_int.lock); |
137 | if (vcpu->arch.local_int.action_bits & ACTION_STORE_ON_STOP) { | 136 | if (vcpu->arch.local_int.action_bits & ACTION_STORE_ON_STOP) { |
138 | vcpu->arch.local_int.action_bits &= ~ACTION_STORE_ON_STOP; | 137 | vcpu->arch.local_int.action_bits &= ~ACTION_STORE_ON_STOP; |
@@ -149,6 +148,8 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
149 | } | 148 | } |
150 | 149 | ||
151 | if (vcpu->arch.local_int.action_bits & ACTION_STOP_ON_STOP) { | 150 | if (vcpu->arch.local_int.action_bits & ACTION_STOP_ON_STOP) { |
151 | atomic_set_mask(CPUSTAT_STOPPED, | ||
152 | &vcpu->arch.sie_block->cpuflags); | ||
152 | vcpu->arch.local_int.action_bits &= ~ACTION_STOP_ON_STOP; | 153 | vcpu->arch.local_int.action_bits &= ~ACTION_STOP_ON_STOP; |
153 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); | 154 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); |
154 | rc = -EOPNOTSUPP; | 155 | rc = -EOPNOTSUPP; |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 87c16705b381..278ee009ce65 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -252,6 +252,7 @@ static void __do_deliver_interrupt(struct kvm_vcpu *vcpu, | |||
252 | offsetof(struct _lowcore, restart_psw), sizeof(psw_t)); | 252 | offsetof(struct _lowcore, restart_psw), sizeof(psw_t)); |
253 | if (rc == -EFAULT) | 253 | if (rc == -EFAULT) |
254 | exception = 1; | 254 | exception = 1; |
255 | atomic_clear_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags); | ||
255 | break; | 256 | break; |
256 | 257 | ||
257 | case KVM_S390_PROGRAM_INT: | 258 | case KVM_S390_PROGRAM_INT: |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 0bd3bea1e4cd..d1c445732451 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -65,6 +65,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
65 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, | 65 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, |
66 | { "instruction_tprot", VCPU_STAT(instruction_tprot) }, | 66 | { "instruction_tprot", VCPU_STAT(instruction_tprot) }, |
67 | { "instruction_sigp_sense", VCPU_STAT(instruction_sigp_sense) }, | 67 | { "instruction_sigp_sense", VCPU_STAT(instruction_sigp_sense) }, |
68 | { "instruction_sigp_sense_running", VCPU_STAT(instruction_sigp_sense_running) }, | ||
68 | { "instruction_sigp_external_call", VCPU_STAT(instruction_sigp_external_call) }, | 69 | { "instruction_sigp_external_call", VCPU_STAT(instruction_sigp_external_call) }, |
69 | { "instruction_sigp_emergency", VCPU_STAT(instruction_sigp_emergency) }, | 70 | { "instruction_sigp_emergency", VCPU_STAT(instruction_sigp_emergency) }, |
70 | { "instruction_sigp_stop", VCPU_STAT(instruction_sigp_stop) }, | 71 | { "instruction_sigp_stop", VCPU_STAT(instruction_sigp_stop) }, |
@@ -127,6 +128,7 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
127 | switch (ext) { | 128 | switch (ext) { |
128 | case KVM_CAP_S390_PSW: | 129 | case KVM_CAP_S390_PSW: |
129 | case KVM_CAP_S390_GMAP: | 130 | case KVM_CAP_S390_GMAP: |
131 | case KVM_CAP_SYNC_MMU: | ||
130 | r = 1; | 132 | r = 1; |
131 | break; | 133 | break; |
132 | default: | 134 | default: |
@@ -270,10 +272,12 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
270 | restore_fp_regs(&vcpu->arch.guest_fpregs); | 272 | restore_fp_regs(&vcpu->arch.guest_fpregs); |
271 | restore_access_regs(vcpu->arch.guest_acrs); | 273 | restore_access_regs(vcpu->arch.guest_acrs); |
272 | gmap_enable(vcpu->arch.gmap); | 274 | gmap_enable(vcpu->arch.gmap); |
275 | atomic_set_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | ||
273 | } | 276 | } |
274 | 277 | ||
275 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) | 278 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) |
276 | { | 279 | { |
280 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | ||
277 | gmap_disable(vcpu->arch.gmap); | 281 | gmap_disable(vcpu->arch.gmap); |
278 | save_fp_regs(&vcpu->arch.guest_fpregs); | 282 | save_fp_regs(&vcpu->arch.guest_fpregs); |
279 | save_access_regs(vcpu->arch.guest_acrs); | 283 | save_access_regs(vcpu->arch.guest_acrs); |
@@ -301,7 +305,9 @@ static void kvm_s390_vcpu_initial_reset(struct kvm_vcpu *vcpu) | |||
301 | 305 | ||
302 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | 306 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) |
303 | { | 307 | { |
304 | atomic_set(&vcpu->arch.sie_block->cpuflags, CPUSTAT_ZARCH | CPUSTAT_SM); | 308 | atomic_set(&vcpu->arch.sie_block->cpuflags, CPUSTAT_ZARCH | |
309 | CPUSTAT_SM | | ||
310 | CPUSTAT_STOPPED); | ||
305 | vcpu->arch.sie_block->ecb = 6; | 311 | vcpu->arch.sie_block->ecb = 6; |
306 | vcpu->arch.sie_block->eca = 0xC1002001U; | 312 | vcpu->arch.sie_block->eca = 0xC1002001U; |
307 | vcpu->arch.sie_block->fac = (int) (long) facilities; | 313 | vcpu->arch.sie_block->fac = (int) (long) facilities; |
@@ -428,7 +434,7 @@ static int kvm_arch_vcpu_ioctl_set_initial_psw(struct kvm_vcpu *vcpu, psw_t psw) | |||
428 | { | 434 | { |
429 | int rc = 0; | 435 | int rc = 0; |
430 | 436 | ||
431 | if (atomic_read(&vcpu->arch.sie_block->cpuflags) & CPUSTAT_RUNNING) | 437 | if (!(atomic_read(&vcpu->arch.sie_block->cpuflags) & CPUSTAT_STOPPED)) |
432 | rc = -EBUSY; | 438 | rc = -EBUSY; |
433 | else { | 439 | else { |
434 | vcpu->run->psw_mask = psw.mask; | 440 | vcpu->run->psw_mask = psw.mask; |
@@ -501,7 +507,7 @@ rerun_vcpu: | |||
501 | if (vcpu->sigset_active) | 507 | if (vcpu->sigset_active) |
502 | sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); | 508 | sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); |
503 | 509 | ||
504 | atomic_set_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | 510 | atomic_clear_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags); |
505 | 511 | ||
506 | BUG_ON(vcpu->kvm->arch.float_int.local_int[vcpu->vcpu_id] == NULL); | 512 | BUG_ON(vcpu->kvm->arch.float_int.local_int[vcpu->vcpu_id] == NULL); |
507 | 513 | ||
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 391626361084..d02638959922 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -336,6 +336,7 @@ static int handle_tprot(struct kvm_vcpu *vcpu) | |||
336 | u64 address1 = disp1 + base1 ? vcpu->arch.guest_gprs[base1] : 0; | 336 | u64 address1 = disp1 + base1 ? vcpu->arch.guest_gprs[base1] : 0; |
337 | u64 address2 = disp2 + base2 ? vcpu->arch.guest_gprs[base2] : 0; | 337 | u64 address2 = disp2 + base2 ? vcpu->arch.guest_gprs[base2] : 0; |
338 | struct vm_area_struct *vma; | 338 | struct vm_area_struct *vma; |
339 | unsigned long user_address; | ||
339 | 340 | ||
340 | vcpu->stat.instruction_tprot++; | 341 | vcpu->stat.instruction_tprot++; |
341 | 342 | ||
@@ -349,9 +350,14 @@ static int handle_tprot(struct kvm_vcpu *vcpu) | |||
349 | return -EOPNOTSUPP; | 350 | return -EOPNOTSUPP; |
350 | 351 | ||
351 | 352 | ||
353 | /* we must resolve the address without holding the mmap semaphore. | ||
354 | * This is ok since the userspace hypervisor is not supposed to change | ||
355 | * the mapping while the guest queries the memory. Otherwise the guest | ||
356 | * might crash or get wrong info anyway. */ | ||
357 | user_address = (unsigned long) __guestaddr_to_user(vcpu, address1); | ||
358 | |||
352 | down_read(¤t->mm->mmap_sem); | 359 | down_read(¤t->mm->mmap_sem); |
353 | vma = find_vma(current->mm, | 360 | vma = find_vma(current->mm, user_address); |
354 | (unsigned long) __guestaddr_to_user(vcpu, address1)); | ||
355 | if (!vma) { | 361 | if (!vma) { |
356 | up_read(¤t->mm->mmap_sem); | 362 | up_read(¤t->mm->mmap_sem); |
357 | return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); | 363 | return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); |
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index f815118835f3..0a7941d74bc6 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c | |||
@@ -31,9 +31,11 @@ | |||
31 | #define SIGP_SET_PREFIX 0x0d | 31 | #define SIGP_SET_PREFIX 0x0d |
32 | #define SIGP_STORE_STATUS_ADDR 0x0e | 32 | #define SIGP_STORE_STATUS_ADDR 0x0e |
33 | #define SIGP_SET_ARCH 0x12 | 33 | #define SIGP_SET_ARCH 0x12 |
34 | #define SIGP_SENSE_RUNNING 0x15 | ||
34 | 35 | ||
35 | /* cpu status bits */ | 36 | /* cpu status bits */ |
36 | #define SIGP_STAT_EQUIPMENT_CHECK 0x80000000UL | 37 | #define SIGP_STAT_EQUIPMENT_CHECK 0x80000000UL |
38 | #define SIGP_STAT_NOT_RUNNING 0x00000400UL | ||
37 | #define SIGP_STAT_INCORRECT_STATE 0x00000200UL | 39 | #define SIGP_STAT_INCORRECT_STATE 0x00000200UL |
38 | #define SIGP_STAT_INVALID_PARAMETER 0x00000100UL | 40 | #define SIGP_STAT_INVALID_PARAMETER 0x00000100UL |
39 | #define SIGP_STAT_EXT_CALL_PENDING 0x00000080UL | 41 | #define SIGP_STAT_EXT_CALL_PENDING 0x00000080UL |
@@ -57,8 +59,8 @@ static int __sigp_sense(struct kvm_vcpu *vcpu, u16 cpu_addr, | |||
57 | spin_lock(&fi->lock); | 59 | spin_lock(&fi->lock); |
58 | if (fi->local_int[cpu_addr] == NULL) | 60 | if (fi->local_int[cpu_addr] == NULL) |
59 | rc = 3; /* not operational */ | 61 | rc = 3; /* not operational */ |
60 | else if (atomic_read(fi->local_int[cpu_addr]->cpuflags) | 62 | else if (!(atomic_read(fi->local_int[cpu_addr]->cpuflags) |
61 | & CPUSTAT_RUNNING) { | 63 | & CPUSTAT_STOPPED)) { |
62 | *reg &= 0xffffffff00000000UL; | 64 | *reg &= 0xffffffff00000000UL; |
63 | rc = 1; /* status stored */ | 65 | rc = 1; /* status stored */ |
64 | } else { | 66 | } else { |
@@ -251,7 +253,7 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address, | |||
251 | 253 | ||
252 | spin_lock_bh(&li->lock); | 254 | spin_lock_bh(&li->lock); |
253 | /* cpu must be in stopped state */ | 255 | /* cpu must be in stopped state */ |
254 | if (atomic_read(li->cpuflags) & CPUSTAT_RUNNING) { | 256 | if (!(atomic_read(li->cpuflags) & CPUSTAT_STOPPED)) { |
255 | rc = 1; /* incorrect state */ | 257 | rc = 1; /* incorrect state */ |
256 | *reg &= SIGP_STAT_INCORRECT_STATE; | 258 | *reg &= SIGP_STAT_INCORRECT_STATE; |
257 | kfree(inti); | 259 | kfree(inti); |
@@ -275,6 +277,38 @@ out_fi: | |||
275 | return rc; | 277 | return rc; |
276 | } | 278 | } |
277 | 279 | ||
280 | static int __sigp_sense_running(struct kvm_vcpu *vcpu, u16 cpu_addr, | ||
281 | unsigned long *reg) | ||
282 | { | ||
283 | int rc; | ||
284 | struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; | ||
285 | |||
286 | if (cpu_addr >= KVM_MAX_VCPUS) | ||
287 | return 3; /* not operational */ | ||
288 | |||
289 | spin_lock(&fi->lock); | ||
290 | if (fi->local_int[cpu_addr] == NULL) | ||
291 | rc = 3; /* not operational */ | ||
292 | else { | ||
293 | if (atomic_read(fi->local_int[cpu_addr]->cpuflags) | ||
294 | & CPUSTAT_RUNNING) { | ||
295 | /* running */ | ||
296 | rc = 1; | ||
297 | } else { | ||
298 | /* not running */ | ||
299 | *reg &= 0xffffffff00000000UL; | ||
300 | *reg |= SIGP_STAT_NOT_RUNNING; | ||
301 | rc = 0; | ||
302 | } | ||
303 | } | ||
304 | spin_unlock(&fi->lock); | ||
305 | |||
306 | VCPU_EVENT(vcpu, 4, "sensed running status of cpu %x rc %x", cpu_addr, | ||
307 | rc); | ||
308 | |||
309 | return rc; | ||
310 | } | ||
311 | |||
278 | int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu) | 312 | int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu) |
279 | { | 313 | { |
280 | int r1 = (vcpu->arch.sie_block->ipa & 0x00f0) >> 4; | 314 | int r1 = (vcpu->arch.sie_block->ipa & 0x00f0) >> 4; |
@@ -331,6 +365,11 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu) | |||
331 | rc = __sigp_set_prefix(vcpu, cpu_addr, parameter, | 365 | rc = __sigp_set_prefix(vcpu, cpu_addr, parameter, |
332 | &vcpu->arch.guest_gprs[r1]); | 366 | &vcpu->arch.guest_gprs[r1]); |
333 | break; | 367 | break; |
368 | case SIGP_SENSE_RUNNING: | ||
369 | vcpu->stat.instruction_sigp_sense_running++; | ||
370 | rc = __sigp_sense_running(vcpu, cpu_addr, | ||
371 | &vcpu->arch.guest_gprs[r1]); | ||
372 | break; | ||
334 | case SIGP_RESTART: | 373 | case SIGP_RESTART: |
335 | vcpu->stat.instruction_sigp_restart++; | 374 | vcpu->stat.instruction_sigp_restart++; |
336 | /* user space must know about restart */ | 375 | /* user space must know about restart */ |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 1766def5bc3f..a9a301866b3c 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -587,8 +587,13 @@ static void pfault_interrupt(unsigned int ext_int_code, | |||
587 | } else { | 587 | } else { |
588 | /* Completion interrupt was faster than initial | 588 | /* Completion interrupt was faster than initial |
589 | * interrupt. Set pfault_wait to -1 so the initial | 589 | * interrupt. Set pfault_wait to -1 so the initial |
590 | * interrupt doesn't put the task to sleep. */ | 590 | * interrupt doesn't put the task to sleep. |
591 | tsk->thread.pfault_wait = -1; | 591 | * If the task is not running, ignore the completion |
592 | * interrupt since it must be a leftover of a PFAULT | ||
593 | * CANCEL operation which didn't remove all pending | ||
594 | * completion interrupts. */ | ||
595 | if (tsk->state == TASK_RUNNING) | ||
596 | tsk->thread.pfault_wait = -1; | ||
592 | } | 597 | } |
593 | put_task_struct(tsk); | 598 | put_task_struct(tsk); |
594 | } else { | 599 | } else { |
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 5b31a8e89823..a790cc657476 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h | |||
@@ -431,10 +431,6 @@ extern unsigned long *sparc_valid_addr_bitmap; | |||
431 | #define kern_addr_valid(addr) \ | 431 | #define kern_addr_valid(addr) \ |
432 | (test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap)) | 432 | (test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap)) |
433 | 433 | ||
434 | extern int io_remap_pfn_range(struct vm_area_struct *vma, | ||
435 | unsigned long from, unsigned long pfn, | ||
436 | unsigned long size, pgprot_t prot); | ||
437 | |||
438 | /* | 434 | /* |
439 | * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in | 435 | * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in |
440 | * its high 4 bits. These macros/functions put it there or get it from there. | 436 | * its high 4 bits. These macros/functions put it there or get it from there. |
@@ -443,6 +439,22 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, | |||
443 | #define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) | 439 | #define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) |
444 | #define GET_PFN(pfn) (pfn & 0x0fffffffUL) | 440 | #define GET_PFN(pfn) (pfn & 0x0fffffffUL) |
445 | 441 | ||
442 | extern int remap_pfn_range(struct vm_area_struct *, unsigned long, unsigned long, | ||
443 | unsigned long, pgprot_t); | ||
444 | |||
445 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, | ||
446 | unsigned long from, unsigned long pfn, | ||
447 | unsigned long size, pgprot_t prot) | ||
448 | { | ||
449 | unsigned long long offset, space, phys_base; | ||
450 | |||
451 | offset = ((unsigned long long) GET_PFN(pfn)) << PAGE_SHIFT; | ||
452 | space = GET_IOSPACE(pfn); | ||
453 | phys_base = offset | (space << 32ULL); | ||
454 | |||
455 | return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot); | ||
456 | } | ||
457 | |||
446 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 458 | #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
447 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ | 459 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ |
448 | ({ \ | 460 | ({ \ |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index adf89329af59..38ebb2c60137 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -757,10 +757,6 @@ static inline bool kern_addr_valid(unsigned long addr) | |||
757 | 757 | ||
758 | extern int page_in_phys_avail(unsigned long paddr); | 758 | extern int page_in_phys_avail(unsigned long paddr); |
759 | 759 | ||
760 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | ||
761 | unsigned long pfn, | ||
762 | unsigned long size, pgprot_t prot); | ||
763 | |||
764 | /* | 760 | /* |
765 | * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in | 761 | * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in |
766 | * its high 4 bits. These macros/functions put it there or get it from there. | 762 | * its high 4 bits. These macros/functions put it there or get it from there. |
@@ -769,6 +765,22 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | |||
769 | #define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) | 765 | #define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) |
770 | #define GET_PFN(pfn) (pfn & 0x0fffffffffffffffUL) | 766 | #define GET_PFN(pfn) (pfn & 0x0fffffffffffffffUL) |
771 | 767 | ||
768 | extern int remap_pfn_range(struct vm_area_struct *, unsigned long, unsigned long, | ||
769 | unsigned long, pgprot_t); | ||
770 | |||
771 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, | ||
772 | unsigned long from, unsigned long pfn, | ||
773 | unsigned long size, pgprot_t prot) | ||
774 | { | ||
775 | unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; | ||
776 | int space = GET_IOSPACE(pfn); | ||
777 | unsigned long phys_base; | ||
778 | |||
779 | phys_base = offset | (((unsigned long) space) << 32UL); | ||
780 | |||
781 | return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot); | ||
782 | } | ||
783 | |||
772 | #include <asm-generic/pgtable.h> | 784 | #include <asm-generic/pgtable.h> |
773 | 785 | ||
774 | /* We provide our own get_unmapped_area to cope with VA holes and | 786 | /* We provide our own get_unmapped_area to cope with VA holes and |
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 7429b47c3aca..381edcd5bc29 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -1181,13 +1181,11 @@ static int __devinit ds_probe(struct vio_dev *vdev, | |||
1181 | 1181 | ||
1182 | dp->rcv_buf_len = 4096; | 1182 | dp->rcv_buf_len = 4096; |
1183 | 1183 | ||
1184 | dp->ds_states = kzalloc(sizeof(ds_states_template), | 1184 | dp->ds_states = kmemdup(ds_states_template, |
1185 | GFP_KERNEL); | 1185 | sizeof(ds_states_template), GFP_KERNEL); |
1186 | if (!dp->ds_states) | 1186 | if (!dp->ds_states) |
1187 | goto out_free_rcv_buf; | 1187 | goto out_free_rcv_buf; |
1188 | 1188 | ||
1189 | memcpy(dp->ds_states, ds_states_template, | ||
1190 | sizeof(ds_states_template)); | ||
1191 | dp->num_ds_states = ARRAY_SIZE(ds_states_template); | 1189 | dp->num_ds_states = ARRAY_SIZE(ds_states_template); |
1192 | 1190 | ||
1193 | for (i = 0; i < dp->num_ds_states; i++) | 1191 | for (i = 0; i < dp->num_ds_states; i++) |
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h index e27f8ea8656e..0c218e4c0881 100644 --- a/arch/sparc/kernel/entry.h +++ b/arch/sparc/kernel/entry.h | |||
@@ -42,6 +42,9 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr, | |||
42 | extern void fpload(unsigned long *fpregs, unsigned long *fsr); | 42 | extern void fpload(unsigned long *fpregs, unsigned long *fsr); |
43 | 43 | ||
44 | #else /* CONFIG_SPARC32 */ | 44 | #else /* CONFIG_SPARC32 */ |
45 | |||
46 | #include <asm/trap_block.h> | ||
47 | |||
45 | struct popc_3insn_patch_entry { | 48 | struct popc_3insn_patch_entry { |
46 | unsigned int addr; | 49 | unsigned int addr; |
47 | unsigned int insns[3]; | 50 | unsigned int insns[3]; |
@@ -57,6 +60,10 @@ extern struct popc_6insn_patch_entry __popc_6insn_patch, | |||
57 | __popc_6insn_patch_end; | 60 | __popc_6insn_patch_end; |
58 | 61 | ||
59 | extern void __init per_cpu_patch(void); | 62 | extern void __init per_cpu_patch(void); |
63 | extern void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *, | ||
64 | struct sun4v_1insn_patch_entry *); | ||
65 | extern void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *, | ||
66 | struct sun4v_2insn_patch_entry *); | ||
60 | extern void __init sun4v_patch(void); | 67 | extern void __init sun4v_patch(void); |
61 | extern void __init boot_cpu_id_too_large(int cpu); | 68 | extern void __init boot_cpu_id_too_large(int cpu); |
62 | extern unsigned int dcache_parity_tl1_occurred; | 69 | extern unsigned int dcache_parity_tl1_occurred; |
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index da0c6c70ccb2..e5519870c3d9 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | #include <asm/spitfire.h> | 18 | #include <asm/spitfire.h> |
19 | 19 | ||
20 | #include "entry.h" | ||
21 | |||
20 | #ifdef CONFIG_SPARC64 | 22 | #ifdef CONFIG_SPARC64 |
21 | 23 | ||
22 | #include <linux/jump_label.h> | 24 | #include <linux/jump_label.h> |
@@ -203,6 +205,29 @@ int apply_relocate_add(Elf_Shdr *sechdrs, | |||
203 | } | 205 | } |
204 | 206 | ||
205 | #ifdef CONFIG_SPARC64 | 207 | #ifdef CONFIG_SPARC64 |
208 | static void do_patch_sections(const Elf_Ehdr *hdr, | ||
209 | const Elf_Shdr *sechdrs) | ||
210 | { | ||
211 | const Elf_Shdr *s, *sun4v_1insn = NULL, *sun4v_2insn = NULL; | ||
212 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; | ||
213 | |||
214 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { | ||
215 | if (!strcmp(".sun4v_1insn_patch", secstrings + s->sh_name)) | ||
216 | sun4v_1insn = s; | ||
217 | if (!strcmp(".sun4v_2insn_patch", secstrings + s->sh_name)) | ||
218 | sun4v_2insn = s; | ||
219 | } | ||
220 | |||
221 | if (sun4v_1insn && tlb_type == hypervisor) { | ||
222 | void *p = (void *) sun4v_1insn->sh_addr; | ||
223 | sun4v_patch_1insn_range(p, p + sun4v_1insn->sh_size); | ||
224 | } | ||
225 | if (sun4v_2insn && tlb_type == hypervisor) { | ||
226 | void *p = (void *) sun4v_2insn->sh_addr; | ||
227 | sun4v_patch_2insn_range(p, p + sun4v_2insn->sh_size); | ||
228 | } | ||
229 | } | ||
230 | |||
206 | int module_finalize(const Elf_Ehdr *hdr, | 231 | int module_finalize(const Elf_Ehdr *hdr, |
207 | const Elf_Shdr *sechdrs, | 232 | const Elf_Shdr *sechdrs, |
208 | struct module *me) | 233 | struct module *me) |
@@ -210,6 +235,8 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
210 | /* make jump label nops */ | 235 | /* make jump label nops */ |
211 | jump_label_apply_nops(me); | 236 | jump_label_apply_nops(me); |
212 | 237 | ||
238 | do_patch_sections(hdr, sechdrs); | ||
239 | |||
213 | /* Cheetah's I-cache is fully coherent. */ | 240 | /* Cheetah's I-cache is fully coherent. */ |
214 | if (tlb_type == spitfire) { | 241 | if (tlb_type == spitfire) { |
215 | unsigned long va; | 242 | unsigned long va; |
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c index 46614807a57f..741df916c124 100644 --- a/arch/sparc/kernel/prom_common.c +++ b/arch/sparc/kernel/prom_common.c | |||
@@ -58,12 +58,10 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len | |||
58 | void *new_val; | 58 | void *new_val; |
59 | int err; | 59 | int err; |
60 | 60 | ||
61 | new_val = kmalloc(len, GFP_KERNEL); | 61 | new_val = kmemdup(val, len, GFP_KERNEL); |
62 | if (!new_val) | 62 | if (!new_val) |
63 | return -ENOMEM; | 63 | return -ENOMEM; |
64 | 64 | ||
65 | memcpy(new_val, val, len); | ||
66 | |||
67 | err = -ENODEV; | 65 | err = -ENODEV; |
68 | 66 | ||
69 | mutex_lock(&of_set_property_mutex); | 67 | mutex_lock(&of_set_property_mutex); |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index c965595aa7e9..a854a1c240ff 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -234,40 +234,50 @@ void __init per_cpu_patch(void) | |||
234 | } | 234 | } |
235 | } | 235 | } |
236 | 236 | ||
237 | void __init sun4v_patch(void) | 237 | void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *start, |
238 | struct sun4v_1insn_patch_entry *end) | ||
238 | { | 239 | { |
239 | extern void sun4v_hvapi_init(void); | 240 | while (start < end) { |
240 | struct sun4v_1insn_patch_entry *p1; | 241 | unsigned long addr = start->addr; |
241 | struct sun4v_2insn_patch_entry *p2; | ||
242 | |||
243 | if (tlb_type != hypervisor) | ||
244 | return; | ||
245 | 242 | ||
246 | p1 = &__sun4v_1insn_patch; | 243 | *(unsigned int *) (addr + 0) = start->insn; |
247 | while (p1 < &__sun4v_1insn_patch_end) { | ||
248 | unsigned long addr = p1->addr; | ||
249 | |||
250 | *(unsigned int *) (addr + 0) = p1->insn; | ||
251 | wmb(); | 244 | wmb(); |
252 | __asm__ __volatile__("flush %0" : : "r" (addr + 0)); | 245 | __asm__ __volatile__("flush %0" : : "r" (addr + 0)); |
253 | 246 | ||
254 | p1++; | 247 | start++; |
255 | } | 248 | } |
249 | } | ||
256 | 250 | ||
257 | p2 = &__sun4v_2insn_patch; | 251 | void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *start, |
258 | while (p2 < &__sun4v_2insn_patch_end) { | 252 | struct sun4v_2insn_patch_entry *end) |
259 | unsigned long addr = p2->addr; | 253 | { |
254 | while (start < end) { | ||
255 | unsigned long addr = start->addr; | ||
260 | 256 | ||
261 | *(unsigned int *) (addr + 0) = p2->insns[0]; | 257 | *(unsigned int *) (addr + 0) = start->insns[0]; |
262 | wmb(); | 258 | wmb(); |
263 | __asm__ __volatile__("flush %0" : : "r" (addr + 0)); | 259 | __asm__ __volatile__("flush %0" : : "r" (addr + 0)); |
264 | 260 | ||
265 | *(unsigned int *) (addr + 4) = p2->insns[1]; | 261 | *(unsigned int *) (addr + 4) = start->insns[1]; |
266 | wmb(); | 262 | wmb(); |
267 | __asm__ __volatile__("flush %0" : : "r" (addr + 4)); | 263 | __asm__ __volatile__("flush %0" : : "r" (addr + 4)); |
268 | 264 | ||
269 | p2++; | 265 | start++; |
270 | } | 266 | } |
267 | } | ||
268 | |||
269 | void __init sun4v_patch(void) | ||
270 | { | ||
271 | extern void sun4v_hvapi_init(void); | ||
272 | |||
273 | if (tlb_type != hypervisor) | ||
274 | return; | ||
275 | |||
276 | sun4v_patch_1insn_range(&__sun4v_1insn_patch, | ||
277 | &__sun4v_1insn_patch_end); | ||
278 | |||
279 | sun4v_patch_2insn_range(&__sun4v_2insn_patch, | ||
280 | &__sun4v_2insn_patch_end); | ||
271 | 281 | ||
272 | sun4v_hvapi_init(); | 282 | sun4v_hvapi_init(); |
273 | } | 283 | } |
diff --git a/arch/sparc/kernel/signal32.c b/arch/sparc/kernel/signal32.c index 2caa556db86d..023b8860dc97 100644 --- a/arch/sparc/kernel/signal32.c +++ b/arch/sparc/kernel/signal32.c | |||
@@ -822,21 +822,23 @@ static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs | |||
822 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | 822 | * want to handle. Thus you cannot kill init even with a SIGKILL even by |
823 | * mistake. | 823 | * mistake. |
824 | */ | 824 | */ |
825 | void do_signal32(sigset_t *oldset, struct pt_regs * regs, | 825 | void do_signal32(sigset_t *oldset, struct pt_regs * regs) |
826 | int restart_syscall, unsigned long orig_i0) | ||
827 | { | 826 | { |
828 | struct k_sigaction ka; | 827 | struct k_sigaction ka; |
828 | unsigned long orig_i0; | ||
829 | int restart_syscall; | ||
829 | siginfo_t info; | 830 | siginfo_t info; |
830 | int signr; | 831 | int signr; |
831 | 832 | ||
832 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 833 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
833 | 834 | ||
834 | /* If the debugger messes with the program counter, it clears | 835 | restart_syscall = 0; |
835 | * the "in syscall" bit, directing us to not perform a syscall | 836 | orig_i0 = 0; |
836 | * restart. | 837 | if (pt_regs_is_syscall(regs) && |
837 | */ | 838 | (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) { |
838 | if (restart_syscall && !pt_regs_is_syscall(regs)) | 839 | restart_syscall = 1; |
839 | restart_syscall = 0; | 840 | orig_i0 = regs->u_regs[UREG_G6]; |
841 | } | ||
840 | 842 | ||
841 | if (signr > 0) { | 843 | if (signr > 0) { |
842 | if (restart_syscall) | 844 | if (restart_syscall) |
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index 8ce247ac04cc..d54c6e53aba0 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -519,10 +519,26 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0) | |||
519 | siginfo_t info; | 519 | siginfo_t info; |
520 | int signr; | 520 | int signr; |
521 | 521 | ||
522 | /* It's a lot of work and synchronization to add a new ptrace | ||
523 | * register for GDB to save and restore in order to get | ||
524 | * orig_i0 correct for syscall restarts when debugging. | ||
525 | * | ||
526 | * Although it should be the case that most of the global | ||
527 | * registers are volatile across a system call, glibc already | ||
528 | * depends upon that fact that we preserve them. So we can't | ||
529 | * just use any global register to save away the orig_i0 value. | ||
530 | * | ||
531 | * In particular %g2, %g3, %g4, and %g5 are all assumed to be | ||
532 | * preserved across a system call trap by various pieces of | ||
533 | * code in glibc. | ||
534 | * | ||
535 | * %g7 is used as the "thread register". %g6 is not used in | ||
536 | * any fixed manner. %g6 is used as a scratch register and | ||
537 | * a compiler temporary, but it's value is never used across | ||
538 | * a system call. Therefore %g6 is usable for orig_i0 storage. | ||
539 | */ | ||
522 | if (pt_regs_is_syscall(regs) && (regs->psr & PSR_C)) | 540 | if (pt_regs_is_syscall(regs) && (regs->psr & PSR_C)) |
523 | restart_syscall = 1; | 541 | regs->u_regs[UREG_G6] = orig_i0; |
524 | else | ||
525 | restart_syscall = 0; | ||
526 | 542 | ||
527 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 543 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
528 | oldset = ¤t->saved_sigmask; | 544 | oldset = ¤t->saved_sigmask; |
@@ -535,8 +551,12 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0) | |||
535 | * the software "in syscall" bit, directing us to not perform | 551 | * the software "in syscall" bit, directing us to not perform |
536 | * a syscall restart. | 552 | * a syscall restart. |
537 | */ | 553 | */ |
538 | if (restart_syscall && !pt_regs_is_syscall(regs)) | 554 | restart_syscall = 0; |
539 | restart_syscall = 0; | 555 | if (pt_regs_is_syscall(regs) && (regs->psr & PSR_C)) { |
556 | restart_syscall = 1; | ||
557 | orig_i0 = regs->u_regs[UREG_G6]; | ||
558 | } | ||
559 | |||
540 | 560 | ||
541 | if (signr > 0) { | 561 | if (signr > 0) { |
542 | if (restart_syscall) | 562 | if (restart_syscall) |
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c index a2b81598d905..f0836cd0e2f2 100644 --- a/arch/sparc/kernel/signal_64.c +++ b/arch/sparc/kernel/signal_64.c | |||
@@ -529,11 +529,27 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0) | |||
529 | siginfo_t info; | 529 | siginfo_t info; |
530 | int signr; | 530 | int signr; |
531 | 531 | ||
532 | /* It's a lot of work and synchronization to add a new ptrace | ||
533 | * register for GDB to save and restore in order to get | ||
534 | * orig_i0 correct for syscall restarts when debugging. | ||
535 | * | ||
536 | * Although it should be the case that most of the global | ||
537 | * registers are volatile across a system call, glibc already | ||
538 | * depends upon that fact that we preserve them. So we can't | ||
539 | * just use any global register to save away the orig_i0 value. | ||
540 | * | ||
541 | * In particular %g2, %g3, %g4, and %g5 are all assumed to be | ||
542 | * preserved across a system call trap by various pieces of | ||
543 | * code in glibc. | ||
544 | * | ||
545 | * %g7 is used as the "thread register". %g6 is not used in | ||
546 | * any fixed manner. %g6 is used as a scratch register and | ||
547 | * a compiler temporary, but it's value is never used across | ||
548 | * a system call. Therefore %g6 is usable for orig_i0 storage. | ||
549 | */ | ||
532 | if (pt_regs_is_syscall(regs) && | 550 | if (pt_regs_is_syscall(regs) && |
533 | (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) { | 551 | (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) |
534 | restart_syscall = 1; | 552 | regs->u_regs[UREG_G6] = orig_i0; |
535 | } else | ||
536 | restart_syscall = 0; | ||
537 | 553 | ||
538 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) | 554 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) |
539 | oldset = ¤t->saved_sigmask; | 555 | oldset = ¤t->saved_sigmask; |
@@ -542,22 +558,20 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0) | |||
542 | 558 | ||
543 | #ifdef CONFIG_COMPAT | 559 | #ifdef CONFIG_COMPAT |
544 | if (test_thread_flag(TIF_32BIT)) { | 560 | if (test_thread_flag(TIF_32BIT)) { |
545 | extern void do_signal32(sigset_t *, struct pt_regs *, | 561 | extern void do_signal32(sigset_t *, struct pt_regs *); |
546 | int restart_syscall, | 562 | do_signal32(oldset, regs); |
547 | unsigned long orig_i0); | ||
548 | do_signal32(oldset, regs, restart_syscall, orig_i0); | ||
549 | return; | 563 | return; |
550 | } | 564 | } |
551 | #endif | 565 | #endif |
552 | 566 | ||
553 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 567 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
554 | 568 | ||
555 | /* If the debugger messes with the program counter, it clears | 569 | restart_syscall = 0; |
556 | * the software "in syscall" bit, directing us to not perform | 570 | if (pt_regs_is_syscall(regs) && |
557 | * a syscall restart. | 571 | (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) { |
558 | */ | 572 | restart_syscall = 1; |
559 | if (restart_syscall && !pt_regs_is_syscall(regs)) | 573 | orig_i0 = regs->u_regs[UREG_G6]; |
560 | restart_syscall = 0; | 574 | } |
561 | 575 | ||
562 | if (signr > 0) { | 576 | if (signr > 0) { |
563 | if (restart_syscall) | 577 | if (restart_syscall) |
diff --git a/arch/sparc/kernel/sigutil_64.c b/arch/sparc/kernel/sigutil_64.c index e7dc508c38eb..b19570d41a39 100644 --- a/arch/sparc/kernel/sigutil_64.c +++ b/arch/sparc/kernel/sigutil_64.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/types.h> | 2 | #include <linux/types.h> |
3 | #include <linux/thread_info.h> | 3 | #include <linux/thread_info.h> |
4 | #include <linux/uaccess.h> | 4 | #include <linux/uaccess.h> |
5 | #include <linux/errno.h> | ||
5 | 6 | ||
6 | #include <asm/sigcontext.h> | 7 | #include <asm/sigcontext.h> |
7 | #include <asm/fpumacro.h> | 8 | #include <asm/fpumacro.h> |
diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile index e3cda21b5ee9..301421c11291 100644 --- a/arch/sparc/mm/Makefile +++ b/arch/sparc/mm/Makefile | |||
@@ -8,7 +8,6 @@ obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o gup.o | |||
8 | obj-y += fault_$(BITS).o | 8 | obj-y += fault_$(BITS).o |
9 | obj-y += init_$(BITS).o | 9 | obj-y += init_$(BITS).o |
10 | obj-$(CONFIG_SPARC32) += loadmmu.o | 10 | obj-$(CONFIG_SPARC32) += loadmmu.o |
11 | obj-y += generic_$(BITS).o | ||
12 | obj-$(CONFIG_SPARC32) += extable.o btfixup.o srmmu.o iommu.o io-unit.o | 11 | obj-$(CONFIG_SPARC32) += extable.o btfixup.o srmmu.o iommu.o io-unit.o |
13 | obj-$(CONFIG_SPARC32) += hypersparc.o viking.o tsunami.o swift.o | 12 | obj-$(CONFIG_SPARC32) += hypersparc.o viking.o tsunami.o swift.o |
14 | obj-$(CONFIG_SPARC_LEON)+= leon_mm.o | 13 | obj-$(CONFIG_SPARC_LEON)+= leon_mm.o |
diff --git a/arch/sparc/mm/btfixup.c b/arch/sparc/mm/btfixup.c index 5175ac2f4820..8a7f81743c12 100644 --- a/arch/sparc/mm/btfixup.c +++ b/arch/sparc/mm/btfixup.c | |||
@@ -302,8 +302,7 @@ void __init btfixup(void) | |||
302 | case 'i': /* INT */ | 302 | case 'i': /* INT */ |
303 | if ((insn & 0xc1c00000) == 0x01000000) /* %HI */ | 303 | if ((insn & 0xc1c00000) == 0x01000000) /* %HI */ |
304 | set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10)); | 304 | set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10)); |
305 | else if ((insn & 0x80002000) == 0x80002000 && | 305 | else if ((insn & 0x80002000) == 0x80002000) /* %LO */ |
306 | (insn & 0x01800000) != 0x01800000) /* %LO */ | ||
307 | set_addr(addr, q[1], fmangled, (insn & 0xffffe000) | (p[1] & 0x3ff)); | 306 | set_addr(addr, q[1], fmangled, (insn & 0xffffe000) | (p[1] & 0x3ff)); |
308 | else { | 307 | else { |
309 | prom_printf(insn_i, p, addr, insn); | 308 | prom_printf(insn_i, p, addr, insn); |
diff --git a/arch/sparc/mm/generic_32.c b/arch/sparc/mm/generic_32.c deleted file mode 100644 index 6ca39a60a196..000000000000 --- a/arch/sparc/mm/generic_32.c +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * generic.c: Generic Sparc mm routines that are not dependent upon | ||
3 | * MMU type but are Sparc specific. | ||
4 | * | ||
5 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/mm.h> | ||
10 | #include <linux/swap.h> | ||
11 | #include <linux/pagemap.h> | ||
12 | #include <linux/export.h> | ||
13 | |||
14 | #include <asm/pgalloc.h> | ||
15 | #include <asm/pgtable.h> | ||
16 | #include <asm/page.h> | ||
17 | #include <asm/cacheflush.h> | ||
18 | #include <asm/tlbflush.h> | ||
19 | |||
20 | /* Remap IO memory, the same way as remap_pfn_range(), but use | ||
21 | * the obio memory space. | ||
22 | * | ||
23 | * They use a pgprot that sets PAGE_IO and does not check the | ||
24 | * mem_map table as this is independent of normal memory. | ||
25 | */ | ||
26 | static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigned long address, unsigned long size, | ||
27 | unsigned long offset, pgprot_t prot, int space) | ||
28 | { | ||
29 | unsigned long end; | ||
30 | |||
31 | address &= ~PMD_MASK; | ||
32 | end = address + size; | ||
33 | if (end > PMD_SIZE) | ||
34 | end = PMD_SIZE; | ||
35 | do { | ||
36 | set_pte_at(mm, address, pte, mk_pte_io(offset, prot, space)); | ||
37 | address += PAGE_SIZE; | ||
38 | offset += PAGE_SIZE; | ||
39 | pte++; | ||
40 | } while (address < end); | ||
41 | } | ||
42 | |||
43 | static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size, | ||
44 | unsigned long offset, pgprot_t prot, int space) | ||
45 | { | ||
46 | unsigned long end; | ||
47 | |||
48 | address &= ~PGDIR_MASK; | ||
49 | end = address + size; | ||
50 | if (end > PGDIR_SIZE) | ||
51 | end = PGDIR_SIZE; | ||
52 | offset -= address; | ||
53 | do { | ||
54 | pte_t *pte = pte_alloc_map(mm, NULL, pmd, address); | ||
55 | if (!pte) | ||
56 | return -ENOMEM; | ||
57 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); | ||
58 | address = (address + PMD_SIZE) & PMD_MASK; | ||
59 | pmd++; | ||
60 | } while (address < end); | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | ||
65 | unsigned long pfn, unsigned long size, pgprot_t prot) | ||
66 | { | ||
67 | int error = 0; | ||
68 | pgd_t * dir; | ||
69 | unsigned long beg = from; | ||
70 | unsigned long end = from + size; | ||
71 | struct mm_struct *mm = vma->vm_mm; | ||
72 | int space = GET_IOSPACE(pfn); | ||
73 | unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; | ||
74 | |||
75 | /* See comment in mm/memory.c remap_pfn_range */ | ||
76 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; | ||
77 | vma->vm_pgoff = (offset >> PAGE_SHIFT) | | ||
78 | ((unsigned long)space << 28UL); | ||
79 | |||
80 | offset -= from; | ||
81 | dir = pgd_offset(mm, from); | ||
82 | flush_cache_range(vma, beg, end); | ||
83 | |||
84 | while (from < end) { | ||
85 | pmd_t *pmd = pmd_alloc(mm, dir, from); | ||
86 | error = -ENOMEM; | ||
87 | if (!pmd) | ||
88 | break; | ||
89 | error = io_remap_pmd_range(mm, pmd, from, end - from, offset + from, prot, space); | ||
90 | if (error) | ||
91 | break; | ||
92 | from = (from + PGDIR_SIZE) & PGDIR_MASK; | ||
93 | dir++; | ||
94 | } | ||
95 | |||
96 | flush_tlb_range(vma, beg, end); | ||
97 | return error; | ||
98 | } | ||
99 | EXPORT_SYMBOL(io_remap_pfn_range); | ||
diff --git a/arch/sparc/mm/generic_64.c b/arch/sparc/mm/generic_64.c deleted file mode 100644 index 9b357ddae39d..000000000000 --- a/arch/sparc/mm/generic_64.c +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | /* | ||
2 | * generic.c: Generic Sparc mm routines that are not dependent upon | ||
3 | * MMU type but are Sparc specific. | ||
4 | * | ||
5 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/mm.h> | ||
10 | #include <linux/swap.h> | ||
11 | #include <linux/export.h> | ||
12 | #include <linux/pagemap.h> | ||
13 | |||
14 | #include <asm/pgalloc.h> | ||
15 | #include <asm/pgtable.h> | ||
16 | #include <asm/page.h> | ||
17 | #include <asm/tlbflush.h> | ||
18 | |||
19 | /* Remap IO memory, the same way as remap_pfn_range(), but use | ||
20 | * the obio memory space. | ||
21 | * | ||
22 | * They use a pgprot that sets PAGE_IO and does not check the | ||
23 | * mem_map table as this is independent of normal memory. | ||
24 | */ | ||
25 | static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, | ||
26 | unsigned long address, | ||
27 | unsigned long size, | ||
28 | unsigned long offset, pgprot_t prot, | ||
29 | int space) | ||
30 | { | ||
31 | unsigned long end; | ||
32 | |||
33 | /* clear hack bit that was used as a write_combine side-effect flag */ | ||
34 | offset &= ~0x1UL; | ||
35 | address &= ~PMD_MASK; | ||
36 | end = address + size; | ||
37 | if (end > PMD_SIZE) | ||
38 | end = PMD_SIZE; | ||
39 | do { | ||
40 | pte_t entry; | ||
41 | unsigned long curend = address + PAGE_SIZE; | ||
42 | |||
43 | entry = mk_pte_io(offset, prot, space, PAGE_SIZE); | ||
44 | if (!(address & 0xffff)) { | ||
45 | if (PAGE_SIZE < (4 * 1024 * 1024) && | ||
46 | !(address & 0x3fffff) && | ||
47 | !(offset & 0x3ffffe) && | ||
48 | end >= address + 0x400000) { | ||
49 | entry = mk_pte_io(offset, prot, space, | ||
50 | 4 * 1024 * 1024); | ||
51 | curend = address + 0x400000; | ||
52 | offset += 0x400000; | ||
53 | } else if (PAGE_SIZE < (512 * 1024) && | ||
54 | !(address & 0x7ffff) && | ||
55 | !(offset & 0x7fffe) && | ||
56 | end >= address + 0x80000) { | ||
57 | entry = mk_pte_io(offset, prot, space, | ||
58 | 512 * 1024 * 1024); | ||
59 | curend = address + 0x80000; | ||
60 | offset += 0x80000; | ||
61 | } else if (PAGE_SIZE < (64 * 1024) && | ||
62 | !(offset & 0xfffe) && | ||
63 | end >= address + 0x10000) { | ||
64 | entry = mk_pte_io(offset, prot, space, | ||
65 | 64 * 1024); | ||
66 | curend = address + 0x10000; | ||
67 | offset += 0x10000; | ||
68 | } else | ||
69 | offset += PAGE_SIZE; | ||
70 | } else | ||
71 | offset += PAGE_SIZE; | ||
72 | |||
73 | if (pte_write(entry)) | ||
74 | entry = pte_mkdirty(entry); | ||
75 | do { | ||
76 | BUG_ON(!pte_none(*pte)); | ||
77 | set_pte_at(mm, address, pte, entry); | ||
78 | address += PAGE_SIZE; | ||
79 | pte_val(entry) += PAGE_SIZE; | ||
80 | pte++; | ||
81 | } while (address < curend); | ||
82 | } while (address < end); | ||
83 | } | ||
84 | |||
85 | static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size, | ||
86 | unsigned long offset, pgprot_t prot, int space) | ||
87 | { | ||
88 | unsigned long end; | ||
89 | |||
90 | address &= ~PGDIR_MASK; | ||
91 | end = address + size; | ||
92 | if (end > PGDIR_SIZE) | ||
93 | end = PGDIR_SIZE; | ||
94 | offset -= address; | ||
95 | do { | ||
96 | pte_t *pte = pte_alloc_map(mm, NULL, pmd, address); | ||
97 | if (!pte) | ||
98 | return -ENOMEM; | ||
99 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); | ||
100 | pte_unmap(pte); | ||
101 | address = (address + PMD_SIZE) & PMD_MASK; | ||
102 | pmd++; | ||
103 | } while (address < end); | ||
104 | return 0; | ||
105 | } | ||
106 | |||
107 | static inline int io_remap_pud_range(struct mm_struct *mm, pud_t * pud, unsigned long address, unsigned long size, | ||
108 | unsigned long offset, pgprot_t prot, int space) | ||
109 | { | ||
110 | unsigned long end; | ||
111 | |||
112 | address &= ~PUD_MASK; | ||
113 | end = address + size; | ||
114 | if (end > PUD_SIZE) | ||
115 | end = PUD_SIZE; | ||
116 | offset -= address; | ||
117 | do { | ||
118 | pmd_t *pmd = pmd_alloc(mm, pud, address); | ||
119 | if (!pud) | ||
120 | return -ENOMEM; | ||
121 | io_remap_pmd_range(mm, pmd, address, end - address, address + offset, prot, space); | ||
122 | address = (address + PUD_SIZE) & PUD_MASK; | ||
123 | pud++; | ||
124 | } while (address < end); | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | ||
129 | unsigned long pfn, unsigned long size, pgprot_t prot) | ||
130 | { | ||
131 | int error = 0; | ||
132 | pgd_t * dir; | ||
133 | unsigned long beg = from; | ||
134 | unsigned long end = from + size; | ||
135 | struct mm_struct *mm = vma->vm_mm; | ||
136 | int space = GET_IOSPACE(pfn); | ||
137 | unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; | ||
138 | unsigned long phys_base; | ||
139 | |||
140 | phys_base = offset | (((unsigned long) space) << 32UL); | ||
141 | |||
142 | /* See comment in mm/memory.c remap_pfn_range */ | ||
143 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; | ||
144 | vma->vm_pgoff = phys_base >> PAGE_SHIFT; | ||
145 | |||
146 | offset -= from; | ||
147 | dir = pgd_offset(mm, from); | ||
148 | flush_cache_range(vma, beg, end); | ||
149 | |||
150 | while (from < end) { | ||
151 | pud_t *pud = pud_alloc(mm, dir, from); | ||
152 | error = -ENOMEM; | ||
153 | if (!pud) | ||
154 | break; | ||
155 | error = io_remap_pud_range(mm, pud, from, end - from, offset + from, prot, space); | ||
156 | if (error) | ||
157 | break; | ||
158 | from = (from + PGDIR_SIZE) & PGDIR_MASK; | ||
159 | dir++; | ||
160 | } | ||
161 | |||
162 | flush_tlb_range(vma, beg, end); | ||
163 | return error; | ||
164 | } | ||
165 | EXPORT_SYMBOL(io_remap_pfn_range); | ||
diff --git a/arch/tile/include/asm/irq.h b/arch/tile/include/asm/irq.h index 94e9a511de84..f80f8ceabc67 100644 --- a/arch/tile/include/asm/irq.h +++ b/arch/tile/include/asm/irq.h | |||
@@ -74,16 +74,6 @@ enum { | |||
74 | */ | 74 | */ |
75 | void tile_irq_activate(unsigned int irq, int tile_irq_type); | 75 | void tile_irq_activate(unsigned int irq, int tile_irq_type); |
76 | 76 | ||
77 | /* | ||
78 | * For onboard, non-PCI (e.g. TILE_IRQ_PERCPU) devices, drivers know | ||
79 | * how to use enable/disable_percpu_irq() to manage interrupts on each | ||
80 | * core. We can't use the generic enable/disable_irq() because they | ||
81 | * use a single reference count per irq, rather than per cpu per irq. | ||
82 | */ | ||
83 | void enable_percpu_irq(unsigned int irq); | ||
84 | void disable_percpu_irq(unsigned int irq); | ||
85 | |||
86 | |||
87 | void setup_irq_regs(void); | 77 | void setup_irq_regs(void); |
88 | 78 | ||
89 | #endif /* _ASM_TILE_IRQ_H */ | 79 | #endif /* _ASM_TILE_IRQ_H */ |
diff --git a/arch/tile/kernel/irq.c b/arch/tile/kernel/irq.c index aa0134db2dd6..02e628065012 100644 --- a/arch/tile/kernel/irq.c +++ b/arch/tile/kernel/irq.c | |||
@@ -152,14 +152,13 @@ void tile_dev_intr(struct pt_regs *regs, int intnum) | |||
152 | * Remove an irq from the disabled mask. If we're in an interrupt | 152 | * Remove an irq from the disabled mask. If we're in an interrupt |
153 | * context, defer enabling the HW interrupt until we leave. | 153 | * context, defer enabling the HW interrupt until we leave. |
154 | */ | 154 | */ |
155 | void enable_percpu_irq(unsigned int irq) | 155 | static void tile_irq_chip_enable(struct irq_data *d) |
156 | { | 156 | { |
157 | get_cpu_var(irq_disable_mask) &= ~(1UL << irq); | 157 | get_cpu_var(irq_disable_mask) &= ~(1UL << d->irq); |
158 | if (__get_cpu_var(irq_depth) == 0) | 158 | if (__get_cpu_var(irq_depth) == 0) |
159 | unmask_irqs(1UL << irq); | 159 | unmask_irqs(1UL << d->irq); |
160 | put_cpu_var(irq_disable_mask); | 160 | put_cpu_var(irq_disable_mask); |
161 | } | 161 | } |
162 | EXPORT_SYMBOL(enable_percpu_irq); | ||
163 | 162 | ||
164 | /* | 163 | /* |
165 | * Add an irq to the disabled mask. We disable the HW interrupt | 164 | * Add an irq to the disabled mask. We disable the HW interrupt |
@@ -167,13 +166,12 @@ EXPORT_SYMBOL(enable_percpu_irq); | |||
167 | * in an interrupt context, the return path is careful to avoid | 166 | * in an interrupt context, the return path is careful to avoid |
168 | * unmasking a newly disabled interrupt. | 167 | * unmasking a newly disabled interrupt. |
169 | */ | 168 | */ |
170 | void disable_percpu_irq(unsigned int irq) | 169 | static void tile_irq_chip_disable(struct irq_data *d) |
171 | { | 170 | { |
172 | get_cpu_var(irq_disable_mask) |= (1UL << irq); | 171 | get_cpu_var(irq_disable_mask) |= (1UL << d->irq); |
173 | mask_irqs(1UL << irq); | 172 | mask_irqs(1UL << d->irq); |
174 | put_cpu_var(irq_disable_mask); | 173 | put_cpu_var(irq_disable_mask); |
175 | } | 174 | } |
176 | EXPORT_SYMBOL(disable_percpu_irq); | ||
177 | 175 | ||
178 | /* Mask an interrupt. */ | 176 | /* Mask an interrupt. */ |
179 | static void tile_irq_chip_mask(struct irq_data *d) | 177 | static void tile_irq_chip_mask(struct irq_data *d) |
@@ -209,6 +207,8 @@ static void tile_irq_chip_eoi(struct irq_data *d) | |||
209 | 207 | ||
210 | static struct irq_chip tile_irq_chip = { | 208 | static struct irq_chip tile_irq_chip = { |
211 | .name = "tile_irq_chip", | 209 | .name = "tile_irq_chip", |
210 | .irq_enable = tile_irq_chip_enable, | ||
211 | .irq_disable = tile_irq_chip_disable, | ||
212 | .irq_ack = tile_irq_chip_ack, | 212 | .irq_ack = tile_irq_chip_ack, |
213 | .irq_eoi = tile_irq_chip_eoi, | 213 | .irq_eoi = tile_irq_chip_eoi, |
214 | .irq_mask = tile_irq_chip_mask, | 214 | .irq_mask = tile_irq_chip_mask, |
diff --git a/arch/tile/kernel/pci-dma.c b/arch/tile/kernel/pci-dma.c index 658f2ce426a4..b3ed19f8779c 100644 --- a/arch/tile/kernel/pci-dma.c +++ b/arch/tile/kernel/pci-dma.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
18 | #include <linux/export.h> | ||
18 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
19 | #include <asm/homecache.h> | 20 | #include <asm/homecache.h> |
20 | 21 | ||
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 2a8014cb1ff5..9d610d3fb11e 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
27 | #include <linux/export.h> | ||
27 | 28 | ||
28 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
29 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c index b671a86f4515..602908268093 100644 --- a/arch/tile/kernel/sysfs.c +++ b/arch/tile/kernel/sysfs.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
21 | #include <linux/stat.h> | ||
21 | #include <hv/hypervisor.h> | 22 | #include <hv/hypervisor.h> |
22 | 23 | ||
23 | /* Return a string queried from the hypervisor, truncated to page size. */ | 24 | /* Return a string queried from the hypervisor, truncated to page size. */ |
diff --git a/arch/tile/lib/exports.c b/arch/tile/lib/exports.c index a87d2a859ba9..2a81d32de0da 100644 --- a/arch/tile/lib/exports.c +++ b/arch/tile/lib/exports.c | |||
@@ -39,6 +39,9 @@ EXPORT_SYMBOL(finv_user_asm); | |||
39 | EXPORT_SYMBOL(current_text_addr); | 39 | EXPORT_SYMBOL(current_text_addr); |
40 | EXPORT_SYMBOL(dump_stack); | 40 | EXPORT_SYMBOL(dump_stack); |
41 | 41 | ||
42 | /* arch/tile/kernel/head.S */ | ||
43 | EXPORT_SYMBOL(empty_zero_page); | ||
44 | |||
42 | /* arch/tile/lib/, various memcpy files */ | 45 | /* arch/tile/lib/, various memcpy files */ |
43 | EXPORT_SYMBOL(memcpy); | 46 | EXPORT_SYMBOL(memcpy); |
44 | EXPORT_SYMBOL(__copy_to_user_inatomic); | 47 | EXPORT_SYMBOL(__copy_to_user_inatomic); |
diff --git a/arch/tile/mm/homecache.c b/arch/tile/mm/homecache.c index cbe6f4f9eca3..1cc6ae477c98 100644 --- a/arch/tile/mm/homecache.c +++ b/arch/tile/mm/homecache.c | |||
@@ -449,9 +449,12 @@ void homecache_free_pages(unsigned long addr, unsigned int order) | |||
449 | VM_BUG_ON(!virt_addr_valid((void *)addr)); | 449 | VM_BUG_ON(!virt_addr_valid((void *)addr)); |
450 | page = virt_to_page((void *)addr); | 450 | page = virt_to_page((void *)addr); |
451 | if (put_page_testzero(page)) { | 451 | if (put_page_testzero(page)) { |
452 | int pages = (1 << order); | ||
453 | homecache_change_page_home(page, order, initial_page_home()); | 452 | homecache_change_page_home(page, order, initial_page_home()); |
454 | while (pages--) | 453 | if (order == 0) { |
455 | __free_page(page++); | 454 | free_hot_cold_page(page, 0); |
455 | } else { | ||
456 | init_page_count(page); | ||
457 | __free_pages(page, order); | ||
458 | } | ||
456 | } | 459 | } |
457 | } | 460 | } |
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index e57dcce9bfda..942ed6174f1d 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig | |||
@@ -237,13 +237,13 @@ menu "PKUnity NetBook-0916 Features" | |||
237 | 237 | ||
238 | config I2C_BATTERY_BQ27200 | 238 | config I2C_BATTERY_BQ27200 |
239 | tristate "I2C Battery BQ27200 Support" | 239 | tristate "I2C Battery BQ27200 Support" |
240 | select PUV3_I2C | 240 | select I2C_PUV3 |
241 | select POWER_SUPPLY | 241 | select POWER_SUPPLY |
242 | select BATTERY_BQ27x00 | 242 | select BATTERY_BQ27x00 |
243 | 243 | ||
244 | config I2C_EEPROM_AT24 | 244 | config I2C_EEPROM_AT24 |
245 | tristate "I2C EEPROMs AT24 support" | 245 | tristate "I2C EEPROMs AT24 support" |
246 | select PUV3_I2C | 246 | select I2C_PUV3 |
247 | select MISC_DEVICES | 247 | select MISC_DEVICES |
248 | select EEPROM_AT24 | 248 | select EEPROM_AT24 |
249 | 249 | ||
diff --git a/arch/unicore32/Kconfig.debug b/arch/unicore32/Kconfig.debug index ae2ec334c3c6..1a3626239843 100644 --- a/arch/unicore32/Kconfig.debug +++ b/arch/unicore32/Kconfig.debug | |||
@@ -44,18 +44,4 @@ config DEBUG_OCD | |||
44 | Say Y here if you want the debug print routines to direct their | 44 | Say Y here if you want the debug print routines to direct their |
45 | output to the UniCore On-Chip-Debugger channel using CP #1. | 45 | output to the UniCore On-Chip-Debugger channel using CP #1. |
46 | 46 | ||
47 | config DEBUG_OCD_BREAKPOINT | ||
48 | bool "Breakpoint support via On-Chip-Debugger" | ||
49 | depends on DEBUG_OCD | ||
50 | |||
51 | config DEBUG_UART | ||
52 | int "Kernel low-level debugging messages via serial port" | ||
53 | depends on DEBUG_LL | ||
54 | range 0 1 | ||
55 | default "0" | ||
56 | help | ||
57 | Choice for UART for kernel low-level using PKUnity UARTS, | ||
58 | should be between zero and one. The port must have been | ||
59 | initialised by the boot-loader before use. | ||
60 | |||
61 | endmenu | 47 | endmenu |
diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile index b0954a2d23cf..950a9afa38f8 100644 --- a/arch/unicore32/boot/compressed/Makefile +++ b/arch/unicore32/boot/compressed/Makefile | |||
@@ -10,8 +10,8 @@ | |||
10 | # Copyright (C) 2001~2010 GUAN Xue-tao | 10 | # Copyright (C) 2001~2010 GUAN Xue-tao |
11 | # | 11 | # |
12 | 12 | ||
13 | EXTRA_CFLAGS := -fpic -fno-builtin | 13 | ccflags-y := -fpic -fno-builtin |
14 | EXTRA_AFLAGS := -Wa,-march=all | 14 | asflags-y := -Wa,-march=all |
15 | 15 | ||
16 | OBJS := misc.o | 16 | OBJS := misc.o |
17 | 17 | ||
diff --git a/arch/unicore32/include/asm/bitops.h b/arch/unicore32/include/asm/bitops.h index 1628a6328994..401f597bc38c 100644 --- a/arch/unicore32/include/asm/bitops.h +++ b/arch/unicore32/include/asm/bitops.h | |||
@@ -13,12 +13,6 @@ | |||
13 | #ifndef __UNICORE_BITOPS_H__ | 13 | #ifndef __UNICORE_BITOPS_H__ |
14 | #define __UNICORE_BITOPS_H__ | 14 | #define __UNICORE_BITOPS_H__ |
15 | 15 | ||
16 | #define find_next_bit __uc32_find_next_bit | ||
17 | #define find_next_zero_bit __uc32_find_next_zero_bit | ||
18 | |||
19 | #define find_first_bit __uc32_find_first_bit | ||
20 | #define find_first_zero_bit __uc32_find_first_zero_bit | ||
21 | |||
22 | #define _ASM_GENERIC_BITOPS_FLS_H_ | 16 | #define _ASM_GENERIC_BITOPS_FLS_H_ |
23 | #define _ASM_GENERIC_BITOPS___FLS_H_ | 17 | #define _ASM_GENERIC_BITOPS___FLS_H_ |
24 | #define _ASM_GENERIC_BITOPS_FFS_H_ | 18 | #define _ASM_GENERIC_BITOPS_FFS_H_ |
@@ -44,4 +38,10 @@ static inline int fls(int x) | |||
44 | 38 | ||
45 | #include <asm-generic/bitops.h> | 39 | #include <asm-generic/bitops.h> |
46 | 40 | ||
41 | /* following definitions: to avoid using codes in lib/find_*.c */ | ||
42 | #define find_next_bit find_next_bit | ||
43 | #define find_next_zero_bit find_next_zero_bit | ||
44 | #define find_first_bit find_first_bit | ||
45 | #define find_first_zero_bit find_first_zero_bit | ||
46 | |||
47 | #endif /* __UNICORE_BITOPS_H__ */ | 47 | #endif /* __UNICORE_BITOPS_H__ */ |
diff --git a/arch/unicore32/include/asm/processor.h b/arch/unicore32/include/asm/processor.h index e11cb0786578..f0d780a51f9b 100644 --- a/arch/unicore32/include/asm/processor.h +++ b/arch/unicore32/include/asm/processor.h | |||
@@ -53,7 +53,6 @@ struct thread_struct { | |||
53 | #define start_thread(regs, pc, sp) \ | 53 | #define start_thread(regs, pc, sp) \ |
54 | ({ \ | 54 | ({ \ |
55 | unsigned long *stack = (unsigned long *)sp; \ | 55 | unsigned long *stack = (unsigned long *)sp; \ |
56 | set_fs(USER_DS); \ | ||
57 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ | 56 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ |
58 | regs->UCreg_asr = USER_MODE; \ | 57 | regs->UCreg_asr = USER_MODE; \ |
59 | regs->UCreg_pc = pc & ~1; /* pc */ \ | 58 | regs->UCreg_pc = pc & ~1; /* pc */ \ |
diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index a8970809428a..d98bd812cae1 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c | |||
@@ -24,8 +24,8 @@ | |||
24 | 24 | ||
25 | #include "ksyms.h" | 25 | #include "ksyms.h" |
26 | 26 | ||
27 | EXPORT_SYMBOL(__uc32_find_next_zero_bit); | 27 | EXPORT_SYMBOL(find_next_zero_bit); |
28 | EXPORT_SYMBOL(__uc32_find_next_bit); | 28 | EXPORT_SYMBOL(find_next_bit); |
29 | 29 | ||
30 | EXPORT_SYMBOL(__backtrace); | 30 | EXPORT_SYMBOL(__backtrace); |
31 | 31 | ||
diff --git a/arch/unicore32/lib/findbit.S b/arch/unicore32/lib/findbit.S index c360ce905d8b..c77746247d36 100644 --- a/arch/unicore32/lib/findbit.S +++ b/arch/unicore32/lib/findbit.S | |||
@@ -17,7 +17,7 @@ | |||
17 | * Purpose : Find a 'zero' bit | 17 | * Purpose : Find a 'zero' bit |
18 | * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit); | 18 | * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit); |
19 | */ | 19 | */ |
20 | __uc32_find_first_zero_bit: | 20 | ENTRY(find_first_zero_bit) |
21 | cxor.a r1, #0 | 21 | cxor.a r1, #0 |
22 | beq 3f | 22 | beq 3f |
23 | mov r2, #0 | 23 | mov r2, #0 |
@@ -29,13 +29,14 @@ __uc32_find_first_zero_bit: | |||
29 | bub 1b | 29 | bub 1b |
30 | 3: mov r0, r1 @ no free bits | 30 | 3: mov r0, r1 @ no free bits |
31 | mov pc, lr | 31 | mov pc, lr |
32 | ENDPROC(find_first_zero_bit) | ||
32 | 33 | ||
33 | /* | 34 | /* |
34 | * Purpose : Find next 'zero' bit | 35 | * Purpose : Find next 'zero' bit |
35 | * Prototype: int find_next_zero_bit | 36 | * Prototype: int find_next_zero_bit |
36 | * (void *addr, unsigned int maxbit, int offset) | 37 | * (void *addr, unsigned int maxbit, int offset) |
37 | */ | 38 | */ |
38 | ENTRY(__uc32_find_next_zero_bit) | 39 | ENTRY(find_next_zero_bit) |
39 | cxor.a r1, #0 | 40 | cxor.a r1, #0 |
40 | beq 3b | 41 | beq 3b |
41 | and.a ip, r2, #7 | 42 | and.a ip, r2, #7 |
@@ -47,14 +48,14 @@ ENTRY(__uc32_find_next_zero_bit) | |||
47 | or r2, r2, #7 @ if zero, then no bits here | 48 | or r2, r2, #7 @ if zero, then no bits here |
48 | add r2, r2, #1 @ align bit pointer | 49 | add r2, r2, #1 @ align bit pointer |
49 | b 2b @ loop for next bit | 50 | b 2b @ loop for next bit |
50 | ENDPROC(__uc32_find_next_zero_bit) | 51 | ENDPROC(find_next_zero_bit) |
51 | 52 | ||
52 | /* | 53 | /* |
53 | * Purpose : Find a 'one' bit | 54 | * Purpose : Find a 'one' bit |
54 | * Prototype: int find_first_bit | 55 | * Prototype: int find_first_bit |
55 | * (const unsigned long *addr, unsigned int maxbit); | 56 | * (const unsigned long *addr, unsigned int maxbit); |
56 | */ | 57 | */ |
57 | __uc32_find_first_bit: | 58 | ENTRY(find_first_bit) |
58 | cxor.a r1, #0 | 59 | cxor.a r1, #0 |
59 | beq 3f | 60 | beq 3f |
60 | mov r2, #0 | 61 | mov r2, #0 |
@@ -66,13 +67,14 @@ __uc32_find_first_bit: | |||
66 | bub 1b | 67 | bub 1b |
67 | 3: mov r0, r1 @ no free bits | 68 | 3: mov r0, r1 @ no free bits |
68 | mov pc, lr | 69 | mov pc, lr |
70 | ENDPROC(find_first_bit) | ||
69 | 71 | ||
70 | /* | 72 | /* |
71 | * Purpose : Find next 'one' bit | 73 | * Purpose : Find next 'one' bit |
72 | * Prototype: int find_next_zero_bit | 74 | * Prototype: int find_next_zero_bit |
73 | * (void *addr, unsigned int maxbit, int offset) | 75 | * (void *addr, unsigned int maxbit, int offset) |
74 | */ | 76 | */ |
75 | ENTRY(__uc32_find_next_bit) | 77 | ENTRY(find_next_bit) |
76 | cxor.a r1, #0 | 78 | cxor.a r1, #0 |
77 | beq 3b | 79 | beq 3b |
78 | and.a ip, r2, #7 | 80 | and.a ip, r2, #7 |
@@ -83,7 +85,7 @@ ENTRY(__uc32_find_next_bit) | |||
83 | or r2, r2, #7 @ if zero, then no bits here | 85 | or r2, r2, #7 @ if zero, then no bits here |
84 | add r2, r2, #1 @ align bit pointer | 86 | add r2, r2, #1 @ align bit pointer |
85 | b 2b @ loop for next bit | 87 | b 2b @ loop for next bit |
86 | ENDPROC(__uc32_find_next_bit) | 88 | ENDPROC(find_next_bit) |
87 | 89 | ||
88 | /* | 90 | /* |
89 | * One or more bits in the LSB of r3 are assumed to be set. | 91 | * One or more bits in the LSB of r3 are assumed to be set. |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index cb9a1044a771..efb42949cc09 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -390,7 +390,7 @@ config X86_INTEL_CE | |||
390 | This option compiles in support for the CE4100 SOC for settop | 390 | This option compiles in support for the CE4100 SOC for settop |
391 | boxes and media devices. | 391 | boxes and media devices. |
392 | 392 | ||
393 | config X86_INTEL_MID | 393 | config X86_WANT_INTEL_MID |
394 | bool "Intel MID platform support" | 394 | bool "Intel MID platform support" |
395 | depends on X86_32 | 395 | depends on X86_32 |
396 | depends on X86_EXTENDED_PLATFORM | 396 | depends on X86_EXTENDED_PLATFORM |
@@ -399,7 +399,10 @@ config X86_INTEL_MID | |||
399 | systems which do not have the PCI legacy interfaces (Moorestown, | 399 | systems which do not have the PCI legacy interfaces (Moorestown, |
400 | Medfield). If you are building for a PC class system say N here. | 400 | Medfield). If you are building for a PC class system say N here. |
401 | 401 | ||
402 | if X86_INTEL_MID | 402 | if X86_WANT_INTEL_MID |
403 | |||
404 | config X86_INTEL_MID | ||
405 | bool | ||
403 | 406 | ||
404 | config X86_MRST | 407 | config X86_MRST |
405 | bool "Moorestown MID platform" | 408 | bool "Moorestown MID platform" |
@@ -411,6 +414,7 @@ config X86_MRST | |||
411 | select SPI | 414 | select SPI |
412 | select INTEL_SCU_IPC | 415 | select INTEL_SCU_IPC |
413 | select X86_PLATFORM_DEVICES | 416 | select X86_PLATFORM_DEVICES |
417 | select X86_INTEL_MID | ||
414 | ---help--- | 418 | ---help--- |
415 | Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin | 419 | Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin |
416 | Internet Device(MID) platform. Moorestown consists of two chips: | 420 | Internet Device(MID) platform. Moorestown consists of two chips: |
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 9b7273cb2193..1a6c09af048f 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -49,6 +49,7 @@ extern unsigned int apic_verbosity; | |||
49 | extern int local_apic_timer_c2_ok; | 49 | extern int local_apic_timer_c2_ok; |
50 | 50 | ||
51 | extern int disable_apic; | 51 | extern int disable_apic; |
52 | extern unsigned int lapic_timer_frequency; | ||
52 | 53 | ||
53 | #ifdef CONFIG_SMP | 54 | #ifdef CONFIG_SMP |
54 | extern void __inquire_remote_apic(int apicid); | 55 | extern void __inquire_remote_apic(int apicid); |
diff --git a/arch/x86/include/asm/intel_scu_ipc.h b/arch/x86/include/asm/intel_scu_ipc.h index 4420993acc47..925b605eb5c6 100644 --- a/arch/x86/include/asm/intel_scu_ipc.h +++ b/arch/x86/include/asm/intel_scu_ipc.h | |||
@@ -3,11 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/notifier.h> | 4 | #include <linux/notifier.h> |
5 | 5 | ||
6 | #define IPCMSG_VRTC 0xFA /* Set vRTC device */ | 6 | #define IPCMSG_WARM_RESET 0xF0 |
7 | 7 | #define IPCMSG_COLD_RESET 0xF1 | |
8 | /* Command id associated with message IPCMSG_VRTC */ | 8 | #define IPCMSG_SOFT_RESET 0xF2 |
9 | #define IPC_CMD_VRTC_SETTIME 1 /* Set time */ | 9 | #define IPCMSG_COLD_BOOT 0xF3 |
10 | #define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */ | 10 | |
11 | #define IPCMSG_VRTC 0xFA /* Set vRTC device */ | ||
12 | /* Command id associated with message IPCMSG_VRTC */ | ||
13 | #define IPC_CMD_VRTC_SETTIME 1 /* Set time */ | ||
14 | #define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */ | ||
11 | 15 | ||
12 | /* Read single register */ | 16 | /* Read single register */ |
13 | int intel_scu_ipc_ioread8(u16 addr, u8 *data); | 17 | int intel_scu_ipc_ioread8(u16 addr, u8 *data); |
diff --git a/arch/x86/include/asm/mach_traps.h b/arch/x86/include/asm/mach_traps.h index 72a8b52e7dfd..a01e7ec7d237 100644 --- a/arch/x86/include/asm/mach_traps.h +++ b/arch/x86/include/asm/mach_traps.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define NMI_REASON_CLEAR_IOCHK 0x08 | 17 | #define NMI_REASON_CLEAR_IOCHK 0x08 |
18 | #define NMI_REASON_CLEAR_MASK 0x0f | 18 | #define NMI_REASON_CLEAR_MASK 0x0f |
19 | 19 | ||
20 | static inline unsigned char get_nmi_reason(void) | 20 | static inline unsigned char default_get_nmi_reason(void) |
21 | { | 21 | { |
22 | return inb(NMI_REASON_PORT); | 22 | return inb(NMI_REASON_PORT); |
23 | } | 23 | } |
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index c9321f34e55b..0e8ae57d3656 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -201,7 +201,10 @@ int mce_notify_irq(void); | |||
201 | void mce_notify_process(void); | 201 | void mce_notify_process(void); |
202 | 202 | ||
203 | DECLARE_PER_CPU(struct mce, injectm); | 203 | DECLARE_PER_CPU(struct mce, injectm); |
204 | extern struct file_operations mce_chrdev_ops; | 204 | |
205 | extern void register_mce_write_callback(ssize_t (*)(struct file *filp, | ||
206 | const char __user *ubuf, | ||
207 | size_t usize, loff_t *off)); | ||
205 | 208 | ||
206 | /* | 209 | /* |
207 | * Exception handler | 210 | * Exception handler |
diff --git a/arch/x86/include/asm/mrst.h b/arch/x86/include/asm/mrst.h index 719f00b28ff5..93f79094c224 100644 --- a/arch/x86/include/asm/mrst.h +++ b/arch/x86/include/asm/mrst.h | |||
@@ -31,11 +31,20 @@ enum mrst_cpu_type { | |||
31 | }; | 31 | }; |
32 | 32 | ||
33 | extern enum mrst_cpu_type __mrst_cpu_chip; | 33 | extern enum mrst_cpu_type __mrst_cpu_chip; |
34 | |||
35 | #ifdef CONFIG_X86_INTEL_MID | ||
36 | |||
34 | static inline enum mrst_cpu_type mrst_identify_cpu(void) | 37 | static inline enum mrst_cpu_type mrst_identify_cpu(void) |
35 | { | 38 | { |
36 | return __mrst_cpu_chip; | 39 | return __mrst_cpu_chip; |
37 | } | 40 | } |
38 | 41 | ||
42 | #else /* !CONFIG_X86_INTEL_MID */ | ||
43 | |||
44 | #define mrst_identify_cpu() (0) | ||
45 | |||
46 | #endif /* !CONFIG_X86_INTEL_MID */ | ||
47 | |||
39 | enum mrst_timer_options { | 48 | enum mrst_timer_options { |
40 | MRST_TIMER_DEFAULT, | 49 | MRST_TIMER_DEFAULT, |
41 | MRST_TIMER_APBT_ONLY, | 50 | MRST_TIMER_APBT_ONLY, |
@@ -44,6 +53,13 @@ enum mrst_timer_options { | |||
44 | 53 | ||
45 | extern enum mrst_timer_options mrst_timer_options; | 54 | extern enum mrst_timer_options mrst_timer_options; |
46 | 55 | ||
56 | /* | ||
57 | * Penwell uses spread spectrum clock, so the freq number is not exactly | ||
58 | * the same as reported by MSR based on SDM. | ||
59 | */ | ||
60 | #define PENWELL_FSB_FREQ_83SKU 83200 | ||
61 | #define PENWELL_FSB_FREQ_100SKU 99840 | ||
62 | |||
47 | #define SFI_MTMR_MAX_NUM 8 | 63 | #define SFI_MTMR_MAX_NUM 8 |
48 | #define SFI_MRTC_MAX 8 | 64 | #define SFI_MRTC_MAX 8 |
49 | 65 | ||
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 084ef95274cd..95203d40ffdd 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h | |||
@@ -169,7 +169,14 @@ static inline int wrmsr_safe(unsigned msr, unsigned low, unsigned high) | |||
169 | return native_write_msr_safe(msr, low, high); | 169 | return native_write_msr_safe(msr, low, high); |
170 | } | 170 | } |
171 | 171 | ||
172 | /* rdmsr with exception handling */ | 172 | /* |
173 | * rdmsr with exception handling. | ||
174 | * | ||
175 | * Please note that the exception handling works only after we've | ||
176 | * switched to the "smart" #GP handler in trap_init() which knows about | ||
177 | * exception tables - using this macro earlier than that causes machine | ||
178 | * hangs on boxes which do not implement the @msr in the first argument. | ||
179 | */ | ||
173 | #define rdmsr_safe(msr, p1, p2) \ | 180 | #define rdmsr_safe(msr, p1, p2) \ |
174 | ({ \ | 181 | ({ \ |
175 | int __err; \ | 182 | int __err; \ |
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h index c2ff2a1d845e..2d2f01ce6dcb 100644 --- a/arch/x86/include/asm/system.h +++ b/arch/x86/include/asm/system.h | |||
@@ -401,6 +401,7 @@ extern unsigned long arch_align_stack(unsigned long sp); | |||
401 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); | 401 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); |
402 | 402 | ||
403 | void default_idle(void); | 403 | void default_idle(void); |
404 | bool set_pm_idle_to_default(void); | ||
404 | 405 | ||
405 | void stop_this_cpu(void *dummy); | 406 | void stop_this_cpu(void *dummy); |
406 | 407 | ||
diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h index fa7b9176b76c..431793e5d484 100644 --- a/arch/x86/include/asm/timer.h +++ b/arch/x86/include/asm/timer.h | |||
@@ -32,6 +32,22 @@ extern int no_timer_check; | |||
32 | * (mathieu.desnoyers@polymtl.ca) | 32 | * (mathieu.desnoyers@polymtl.ca) |
33 | * | 33 | * |
34 | * -johnstul@us.ibm.com "math is hard, lets go shopping!" | 34 | * -johnstul@us.ibm.com "math is hard, lets go shopping!" |
35 | * | ||
36 | * In: | ||
37 | * | ||
38 | * ns = cycles * cyc2ns_scale / SC | ||
39 | * | ||
40 | * Although we may still have enough bits to store the value of ns, | ||
41 | * in some cases, we may not have enough bits to store cycles * cyc2ns_scale, | ||
42 | * leading to an incorrect result. | ||
43 | * | ||
44 | * To avoid this, we can decompose 'cycles' into quotient and remainder | ||
45 | * of division by SC. Then, | ||
46 | * | ||
47 | * ns = (quot * SC + rem) * cyc2ns_scale / SC | ||
48 | * = quot * cyc2ns_scale + (rem * cyc2ns_scale) / SC | ||
49 | * | ||
50 | * - sqazi@google.com | ||
35 | */ | 51 | */ |
36 | 52 | ||
37 | DECLARE_PER_CPU(unsigned long, cyc2ns); | 53 | DECLARE_PER_CPU(unsigned long, cyc2ns); |
@@ -41,9 +57,14 @@ DECLARE_PER_CPU(unsigned long long, cyc2ns_offset); | |||
41 | 57 | ||
42 | static inline unsigned long long __cycles_2_ns(unsigned long long cyc) | 58 | static inline unsigned long long __cycles_2_ns(unsigned long long cyc) |
43 | { | 59 | { |
60 | unsigned long long quot; | ||
61 | unsigned long long rem; | ||
44 | int cpu = smp_processor_id(); | 62 | int cpu = smp_processor_id(); |
45 | unsigned long long ns = per_cpu(cyc2ns_offset, cpu); | 63 | unsigned long long ns = per_cpu(cyc2ns_offset, cpu); |
46 | ns += cyc * per_cpu(cyc2ns, cpu) >> CYC2NS_SCALE_FACTOR; | 64 | quot = (cyc >> CYC2NS_SCALE_FACTOR); |
65 | rem = cyc & ((1ULL << CYC2NS_SCALE_FACTOR) - 1); | ||
66 | ns += quot * per_cpu(cyc2ns, cpu) + | ||
67 | ((rem * per_cpu(cyc2ns, cpu)) >> CYC2NS_SCALE_FACTOR); | ||
47 | return ns; | 68 | return ns; |
48 | } | 69 | } |
49 | 70 | ||
diff --git a/arch/x86/include/asm/uv/uv_mmrs.h b/arch/x86/include/asm/uv/uv_mmrs.h index 10474fb1185d..cf1d73643f60 100644 --- a/arch/x86/include/asm/uv/uv_mmrs.h +++ b/arch/x86/include/asm/uv/uv_mmrs.h | |||
@@ -57,6 +57,7 @@ | |||
57 | 57 | ||
58 | #define UV1_HUB_PART_NUMBER 0x88a5 | 58 | #define UV1_HUB_PART_NUMBER 0x88a5 |
59 | #define UV2_HUB_PART_NUMBER 0x8eb8 | 59 | #define UV2_HUB_PART_NUMBER 0x8eb8 |
60 | #define UV2_HUB_PART_NUMBER_X 0x1111 | ||
60 | 61 | ||
61 | /* Compat: if this #define is present, UV headers support UV2 */ | 62 | /* Compat: if this #define is present, UV headers support UV2 */ |
62 | #define UV2_HUB_IS_SUPPORTED 1 | 63 | #define UV2_HUB_IS_SUPPORTED 1 |
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index d3d859035af9..1971e652d24b 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -152,6 +152,7 @@ struct x86_cpuinit_ops { | |||
152 | /** | 152 | /** |
153 | * struct x86_platform_ops - platform specific runtime functions | 153 | * struct x86_platform_ops - platform specific runtime functions |
154 | * @calibrate_tsc: calibrate TSC | 154 | * @calibrate_tsc: calibrate TSC |
155 | * @wallclock_init: init the wallclock device | ||
155 | * @get_wallclock: get time from HW clock like RTC etc. | 156 | * @get_wallclock: get time from HW clock like RTC etc. |
156 | * @set_wallclock: set time back to HW clock | 157 | * @set_wallclock: set time back to HW clock |
157 | * @is_untracked_pat_range exclude from PAT logic | 158 | * @is_untracked_pat_range exclude from PAT logic |
@@ -160,11 +161,13 @@ struct x86_cpuinit_ops { | |||
160 | */ | 161 | */ |
161 | struct x86_platform_ops { | 162 | struct x86_platform_ops { |
162 | unsigned long (*calibrate_tsc)(void); | 163 | unsigned long (*calibrate_tsc)(void); |
164 | void (*wallclock_init)(void); | ||
163 | unsigned long (*get_wallclock)(void); | 165 | unsigned long (*get_wallclock)(void); |
164 | int (*set_wallclock)(unsigned long nowtime); | 166 | int (*set_wallclock)(unsigned long nowtime); |
165 | void (*iommu_shutdown)(void); | 167 | void (*iommu_shutdown)(void); |
166 | bool (*is_untracked_pat_range)(u64 start, u64 end); | 168 | bool (*is_untracked_pat_range)(u64 start, u64 end); |
167 | void (*nmi_init)(void); | 169 | void (*nmi_init)(void); |
170 | unsigned char (*get_nmi_reason)(void); | ||
168 | int (*i8042_detect)(void); | 171 | int (*i8042_detect)(void); |
169 | }; | 172 | }; |
170 | 173 | ||
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index c63822816249..1f84794f0759 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -738,5 +738,5 @@ void __kprobes text_poke_smp_batch(struct text_poke_param *params, int n) | |||
738 | 738 | ||
739 | atomic_set(&stop_machine_first, 1); | 739 | atomic_set(&stop_machine_first, 1); |
740 | wrote_text = 0; | 740 | wrote_text = 0; |
741 | __stop_machine(stop_machine_text_poke, (void *)&tpp, NULL); | 741 | __stop_machine(stop_machine_text_poke, (void *)&tpp, cpu_online_mask); |
742 | } | 742 | } |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index a2fd72e0ab35..f98d84caf94c 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -186,7 +186,7 @@ static struct resource lapic_resource = { | |||
186 | .flags = IORESOURCE_MEM | IORESOURCE_BUSY, | 186 | .flags = IORESOURCE_MEM | IORESOURCE_BUSY, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static unsigned int calibration_result; | 189 | unsigned int lapic_timer_frequency = 0; |
190 | 190 | ||
191 | static void apic_pm_activate(void); | 191 | static void apic_pm_activate(void); |
192 | 192 | ||
@@ -454,7 +454,7 @@ static void lapic_timer_setup(enum clock_event_mode mode, | |||
454 | switch (mode) { | 454 | switch (mode) { |
455 | case CLOCK_EVT_MODE_PERIODIC: | 455 | case CLOCK_EVT_MODE_PERIODIC: |
456 | case CLOCK_EVT_MODE_ONESHOT: | 456 | case CLOCK_EVT_MODE_ONESHOT: |
457 | __setup_APIC_LVTT(calibration_result, | 457 | __setup_APIC_LVTT(lapic_timer_frequency, |
458 | mode != CLOCK_EVT_MODE_PERIODIC, 1); | 458 | mode != CLOCK_EVT_MODE_PERIODIC, 1); |
459 | break; | 459 | break; |
460 | case CLOCK_EVT_MODE_UNUSED: | 460 | case CLOCK_EVT_MODE_UNUSED: |
@@ -638,6 +638,25 @@ static int __init calibrate_APIC_clock(void) | |||
638 | long delta, deltatsc; | 638 | long delta, deltatsc; |
639 | int pm_referenced = 0; | 639 | int pm_referenced = 0; |
640 | 640 | ||
641 | /** | ||
642 | * check if lapic timer has already been calibrated by platform | ||
643 | * specific routine, such as tsc calibration code. if so, we just fill | ||
644 | * in the clockevent structure and return. | ||
645 | */ | ||
646 | |||
647 | if (lapic_timer_frequency) { | ||
648 | apic_printk(APIC_VERBOSE, "lapic timer already calibrated %d\n", | ||
649 | lapic_timer_frequency); | ||
650 | lapic_clockevent.mult = div_sc(lapic_timer_frequency/APIC_DIVISOR, | ||
651 | TICK_NSEC, lapic_clockevent.shift); | ||
652 | lapic_clockevent.max_delta_ns = | ||
653 | clockevent_delta2ns(0x7FFFFF, &lapic_clockevent); | ||
654 | lapic_clockevent.min_delta_ns = | ||
655 | clockevent_delta2ns(0xF, &lapic_clockevent); | ||
656 | lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; | ||
657 | return 0; | ||
658 | } | ||
659 | |||
641 | local_irq_disable(); | 660 | local_irq_disable(); |
642 | 661 | ||
643 | /* Replace the global interrupt handler */ | 662 | /* Replace the global interrupt handler */ |
@@ -679,12 +698,12 @@ static int __init calibrate_APIC_clock(void) | |||
679 | lapic_clockevent.min_delta_ns = | 698 | lapic_clockevent.min_delta_ns = |
680 | clockevent_delta2ns(0xF, &lapic_clockevent); | 699 | clockevent_delta2ns(0xF, &lapic_clockevent); |
681 | 700 | ||
682 | calibration_result = (delta * APIC_DIVISOR) / LAPIC_CAL_LOOPS; | 701 | lapic_timer_frequency = (delta * APIC_DIVISOR) / LAPIC_CAL_LOOPS; |
683 | 702 | ||
684 | apic_printk(APIC_VERBOSE, "..... delta %ld\n", delta); | 703 | apic_printk(APIC_VERBOSE, "..... delta %ld\n", delta); |
685 | apic_printk(APIC_VERBOSE, "..... mult: %u\n", lapic_clockevent.mult); | 704 | apic_printk(APIC_VERBOSE, "..... mult: %u\n", lapic_clockevent.mult); |
686 | apic_printk(APIC_VERBOSE, "..... calibration result: %u\n", | 705 | apic_printk(APIC_VERBOSE, "..... calibration result: %u\n", |
687 | calibration_result); | 706 | lapic_timer_frequency); |
688 | 707 | ||
689 | if (cpu_has_tsc) { | 708 | if (cpu_has_tsc) { |
690 | apic_printk(APIC_VERBOSE, "..... CPU clock speed is " | 709 | apic_printk(APIC_VERBOSE, "..... CPU clock speed is " |
@@ -695,13 +714,13 @@ static int __init calibrate_APIC_clock(void) | |||
695 | 714 | ||
696 | apic_printk(APIC_VERBOSE, "..... host bus clock speed is " | 715 | apic_printk(APIC_VERBOSE, "..... host bus clock speed is " |
697 | "%u.%04u MHz.\n", | 716 | "%u.%04u MHz.\n", |
698 | calibration_result / (1000000 / HZ), | 717 | lapic_timer_frequency / (1000000 / HZ), |
699 | calibration_result % (1000000 / HZ)); | 718 | lapic_timer_frequency % (1000000 / HZ)); |
700 | 719 | ||
701 | /* | 720 | /* |
702 | * Do a sanity check on the APIC calibration result | 721 | * Do a sanity check on the APIC calibration result |
703 | */ | 722 | */ |
704 | if (calibration_result < (1000000 / HZ)) { | 723 | if (lapic_timer_frequency < (1000000 / HZ)) { |
705 | local_irq_enable(); | 724 | local_irq_enable(); |
706 | pr_warning("APIC frequency too slow, disabling apic timer\n"); | 725 | pr_warning("APIC frequency too slow, disabling apic timer\n"); |
707 | return -1; | 726 | return -1; |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 3c31fa98af6d..6d939d7847e2 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -193,10 +193,8 @@ int __init arch_early_irq_init(void) | |||
193 | struct irq_cfg *cfg; | 193 | struct irq_cfg *cfg; |
194 | int count, node, i; | 194 | int count, node, i; |
195 | 195 | ||
196 | if (!legacy_pic->nr_legacy_irqs) { | 196 | if (!legacy_pic->nr_legacy_irqs) |
197 | nr_irqs_gsi = 0; | ||
198 | io_apic_irqs = ~0UL; | 197 | io_apic_irqs = ~0UL; |
199 | } | ||
200 | 198 | ||
201 | for (i = 0; i < nr_ioapics; i++) { | 199 | for (i = 0; i < nr_ioapics; i++) { |
202 | ioapics[i].saved_registers = | 200 | ioapics[i].saved_registers = |
@@ -1696,6 +1694,7 @@ __apicdebuginit(void) print_IO_APICs(void) | |||
1696 | int ioapic_idx; | 1694 | int ioapic_idx; |
1697 | struct irq_cfg *cfg; | 1695 | struct irq_cfg *cfg; |
1698 | unsigned int irq; | 1696 | unsigned int irq; |
1697 | struct irq_chip *chip; | ||
1699 | 1698 | ||
1700 | printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries); | 1699 | printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries); |
1701 | for (ioapic_idx = 0; ioapic_idx < nr_ioapics; ioapic_idx++) | 1700 | for (ioapic_idx = 0; ioapic_idx < nr_ioapics; ioapic_idx++) |
@@ -1716,6 +1715,10 @@ __apicdebuginit(void) print_IO_APICs(void) | |||
1716 | for_each_active_irq(irq) { | 1715 | for_each_active_irq(irq) { |
1717 | struct irq_pin_list *entry; | 1716 | struct irq_pin_list *entry; |
1718 | 1717 | ||
1718 | chip = irq_get_chip(irq); | ||
1719 | if (chip != &ioapic_chip) | ||
1720 | continue; | ||
1721 | |||
1719 | cfg = irq_get_chip_data(irq); | 1722 | cfg = irq_get_chip_data(irq); |
1720 | if (!cfg) | 1723 | if (!cfg) |
1721 | continue; | 1724 | continue; |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 62ae3001ae02..9d59bbacd4e3 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -93,6 +93,8 @@ static int __init early_get_pnodeid(void) | |||
93 | 93 | ||
94 | if (node_id.s.part_number == UV2_HUB_PART_NUMBER) | 94 | if (node_id.s.part_number == UV2_HUB_PART_NUMBER) |
95 | uv_min_hub_revision_id += UV2_HUB_REVISION_BASE - 1; | 95 | uv_min_hub_revision_id += UV2_HUB_REVISION_BASE - 1; |
96 | if (node_id.s.part_number == UV2_HUB_PART_NUMBER_X) | ||
97 | uv_min_hub_revision_id += UV2_HUB_REVISION_BASE - 1; | ||
96 | 98 | ||
97 | uv_hub_info->hub_revision = uv_min_hub_revision_id; | 99 | uv_hub_info->hub_revision = uv_min_hub_revision_id; |
98 | pnode = (node_id.s.node_id >> 1) & ((1 << m_n_config.s.n_skt) - 1); | 100 | pnode = (node_id.s.node_id >> 1) & ((1 << m_n_config.s.n_skt) - 1); |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index c7e46cb35327..0bab2b18bb20 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -442,8 +442,6 @@ static void __cpuinit bsp_init_amd(struct cpuinfo_x86 *c) | |||
442 | 442 | ||
443 | static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | 443 | static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) |
444 | { | 444 | { |
445 | u32 dummy; | ||
446 | |||
447 | early_init_amd_mc(c); | 445 | early_init_amd_mc(c); |
448 | 446 | ||
449 | /* | 447 | /* |
@@ -473,12 +471,12 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | |||
473 | set_cpu_cap(c, X86_FEATURE_EXTD_APICID); | 471 | set_cpu_cap(c, X86_FEATURE_EXTD_APICID); |
474 | } | 472 | } |
475 | #endif | 473 | #endif |
476 | |||
477 | rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy); | ||
478 | } | 474 | } |
479 | 475 | ||
480 | static void __cpuinit init_amd(struct cpuinfo_x86 *c) | 476 | static void __cpuinit init_amd(struct cpuinfo_x86 *c) |
481 | { | 477 | { |
478 | u32 dummy; | ||
479 | |||
482 | #ifdef CONFIG_SMP | 480 | #ifdef CONFIG_SMP |
483 | unsigned long long value; | 481 | unsigned long long value; |
484 | 482 | ||
@@ -657,6 +655,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
657 | checking_wrmsrl(MSR_AMD64_MCx_MASK(4), mask); | 655 | checking_wrmsrl(MSR_AMD64_MCx_MASK(4), mask); |
658 | } | 656 | } |
659 | } | 657 | } |
658 | |||
659 | rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy); | ||
660 | } | 660 | } |
661 | 661 | ||
662 | #ifdef CONFIG_X86_32 | 662 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c index 6199232161cf..319882ef848d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-inject.c +++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c | |||
@@ -208,7 +208,7 @@ static int inject_init(void) | |||
208 | if (!alloc_cpumask_var(&mce_inject_cpumask, GFP_KERNEL)) | 208 | if (!alloc_cpumask_var(&mce_inject_cpumask, GFP_KERNEL)) |
209 | return -ENOMEM; | 209 | return -ENOMEM; |
210 | printk(KERN_INFO "Machine check injector initialized\n"); | 210 | printk(KERN_INFO "Machine check injector initialized\n"); |
211 | mce_chrdev_ops.write = mce_write; | 211 | register_mce_write_callback(mce_write); |
212 | register_nmi_handler(NMI_LOCAL, mce_raise_notify, 0, | 212 | register_nmi_handler(NMI_LOCAL, mce_raise_notify, 0, |
213 | "mce_notify"); | 213 | "mce_notify"); |
214 | return 0; | 214 | return 0; |
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 362056aefeb4..2af127d4c3d1 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -1634,16 +1634,35 @@ static long mce_chrdev_ioctl(struct file *f, unsigned int cmd, | |||
1634 | } | 1634 | } |
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | /* Modified in mce-inject.c, so not static or const */ | 1637 | static ssize_t (*mce_write)(struct file *filp, const char __user *ubuf, |
1638 | struct file_operations mce_chrdev_ops = { | 1638 | size_t usize, loff_t *off); |
1639 | |||
1640 | void register_mce_write_callback(ssize_t (*fn)(struct file *filp, | ||
1641 | const char __user *ubuf, | ||
1642 | size_t usize, loff_t *off)) | ||
1643 | { | ||
1644 | mce_write = fn; | ||
1645 | } | ||
1646 | EXPORT_SYMBOL_GPL(register_mce_write_callback); | ||
1647 | |||
1648 | ssize_t mce_chrdev_write(struct file *filp, const char __user *ubuf, | ||
1649 | size_t usize, loff_t *off) | ||
1650 | { | ||
1651 | if (mce_write) | ||
1652 | return mce_write(filp, ubuf, usize, off); | ||
1653 | else | ||
1654 | return -EINVAL; | ||
1655 | } | ||
1656 | |||
1657 | static const struct file_operations mce_chrdev_ops = { | ||
1639 | .open = mce_chrdev_open, | 1658 | .open = mce_chrdev_open, |
1640 | .release = mce_chrdev_release, | 1659 | .release = mce_chrdev_release, |
1641 | .read = mce_chrdev_read, | 1660 | .read = mce_chrdev_read, |
1661 | .write = mce_chrdev_write, | ||
1642 | .poll = mce_chrdev_poll, | 1662 | .poll = mce_chrdev_poll, |
1643 | .unlocked_ioctl = mce_chrdev_ioctl, | 1663 | .unlocked_ioctl = mce_chrdev_ioctl, |
1644 | .llseek = no_llseek, | 1664 | .llseek = no_llseek, |
1645 | }; | 1665 | }; |
1646 | EXPORT_SYMBOL_GPL(mce_chrdev_ops); | ||
1647 | 1666 | ||
1648 | static struct miscdevice mce_chrdev_device = { | 1667 | static struct miscdevice mce_chrdev_device = { |
1649 | MISC_MCELOG_MINOR, | 1668 | MISC_MCELOG_MINOR, |
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index a71efcdbb092..97b26356e9ee 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
@@ -547,6 +547,7 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base, | |||
547 | 547 | ||
548 | if (tmp != mask_lo) { | 548 | if (tmp != mask_lo) { |
549 | printk(KERN_WARNING "mtrr: your BIOS has configured an incorrect mask, fixing it.\n"); | 549 | printk(KERN_WARNING "mtrr: your BIOS has configured an incorrect mask, fixing it.\n"); |
550 | add_taint(TAINT_FIRMWARE_WORKAROUND); | ||
550 | mask_lo = tmp; | 551 | mask_lo = tmp; |
551 | } | 552 | } |
552 | } | 553 | } |
@@ -693,6 +694,7 @@ static void prepare_set(void) __acquires(set_atomicity_lock) | |||
693 | 694 | ||
694 | /* Disable MTRRs, and set the default type to uncached */ | 695 | /* Disable MTRRs, and set the default type to uncached */ |
695 | mtrr_wrmsr(MSR_MTRRdefType, deftype_lo & ~0xcff, deftype_hi); | 696 | mtrr_wrmsr(MSR_MTRRdefType, deftype_lo & ~0xcff, deftype_hi); |
697 | wbinvd(); | ||
696 | } | 698 | } |
697 | 699 | ||
698 | static void post_set(void) __releases(set_atomicity_lock) | 700 | static void post_set(void) __releases(set_atomicity_lock) |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 640891014b2a..2bda212a0010 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -312,12 +312,8 @@ int x86_setup_perfctr(struct perf_event *event) | |||
312 | return -EOPNOTSUPP; | 312 | return -EOPNOTSUPP; |
313 | } | 313 | } |
314 | 314 | ||
315 | /* | ||
316 | * Do not allow config1 (extended registers) to propagate, | ||
317 | * there's no sane user-space generalization yet: | ||
318 | */ | ||
319 | if (attr->type == PERF_TYPE_RAW) | 315 | if (attr->type == PERF_TYPE_RAW) |
320 | return 0; | 316 | return x86_pmu_extra_regs(event->attr.config, event); |
321 | 317 | ||
322 | if (attr->type == PERF_TYPE_HW_CACHE) | 318 | if (attr->type == PERF_TYPE_HW_CACHE) |
323 | return set_ext_hw_attr(hwc, event); | 319 | return set_ext_hw_attr(hwc, event); |
@@ -588,7 +584,7 @@ done: | |||
588 | x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]); | 584 | x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]); |
589 | } | 585 | } |
590 | } | 586 | } |
591 | return num ? -ENOSPC : 0; | 587 | return num ? -EINVAL : 0; |
592 | } | 588 | } |
593 | 589 | ||
594 | /* | 590 | /* |
@@ -607,7 +603,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, | |||
607 | 603 | ||
608 | if (is_x86_event(leader)) { | 604 | if (is_x86_event(leader)) { |
609 | if (n >= max_count) | 605 | if (n >= max_count) |
610 | return -ENOSPC; | 606 | return -EINVAL; |
611 | cpuc->event_list[n] = leader; | 607 | cpuc->event_list[n] = leader; |
612 | n++; | 608 | n++; |
613 | } | 609 | } |
@@ -620,7 +616,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, | |||
620 | continue; | 616 | continue; |
621 | 617 | ||
622 | if (n >= max_count) | 618 | if (n >= max_count) |
623 | return -ENOSPC; | 619 | return -EINVAL; |
624 | 620 | ||
625 | cpuc->event_list[n] = event; | 621 | cpuc->event_list[n] = event; |
626 | n++; | 622 | n++; |
@@ -1316,7 +1312,7 @@ static int validate_event(struct perf_event *event) | |||
1316 | c = x86_pmu.get_event_constraints(fake_cpuc, event); | 1312 | c = x86_pmu.get_event_constraints(fake_cpuc, event); |
1317 | 1313 | ||
1318 | if (!c || !c->weight) | 1314 | if (!c || !c->weight) |
1319 | ret = -ENOSPC; | 1315 | ret = -EINVAL; |
1320 | 1316 | ||
1321 | if (x86_pmu.put_event_constraints) | 1317 | if (x86_pmu.put_event_constraints) |
1322 | x86_pmu.put_event_constraints(fake_cpuc, event); | 1318 | x86_pmu.put_event_constraints(fake_cpuc, event); |
@@ -1341,7 +1337,7 @@ static int validate_group(struct perf_event *event) | |||
1341 | { | 1337 | { |
1342 | struct perf_event *leader = event->group_leader; | 1338 | struct perf_event *leader = event->group_leader; |
1343 | struct cpu_hw_events *fake_cpuc; | 1339 | struct cpu_hw_events *fake_cpuc; |
1344 | int ret = -ENOSPC, n; | 1340 | int ret = -EINVAL, n; |
1345 | 1341 | ||
1346 | fake_cpuc = allocate_fake_cpuc(); | 1342 | fake_cpuc = allocate_fake_cpuc(); |
1347 | if (IS_ERR(fake_cpuc)) | 1343 | if (IS_ERR(fake_cpuc)) |
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c index ab6343d21825..3b8a2d30d14e 100644 --- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c +++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c | |||
@@ -199,8 +199,7 @@ static int force_ibs_eilvt_setup(void) | |||
199 | goto out; | 199 | goto out; |
200 | } | 200 | } |
201 | 201 | ||
202 | pr_err(FW_BUG "using offset %d for IBS interrupts\n", offset); | 202 | pr_info("IBS: LVT offset %d assigned\n", offset); |
203 | pr_err(FW_BUG "workaround enabled for IBS LVT offset\n"); | ||
204 | 203 | ||
205 | return 0; | 204 | return 0; |
206 | out: | 205 | out: |
@@ -265,19 +264,23 @@ perf_ibs_cpu_notifier(struct notifier_block *self, unsigned long action, void *h | |||
265 | static __init int amd_ibs_init(void) | 264 | static __init int amd_ibs_init(void) |
266 | { | 265 | { |
267 | u32 caps; | 266 | u32 caps; |
268 | int ret; | 267 | int ret = -EINVAL; |
269 | 268 | ||
270 | caps = __get_ibs_caps(); | 269 | caps = __get_ibs_caps(); |
271 | if (!caps) | 270 | if (!caps) |
272 | return -ENODEV; /* ibs not supported by the cpu */ | 271 | return -ENODEV; /* ibs not supported by the cpu */ |
273 | 272 | ||
274 | if (!ibs_eilvt_valid()) { | 273 | /* |
275 | ret = force_ibs_eilvt_setup(); | 274 | * Force LVT offset assignment for family 10h: The offsets are |
276 | if (ret) { | 275 | * not assigned by the BIOS for this family, so the OS is |
277 | pr_err("Failed to setup IBS, %d\n", ret); | 276 | * responsible for doing it. If the OS assignment fails, fall |
278 | return ret; | 277 | * back to BIOS settings and try to setup this. |
279 | } | 278 | */ |
280 | } | 279 | if (boot_cpu_data.x86 == 0x10) |
280 | force_ibs_eilvt_setup(); | ||
281 | |||
282 | if (!ibs_eilvt_valid()) | ||
283 | goto out; | ||
281 | 284 | ||
282 | get_online_cpus(); | 285 | get_online_cpus(); |
283 | ibs_caps = caps; | 286 | ibs_caps = caps; |
@@ -287,7 +290,11 @@ static __init int amd_ibs_init(void) | |||
287 | smp_call_function(setup_APIC_ibs, NULL, 1); | 290 | smp_call_function(setup_APIC_ibs, NULL, 1); |
288 | put_online_cpus(); | 291 | put_online_cpus(); |
289 | 292 | ||
290 | return perf_event_ibs_init(); | 293 | ret = perf_event_ibs_init(); |
294 | out: | ||
295 | if (ret) | ||
296 | pr_err("Failed to setup IBS, %d\n", ret); | ||
297 | return ret; | ||
291 | } | 298 | } |
292 | 299 | ||
293 | /* Since we need the pci subsystem to init ibs we can't do this earlier: */ | 300 | /* Since we need the pci subsystem to init ibs we can't do this earlier: */ |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 2be5ebe99872..8d601b18bf9f 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -1545,6 +1545,13 @@ static void intel_clovertown_quirks(void) | |||
1545 | x86_pmu.pebs_constraints = NULL; | 1545 | x86_pmu.pebs_constraints = NULL; |
1546 | } | 1546 | } |
1547 | 1547 | ||
1548 | static void intel_sandybridge_quirks(void) | ||
1549 | { | ||
1550 | printk(KERN_WARNING "PEBS disabled due to CPU errata.\n"); | ||
1551 | x86_pmu.pebs = 0; | ||
1552 | x86_pmu.pebs_constraints = NULL; | ||
1553 | } | ||
1554 | |||
1548 | __init int intel_pmu_init(void) | 1555 | __init int intel_pmu_init(void) |
1549 | { | 1556 | { |
1550 | union cpuid10_edx edx; | 1557 | union cpuid10_edx edx; |
@@ -1694,6 +1701,7 @@ __init int intel_pmu_init(void) | |||
1694 | break; | 1701 | break; |
1695 | 1702 | ||
1696 | case 42: /* SandyBridge */ | 1703 | case 42: /* SandyBridge */ |
1704 | x86_pmu.quirks = intel_sandybridge_quirks; | ||
1697 | case 45: /* SandyBridge, "Romely-EP" */ | 1705 | case 45: /* SandyBridge, "Romely-EP" */ |
1698 | memcpy(hw_cache_event_ids, snb_hw_cache_event_ids, | 1706 | memcpy(hw_cache_event_ids, snb_hw_cache_event_ids, |
1699 | sizeof(hw_cache_event_ids)); | 1707 | sizeof(hw_cache_event_ids)); |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c index c0d238f49db8..73da6b64f5b7 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_ds.c +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c | |||
@@ -493,6 +493,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs) | |||
493 | unsigned long from = cpuc->lbr_entries[0].from; | 493 | unsigned long from = cpuc->lbr_entries[0].from; |
494 | unsigned long old_to, to = cpuc->lbr_entries[0].to; | 494 | unsigned long old_to, to = cpuc->lbr_entries[0].to; |
495 | unsigned long ip = regs->ip; | 495 | unsigned long ip = regs->ip; |
496 | int is_64bit = 0; | ||
496 | 497 | ||
497 | /* | 498 | /* |
498 | * We don't need to fixup if the PEBS assist is fault like | 499 | * We don't need to fixup if the PEBS assist is fault like |
@@ -544,7 +545,10 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs) | |||
544 | } else | 545 | } else |
545 | kaddr = (void *)to; | 546 | kaddr = (void *)to; |
546 | 547 | ||
547 | kernel_insn_init(&insn, kaddr); | 548 | #ifdef CONFIG_X86_64 |
549 | is_64bit = kernel_ip(to) || !test_thread_flag(TIF_IA32); | ||
550 | #endif | ||
551 | insn_init(&insn, kaddr, is_64bit); | ||
548 | insn_get_length(&insn); | 552 | insn_get_length(&insn); |
549 | to += insn.length; | 553 | to += insn.length; |
550 | } while (to < ip); | 554 | } while (to < ip); |
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index 492bf1358a7c..ef484d9d0a25 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
@@ -1268,7 +1268,7 @@ reserve: | |||
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | done: | 1270 | done: |
1271 | return num ? -ENOSPC : 0; | 1271 | return num ? -EINVAL : 0; |
1272 | } | 1272 | } |
1273 | 1273 | ||
1274 | static __initconst const struct x86_pmu p4_pmu = { | 1274 | static __initconst const struct x86_pmu p4_pmu = { |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index b946a9eac7d9..1bb0bf4d92cd 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -1049,6 +1049,14 @@ int hpet_rtc_timer_init(void) | |||
1049 | } | 1049 | } |
1050 | EXPORT_SYMBOL_GPL(hpet_rtc_timer_init); | 1050 | EXPORT_SYMBOL_GPL(hpet_rtc_timer_init); |
1051 | 1051 | ||
1052 | static void hpet_disable_rtc_channel(void) | ||
1053 | { | ||
1054 | unsigned long cfg; | ||
1055 | cfg = hpet_readl(HPET_T1_CFG); | ||
1056 | cfg &= ~HPET_TN_ENABLE; | ||
1057 | hpet_writel(cfg, HPET_T1_CFG); | ||
1058 | } | ||
1059 | |||
1052 | /* | 1060 | /* |
1053 | * The functions below are called from rtc driver. | 1061 | * The functions below are called from rtc driver. |
1054 | * Return 0 if HPET is not being used. | 1062 | * Return 0 if HPET is not being used. |
@@ -1060,6 +1068,9 @@ int hpet_mask_rtc_irq_bit(unsigned long bit_mask) | |||
1060 | return 0; | 1068 | return 0; |
1061 | 1069 | ||
1062 | hpet_rtc_flags &= ~bit_mask; | 1070 | hpet_rtc_flags &= ~bit_mask; |
1071 | if (unlikely(!hpet_rtc_flags)) | ||
1072 | hpet_disable_rtc_channel(); | ||
1073 | |||
1063 | return 1; | 1074 | return 1; |
1064 | } | 1075 | } |
1065 | EXPORT_SYMBOL_GPL(hpet_mask_rtc_irq_bit); | 1076 | EXPORT_SYMBOL_GPL(hpet_mask_rtc_irq_bit); |
@@ -1125,15 +1136,11 @@ EXPORT_SYMBOL_GPL(hpet_rtc_dropped_irq); | |||
1125 | 1136 | ||
1126 | static void hpet_rtc_timer_reinit(void) | 1137 | static void hpet_rtc_timer_reinit(void) |
1127 | { | 1138 | { |
1128 | unsigned int cfg, delta; | 1139 | unsigned int delta; |
1129 | int lost_ints = -1; | 1140 | int lost_ints = -1; |
1130 | 1141 | ||
1131 | if (unlikely(!hpet_rtc_flags)) { | 1142 | if (unlikely(!hpet_rtc_flags)) |
1132 | cfg = hpet_readl(HPET_T1_CFG); | 1143 | hpet_disable_rtc_channel(); |
1133 | cfg &= ~HPET_TN_ENABLE; | ||
1134 | hpet_writel(cfg, HPET_T1_CFG); | ||
1135 | return; | ||
1136 | } | ||
1137 | 1144 | ||
1138 | if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit) | 1145 | if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit) |
1139 | delta = hpet_default_delta; | 1146 | delta = hpet_default_delta; |
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index acf8fbf8fbda..69bca468c47a 100644 --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c | |||
@@ -38,6 +38,9 @@ static inline void stack_overflow_check(struct pt_regs *regs) | |||
38 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 38 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
39 | u64 curbase = (u64)task_stack_page(current); | 39 | u64 curbase = (u64)task_stack_page(current); |
40 | 40 | ||
41 | if (user_mode_vm(regs)) | ||
42 | return; | ||
43 | |||
41 | WARN_ONCE(regs->sp >= curbase && | 44 | WARN_ONCE(regs->sp >= curbase && |
42 | regs->sp <= curbase + THREAD_SIZE && | 45 | regs->sp <= curbase + THREAD_SIZE && |
43 | regs->sp < curbase + sizeof(struct thread_info) + | 46 | regs->sp < curbase + sizeof(struct thread_info) + |
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index c1a0188e29ae..44842d756b29 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c | |||
@@ -74,9 +74,10 @@ static cycle_t kvm_clock_read(void) | |||
74 | struct pvclock_vcpu_time_info *src; | 74 | struct pvclock_vcpu_time_info *src; |
75 | cycle_t ret; | 75 | cycle_t ret; |
76 | 76 | ||
77 | src = &get_cpu_var(hv_clock); | 77 | preempt_disable_notrace(); |
78 | src = &__get_cpu_var(hv_clock); | ||
78 | ret = pvclock_clocksource_read(src); | 79 | ret = pvclock_clocksource_read(src); |
79 | put_cpu_var(hv_clock); | 80 | preempt_enable_notrace(); |
80 | return ret; | 81 | return ret; |
81 | } | 82 | } |
82 | 83 | ||
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index f2d2a664e797..9d46f5e43b51 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
@@ -256,7 +256,7 @@ static int __init microcode_dev_init(void) | |||
256 | return 0; | 256 | return 0; |
257 | } | 257 | } |
258 | 258 | ||
259 | static void microcode_dev_exit(void) | 259 | static void __exit microcode_dev_exit(void) |
260 | { | 260 | { |
261 | misc_deregister(µcode_dev); | 261 | misc_deregister(µcode_dev); |
262 | } | 262 | } |
@@ -519,10 +519,8 @@ static int __init microcode_init(void) | |||
519 | 519 | ||
520 | microcode_pdev = platform_device_register_simple("microcode", -1, | 520 | microcode_pdev = platform_device_register_simple("microcode", -1, |
521 | NULL, 0); | 521 | NULL, 0); |
522 | if (IS_ERR(microcode_pdev)) { | 522 | if (IS_ERR(microcode_pdev)) |
523 | microcode_dev_exit(); | ||
524 | return PTR_ERR(microcode_pdev); | 523 | return PTR_ERR(microcode_pdev); |
525 | } | ||
526 | 524 | ||
527 | get_online_cpus(); | 525 | get_online_cpus(); |
528 | mutex_lock(µcode_mutex); | 526 | mutex_lock(µcode_mutex); |
@@ -532,14 +530,12 @@ static int __init microcode_init(void) | |||
532 | mutex_unlock(µcode_mutex); | 530 | mutex_unlock(µcode_mutex); |
533 | put_online_cpus(); | 531 | put_online_cpus(); |
534 | 532 | ||
535 | if (error) { | 533 | if (error) |
536 | platform_device_unregister(microcode_pdev); | 534 | goto out_pdev; |
537 | return error; | ||
538 | } | ||
539 | 535 | ||
540 | error = microcode_dev_init(); | 536 | error = microcode_dev_init(); |
541 | if (error) | 537 | if (error) |
542 | return error; | 538 | goto out_sysdev_driver; |
543 | 539 | ||
544 | register_syscore_ops(&mc_syscore_ops); | 540 | register_syscore_ops(&mc_syscore_ops); |
545 | register_hotcpu_notifier(&mc_cpu_notifier); | 541 | register_hotcpu_notifier(&mc_cpu_notifier); |
@@ -548,6 +544,20 @@ static int __init microcode_init(void) | |||
548 | " <tigran@aivazian.fsnet.co.uk>, Peter Oruba\n"); | 544 | " <tigran@aivazian.fsnet.co.uk>, Peter Oruba\n"); |
549 | 545 | ||
550 | return 0; | 546 | return 0; |
547 | |||
548 | out_sysdev_driver: | ||
549 | get_online_cpus(); | ||
550 | mutex_lock(µcode_mutex); | ||
551 | |||
552 | sysdev_driver_unregister(&cpu_sysdev_class, &mc_sysdev_driver); | ||
553 | |||
554 | mutex_unlock(µcode_mutex); | ||
555 | put_online_cpus(); | ||
556 | |||
557 | out_pdev: | ||
558 | platform_device_unregister(microcode_pdev); | ||
559 | return error; | ||
560 | |||
551 | } | 561 | } |
552 | module_init(microcode_init); | 562 | module_init(microcode_init); |
553 | 563 | ||
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 9103b89c145a..0741b062a304 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -95,8 +95,8 @@ static void __init MP_bus_info(struct mpc_bus *m) | |||
95 | } | 95 | } |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | set_bit(m->busid, mp_bus_not_pci); | ||
98 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) { | 99 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) { |
99 | set_bit(m->busid, mp_bus_not_pci); | ||
100 | #if defined(CONFIG_EISA) || defined(CONFIG_MCA) | 100 | #if defined(CONFIG_EISA) || defined(CONFIG_MCA) |
101 | mp_bus_id_to_type[m->busid] = MP_BUS_ISA; | 101 | mp_bus_id_to_type[m->busid] = MP_BUS_ISA; |
102 | #endif | 102 | #endif |
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index b9c8628974af..e88f37b58ddd 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
30 | #include <asm/mach_traps.h> | 30 | #include <asm/mach_traps.h> |
31 | #include <asm/nmi.h> | 31 | #include <asm/nmi.h> |
32 | #include <asm/x86_init.h> | ||
32 | 33 | ||
33 | #define NMI_MAX_NAMELEN 16 | 34 | #define NMI_MAX_NAMELEN 16 |
34 | struct nmiaction { | 35 | struct nmiaction { |
@@ -348,7 +349,7 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs) | |||
348 | 349 | ||
349 | /* Non-CPU-specific NMI: NMI sources can be processed on any CPU */ | 350 | /* Non-CPU-specific NMI: NMI sources can be processed on any CPU */ |
350 | raw_spin_lock(&nmi_reason_lock); | 351 | raw_spin_lock(&nmi_reason_lock); |
351 | reason = get_nmi_reason(); | 352 | reason = x86_platform.get_nmi_reason(); |
352 | 353 | ||
353 | if (reason & NMI_REASON_MASK) { | 354 | if (reason & NMI_REASON_MASK) { |
354 | if (reason & NMI_REASON_SERR) | 355 | if (reason & NMI_REASON_SERR) |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index b9b3b1a51643..ee5d4fbd53b4 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -403,6 +403,14 @@ void default_idle(void) | |||
403 | EXPORT_SYMBOL(default_idle); | 403 | EXPORT_SYMBOL(default_idle); |
404 | #endif | 404 | #endif |
405 | 405 | ||
406 | bool set_pm_idle_to_default(void) | ||
407 | { | ||
408 | bool ret = !!pm_idle; | ||
409 | |||
410 | pm_idle = default_idle; | ||
411 | |||
412 | return ret; | ||
413 | } | ||
406 | void stop_this_cpu(void *dummy) | 414 | void stop_this_cpu(void *dummy) |
407 | { | 415 | { |
408 | local_irq_disable(); | 416 | local_irq_disable(); |
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index b78643d0f9a5..03920a15a632 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -553,4 +553,17 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC, | |||
553 | quirk_amd_nb_node); | 553 | quirk_amd_nb_node); |
554 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_LINK, | 554 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_LINK, |
555 | quirk_amd_nb_node); | 555 | quirk_amd_nb_node); |
556 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F0, | ||
557 | quirk_amd_nb_node); | ||
558 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F1, | ||
559 | quirk_amd_nb_node); | ||
560 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F2, | ||
561 | quirk_amd_nb_node); | ||
562 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F3, | ||
563 | quirk_amd_nb_node); | ||
564 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4, | ||
565 | quirk_amd_nb_node); | ||
566 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F5, | ||
567 | quirk_amd_nb_node); | ||
568 | |||
556 | #endif | 569 | #endif |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index e334be1182b9..37a458b521a6 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -124,7 +124,7 @@ __setup("reboot=", reboot_setup); | |||
124 | */ | 124 | */ |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * Some machines require the "reboot=b" commandline option, | 127 | * Some machines require the "reboot=b" or "reboot=k" commandline options, |
128 | * this quirk makes that automatic. | 128 | * this quirk makes that automatic. |
129 | */ | 129 | */ |
130 | static int __init set_bios_reboot(const struct dmi_system_id *d) | 130 | static int __init set_bios_reboot(const struct dmi_system_id *d) |
@@ -136,6 +136,15 @@ static int __init set_bios_reboot(const struct dmi_system_id *d) | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | static int __init set_kbd_reboot(const struct dmi_system_id *d) | ||
140 | { | ||
141 | if (reboot_type != BOOT_KBD) { | ||
142 | reboot_type = BOOT_KBD; | ||
143 | printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboot.\n", d->ident); | ||
144 | } | ||
145 | return 0; | ||
146 | } | ||
147 | |||
139 | static struct dmi_system_id __initdata reboot_dmi_table[] = { | 148 | static struct dmi_system_id __initdata reboot_dmi_table[] = { |
140 | { /* Handle problems with rebooting on Dell E520's */ | 149 | { /* Handle problems with rebooting on Dell E520's */ |
141 | .callback = set_bios_reboot, | 150 | .callback = set_bios_reboot, |
@@ -295,7 +304,7 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
295 | }, | 304 | }, |
296 | }, | 305 | }, |
297 | { /* Handle reboot issue on Acer Aspire one */ | 306 | { /* Handle reboot issue on Acer Aspire one */ |
298 | .callback = set_bios_reboot, | 307 | .callback = set_kbd_reboot, |
299 | .ident = "Acer Aspire One A110", | 308 | .ident = "Acer Aspire One A110", |
300 | .matches = { | 309 | .matches = { |
301 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 310 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
@@ -443,6 +452,14 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = { | |||
443 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420"), | 452 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420"), |
444 | }, | 453 | }, |
445 | }, | 454 | }, |
455 | { /* Handle problems with rebooting on the OptiPlex 990. */ | ||
456 | .callback = set_pci_reboot, | ||
457 | .ident = "Dell OptiPlex 990", | ||
458 | .matches = { | ||
459 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
460 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"), | ||
461 | }, | ||
462 | }, | ||
446 | { } | 463 | { } |
447 | }; | 464 | }; |
448 | 465 | ||
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 348ce016a835..af6db6ec5b2a 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/vsyscall.h> | 12 | #include <asm/vsyscall.h> |
13 | #include <asm/x86_init.h> | 13 | #include <asm/x86_init.h> |
14 | #include <asm/time.h> | 14 | #include <asm/time.h> |
15 | #include <asm/mrst.h> | ||
15 | 16 | ||
16 | #ifdef CONFIG_X86_32 | 17 | #ifdef CONFIG_X86_32 |
17 | /* | 18 | /* |
@@ -242,6 +243,10 @@ static __init int add_rtc_cmos(void) | |||
242 | if (of_have_populated_dt()) | 243 | if (of_have_populated_dt()) |
243 | return 0; | 244 | return 0; |
244 | 245 | ||
246 | /* Intel MID platforms don't have ioport rtc */ | ||
247 | if (mrst_identify_cpu()) | ||
248 | return -ENODEV; | ||
249 | |||
245 | platform_device_register(&rtc_device); | 250 | platform_device_register(&rtc_device); |
246 | dev_info(&rtc_device.dev, | 251 | dev_info(&rtc_device.dev, |
247 | "registered platform RTC device (no PNP device found)\n"); | 252 | "registered platform RTC device (no PNP device found)\n"); |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index afaf38447ef5..cf0ef986cb6d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -1045,6 +1045,8 @@ void __init setup_arch(char **cmdline_p) | |||
1045 | 1045 | ||
1046 | x86_init.timers.wallclock_init(); | 1046 | x86_init.timers.wallclock_init(); |
1047 | 1047 | ||
1048 | x86_platform.wallclock_init(); | ||
1049 | |||
1048 | mcheck_init(); | 1050 | mcheck_init(); |
1049 | 1051 | ||
1050 | arch_init_ideal_nops(); | 1052 | arch_init_ideal_nops(); |
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 6f164bd5e14d..c1d6cd549397 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -21,12 +21,14 @@ | |||
21 | #include <asm/pat.h> | 21 | #include <asm/pat.h> |
22 | #include <asm/tsc.h> | 22 | #include <asm/tsc.h> |
23 | #include <asm/iommu.h> | 23 | #include <asm/iommu.h> |
24 | #include <asm/mach_traps.h> | ||
24 | 25 | ||
25 | void __cpuinit x86_init_noop(void) { } | 26 | void __cpuinit x86_init_noop(void) { } |
26 | void __init x86_init_uint_noop(unsigned int unused) { } | 27 | void __init x86_init_uint_noop(unsigned int unused) { } |
27 | void __init x86_init_pgd_noop(pgd_t *unused) { } | 28 | void __init x86_init_pgd_noop(pgd_t *unused) { } |
28 | int __init iommu_init_noop(void) { return 0; } | 29 | int __init iommu_init_noop(void) { return 0; } |
29 | void iommu_shutdown_noop(void) { } | 30 | void iommu_shutdown_noop(void) { } |
31 | void wallclock_init_noop(void) { } | ||
30 | 32 | ||
31 | /* | 33 | /* |
32 | * The platform setup functions are preset with the default functions | 34 | * The platform setup functions are preset with the default functions |
@@ -97,11 +99,13 @@ static int default_i8042_detect(void) { return 1; }; | |||
97 | 99 | ||
98 | struct x86_platform_ops x86_platform = { | 100 | struct x86_platform_ops x86_platform = { |
99 | .calibrate_tsc = native_calibrate_tsc, | 101 | .calibrate_tsc = native_calibrate_tsc, |
102 | .wallclock_init = wallclock_init_noop, | ||
100 | .get_wallclock = mach_get_cmos_time, | 103 | .get_wallclock = mach_get_cmos_time, |
101 | .set_wallclock = mach_set_rtc_mmss, | 104 | .set_wallclock = mach_set_rtc_mmss, |
102 | .iommu_shutdown = iommu_shutdown_noop, | 105 | .iommu_shutdown = iommu_shutdown_noop, |
103 | .is_untracked_pat_range = is_ISA_range, | 106 | .is_untracked_pat_range = is_ISA_range, |
104 | .nmi_init = default_nmi_init, | 107 | .nmi_init = default_nmi_init, |
108 | .get_nmi_reason = default_get_nmi_reason, | ||
105 | .i8042_detect = default_i8042_detect | 109 | .i8042_detect = default_i8042_detect |
106 | }; | 110 | }; |
107 | 111 | ||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a0d6bd9ad442..579a0b51696a 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/mce.h> | 39 | #include <asm/mce.h> |
40 | #include <asm/i387.h> | 40 | #include <asm/i387.h> |
41 | #include <asm/xcr.h> | 41 | #include <asm/xcr.h> |
42 | #include <asm/perf_event.h> | ||
42 | 43 | ||
43 | #include "trace.h" | 44 | #include "trace.h" |
44 | 45 | ||
@@ -118,7 +119,7 @@ module_param(ple_gap, int, S_IRUGO); | |||
118 | static int ple_window = KVM_VMX_DEFAULT_PLE_WINDOW; | 119 | static int ple_window = KVM_VMX_DEFAULT_PLE_WINDOW; |
119 | module_param(ple_window, int, S_IRUGO); | 120 | module_param(ple_window, int, S_IRUGO); |
120 | 121 | ||
121 | #define NR_AUTOLOAD_MSRS 1 | 122 | #define NR_AUTOLOAD_MSRS 8 |
122 | #define VMCS02_POOL_SIZE 1 | 123 | #define VMCS02_POOL_SIZE 1 |
123 | 124 | ||
124 | struct vmcs { | 125 | struct vmcs { |
@@ -622,6 +623,7 @@ static unsigned long *vmx_msr_bitmap_legacy; | |||
622 | static unsigned long *vmx_msr_bitmap_longmode; | 623 | static unsigned long *vmx_msr_bitmap_longmode; |
623 | 624 | ||
624 | static bool cpu_has_load_ia32_efer; | 625 | static bool cpu_has_load_ia32_efer; |
626 | static bool cpu_has_load_perf_global_ctrl; | ||
625 | 627 | ||
626 | static DECLARE_BITMAP(vmx_vpid_bitmap, VMX_NR_VPIDS); | 628 | static DECLARE_BITMAP(vmx_vpid_bitmap, VMX_NR_VPIDS); |
627 | static DEFINE_SPINLOCK(vmx_vpid_lock); | 629 | static DEFINE_SPINLOCK(vmx_vpid_lock); |
@@ -1191,15 +1193,34 @@ static void update_exception_bitmap(struct kvm_vcpu *vcpu) | |||
1191 | vmcs_write32(EXCEPTION_BITMAP, eb); | 1193 | vmcs_write32(EXCEPTION_BITMAP, eb); |
1192 | } | 1194 | } |
1193 | 1195 | ||
1196 | static void clear_atomic_switch_msr_special(unsigned long entry, | ||
1197 | unsigned long exit) | ||
1198 | { | ||
1199 | vmcs_clear_bits(VM_ENTRY_CONTROLS, entry); | ||
1200 | vmcs_clear_bits(VM_EXIT_CONTROLS, exit); | ||
1201 | } | ||
1202 | |||
1194 | static void clear_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr) | 1203 | static void clear_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr) |
1195 | { | 1204 | { |
1196 | unsigned i; | 1205 | unsigned i; |
1197 | struct msr_autoload *m = &vmx->msr_autoload; | 1206 | struct msr_autoload *m = &vmx->msr_autoload; |
1198 | 1207 | ||
1199 | if (msr == MSR_EFER && cpu_has_load_ia32_efer) { | 1208 | switch (msr) { |
1200 | vmcs_clear_bits(VM_ENTRY_CONTROLS, VM_ENTRY_LOAD_IA32_EFER); | 1209 | case MSR_EFER: |
1201 | vmcs_clear_bits(VM_EXIT_CONTROLS, VM_EXIT_LOAD_IA32_EFER); | 1210 | if (cpu_has_load_ia32_efer) { |
1202 | return; | 1211 | clear_atomic_switch_msr_special(VM_ENTRY_LOAD_IA32_EFER, |
1212 | VM_EXIT_LOAD_IA32_EFER); | ||
1213 | return; | ||
1214 | } | ||
1215 | break; | ||
1216 | case MSR_CORE_PERF_GLOBAL_CTRL: | ||
1217 | if (cpu_has_load_perf_global_ctrl) { | ||
1218 | clear_atomic_switch_msr_special( | ||
1219 | VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL, | ||
1220 | VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL); | ||
1221 | return; | ||
1222 | } | ||
1223 | break; | ||
1203 | } | 1224 | } |
1204 | 1225 | ||
1205 | for (i = 0; i < m->nr; ++i) | 1226 | for (i = 0; i < m->nr; ++i) |
@@ -1215,25 +1236,55 @@ static void clear_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr) | |||
1215 | vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, m->nr); | 1236 | vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, m->nr); |
1216 | } | 1237 | } |
1217 | 1238 | ||
1239 | static void add_atomic_switch_msr_special(unsigned long entry, | ||
1240 | unsigned long exit, unsigned long guest_val_vmcs, | ||
1241 | unsigned long host_val_vmcs, u64 guest_val, u64 host_val) | ||
1242 | { | ||
1243 | vmcs_write64(guest_val_vmcs, guest_val); | ||
1244 | vmcs_write64(host_val_vmcs, host_val); | ||
1245 | vmcs_set_bits(VM_ENTRY_CONTROLS, entry); | ||
1246 | vmcs_set_bits(VM_EXIT_CONTROLS, exit); | ||
1247 | } | ||
1248 | |||
1218 | static void add_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr, | 1249 | static void add_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr, |
1219 | u64 guest_val, u64 host_val) | 1250 | u64 guest_val, u64 host_val) |
1220 | { | 1251 | { |
1221 | unsigned i; | 1252 | unsigned i; |
1222 | struct msr_autoload *m = &vmx->msr_autoload; | 1253 | struct msr_autoload *m = &vmx->msr_autoload; |
1223 | 1254 | ||
1224 | if (msr == MSR_EFER && cpu_has_load_ia32_efer) { | 1255 | switch (msr) { |
1225 | vmcs_write64(GUEST_IA32_EFER, guest_val); | 1256 | case MSR_EFER: |
1226 | vmcs_write64(HOST_IA32_EFER, host_val); | 1257 | if (cpu_has_load_ia32_efer) { |
1227 | vmcs_set_bits(VM_ENTRY_CONTROLS, VM_ENTRY_LOAD_IA32_EFER); | 1258 | add_atomic_switch_msr_special(VM_ENTRY_LOAD_IA32_EFER, |
1228 | vmcs_set_bits(VM_EXIT_CONTROLS, VM_EXIT_LOAD_IA32_EFER); | 1259 | VM_EXIT_LOAD_IA32_EFER, |
1229 | return; | 1260 | GUEST_IA32_EFER, |
1261 | HOST_IA32_EFER, | ||
1262 | guest_val, host_val); | ||
1263 | return; | ||
1264 | } | ||
1265 | break; | ||
1266 | case MSR_CORE_PERF_GLOBAL_CTRL: | ||
1267 | if (cpu_has_load_perf_global_ctrl) { | ||
1268 | add_atomic_switch_msr_special( | ||
1269 | VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL, | ||
1270 | VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL, | ||
1271 | GUEST_IA32_PERF_GLOBAL_CTRL, | ||
1272 | HOST_IA32_PERF_GLOBAL_CTRL, | ||
1273 | guest_val, host_val); | ||
1274 | return; | ||
1275 | } | ||
1276 | break; | ||
1230 | } | 1277 | } |
1231 | 1278 | ||
1232 | for (i = 0; i < m->nr; ++i) | 1279 | for (i = 0; i < m->nr; ++i) |
1233 | if (m->guest[i].index == msr) | 1280 | if (m->guest[i].index == msr) |
1234 | break; | 1281 | break; |
1235 | 1282 | ||
1236 | if (i == m->nr) { | 1283 | if (i == NR_AUTOLOAD_MSRS) { |
1284 | printk_once(KERN_WARNING"Not enough mst switch entries. " | ||
1285 | "Can't add msr %x\n", msr); | ||
1286 | return; | ||
1287 | } else if (i == m->nr) { | ||
1237 | ++m->nr; | 1288 | ++m->nr; |
1238 | vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, m->nr); | 1289 | vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, m->nr); |
1239 | vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, m->nr); | 1290 | vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, m->nr); |
@@ -2455,6 +2506,42 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) | |||
2455 | && allow_1_setting(MSR_IA32_VMX_EXIT_CTLS, | 2506 | && allow_1_setting(MSR_IA32_VMX_EXIT_CTLS, |
2456 | VM_EXIT_LOAD_IA32_EFER); | 2507 | VM_EXIT_LOAD_IA32_EFER); |
2457 | 2508 | ||
2509 | cpu_has_load_perf_global_ctrl = | ||
2510 | allow_1_setting(MSR_IA32_VMX_ENTRY_CTLS, | ||
2511 | VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL) | ||
2512 | && allow_1_setting(MSR_IA32_VMX_EXIT_CTLS, | ||
2513 | VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL); | ||
2514 | |||
2515 | /* | ||
2516 | * Some cpus support VM_ENTRY_(LOAD|SAVE)_IA32_PERF_GLOBAL_CTRL | ||
2517 | * but due to arrata below it can't be used. Workaround is to use | ||
2518 | * msr load mechanism to switch IA32_PERF_GLOBAL_CTRL. | ||
2519 | * | ||
2520 | * VM Exit May Incorrectly Clear IA32_PERF_GLOBAL_CTRL [34:32] | ||
2521 | * | ||
2522 | * AAK155 (model 26) | ||
2523 | * AAP115 (model 30) | ||
2524 | * AAT100 (model 37) | ||
2525 | * BC86,AAY89,BD102 (model 44) | ||
2526 | * BA97 (model 46) | ||
2527 | * | ||
2528 | */ | ||
2529 | if (cpu_has_load_perf_global_ctrl && boot_cpu_data.x86 == 0x6) { | ||
2530 | switch (boot_cpu_data.x86_model) { | ||
2531 | case 26: | ||
2532 | case 30: | ||
2533 | case 37: | ||
2534 | case 44: | ||
2535 | case 46: | ||
2536 | cpu_has_load_perf_global_ctrl = false; | ||
2537 | printk_once(KERN_WARNING"kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL " | ||
2538 | "does not work properly. Using workaround\n"); | ||
2539 | break; | ||
2540 | default: | ||
2541 | break; | ||
2542 | } | ||
2543 | } | ||
2544 | |||
2458 | return 0; | 2545 | return 0; |
2459 | } | 2546 | } |
2460 | 2547 | ||
@@ -5968,6 +6055,24 @@ static void vmx_cancel_injection(struct kvm_vcpu *vcpu) | |||
5968 | vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, 0); | 6055 | vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, 0); |
5969 | } | 6056 | } |
5970 | 6057 | ||
6058 | static void atomic_switch_perf_msrs(struct vcpu_vmx *vmx) | ||
6059 | { | ||
6060 | int i, nr_msrs; | ||
6061 | struct perf_guest_switch_msr *msrs; | ||
6062 | |||
6063 | msrs = perf_guest_get_msrs(&nr_msrs); | ||
6064 | |||
6065 | if (!msrs) | ||
6066 | return; | ||
6067 | |||
6068 | for (i = 0; i < nr_msrs; i++) | ||
6069 | if (msrs[i].host == msrs[i].guest) | ||
6070 | clear_atomic_switch_msr(vmx, msrs[i].msr); | ||
6071 | else | ||
6072 | add_atomic_switch_msr(vmx, msrs[i].msr, msrs[i].guest, | ||
6073 | msrs[i].host); | ||
6074 | } | ||
6075 | |||
5971 | #ifdef CONFIG_X86_64 | 6076 | #ifdef CONFIG_X86_64 |
5972 | #define R "r" | 6077 | #define R "r" |
5973 | #define Q "q" | 6078 | #define Q "q" |
@@ -6017,6 +6122,8 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) | |||
6017 | if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) | 6122 | if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) |
6018 | vmx_set_interrupt_shadow(vcpu, 0); | 6123 | vmx_set_interrupt_shadow(vcpu, 0); |
6019 | 6124 | ||
6125 | atomic_switch_perf_msrs(vmx); | ||
6126 | |||
6020 | vmx->__launched = vmx->loaded_vmcs->launched; | 6127 | vmx->__launched = vmx->loaded_vmcs->launched; |
6021 | asm( | 6128 | asm( |
6022 | /* Store host registers */ | 6129 | /* Store host registers */ |
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c index ea305856151c..dd74e46828c0 100644 --- a/arch/x86/mm/gup.c +++ b/arch/x86/mm/gup.c | |||
@@ -201,6 +201,8 @@ static noinline int gup_huge_pud(pud_t pud, unsigned long addr, | |||
201 | do { | 201 | do { |
202 | VM_BUG_ON(compound_head(page) != head); | 202 | VM_BUG_ON(compound_head(page) != head); |
203 | pages[*nr] = page; | 203 | pages[*nr] = page; |
204 | if (PageTail(page)) | ||
205 | get_huge_page_tail(page); | ||
204 | (*nr)++; | 206 | (*nr)++; |
205 | page++; | 207 | page++; |
206 | refs++; | 208 | refs++; |
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index b49962662101..f4f29b19fac5 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c | |||
@@ -45,6 +45,7 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot) | |||
45 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 45 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
46 | BUG_ON(!pte_none(*(kmap_pte-idx))); | 46 | BUG_ON(!pte_none(*(kmap_pte-idx))); |
47 | set_pte(kmap_pte-idx, mk_pte(page, prot)); | 47 | set_pte(kmap_pte-idx, mk_pte(page, prot)); |
48 | arch_flush_lazy_mmu_mode(); | ||
48 | 49 | ||
49 | return (void *)vaddr; | 50 | return (void *)vaddr; |
50 | } | 51 | } |
@@ -88,6 +89,7 @@ void __kunmap_atomic(void *kvaddr) | |||
88 | */ | 89 | */ |
89 | kpte_clear_flush(kmap_pte-idx, vaddr); | 90 | kpte_clear_flush(kmap_pte-idx, vaddr); |
90 | kmap_atomic_idx_pop(); | 91 | kmap_atomic_idx_pop(); |
92 | arch_flush_lazy_mmu_mode(); | ||
91 | } | 93 | } |
92 | #ifdef CONFIG_DEBUG_HIGHMEM | 94 | #ifdef CONFIG_DEBUG_HIGHMEM |
93 | else { | 95 | else { |
diff --git a/arch/x86/oprofile/init.c b/arch/x86/oprofile/init.c index cdfe4c54deca..f148cf652678 100644 --- a/arch/x86/oprofile/init.c +++ b/arch/x86/oprofile/init.c | |||
@@ -21,6 +21,7 @@ extern int op_nmi_timer_init(struct oprofile_operations *ops); | |||
21 | extern void op_nmi_exit(void); | 21 | extern void op_nmi_exit(void); |
22 | extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth); | 22 | extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth); |
23 | 23 | ||
24 | static int nmi_timer; | ||
24 | 25 | ||
25 | int __init oprofile_arch_init(struct oprofile_operations *ops) | 26 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
26 | { | 27 | { |
@@ -31,8 +32,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
31 | #ifdef CONFIG_X86_LOCAL_APIC | 32 | #ifdef CONFIG_X86_LOCAL_APIC |
32 | ret = op_nmi_init(ops); | 33 | ret = op_nmi_init(ops); |
33 | #endif | 34 | #endif |
35 | nmi_timer = (ret != 0); | ||
34 | #ifdef CONFIG_X86_IO_APIC | 36 | #ifdef CONFIG_X86_IO_APIC |
35 | if (ret < 0) | 37 | if (nmi_timer) |
36 | ret = op_nmi_timer_init(ops); | 38 | ret = op_nmi_timer_init(ops); |
37 | #endif | 39 | #endif |
38 | ops->backtrace = x86_backtrace; | 40 | ops->backtrace = x86_backtrace; |
@@ -44,6 +46,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
44 | void oprofile_arch_exit(void) | 46 | void oprofile_arch_exit(void) |
45 | { | 47 | { |
46 | #ifdef CONFIG_X86_LOCAL_APIC | 48 | #ifdef CONFIG_X86_LOCAL_APIC |
47 | op_nmi_exit(); | 49 | if (!nmi_timer) |
50 | op_nmi_exit(); | ||
48 | #endif | 51 | #endif |
49 | } | 52 | } |
diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c index e36bf714cb77..40e446941dd7 100644 --- a/arch/x86/platform/efi/efi_32.c +++ b/arch/x86/platform/efi/efi_32.c | |||
@@ -39,43 +39,14 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | static unsigned long efi_rt_eflags; | 41 | static unsigned long efi_rt_eflags; |
42 | static pgd_t efi_bak_pg_dir_pointer[2]; | ||
43 | 42 | ||
44 | void efi_call_phys_prelog(void) | 43 | void efi_call_phys_prelog(void) |
45 | { | 44 | { |
46 | unsigned long cr4; | ||
47 | unsigned long temp; | ||
48 | struct desc_ptr gdt_descr; | 45 | struct desc_ptr gdt_descr; |
49 | 46 | ||
50 | local_irq_save(efi_rt_eflags); | 47 | local_irq_save(efi_rt_eflags); |
51 | 48 | ||
52 | /* | 49 | load_cr3(initial_page_table); |
53 | * If I don't have PAE, I should just duplicate two entries in page | ||
54 | * directory. If I have PAE, I just need to duplicate one entry in | ||
55 | * page directory. | ||
56 | */ | ||
57 | cr4 = read_cr4_safe(); | ||
58 | |||
59 | if (cr4 & X86_CR4_PAE) { | ||
60 | efi_bak_pg_dir_pointer[0].pgd = | ||
61 | swapper_pg_dir[pgd_index(0)].pgd; | ||
62 | swapper_pg_dir[0].pgd = | ||
63 | swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd; | ||
64 | } else { | ||
65 | efi_bak_pg_dir_pointer[0].pgd = | ||
66 | swapper_pg_dir[pgd_index(0)].pgd; | ||
67 | efi_bak_pg_dir_pointer[1].pgd = | ||
68 | swapper_pg_dir[pgd_index(0x400000)].pgd; | ||
69 | swapper_pg_dir[pgd_index(0)].pgd = | ||
70 | swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd; | ||
71 | temp = PAGE_OFFSET + 0x400000; | ||
72 | swapper_pg_dir[pgd_index(0x400000)].pgd = | ||
73 | swapper_pg_dir[pgd_index(temp)].pgd; | ||
74 | } | ||
75 | |||
76 | /* | ||
77 | * After the lock is released, the original page table is restored. | ||
78 | */ | ||
79 | __flush_tlb_all(); | 50 | __flush_tlb_all(); |
80 | 51 | ||
81 | gdt_descr.address = __pa(get_cpu_gdt_table(0)); | 52 | gdt_descr.address = __pa(get_cpu_gdt_table(0)); |
@@ -85,28 +56,13 @@ void efi_call_phys_prelog(void) | |||
85 | 56 | ||
86 | void efi_call_phys_epilog(void) | 57 | void efi_call_phys_epilog(void) |
87 | { | 58 | { |
88 | unsigned long cr4; | ||
89 | struct desc_ptr gdt_descr; | 59 | struct desc_ptr gdt_descr; |
90 | 60 | ||
91 | gdt_descr.address = (unsigned long)get_cpu_gdt_table(0); | 61 | gdt_descr.address = (unsigned long)get_cpu_gdt_table(0); |
92 | gdt_descr.size = GDT_SIZE - 1; | 62 | gdt_descr.size = GDT_SIZE - 1; |
93 | load_gdt(&gdt_descr); | 63 | load_gdt(&gdt_descr); |
94 | 64 | ||
95 | cr4 = read_cr4_safe(); | 65 | load_cr3(swapper_pg_dir); |
96 | |||
97 | if (cr4 & X86_CR4_PAE) { | ||
98 | swapper_pg_dir[pgd_index(0)].pgd = | ||
99 | efi_bak_pg_dir_pointer[0].pgd; | ||
100 | } else { | ||
101 | swapper_pg_dir[pgd_index(0)].pgd = | ||
102 | efi_bak_pg_dir_pointer[0].pgd; | ||
103 | swapper_pg_dir[pgd_index(0x400000)].pgd = | ||
104 | efi_bak_pg_dir_pointer[1].pgd; | ||
105 | } | ||
106 | |||
107 | /* | ||
108 | * After the lock is released, the original page table is restored. | ||
109 | */ | ||
110 | __flush_tlb_all(); | 66 | __flush_tlb_all(); |
111 | 67 | ||
112 | local_irq_restore(efi_rt_eflags); | 68 | local_irq_restore(efi_rt_eflags); |
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 541020df0da6..ad4ec1cb097e 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
@@ -76,6 +76,20 @@ struct sfi_rtc_table_entry sfi_mrtc_array[SFI_MRTC_MAX]; | |||
76 | EXPORT_SYMBOL_GPL(sfi_mrtc_array); | 76 | EXPORT_SYMBOL_GPL(sfi_mrtc_array); |
77 | int sfi_mrtc_num; | 77 | int sfi_mrtc_num; |
78 | 78 | ||
79 | static void mrst_power_off(void) | ||
80 | { | ||
81 | if (__mrst_cpu_chip == MRST_CPU_CHIP_LINCROFT) | ||
82 | intel_scu_ipc_simple_command(IPCMSG_COLD_RESET, 1); | ||
83 | } | ||
84 | |||
85 | static void mrst_reboot(void) | ||
86 | { | ||
87 | if (__mrst_cpu_chip == MRST_CPU_CHIP_LINCROFT) | ||
88 | intel_scu_ipc_simple_command(IPCMSG_COLD_RESET, 0); | ||
89 | else | ||
90 | intel_scu_ipc_simple_command(IPCMSG_COLD_BOOT, 0); | ||
91 | } | ||
92 | |||
79 | /* parse all the mtimer info to a static mtimer array */ | 93 | /* parse all the mtimer info to a static mtimer array */ |
80 | static int __init sfi_parse_mtmr(struct sfi_table_header *table) | 94 | static int __init sfi_parse_mtmr(struct sfi_table_header *table) |
81 | { | 95 | { |
@@ -187,11 +201,34 @@ int __init sfi_parse_mrtc(struct sfi_table_header *table) | |||
187 | static unsigned long __init mrst_calibrate_tsc(void) | 201 | static unsigned long __init mrst_calibrate_tsc(void) |
188 | { | 202 | { |
189 | unsigned long flags, fast_calibrate; | 203 | unsigned long flags, fast_calibrate; |
190 | 204 | if (__mrst_cpu_chip == MRST_CPU_CHIP_PENWELL) { | |
191 | local_irq_save(flags); | 205 | u32 lo, hi, ratio, fsb; |
192 | fast_calibrate = apbt_quick_calibrate(); | 206 | |
193 | local_irq_restore(flags); | 207 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); |
194 | 208 | pr_debug("IA32 perf status is 0x%x, 0x%0x\n", lo, hi); | |
209 | ratio = (hi >> 8) & 0x1f; | ||
210 | pr_debug("ratio is %d\n", ratio); | ||
211 | if (!ratio) { | ||
212 | pr_err("read a zero ratio, should be incorrect!\n"); | ||
213 | pr_err("force tsc ratio to 16 ...\n"); | ||
214 | ratio = 16; | ||
215 | } | ||
216 | rdmsr(MSR_FSB_FREQ, lo, hi); | ||
217 | if ((lo & 0x7) == 0x7) | ||
218 | fsb = PENWELL_FSB_FREQ_83SKU; | ||
219 | else | ||
220 | fsb = PENWELL_FSB_FREQ_100SKU; | ||
221 | fast_calibrate = ratio * fsb; | ||
222 | pr_debug("read penwell tsc %lu khz\n", fast_calibrate); | ||
223 | lapic_timer_frequency = fsb * 1000 / HZ; | ||
224 | /* mark tsc clocksource as reliable */ | ||
225 | set_cpu_cap(&boot_cpu_data, X86_FEATURE_TSC_RELIABLE); | ||
226 | } else { | ||
227 | local_irq_save(flags); | ||
228 | fast_calibrate = apbt_quick_calibrate(); | ||
229 | local_irq_restore(flags); | ||
230 | } | ||
231 | |||
195 | if (fast_calibrate) | 232 | if (fast_calibrate) |
196 | return fast_calibrate; | 233 | return fast_calibrate; |
197 | 234 | ||
@@ -242,15 +279,15 @@ static int mrst_i8042_detect(void) | |||
242 | return 0; | 279 | return 0; |
243 | } | 280 | } |
244 | 281 | ||
245 | /* Reboot and power off are handled by the SCU on a MID device */ | 282 | /* |
246 | static void mrst_power_off(void) | 283 | * Moorestown does not have external NMI source nor port 0x61 to report |
247 | { | 284 | * NMI status. The possible NMI sources are from pmu as a result of NMI |
248 | intel_scu_ipc_simple_command(0xf1, 1); | 285 | * watchdog or lock debug. Reading io port 0x61 results in 0xff which |
249 | } | 286 | * misled NMI handler. |
250 | 287 | */ | |
251 | static void mrst_reboot(void) | 288 | static unsigned char mrst_get_nmi_reason(void) |
252 | { | 289 | { |
253 | intel_scu_ipc_simple_command(0xf1, 0); | 290 | return 0; |
254 | } | 291 | } |
255 | 292 | ||
256 | /* | 293 | /* |
@@ -274,6 +311,8 @@ void __init x86_mrst_early_setup(void) | |||
274 | x86_platform.calibrate_tsc = mrst_calibrate_tsc; | 311 | x86_platform.calibrate_tsc = mrst_calibrate_tsc; |
275 | x86_platform.i8042_detect = mrst_i8042_detect; | 312 | x86_platform.i8042_detect = mrst_i8042_detect; |
276 | x86_init.timers.wallclock_init = mrst_rtc_init; | 313 | x86_init.timers.wallclock_init = mrst_rtc_init; |
314 | x86_platform.get_nmi_reason = mrst_get_nmi_reason; | ||
315 | |||
277 | x86_init.pci.init = pci_mrst_init; | 316 | x86_init.pci.init = pci_mrst_init; |
278 | x86_init.pci.fixup_irqs = x86_init_noop; | 317 | x86_init.pci.fixup_irqs = x86_init_noop; |
279 | 318 | ||
@@ -448,6 +487,46 @@ static void __init *max7315_platform_data(void *info) | |||
448 | return max7315; | 487 | return max7315; |
449 | } | 488 | } |
450 | 489 | ||
490 | static void *tca6416_platform_data(void *info) | ||
491 | { | ||
492 | static struct pca953x_platform_data tca6416; | ||
493 | struct i2c_board_info *i2c_info = info; | ||
494 | int gpio_base, intr; | ||
495 | char base_pin_name[SFI_NAME_LEN + 1]; | ||
496 | char intr_pin_name[SFI_NAME_LEN + 1]; | ||
497 | |||
498 | strcpy(i2c_info->type, "tca6416"); | ||
499 | strcpy(base_pin_name, "tca6416_base"); | ||
500 | strcpy(intr_pin_name, "tca6416_int"); | ||
501 | |||
502 | gpio_base = get_gpio_by_name(base_pin_name); | ||
503 | intr = get_gpio_by_name(intr_pin_name); | ||
504 | |||
505 | if (gpio_base == -1) | ||
506 | return NULL; | ||
507 | tca6416.gpio_base = gpio_base; | ||
508 | if (intr != -1) { | ||
509 | i2c_info->irq = intr + MRST_IRQ_OFFSET; | ||
510 | tca6416.irq_base = gpio_base + MRST_IRQ_OFFSET; | ||
511 | } else { | ||
512 | i2c_info->irq = -1; | ||
513 | tca6416.irq_base = -1; | ||
514 | } | ||
515 | return &tca6416; | ||
516 | } | ||
517 | |||
518 | static void *mpu3050_platform_data(void *info) | ||
519 | { | ||
520 | struct i2c_board_info *i2c_info = info; | ||
521 | int intr = get_gpio_by_name("mpu3050_int"); | ||
522 | |||
523 | if (intr == -1) | ||
524 | return NULL; | ||
525 | |||
526 | i2c_info->irq = intr + MRST_IRQ_OFFSET; | ||
527 | return NULL; | ||
528 | } | ||
529 | |||
451 | static void __init *emc1403_platform_data(void *info) | 530 | static void __init *emc1403_platform_data(void *info) |
452 | { | 531 | { |
453 | static short intr2nd_pdata; | 532 | static short intr2nd_pdata; |
@@ -610,12 +689,15 @@ static void *msic_ocd_platform_data(void *info) | |||
610 | static const struct devs_id __initconst device_ids[] = { | 689 | static const struct devs_id __initconst device_ids[] = { |
611 | {"bma023", SFI_DEV_TYPE_I2C, 1, &no_platform_data}, | 690 | {"bma023", SFI_DEV_TYPE_I2C, 1, &no_platform_data}, |
612 | {"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data}, | 691 | {"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data}, |
692 | {"pmic_gpio", SFI_DEV_TYPE_IPC, 1, &pmic_gpio_platform_data}, | ||
613 | {"spi_max3111", SFI_DEV_TYPE_SPI, 0, &max3111_platform_data}, | 693 | {"spi_max3111", SFI_DEV_TYPE_SPI, 0, &max3111_platform_data}, |
614 | {"i2c_max7315", SFI_DEV_TYPE_I2C, 1, &max7315_platform_data}, | 694 | {"i2c_max7315", SFI_DEV_TYPE_I2C, 1, &max7315_platform_data}, |
615 | {"i2c_max7315_2", SFI_DEV_TYPE_I2C, 1, &max7315_platform_data}, | 695 | {"i2c_max7315_2", SFI_DEV_TYPE_I2C, 1, &max7315_platform_data}, |
696 | {"tca6416", SFI_DEV_TYPE_I2C, 1, &tca6416_platform_data}, | ||
616 | {"emc1403", SFI_DEV_TYPE_I2C, 1, &emc1403_platform_data}, | 697 | {"emc1403", SFI_DEV_TYPE_I2C, 1, &emc1403_platform_data}, |
617 | {"i2c_accel", SFI_DEV_TYPE_I2C, 0, &lis331dl_platform_data}, | 698 | {"i2c_accel", SFI_DEV_TYPE_I2C, 0, &lis331dl_platform_data}, |
618 | {"pmic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data}, | 699 | {"pmic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data}, |
700 | {"mpu3050", SFI_DEV_TYPE_I2C, 1, &mpu3050_platform_data}, | ||
619 | 701 | ||
620 | /* MSIC subdevices */ | 702 | /* MSIC subdevices */ |
621 | {"msic_battery", SFI_DEV_TYPE_IPC, 1, &msic_battery_platform_data}, | 703 | {"msic_battery", SFI_DEV_TYPE_IPC, 1, &msic_battery_platform_data}, |
diff --git a/arch/x86/um/asm/processor.h b/arch/x86/um/asm/processor.h index 118c143a9cb4..2c32df6fe231 100644 --- a/arch/x86/um/asm/processor.h +++ b/arch/x86/um/asm/processor.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP) | 13 | #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP) |
14 | #define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_IP) | 14 | #define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_SP) |
15 | #define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP) | 15 | #define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP) |
16 | 16 | ||
17 | #define ARCH_IS_STACKGROW(address) \ | 17 | #define ARCH_IS_STACKGROW(address) \ |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index da8afd576a6b..1f928659c338 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1356,7 +1356,7 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self, | |||
1356 | int cpu = (long)hcpu; | 1356 | int cpu = (long)hcpu; |
1357 | switch (action) { | 1357 | switch (action) { |
1358 | case CPU_UP_PREPARE: | 1358 | case CPU_UP_PREPARE: |
1359 | per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu]; | 1359 | xen_vcpu_setup(cpu); |
1360 | if (xen_have_vector_callback) | 1360 | if (xen_have_vector_callback) |
1361 | xen_init_lock_cpu(cpu); | 1361 | xen_init_lock_cpu(cpu); |
1362 | break; | 1362 | break; |
@@ -1386,7 +1386,6 @@ static void __init xen_hvm_guest_init(void) | |||
1386 | xen_hvm_smp_init(); | 1386 | xen_hvm_smp_init(); |
1387 | register_cpu_notifier(&xen_hvm_cpu_notifier); | 1387 | register_cpu_notifier(&xen_hvm_cpu_notifier); |
1388 | xen_unplug_emulated_devices(); | 1388 | xen_unplug_emulated_devices(); |
1389 | have_vcpu_info_placement = 0; | ||
1390 | x86_init.irqs.intr_init = xen_init_IRQ; | 1389 | x86_init.irqs.intr_init = xen_init_IRQ; |
1391 | xen_hvm_init_time_ops(); | 1390 | xen_hvm_init_time_ops(); |
1392 | xen_hvm_init_mmu_ops(); | 1391 | xen_hvm_init_mmu_ops(); |
diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c index 6bbfd7ac5e81..5a40d24ba331 100644 --- a/arch/x86/xen/grant-table.c +++ b/arch/x86/xen/grant-table.c | |||
@@ -71,7 +71,7 @@ int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | |||
71 | 71 | ||
72 | if (shared == NULL) { | 72 | if (shared == NULL) { |
73 | struct vm_struct *area = | 73 | struct vm_struct *area = |
74 | alloc_vm_area(PAGE_SIZE * max_nr_gframes); | 74 | alloc_vm_area(PAGE_SIZE * max_nr_gframes, NULL); |
75 | BUG_ON(area == NULL); | 75 | BUG_ON(area == NULL); |
76 | shared = area->addr; | 76 | shared = area->addr; |
77 | *__shared = shared; | 77 | *__shared = shared; |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 38d0af4fefec..b2c7179fa263 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -173,9 +173,21 @@ static unsigned long __init xen_get_max_pages(void) | |||
173 | domid_t domid = DOMID_SELF; | 173 | domid_t domid = DOMID_SELF; |
174 | int ret; | 174 | int ret; |
175 | 175 | ||
176 | ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid); | 176 | /* |
177 | if (ret > 0) | 177 | * For the initial domain we use the maximum reservation as |
178 | max_pages = ret; | 178 | * the maximum page. |
179 | * | ||
180 | * For guest domains the current maximum reservation reflects | ||
181 | * the current maximum rather than the static maximum. In this | ||
182 | * case the e820 map provided to us will cover the static | ||
183 | * maximum region. | ||
184 | */ | ||
185 | if (xen_initial_domain()) { | ||
186 | ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid); | ||
187 | if (ret > 0) | ||
188 | max_pages = ret; | ||
189 | } | ||
190 | |||
179 | return min(max_pages, MAX_DOMAIN_PAGES); | 191 | return min(max_pages, MAX_DOMAIN_PAGES); |
180 | } | 192 | } |
181 | 193 | ||
@@ -410,6 +422,6 @@ void __init xen_arch_setup(void) | |||
410 | #endif | 422 | #endif |
411 | disable_cpuidle(); | 423 | disable_cpuidle(); |
412 | boot_option_idle_override = IDLE_HALT; | 424 | boot_option_idle_override = IDLE_HALT; |
413 | 425 | WARN_ON(set_pm_idle_to_default()); | |
414 | fiddle_vdso(); | 426 | fiddle_vdso(); |
415 | } | 427 | } |