diff options
Diffstat (limited to 'arch')
285 files changed, 14310 insertions, 6094 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 694c9af520bb..3ea332b009e5 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -36,3 +36,6 @@ config HAVE_KPROBES | |||
36 | 36 | ||
37 | config HAVE_KRETPROBES | 37 | config HAVE_KRETPROBES |
38 | def_bool n | 38 | def_bool n |
39 | |||
40 | config HAVE_DMA_ATTRS | ||
41 | def_bool n | ||
diff --git a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offsets.c index 6c56c754a0b5..4b18cd94d59d 100644 --- a/arch/alpha/kernel/asm-offsets.c +++ b/arch/alpha/kernel/asm-offsets.c | |||
@@ -8,13 +8,9 @@ | |||
8 | #include <linux/stddef.h> | 8 | #include <linux/stddef.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/ptrace.h> | 10 | #include <linux/ptrace.h> |
11 | #include <linux/kbuild.h> | ||
11 | #include <asm/io.h> | 12 | #include <asm/io.h> |
12 | 13 | ||
13 | #define DEFINE(sym, val) \ | ||
14 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
15 | |||
16 | #define BLANK() asm volatile("\n->" : : ) | ||
17 | |||
18 | void foo(void) | 14 | void foo(void) |
19 | { | 15 | { |
20 | DEFINE(TI_TASK, offsetof(struct thread_info, task)); | 16 | DEFINE(TI_TASK, offsetof(struct thread_info, task)); |
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index baf57563b14c..36ab22a7ea12 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
@@ -514,8 +514,8 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn) | |||
514 | 514 | ||
515 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 515 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
516 | { | 516 | { |
517 | unsigned long start = pci_resource_start(dev, bar); | 517 | resource_size_t start = pci_resource_start(dev, bar); |
518 | unsigned long len = pci_resource_len(dev, bar); | 518 | resource_size_t len = pci_resource_len(dev, bar); |
519 | unsigned long flags = pci_resource_flags(dev, bar); | 519 | unsigned long flags = pci_resource_flags(dev, bar); |
520 | 520 | ||
521 | if (!len || !start) | 521 | if (!len || !start) |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d8d253285a94..b786e68914d4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -8,6 +8,7 @@ mainmenu "Linux Kernel Configuration" | |||
8 | config ARM | 8 | config ARM |
9 | bool | 9 | bool |
10 | default y | 10 | default y |
11 | select HAVE_IDE | ||
11 | select RTC_LIB | 12 | select RTC_LIB |
12 | select SYS_SUPPORTS_APM_EMULATION | 13 | select SYS_SUPPORTS_APM_EMULATION |
13 | select HAVE_OPROFILE | 14 | select HAVE_OPROFILE |
@@ -223,7 +224,6 @@ config ARCH_CLPS7500 | |||
223 | select TIMER_ACORN | 224 | select TIMER_ACORN |
224 | select ISA | 225 | select ISA |
225 | select NO_IOPORT | 226 | select NO_IOPORT |
226 | select HAVE_IDE | ||
227 | help | 227 | help |
228 | Support for the Cirrus Logic PS7500FE system-on-a-chip. | 228 | Support for the Cirrus Logic PS7500FE system-on-a-chip. |
229 | 229 | ||
@@ -236,7 +236,6 @@ config ARCH_CO285 | |||
236 | bool "Co-EBSA285" | 236 | bool "Co-EBSA285" |
237 | select FOOTBRIDGE | 237 | select FOOTBRIDGE |
238 | select FOOTBRIDGE_ADDIN | 238 | select FOOTBRIDGE_ADDIN |
239 | select HAVE_IDE | ||
240 | help | 239 | help |
241 | Support for Intel's EBSA285 companion chip. | 240 | Support for Intel's EBSA285 companion chip. |
242 | 241 | ||
@@ -262,7 +261,6 @@ config ARCH_EP93XX | |||
262 | config ARCH_FOOTBRIDGE | 261 | config ARCH_FOOTBRIDGE |
263 | bool "FootBridge" | 262 | bool "FootBridge" |
264 | select FOOTBRIDGE | 263 | select FOOTBRIDGE |
265 | select HAVE_IDE | ||
266 | help | 264 | help |
267 | Support for systems based on the DC21285 companion chip | 265 | Support for systems based on the DC21285 companion chip |
268 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | 266 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. |
@@ -301,7 +299,6 @@ config ARCH_IOP32X | |||
301 | depends on MMU | 299 | depends on MMU |
302 | select PLAT_IOP | 300 | select PLAT_IOP |
303 | select PCI | 301 | select PCI |
304 | select HAVE_IDE | ||
305 | help | 302 | help |
306 | Support for Intel's 80219 and IOP32X (XScale) family of | 303 | Support for Intel's 80219 and IOP32X (XScale) family of |
307 | processors. | 304 | processors. |
@@ -311,14 +308,12 @@ config ARCH_IOP33X | |||
311 | depends on MMU | 308 | depends on MMU |
312 | select PLAT_IOP | 309 | select PLAT_IOP |
313 | select PCI | 310 | select PCI |
314 | select HAVE_IDE | ||
315 | help | 311 | help |
316 | Support for Intel's IOP33X (XScale) family of processors. | 312 | Support for Intel's IOP33X (XScale) family of processors. |
317 | 313 | ||
318 | config ARCH_IXP23XX | 314 | config ARCH_IXP23XX |
319 | bool "IXP23XX-based" | 315 | bool "IXP23XX-based" |
320 | depends on MMU | 316 | depends on MMU |
321 | select HAVE_IDE | ||
322 | select PCI | 317 | select PCI |
323 | help | 318 | help |
324 | Support for Intel's IXP23xx (XScale) family of processors. | 319 | Support for Intel's IXP23xx (XScale) family of processors. |
@@ -336,14 +331,12 @@ config ARCH_IXP4XX | |||
336 | select GENERIC_GPIO | 331 | select GENERIC_GPIO |
337 | select GENERIC_TIME | 332 | select GENERIC_TIME |
338 | select GENERIC_CLOCKEVENTS | 333 | select GENERIC_CLOCKEVENTS |
339 | select HAVE_IDE | ||
340 | help | 334 | help |
341 | Support for Intel's IXP4XX (XScale) family of processors. | 335 | Support for Intel's IXP4XX (XScale) family of processors. |
342 | 336 | ||
343 | config ARCH_L7200 | 337 | config ARCH_L7200 |
344 | bool "LinkUp-L7200" | 338 | bool "LinkUp-L7200" |
345 | select FIQ | 339 | select FIQ |
346 | select HAVE_IDE | ||
347 | help | 340 | help |
348 | Say Y here if you intend to run this kernel on a LinkUp Systems | 341 | Say Y here if you intend to run this kernel on a LinkUp Systems |
349 | L7200 Software Development Board which uses an ARM720T processor. | 342 | L7200 Software Development Board which uses an ARM720T processor. |
@@ -400,7 +393,6 @@ config ARCH_PXA | |||
400 | depends on MMU | 393 | depends on MMU |
401 | select ARCH_MTD_XIP | 394 | select ARCH_MTD_XIP |
402 | select GENERIC_GPIO | 395 | select GENERIC_GPIO |
403 | select HAVE_IDE | ||
404 | select HAVE_GPIO_LIB | 396 | select HAVE_GPIO_LIB |
405 | select GENERIC_TIME | 397 | select GENERIC_TIME |
406 | select GENERIC_CLOCKEVENTS | 398 | select GENERIC_CLOCKEVENTS |
@@ -416,7 +408,6 @@ config ARCH_RPC | |||
416 | select ARCH_MAY_HAVE_PC_FDC | 408 | select ARCH_MAY_HAVE_PC_FDC |
417 | select ISA_DMA_API | 409 | select ISA_DMA_API |
418 | select NO_IOPORT | 410 | select NO_IOPORT |
419 | select HAVE_IDE | ||
420 | help | 411 | help |
421 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 412 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
422 | CD-ROM interface, serial and parallel port, and the floppy drive. | 413 | CD-ROM interface, serial and parallel port, and the floppy drive. |
@@ -432,7 +423,6 @@ config ARCH_SA1100 | |||
432 | select GENERIC_TIME | 423 | select GENERIC_TIME |
433 | select GENERIC_CLOCKEVENTS | 424 | select GENERIC_CLOCKEVENTS |
434 | select TICK_ONESHOT | 425 | select TICK_ONESHOT |
435 | select HAVE_IDE | ||
436 | select HAVE_GPIO_LIB | 426 | select HAVE_GPIO_LIB |
437 | help | 427 | help |
438 | Support for StrongARM 11x0 based boards. | 428 | Support for StrongARM 11x0 based boards. |
@@ -440,7 +430,6 @@ config ARCH_SA1100 | |||
440 | config ARCH_S3C2410 | 430 | config ARCH_S3C2410 |
441 | bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" | 431 | bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" |
442 | select GENERIC_GPIO | 432 | select GENERIC_GPIO |
443 | select HAVE_IDE | ||
444 | help | 433 | help |
445 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics | 434 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics |
446 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or | 435 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or |
@@ -448,7 +437,6 @@ config ARCH_S3C2410 | |||
448 | 437 | ||
449 | config ARCH_SHARK | 438 | config ARCH_SHARK |
450 | bool "Shark" | 439 | bool "Shark" |
451 | select HAVE_IDE | ||
452 | select ISA | 440 | select ISA |
453 | select ISA_DMA | 441 | select ISA_DMA |
454 | select PCI | 442 | select PCI |
@@ -458,7 +446,6 @@ config ARCH_SHARK | |||
458 | 446 | ||
459 | config ARCH_LH7A40X | 447 | config ARCH_LH7A40X |
460 | bool "Sharp LH7A40X" | 448 | bool "Sharp LH7A40X" |
461 | select HAVE_IDE | ||
462 | help | 449 | help |
463 | Say Y here for systems based on one of the Sharp LH7A40X | 450 | Say Y here for systems based on one of the Sharp LH7A40X |
464 | System on a Chip processors. These CPUs include an ARM922T | 451 | System on a Chip processors. These CPUs include an ARM922T |
diff --git a/arch/arm/configs/am200epdkit_defconfig b/arch/arm/configs/am200epdkit_defconfig index dc030cfe5009..5e68420f4680 100644 --- a/arch/arm/configs/am200epdkit_defconfig +++ b/arch/arm/configs/am200epdkit_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc3 | 3 | # Linux kernel version: 2.6.25 |
4 | # Sun Mar 9 06:33:33 2008 | 4 | # Sun Apr 20 00:29:49 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
@@ -51,7 +51,8 @@ CONFIG_FAIR_GROUP_SCHED=y | |||
51 | # CONFIG_RT_GROUP_SCHED is not set | 51 | # CONFIG_RT_GROUP_SCHED is not set |
52 | CONFIG_USER_SCHED=y | 52 | CONFIG_USER_SCHED=y |
53 | # CONFIG_CGROUP_SCHED is not set | 53 | # CONFIG_CGROUP_SCHED is not set |
54 | # CONFIG_SYSFS_DEPRECATED is not set | 54 | CONFIG_SYSFS_DEPRECATED=y |
55 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
55 | # CONFIG_RELAY is not set | 56 | # CONFIG_RELAY is not set |
56 | # CONFIG_NAMESPACES is not set | 57 | # CONFIG_NAMESPACES is not set |
57 | # CONFIG_BLK_DEV_INITRD is not set | 58 | # CONFIG_BLK_DEV_INITRD is not set |
@@ -85,6 +86,7 @@ CONFIG_SLAB=y | |||
85 | CONFIG_HAVE_OPROFILE=y | 86 | CONFIG_HAVE_OPROFILE=y |
86 | # CONFIG_KPROBES is not set | 87 | # CONFIG_KPROBES is not set |
87 | CONFIG_HAVE_KPROBES=y | 88 | CONFIG_HAVE_KPROBES=y |
89 | CONFIG_HAVE_KRETPROBES=y | ||
88 | CONFIG_PROC_PAGE_MONITOR=y | 90 | CONFIG_PROC_PAGE_MONITOR=y |
89 | CONFIG_SLABINFO=y | 91 | CONFIG_SLABINFO=y |
90 | CONFIG_RT_MUTEXES=y | 92 | CONFIG_RT_MUTEXES=y |
@@ -115,7 +117,6 @@ CONFIG_IOSCHED_NOOP=y | |||
115 | CONFIG_DEFAULT_NOOP=y | 117 | CONFIG_DEFAULT_NOOP=y |
116 | CONFIG_DEFAULT_IOSCHED="noop" | 118 | CONFIG_DEFAULT_IOSCHED="noop" |
117 | CONFIG_CLASSIC_RCU=y | 119 | CONFIG_CLASSIC_RCU=y |
118 | # CONFIG_PREEMPT_RCU is not set | ||
119 | 120 | ||
120 | # | 121 | # |
121 | # System Type | 122 | # System Type |
@@ -320,8 +321,6 @@ CONFIG_TCP_CONG_CUBIC=y | |||
320 | CONFIG_DEFAULT_TCP_CONG="cubic" | 321 | CONFIG_DEFAULT_TCP_CONG="cubic" |
321 | # CONFIG_TCP_MD5SIG is not set | 322 | # CONFIG_TCP_MD5SIG is not set |
322 | # CONFIG_IPV6 is not set | 323 | # CONFIG_IPV6 is not set |
323 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
324 | # CONFIG_INET6_TUNNEL is not set | ||
325 | # CONFIG_NETWORK_SECMARK is not set | 324 | # CONFIG_NETWORK_SECMARK is not set |
326 | # CONFIG_NETFILTER is not set | 325 | # CONFIG_NETFILTER is not set |
327 | # CONFIG_IP_DCCP is not set | 326 | # CONFIG_IP_DCCP is not set |
@@ -383,7 +382,6 @@ CONFIG_IEEE80211=m | |||
383 | CONFIG_IEEE80211_CRYPT_WEP=m | 382 | CONFIG_IEEE80211_CRYPT_WEP=m |
384 | # CONFIG_IEEE80211_CRYPT_CCMP is not set | 383 | # CONFIG_IEEE80211_CRYPT_CCMP is not set |
385 | # CONFIG_IEEE80211_CRYPT_TKIP is not set | 384 | # CONFIG_IEEE80211_CRYPT_TKIP is not set |
386 | # CONFIG_IEEE80211_SOFTMAC is not set | ||
387 | # CONFIG_RFKILL is not set | 385 | # CONFIG_RFKILL is not set |
388 | # CONFIG_NET_9P is not set | 386 | # CONFIG_NET_9P is not set |
389 | 387 | ||
@@ -503,7 +501,7 @@ CONFIG_IDE_MAX_HWIFS=2 | |||
503 | CONFIG_BLK_DEV_IDE=m | 501 | CONFIG_BLK_DEV_IDE=m |
504 | 502 | ||
505 | # | 503 | # |
506 | # Please see Documentation/ide.txt for help/info on IDE drives | 504 | # Please see Documentation/ide/ide.txt for help/info on IDE drives |
507 | # | 505 | # |
508 | # CONFIG_BLK_DEV_IDE_SATA is not set | 506 | # CONFIG_BLK_DEV_IDE_SATA is not set |
509 | CONFIG_BLK_DEV_IDEDISK=m | 507 | CONFIG_BLK_DEV_IDEDISK=m |
@@ -518,10 +516,9 @@ CONFIG_IDE_PROC_FS=y | |||
518 | # | 516 | # |
519 | # IDE chipset support/bugfixes | 517 | # IDE chipset support/bugfixes |
520 | # | 518 | # |
521 | CONFIG_IDE_GENERIC=m | ||
522 | # CONFIG_BLK_DEV_PLATFORM is not set | 519 | # CONFIG_BLK_DEV_PLATFORM is not set |
523 | # CONFIG_BLK_DEV_IDEDMA is not set | 520 | # CONFIG_BLK_DEV_IDEDMA is not set |
524 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 521 | # CONFIG_BLK_DEV_HD_ONLY is not set |
525 | # CONFIG_BLK_DEV_HD is not set | 522 | # CONFIG_BLK_DEV_HD is not set |
526 | 523 | ||
527 | # | 524 | # |
@@ -562,6 +559,7 @@ CONFIG_NETDEV_10000=y | |||
562 | # | 559 | # |
563 | # CONFIG_WLAN_PRE80211 is not set | 560 | # CONFIG_WLAN_PRE80211 is not set |
564 | # CONFIG_WLAN_80211 is not set | 561 | # CONFIG_WLAN_80211 is not set |
562 | # CONFIG_IWLWIFI_LEDS is not set | ||
565 | # CONFIG_NET_PCMCIA is not set | 563 | # CONFIG_NET_PCMCIA is not set |
566 | # CONFIG_WAN is not set | 564 | # CONFIG_WAN is not set |
567 | # CONFIG_PPP is not set | 565 | # CONFIG_PPP is not set |
@@ -707,6 +705,8 @@ CONFIG_SSB_POSSIBLE=y | |||
707 | # | 705 | # |
708 | # CONFIG_MFD_SM501 is not set | 706 | # CONFIG_MFD_SM501 is not set |
709 | # CONFIG_MFD_ASIC3 is not set | 707 | # CONFIG_MFD_ASIC3 is not set |
708 | # CONFIG_HTC_EGPIO is not set | ||
709 | # CONFIG_HTC_PASIC3 is not set | ||
710 | 710 | ||
711 | # | 711 | # |
712 | # Multimedia devices | 712 | # Multimedia devices |
@@ -745,6 +745,7 @@ CONFIG_FB_TILEBLITTING=y | |||
745 | CONFIG_FB_PXA=y | 745 | CONFIG_FB_PXA=y |
746 | CONFIG_FB_PXA_PARAMETERS=y | 746 | CONFIG_FB_PXA_PARAMETERS=y |
747 | CONFIG_FB_MBX=m | 747 | CONFIG_FB_MBX=m |
748 | # CONFIG_FB_METRONOME is not set | ||
748 | CONFIG_FB_VIRTUAL=m | 749 | CONFIG_FB_VIRTUAL=m |
749 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 750 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
750 | 751 | ||
@@ -891,7 +892,6 @@ CONFIG_RTC_LIB=y | |||
891 | # CONFIG_JFS_FS is not set | 892 | # CONFIG_JFS_FS is not set |
892 | # CONFIG_FS_POSIX_ACL is not set | 893 | # CONFIG_FS_POSIX_ACL is not set |
893 | # CONFIG_XFS_FS is not set | 894 | # CONFIG_XFS_FS is not set |
894 | # CONFIG_GFS2_FS is not set | ||
895 | # CONFIG_OCFS2_FS is not set | 895 | # CONFIG_OCFS2_FS is not set |
896 | # CONFIG_DNOTIFY is not set | 896 | # CONFIG_DNOTIFY is not set |
897 | CONFIG_INOTIFY=y | 897 | CONFIG_INOTIFY=y |
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 0a0d2479274b..4a881258bb17 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/thread_info.h> | 16 | #include <asm/thread_info.h> |
17 | #include <asm/memory.h> | 17 | #include <asm/memory.h> |
18 | #include <asm/procinfo.h> | 18 | #include <asm/procinfo.h> |
19 | #include <linux/kbuild.h> | ||
19 | 20 | ||
20 | /* | 21 | /* |
21 | * Make sure that the compiler and target are compatible. | 22 | * Make sure that the compiler and target are compatible. |
@@ -35,13 +36,6 @@ | |||
35 | #error Known good compilers: 3.3 | 36 | #error Known good compilers: 3.3 |
36 | #endif | 37 | #endif |
37 | 38 | ||
38 | /* Use marker if you need to separate the values later */ | ||
39 | |||
40 | #define DEFINE(sym, val) \ | ||
41 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
42 | |||
43 | #define BLANK() asm volatile("\n->" : : ) | ||
44 | |||
45 | int main(void) | 39 | int main(void) |
46 | { | 40 | { |
47 | DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); | 41 | DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); |
diff --git a/arch/arm/kernel/atags.c b/arch/arm/kernel/atags.c index e2e934c38080..64c420805e6f 100644 --- a/arch/arm/kernel/atags.c +++ b/arch/arm/kernel/atags.c | |||
@@ -35,7 +35,7 @@ create_proc_entries(void) | |||
35 | { | 35 | { |
36 | struct proc_dir_entry* tags_entry; | 36 | struct proc_dir_entry* tags_entry; |
37 | 37 | ||
38 | tags_entry = create_proc_read_entry("atags", 0400, &proc_root, read_buffer, &tags_buffer); | 38 | tags_entry = create_proc_read_entry("atags", 0400, NULL, read_buffer, &tags_buffer); |
39 | if (!tags_entry) | 39 | if (!tags_entry) |
40 | return -ENOMEM; | 40 | return -ENOMEM; |
41 | 41 | ||
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index f56d48c451ea..a53c0aba5c14 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
38 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
39 | #include <linux/proc_fs.h> | 39 | #include <linux/proc_fs.h> |
40 | #include <linux/seq_file.h> | ||
40 | #include <linux/device.h> | 41 | #include <linux/device.h> |
41 | #include <linux/init.h> | 42 | #include <linux/init.h> |
42 | #include <linux/mutex.h> | 43 | #include <linux/mutex.h> |
@@ -723,17 +724,14 @@ unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) | |||
723 | return address; | 724 | return address; |
724 | } | 725 | } |
725 | 726 | ||
726 | static int ecard_prints(char *buffer, ecard_t *ec) | 727 | static int ecard_prints(struct seq_file *m, ecard_t *ec) |
727 | { | 728 | { |
728 | char *start = buffer; | 729 | seq_printf(m, " %d: %s ", ec->slot_no, ec->easi ? "EASI" : " "); |
729 | |||
730 | buffer += sprintf(buffer, " %d: %s ", ec->slot_no, | ||
731 | ec->easi ? "EASI" : " "); | ||
732 | 730 | ||
733 | if (ec->cid.id == 0) { | 731 | if (ec->cid.id == 0) { |
734 | struct in_chunk_dir incd; | 732 | struct in_chunk_dir incd; |
735 | 733 | ||
736 | buffer += sprintf(buffer, "[%04X:%04X] ", | 734 | seq_printf(m, "[%04X:%04X] ", |
737 | ec->cid.manufacturer, ec->cid.product); | 735 | ec->cid.manufacturer, ec->cid.product); |
738 | 736 | ||
739 | if (!ec->card_desc && ec->cid.cd && | 737 | if (!ec->card_desc && ec->cid.cd && |
@@ -744,43 +742,43 @@ static int ecard_prints(char *buffer, ecard_t *ec) | |||
744 | strcpy((char *)ec->card_desc, incd.d.string); | 742 | strcpy((char *)ec->card_desc, incd.d.string); |
745 | } | 743 | } |
746 | 744 | ||
747 | buffer += sprintf(buffer, "%s\n", ec->card_desc ? ec->card_desc : "*unknown*"); | 745 | seq_printf(m, "%s\n", ec->card_desc ? ec->card_desc : "*unknown*"); |
748 | } else | 746 | } else |
749 | buffer += sprintf(buffer, "Simple card %d\n", ec->cid.id); | 747 | seq_printf(m, "Simple card %d\n", ec->cid.id); |
750 | 748 | ||
751 | return buffer - start; | 749 | return 0; |
752 | } | 750 | } |
753 | 751 | ||
754 | static int get_ecard_dev_info(char *buf, char **start, off_t pos, int count) | 752 | static int ecard_devices_proc_show(struct seq_file *m, void *v) |
755 | { | 753 | { |
756 | ecard_t *ec = cards; | 754 | ecard_t *ec = cards; |
757 | off_t at = 0; | 755 | |
758 | int len, cnt; | 756 | while (ec) { |
759 | 757 | ecard_prints(m, ec); | |
760 | cnt = 0; | ||
761 | while (ec && count > cnt) { | ||
762 | len = ecard_prints(buf, ec); | ||
763 | at += len; | ||
764 | if (at >= pos) { | ||
765 | if (!*start) { | ||
766 | *start = buf + (pos - (at - len)); | ||
767 | cnt = at - pos; | ||
768 | } else | ||
769 | cnt += len; | ||
770 | buf += len; | ||
771 | } | ||
772 | ec = ec->next; | 758 | ec = ec->next; |
773 | } | 759 | } |
774 | return (count > cnt) ? cnt : count; | 760 | return 0; |
775 | } | 761 | } |
776 | 762 | ||
763 | static int ecard_devices_proc_open(struct inode *inode, struct file *file) | ||
764 | { | ||
765 | return single_open(file, ecard_devices_proc_show, NULL); | ||
766 | } | ||
767 | |||
768 | static const struct file_operations bus_ecard_proc_fops = { | ||
769 | .owner = THIS_MODULE, | ||
770 | .open = ecard_devices_proc_open, | ||
771 | .read = seq_read, | ||
772 | .llseek = seq_lseek, | ||
773 | .release = single_release, | ||
774 | }; | ||
775 | |||
777 | static struct proc_dir_entry *proc_bus_ecard_dir = NULL; | 776 | static struct proc_dir_entry *proc_bus_ecard_dir = NULL; |
778 | 777 | ||
779 | static void ecard_proc_init(void) | 778 | static void ecard_proc_init(void) |
780 | { | 779 | { |
781 | proc_bus_ecard_dir = proc_mkdir("ecard", proc_bus); | 780 | proc_bus_ecard_dir = proc_mkdir("bus/ecard", NULL); |
782 | create_proc_info_entry("devices", 0, proc_bus_ecard_dir, | 781 | proc_create("devices", 0, proc_bus_ecard_dir, &bus_ecard_proc_fops); |
783 | get_ecard_dev_info); | ||
784 | } | 782 | } |
785 | 783 | ||
786 | #define ec_set_resource(ec,nr,st,sz) \ | 784 | #define ec_set_resource(ec,nr,st,sz) \ |
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index d51bc8b60557..b4565bb133c1 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
@@ -1176,7 +1176,7 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1176 | * *S (bit 20) updates condition codes | 1176 | * *S (bit 20) updates condition codes |
1177 | * ADC/SBC/RSC reads the C flag | 1177 | * ADC/SBC/RSC reads the C flag |
1178 | */ | 1178 | */ |
1179 | insn &= 0xfff00ff0; /* Rn = r0, Rd = r0 */ | 1179 | insn &= 0xfff00fff; /* Rn = r0, Rd = r0 */ |
1180 | asi->insn[0] = insn; | 1180 | asi->insn[0] = insn; |
1181 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ | 1181 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ |
1182 | emulate_alu_imm_rwflags : emulate_alu_imm_rflags; | 1182 | emulate_alu_imm_rwflags : emulate_alu_imm_rflags; |
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 13e371aad879..5593dd207216 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c | |||
@@ -66,7 +66,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) | |||
66 | return -ENOMEM; | 66 | return -ENOMEM; |
67 | for (is = 0; is < MAX_INSN_SIZE; ++is) | 67 | for (is = 0; is < MAX_INSN_SIZE; ++is) |
68 | p->ainsn.insn[is] = tmp_insn[is]; | 68 | p->ainsn.insn[is] = tmp_insn[is]; |
69 | flush_insns(&p->ainsn.insn, MAX_INSN_SIZE); | 69 | flush_insns(p->ainsn.insn, MAX_INSN_SIZE); |
70 | break; | 70 | break; |
71 | 71 | ||
72 | case INSN_GOOD_NO_SLOT: /* instruction doesn't need insn slot */ | 72 | case INSN_GOOD_NO_SLOT: /* instruction doesn't need insn slot */ |
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index f1a80d74a4b6..be526746e01e 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -246,7 +246,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | |||
246 | } | 246 | } |
247 | 247 | ||
248 | mmc0_data = *data; | 248 | mmc0_data = *data; |
249 | at91_clock_associate("mci0_clk", &at91cap9_mmc1_device.dev, "mci_clk"); | 249 | at91_clock_associate("mci0_clk", &at91cap9_mmc0_device.dev, "mci_clk"); |
250 | platform_device_register(&at91cap9_mmc0_device); | 250 | platform_device_register(&at91cap9_mmc0_device); |
251 | } else { /* MCI1 */ | 251 | } else { /* MCI1 */ |
252 | /* CLK */ | 252 | /* CLK */ |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index b6454c525962..719667e25c98 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -308,7 +308,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | |||
308 | } | 308 | } |
309 | 309 | ||
310 | mmc0_data = *data; | 310 | mmc0_data = *data; |
311 | at91_clock_associate("mci0_clk", &at91sam9263_mmc1_device.dev, "mci_clk"); | 311 | at91_clock_associate("mci0_clk", &at91sam9263_mmc0_device.dev, "mci_clk"); |
312 | platform_device_register(&at91sam9263_mmc0_device); | 312 | platform_device_register(&at91sam9263_mmc0_device); |
313 | } else { /* MCI1 */ | 313 | } else { /* MCI1 */ |
314 | /* CLK */ | 314 | /* CLK */ |
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 26fea4dcc3a0..81f1ebb4e964 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -79,8 +79,7 @@ static struct at91_udc_data __initdata csb337_udc_data = { | |||
79 | 79 | ||
80 | static struct i2c_board_info __initdata csb337_i2c_devices[] = { | 80 | static struct i2c_board_info __initdata csb337_i2c_devices[] = { |
81 | { | 81 | { |
82 | I2C_BOARD_INFO("rtc-ds1307", 0x68), | 82 | I2C_BOARD_INFO("ds1307", 0x68), |
83 | .type = "ds1307", | ||
84 | }, | 83 | }, |
85 | }; | 84 | }; |
86 | 85 | ||
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c index 0a897efeba8e..c1a813c7169b 100644 --- a/arch/arm/mach-at91/board-dk.c +++ b/arch/arm/mach-at91/board-dk.c | |||
@@ -132,8 +132,7 @@ static struct i2c_board_info __initdata dk_i2c_devices[] = { | |||
132 | I2C_BOARD_INFO("x9429", 0x28), | 132 | I2C_BOARD_INFO("x9429", 0x28), |
133 | }, | 133 | }, |
134 | { | 134 | { |
135 | I2C_BOARD_INFO("at24c", 0x50), | 135 | I2C_BOARD_INFO("24c1024", 0x50), |
136 | .type = "24c1024", | ||
137 | } | 136 | } |
138 | }; | 137 | }; |
139 | 138 | ||
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index b7b79bb9d6c4..af1a1d8ecc30 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -93,8 +93,7 @@ static struct at91_mmc_data __initdata eb9200_mmc_data = { | |||
93 | 93 | ||
94 | static struct i2c_board_info __initdata eb9200_i2c_devices[] = { | 94 | static struct i2c_board_info __initdata eb9200_i2c_devices[] = { |
95 | { | 95 | { |
96 | I2C_BOARD_INFO("at24c", 0x50), | 96 | I2C_BOARD_INFO("24c512", 0x50), |
97 | .type = "24c512", | ||
98 | }, | 97 | }, |
99 | }; | 98 | }; |
100 | 99 | ||
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 39733b6992aa..aa863c157708 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -61,6 +61,15 @@ static inline void sdram_selfrefresh_enable(void) | |||
61 | #else | 61 | #else |
62 | #include <asm/arch/at91sam9_sdramc.h> | 62 | #include <asm/arch/at91sam9_sdramc.h> |
63 | 63 | ||
64 | #ifdef CONFIG_ARCH_AT91SAM9263 | ||
65 | /* | ||
66 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; | ||
67 | * handle those cases both here and in the Suspend-To-RAM support. | ||
68 | */ | ||
69 | #define AT91_SDRAMC AT91_SDRAMC0 | ||
70 | #warning Assuming EB1 SDRAM controller is *NOT* used | ||
71 | #endif | ||
72 | |||
64 | static u32 saved_lpr; | 73 | static u32 saved_lpr; |
65 | 74 | ||
66 | static inline void sdram_selfrefresh_enable(void) | 75 | static inline void sdram_selfrefresh_enable(void) |
@@ -75,11 +84,6 @@ static inline void sdram_selfrefresh_enable(void) | |||
75 | 84 | ||
76 | #define sdram_selfrefresh_disable() at91_sys_write(AT91_SDRAMC_LPR, saved_lpr) | 85 | #define sdram_selfrefresh_disable() at91_sys_write(AT91_SDRAMC_LPR, saved_lpr) |
77 | 86 | ||
78 | /* | ||
79 | * FIXME: The AT91SAM9263 has a second EBI controller which may have | ||
80 | * additional SDRAM. pm_slowclock.S will require a similar fix. | ||
81 | */ | ||
82 | |||
83 | #endif | 87 | #endif |
84 | 88 | ||
85 | 89 | ||
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c index 4143828a9684..c6b94f60e0b2 100644 --- a/arch/arm/mach-davinci/clock.c +++ b/arch/arm/mach-davinci/clock.c | |||
@@ -311,11 +311,7 @@ static const struct file_operations proc_davinci_ck_operations = { | |||
311 | 311 | ||
312 | static int __init davinci_ck_proc_init(void) | 312 | static int __init davinci_ck_proc_init(void) |
313 | { | 313 | { |
314 | struct proc_dir_entry *entry; | 314 | proc_create("davinci_clocks", 0, NULL, &proc_davinci_ck_operations); |
315 | |||
316 | entry = create_proc_entry("davinci_clocks", 0, NULL); | ||
317 | if (entry) | ||
318 | entry->proc_fops = &proc_davinci_ck_operations; | ||
319 | return 0; | 315 | return 0; |
320 | 316 | ||
321 | } | 317 | } |
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index c947152f9a3c..4877597c8758 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c | |||
@@ -50,8 +50,7 @@ static struct sys_timer em7210_timer = { | |||
50 | */ | 50 | */ |
51 | static struct i2c_board_info __initdata em7210_i2c_devices[] = { | 51 | static struct i2c_board_info __initdata em7210_i2c_devices[] = { |
52 | { | 52 | { |
53 | I2C_BOARD_INFO("rtc-rs5c372", 0x32), | 53 | I2C_BOARD_INFO("rs5c372a", 0x32), |
54 | .type = "rs5c372a", | ||
55 | }, | 54 | }, |
56 | }; | 55 | }; |
57 | 56 | ||
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index d2a7b04f1cb0..d4fca75ce542 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c | |||
@@ -176,12 +176,10 @@ static struct f75375s_platform_data glantank_f75375s = { | |||
176 | 176 | ||
177 | static struct i2c_board_info __initdata glantank_i2c_devices[] = { | 177 | static struct i2c_board_info __initdata glantank_i2c_devices[] = { |
178 | { | 178 | { |
179 | I2C_BOARD_INFO("rtc-rs5c372", 0x32), | 179 | I2C_BOARD_INFO("rs5c372a", 0x32), |
180 | .type = "rs5c372a", | ||
181 | }, | 180 | }, |
182 | { | 181 | { |
183 | I2C_BOARD_INFO("f75375", 0x2e), | 182 | I2C_BOARD_INFO("f75375", 0x2e), |
184 | .type = "f75375", | ||
185 | .platform_data = &glantank_f75375s, | 183 | .platform_data = &glantank_f75375s, |
186 | }, | 184 | }, |
187 | }; | 185 | }; |
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index bc91d6e66bc4..2741063bf361 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -208,12 +208,10 @@ static struct f75375s_platform_data n2100_f75375s = { | |||
208 | 208 | ||
209 | static struct i2c_board_info __initdata n2100_i2c_devices[] = { | 209 | static struct i2c_board_info __initdata n2100_i2c_devices[] = { |
210 | { | 210 | { |
211 | I2C_BOARD_INFO("rtc-rs5c372", 0x32), | 211 | I2C_BOARD_INFO("rs5c372b", 0x32), |
212 | .type = "rs5c372b", | ||
213 | }, | 212 | }, |
214 | { | 213 | { |
215 | I2C_BOARD_INFO("f75375", 0x2e), | 214 | I2C_BOARD_INFO("f75375", 0x2e), |
216 | .type = "f75375", | ||
217 | .platform_data = &n2100_f75375s, | 215 | .platform_data = &n2100_f75375s, |
218 | }, | 216 | }, |
219 | }; | 217 | }; |
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index 8cb07437a807..a51bfa6978b6 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c | |||
@@ -65,7 +65,7 @@ static struct platform_device dsmg600_i2c_gpio = { | |||
65 | 65 | ||
66 | static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = { | 66 | static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = { |
67 | { | 67 | { |
68 | I2C_BOARD_INFO("rtc-pcf8563", 0x51), | 68 | I2C_BOARD_INFO("pcf8563", 0x51), |
69 | }, | 69 | }, |
70 | }; | 70 | }; |
71 | 71 | ||
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c index 83c137ec582c..63a23fa4aab4 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c | |||
@@ -448,7 +448,9 @@ int npe_send_message(struct npe *npe, const void *msg, const char *what) | |||
448 | return -ETIMEDOUT; | 448 | return -ETIMEDOUT; |
449 | } | 449 | } |
450 | 450 | ||
451 | #if DEBUG_MSG > 1 | ||
451 | debug_msg(npe, "Sending a message took %i cycles\n", cycles); | 452 | debug_msg(npe, "Sending a message took %i cycles\n", cycles); |
453 | #endif | ||
452 | return 0; | 454 | return 0; |
453 | } | 455 | } |
454 | 456 | ||
@@ -484,7 +486,9 @@ int npe_recv_message(struct npe *npe, void *msg, const char *what) | |||
484 | return -ETIMEDOUT; | 486 | return -ETIMEDOUT; |
485 | } | 487 | } |
486 | 488 | ||
489 | #if DEBUG_MSG > 1 | ||
487 | debug_msg(npe, "Receiving a message took %i cycles\n", cycles); | 490 | debug_msg(npe, "Receiving a message took %i cycles\n", cycles); |
491 | #endif | ||
488 | return 0; | 492 | return 0; |
489 | } | 493 | } |
490 | 494 | ||
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c index e83301325301..fab94eaecee7 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c | |||
@@ -184,6 +184,8 @@ void qmgr_release_queue(unsigned int queue) | |||
184 | case 3: mask[0] = 0xFF; break; | 184 | case 3: mask[0] = 0xFF; break; |
185 | } | 185 | } |
186 | 186 | ||
187 | mask[1] = mask[2] = mask[3] = 0; | ||
188 | |||
187 | while (addr--) | 189 | while (addr--) |
188 | shift_mask(mask); | 190 | shift_mask(mask); |
189 | 191 | ||
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c index 159e1c4f1eda..84b5e62a9c0a 100644 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c | |||
@@ -54,7 +54,7 @@ static struct platform_device nas100d_flash = { | |||
54 | 54 | ||
55 | static struct i2c_board_info __initdata nas100d_i2c_board_info [] = { | 55 | static struct i2c_board_info __initdata nas100d_i2c_board_info [] = { |
56 | { | 56 | { |
57 | I2C_BOARD_INFO("rtc-pcf8563", 0x51), | 57 | I2C_BOARD_INFO("pcf8563", 0x51), |
58 | }, | 58 | }, |
59 | }; | 59 | }; |
60 | 60 | ||
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index d9a182895a0f..a48a6655b887 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c | |||
@@ -57,7 +57,7 @@ static struct i2c_gpio_platform_data nslu2_i2c_gpio_data = { | |||
57 | 57 | ||
58 | static struct i2c_board_info __initdata nslu2_i2c_board_info [] = { | 58 | static struct i2c_board_info __initdata nslu2_i2c_board_info [] = { |
59 | { | 59 | { |
60 | I2C_BOARD_INFO("rtc-x1205", 0x6f), | 60 | I2C_BOARD_INFO("x1205", 0x6f), |
61 | }, | 61 | }, |
62 | }; | 62 | }; |
63 | 63 | ||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 507987720015..4b444fdaafea 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -351,11 +351,9 @@ static void __init h2_init_smc91x(void) | |||
351 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { | 351 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { |
352 | { | 352 | { |
353 | I2C_BOARD_INFO("tps65010", 0x48), | 353 | I2C_BOARD_INFO("tps65010", 0x48), |
354 | .type = "tps65010", | ||
355 | .irq = OMAP_GPIO_IRQ(58), | 354 | .irq = OMAP_GPIO_IRQ(58), |
356 | }, { | 355 | }, { |
357 | I2C_BOARD_INFO("isp1301_omap", 0x2d), | 356 | I2C_BOARD_INFO("isp1301_omap", 0x2d), |
358 | .type = "isp1301_omap", | ||
359 | .irq = OMAP_GPIO_IRQ(2), | 357 | .irq = OMAP_GPIO_IRQ(2), |
360 | }, | 358 | }, |
361 | }; | 359 | }; |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index c3ef1ee5f77b..7fbaa8d648cd 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -473,8 +473,7 @@ static struct omap_board_config_kernel h3_config[] __initdata = { | |||
473 | 473 | ||
474 | static struct i2c_board_info __initdata h3_i2c_board_info[] = { | 474 | static struct i2c_board_info __initdata h3_i2c_board_info[] = { |
475 | { | 475 | { |
476 | I2C_BOARD_INFO("tps65010", 0x48), | 476 | I2C_BOARD_INFO("tps65013", 0x48), |
477 | .type = "tps65013", | ||
478 | /* .irq = OMAP_GPIO_IRQ(??), */ | 477 | /* .irq = OMAP_GPIO_IRQ(??), */ |
479 | }, | 478 | }, |
480 | }; | 479 | }; |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 4f9baba7d893..a66505f58b15 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -254,7 +254,6 @@ static struct tps65010_board tps_board = { | |||
254 | static struct i2c_board_info __initdata osk_i2c_board_info[] = { | 254 | static struct i2c_board_info __initdata osk_i2c_board_info[] = { |
255 | { | 255 | { |
256 | I2C_BOARD_INFO("tps65010", 0x48), | 256 | I2C_BOARD_INFO("tps65010", 0x48), |
257 | .type = "tps65010", | ||
258 | .irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)), | 257 | .irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)), |
259 | .platform_data = &tps_board, | 258 | .platform_data = &tps_board, |
260 | 259 | ||
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index 6b179371e0a2..9608503d67f5 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -19,14 +19,14 @@ | |||
19 | 19 | ||
20 | /* | 20 | /* |
21 | * The Orion has fully programable address map. There's a separate address | 21 | * The Orion has fully programable address map. There's a separate address |
22 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIE, USB, | 22 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB, |
23 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own | 23 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own |
24 | * address decode windows that allow it to access any of the Orion resources. | 24 | * address decode windows that allow it to access any of the Orion resources. |
25 | * | 25 | * |
26 | * CPU address decoding -- | 26 | * CPU address decoding -- |
27 | * Linux assumes that it is the boot loader that already setup the access to | 27 | * Linux assumes that it is the boot loader that already setup the access to |
28 | * DDR and internal registers. | 28 | * DDR and internal registers. |
29 | * Setup access to PCI and PCI-E IO/MEM space is issued by this file. | 29 | * Setup access to PCI and PCIe IO/MEM space is issued by this file. |
30 | * Setup access to various devices located on the device bus interface (e.g. | 30 | * Setup access to various devices located on the device bus interface (e.g. |
31 | * flashes, RTC, etc) should be issued by machine-setup.c according to | 31 | * flashes, RTC, etc) should be issued by machine-setup.c according to |
32 | * specific board population (by using orion5x_setup_*_win()). | 32 | * specific board population (by using orion5x_setup_*_win()). |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 2bedf71659cb..0ecff5a61972 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -132,7 +132,7 @@ static struct platform_device orion5x_uart = { | |||
132 | static struct resource orion5x_ehci0_resources[] = { | 132 | static struct resource orion5x_ehci0_resources[] = { |
133 | { | 133 | { |
134 | .start = ORION5X_USB0_PHYS_BASE, | 134 | .start = ORION5X_USB0_PHYS_BASE, |
135 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K, | 135 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1, |
136 | .flags = IORESOURCE_MEM, | 136 | .flags = IORESOURCE_MEM, |
137 | }, | 137 | }, |
138 | { | 138 | { |
@@ -145,7 +145,7 @@ static struct resource orion5x_ehci0_resources[] = { | |||
145 | static struct resource orion5x_ehci1_resources[] = { | 145 | static struct resource orion5x_ehci1_resources[] = { |
146 | { | 146 | { |
147 | .start = ORION5X_USB1_PHYS_BASE, | 147 | .start = ORION5X_USB1_PHYS_BASE, |
148 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K, | 148 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1, |
149 | .flags = IORESOURCE_MEM, | 149 | .flags = IORESOURCE_MEM, |
150 | }, | 150 | }, |
151 | { | 151 | { |
@@ -319,7 +319,7 @@ struct sys_timer orion5x_timer = { | |||
319 | ****************************************************************************/ | 319 | ****************************************************************************/ |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Identify device ID and rev from PCIE configuration header space '0'. | 322 | * Identify device ID and rev from PCIe configuration header space '0'. |
323 | */ | 323 | */ |
324 | static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) | 324 | static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) |
325 | { | 325 | { |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index f4c4c9a72a7c..14adf8d1a54a 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -33,10 +33,9 @@ struct pci_sys_data; | |||
33 | struct pci_bus; | 33 | struct pci_bus; |
34 | 34 | ||
35 | void orion5x_pcie_id(u32 *dev, u32 *rev); | 35 | void orion5x_pcie_id(u32 *dev, u32 *rev); |
36 | int orion5x_pcie_local_bus_nr(void); | ||
37 | int orion5x_pci_local_bus_nr(void); | ||
38 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); | 36 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); |
39 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); | 37 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); |
38 | int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); | ||
40 | 39 | ||
41 | /* | 40 | /* |
42 | * Valid GPIO pins according to MPP setup, used by machine-setup. | 41 | * Valid GPIO pins according to MPP setup, used by machine-setup. |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index 872aed372327..44c64342dacb 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -241,14 +241,17 @@ void __init db88f5281_pci_preinit(void) | |||
241 | 241 | ||
242 | static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 242 | static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
243 | { | 243 | { |
244 | int irq; | ||
245 | |||
244 | /* | 246 | /* |
245 | * PCIE IRQ is connected internally (not GPIO) | 247 | * Check for devices with hard-wired IRQs. |
246 | */ | 248 | */ |
247 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 249 | irq = orion5x_pci_map_irq(dev, slot, pin); |
248 | return IRQ_ORION5X_PCIE0_INT; | 250 | if (irq != -1) |
251 | return irq; | ||
249 | 252 | ||
250 | /* | 253 | /* |
251 | * PCI IRQs are connected via GPIOs | 254 | * PCI IRQs are connected via GPIOs. |
252 | */ | 255 | */ |
253 | switch (slot - DB88F5281_PCI_SLOT0_OFFS) { | 256 | switch (slot - DB88F5281_PCI_SLOT0_OFFS) { |
254 | case 0: | 257 | case 0: |
@@ -292,9 +295,7 @@ static struct mv643xx_eth_platform_data db88f5281_eth_data = { | |||
292 | * RTC DS1339 on I2C bus | 295 | * RTC DS1339 on I2C bus |
293 | ****************************************************************************/ | 296 | ****************************************************************************/ |
294 | static struct i2c_board_info __initdata db88f5281_i2c_rtc = { | 297 | static struct i2c_board_info __initdata db88f5281_i2c_rtc = { |
295 | .driver_name = "rtc-ds1307", | 298 | I2C_BOARD_INFO("ds1339", 0x68), |
296 | .type = "ds1339", | ||
297 | .addr = 0x68, | ||
298 | }; | 299 | }; |
299 | 300 | ||
300 | /***************************************************************************** | 301 | /***************************************************************************** |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index d67790ef236e..f9430f5ca9a8 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -43,11 +43,16 @@ | |||
43 | 43 | ||
44 | static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 44 | static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
45 | { | 45 | { |
46 | /* PCI-E */ | 46 | int irq; |
47 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | ||
48 | return IRQ_ORION5X_PCIE0_INT; | ||
49 | 47 | ||
50 | pr_err("%s: requested mapping for unknown bus\n", __func__); | 48 | /* |
49 | * Check for devices with hard-wired IRQs. | ||
50 | */ | ||
51 | irq = orion5x_pci_map_irq(dev, slot, pin); | ||
52 | if (irq != -1) | ||
53 | return irq; | ||
54 | |||
55 | pr_err("%s: requested mapping for unknown device\n", __func__); | ||
51 | 56 | ||
52 | return -1; | 57 | return -1; |
53 | } | 58 | } |
@@ -220,19 +225,16 @@ static struct platform_device *dns323_plat_devices[] __initdata = { | |||
220 | static struct i2c_board_info __initdata dns323_i2c_devices[] = { | 225 | static struct i2c_board_info __initdata dns323_i2c_devices[] = { |
221 | { | 226 | { |
222 | I2C_BOARD_INFO("g760a", 0x3e), | 227 | I2C_BOARD_INFO("g760a", 0x3e), |
223 | .type = "g760a", | ||
224 | }, | 228 | }, |
225 | #if 0 | 229 | #if 0 |
226 | /* this entry requires the new-style driver model lm75 driver, | 230 | /* this entry requires the new-style driver model lm75 driver, |
227 | * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */ | 231 | * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */ |
228 | { | 232 | { |
229 | I2C_BOARD_INFO("lm75", 0x48), | 233 | I2C_BOARD_INFO("g751", 0x48), |
230 | .type = "g751", | ||
231 | }, | 234 | }, |
232 | #endif | 235 | #endif |
233 | { | 236 | { |
234 | I2C_BOARD_INFO("rtc-m41t80", 0x68), | 237 | I2C_BOARD_INFO("m41t80", 0x68), |
235 | .type = "m41t80", | ||
236 | } | 238 | } |
237 | }; | 239 | }; |
238 | 240 | ||
@@ -253,9 +255,9 @@ static void __init dns323_init(void) | |||
253 | */ | 255 | */ |
254 | orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE); | 256 | orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE); |
255 | 257 | ||
256 | /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIE | 258 | /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe |
257 | * | 259 | * |
258 | * Open a special address decode windows for the PCIE WA. | 260 | * Open a special address decode windows for the PCIe WA. |
259 | */ | 261 | */ |
260 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 262 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
261 | ORION5X_PCIE_WA_SIZE); | 263 | ORION5X_PCIE_WA_SIZE); |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 91413455beba..88410862feef 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -120,13 +120,19 @@ static struct platform_device kurobox_pro_nor_flash = { | |||
120 | 120 | ||
121 | static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 121 | static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
122 | { | 122 | { |
123 | int irq; | ||
124 | |||
125 | /* | ||
126 | * Check for devices with hard-wired IRQs. | ||
127 | */ | ||
128 | irq = orion5x_pci_map_irq(dev, slot, pin); | ||
129 | if (irq != -1) | ||
130 | return irq; | ||
131 | |||
123 | /* | 132 | /* |
124 | * PCI isn't used on the Kuro | 133 | * PCI isn't used on the Kuro |
125 | */ | 134 | */ |
126 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 135 | printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n"); |
127 | return IRQ_ORION5X_PCIE0_INT; | ||
128 | else | ||
129 | printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n"); | ||
130 | 136 | ||
131 | return -1; | 137 | return -1; |
132 | } | 138 | } |
@@ -162,9 +168,7 @@ static struct mv643xx_eth_platform_data kurobox_pro_eth_data = { | |||
162 | * RTC 5C372a on I2C bus | 168 | * RTC 5C372a on I2C bus |
163 | ****************************************************************************/ | 169 | ****************************************************************************/ |
164 | static struct i2c_board_info __initdata kurobox_pro_i2c_rtc = { | 170 | static struct i2c_board_info __initdata kurobox_pro_i2c_rtc = { |
165 | .driver_name = "rtc-rs5c372", | 171 | I2C_BOARD_INFO("rs5c372a", 0x32), |
166 | .type = "rs5c372a", | ||
167 | .addr = 0x32, | ||
168 | }; | 172 | }; |
169 | 173 | ||
170 | /***************************************************************************** | 174 | /***************************************************************************** |
@@ -193,7 +197,7 @@ static void __init kurobox_pro_init(void) | |||
193 | orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE); | 197 | orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE); |
194 | 198 | ||
195 | /* | 199 | /* |
196 | * Open a special address decode windows for the PCIE WA. | 200 | * Open a special address decode windows for the PCIe WA. |
197 | */ | 201 | */ |
198 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 202 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
199 | ORION5X_PCIE_WA_SIZE); | 203 | ORION5X_PCIE_WA_SIZE); |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index fdf99fca85b3..9d5d39fa19c3 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -41,11 +41,6 @@ void __init orion5x_pcie_id(u32 *dev, u32 *rev) | |||
41 | *rev = orion_pcie_rev(PCIE_BASE); | 41 | *rev = orion_pcie_rev(PCIE_BASE); |
42 | } | 42 | } |
43 | 43 | ||
44 | int __init orion5x_pcie_local_bus_nr(void) | ||
45 | { | ||
46 | return orion_pcie_get_local_bus_nr(PCIE_BASE); | ||
47 | } | ||
48 | |||
49 | static int pcie_valid_config(int bus, int dev) | 44 | static int pcie_valid_config(int bus, int dev) |
50 | { | 45 | { |
51 | /* | 46 | /* |
@@ -269,7 +264,7 @@ static int __init pcie_setup(struct pci_sys_data *sys) | |||
269 | */ | 264 | */ |
270 | static DEFINE_SPINLOCK(orion5x_pci_lock); | 265 | static DEFINE_SPINLOCK(orion5x_pci_lock); |
271 | 266 | ||
272 | int orion5x_pci_local_bus_nr(void) | 267 | static int orion5x_pci_local_bus_nr(void) |
273 | { | 268 | { |
274 | u32 conf = orion5x_read(PCI_P2P_CONF); | 269 | u32 conf = orion5x_read(PCI_P2P_CONF); |
275 | return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS); | 270 | return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS); |
@@ -557,3 +552,16 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys | |||
557 | 552 | ||
558 | return bus; | 553 | return bus; |
559 | } | 554 | } |
555 | |||
556 | int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
557 | { | ||
558 | int bus = dev->bus->number; | ||
559 | |||
560 | /* | ||
561 | * PCIe endpoint? | ||
562 | */ | ||
563 | if (bus < orion5x_pci_local_bus_nr()) | ||
564 | return IRQ_ORION5X_PCIE0_INT; | ||
565 | |||
566 | return -1; | ||
567 | } | ||
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 37e8b2dc3ed5..81abc1003aae 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -172,11 +172,14 @@ void __init rd88f5182_pci_preinit(void) | |||
172 | 172 | ||
173 | static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 173 | static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
174 | { | 174 | { |
175 | int irq; | ||
176 | |||
175 | /* | 177 | /* |
176 | * PCI-E isn't used on the RD2 | 178 | * Check for devices with hard-wired IRQs. |
177 | */ | 179 | */ |
178 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 180 | irq = orion5x_pci_map_irq(dev, slot, pin); |
179 | return IRQ_ORION5X_PCIE0_INT; | 181 | if (irq != -1) |
182 | return irq; | ||
180 | 183 | ||
181 | /* | 184 | /* |
182 | * PCI IRQs are connected via GPIOs | 185 | * PCI IRQs are connected via GPIOs |
@@ -224,9 +227,7 @@ static struct mv643xx_eth_platform_data rd88f5182_eth_data = { | |||
224 | * RTC DS1338 on I2C bus | 227 | * RTC DS1338 on I2C bus |
225 | ****************************************************************************/ | 228 | ****************************************************************************/ |
226 | static struct i2c_board_info __initdata rd88f5182_i2c_rtc = { | 229 | static struct i2c_board_info __initdata rd88f5182_i2c_rtc = { |
227 | .driver_name = "rtc-ds1307", | 230 | I2C_BOARD_INFO("ds1338", 0x68), |
228 | .type = "ds1338", | ||
229 | .addr = 0x68, | ||
230 | }; | 231 | }; |
231 | 232 | ||
232 | /***************************************************************************** | 233 | /***************************************************************************** |
@@ -259,7 +260,7 @@ static void __init rd88f5182_init(void) | |||
259 | orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE); | 260 | orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE); |
260 | 261 | ||
261 | /* | 262 | /* |
262 | * Open a special address decode windows for the PCIE WA. | 263 | * Open a special address decode windows for the PCIe WA. |
263 | */ | 264 | */ |
264 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 265 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
265 | ORION5X_PCIE_WA_SIZE); | 266 | ORION5X_PCIE_WA_SIZE); |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index fd43863a86f6..9afb41ee6e07 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -141,14 +141,17 @@ void __init qnap_ts209_pci_preinit(void) | |||
141 | 141 | ||
142 | static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 142 | static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
143 | { | 143 | { |
144 | int irq; | ||
145 | |||
144 | /* | 146 | /* |
145 | * PCIE IRQ is connected internally (not GPIO) | 147 | * Check for devices with hard-wired IRQs. |
146 | */ | 148 | */ |
147 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 149 | irq = orion5x_pci_map_irq(dev, slot, pin); |
148 | return IRQ_ORION5X_PCIE0_INT; | 150 | if (irq != -1) |
151 | return irq; | ||
149 | 152 | ||
150 | /* | 153 | /* |
151 | * PCI IRQs are connected via GPIOs | 154 | * PCI IRQs are connected via GPIOs. |
152 | */ | 155 | */ |
153 | switch (slot - QNAP_TS209_PCI_SLOT0_OFFS) { | 156 | switch (slot - QNAP_TS209_PCI_SLOT0_OFFS) { |
154 | case 0: | 157 | case 0: |
@@ -276,8 +279,7 @@ static void __init ts209_find_mac_addr(void) | |||
276 | #define TS209_RTC_GPIO 3 | 279 | #define TS209_RTC_GPIO 3 |
277 | 280 | ||
278 | static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = { | 281 | static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = { |
279 | .driver_name = "rtc-s35390a", | 282 | I2C_BOARD_INFO("s35390a", 0x30), |
280 | .addr = 0x30, | ||
281 | .irq = 0, | 283 | .irq = 0, |
282 | }; | 284 | }; |
283 | 285 | ||
@@ -373,7 +375,7 @@ static void __init qnap_ts209_init(void) | |||
373 | QNAP_TS209_NOR_BOOT_SIZE); | 375 | QNAP_TS209_NOR_BOOT_SIZE); |
374 | 376 | ||
375 | /* | 377 | /* |
376 | * Open a special address decode windows for the PCIE WA. | 378 | * Open a special address decode windows for the PCIe WA. |
377 | */ | 379 | */ |
378 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 380 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
379 | ORION5X_PCIE_WA_SIZE); | 381 | ORION5X_PCIE_WA_SIZE); |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 7cdcb459ea9d..6a830853aa6a 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -5,9 +5,9 @@ | |||
5 | # Common support (must be linked before board specific support) | 5 | # Common support (must be linked before board specific support) |
6 | obj-y += clock.o devices.o generic.o irq.o dma.o \ | 6 | obj-y += clock.o devices.o generic.o irq.o dma.o \ |
7 | time.o gpio.o | 7 | time.o gpio.o |
8 | obj-$(CONFIG_PXA25x) += pxa25x.o mfp-pxa2xx.o | 8 | obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o pxa25x.o |
9 | obj-$(CONFIG_PXA27x) += pxa27x.o mfp-pxa2xx.o | 9 | obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o pxa27x.o |
10 | obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp-pxa3xx.o smemc.o | 10 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o |
11 | obj-$(CONFIG_CPU_PXA300) += pxa300.o | 11 | obj-$(CONFIG_CPU_PXA300) += pxa300.o |
12 | obj-$(CONFIG_CPU_PXA320) += pxa320.o | 12 | obj-$(CONFIG_CPU_PXA320) += pxa320.o |
13 | 13 | ||
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 331f29b2d0cd..44617938f3f1 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -90,11 +90,6 @@ static struct map_desc standard_io_desc[] __initdata = { | |||
90 | .pfn = __phys_to_pfn(0x40000000), | 90 | .pfn = __phys_to_pfn(0x40000000), |
91 | .length = 0x02000000, | 91 | .length = 0x02000000, |
92 | .type = MT_DEVICE | 92 | .type = MT_DEVICE |
93 | }, { /* LCD */ | ||
94 | .virtual = 0xf4000000, | ||
95 | .pfn = __phys_to_pfn(0x44000000), | ||
96 | .length = 0x00100000, | ||
97 | .type = MT_DEVICE | ||
98 | }, { /* Mem Ctl */ | 93 | }, { /* Mem Ctl */ |
99 | .virtual = 0xf6000000, | 94 | .virtual = 0xf6000000, |
100 | .pfn = __phys_to_pfn(0x48000000), | 95 | .pfn = __phys_to_pfn(0x48000000), |
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index f01d18544133..bdf239754037 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include <asm/arch/pxa-regs.h> | 41 | #include <asm/arch/pxa-regs.h> |
42 | #include <asm/arch/pxa2xx-regs.h> | 42 | #include <asm/arch/pxa2xx-regs.h> |
43 | #include <asm/arch/pxa2xx-gpio.h> | ||
43 | 44 | ||
44 | #include "generic.h" | 45 | #include "generic.h" |
45 | 46 | ||
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 03396063b561..530654474bb2 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -301,8 +301,7 @@ static struct pxafb_mode_info tpo_tdo24mtea1_modes[] = { | |||
301 | static struct pxafb_mach_info littleton_lcd_info = { | 301 | static struct pxafb_mach_info littleton_lcd_info = { |
302 | .modes = tpo_tdo24mtea1_modes, | 302 | .modes = tpo_tdo24mtea1_modes, |
303 | .num_modes = 2, | 303 | .num_modes = 2, |
304 | .lccr0 = LCCR0_Act, | 304 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
305 | .lccr3 = LCCR3_HSP | LCCR3_VSP, | ||
306 | .pxafb_lcd_power = littleton_lcd_power, | 305 | .pxafb_lcd_power = littleton_lcd_power, |
307 | }; | 306 | }; |
308 | 307 | ||
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index ca209c443f34..0993f4d1a0bc 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -395,8 +395,8 @@ static struct pxafb_mach_info sharp_lm8v31 = { | |||
395 | .num_modes = 1, | 395 | .num_modes = 1, |
396 | .cmap_inverse = 0, | 396 | .cmap_inverse = 0, |
397 | .cmap_static = 0, | 397 | .cmap_static = 0, |
398 | .lccr0 = LCCR0_SDS, | 398 | .lcd_conn = LCD_COLOR_DSTN_16BPP | LCD_PCLK_EDGE_FALL | |
399 | .lccr3 = LCCR3_PCP | LCCR3_Acb(255), | 399 | LCD_AC_BIAS_FREQ(255); |
400 | }; | 400 | }; |
401 | 401 | ||
402 | #define MMC_POLL_RATE msecs_to_jiffies(1000) | 402 | #define MMC_POLL_RATE msecs_to_jiffies(1000) |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index d70be75bd199..badba064dc04 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -114,6 +114,14 @@ static unsigned long magician_pin_config[] = { | |||
114 | GPIO82_CIF_DD_5, | 114 | GPIO82_CIF_DD_5, |
115 | GPIO84_CIF_FV, | 115 | GPIO84_CIF_FV, |
116 | GPIO85_CIF_LV, | 116 | GPIO85_CIF_LV, |
117 | |||
118 | /* Magician specific input GPIOs */ | ||
119 | GPIO9_GPIO, /* unknown */ | ||
120 | GPIO10_GPIO, /* GSM_IRQ */ | ||
121 | GPIO13_GPIO, /* CPLD_IRQ */ | ||
122 | GPIO107_GPIO, /* DS1WM_IRQ */ | ||
123 | GPIO108_GPIO, /* GSM_READY */ | ||
124 | GPIO115_GPIO, /* nPEN_IRQ */ | ||
117 | }; | 125 | }; |
118 | 126 | ||
119 | /* | 127 | /* |
@@ -438,7 +446,7 @@ static struct pasic3_led pasic3_leds[] = { | |||
438 | 446 | ||
439 | static struct platform_device pasic3; | 447 | static struct platform_device pasic3; |
440 | 448 | ||
441 | static struct pasic3_leds_machinfo __devinit pasic3_leds_info = { | 449 | static struct pasic3_leds_machinfo pasic3_leds_info = { |
442 | .num_leds = ARRAY_SIZE(pasic3_leds), | 450 | .num_leds = ARRAY_SIZE(pasic3_leds), |
443 | .power_gpio = EGPIO_MAGICIAN_LED_POWER, | 451 | .power_gpio = EGPIO_MAGICIAN_LED_POWER, |
444 | .leds = pasic3_leds, | 452 | .leds = pasic3_leds, |
@@ -543,9 +551,28 @@ static struct platform_device power_supply = { | |||
543 | static int magician_mci_init(struct device *dev, | 551 | static int magician_mci_init(struct device *dev, |
544 | irq_handler_t detect_irq, void *data) | 552 | irq_handler_t detect_irq, void *data) |
545 | { | 553 | { |
546 | return request_irq(IRQ_MAGICIAN_SD, detect_irq, | 554 | int err; |
555 | |||
556 | err = request_irq(IRQ_MAGICIAN_SD, detect_irq, | ||
547 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, | 557 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, |
548 | "MMC card detect", data); | 558 | "MMC card detect", data); |
559 | if (err) | ||
560 | goto err_request_irq; | ||
561 | err = gpio_request(EGPIO_MAGICIAN_SD_POWER, "SD_POWER"); | ||
562 | if (err) | ||
563 | goto err_request_power; | ||
564 | err = gpio_request(EGPIO_MAGICIAN_nSD_READONLY, "nSD_READONLY"); | ||
565 | if (err) | ||
566 | goto err_request_readonly; | ||
567 | |||
568 | return 0; | ||
569 | |||
570 | err_request_readonly: | ||
571 | gpio_free(EGPIO_MAGICIAN_SD_POWER); | ||
572 | err_request_power: | ||
573 | free_irq(IRQ_MAGICIAN_SD, data); | ||
574 | err_request_irq: | ||
575 | return err; | ||
549 | } | 576 | } |
550 | 577 | ||
551 | static void magician_mci_setpower(struct device *dev, unsigned int vdd) | 578 | static void magician_mci_setpower(struct device *dev, unsigned int vdd) |
@@ -562,6 +589,8 @@ static int magician_mci_get_ro(struct device *dev) | |||
562 | 589 | ||
563 | static void magician_mci_exit(struct device *dev, void *data) | 590 | static void magician_mci_exit(struct device *dev, void *data) |
564 | { | 591 | { |
592 | gpio_free(EGPIO_MAGICIAN_nSD_READONLY); | ||
593 | gpio_free(EGPIO_MAGICIAN_SD_POWER); | ||
565 | free_irq(IRQ_MAGICIAN_SD, data); | 594 | free_irq(IRQ_MAGICIAN_SD, data); |
566 | } | 595 | } |
567 | 596 | ||
@@ -643,28 +672,42 @@ static void __init magician_init(void) | |||
643 | { | 672 | { |
644 | void __iomem *cpld; | 673 | void __iomem *cpld; |
645 | int lcd_select; | 674 | int lcd_select; |
675 | int err; | ||
676 | |||
677 | gpio_request(GPIO13_MAGICIAN_CPLD_IRQ, "CPLD_IRQ"); | ||
678 | gpio_request(GPIO107_MAGICIAN_DS1WM_IRQ, "DS1WM_IRQ"); | ||
646 | 679 | ||
647 | pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); | 680 | pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); |
648 | 681 | ||
649 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 682 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
683 | |||
684 | err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN"); | ||
685 | if (!err) { | ||
686 | gpio_direction_output(GPIO83_MAGICIAN_nIR_EN, 1); | ||
687 | pxa_set_ficp_info(&magician_ficp_info); | ||
688 | } | ||
650 | pxa_set_i2c_info(NULL); | 689 | pxa_set_i2c_info(NULL); |
651 | pxa_set_mci_info(&magician_mci_info); | 690 | pxa_set_mci_info(&magician_mci_info); |
652 | pxa_set_ohci_info(&magician_ohci_info); | 691 | pxa_set_ohci_info(&magician_ohci_info); |
653 | pxa_set_ficp_info(&magician_ficp_info); | ||
654 | 692 | ||
655 | /* Check LCD type we have */ | 693 | /* Check LCD type we have */ |
656 | cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000); | 694 | cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000); |
657 | if (cpld) { | 695 | if (cpld) { |
658 | u8 board_id = __raw_readb(cpld+0x14); | 696 | u8 board_id = __raw_readb(cpld+0x14); |
697 | iounmap(cpld); | ||
659 | system_rev = board_id & 0x7; | 698 | system_rev = board_id & 0x7; |
660 | lcd_select = board_id & 0x8; | 699 | lcd_select = board_id & 0x8; |
661 | iounmap(cpld); | ||
662 | pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly"); | 700 | pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly"); |
663 | if (lcd_select && (system_rev < 3)) | 701 | if (lcd_select && (system_rev < 3)) { |
664 | pxa_gpio_mode(GPIO75_MAGICIAN_SAMSUNG_POWER_MD); | 702 | gpio_request(GPIO75_MAGICIAN_SAMSUNG_POWER, "SAMSUNG_POWER"); |
665 | pxa_gpio_mode(GPIO104_MAGICIAN_LCD_POWER_1_MD); | 703 | gpio_direction_output(GPIO75_MAGICIAN_SAMSUNG_POWER, 0); |
666 | pxa_gpio_mode(GPIO105_MAGICIAN_LCD_POWER_2_MD); | 704 | } |
667 | pxa_gpio_mode(GPIO106_MAGICIAN_LCD_POWER_3_MD); | 705 | gpio_request(GPIO104_MAGICIAN_LCD_POWER_1, "LCD_POWER_1"); |
706 | gpio_request(GPIO105_MAGICIAN_LCD_POWER_2, "LCD_POWER_2"); | ||
707 | gpio_request(GPIO106_MAGICIAN_LCD_POWER_3, "LCD_POWER_3"); | ||
708 | gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0); | ||
709 | gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0); | ||
710 | gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0); | ||
668 | set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info); | 711 | set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info); |
669 | } else | 712 | } else |
670 | pr_err("LCD detection: CPLD mapping failed\n"); | 713 | pr_err("LCD detection: CPLD mapping failed\n"); |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 18d47cfa2a18..7399fb34da4e 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -434,8 +434,7 @@ static struct pxafb_mode_info toshiba_ltm035a776c_mode = { | |||
434 | 434 | ||
435 | static struct pxafb_mach_info mainstone_pxafb_info = { | 435 | static struct pxafb_mach_info mainstone_pxafb_info = { |
436 | .num_modes = 1, | 436 | .num_modes = 1, |
437 | .lccr0 = LCCR0_Act, | 437 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
438 | .lccr3 = LCCR3_PCP, | ||
439 | }; | 438 | }; |
440 | 439 | ||
441 | static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_int, void *data) | 440 | static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_int, void *data) |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index e6be9d0aeccf..49d951db0f3d 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -320,16 +320,13 @@ static struct soc_camera_link iclink[] = { | |||
320 | static struct i2c_board_info __initdata pcm990_i2c_devices[] = { | 320 | static struct i2c_board_info __initdata pcm990_i2c_devices[] = { |
321 | { | 321 | { |
322 | /* Must initialize before the camera(s) */ | 322 | /* Must initialize before the camera(s) */ |
323 | I2C_BOARD_INFO("pca953x", 0x41), | 323 | I2C_BOARD_INFO("pca9536", 0x41), |
324 | .type = "pca9536", | ||
325 | .platform_data = &pca9536_data, | 324 | .platform_data = &pca9536_data, |
326 | }, { | 325 | }, { |
327 | I2C_BOARD_INFO("mt9v022", 0x48), | 326 | I2C_BOARD_INFO("mt9v022", 0x48), |
328 | .type = "mt9v022", | ||
329 | .platform_data = &iclink[0], /* With extender */ | 327 | .platform_data = &iclink[0], /* With extender */ |
330 | }, { | 328 | }, { |
331 | I2C_BOARD_INFO("mt9m001", 0x5d), | 329 | I2C_BOARD_INFO("mt9m001", 0x5d), |
332 | .type = "mt9m001", | ||
333 | .platform_data = &iclink[0], /* With extender */ | 330 | .platform_data = &iclink[0], /* With extender */ |
334 | }, | 331 | }, |
335 | }; | 332 | }; |
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 039194cbe477..ec1bbf333a3a 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
@@ -46,8 +46,8 @@ int pxa_pm_enter(suspend_state_t state) | |||
46 | sleep_save_checksum += sleep_save[i]; | 46 | sleep_save_checksum += sleep_save[i]; |
47 | } | 47 | } |
48 | 48 | ||
49 | /* Clear sleep reset status */ | 49 | /* Clear reset status */ |
50 | RCSR = RCSR_SMR; | 50 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; |
51 | 51 | ||
52 | /* *** go zzz *** */ | 52 | /* *** go zzz *** */ |
53 | pxa_cpu_pm_fns->enter(state); | 53 | pxa_cpu_pm_fns->enter(state); |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index dde355e88fa1..b6a6f5fcc77a 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -486,6 +486,8 @@ static int pxa3xx_set_wake(unsigned int irq, unsigned int on) | |||
486 | case IRQ_MMC3: | 486 | case IRQ_MMC3: |
487 | mask = ADXER_MFP_GEN12; | 487 | mask = ADXER_MFP_GEN12; |
488 | break; | 488 | break; |
489 | default: | ||
490 | return -EINVAL; | ||
489 | } | 491 | } |
490 | 492 | ||
491 | local_irq_save(flags); | 493 | local_irq_save(flags); |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index dbb546216be1..4a0028087ea6 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -97,8 +97,7 @@ static struct pxafb_mode_info toshiba_ltm04c380k_mode = { | |||
97 | 97 | ||
98 | static struct pxafb_mach_info zylonite_toshiba_lcd_info = { | 98 | static struct pxafb_mach_info zylonite_toshiba_lcd_info = { |
99 | .num_modes = 1, | 99 | .num_modes = 1, |
100 | .lccr0 = LCCR0_Act, | 100 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
101 | .lccr3 = LCCR3_PCP, | ||
102 | .pxafb_backlight_power = zylonite_backlight_power, | 101 | .pxafb_backlight_power = zylonite_backlight_power, |
103 | }; | 102 | }; |
104 | 103 | ||
@@ -134,8 +133,7 @@ static struct pxafb_mode_info sharp_ls037_modes[] = { | |||
134 | static struct pxafb_mach_info zylonite_sharp_lcd_info = { | 133 | static struct pxafb_mach_info zylonite_sharp_lcd_info = { |
135 | .modes = sharp_ls037_modes, | 134 | .modes = sharp_ls037_modes, |
136 | .num_modes = 2, | 135 | .num_modes = 2, |
137 | .lccr0 = LCCR0_Act, | 136 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
138 | .lccr3 = LCCR3_PCP | LCCR3_HSP | LCCR3_VSP, | ||
139 | .pxafb_backlight_power = zylonite_backlight_power, | 137 | .pxafb_backlight_power = zylonite_backlight_power, |
140 | }; | 138 | }; |
141 | 139 | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 1b8229d9c9d5..33ed048502a3 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -372,7 +372,7 @@ config CPU_FEROCEON | |||
372 | select CPU_PABRT_NOIFAR | 372 | select CPU_PABRT_NOIFAR |
373 | select CPU_CACHE_VIVT | 373 | select CPU_CACHE_VIVT |
374 | select CPU_CP15_MMU | 374 | select CPU_CP15_MMU |
375 | select CPU_COPY_V4WB if MMU | 375 | select CPU_COPY_FEROCEON if MMU |
376 | select CPU_TLB_V4WBI if MMU | 376 | select CPU_TLB_V4WBI if MMU |
377 | 377 | ||
378 | config CPU_FEROCEON_OLD_ID | 378 | config CPU_FEROCEON_OLD_ID |
@@ -523,6 +523,9 @@ config CPU_COPY_V4WT | |||
523 | config CPU_COPY_V4WB | 523 | config CPU_COPY_V4WB |
524 | bool | 524 | bool |
525 | 525 | ||
526 | config CPU_COPY_FEROCEON | ||
527 | bool | ||
528 | |||
526 | config CPU_COPY_V6 | 529 | config CPU_COPY_V6 |
527 | bool | 530 | bool |
528 | 531 | ||
@@ -658,7 +661,7 @@ config CPU_DCACHE_SIZE | |||
658 | 661 | ||
659 | config CPU_DCACHE_WRITETHROUGH | 662 | config CPU_DCACHE_WRITETHROUGH |
660 | bool "Force write through D-cache" | 663 | bool "Force write through D-cache" |
661 | depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_FEROCEON) && !CPU_DCACHE_DISABLE | 664 | depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020) && !CPU_DCACHE_DISABLE |
662 | default y if CPU_ARM925T | 665 | default y if CPU_ARM925T |
663 | help | 666 | help |
664 | Say Y here to use the data cache in writethrough mode. Unless you | 667 | Say Y here to use the data cache in writethrough mode. Unless you |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index 44536a0b995a..32b2d2d213a6 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
@@ -36,6 +36,7 @@ obj-$(CONFIG_CPU_CACHE_V7) += cache-v7.o | |||
36 | obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o | 36 | obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o |
37 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o | 37 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o |
38 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o | 38 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o |
39 | obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o | ||
39 | obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o context.o | 40 | obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o context.o |
40 | obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o | 41 | obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o |
41 | obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o | 42 | obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o |
diff --git a/arch/arm/mm/copypage-feroceon.S b/arch/arm/mm/copypage-feroceon.S new file mode 100644 index 000000000000..7eb0d320d240 --- /dev/null +++ b/arch/arm/mm/copypage-feroceon.S | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage-feroceon.S | ||
3 | * | ||
4 | * Copyright (C) 2008 Marvell Semiconductors | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This handles copy_user_page and clear_user_page on Feroceon | ||
11 | * more optimally than the generic implementations. | ||
12 | */ | ||
13 | #include <linux/linkage.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <asm/asm-offsets.h> | ||
16 | |||
17 | .text | ||
18 | .align 5 | ||
19 | |||
20 | ENTRY(feroceon_copy_user_page) | ||
21 | stmfd sp!, {r4-r9, lr} | ||
22 | mov ip, #PAGE_SZ | ||
23 | 1: mov lr, r1 | ||
24 | ldmia r1!, {r2 - r9} | ||
25 | pld [lr, #32] | ||
26 | pld [lr, #64] | ||
27 | pld [lr, #96] | ||
28 | pld [lr, #128] | ||
29 | pld [lr, #160] | ||
30 | pld [lr, #192] | ||
31 | pld [lr, #224] | ||
32 | stmia r0, {r2 - r9} | ||
33 | ldmia r1!, {r2 - r9} | ||
34 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
35 | add r0, r0, #32 | ||
36 | stmia r0, {r2 - r9} | ||
37 | ldmia r1!, {r2 - r9} | ||
38 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
39 | add r0, r0, #32 | ||
40 | stmia r0, {r2 - r9} | ||
41 | ldmia r1!, {r2 - r9} | ||
42 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
43 | add r0, r0, #32 | ||
44 | stmia r0, {r2 - r9} | ||
45 | ldmia r1!, {r2 - r9} | ||
46 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
47 | add r0, r0, #32 | ||
48 | stmia r0, {r2 - r9} | ||
49 | ldmia r1!, {r2 - r9} | ||
50 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
51 | add r0, r0, #32 | ||
52 | stmia r0, {r2 - r9} | ||
53 | ldmia r1!, {r2 - r9} | ||
54 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
55 | add r0, r0, #32 | ||
56 | stmia r0, {r2 - r9} | ||
57 | ldmia r1!, {r2 - r9} | ||
58 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
59 | add r0, r0, #32 | ||
60 | stmia r0, {r2 - r9} | ||
61 | subs ip, ip, #(32 * 8) | ||
62 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
63 | add r0, r0, #32 | ||
64 | bne 1b | ||
65 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | ||
66 | ldmfd sp!, {r4-r9, pc} | ||
67 | |||
68 | .align 5 | ||
69 | |||
70 | ENTRY(feroceon_clear_user_page) | ||
71 | stmfd sp!, {r4-r7, lr} | ||
72 | mov r1, #PAGE_SZ/32 | ||
73 | mov r2, #0 | ||
74 | mov r3, #0 | ||
75 | mov r4, #0 | ||
76 | mov r5, #0 | ||
77 | mov r6, #0 | ||
78 | mov r7, #0 | ||
79 | mov ip, #0 | ||
80 | mov lr, #0 | ||
81 | 1: stmia r0, {r2-r7, ip, lr} | ||
82 | subs r1, r1, #1 | ||
83 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
84 | add r0, r0, #32 | ||
85 | bne 1b | ||
86 | mcr p15, 0, r1, c7, c10, 4 @ drain WB | ||
87 | ldmfd sp!, {r4-r7, pc} | ||
88 | |||
89 | __INITDATA | ||
90 | |||
91 | .type feroceon_user_fns, #object | ||
92 | ENTRY(feroceon_user_fns) | ||
93 | .long feroceon_clear_user_page | ||
94 | .long feroceon_copy_user_page | ||
95 | .size feroceon_user_fns, . - feroceon_user_fns | ||
diff --git a/arch/arm/mm/iomap.c b/arch/arm/mm/iomap.c index 62066f3020c8..7429f8c01015 100644 --- a/arch/arm/mm/iomap.c +++ b/arch/arm/mm/iomap.c | |||
@@ -26,8 +26,8 @@ EXPORT_SYMBOL(ioport_unmap); | |||
26 | #ifdef CONFIG_PCI | 26 | #ifdef CONFIG_PCI |
27 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 27 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
28 | { | 28 | { |
29 | unsigned long start = pci_resource_start(dev, bar); | 29 | resource_size_t start = pci_resource_start(dev, bar); |
30 | unsigned long len = pci_resource_len(dev, bar); | 30 | resource_size_t len = pci_resource_len(dev, bar); |
31 | unsigned long flags = pci_resource_flags(dev, bar); | 31 | unsigned long flags = pci_resource_flags(dev, bar); |
32 | 32 | ||
33 | if (!len || !start) | 33 | if (!len || !start) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index d41a75ed3dce..2d6d682c206a 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -35,6 +35,7 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
35 | * zero-initialized data and COW. | 35 | * zero-initialized data and COW. |
36 | */ | 36 | */ |
37 | struct page *empty_zero_page; | 37 | struct page *empty_zero_page; |
38 | EXPORT_SYMBOL(empty_zero_page); | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * The pmd table for the upper-most set of pages. | 41 | * The pmd table for the upper-most set of pages. |
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index 90e7594e29b1..a02c1712b52d 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -93,7 +93,7 @@ ENTRY(cpu_feroceon_reset) | |||
93 | * | 93 | * |
94 | * Called with IRQs disabled | 94 | * Called with IRQs disabled |
95 | */ | 95 | */ |
96 | .align 10 | 96 | .align 5 |
97 | ENTRY(cpu_feroceon_do_idle) | 97 | ENTRY(cpu_feroceon_do_idle) |
98 | mov r0, #0 | 98 | mov r0, #0 |
99 | mcr p15, 0, r0, c7, c10, 4 @ Drain write buffer | 99 | mcr p15, 0, r0, c7, c10, 4 @ Drain write buffer |
@@ -106,6 +106,7 @@ ENTRY(cpu_feroceon_do_idle) | |||
106 | * Clean and invalidate all cache entries in a particular | 106 | * Clean and invalidate all cache entries in a particular |
107 | * address space. | 107 | * address space. |
108 | */ | 108 | */ |
109 | .align 5 | ||
109 | ENTRY(feroceon_flush_user_cache_all) | 110 | ENTRY(feroceon_flush_user_cache_all) |
110 | /* FALLTHROUGH */ | 111 | /* FALLTHROUGH */ |
111 | 112 | ||
@@ -118,12 +119,8 @@ ENTRY(feroceon_flush_kern_cache_all) | |||
118 | mov r2, #VM_EXEC | 119 | mov r2, #VM_EXEC |
119 | mov ip, #0 | 120 | mov ip, #0 |
120 | __flush_whole_cache: | 121 | __flush_whole_cache: |
121 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
122 | mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache | ||
123 | #else | ||
124 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate | 122 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate |
125 | bne 1b | 123 | bne 1b |
126 | #endif | ||
127 | tst r2, #VM_EXEC | 124 | tst r2, #VM_EXEC |
128 | mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache | 125 | mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache |
129 | mcrne p15, 0, ip, c7, c10, 4 @ drain WB | 126 | mcrne p15, 0, ip, c7, c10, 4 @ drain WB |
@@ -139,27 +136,19 @@ __flush_whole_cache: | |||
139 | * - end - end address (exclusive) | 136 | * - end - end address (exclusive) |
140 | * - flags - vm_flags describing address space | 137 | * - flags - vm_flags describing address space |
141 | */ | 138 | */ |
139 | .align 5 | ||
142 | ENTRY(feroceon_flush_user_cache_range) | 140 | ENTRY(feroceon_flush_user_cache_range) |
143 | mov ip, #0 | 141 | mov ip, #0 |
144 | sub r3, r1, r0 @ calculate total size | 142 | sub r3, r1, r0 @ calculate total size |
145 | cmp r3, #CACHE_DLIMIT | 143 | cmp r3, #CACHE_DLIMIT |
146 | bgt __flush_whole_cache | 144 | bgt __flush_whole_cache |
147 | 1: tst r2, #VM_EXEC | 145 | 1: tst r2, #VM_EXEC |
148 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
149 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry | ||
150 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | ||
151 | add r0, r0, #CACHE_DLINESIZE | ||
152 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry | ||
153 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | ||
154 | add r0, r0, #CACHE_DLINESIZE | ||
155 | #else | ||
156 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry | 146 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry |
157 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | 147 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry |
158 | add r0, r0, #CACHE_DLINESIZE | 148 | add r0, r0, #CACHE_DLINESIZE |
159 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry | 149 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry |
160 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | 150 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry |
161 | add r0, r0, #CACHE_DLINESIZE | 151 | add r0, r0, #CACHE_DLINESIZE |
162 | #endif | ||
163 | cmp r0, r1 | 152 | cmp r0, r1 |
164 | blo 1b | 153 | blo 1b |
165 | tst r2, #VM_EXEC | 154 | tst r2, #VM_EXEC |
@@ -176,6 +165,7 @@ ENTRY(feroceon_flush_user_cache_range) | |||
176 | * - start - virtual start address | 165 | * - start - virtual start address |
177 | * - end - virtual end address | 166 | * - end - virtual end address |
178 | */ | 167 | */ |
168 | .align 5 | ||
179 | ENTRY(feroceon_coherent_kern_range) | 169 | ENTRY(feroceon_coherent_kern_range) |
180 | /* FALLTHROUGH */ | 170 | /* FALLTHROUGH */ |
181 | 171 | ||
@@ -207,6 +197,7 @@ ENTRY(feroceon_coherent_user_range) | |||
207 | * | 197 | * |
208 | * - addr - page aligned address | 198 | * - addr - page aligned address |
209 | */ | 199 | */ |
200 | .align 5 | ||
210 | ENTRY(feroceon_flush_kern_dcache_page) | 201 | ENTRY(feroceon_flush_kern_dcache_page) |
211 | add r1, r0, #PAGE_SZ | 202 | add r1, r0, #PAGE_SZ |
212 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry | 203 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry |
@@ -231,13 +222,12 @@ ENTRY(feroceon_flush_kern_dcache_page) | |||
231 | * | 222 | * |
232 | * (same as v4wb) | 223 | * (same as v4wb) |
233 | */ | 224 | */ |
225 | .align 5 | ||
234 | ENTRY(feroceon_dma_inv_range) | 226 | ENTRY(feroceon_dma_inv_range) |
235 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
236 | tst r0, #CACHE_DLINESIZE - 1 | 227 | tst r0, #CACHE_DLINESIZE - 1 |
237 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 228 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
238 | tst r1, #CACHE_DLINESIZE - 1 | 229 | tst r1, #CACHE_DLINESIZE - 1 |
239 | mcrne p15, 0, r1, c7, c10, 1 @ clean D entry | 230 | mcrne p15, 0, r1, c7, c10, 1 @ clean D entry |
240 | #endif | ||
241 | bic r0, r0, #CACHE_DLINESIZE - 1 | 231 | bic r0, r0, #CACHE_DLINESIZE - 1 |
242 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry | 232 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry |
243 | add r0, r0, #CACHE_DLINESIZE | 233 | add r0, r0, #CACHE_DLINESIZE |
@@ -256,14 +246,13 @@ ENTRY(feroceon_dma_inv_range) | |||
256 | * | 246 | * |
257 | * (same as v4wb) | 247 | * (same as v4wb) |
258 | */ | 248 | */ |
249 | .align 5 | ||
259 | ENTRY(feroceon_dma_clean_range) | 250 | ENTRY(feroceon_dma_clean_range) |
260 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
261 | bic r0, r0, #CACHE_DLINESIZE - 1 | 251 | bic r0, r0, #CACHE_DLINESIZE - 1 |
262 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 252 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
263 | add r0, r0, #CACHE_DLINESIZE | 253 | add r0, r0, #CACHE_DLINESIZE |
264 | cmp r0, r1 | 254 | cmp r0, r1 |
265 | blo 1b | 255 | blo 1b |
266 | #endif | ||
267 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 256 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
268 | mov pc, lr | 257 | mov pc, lr |
269 | 258 | ||
@@ -275,14 +264,10 @@ ENTRY(feroceon_dma_clean_range) | |||
275 | * - start - virtual start address | 264 | * - start - virtual start address |
276 | * - end - virtual end address | 265 | * - end - virtual end address |
277 | */ | 266 | */ |
267 | .align 5 | ||
278 | ENTRY(feroceon_dma_flush_range) | 268 | ENTRY(feroceon_dma_flush_range) |
279 | bic r0, r0, #CACHE_DLINESIZE - 1 | 269 | bic r0, r0, #CACHE_DLINESIZE - 1 |
280 | 1: | 270 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry |
281 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
282 | mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry | ||
283 | #else | ||
284 | mcr p15, 0, r0, c7, c10, 1 @ clean D entry | ||
285 | #endif | ||
286 | add r0, r0, #CACHE_DLINESIZE | 271 | add r0, r0, #CACHE_DLINESIZE |
287 | cmp r0, r1 | 272 | cmp r0, r1 |
288 | blo 1b | 273 | blo 1b |
@@ -300,13 +285,12 @@ ENTRY(feroceon_cache_fns) | |||
300 | .long feroceon_dma_clean_range | 285 | .long feroceon_dma_clean_range |
301 | .long feroceon_dma_flush_range | 286 | .long feroceon_dma_flush_range |
302 | 287 | ||
288 | .align 5 | ||
303 | ENTRY(cpu_feroceon_dcache_clean_area) | 289 | ENTRY(cpu_feroceon_dcache_clean_area) |
304 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
305 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 290 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
306 | add r0, r0, #CACHE_DLINESIZE | 291 | add r0, r0, #CACHE_DLINESIZE |
307 | subs r1, r1, #CACHE_DLINESIZE | 292 | subs r1, r1, #CACHE_DLINESIZE |
308 | bhi 1b | 293 | bhi 1b |
309 | #endif | ||
310 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 294 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
311 | mov pc, lr | 295 | mov pc, lr |
312 | 296 | ||
@@ -323,13 +307,9 @@ ENTRY(cpu_feroceon_dcache_clean_area) | |||
323 | ENTRY(cpu_feroceon_switch_mm) | 307 | ENTRY(cpu_feroceon_switch_mm) |
324 | #ifdef CONFIG_MMU | 308 | #ifdef CONFIG_MMU |
325 | mov ip, #0 | 309 | mov ip, #0 |
326 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
327 | mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache | ||
328 | #else | ||
329 | @ && 'Clean & Invalidate whole DCache' | 310 | @ && 'Clean & Invalidate whole DCache' |
330 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate | 311 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate |
331 | bne 1b | 312 | bne 1b |
332 | #endif | ||
333 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 313 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache |
334 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 314 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
335 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer | 315 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer |
@@ -362,16 +342,9 @@ ENTRY(cpu_feroceon_set_pte_ext) | |||
362 | tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? | 342 | tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? |
363 | movne r2, #0 | 343 | movne r2, #0 |
364 | 344 | ||
365 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
366 | eor r3, r2, #0x0a @ C & small page? | ||
367 | tst r3, #0x0b | ||
368 | biceq r2, r2, #4 | ||
369 | #endif | ||
370 | str r2, [r0] @ hardware version | 345 | str r2, [r0] @ hardware version |
371 | mov r0, r0 | 346 | mov r0, r0 |
372 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
373 | mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 347 | mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
374 | #endif | ||
375 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 348 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
376 | #endif | 349 | #endif |
377 | mov pc, lr | 350 | mov pc, lr |
@@ -387,20 +360,11 @@ __feroceon_setup: | |||
387 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 360 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
388 | #endif | 361 | #endif |
389 | 362 | ||
390 | |||
391 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
392 | mov r0, #4 @ disable write-back on caches explicitly | ||
393 | mcr p15, 7, r0, c15, c0, 0 | ||
394 | #endif | ||
395 | |||
396 | adr r5, feroceon_crval | 363 | adr r5, feroceon_crval |
397 | ldmia r5, {r5, r6} | 364 | ldmia r5, {r5, r6} |
398 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 365 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
399 | bic r0, r0, r5 | 366 | bic r0, r0, r5 |
400 | orr r0, r0, r6 | 367 | orr r0, r0, r6 |
401 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | ||
402 | orr r0, r0, #0x4000 @ .1.. .... .... .... | ||
403 | #endif | ||
404 | mov pc, lr | 368 | mov pc, lr |
405 | .size __feroceon_setup, . - __feroceon_setup | 369 | .size __feroceon_setup, . - __feroceon_setup |
406 | 370 | ||
@@ -476,7 +440,7 @@ __feroceon_old_id_proc_info: | |||
476 | .long cpu_feroceon_name | 440 | .long cpu_feroceon_name |
477 | .long feroceon_processor_functions | 441 | .long feroceon_processor_functions |
478 | .long v4wbi_tlb_fns | 442 | .long v4wbi_tlb_fns |
479 | .long v4wb_user_fns | 443 | .long feroceon_user_fns |
480 | .long feroceon_cache_fns | 444 | .long feroceon_cache_fns |
481 | .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info | 445 | .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info |
482 | #endif | 446 | #endif |
@@ -502,6 +466,6 @@ __feroceon_proc_info: | |||
502 | .long cpu_feroceon_name | 466 | .long cpu_feroceon_name |
503 | .long feroceon_processor_functions | 467 | .long feroceon_processor_functions |
504 | .long v4wbi_tlb_fns | 468 | .long v4wbi_tlb_fns |
505 | .long v4wb_user_fns | 469 | .long feroceon_user_fns |
506 | .long feroceon_cache_fns | 470 | .long feroceon_cache_fns |
507 | .size __feroceon_proc_info, . - __feroceon_proc_info | 471 | .size __feroceon_proc_info, . - __feroceon_proc_info |
diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c index 75bae067922d..74fae6045650 100644 --- a/arch/arm/oprofile/op_model_mpcore.c +++ b/arch/arm/oprofile/op_model_mpcore.c | |||
@@ -51,7 +51,7 @@ | |||
51 | /* | 51 | /* |
52 | * MPCore SCU event monitor support | 52 | * MPCore SCU event monitor support |
53 | */ | 53 | */ |
54 | #define SCU_EVENTMONITORS_VA_BASE __io_address(REALVIEW_MPCORE_SCU_BASE + 0x10) | 54 | #define SCU_EVENTMONITORS_VA_BASE __io_address(REALVIEW_EB11MP_SCU_BASE + 0x10) |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * Bitmask of used SCU counters | 57 | * Bitmask of used SCU counters |
@@ -80,7 +80,7 @@ static irqreturn_t scu_em_interrupt(int irq, void *arg) | |||
80 | struct eventmonitor __iomem *emc = SCU_EVENTMONITORS_VA_BASE; | 80 | struct eventmonitor __iomem *emc = SCU_EVENTMONITORS_VA_BASE; |
81 | unsigned int cnt; | 81 | unsigned int cnt; |
82 | 82 | ||
83 | cnt = irq - IRQ_PMU_SCU0; | 83 | cnt = irq - IRQ_EB11MP_PMU_SCU0; |
84 | oprofile_add_sample(get_irq_regs(), SCU_COUNTER(cnt)); | 84 | oprofile_add_sample(get_irq_regs(), SCU_COUNTER(cnt)); |
85 | scu_reset_counter(emc, cnt); | 85 | scu_reset_counter(emc, cnt); |
86 | 86 | ||
@@ -119,10 +119,10 @@ static int scu_start(void) | |||
119 | */ | 119 | */ |
120 | for (i = 0; i < NUM_SCU_COUNTERS; i++) { | 120 | for (i = 0; i < NUM_SCU_COUNTERS; i++) { |
121 | if (scu_em_used & (1 << i)) { | 121 | if (scu_em_used & (1 << i)) { |
122 | ret = request_irq(IRQ_PMU_SCU0 + i, scu_em_interrupt, IRQF_DISABLED, "SCU PMU", NULL); | 122 | ret = request_irq(IRQ_EB11MP_PMU_SCU0 + i, scu_em_interrupt, IRQF_DISABLED, "SCU PMU", NULL); |
123 | if (ret) { | 123 | if (ret) { |
124 | printk(KERN_ERR "oprofile: unable to request IRQ%u for SCU Event Monitor\n", | 124 | printk(KERN_ERR "oprofile: unable to request IRQ%u for SCU Event Monitor\n", |
125 | IRQ_PMU_SCU0 + i); | 125 | IRQ_EB11MP_PMU_SCU0 + i); |
126 | goto err_free_scu; | 126 | goto err_free_scu; |
127 | } | 127 | } |
128 | } | 128 | } |
@@ -153,7 +153,7 @@ static int scu_start(void) | |||
153 | 153 | ||
154 | err_free_scu: | 154 | err_free_scu: |
155 | while (i--) | 155 | while (i--) |
156 | free_irq(IRQ_PMU_SCU0 + i, NULL); | 156 | free_irq(IRQ_EB11MP_PMU_SCU0 + i, NULL); |
157 | return ret; | 157 | return ret; |
158 | } | 158 | } |
159 | 159 | ||
@@ -175,7 +175,7 @@ static void scu_stop(void) | |||
175 | for (i = 0; i < NUM_SCU_COUNTERS; i++) { | 175 | for (i = 0; i < NUM_SCU_COUNTERS; i++) { |
176 | if (scu_em_used & (1 << i)) { | 176 | if (scu_em_used & (1 << i)) { |
177 | scu_reset_counter(emc, i); | 177 | scu_reset_counter(emc, i); |
178 | free_irq(IRQ_PMU_SCU0 + i, NULL); | 178 | free_irq(IRQ_EB11MP_PMU_SCU0 + i, NULL); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | } | 181 | } |
@@ -225,10 +225,10 @@ static int em_setup_ctrs(void) | |||
225 | } | 225 | } |
226 | 226 | ||
227 | static int arm11_irqs[] = { | 227 | static int arm11_irqs[] = { |
228 | [0] = IRQ_PMU_CPU0, | 228 | [0] = IRQ_EB11MP_PMU_CPU0, |
229 | [1] = IRQ_PMU_CPU1, | 229 | [1] = IRQ_EB11MP_PMU_CPU1, |
230 | [2] = IRQ_PMU_CPU2, | 230 | [2] = IRQ_EB11MP_PMU_CPU2, |
231 | [3] = IRQ_PMU_CPU3 | 231 | [3] = IRQ_EB11MP_PMU_CPU3 |
232 | }; | 232 | }; |
233 | 233 | ||
234 | static int em_start(void) | 234 | static int em_start(void) |
@@ -273,22 +273,22 @@ static int em_setup(void) | |||
273 | /* | 273 | /* |
274 | * Send SCU PMU interrupts to the "owner" CPU. | 274 | * Send SCU PMU interrupts to the "owner" CPU. |
275 | */ | 275 | */ |
276 | em_route_irq(IRQ_PMU_SCU0, 0); | 276 | em_route_irq(IRQ_EB11MP_PMU_SCU0, 0); |
277 | em_route_irq(IRQ_PMU_SCU1, 0); | 277 | em_route_irq(IRQ_EB11MP_PMU_SCU1, 0); |
278 | em_route_irq(IRQ_PMU_SCU2, 1); | 278 | em_route_irq(IRQ_EB11MP_PMU_SCU2, 1); |
279 | em_route_irq(IRQ_PMU_SCU3, 1); | 279 | em_route_irq(IRQ_EB11MP_PMU_SCU3, 1); |
280 | em_route_irq(IRQ_PMU_SCU4, 2); | 280 | em_route_irq(IRQ_EB11MP_PMU_SCU4, 2); |
281 | em_route_irq(IRQ_PMU_SCU5, 2); | 281 | em_route_irq(IRQ_EB11MP_PMU_SCU5, 2); |
282 | em_route_irq(IRQ_PMU_SCU6, 3); | 282 | em_route_irq(IRQ_EB11MP_PMU_SCU6, 3); |
283 | em_route_irq(IRQ_PMU_SCU7, 3); | 283 | em_route_irq(IRQ_EB11MP_PMU_SCU7, 3); |
284 | 284 | ||
285 | /* | 285 | /* |
286 | * Send CP15 PMU interrupts to the owner CPU. | 286 | * Send CP15 PMU interrupts to the owner CPU. |
287 | */ | 287 | */ |
288 | em_route_irq(IRQ_PMU_CPU0, 0); | 288 | em_route_irq(IRQ_EB11MP_PMU_CPU0, 0); |
289 | em_route_irq(IRQ_PMU_CPU1, 1); | 289 | em_route_irq(IRQ_EB11MP_PMU_CPU1, 1); |
290 | em_route_irq(IRQ_PMU_CPU2, 2); | 290 | em_route_irq(IRQ_EB11MP_PMU_CPU2, 2); |
291 | em_route_irq(IRQ_PMU_CPU3, 3); | 291 | em_route_irq(IRQ_EB11MP_PMU_CPU3, 3); |
292 | 292 | ||
293 | return 0; | 293 | return 0; |
294 | } | 294 | } |
diff --git a/arch/avr32/kernel/asm-offsets.c b/arch/avr32/kernel/asm-offsets.c index 078cd33f467b..e4796c67a831 100644 --- a/arch/avr32/kernel/asm-offsets.c +++ b/arch/avr32/kernel/asm-offsets.c | |||
@@ -5,14 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/thread_info.h> | 7 | #include <linux/thread_info.h> |
8 | 8 | #include <linux/kbuild.h> | |
9 | #define DEFINE(sym, val) \ | ||
10 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
11 | |||
12 | #define BLANK() asm volatile("\n->" : : ) | ||
13 | |||
14 | #define OFFSET(sym, str, mem) \ | ||
15 | DEFINE(sym, offsetof(struct str, mem)); | ||
16 | 9 | ||
17 | void foo(void) | 10 | void foo(void) |
18 | { | 11 | { |
diff --git a/arch/avr32/mm/tlb.c b/arch/avr32/mm/tlb.c index b835257a8fa3..cd12edbea9f2 100644 --- a/arch/avr32/mm/tlb.c +++ b/arch/avr32/mm/tlb.c | |||
@@ -369,11 +369,7 @@ static const struct file_operations proc_tlb_operations = { | |||
369 | 369 | ||
370 | static int __init proctlb_init(void) | 370 | static int __init proctlb_init(void) |
371 | { | 371 | { |
372 | struct proc_dir_entry *entry; | 372 | proc_create("tlb", 0, NULL, &proc_tlb_operations); |
373 | |||
374 | entry = create_proc_entry("tlb", 0, NULL); | ||
375 | if (entry) | ||
376 | entry->proc_fops = &proc_tlb_operations; | ||
377 | return 0; | 373 | return 0; |
378 | } | 374 | } |
379 | late_initcall(proctlb_init); | 375 | late_initcall(proctlb_init); |
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c index b56b2741cdea..721f15f3cebf 100644 --- a/arch/blackfin/kernel/asm-offsets.c +++ b/arch/blackfin/kernel/asm-offsets.c | |||
@@ -34,8 +34,7 @@ | |||
34 | #include <linux/hardirq.h> | 34 | #include <linux/hardirq.h> |
35 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
36 | #include <linux/thread_info.h> | 36 | #include <linux/thread_info.h> |
37 | 37 | #include <linux/kbuild.h> | |
38 | #define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
39 | 38 | ||
40 | int main(void) | 39 | int main(void) |
41 | { | 40 | { |
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index d1fa24401dc6..cb9d883d493c 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c | |||
@@ -212,7 +212,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info, | |||
212 | 212 | ||
213 | /* Set up registers for signal handler */ | 213 | /* Set up registers for signal handler */ |
214 | wrusp((unsigned long)frame); | 214 | wrusp((unsigned long)frame); |
215 | if (get_personality & FDPIC_FUNCPTRS) { | 215 | if (current->personality & FDPIC_FUNCPTRS) { |
216 | struct fdpic_func_descriptor __user *funcptr = | 216 | struct fdpic_func_descriptor __user *funcptr = |
217 | (struct fdpic_func_descriptor *) ka->sa.sa_handler; | 217 | (struct fdpic_func_descriptor *) ka->sa.sa_handler; |
218 | __get_user(regs->pc, &funcptr->text); | 218 | __get_user(regs->pc, &funcptr->text); |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index fddce32901a2..024f418ae543 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -499,20 +499,17 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
499 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | 499 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) |
500 | { | 500 | { |
501 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), | 501 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), |
502 | .type = "ad7142_joystick", | ||
503 | .irq = 39, | 502 | .irq = 39, |
504 | }, | 503 | }, |
505 | #endif | 504 | #endif |
506 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 505 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) |
507 | { | 506 | { |
508 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 507 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
509 | .type = "pcf8574_lcd", | ||
510 | }, | 508 | }, |
511 | #endif | 509 | #endif |
512 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | 510 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) |
513 | { | 511 | { |
514 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | 512 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), |
515 | .type = "pcf8574_keypad", | ||
516 | .irq = 39, | 513 | .irq = 39, |
517 | }, | 514 | }, |
518 | #endif | 515 | #endif |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 0cec14b1ef5c..d3727b7c2d7d 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -751,20 +751,17 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
751 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | 751 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) |
752 | { | 752 | { |
753 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), | 753 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), |
754 | .type = "ad7142_joystick", | ||
755 | .irq = 55, | 754 | .irq = 55, |
756 | }, | 755 | }, |
757 | #endif | 756 | #endif |
758 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 757 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) |
759 | { | 758 | { |
760 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 759 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
761 | .type = "pcf8574_lcd", | ||
762 | }, | 760 | }, |
763 | #endif | 761 | #endif |
764 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | 762 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) |
765 | { | 763 | { |
766 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | 764 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), |
767 | .type = "pcf8574_keypad", | ||
768 | .irq = 72, | 765 | .irq = 72, |
769 | }, | 766 | }, |
770 | #endif | 767 | #endif |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 231dfbd3bc1f..b00f68ac6bc9 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -641,13 +641,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { | |||
641 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 641 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) |
642 | { | 642 | { |
643 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 643 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
644 | .type = "pcf8574_lcd", | ||
645 | }, | 644 | }, |
646 | #endif | 645 | #endif |
647 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | 646 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) |
648 | { | 647 | { |
649 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | 648 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), |
650 | .type = "pcf8574_keypad", | ||
651 | .irq = 212, | 649 | .irq = 212, |
652 | }, | 650 | }, |
653 | #endif | 651 | #endif |
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c index aad0a9e5991a..44f7b4f79476 100644 --- a/arch/cris/kernel/profile.c +++ b/arch/cris/kernel/profile.c | |||
@@ -75,9 +75,9 @@ __init init_cris_profile(void) | |||
75 | 75 | ||
76 | sample_buffer_pos = sample_buffer; | 76 | sample_buffer_pos = sample_buffer; |
77 | 77 | ||
78 | entry = create_proc_entry("system_profile", S_IWUSR | S_IRUGO, NULL); | 78 | entry = proc_create("system_profile", S_IWUSR | S_IRUGO, NULL, |
79 | &cris_proc_profile_operations); | ||
79 | if (entry) { | 80 | if (entry) { |
80 | entry->proc_fops = &cris_proc_profile_operations; | ||
81 | entry->size = SAMPLE_BUFFER_SIZE; | 81 | entry->size = SAMPLE_BUFFER_SIZE; |
82 | } | 82 | } |
83 | prof_running = 1; | 83 | prof_running = 1; |
diff --git a/arch/frv/kernel/asm-offsets.c b/arch/frv/kernel/asm-offsets.c index fbb19fc1af40..9de96843a278 100644 --- a/arch/frv/kernel/asm-offsets.c +++ b/arch/frv/kernel/asm-offsets.c | |||
@@ -7,15 +7,13 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/signal.h> | 8 | #include <linux/signal.h> |
9 | #include <linux/personality.h> | 9 | #include <linux/personality.h> |
10 | #include <linux/kbuild.h> | ||
10 | #include <asm/registers.h> | 11 | #include <asm/registers.h> |
11 | #include <asm/ucontext.h> | 12 | #include <asm/ucontext.h> |
12 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
13 | #include <asm/thread_info.h> | 14 | #include <asm/thread_info.h> |
14 | #include <asm/gdb-stub.h> | 15 | #include <asm/gdb-stub.h> |
15 | 16 | ||
16 | #define DEFINE(sym, val) \ | ||
17 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
18 | |||
19 | #define DEF_PTREG(sym, reg) \ | 17 | #define DEF_PTREG(sym, reg) \ |
20 | asm volatile("\n->" #sym " %0 offsetof(struct pt_regs, " #reg ")" \ | 18 | asm volatile("\n->" #sym " %0 offsetof(struct pt_regs, " #reg ")" \ |
21 | : : "i" (offsetof(struct pt_regs, reg))) | 19 | : : "i" (offsetof(struct pt_regs, reg))) |
@@ -32,11 +30,6 @@ | |||
32 | asm volatile("\n->" #sym " %0 offsetof(struct frv_frame0, " #reg ")" \ | 30 | asm volatile("\n->" #sym " %0 offsetof(struct frv_frame0, " #reg ")" \ |
33 | : : "i" (offsetof(struct frv_frame0, reg))) | 31 | : : "i" (offsetof(struct frv_frame0, reg))) |
34 | 32 | ||
35 | #define BLANK() asm volatile("\n->" : : ) | ||
36 | |||
37 | #define OFFSET(sym, str, mem) \ | ||
38 | DEFINE(sym, offsetof(struct str, mem)); | ||
39 | |||
40 | void foo(void) | 33 | void foo(void) |
41 | { | 34 | { |
42 | /* offsets into the thread_info structure */ | 35 | /* offsets into the thread_info structure */ |
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index c57ce3f1f2e2..73f3aeefd203 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -163,14 +163,11 @@ static int sysctl_pm_do_suspend(ctl_table *ctl, int write, struct file *filp, | |||
163 | if ((mode != 1) && (mode != 5)) | 163 | if ((mode != 1) && (mode != 5)) |
164 | return -EINVAL; | 164 | return -EINVAL; |
165 | 165 | ||
166 | retval = pm_send_all(PM_SUSPEND, (void *)3); | ||
167 | |||
168 | if (retval == 0) { | 166 | if (retval == 0) { |
169 | if (mode == 5) | 167 | if (mode == 5) |
170 | retval = pm_do_bus_sleep(); | 168 | retval = pm_do_bus_sleep(); |
171 | else | 169 | else |
172 | retval = pm_do_suspend(); | 170 | retval = pm_do_suspend(); |
173 | pm_send_all(PM_RESUME, (void *)0); | ||
174 | } | 171 | } |
175 | 172 | ||
176 | return retval; | 173 | return retval; |
@@ -183,9 +180,6 @@ static int try_set_cmode(int new_cmode) | |||
183 | if (!(clock_cmodes_permitted & (1<<new_cmode))) | 180 | if (!(clock_cmodes_permitted & (1<<new_cmode))) |
184 | return -EINVAL; | 181 | return -EINVAL; |
185 | 182 | ||
186 | /* tell all the drivers we're suspending */ | ||
187 | pm_send_all(PM_SUSPEND, (void *)3); | ||
188 | |||
189 | /* now change cmode */ | 183 | /* now change cmode */ |
190 | local_irq_disable(); | 184 | local_irq_disable(); |
191 | frv_dma_pause_all(); | 185 | frv_dma_pause_all(); |
@@ -201,8 +195,6 @@ static int try_set_cmode(int new_cmode) | |||
201 | frv_dma_resume_all(); | 195 | frv_dma_resume_all(); |
202 | local_irq_enable(); | 196 | local_irq_enable(); |
203 | 197 | ||
204 | /* tell all the drivers we're resuming */ | ||
205 | pm_send_all(PM_RESUME, (void *)0); | ||
206 | return 0; | 198 | return 0; |
207 | } | 199 | } |
208 | 200 | ||
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index d64bcaff54cd..3bdb368292a8 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -297,7 +297,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set) | |||
297 | __frame->lr = (unsigned long) &frame->retcode; | 297 | __frame->lr = (unsigned long) &frame->retcode; |
298 | __frame->gr8 = sig; | 298 | __frame->gr8 = sig; |
299 | 299 | ||
300 | if (get_personality & FDPIC_FUNCPTRS) { | 300 | if (current->personality & FDPIC_FUNCPTRS) { |
301 | struct fdpic_func_descriptor __user *funcptr = | 301 | struct fdpic_func_descriptor __user *funcptr = |
302 | (struct fdpic_func_descriptor __user *) ka->sa.sa_handler; | 302 | (struct fdpic_func_descriptor __user *) ka->sa.sa_handler; |
303 | __get_user(__frame->pc, &funcptr->text); | 303 | __get_user(__frame->pc, &funcptr->text); |
@@ -396,7 +396,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
396 | __frame->gr8 = sig; | 396 | __frame->gr8 = sig; |
397 | __frame->gr9 = (unsigned long) &frame->info; | 397 | __frame->gr9 = (unsigned long) &frame->info; |
398 | 398 | ||
399 | if (get_personality & FDPIC_FUNCPTRS) { | 399 | if (current->personality & FDPIC_FUNCPTRS) { |
400 | struct fdpic_func_descriptor __user *funcptr = | 400 | struct fdpic_func_descriptor __user *funcptr = |
401 | (struct fdpic_func_descriptor __user *) ka->sa.sa_handler; | 401 | (struct fdpic_func_descriptor __user *) ka->sa.sa_handler; |
402 | __get_user(__frame->pc, &funcptr->text); | 402 | __get_user(__frame->pc, &funcptr->text); |
diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c index a40df80b2ebd..1d2dfe67d442 100644 --- a/arch/frv/kernel/traps.c +++ b/arch/frv/kernel/traps.c | |||
@@ -362,11 +362,8 @@ asmlinkage void memory_access_exception(unsigned long esr0, | |||
362 | #ifdef CONFIG_MMU | 362 | #ifdef CONFIG_MMU |
363 | unsigned long fixup; | 363 | unsigned long fixup; |
364 | 364 | ||
365 | if ((esr0 & ESRx_EC) == ESRx_EC_DATA_ACCESS) | 365 | fixup = search_exception_table(__frame->pc); |
366 | if (handle_misalignment(esr0, ear0, epcr0) == 0) | 366 | if (fixup) { |
367 | return; | ||
368 | |||
369 | if ((fixup = search_exception_table(__frame->pc)) != 0) { | ||
370 | __frame->pc = fixup; | 367 | __frame->pc = fixup; |
371 | return; | 368 | return; |
372 | } | 369 | } |
diff --git a/arch/frv/mb93090-mb00/pci-iomap.c b/arch/frv/mb93090-mb00/pci-iomap.c index 068fa04bd527..35f6df28351e 100644 --- a/arch/frv/mb93090-mb00/pci-iomap.c +++ b/arch/frv/mb93090-mb00/pci-iomap.c | |||
@@ -13,8 +13,8 @@ | |||
13 | 13 | ||
14 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 14 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
15 | { | 15 | { |
16 | unsigned long start = pci_resource_start(dev, bar); | 16 | resource_size_t start = pci_resource_start(dev, bar); |
17 | unsigned long len = pci_resource_len(dev, bar); | 17 | resource_size_t len = pci_resource_len(dev, bar); |
18 | unsigned long flags = pci_resource_flags(dev, bar); | 18 | unsigned long flags = pci_resource_flags(dev, bar); |
19 | 19 | ||
20 | if (!len || !start) | 20 | if (!len || !start) |
diff --git a/arch/frv/mm/unaligned.c b/arch/frv/mm/unaligned.c deleted file mode 100644 index 8f0375fc15a8..000000000000 --- a/arch/frv/mm/unaligned.c +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
1 | /* unaligned.c: unalignment fixup handler for CPUs on which it is supported (FR451 only) | ||
2 | * | ||
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/sched.h> | ||
13 | #include <linux/signal.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/user.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/linkage.h> | ||
20 | #include <linux/init.h> | ||
21 | |||
22 | #include <asm/setup.h> | ||
23 | #include <asm/system.h> | ||
24 | #include <asm/uaccess.h> | ||
25 | |||
26 | #if 0 | ||
27 | #define kdebug(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ ) | ||
28 | #else | ||
29 | #define kdebug(fmt, ...) do {} while(0) | ||
30 | #endif | ||
31 | |||
32 | #define _MA_SIGNED 0x01 | ||
33 | #define _MA_HALF 0x02 | ||
34 | #define _MA_WORD 0x04 | ||
35 | #define _MA_DWORD 0x08 | ||
36 | #define _MA_SZ_MASK 0x0e | ||
37 | #define _MA_LOAD 0x10 | ||
38 | #define _MA_STORE 0x20 | ||
39 | #define _MA_UPDATE 0x40 | ||
40 | #define _MA_IMM 0x80 | ||
41 | |||
42 | #define _MA_LDxU _MA_LOAD | _MA_UPDATE | ||
43 | #define _MA_LDxI _MA_LOAD | _MA_IMM | ||
44 | #define _MA_STxU _MA_STORE | _MA_UPDATE | ||
45 | #define _MA_STxI _MA_STORE | _MA_IMM | ||
46 | |||
47 | static const uint8_t tbl_LDGRk_reg[0x40] = { | ||
48 | [0x02] = _MA_LOAD | _MA_HALF | _MA_SIGNED, /* LDSH @(GRi,GRj),GRk */ | ||
49 | [0x03] = _MA_LOAD | _MA_HALF, /* LDUH @(GRi,GRj),GRk */ | ||
50 | [0x04] = _MA_LOAD | _MA_WORD, /* LD @(GRi,GRj),GRk */ | ||
51 | [0x05] = _MA_LOAD | _MA_DWORD, /* LDD @(GRi,GRj),GRk */ | ||
52 | [0x12] = _MA_LDxU | _MA_HALF | _MA_SIGNED, /* LDSHU @(GRi,GRj),GRk */ | ||
53 | [0x13] = _MA_LDxU | _MA_HALF, /* LDUHU @(GRi,GRj),GRk */ | ||
54 | [0x14] = _MA_LDxU | _MA_WORD, /* LDU @(GRi,GRj),GRk */ | ||
55 | [0x15] = _MA_LDxU | _MA_DWORD, /* LDDU @(GRi,GRj),GRk */ | ||
56 | }; | ||
57 | |||
58 | static const uint8_t tbl_STGRk_reg[0x40] = { | ||
59 | [0x01] = _MA_STORE | _MA_HALF, /* STH @(GRi,GRj),GRk */ | ||
60 | [0x02] = _MA_STORE | _MA_WORD, /* ST @(GRi,GRj),GRk */ | ||
61 | [0x03] = _MA_STORE | _MA_DWORD, /* STD @(GRi,GRj),GRk */ | ||
62 | [0x11] = _MA_STxU | _MA_HALF, /* STHU @(GRi,GRj),GRk */ | ||
63 | [0x12] = _MA_STxU | _MA_WORD, /* STU @(GRi,GRj),GRk */ | ||
64 | [0x13] = _MA_STxU | _MA_DWORD, /* STDU @(GRi,GRj),GRk */ | ||
65 | }; | ||
66 | |||
67 | static const uint8_t tbl_LDSTGRk_imm[0x80] = { | ||
68 | [0x31] = _MA_LDxI | _MA_HALF | _MA_SIGNED, /* LDSHI @(GRi,d12),GRk */ | ||
69 | [0x32] = _MA_LDxI | _MA_WORD, /* LDI @(GRi,d12),GRk */ | ||
70 | [0x33] = _MA_LDxI | _MA_DWORD, /* LDDI @(GRi,d12),GRk */ | ||
71 | [0x36] = _MA_LDxI | _MA_HALF, /* LDUHI @(GRi,d12),GRk */ | ||
72 | [0x51] = _MA_STxI | _MA_HALF, /* STHI @(GRi,d12),GRk */ | ||
73 | [0x52] = _MA_STxI | _MA_WORD, /* STI @(GRi,d12),GRk */ | ||
74 | [0x53] = _MA_STxI | _MA_DWORD, /* STDI @(GRi,d12),GRk */ | ||
75 | }; | ||
76 | |||
77 | |||
78 | /*****************************************************************************/ | ||
79 | /* | ||
80 | * see if we can handle the exception by fixing up a misaligned memory access | ||
81 | */ | ||
82 | int handle_misalignment(unsigned long esr0, unsigned long ear0, unsigned long epcr0) | ||
83 | { | ||
84 | unsigned long insn, addr, *greg; | ||
85 | int GRi, GRj, GRk, D12, op; | ||
86 | |||
87 | union { | ||
88 | uint64_t _64; | ||
89 | uint32_t _32[2]; | ||
90 | uint16_t _16; | ||
91 | uint8_t _8[8]; | ||
92 | } x; | ||
93 | |||
94 | if (!(esr0 & ESR0_EAV) || !(epcr0 & EPCR0_V) || !(ear0 & 7)) | ||
95 | return -EAGAIN; | ||
96 | |||
97 | epcr0 &= EPCR0_PC; | ||
98 | |||
99 | if (__frame->pc != epcr0) { | ||
100 | kdebug("MISALIGN: Execution not halted on excepting instruction\n"); | ||
101 | BUG(); | ||
102 | } | ||
103 | |||
104 | if (__get_user(insn, (unsigned long *) epcr0) < 0) | ||
105 | return -EFAULT; | ||
106 | |||
107 | /* determine the instruction type first */ | ||
108 | switch ((insn >> 18) & 0x7f) { | ||
109 | case 0x2: | ||
110 | /* LDx @(GRi,GRj),GRk */ | ||
111 | op = tbl_LDGRk_reg[(insn >> 6) & 0x3f]; | ||
112 | break; | ||
113 | |||
114 | case 0x3: | ||
115 | /* STx GRk,@(GRi,GRj) */ | ||
116 | op = tbl_STGRk_reg[(insn >> 6) & 0x3f]; | ||
117 | break; | ||
118 | |||
119 | default: | ||
120 | op = tbl_LDSTGRk_imm[(insn >> 18) & 0x7f]; | ||
121 | break; | ||
122 | } | ||
123 | |||
124 | if (!op) | ||
125 | return -EAGAIN; | ||
126 | |||
127 | kdebug("MISALIGN: pc=%08lx insn=%08lx ad=%08lx op=%02x\n", epcr0, insn, ear0, op); | ||
128 | |||
129 | memset(&x, 0xba, 8); | ||
130 | |||
131 | /* validate the instruction parameters */ | ||
132 | greg = (unsigned long *) &__frame->tbr; | ||
133 | |||
134 | GRi = (insn >> 12) & 0x3f; | ||
135 | GRk = (insn >> 25) & 0x3f; | ||
136 | |||
137 | if (GRi > 31 || GRk > 31) | ||
138 | return -ENOENT; | ||
139 | |||
140 | if (op & _MA_DWORD && GRk & 1) | ||
141 | return -EINVAL; | ||
142 | |||
143 | if (op & _MA_IMM) { | ||
144 | D12 = insn & 0xfff; | ||
145 | asm ("slli %0,#20,%0 ! srai %0,#20,%0" : "=r"(D12) : "0"(D12)); /* sign extend */ | ||
146 | addr = (GRi ? greg[GRi] : 0) + D12; | ||
147 | } | ||
148 | else { | ||
149 | GRj = (insn >> 0) & 0x3f; | ||
150 | if (GRj > 31) | ||
151 | return -ENOENT; | ||
152 | addr = (GRi ? greg[GRi] : 0) + (GRj ? greg[GRj] : 0); | ||
153 | } | ||
154 | |||
155 | if (addr != ear0) { | ||
156 | kdebug("MISALIGN: Calculated addr (%08lx) does not match EAR0 (%08lx)\n", | ||
157 | addr, ear0); | ||
158 | return -EFAULT; | ||
159 | } | ||
160 | |||
161 | /* check the address is okay */ | ||
162 | if (user_mode(__frame) && ___range_ok(ear0, 8) < 0) | ||
163 | return -EFAULT; | ||
164 | |||
165 | /* perform the memory op */ | ||
166 | if (op & _MA_STORE) { | ||
167 | /* perform a store */ | ||
168 | x._32[0] = 0; | ||
169 | if (GRk != 0) { | ||
170 | if (op & _MA_HALF) { | ||
171 | x._16 = greg[GRk]; | ||
172 | } | ||
173 | else { | ||
174 | x._32[0] = greg[GRk]; | ||
175 | } | ||
176 | } | ||
177 | if (op & _MA_DWORD) | ||
178 | x._32[1] = greg[GRk + 1]; | ||
179 | |||
180 | kdebug("MISALIGN: Store GR%d { %08x:%08x } -> %08lx (%dB)\n", | ||
181 | GRk, x._32[1], x._32[0], addr, op & _MA_SZ_MASK); | ||
182 | |||
183 | if (__memcpy_user((void *) addr, &x, op & _MA_SZ_MASK) != 0) | ||
184 | return -EFAULT; | ||
185 | } | ||
186 | else { | ||
187 | /* perform a load */ | ||
188 | if (__memcpy_user(&x, (void *) addr, op & _MA_SZ_MASK) != 0) | ||
189 | return -EFAULT; | ||
190 | |||
191 | if (op & _MA_HALF) { | ||
192 | if (op & _MA_SIGNED) | ||
193 | asm ("slli %0,#16,%0 ! srai %0,#16,%0" | ||
194 | : "=r"(x._32[0]) : "0"(x._16)); | ||
195 | else | ||
196 | asm ("sethi #0,%0" | ||
197 | : "=r"(x._32[0]) : "0"(x._16)); | ||
198 | } | ||
199 | |||
200 | kdebug("MISALIGN: Load %08lx (%dB) -> GR%d, { %08x:%08x }\n", | ||
201 | addr, op & _MA_SZ_MASK, GRk, x._32[1], x._32[0]); | ||
202 | |||
203 | if (GRk != 0) | ||
204 | greg[GRk] = x._32[0]; | ||
205 | if (op & _MA_DWORD) | ||
206 | greg[GRk + 1] = x._32[1]; | ||
207 | } | ||
208 | |||
209 | /* update the base pointer if required */ | ||
210 | if (op & _MA_UPDATE) | ||
211 | greg[GRi] = addr; | ||
212 | |||
213 | /* well... we've done that insn */ | ||
214 | __frame->pc = __frame->pc + 4; | ||
215 | |||
216 | return 0; | ||
217 | } /* end handle_misalignment() */ | ||
diff --git a/arch/h8300/kernel/asm-offsets.c b/arch/h8300/kernel/asm-offsets.c index fc30b4fd0914..2042552e0871 100644 --- a/arch/h8300/kernel/asm-offsets.c +++ b/arch/h8300/kernel/asm-offsets.c | |||
@@ -13,15 +13,11 @@ | |||
13 | #include <linux/kernel_stat.h> | 13 | #include <linux/kernel_stat.h> |
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/hardirq.h> | 15 | #include <linux/hardirq.h> |
16 | #include <linux/kbuild.h> | ||
16 | #include <asm/bootinfo.h> | 17 | #include <asm/bootinfo.h> |
17 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
18 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
19 | 20 | ||
20 | #define DEFINE(sym, val) \ | ||
21 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
22 | |||
23 | #define BLANK() asm volatile("\n->" : : ) | ||
24 | |||
25 | int main(void) | 21 | int main(void) |
26 | { | 22 | { |
27 | /* offsets into the task struct */ | 23 | /* offsets into the task struct */ |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 3aa6c821449a..0df5f6f75edf 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -19,6 +19,7 @@ config IA64 | |||
19 | select HAVE_OPROFILE | 19 | select HAVE_OPROFILE |
20 | select HAVE_KPROBES | 20 | select HAVE_KPROBES |
21 | select HAVE_KRETPROBES | 21 | select HAVE_KRETPROBES |
22 | select HAVE_DMA_ATTRS | ||
22 | select HAVE_KVM | 23 | select HAVE_KVM |
23 | default y | 24 | default y |
24 | help | 25 | help |
@@ -47,6 +48,9 @@ config MMU | |||
47 | config SWIOTLB | 48 | config SWIOTLB |
48 | bool | 49 | bool |
49 | 50 | ||
51 | config IOMMU_HELPER | ||
52 | bool | ||
53 | |||
50 | config GENERIC_LOCKBREAK | 54 | config GENERIC_LOCKBREAK |
51 | bool | 55 | bool |
52 | default y | 56 | default y |
@@ -615,7 +619,7 @@ config IRQ_PER_CPU | |||
615 | default y | 619 | default y |
616 | 620 | ||
617 | config IOMMU_HELPER | 621 | config IOMMU_HELPER |
618 | def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC) | 622 | def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB) |
619 | 623 | ||
620 | source "arch/ia64/hp/sim/Kconfig" | 624 | source "arch/ia64/hp/sim/Kconfig" |
621 | 625 | ||
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c index 8f6bcfe1dada..1c44ec2a1d58 100644 --- a/arch/ia64/hp/common/hwsw_iommu.c +++ b/arch/ia64/hp/common/hwsw_iommu.c | |||
@@ -20,10 +20,10 @@ | |||
20 | extern int swiotlb_late_init_with_default_size (size_t size); | 20 | extern int swiotlb_late_init_with_default_size (size_t size); |
21 | extern ia64_mv_dma_alloc_coherent swiotlb_alloc_coherent; | 21 | extern ia64_mv_dma_alloc_coherent swiotlb_alloc_coherent; |
22 | extern ia64_mv_dma_free_coherent swiotlb_free_coherent; | 22 | extern ia64_mv_dma_free_coherent swiotlb_free_coherent; |
23 | extern ia64_mv_dma_map_single swiotlb_map_single; | 23 | extern ia64_mv_dma_map_single_attrs swiotlb_map_single_attrs; |
24 | extern ia64_mv_dma_unmap_single swiotlb_unmap_single; | 24 | extern ia64_mv_dma_unmap_single_attrs swiotlb_unmap_single_attrs; |
25 | extern ia64_mv_dma_map_sg swiotlb_map_sg; | 25 | extern ia64_mv_dma_map_sg_attrs swiotlb_map_sg_attrs; |
26 | extern ia64_mv_dma_unmap_sg swiotlb_unmap_sg; | 26 | extern ia64_mv_dma_unmap_sg_attrs swiotlb_unmap_sg_attrs; |
27 | extern ia64_mv_dma_supported swiotlb_dma_supported; | 27 | extern ia64_mv_dma_supported swiotlb_dma_supported; |
28 | extern ia64_mv_dma_mapping_error swiotlb_dma_mapping_error; | 28 | extern ia64_mv_dma_mapping_error swiotlb_dma_mapping_error; |
29 | 29 | ||
@@ -31,19 +31,19 @@ extern ia64_mv_dma_mapping_error swiotlb_dma_mapping_error; | |||
31 | 31 | ||
32 | extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; | 32 | extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; |
33 | extern ia64_mv_dma_free_coherent sba_free_coherent; | 33 | extern ia64_mv_dma_free_coherent sba_free_coherent; |
34 | extern ia64_mv_dma_map_single sba_map_single; | 34 | extern ia64_mv_dma_map_single_attrs sba_map_single_attrs; |
35 | extern ia64_mv_dma_unmap_single sba_unmap_single; | 35 | extern ia64_mv_dma_unmap_single_attrs sba_unmap_single_attrs; |
36 | extern ia64_mv_dma_map_sg sba_map_sg; | 36 | extern ia64_mv_dma_map_sg_attrs sba_map_sg_attrs; |
37 | extern ia64_mv_dma_unmap_sg sba_unmap_sg; | 37 | extern ia64_mv_dma_unmap_sg_attrs sba_unmap_sg_attrs; |
38 | extern ia64_mv_dma_supported sba_dma_supported; | 38 | extern ia64_mv_dma_supported sba_dma_supported; |
39 | extern ia64_mv_dma_mapping_error sba_dma_mapping_error; | 39 | extern ia64_mv_dma_mapping_error sba_dma_mapping_error; |
40 | 40 | ||
41 | #define hwiommu_alloc_coherent sba_alloc_coherent | 41 | #define hwiommu_alloc_coherent sba_alloc_coherent |
42 | #define hwiommu_free_coherent sba_free_coherent | 42 | #define hwiommu_free_coherent sba_free_coherent |
43 | #define hwiommu_map_single sba_map_single | 43 | #define hwiommu_map_single_attrs sba_map_single_attrs |
44 | #define hwiommu_unmap_single sba_unmap_single | 44 | #define hwiommu_unmap_single_attrs sba_unmap_single_attrs |
45 | #define hwiommu_map_sg sba_map_sg | 45 | #define hwiommu_map_sg_attrs sba_map_sg_attrs |
46 | #define hwiommu_unmap_sg sba_unmap_sg | 46 | #define hwiommu_unmap_sg_attrs sba_unmap_sg_attrs |
47 | #define hwiommu_dma_supported sba_dma_supported | 47 | #define hwiommu_dma_supported sba_dma_supported |
48 | #define hwiommu_dma_mapping_error sba_dma_mapping_error | 48 | #define hwiommu_dma_mapping_error sba_dma_mapping_error |
49 | #define hwiommu_sync_single_for_cpu machvec_dma_sync_single | 49 | #define hwiommu_sync_single_for_cpu machvec_dma_sync_single |
@@ -98,41 +98,48 @@ hwsw_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma | |||
98 | } | 98 | } |
99 | 99 | ||
100 | dma_addr_t | 100 | dma_addr_t |
101 | hwsw_map_single (struct device *dev, void *addr, size_t size, int dir) | 101 | hwsw_map_single_attrs(struct device *dev, void *addr, size_t size, int dir, |
102 | struct dma_attrs *attrs) | ||
102 | { | 103 | { |
103 | if (use_swiotlb(dev)) | 104 | if (use_swiotlb(dev)) |
104 | return swiotlb_map_single(dev, addr, size, dir); | 105 | return swiotlb_map_single_attrs(dev, addr, size, dir, attrs); |
105 | else | 106 | else |
106 | return hwiommu_map_single(dev, addr, size, dir); | 107 | return hwiommu_map_single_attrs(dev, addr, size, dir, attrs); |
107 | } | 108 | } |
109 | EXPORT_SYMBOL(hwsw_map_single_attrs); | ||
108 | 110 | ||
109 | void | 111 | void |
110 | hwsw_unmap_single (struct device *dev, dma_addr_t iova, size_t size, int dir) | 112 | hwsw_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size, |
113 | int dir, struct dma_attrs *attrs) | ||
111 | { | 114 | { |
112 | if (use_swiotlb(dev)) | 115 | if (use_swiotlb(dev)) |
113 | return swiotlb_unmap_single(dev, iova, size, dir); | 116 | return swiotlb_unmap_single_attrs(dev, iova, size, dir, attrs); |
114 | else | 117 | else |
115 | return hwiommu_unmap_single(dev, iova, size, dir); | 118 | return hwiommu_unmap_single_attrs(dev, iova, size, dir, attrs); |
116 | } | 119 | } |
117 | 120 | EXPORT_SYMBOL(hwsw_unmap_single_attrs); | |
118 | 121 | ||
119 | int | 122 | int |
120 | hwsw_map_sg (struct device *dev, struct scatterlist *sglist, int nents, int dir) | 123 | hwsw_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, |
124 | int dir, struct dma_attrs *attrs) | ||
121 | { | 125 | { |
122 | if (use_swiotlb(dev)) | 126 | if (use_swiotlb(dev)) |
123 | return swiotlb_map_sg(dev, sglist, nents, dir); | 127 | return swiotlb_map_sg_attrs(dev, sglist, nents, dir, attrs); |
124 | else | 128 | else |
125 | return hwiommu_map_sg(dev, sglist, nents, dir); | 129 | return hwiommu_map_sg_attrs(dev, sglist, nents, dir, attrs); |
126 | } | 130 | } |
131 | EXPORT_SYMBOL(hwsw_map_sg_attrs); | ||
127 | 132 | ||
128 | void | 133 | void |
129 | hwsw_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, int dir) | 134 | hwsw_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, |
135 | int dir, struct dma_attrs *attrs) | ||
130 | { | 136 | { |
131 | if (use_swiotlb(dev)) | 137 | if (use_swiotlb(dev)) |
132 | return swiotlb_unmap_sg(dev, sglist, nents, dir); | 138 | return swiotlb_unmap_sg_attrs(dev, sglist, nents, dir, attrs); |
133 | else | 139 | else |
134 | return hwiommu_unmap_sg(dev, sglist, nents, dir); | 140 | return hwiommu_unmap_sg_attrs(dev, sglist, nents, dir, attrs); |
135 | } | 141 | } |
142 | EXPORT_SYMBOL(hwsw_unmap_sg_attrs); | ||
136 | 143 | ||
137 | void | 144 | void |
138 | hwsw_sync_single_for_cpu (struct device *dev, dma_addr_t addr, size_t size, int dir) | 145 | hwsw_sync_single_for_cpu (struct device *dev, dma_addr_t addr, size_t size, int dir) |
@@ -185,10 +192,6 @@ hwsw_dma_mapping_error (dma_addr_t dma_addr) | |||
185 | } | 192 | } |
186 | 193 | ||
187 | EXPORT_SYMBOL(hwsw_dma_mapping_error); | 194 | EXPORT_SYMBOL(hwsw_dma_mapping_error); |
188 | EXPORT_SYMBOL(hwsw_map_single); | ||
189 | EXPORT_SYMBOL(hwsw_unmap_single); | ||
190 | EXPORT_SYMBOL(hwsw_map_sg); | ||
191 | EXPORT_SYMBOL(hwsw_unmap_sg); | ||
192 | EXPORT_SYMBOL(hwsw_dma_supported); | 195 | EXPORT_SYMBOL(hwsw_dma_supported); |
193 | EXPORT_SYMBOL(hwsw_alloc_coherent); | 196 | EXPORT_SYMBOL(hwsw_alloc_coherent); |
194 | EXPORT_SYMBOL(hwsw_free_coherent); | 197 | EXPORT_SYMBOL(hwsw_free_coherent); |
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 9409de5c9441..34421aed1e2a 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -899,16 +899,18 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) | |||
899 | } | 899 | } |
900 | 900 | ||
901 | /** | 901 | /** |
902 | * sba_map_single - map one buffer and return IOVA for DMA | 902 | * sba_map_single_attrs - map one buffer and return IOVA for DMA |
903 | * @dev: instance of PCI owned by the driver that's asking. | 903 | * @dev: instance of PCI owned by the driver that's asking. |
904 | * @addr: driver buffer to map. | 904 | * @addr: driver buffer to map. |
905 | * @size: number of bytes to map in driver buffer. | 905 | * @size: number of bytes to map in driver buffer. |
906 | * @dir: R/W or both. | 906 | * @dir: R/W or both. |
907 | * @attrs: optional dma attributes | ||
907 | * | 908 | * |
908 | * See Documentation/DMA-mapping.txt | 909 | * See Documentation/DMA-mapping.txt |
909 | */ | 910 | */ |
910 | dma_addr_t | 911 | dma_addr_t |
911 | sba_map_single(struct device *dev, void *addr, size_t size, int dir) | 912 | sba_map_single_attrs(struct device *dev, void *addr, size_t size, int dir, |
913 | struct dma_attrs *attrs) | ||
912 | { | 914 | { |
913 | struct ioc *ioc; | 915 | struct ioc *ioc; |
914 | dma_addr_t iovp; | 916 | dma_addr_t iovp; |
@@ -932,7 +934,8 @@ sba_map_single(struct device *dev, void *addr, size_t size, int dir) | |||
932 | ** Device is bit capable of DMA'ing to the buffer... | 934 | ** Device is bit capable of DMA'ing to the buffer... |
933 | ** just return the PCI address of ptr | 935 | ** just return the PCI address of ptr |
934 | */ | 936 | */ |
935 | DBG_BYPASS("sba_map_single() bypass mask/addr: 0x%lx/0x%lx\n", | 937 | DBG_BYPASS("sba_map_single_attrs() bypass mask/addr: " |
938 | "0x%lx/0x%lx\n", | ||
936 | to_pci_dev(dev)->dma_mask, pci_addr); | 939 | to_pci_dev(dev)->dma_mask, pci_addr); |
937 | return pci_addr; | 940 | return pci_addr; |
938 | } | 941 | } |
@@ -953,7 +956,7 @@ sba_map_single(struct device *dev, void *addr, size_t size, int dir) | |||
953 | 956 | ||
954 | #ifdef ASSERT_PDIR_SANITY | 957 | #ifdef ASSERT_PDIR_SANITY |
955 | spin_lock_irqsave(&ioc->res_lock, flags); | 958 | spin_lock_irqsave(&ioc->res_lock, flags); |
956 | if (sba_check_pdir(ioc,"Check before sba_map_single()")) | 959 | if (sba_check_pdir(ioc,"Check before sba_map_single_attrs()")) |
957 | panic("Sanity check failed"); | 960 | panic("Sanity check failed"); |
958 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 961 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
959 | #endif | 962 | #endif |
@@ -982,11 +985,12 @@ sba_map_single(struct device *dev, void *addr, size_t size, int dir) | |||
982 | /* form complete address */ | 985 | /* form complete address */ |
983 | #ifdef ASSERT_PDIR_SANITY | 986 | #ifdef ASSERT_PDIR_SANITY |
984 | spin_lock_irqsave(&ioc->res_lock, flags); | 987 | spin_lock_irqsave(&ioc->res_lock, flags); |
985 | sba_check_pdir(ioc,"Check after sba_map_single()"); | 988 | sba_check_pdir(ioc,"Check after sba_map_single_attrs()"); |
986 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 989 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
987 | #endif | 990 | #endif |
988 | return SBA_IOVA(ioc, iovp, offset); | 991 | return SBA_IOVA(ioc, iovp, offset); |
989 | } | 992 | } |
993 | EXPORT_SYMBOL(sba_map_single_attrs); | ||
990 | 994 | ||
991 | #ifdef ENABLE_MARK_CLEAN | 995 | #ifdef ENABLE_MARK_CLEAN |
992 | static SBA_INLINE void | 996 | static SBA_INLINE void |
@@ -1013,15 +1017,17 @@ sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size) | |||
1013 | #endif | 1017 | #endif |
1014 | 1018 | ||
1015 | /** | 1019 | /** |
1016 | * sba_unmap_single - unmap one IOVA and free resources | 1020 | * sba_unmap_single_attrs - unmap one IOVA and free resources |
1017 | * @dev: instance of PCI owned by the driver that's asking. | 1021 | * @dev: instance of PCI owned by the driver that's asking. |
1018 | * @iova: IOVA of driver buffer previously mapped. | 1022 | * @iova: IOVA of driver buffer previously mapped. |
1019 | * @size: number of bytes mapped in driver buffer. | 1023 | * @size: number of bytes mapped in driver buffer. |
1020 | * @dir: R/W or both. | 1024 | * @dir: R/W or both. |
1025 | * @attrs: optional dma attributes | ||
1021 | * | 1026 | * |
1022 | * See Documentation/DMA-mapping.txt | 1027 | * See Documentation/DMA-mapping.txt |
1023 | */ | 1028 | */ |
1024 | void sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, int dir) | 1029 | void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size, |
1030 | int dir, struct dma_attrs *attrs) | ||
1025 | { | 1031 | { |
1026 | struct ioc *ioc; | 1032 | struct ioc *ioc; |
1027 | #if DELAYED_RESOURCE_CNT > 0 | 1033 | #if DELAYED_RESOURCE_CNT > 0 |
@@ -1038,7 +1044,8 @@ void sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, int dir) | |||
1038 | /* | 1044 | /* |
1039 | ** Address does not fall w/in IOVA, must be bypassing | 1045 | ** Address does not fall w/in IOVA, must be bypassing |
1040 | */ | 1046 | */ |
1041 | DBG_BYPASS("sba_unmap_single() bypass addr: 0x%lx\n", iova); | 1047 | DBG_BYPASS("sba_unmap_single_atttrs() bypass addr: 0x%lx\n", |
1048 | iova); | ||
1042 | 1049 | ||
1043 | #ifdef ENABLE_MARK_CLEAN | 1050 | #ifdef ENABLE_MARK_CLEAN |
1044 | if (dir == DMA_FROM_DEVICE) { | 1051 | if (dir == DMA_FROM_DEVICE) { |
@@ -1087,7 +1094,7 @@ void sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, int dir) | |||
1087 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 1094 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
1088 | #endif /* DELAYED_RESOURCE_CNT == 0 */ | 1095 | #endif /* DELAYED_RESOURCE_CNT == 0 */ |
1089 | } | 1096 | } |
1090 | 1097 | EXPORT_SYMBOL(sba_unmap_single_attrs); | |
1091 | 1098 | ||
1092 | /** | 1099 | /** |
1093 | * sba_alloc_coherent - allocate/map shared mem for DMA | 1100 | * sba_alloc_coherent - allocate/map shared mem for DMA |
@@ -1144,7 +1151,8 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp | |||
1144 | * If device can't bypass or bypass is disabled, pass the 32bit fake | 1151 | * If device can't bypass or bypass is disabled, pass the 32bit fake |
1145 | * device to map single to get an iova mapping. | 1152 | * device to map single to get an iova mapping. |
1146 | */ | 1153 | */ |
1147 | *dma_handle = sba_map_single(&ioc->sac_only_dev->dev, addr, size, 0); | 1154 | *dma_handle = sba_map_single_attrs(&ioc->sac_only_dev->dev, addr, |
1155 | size, 0, NULL); | ||
1148 | 1156 | ||
1149 | return addr; | 1157 | return addr; |
1150 | } | 1158 | } |
@@ -1161,7 +1169,7 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp | |||
1161 | */ | 1169 | */ |
1162 | void sba_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle) | 1170 | void sba_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle) |
1163 | { | 1171 | { |
1164 | sba_unmap_single(dev, dma_handle, size, 0); | 1172 | sba_unmap_single_attrs(dev, dma_handle, size, 0, NULL); |
1165 | free_pages((unsigned long) vaddr, get_order(size)); | 1173 | free_pages((unsigned long) vaddr, get_order(size)); |
1166 | } | 1174 | } |
1167 | 1175 | ||
@@ -1410,10 +1418,12 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev, | |||
1410 | * @sglist: array of buffer/length pairs | 1418 | * @sglist: array of buffer/length pairs |
1411 | * @nents: number of entries in list | 1419 | * @nents: number of entries in list |
1412 | * @dir: R/W or both. | 1420 | * @dir: R/W or both. |
1421 | * @attrs: optional dma attributes | ||
1413 | * | 1422 | * |
1414 | * See Documentation/DMA-mapping.txt | 1423 | * See Documentation/DMA-mapping.txt |
1415 | */ | 1424 | */ |
1416 | int sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, int dir) | 1425 | int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, |
1426 | int dir, struct dma_attrs *attrs) | ||
1417 | { | 1427 | { |
1418 | struct ioc *ioc; | 1428 | struct ioc *ioc; |
1419 | int coalesced, filled = 0; | 1429 | int coalesced, filled = 0; |
@@ -1441,16 +1451,16 @@ int sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, int di | |||
1441 | /* Fast path single entry scatterlists. */ | 1451 | /* Fast path single entry scatterlists. */ |
1442 | if (nents == 1) { | 1452 | if (nents == 1) { |
1443 | sglist->dma_length = sglist->length; | 1453 | sglist->dma_length = sglist->length; |
1444 | sglist->dma_address = sba_map_single(dev, sba_sg_address(sglist), sglist->length, dir); | 1454 | sglist->dma_address = sba_map_single_attrs(dev, sba_sg_address(sglist), sglist->length, dir, attrs); |
1445 | return 1; | 1455 | return 1; |
1446 | } | 1456 | } |
1447 | 1457 | ||
1448 | #ifdef ASSERT_PDIR_SANITY | 1458 | #ifdef ASSERT_PDIR_SANITY |
1449 | spin_lock_irqsave(&ioc->res_lock, flags); | 1459 | spin_lock_irqsave(&ioc->res_lock, flags); |
1450 | if (sba_check_pdir(ioc,"Check before sba_map_sg()")) | 1460 | if (sba_check_pdir(ioc,"Check before sba_map_sg_attrs()")) |
1451 | { | 1461 | { |
1452 | sba_dump_sg(ioc, sglist, nents); | 1462 | sba_dump_sg(ioc, sglist, nents); |
1453 | panic("Check before sba_map_sg()"); | 1463 | panic("Check before sba_map_sg_attrs()"); |
1454 | } | 1464 | } |
1455 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 1465 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
1456 | #endif | 1466 | #endif |
@@ -1479,10 +1489,10 @@ int sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, int di | |||
1479 | 1489 | ||
1480 | #ifdef ASSERT_PDIR_SANITY | 1490 | #ifdef ASSERT_PDIR_SANITY |
1481 | spin_lock_irqsave(&ioc->res_lock, flags); | 1491 | spin_lock_irqsave(&ioc->res_lock, flags); |
1482 | if (sba_check_pdir(ioc,"Check after sba_map_sg()")) | 1492 | if (sba_check_pdir(ioc,"Check after sba_map_sg_attrs()")) |
1483 | { | 1493 | { |
1484 | sba_dump_sg(ioc, sglist, nents); | 1494 | sba_dump_sg(ioc, sglist, nents); |
1485 | panic("Check after sba_map_sg()\n"); | 1495 | panic("Check after sba_map_sg_attrs()\n"); |
1486 | } | 1496 | } |
1487 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 1497 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
1488 | #endif | 1498 | #endif |
@@ -1492,18 +1502,20 @@ int sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, int di | |||
1492 | 1502 | ||
1493 | return filled; | 1503 | return filled; |
1494 | } | 1504 | } |
1495 | 1505 | EXPORT_SYMBOL(sba_map_sg_attrs); | |
1496 | 1506 | ||
1497 | /** | 1507 | /** |
1498 | * sba_unmap_sg - unmap Scatter/Gather list | 1508 | * sba_unmap_sg_attrs - unmap Scatter/Gather list |
1499 | * @dev: instance of PCI owned by the driver that's asking. | 1509 | * @dev: instance of PCI owned by the driver that's asking. |
1500 | * @sglist: array of buffer/length pairs | 1510 | * @sglist: array of buffer/length pairs |
1501 | * @nents: number of entries in list | 1511 | * @nents: number of entries in list |
1502 | * @dir: R/W or both. | 1512 | * @dir: R/W or both. |
1513 | * @attrs: optional dma attributes | ||
1503 | * | 1514 | * |
1504 | * See Documentation/DMA-mapping.txt | 1515 | * See Documentation/DMA-mapping.txt |
1505 | */ | 1516 | */ |
1506 | void sba_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, int dir) | 1517 | void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, |
1518 | int nents, int dir, struct dma_attrs *attrs) | ||
1507 | { | 1519 | { |
1508 | #ifdef ASSERT_PDIR_SANITY | 1520 | #ifdef ASSERT_PDIR_SANITY |
1509 | struct ioc *ioc; | 1521 | struct ioc *ioc; |
@@ -1518,13 +1530,14 @@ void sba_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, in | |||
1518 | ASSERT(ioc); | 1530 | ASSERT(ioc); |
1519 | 1531 | ||
1520 | spin_lock_irqsave(&ioc->res_lock, flags); | 1532 | spin_lock_irqsave(&ioc->res_lock, flags); |
1521 | sba_check_pdir(ioc,"Check before sba_unmap_sg()"); | 1533 | sba_check_pdir(ioc,"Check before sba_unmap_sg_attrs()"); |
1522 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 1534 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
1523 | #endif | 1535 | #endif |
1524 | 1536 | ||
1525 | while (nents && sglist->dma_length) { | 1537 | while (nents && sglist->dma_length) { |
1526 | 1538 | ||
1527 | sba_unmap_single(dev, sglist->dma_address, sglist->dma_length, dir); | 1539 | sba_unmap_single_attrs(dev, sglist->dma_address, |
1540 | sglist->dma_length, dir, attrs); | ||
1528 | sglist = sg_next(sglist); | 1541 | sglist = sg_next(sglist); |
1529 | nents--; | 1542 | nents--; |
1530 | } | 1543 | } |
@@ -1533,11 +1546,12 @@ void sba_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, in | |||
1533 | 1546 | ||
1534 | #ifdef ASSERT_PDIR_SANITY | 1547 | #ifdef ASSERT_PDIR_SANITY |
1535 | spin_lock_irqsave(&ioc->res_lock, flags); | 1548 | spin_lock_irqsave(&ioc->res_lock, flags); |
1536 | sba_check_pdir(ioc,"Check after sba_unmap_sg()"); | 1549 | sba_check_pdir(ioc,"Check after sba_unmap_sg_attrs()"); |
1537 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 1550 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
1538 | #endif | 1551 | #endif |
1539 | 1552 | ||
1540 | } | 1553 | } |
1554 | EXPORT_SYMBOL(sba_unmap_sg_attrs); | ||
1541 | 1555 | ||
1542 | /************************************************************** | 1556 | /************************************************************** |
1543 | * | 1557 | * |
@@ -1918,15 +1932,13 @@ static const struct file_operations ioc_fops = { | |||
1918 | static void __init | 1932 | static void __init |
1919 | ioc_proc_init(void) | 1933 | ioc_proc_init(void) |
1920 | { | 1934 | { |
1921 | struct proc_dir_entry *dir, *entry; | 1935 | struct proc_dir_entry *dir; |
1922 | 1936 | ||
1923 | dir = proc_mkdir("bus/mckinley", NULL); | 1937 | dir = proc_mkdir("bus/mckinley", NULL); |
1924 | if (!dir) | 1938 | if (!dir) |
1925 | return; | 1939 | return; |
1926 | 1940 | ||
1927 | entry = create_proc_entry(ioc_list->name, 0, dir); | 1941 | proc_create(ioc_list->name, 0, dir, &ioc_fops); |
1928 | if (entry) | ||
1929 | entry->proc_fops = &ioc_fops; | ||
1930 | } | 1942 | } |
1931 | #endif | 1943 | #endif |
1932 | 1944 | ||
@@ -2166,10 +2178,6 @@ sba_page_override(char *str) | |||
2166 | __setup("sbapagesize=",sba_page_override); | 2178 | __setup("sbapagesize=",sba_page_override); |
2167 | 2179 | ||
2168 | EXPORT_SYMBOL(sba_dma_mapping_error); | 2180 | EXPORT_SYMBOL(sba_dma_mapping_error); |
2169 | EXPORT_SYMBOL(sba_map_single); | ||
2170 | EXPORT_SYMBOL(sba_unmap_single); | ||
2171 | EXPORT_SYMBOL(sba_map_sg); | ||
2172 | EXPORT_SYMBOL(sba_unmap_sg); | ||
2173 | EXPORT_SYMBOL(sba_dma_supported); | 2181 | EXPORT_SYMBOL(sba_dma_supported); |
2174 | EXPORT_SYMBOL(sba_alloc_coherent); | 2182 | EXPORT_SYMBOL(sba_alloc_coherent); |
2175 | EXPORT_SYMBOL(sba_free_coherent); | 2183 | EXPORT_SYMBOL(sba_free_coherent); |
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index eb0c32a85fd7..23cafc80d2a4 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -210,21 +210,23 @@ static void do_softint(struct work_struct *private_) | |||
210 | printk(KERN_ERR "simserial: do_softint called\n"); | 210 | printk(KERN_ERR "simserial: do_softint called\n"); |
211 | } | 211 | } |
212 | 212 | ||
213 | static void rs_put_char(struct tty_struct *tty, unsigned char ch) | 213 | static int rs_put_char(struct tty_struct *tty, unsigned char ch) |
214 | { | 214 | { |
215 | struct async_struct *info = (struct async_struct *)tty->driver_data; | 215 | struct async_struct *info = (struct async_struct *)tty->driver_data; |
216 | unsigned long flags; | 216 | unsigned long flags; |
217 | 217 | ||
218 | if (!tty || !info->xmit.buf) return; | 218 | if (!tty || !info->xmit.buf) |
219 | return 0; | ||
219 | 220 | ||
220 | local_irq_save(flags); | 221 | local_irq_save(flags); |
221 | if (CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) == 0) { | 222 | if (CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) == 0) { |
222 | local_irq_restore(flags); | 223 | local_irq_restore(flags); |
223 | return; | 224 | return 0; |
224 | } | 225 | } |
225 | info->xmit.buf[info->xmit.head] = ch; | 226 | info->xmit.buf[info->xmit.head] = ch; |
226 | info->xmit.head = (info->xmit.head + 1) & (SERIAL_XMIT_SIZE-1); | 227 | info->xmit.head = (info->xmit.head + 1) & (SERIAL_XMIT_SIZE-1); |
227 | local_irq_restore(flags); | 228 | local_irq_restore(flags); |
229 | return 1; | ||
228 | } | 230 | } |
229 | 231 | ||
230 | static void transmit_chars(struct async_struct *info, int *intr_done) | 232 | static void transmit_chars(struct async_struct *info, int *intr_done) |
@@ -621,7 +623,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
621 | * the line discipline to only process XON/XOFF characters. | 623 | * the line discipline to only process XON/XOFF characters. |
622 | */ | 624 | */ |
623 | shutdown(info); | 625 | shutdown(info); |
624 | if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); | 626 | if (tty->ops->flush_buffer) |
627 | tty->ops->flush_buffer(tty); | ||
625 | if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty); | 628 | if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty); |
626 | info->event = 0; | 629 | info->event = 0; |
627 | info->tty = NULL; | 630 | info->tty = NULL; |
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c index 230a6f92367f..c64a55af9b95 100644 --- a/arch/ia64/kernel/asm-offsets.c +++ b/arch/ia64/kernel/asm-offsets.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/pid.h> | 10 | #include <linux/pid.h> |
11 | #include <linux/clocksource.h> | 11 | #include <linux/clocksource.h> |
12 | 12 | #include <linux/kbuild.h> | |
13 | #include <asm-ia64/processor.h> | 13 | #include <asm-ia64/processor.h> |
14 | #include <asm-ia64/ptrace.h> | 14 | #include <asm-ia64/ptrace.h> |
15 | #include <asm-ia64/siginfo.h> | 15 | #include <asm-ia64/siginfo.h> |
@@ -19,11 +19,6 @@ | |||
19 | #include "../kernel/sigframe.h" | 19 | #include "../kernel/sigframe.h" |
20 | #include "../kernel/fsyscall_gtod_data.h" | 20 | #include "../kernel/fsyscall_gtod_data.h" |
21 | 21 | ||
22 | #define DEFINE(sym, val) \ | ||
23 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
24 | |||
25 | #define BLANK() asm volatile("\n->" : : ) | ||
26 | |||
27 | void foo(void) | 22 | void foo(void) |
28 | { | 23 | { |
29 | DEFINE(IA64_TASK_SIZE, sizeof (struct task_struct)); | 24 | DEFINE(IA64_TASK_SIZE, sizeof (struct task_struct)); |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index c8e403752a0c..7fbb51e10bbe 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -6695,16 +6695,12 @@ pfm_init(void) | |||
6695 | /* | 6695 | /* |
6696 | * create /proc/perfmon (mostly for debugging purposes) | 6696 | * create /proc/perfmon (mostly for debugging purposes) |
6697 | */ | 6697 | */ |
6698 | perfmon_dir = create_proc_entry("perfmon", S_IRUGO, NULL); | 6698 | perfmon_dir = proc_create("perfmon", S_IRUGO, NULL, &pfm_proc_fops); |
6699 | if (perfmon_dir == NULL) { | 6699 | if (perfmon_dir == NULL) { |
6700 | printk(KERN_ERR "perfmon: cannot create /proc entry, perfmon disabled\n"); | 6700 | printk(KERN_ERR "perfmon: cannot create /proc entry, perfmon disabled\n"); |
6701 | pmu_conf = NULL; | 6701 | pmu_conf = NULL; |
6702 | return -1; | 6702 | return -1; |
6703 | } | 6703 | } |
6704 | /* | ||
6705 | * install customized file operations for /proc/perfmon entry | ||
6706 | */ | ||
6707 | perfmon_dir->proc_fops = &pfm_proc_fops; | ||
6708 | 6704 | ||
6709 | /* | 6705 | /* |
6710 | * create /proc/sys/kernel/perfmon (for debugging purposes) | 6706 | * create /proc/sys/kernel/perfmon (for debugging purposes) |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index a5ea817cbcbf..58dcfac5ea88 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -183,7 +183,7 @@ do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall | |||
183 | #endif | 183 | #endif |
184 | 184 | ||
185 | /* deal with pending signal delivery */ | 185 | /* deal with pending signal delivery */ |
186 | if (test_thread_flag(TIF_SIGPENDING)||test_thread_flag(TIF_RESTORE_SIGMASK)) | 186 | if (test_thread_flag(TIF_SIGPENDING)) |
187 | ia64_do_signal(scr, in_syscall); | 187 | ia64_do_signal(scr, in_syscall); |
188 | 188 | ||
189 | /* copy user rbs to kernel rbs */ | 189 | /* copy user rbs to kernel rbs */ |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index b11bb50a197a..ecb9eb78d687 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -648,18 +648,16 @@ salinfo_init(void) | |||
648 | if (!dir) | 648 | if (!dir) |
649 | continue; | 649 | continue; |
650 | 650 | ||
651 | entry = create_proc_entry("event", S_IRUSR, dir); | 651 | entry = proc_create_data("event", S_IRUSR, dir, |
652 | &salinfo_event_fops, data); | ||
652 | if (!entry) | 653 | if (!entry) |
653 | continue; | 654 | continue; |
654 | entry->data = data; | ||
655 | entry->proc_fops = &salinfo_event_fops; | ||
656 | *sdir++ = entry; | 655 | *sdir++ = entry; |
657 | 656 | ||
658 | entry = create_proc_entry("data", S_IRUSR | S_IWUSR, dir); | 657 | entry = proc_create_data("data", S_IRUSR | S_IWUSR, dir, |
658 | &salinfo_data_fops, data); | ||
659 | if (!entry) | 659 | if (!entry) |
660 | continue; | 660 | continue; |
661 | entry->data = data; | ||
662 | entry->proc_fops = &salinfo_data_fops; | ||
663 | *sdir++ = entry; | 661 | *sdir++ = entry; |
664 | 662 | ||
665 | /* we missed any events before now */ | 663 | /* we missed any events before now */ |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 16483be18c0b..d7ad42b77d41 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -873,7 +873,8 @@ identify_siblings(struct cpuinfo_ia64 *c) | |||
873 | u16 pltid; | 873 | u16 pltid; |
874 | pal_logical_to_physical_t info; | 874 | pal_logical_to_physical_t info; |
875 | 875 | ||
876 | if ((status = ia64_pal_logical_to_phys(-1, &info)) != PAL_STATUS_SUCCESS) { | 876 | status = ia64_pal_logical_to_phys(-1, &info); |
877 | if (status != PAL_STATUS_SUCCESS) { | ||
877 | if (status != PAL_STATUS_UNIMPLEMENTED) { | 878 | if (status != PAL_STATUS_UNIMPLEMENTED) { |
878 | printk(KERN_ERR | 879 | printk(KERN_ERR |
879 | "ia64_pal_logical_to_phys failed with %ld\n", | 880 | "ia64_pal_logical_to_phys failed with %ld\n", |
@@ -885,8 +886,13 @@ identify_siblings(struct cpuinfo_ia64 *c) | |||
885 | info.overview_cpp = 1; | 886 | info.overview_cpp = 1; |
886 | info.overview_tpc = 1; | 887 | info.overview_tpc = 1; |
887 | } | 888 | } |
888 | if ((status = ia64_sal_physical_id_info(&pltid)) != PAL_STATUS_SUCCESS) { | 889 | |
889 | printk(KERN_ERR "ia64_sal_pltid failed with %ld\n", status); | 890 | status = ia64_sal_physical_id_info(&pltid); |
891 | if (status != PAL_STATUS_SUCCESS) { | ||
892 | if (status != PAL_STATUS_UNIMPLEMENTED) | ||
893 | printk(KERN_ERR | ||
894 | "ia64_sal_pltid failed with %ld\n", | ||
895 | status); | ||
890 | return; | 896 | return; |
891 | } | 897 | } |
892 | 898 | ||
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index a2484fc1a06c..abb17a613b17 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -27,6 +27,15 @@ | |||
27 | 27 | ||
28 | static struct ia64_cpu *sysfs_cpus; | 28 | static struct ia64_cpu *sysfs_cpus; |
29 | 29 | ||
30 | void arch_fix_phys_package_id(int num, u32 slot) | ||
31 | { | ||
32 | #ifdef CONFIG_SMP | ||
33 | if (cpu_data(num)->socket_id == -1) | ||
34 | cpu_data(num)->socket_id = slot; | ||
35 | #endif | ||
36 | } | ||
37 | EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); | ||
38 | |||
30 | int arch_register_cpu(int num) | 39 | int arch_register_cpu(int num) |
31 | { | 40 | { |
32 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) | 41 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) |
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index 2a90c32024f4..e77995a6e3ed 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001-2006 Silicon Graphics, Inc. All rights reserved. | 2 | * Copyright (C) 2001-2008 Silicon Graphics, Inc. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of version 2 of the GNU General Public License | 5 | * under the terms of version 2 of the GNU General Public License |
@@ -177,12 +177,13 @@ failed: | |||
177 | * uncached_alloc_page | 177 | * uncached_alloc_page |
178 | * | 178 | * |
179 | * @starting_nid: node id of node to start with, or -1 | 179 | * @starting_nid: node id of node to start with, or -1 |
180 | * @n_pages: number of contiguous pages to allocate | ||
180 | * | 181 | * |
181 | * Allocate 1 uncached page. Allocates on the requested node. If no | 182 | * Allocate the specified number of contiguous uncached pages on the |
182 | * uncached pages are available on the requested node, roundrobin starting | 183 | * the requested node. If not enough contiguous uncached pages are available |
183 | * with the next higher node. | 184 | * on the requested node, roundrobin starting with the next higher node. |
184 | */ | 185 | */ |
185 | unsigned long uncached_alloc_page(int starting_nid) | 186 | unsigned long uncached_alloc_page(int starting_nid, int n_pages) |
186 | { | 187 | { |
187 | unsigned long uc_addr; | 188 | unsigned long uc_addr; |
188 | struct uncached_pool *uc_pool; | 189 | struct uncached_pool *uc_pool; |
@@ -202,7 +203,8 @@ unsigned long uncached_alloc_page(int starting_nid) | |||
202 | if (uc_pool->pool == NULL) | 203 | if (uc_pool->pool == NULL) |
203 | continue; | 204 | continue; |
204 | do { | 205 | do { |
205 | uc_addr = gen_pool_alloc(uc_pool->pool, PAGE_SIZE); | 206 | uc_addr = gen_pool_alloc(uc_pool->pool, |
207 | n_pages * PAGE_SIZE); | ||
206 | if (uc_addr != 0) | 208 | if (uc_addr != 0) |
207 | return uc_addr; | 209 | return uc_addr; |
208 | } while (uncached_add_chunk(uc_pool, nid) == 0); | 210 | } while (uncached_add_chunk(uc_pool, nid) == 0); |
@@ -217,11 +219,12 @@ EXPORT_SYMBOL(uncached_alloc_page); | |||
217 | /* | 219 | /* |
218 | * uncached_free_page | 220 | * uncached_free_page |
219 | * | 221 | * |
220 | * @uc_addr: uncached address of page to free | 222 | * @uc_addr: uncached address of first page to free |
223 | * @n_pages: number of contiguous pages to free | ||
221 | * | 224 | * |
222 | * Free a single uncached page. | 225 | * Free the specified number of uncached pages. |
223 | */ | 226 | */ |
224 | void uncached_free_page(unsigned long uc_addr) | 227 | void uncached_free_page(unsigned long uc_addr, int n_pages) |
225 | { | 228 | { |
226 | int nid = paddr_to_nid(uc_addr - __IA64_UNCACHED_OFFSET); | 229 | int nid = paddr_to_nid(uc_addr - __IA64_UNCACHED_OFFSET); |
227 | struct gen_pool *pool = uncached_pools[nid].pool; | 230 | struct gen_pool *pool = uncached_pools[nid].pool; |
@@ -232,7 +235,7 @@ void uncached_free_page(unsigned long uc_addr) | |||
232 | if ((uc_addr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET) | 235 | if ((uc_addr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET) |
233 | panic("uncached_free_page invalid address %lx\n", uc_addr); | 236 | panic("uncached_free_page invalid address %lx\n", uc_addr); |
234 | 237 | ||
235 | gen_pool_free(pool, uc_addr, PAGE_SIZE); | 238 | gen_pool_free(pool, uc_addr, n_pages * PAGE_SIZE); |
236 | } | 239 | } |
237 | EXPORT_SYMBOL(uncached_free_page); | 240 | EXPORT_SYMBOL(uncached_free_page); |
238 | 241 | ||
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index d52ec4e83409..8caf42471f0d 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
@@ -168,7 +168,10 @@ setup_ptcg_sem(int max_purges, int nptcg_from) | |||
168 | static int firstcpu = 1; | 168 | static int firstcpu = 1; |
169 | 169 | ||
170 | if (toolatetochangeptcgsem) { | 170 | if (toolatetochangeptcgsem) { |
171 | BUG_ON(max_purges < nptcg); | 171 | if (nptcg_from == NPTCG_FROM_PAL && max_purges == 0) |
172 | BUG_ON(1 < nptcg); | ||
173 | else | ||
174 | BUG_ON(max_purges < nptcg); | ||
172 | return; | 175 | return; |
173 | } | 176 | } |
174 | 177 | ||
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index dfc6bf1c7b41..49d3120415eb 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c | |||
@@ -550,11 +550,12 @@ static int __init sn2_ptc_init(void) | |||
550 | if (!ia64_platform_is("sn2")) | 550 | if (!ia64_platform_is("sn2")) |
551 | return 0; | 551 | return 0; |
552 | 552 | ||
553 | if (!(proc_sn2_ptc = create_proc_entry(PTC_BASENAME, 0444, NULL))) { | 553 | proc_sn2_ptc = proc_create(PTC_BASENAME, 0444, |
554 | NULL, &proc_sn2_ptc_operations); | ||
555 | if (!&proc_sn2_ptc_operations) { | ||
554 | printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME); | 556 | printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME); |
555 | return -EINVAL; | 557 | return -EINVAL; |
556 | } | 558 | } |
557 | proc_sn2_ptc->proc_fops = &proc_sn2_ptc_operations; | ||
558 | spin_lock_init(&sn2_global_ptc_lock); | 559 | spin_lock_init(&sn2_global_ptc_lock); |
559 | return 0; | 560 | return 0; |
560 | } | 561 | } |
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index 62b3e9a496ac..2526e5c783a4 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c | |||
@@ -139,30 +139,21 @@ static const struct file_operations proc_sn_topo_fops = { | |||
139 | void register_sn_procfs(void) | 139 | void register_sn_procfs(void) |
140 | { | 140 | { |
141 | static struct proc_dir_entry *sgi_proc_dir = NULL; | 141 | static struct proc_dir_entry *sgi_proc_dir = NULL; |
142 | struct proc_dir_entry *pde; | ||
143 | 142 | ||
144 | BUG_ON(sgi_proc_dir != NULL); | 143 | BUG_ON(sgi_proc_dir != NULL); |
145 | if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) | 144 | if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) |
146 | return; | 145 | return; |
147 | 146 | ||
148 | pde = create_proc_entry("partition_id", 0444, sgi_proc_dir); | 147 | proc_create("partition_id", 0444, sgi_proc_dir, |
149 | if (pde) | 148 | &proc_partition_id_fops); |
150 | pde->proc_fops = &proc_partition_id_fops; | 149 | proc_create("system_serial_number", 0444, sgi_proc_dir, |
151 | pde = create_proc_entry("system_serial_number", 0444, sgi_proc_dir); | 150 | &proc_system_sn_fops); |
152 | if (pde) | 151 | proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops); |
153 | pde->proc_fops = &proc_system_sn_fops; | 152 | proc_create("sn_force_interrupt", 0644, sgi_proc_dir, |
154 | pde = create_proc_entry("licenseID", 0444, sgi_proc_dir); | 153 | &proc_sn_force_intr_fops); |
155 | if (pde) | 154 | proc_create("coherence_id", 0444, sgi_proc_dir, |
156 | pde->proc_fops = &proc_license_id_fops; | 155 | &proc_coherence_id_fops); |
157 | pde = create_proc_entry("sn_force_interrupt", 0644, sgi_proc_dir); | 156 | proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops); |
158 | if (pde) | ||
159 | pde->proc_fops = &proc_sn_force_intr_fops; | ||
160 | pde = create_proc_entry("coherence_id", 0444, sgi_proc_dir); | ||
161 | if (pde) | ||
162 | pde->proc_fops = &proc_coherence_id_fops; | ||
163 | pde = create_proc_entry("sn_topology", 0444, sgi_proc_dir); | ||
164 | if (pde) | ||
165 | pde->proc_fops = &proc_sn_topo_fops; | ||
166 | } | 157 | } |
167 | 158 | ||
168 | #endif /* CONFIG_PROC_FS */ | 159 | #endif /* CONFIG_PROC_FS */ |
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 18b94b792d54..52175af299a0 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/dma-attrs.h> | ||
13 | #include <asm/dma.h> | 14 | #include <asm/dma.h> |
14 | #include <asm/sn/intr.h> | 15 | #include <asm/sn/intr.h> |
15 | #include <asm/sn/pcibus_provider_defs.h> | 16 | #include <asm/sn/pcibus_provider_defs.h> |
@@ -149,11 +150,12 @@ void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | |||
149 | EXPORT_SYMBOL(sn_dma_free_coherent); | 150 | EXPORT_SYMBOL(sn_dma_free_coherent); |
150 | 151 | ||
151 | /** | 152 | /** |
152 | * sn_dma_map_single - map a single page for DMA | 153 | * sn_dma_map_single_attrs - map a single page for DMA |
153 | * @dev: device to map for | 154 | * @dev: device to map for |
154 | * @cpu_addr: kernel virtual address of the region to map | 155 | * @cpu_addr: kernel virtual address of the region to map |
155 | * @size: size of the region | 156 | * @size: size of the region |
156 | * @direction: DMA direction | 157 | * @direction: DMA direction |
158 | * @attrs: optional dma attributes | ||
157 | * | 159 | * |
158 | * Map the region pointed to by @cpu_addr for DMA and return the | 160 | * Map the region pointed to by @cpu_addr for DMA and return the |
159 | * DMA address. | 161 | * DMA address. |
@@ -163,42 +165,59 @@ EXPORT_SYMBOL(sn_dma_free_coherent); | |||
163 | * no way of saving the dmamap handle from the alloc to later free | 165 | * no way of saving the dmamap handle from the alloc to later free |
164 | * (which is pretty much unacceptable). | 166 | * (which is pretty much unacceptable). |
165 | * | 167 | * |
168 | * mappings with the DMA_ATTR_WRITE_BARRIER get mapped with | ||
169 | * dma_map_consistent() so that writes force a flush of pending DMA. | ||
170 | * (See "SGI Altix Architecture Considerations for Linux Device Drivers", | ||
171 | * Document Number: 007-4763-001) | ||
172 | * | ||
166 | * TODO: simplify our interface; | 173 | * TODO: simplify our interface; |
167 | * figure out how to save dmamap handle so can use two step. | 174 | * figure out how to save dmamap handle so can use two step. |
168 | */ | 175 | */ |
169 | dma_addr_t sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 176 | dma_addr_t sn_dma_map_single_attrs(struct device *dev, void *cpu_addr, |
170 | int direction) | 177 | size_t size, int direction, |
178 | struct dma_attrs *attrs) | ||
171 | { | 179 | { |
172 | dma_addr_t dma_addr; | 180 | dma_addr_t dma_addr; |
173 | unsigned long phys_addr; | 181 | unsigned long phys_addr; |
174 | struct pci_dev *pdev = to_pci_dev(dev); | 182 | struct pci_dev *pdev = to_pci_dev(dev); |
175 | struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); | 183 | struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); |
184 | int dmabarr; | ||
185 | |||
186 | dmabarr = dma_get_attr(DMA_ATTR_WRITE_BARRIER, attrs); | ||
176 | 187 | ||
177 | BUG_ON(dev->bus != &pci_bus_type); | 188 | BUG_ON(dev->bus != &pci_bus_type); |
178 | 189 | ||
179 | phys_addr = __pa(cpu_addr); | 190 | phys_addr = __pa(cpu_addr); |
180 | dma_addr = provider->dma_map(pdev, phys_addr, size, SN_DMA_ADDR_PHYS); | 191 | if (dmabarr) |
192 | dma_addr = provider->dma_map_consistent(pdev, phys_addr, | ||
193 | size, SN_DMA_ADDR_PHYS); | ||
194 | else | ||
195 | dma_addr = provider->dma_map(pdev, phys_addr, size, | ||
196 | SN_DMA_ADDR_PHYS); | ||
197 | |||
181 | if (!dma_addr) { | 198 | if (!dma_addr) { |
182 | printk(KERN_ERR "%s: out of ATEs\n", __func__); | 199 | printk(KERN_ERR "%s: out of ATEs\n", __func__); |
183 | return 0; | 200 | return 0; |
184 | } | 201 | } |
185 | return dma_addr; | 202 | return dma_addr; |
186 | } | 203 | } |
187 | EXPORT_SYMBOL(sn_dma_map_single); | 204 | EXPORT_SYMBOL(sn_dma_map_single_attrs); |
188 | 205 | ||
189 | /** | 206 | /** |
190 | * sn_dma_unmap_single - unamp a DMA mapped page | 207 | * sn_dma_unmap_single_attrs - unamp a DMA mapped page |
191 | * @dev: device to sync | 208 | * @dev: device to sync |
192 | * @dma_addr: DMA address to sync | 209 | * @dma_addr: DMA address to sync |
193 | * @size: size of region | 210 | * @size: size of region |
194 | * @direction: DMA direction | 211 | * @direction: DMA direction |
212 | * @attrs: optional dma attributes | ||
195 | * | 213 | * |
196 | * This routine is supposed to sync the DMA region specified | 214 | * This routine is supposed to sync the DMA region specified |
197 | * by @dma_handle into the coherence domain. On SN, we're always cache | 215 | * by @dma_handle into the coherence domain. On SN, we're always cache |
198 | * coherent, so we just need to free any ATEs associated with this mapping. | 216 | * coherent, so we just need to free any ATEs associated with this mapping. |
199 | */ | 217 | */ |
200 | void sn_dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 218 | void sn_dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr, |
201 | int direction) | 219 | size_t size, int direction, |
220 | struct dma_attrs *attrs) | ||
202 | { | 221 | { |
203 | struct pci_dev *pdev = to_pci_dev(dev); | 222 | struct pci_dev *pdev = to_pci_dev(dev); |
204 | struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); | 223 | struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); |
@@ -207,19 +226,21 @@ void sn_dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
207 | 226 | ||
208 | provider->dma_unmap(pdev, dma_addr, direction); | 227 | provider->dma_unmap(pdev, dma_addr, direction); |
209 | } | 228 | } |
210 | EXPORT_SYMBOL(sn_dma_unmap_single); | 229 | EXPORT_SYMBOL(sn_dma_unmap_single_attrs); |
211 | 230 | ||
212 | /** | 231 | /** |
213 | * sn_dma_unmap_sg - unmap a DMA scatterlist | 232 | * sn_dma_unmap_sg_attrs - unmap a DMA scatterlist |
214 | * @dev: device to unmap | 233 | * @dev: device to unmap |
215 | * @sg: scatterlist to unmap | 234 | * @sg: scatterlist to unmap |
216 | * @nhwentries: number of scatterlist entries | 235 | * @nhwentries: number of scatterlist entries |
217 | * @direction: DMA direction | 236 | * @direction: DMA direction |
237 | * @attrs: optional dma attributes | ||
218 | * | 238 | * |
219 | * Unmap a set of streaming mode DMA translations. | 239 | * Unmap a set of streaming mode DMA translations. |
220 | */ | 240 | */ |
221 | void sn_dma_unmap_sg(struct device *dev, struct scatterlist *sgl, | 241 | void sn_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, |
222 | int nhwentries, int direction) | 242 | int nhwentries, int direction, |
243 | struct dma_attrs *attrs) | ||
223 | { | 244 | { |
224 | int i; | 245 | int i; |
225 | struct pci_dev *pdev = to_pci_dev(dev); | 246 | struct pci_dev *pdev = to_pci_dev(dev); |
@@ -234,25 +255,34 @@ void sn_dma_unmap_sg(struct device *dev, struct scatterlist *sgl, | |||
234 | sg->dma_length = 0; | 255 | sg->dma_length = 0; |
235 | } | 256 | } |
236 | } | 257 | } |
237 | EXPORT_SYMBOL(sn_dma_unmap_sg); | 258 | EXPORT_SYMBOL(sn_dma_unmap_sg_attrs); |
238 | 259 | ||
239 | /** | 260 | /** |
240 | * sn_dma_map_sg - map a scatterlist for DMA | 261 | * sn_dma_map_sg_attrs - map a scatterlist for DMA |
241 | * @dev: device to map for | 262 | * @dev: device to map for |
242 | * @sg: scatterlist to map | 263 | * @sg: scatterlist to map |
243 | * @nhwentries: number of entries | 264 | * @nhwentries: number of entries |
244 | * @direction: direction of the DMA transaction | 265 | * @direction: direction of the DMA transaction |
266 | * @attrs: optional dma attributes | ||
267 | * | ||
268 | * mappings with the DMA_ATTR_WRITE_BARRIER get mapped with | ||
269 | * dma_map_consistent() so that writes force a flush of pending DMA. | ||
270 | * (See "SGI Altix Architecture Considerations for Linux Device Drivers", | ||
271 | * Document Number: 007-4763-001) | ||
245 | * | 272 | * |
246 | * Maps each entry of @sg for DMA. | 273 | * Maps each entry of @sg for DMA. |
247 | */ | 274 | */ |
248 | int sn_dma_map_sg(struct device *dev, struct scatterlist *sgl, int nhwentries, | 275 | int sn_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, |
249 | int direction) | 276 | int nhwentries, int direction, struct dma_attrs *attrs) |
250 | { | 277 | { |
251 | unsigned long phys_addr; | 278 | unsigned long phys_addr; |
252 | struct scatterlist *saved_sg = sgl, *sg; | 279 | struct scatterlist *saved_sg = sgl, *sg; |
253 | struct pci_dev *pdev = to_pci_dev(dev); | 280 | struct pci_dev *pdev = to_pci_dev(dev); |
254 | struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); | 281 | struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); |
255 | int i; | 282 | int i; |
283 | int dmabarr; | ||
284 | |||
285 | dmabarr = dma_get_attr(DMA_ATTR_WRITE_BARRIER, attrs); | ||
256 | 286 | ||
257 | BUG_ON(dev->bus != &pci_bus_type); | 287 | BUG_ON(dev->bus != &pci_bus_type); |
258 | 288 | ||
@@ -260,11 +290,19 @@ int sn_dma_map_sg(struct device *dev, struct scatterlist *sgl, int nhwentries, | |||
260 | * Setup a DMA address for each entry in the scatterlist. | 290 | * Setup a DMA address for each entry in the scatterlist. |
261 | */ | 291 | */ |
262 | for_each_sg(sgl, sg, nhwentries, i) { | 292 | for_each_sg(sgl, sg, nhwentries, i) { |
293 | dma_addr_t dma_addr; | ||
263 | phys_addr = SG_ENT_PHYS_ADDRESS(sg); | 294 | phys_addr = SG_ENT_PHYS_ADDRESS(sg); |
264 | sg->dma_address = provider->dma_map(pdev, | 295 | if (dmabarr) |
265 | phys_addr, sg->length, | 296 | dma_addr = provider->dma_map_consistent(pdev, |
266 | SN_DMA_ADDR_PHYS); | 297 | phys_addr, |
298 | sg->length, | ||
299 | SN_DMA_ADDR_PHYS); | ||
300 | else | ||
301 | dma_addr = provider->dma_map(pdev, phys_addr, | ||
302 | sg->length, | ||
303 | SN_DMA_ADDR_PHYS); | ||
267 | 304 | ||
305 | sg->dma_address = dma_addr; | ||
268 | if (!sg->dma_address) { | 306 | if (!sg->dma_address) { |
269 | printk(KERN_ERR "%s: out of ATEs\n", __func__); | 307 | printk(KERN_ERR "%s: out of ATEs\n", __func__); |
270 | 308 | ||
@@ -272,7 +310,8 @@ int sn_dma_map_sg(struct device *dev, struct scatterlist *sgl, int nhwentries, | |||
272 | * Free any successfully allocated entries. | 310 | * Free any successfully allocated entries. |
273 | */ | 311 | */ |
274 | if (i > 0) | 312 | if (i > 0) |
275 | sn_dma_unmap_sg(dev, saved_sg, i, direction); | 313 | sn_dma_unmap_sg_attrs(dev, saved_sg, i, |
314 | direction, attrs); | ||
276 | return 0; | 315 | return 0; |
277 | } | 316 | } |
278 | 317 | ||
@@ -281,7 +320,7 @@ int sn_dma_map_sg(struct device *dev, struct scatterlist *sgl, int nhwentries, | |||
281 | 320 | ||
282 | return nhwentries; | 321 | return nhwentries; |
283 | } | 322 | } |
284 | EXPORT_SYMBOL(sn_dma_map_sg); | 323 | EXPORT_SYMBOL(sn_dma_map_sg_attrs); |
285 | 324 | ||
286 | void sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, | 325 | void sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, |
287 | size_t size, int direction) | 326 | size_t size, int direction) |
diff --git a/arch/m68k/kernel/asm-offsets.c b/arch/m68k/kernel/asm-offsets.c index 246a8820c223..b1f012f6c493 100644 --- a/arch/m68k/kernel/asm-offsets.c +++ b/arch/m68k/kernel/asm-offsets.c | |||
@@ -11,14 +11,12 @@ | |||
11 | #include <linux/stddef.h> | 11 | #include <linux/stddef.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/kernel_stat.h> | 13 | #include <linux/kernel_stat.h> |
14 | #include <linux/kbuild.h> | ||
14 | #include <asm/bootinfo.h> | 15 | #include <asm/bootinfo.h> |
15 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
16 | #include <asm/amigahw.h> | 17 | #include <asm/amigahw.h> |
17 | #include <linux/font.h> | 18 | #include <linux/font.h> |
18 | 19 | ||
19 | #define DEFINE(sym, val) \ | ||
20 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
21 | |||
22 | int main(void) | 20 | int main(void) |
23 | { | 21 | { |
24 | /* offsets into the task struct */ | 22 | /* offsets into the task struct */ |
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 5b2799eb96a6..326fb9978094 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c | |||
@@ -109,7 +109,6 @@ | |||
109 | #include <linux/mm.h> | 109 | #include <linux/mm.h> |
110 | #include <linux/delay.h> | 110 | #include <linux/delay.h> |
111 | #include <linux/init.h> | 111 | #include <linux/init.h> |
112 | #include <linux/proc_fs.h> | ||
113 | #include <linux/interrupt.h> | 112 | #include <linux/interrupt.h> |
114 | 113 | ||
115 | #include <asm/bootinfo.h> | 114 | #include <asm/bootinfo.h> |
@@ -124,10 +123,6 @@ | |||
124 | 123 | ||
125 | int iop_scc_present,iop_ism_present; | 124 | int iop_scc_present,iop_ism_present; |
126 | 125 | ||
127 | #ifdef CONFIG_PROC_FS | ||
128 | static int iop_get_proc_info(char *, char **, off_t, int); | ||
129 | #endif /* CONFIG_PROC_FS */ | ||
130 | |||
131 | /* structure for tracking channel listeners */ | 126 | /* structure for tracking channel listeners */ |
132 | 127 | ||
133 | struct listener { | 128 | struct listener { |
@@ -299,12 +294,6 @@ void __init iop_init(void) | |||
299 | iop_listeners[IOP_NUM_ISM][i].devname = NULL; | 294 | iop_listeners[IOP_NUM_ISM][i].devname = NULL; |
300 | iop_listeners[IOP_NUM_ISM][i].handler = NULL; | 295 | iop_listeners[IOP_NUM_ISM][i].handler = NULL; |
301 | } | 296 | } |
302 | |||
303 | #if 0 /* Crashing in 2.4 now, not yet sure why. --jmt */ | ||
304 | #ifdef CONFIG_PROC_FS | ||
305 | create_proc_info_entry("mac_iop", 0, &proc_root, iop_get_proc_info); | ||
306 | #endif | ||
307 | #endif | ||
308 | } | 297 | } |
309 | 298 | ||
310 | /* | 299 | /* |
@@ -637,77 +626,3 @@ irqreturn_t iop_ism_irq(int irq, void *dev_id) | |||
637 | } | 626 | } |
638 | return IRQ_HANDLED; | 627 | return IRQ_HANDLED; |
639 | } | 628 | } |
640 | |||
641 | #ifdef CONFIG_PROC_FS | ||
642 | |||
643 | char *iop_chan_state(int state) | ||
644 | { | ||
645 | switch(state) { | ||
646 | case IOP_MSG_IDLE : return "idle "; | ||
647 | case IOP_MSG_NEW : return "new "; | ||
648 | case IOP_MSG_RCVD : return "received "; | ||
649 | case IOP_MSG_COMPLETE : return "completed "; | ||
650 | default : return "unknown "; | ||
651 | } | ||
652 | } | ||
653 | |||
654 | int iop_dump_one_iop(char *buf, int iop_num, char *iop_name) | ||
655 | { | ||
656 | int i,len = 0; | ||
657 | volatile struct mac_iop *iop = iop_base[iop_num]; | ||
658 | |||
659 | len += sprintf(buf+len, "%s IOP channel states:\n\n", iop_name); | ||
660 | len += sprintf(buf+len, "## send_state recv_state device\n"); | ||
661 | len += sprintf(buf+len, "------------------------------------------------\n"); | ||
662 | for (i = 0 ; i < NUM_IOP_CHAN ; i++) { | ||
663 | len += sprintf(buf+len, "%2d %10s %10s %s\n", i, | ||
664 | iop_chan_state(iop_readb(iop, IOP_ADDR_SEND_STATE+i)), | ||
665 | iop_chan_state(iop_readb(iop, IOP_ADDR_RECV_STATE+i)), | ||
666 | iop_listeners[iop_num][i].handler? | ||
667 | iop_listeners[iop_num][i].devname : ""); | ||
668 | |||
669 | } | ||
670 | len += sprintf(buf+len, "\n"); | ||
671 | return len; | ||
672 | } | ||
673 | |||
674 | static int iop_get_proc_info(char *buf, char **start, off_t pos, int count) | ||
675 | { | ||
676 | int len, cnt; | ||
677 | |||
678 | cnt = 0; | ||
679 | len = sprintf(buf, "IOPs detected:\n\n"); | ||
680 | |||
681 | if (iop_scc_present) { | ||
682 | len += sprintf(buf+len, "SCC IOP (%p): status %02X\n", | ||
683 | iop_base[IOP_NUM_SCC], | ||
684 | (uint) iop_base[IOP_NUM_SCC]->status_ctrl); | ||
685 | } | ||
686 | if (iop_ism_present) { | ||
687 | len += sprintf(buf+len, "ISM IOP (%p): status %02X\n\n", | ||
688 | iop_base[IOP_NUM_ISM], | ||
689 | (uint) iop_base[IOP_NUM_ISM]->status_ctrl); | ||
690 | } | ||
691 | |||
692 | if (iop_scc_present) { | ||
693 | len += iop_dump_one_iop(buf+len, IOP_NUM_SCC, "SCC"); | ||
694 | |||
695 | } | ||
696 | |||
697 | if (iop_ism_present) { | ||
698 | len += iop_dump_one_iop(buf+len, IOP_NUM_ISM, "ISM"); | ||
699 | |||
700 | } | ||
701 | |||
702 | if (len >= pos) { | ||
703 | if (!*start) { | ||
704 | *start = buf + pos; | ||
705 | cnt = len - pos; | ||
706 | } else { | ||
707 | cnt += len; | ||
708 | } | ||
709 | } | ||
710 | return (count > cnt) ? cnt : count; | ||
711 | } | ||
712 | |||
713 | #endif /* CONFIG_PROC_FS */ | ||
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index a2bb01f59642..d8fb9c5303cc 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -69,6 +69,7 @@ void __init m68k_setup_node(int node) | |||
69 | */ | 69 | */ |
70 | 70 | ||
71 | void *empty_zero_page; | 71 | void *empty_zero_page; |
72 | EXPORT_SYMBOL(empty_zero_page); | ||
72 | 73 | ||
73 | void show_mem(void) | 74 | void show_mem(void) |
74 | { | 75 | { |
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c index d97b89bae53c..fd0c685a7f11 100644 --- a/arch/m68knommu/kernel/asm-offsets.c +++ b/arch/m68knommu/kernel/asm-offsets.c | |||
@@ -13,15 +13,11 @@ | |||
13 | #include <linux/kernel_stat.h> | 13 | #include <linux/kernel_stat.h> |
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/hardirq.h> | 15 | #include <linux/hardirq.h> |
16 | #include <linux/kbuild.h> | ||
16 | #include <asm/bootinfo.h> | 17 | #include <asm/bootinfo.h> |
17 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
18 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
19 | 20 | ||
20 | #define DEFINE(sym, val) \ | ||
21 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
22 | |||
23 | #define BLANK() asm volatile("\n->" : : ) | ||
24 | |||
25 | int main(void) | 21 | int main(void) |
26 | { | 22 | { |
27 | /* offsets into the task struct */ | 23 | /* offsets into the task struct */ |
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c index 812a5f8b7d26..a8cd2c1b9e1b 100644 --- a/arch/mips/au1000/common/power.c +++ b/arch/mips/au1000/common/power.c | |||
@@ -251,7 +251,6 @@ int au_sleep(void) | |||
251 | static int pm_do_sleep(ctl_table * ctl, int write, struct file *file, | 251 | static int pm_do_sleep(ctl_table * ctl, int write, struct file *file, |
252 | void __user *buffer, size_t * len, loff_t *ppos) | 252 | void __user *buffer, size_t * len, loff_t *ppos) |
253 | { | 253 | { |
254 | int retval = 0; | ||
255 | #ifdef SLEEP_TEST_TIMEOUT | 254 | #ifdef SLEEP_TEST_TIMEOUT |
256 | #define TMPBUFLEN2 16 | 255 | #define TMPBUFLEN2 16 |
257 | char buf[TMPBUFLEN2], *p; | 256 | char buf[TMPBUFLEN2], *p; |
@@ -271,36 +270,12 @@ static int pm_do_sleep(ctl_table * ctl, int write, struct file *file, | |||
271 | p = buf; | 270 | p = buf; |
272 | sleep_ticks = simple_strtoul(p, &p, 0); | 271 | sleep_ticks = simple_strtoul(p, &p, 0); |
273 | #endif | 272 | #endif |
274 | retval = pm_send_all(PM_SUSPEND, (void *) 2); | ||
275 | |||
276 | if (retval) | ||
277 | return retval; | ||
278 | 273 | ||
279 | au_sleep(); | 274 | au_sleep(); |
280 | retval = pm_send_all(PM_RESUME, (void *) 0); | ||
281 | } | 275 | } |
282 | return retval; | 276 | return 0; |
283 | } | ||
284 | |||
285 | static int pm_do_suspend(ctl_table * ctl, int write, struct file *file, | ||
286 | void __user *buffer, size_t * len, loff_t *ppos) | ||
287 | { | ||
288 | int retval = 0; | ||
289 | |||
290 | if (!write) { | ||
291 | *len = 0; | ||
292 | } else { | ||
293 | retval = pm_send_all(PM_SUSPEND, (void *) 2); | ||
294 | if (retval) | ||
295 | return retval; | ||
296 | suspend_mode = 1; | ||
297 | |||
298 | retval = pm_send_all(PM_RESUME, (void *) 0); | ||
299 | } | ||
300 | return retval; | ||
301 | } | 277 | } |
302 | 278 | ||
303 | |||
304 | static int pm_do_freq(ctl_table * ctl, int write, struct file *file, | 279 | static int pm_do_freq(ctl_table * ctl, int write, struct file *file, |
305 | void __user *buffer, size_t * len, loff_t *ppos) | 280 | void __user *buffer, size_t * len, loff_t *ppos) |
306 | { | 281 | { |
@@ -414,14 +389,6 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file, | |||
414 | 389 | ||
415 | static struct ctl_table pm_table[] = { | 390 | static struct ctl_table pm_table[] = { |
416 | { | 391 | { |
417 | .ctl_name = CTL_UNNUMBERED, | ||
418 | .procname = "suspend", | ||
419 | .data = NULL, | ||
420 | .maxlen = 0, | ||
421 | .mode = 0600, | ||
422 | .proc_handler = &pm_do_suspend | ||
423 | }, | ||
424 | { | ||
425 | .ctl_name = CTL_UNNUMBERED, | 392 | .ctl_name = CTL_UNNUMBERED, |
426 | .procname = "sleep", | 393 | .procname = "sleep", |
427 | .data = NULL, | 394 | .data = NULL, |
diff --git a/arch/mips/basler/excite/excite_procfs.c b/arch/mips/basler/excite/excite_procfs.c index 9ee67a95f6b9..08923e6825b5 100644 --- a/arch/mips/basler/excite/excite_procfs.c +++ b/arch/mips/basler/excite/excite_procfs.c | |||
@@ -18,8 +18,9 @@ | |||
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | #include <linux/module.h> | |
22 | #include <linux/proc_fs.h> | 22 | #include <linux/proc_fs.h> |
23 | #include <linux/seq_file.h> | ||
23 | #include <linux/stat.h> | 24 | #include <linux/stat.h> |
24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
@@ -28,14 +29,25 @@ | |||
28 | 29 | ||
29 | #include <excite.h> | 30 | #include <excite.h> |
30 | 31 | ||
31 | static int excite_get_unit_id(char *buf, char **addr, off_t offs, int size) | 32 | static int excite_unit_id_proc_show(struct seq_file *m, void *v) |
32 | { | 33 | { |
33 | const int len = snprintf(buf, PAGE_SIZE, "%06x", unit_id); | 34 | seq_printf(m, "%06x", unit_id); |
34 | const int w = len - offs; | 35 | return 0; |
35 | *addr = buf + offs; | ||
36 | return w < size ? w : size; | ||
37 | } | 36 | } |
38 | 37 | ||
38 | static int excite_unit_id_proc_open(struct inode *inode, struct file *file) | ||
39 | { | ||
40 | return single_open(file, excite_unit_id_proc_show, NULL); | ||
41 | } | ||
42 | |||
43 | static const struct file_operations excite_unit_id_proc_fops = { | ||
44 | .owner = THIS_MODULE, | ||
45 | .open = excite_unit_id_proc_open, | ||
46 | .read = seq_read, | ||
47 | .llseek = seq_lseek, | ||
48 | .release = single_release, | ||
49 | }; | ||
50 | |||
39 | static int | 51 | static int |
40 | excite_bootrom_read(char *page, char **start, off_t off, int count, | 52 | excite_bootrom_read(char *page, char **start, off_t off, int count, |
41 | int *eof, void *data) | 53 | int *eof, void *data) |
@@ -65,12 +77,12 @@ excite_bootrom_read(char *page, char **start, off_t off, int count, | |||
65 | void excite_procfs_init(void) | 77 | void excite_procfs_init(void) |
66 | { | 78 | { |
67 | /* Create & populate /proc/excite */ | 79 | /* Create & populate /proc/excite */ |
68 | struct proc_dir_entry * const pdir = proc_mkdir("excite", &proc_root); | 80 | struct proc_dir_entry * const pdir = proc_mkdir("excite", NULL); |
69 | if (pdir) { | 81 | if (pdir) { |
70 | struct proc_dir_entry * e; | 82 | struct proc_dir_entry * e; |
71 | 83 | ||
72 | e = create_proc_info_entry("unit_id", S_IRUGO, pdir, | 84 | e = proc_create("unit_id", S_IRUGO, pdir, |
73 | excite_get_unit_id); | 85 | &excite_unit_id_proc_fops); |
74 | if (e) e->size = 6; | 86 | if (e) e->size = 6; |
75 | 87 | ||
76 | e = create_proc_read_entry("bootrom", S_IRUGO, pdir, | 88 | e = create_proc_read_entry("bootrom", S_IRUGO, pdir, |
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 5bf03b3c4150..72942226fcdd 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c | |||
@@ -13,327 +13,285 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | 16 | #include <linux/kbuild.h> | |
17 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
18 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
19 | 19 | ||
20 | #define text(t) __asm__("\n->#" t) | ||
21 | #define _offset(type, member) (&(((type *)NULL)->member)) | ||
22 | #define offset(string, ptr, member) \ | ||
23 | __asm__("\n->" string " %0" : : "i" (_offset(ptr, member))) | ||
24 | #define constant(string, member) \ | ||
25 | __asm__("\n->" string " %0" : : "ri" (member)) | ||
26 | #define size(string, size) \ | ||
27 | __asm__("\n->" string " %0" : : "i" (sizeof(size))) | ||
28 | #define linefeed text("") | ||
29 | |||
30 | void output_ptreg_defines(void) | 20 | void output_ptreg_defines(void) |
31 | { | 21 | { |
32 | text("MIPS pt_regs offsets."); | 22 | COMMENT("MIPS pt_regs offsets."); |
33 | offset("PT_R0", struct pt_regs, regs[0]); | 23 | OFFSET(PT_R0, pt_regs, regs[0]); |
34 | offset("PT_R1", struct pt_regs, regs[1]); | 24 | OFFSET(PT_R1, pt_regs, regs[1]); |
35 | offset("PT_R2", struct pt_regs, regs[2]); | 25 | OFFSET(PT_R2, pt_regs, regs[2]); |
36 | offset("PT_R3", struct pt_regs, regs[3]); | 26 | OFFSET(PT_R3, pt_regs, regs[3]); |
37 | offset("PT_R4", struct pt_regs, regs[4]); | 27 | OFFSET(PT_R4, pt_regs, regs[4]); |
38 | offset("PT_R5", struct pt_regs, regs[5]); | 28 | OFFSET(PT_R5, pt_regs, regs[5]); |
39 | offset("PT_R6", struct pt_regs, regs[6]); | 29 | OFFSET(PT_R6, pt_regs, regs[6]); |
40 | offset("PT_R7", struct pt_regs, regs[7]); | 30 | OFFSET(PT_R7, pt_regs, regs[7]); |
41 | offset("PT_R8", struct pt_regs, regs[8]); | 31 | OFFSET(PT_R8, pt_regs, regs[8]); |
42 | offset("PT_R9", struct pt_regs, regs[9]); | 32 | OFFSET(PT_R9, pt_regs, regs[9]); |
43 | offset("PT_R10", struct pt_regs, regs[10]); | 33 | OFFSET(PT_R10, pt_regs, regs[10]); |
44 | offset("PT_R11", struct pt_regs, regs[11]); | 34 | OFFSET(PT_R11, pt_regs, regs[11]); |
45 | offset("PT_R12", struct pt_regs, regs[12]); | 35 | OFFSET(PT_R12, pt_regs, regs[12]); |
46 | offset("PT_R13", struct pt_regs, regs[13]); | 36 | OFFSET(PT_R13, pt_regs, regs[13]); |
47 | offset("PT_R14", struct pt_regs, regs[14]); | 37 | OFFSET(PT_R14, pt_regs, regs[14]); |
48 | offset("PT_R15", struct pt_regs, regs[15]); | 38 | OFFSET(PT_R15, pt_regs, regs[15]); |
49 | offset("PT_R16", struct pt_regs, regs[16]); | 39 | OFFSET(PT_R16, pt_regs, regs[16]); |
50 | offset("PT_R17", struct pt_regs, regs[17]); | 40 | OFFSET(PT_R17, pt_regs, regs[17]); |
51 | offset("PT_R18", struct pt_regs, regs[18]); | 41 | OFFSET(PT_R18, pt_regs, regs[18]); |
52 | offset("PT_R19", struct pt_regs, regs[19]); | 42 | OFFSET(PT_R19, pt_regs, regs[19]); |
53 | offset("PT_R20", struct pt_regs, regs[20]); | 43 | OFFSET(PT_R20, pt_regs, regs[20]); |
54 | offset("PT_R21", struct pt_regs, regs[21]); | 44 | OFFSET(PT_R21, pt_regs, regs[21]); |
55 | offset("PT_R22", struct pt_regs, regs[22]); | 45 | OFFSET(PT_R22, pt_regs, regs[22]); |
56 | offset("PT_R23", struct pt_regs, regs[23]); | 46 | OFFSET(PT_R23, pt_regs, regs[23]); |
57 | offset("PT_R24", struct pt_regs, regs[24]); | 47 | OFFSET(PT_R24, pt_regs, regs[24]); |
58 | offset("PT_R25", struct pt_regs, regs[25]); | 48 | OFFSET(PT_R25, pt_regs, regs[25]); |
59 | offset("PT_R26", struct pt_regs, regs[26]); | 49 | OFFSET(PT_R26, pt_regs, regs[26]); |
60 | offset("PT_R27", struct pt_regs, regs[27]); | 50 | OFFSET(PT_R27, pt_regs, regs[27]); |
61 | offset("PT_R28", struct pt_regs, regs[28]); | 51 | OFFSET(PT_R28, pt_regs, regs[28]); |
62 | offset("PT_R29", struct pt_regs, regs[29]); | 52 | OFFSET(PT_R29, pt_regs, regs[29]); |
63 | offset("PT_R30", struct pt_regs, regs[30]); | 53 | OFFSET(PT_R30, pt_regs, regs[30]); |
64 | offset("PT_R31", struct pt_regs, regs[31]); | 54 | OFFSET(PT_R31, pt_regs, regs[31]); |
65 | offset("PT_LO", struct pt_regs, lo); | 55 | OFFSET(PT_LO, pt_regs, lo); |
66 | offset("PT_HI", struct pt_regs, hi); | 56 | OFFSET(PT_HI, pt_regs, hi); |
67 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | 57 | #ifdef CONFIG_CPU_HAS_SMARTMIPS |
68 | offset("PT_ACX", struct pt_regs, acx); | 58 | OFFSET(PT_ACX, pt_regs, acx); |
69 | #endif | 59 | #endif |
70 | offset("PT_EPC", struct pt_regs, cp0_epc); | 60 | OFFSET(PT_EPC, pt_regs, cp0_epc); |
71 | offset("PT_BVADDR", struct pt_regs, cp0_badvaddr); | 61 | OFFSET(PT_BVADDR, pt_regs, cp0_badvaddr); |
72 | offset("PT_STATUS", struct pt_regs, cp0_status); | 62 | OFFSET(PT_STATUS, pt_regs, cp0_status); |
73 | offset("PT_CAUSE", struct pt_regs, cp0_cause); | 63 | OFFSET(PT_CAUSE, pt_regs, cp0_cause); |
74 | #ifdef CONFIG_MIPS_MT_SMTC | 64 | #ifdef CONFIG_MIPS_MT_SMTC |
75 | offset("PT_TCSTATUS", struct pt_regs, cp0_tcstatus); | 65 | OFFSET(PT_TCSTATUS, pt_regs, cp0_tcstatus); |
76 | #endif /* CONFIG_MIPS_MT_SMTC */ | 66 | #endif /* CONFIG_MIPS_MT_SMTC */ |
77 | size("PT_SIZE", struct pt_regs); | 67 | DEFINE(PT_SIZE, sizeof(struct pt_regs)); |
78 | linefeed; | 68 | BLANK(); |
79 | } | 69 | } |
80 | 70 | ||
81 | void output_task_defines(void) | 71 | void output_task_defines(void) |
82 | { | 72 | { |
83 | text("MIPS task_struct offsets."); | 73 | COMMENT("MIPS task_struct offsets."); |
84 | offset("TASK_STATE", struct task_struct, state); | 74 | OFFSET(TASK_STATE, task_struct, state); |
85 | offset("TASK_THREAD_INFO", struct task_struct, stack); | 75 | OFFSET(TASK_THREAD_INFO, task_struct, stack); |
86 | offset("TASK_FLAGS", struct task_struct, flags); | 76 | OFFSET(TASK_FLAGS, task_struct, flags); |
87 | offset("TASK_MM", struct task_struct, mm); | 77 | OFFSET(TASK_MM, task_struct, mm); |
88 | offset("TASK_PID", struct task_struct, pid); | 78 | OFFSET(TASK_PID, task_struct, pid); |
89 | size( "TASK_STRUCT_SIZE", struct task_struct); | 79 | DEFINE(TASK_STRUCT_SIZE, sizeof(struct task_struct)); |
90 | linefeed; | 80 | BLANK(); |
91 | } | 81 | } |
92 | 82 | ||
93 | void output_thread_info_defines(void) | 83 | void output_thread_info_defines(void) |
94 | { | 84 | { |
95 | text("MIPS thread_info offsets."); | 85 | COMMENT("MIPS thread_info offsets."); |
96 | offset("TI_TASK", struct thread_info, task); | 86 | OFFSET(TI_TASK, thread_info, task); |
97 | offset("TI_EXEC_DOMAIN", struct thread_info, exec_domain); | 87 | OFFSET(TI_EXEC_DOMAIN, thread_info, exec_domain); |
98 | offset("TI_FLAGS", struct thread_info, flags); | 88 | OFFSET(TI_FLAGS, thread_info, flags); |
99 | offset("TI_TP_VALUE", struct thread_info, tp_value); | 89 | OFFSET(TI_TP_VALUE, thread_info, tp_value); |
100 | offset("TI_CPU", struct thread_info, cpu); | 90 | OFFSET(TI_CPU, thread_info, cpu); |
101 | offset("TI_PRE_COUNT", struct thread_info, preempt_count); | 91 | OFFSET(TI_PRE_COUNT, thread_info, preempt_count); |
102 | offset("TI_ADDR_LIMIT", struct thread_info, addr_limit); | 92 | OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); |
103 | offset("TI_RESTART_BLOCK", struct thread_info, restart_block); | 93 | OFFSET(TI_RESTART_BLOCK, thread_info, restart_block); |
104 | offset("TI_REGS", struct thread_info, regs); | 94 | OFFSET(TI_REGS, thread_info, regs); |
105 | constant("_THREAD_SIZE", THREAD_SIZE); | 95 | DEFINE(_THREAD_SIZE, THREAD_SIZE); |
106 | constant("_THREAD_MASK", THREAD_MASK); | 96 | DEFINE(_THREAD_MASK, THREAD_MASK); |
107 | linefeed; | 97 | BLANK(); |
108 | } | 98 | } |
109 | 99 | ||
110 | void output_thread_defines(void) | 100 | void output_thread_defines(void) |
111 | { | 101 | { |
112 | text("MIPS specific thread_struct offsets."); | 102 | COMMENT("MIPS specific thread_struct offsets."); |
113 | offset("THREAD_REG16", struct task_struct, thread.reg16); | 103 | OFFSET(THREAD_REG16, task_struct, thread.reg16); |
114 | offset("THREAD_REG17", struct task_struct, thread.reg17); | 104 | OFFSET(THREAD_REG17, task_struct, thread.reg17); |
115 | offset("THREAD_REG18", struct task_struct, thread.reg18); | 105 | OFFSET(THREAD_REG18, task_struct, thread.reg18); |
116 | offset("THREAD_REG19", struct task_struct, thread.reg19); | 106 | OFFSET(THREAD_REG19, task_struct, thread.reg19); |
117 | offset("THREAD_REG20", struct task_struct, thread.reg20); | 107 | OFFSET(THREAD_REG20, task_struct, thread.reg20); |
118 | offset("THREAD_REG21", struct task_struct, thread.reg21); | 108 | OFFSET(THREAD_REG21, task_struct, thread.reg21); |
119 | offset("THREAD_REG22", struct task_struct, thread.reg22); | 109 | OFFSET(THREAD_REG22, task_struct, thread.reg22); |
120 | offset("THREAD_REG23", struct task_struct, thread.reg23); | 110 | OFFSET(THREAD_REG23, task_struct, thread.reg23); |
121 | offset("THREAD_REG29", struct task_struct, thread.reg29); | 111 | OFFSET(THREAD_REG29, task_struct, thread.reg29); |
122 | offset("THREAD_REG30", struct task_struct, thread.reg30); | 112 | OFFSET(THREAD_REG30, task_struct, thread.reg30); |
123 | offset("THREAD_REG31", struct task_struct, thread.reg31); | 113 | OFFSET(THREAD_REG31, task_struct, thread.reg31); |
124 | offset("THREAD_STATUS", struct task_struct, | 114 | OFFSET(THREAD_STATUS, task_struct, |
125 | thread.cp0_status); | 115 | thread.cp0_status); |
126 | offset("THREAD_FPU", struct task_struct, thread.fpu); | 116 | OFFSET(THREAD_FPU, task_struct, thread.fpu); |
127 | 117 | ||
128 | offset("THREAD_BVADDR", struct task_struct, \ | 118 | OFFSET(THREAD_BVADDR, task_struct, \ |
129 | thread.cp0_badvaddr); | 119 | thread.cp0_badvaddr); |
130 | offset("THREAD_BUADDR", struct task_struct, \ | 120 | OFFSET(THREAD_BUADDR, task_struct, \ |
131 | thread.cp0_baduaddr); | 121 | thread.cp0_baduaddr); |
132 | offset("THREAD_ECODE", struct task_struct, \ | 122 | OFFSET(THREAD_ECODE, task_struct, \ |
133 | thread.error_code); | 123 | thread.error_code); |
134 | offset("THREAD_TRAPNO", struct task_struct, thread.trap_no); | 124 | OFFSET(THREAD_TRAPNO, task_struct, thread.trap_no); |
135 | offset("THREAD_TRAMP", struct task_struct, \ | 125 | OFFSET(THREAD_TRAMP, task_struct, \ |
136 | thread.irix_trampoline); | 126 | thread.irix_trampoline); |
137 | offset("THREAD_OLDCTX", struct task_struct, \ | 127 | OFFSET(THREAD_OLDCTX, task_struct, \ |
138 | thread.irix_oldctx); | 128 | thread.irix_oldctx); |
139 | linefeed; | 129 | BLANK(); |
140 | } | 130 | } |
141 | 131 | ||
142 | void output_thread_fpu_defines(void) | 132 | void output_thread_fpu_defines(void) |
143 | { | 133 | { |
144 | offset("THREAD_FPR0", | 134 | OFFSET(THREAD_FPR0, task_struct, thread.fpu.fpr[0]); |
145 | struct task_struct, thread.fpu.fpr[0]); | 135 | OFFSET(THREAD_FPR1, task_struct, thread.fpu.fpr[1]); |
146 | offset("THREAD_FPR1", | 136 | OFFSET(THREAD_FPR2, task_struct, thread.fpu.fpr[2]); |
147 | struct task_struct, thread.fpu.fpr[1]); | 137 | OFFSET(THREAD_FPR3, task_struct, thread.fpu.fpr[3]); |
148 | offset("THREAD_FPR2", | 138 | OFFSET(THREAD_FPR4, task_struct, thread.fpu.fpr[4]); |
149 | struct task_struct, thread.fpu.fpr[2]); | 139 | OFFSET(THREAD_FPR5, task_struct, thread.fpu.fpr[5]); |
150 | offset("THREAD_FPR3", | 140 | OFFSET(THREAD_FPR6, task_struct, thread.fpu.fpr[6]); |
151 | struct task_struct, thread.fpu.fpr[3]); | 141 | OFFSET(THREAD_FPR7, task_struct, thread.fpu.fpr[7]); |
152 | offset("THREAD_FPR4", | 142 | OFFSET(THREAD_FPR8, task_struct, thread.fpu.fpr[8]); |
153 | struct task_struct, thread.fpu.fpr[4]); | 143 | OFFSET(THREAD_FPR9, task_struct, thread.fpu.fpr[9]); |
154 | offset("THREAD_FPR5", | 144 | OFFSET(THREAD_FPR10, task_struct, thread.fpu.fpr[10]); |
155 | struct task_struct, thread.fpu.fpr[5]); | 145 | OFFSET(THREAD_FPR11, task_struct, thread.fpu.fpr[11]); |
156 | offset("THREAD_FPR6", | 146 | OFFSET(THREAD_FPR12, task_struct, thread.fpu.fpr[12]); |
157 | struct task_struct, thread.fpu.fpr[6]); | 147 | OFFSET(THREAD_FPR13, task_struct, thread.fpu.fpr[13]); |
158 | offset("THREAD_FPR7", | 148 | OFFSET(THREAD_FPR14, task_struct, thread.fpu.fpr[14]); |
159 | struct task_struct, thread.fpu.fpr[7]); | 149 | OFFSET(THREAD_FPR15, task_struct, thread.fpu.fpr[15]); |
160 | offset("THREAD_FPR8", | 150 | OFFSET(THREAD_FPR16, task_struct, thread.fpu.fpr[16]); |
161 | struct task_struct, thread.fpu.fpr[8]); | 151 | OFFSET(THREAD_FPR17, task_struct, thread.fpu.fpr[17]); |
162 | offset("THREAD_FPR9", | 152 | OFFSET(THREAD_FPR18, task_struct, thread.fpu.fpr[18]); |
163 | struct task_struct, thread.fpu.fpr[9]); | 153 | OFFSET(THREAD_FPR19, task_struct, thread.fpu.fpr[19]); |
164 | offset("THREAD_FPR10", | 154 | OFFSET(THREAD_FPR20, task_struct, thread.fpu.fpr[20]); |
165 | struct task_struct, thread.fpu.fpr[10]); | 155 | OFFSET(THREAD_FPR21, task_struct, thread.fpu.fpr[21]); |
166 | offset("THREAD_FPR11", | 156 | OFFSET(THREAD_FPR22, task_struct, thread.fpu.fpr[22]); |
167 | struct task_struct, thread.fpu.fpr[11]); | 157 | OFFSET(THREAD_FPR23, task_struct, thread.fpu.fpr[23]); |
168 | offset("THREAD_FPR12", | 158 | OFFSET(THREAD_FPR24, task_struct, thread.fpu.fpr[24]); |
169 | struct task_struct, thread.fpu.fpr[12]); | 159 | OFFSET(THREAD_FPR25, task_struct, thread.fpu.fpr[25]); |
170 | offset("THREAD_FPR13", | 160 | OFFSET(THREAD_FPR26, task_struct, thread.fpu.fpr[26]); |
171 | struct task_struct, thread.fpu.fpr[13]); | 161 | OFFSET(THREAD_FPR27, task_struct, thread.fpu.fpr[27]); |
172 | offset("THREAD_FPR14", | 162 | OFFSET(THREAD_FPR28, task_struct, thread.fpu.fpr[28]); |
173 | struct task_struct, thread.fpu.fpr[14]); | 163 | OFFSET(THREAD_FPR29, task_struct, thread.fpu.fpr[29]); |
174 | offset("THREAD_FPR15", | 164 | OFFSET(THREAD_FPR30, task_struct, thread.fpu.fpr[30]); |
175 | struct task_struct, thread.fpu.fpr[15]); | 165 | OFFSET(THREAD_FPR31, task_struct, thread.fpu.fpr[31]); |
176 | offset("THREAD_FPR16", | ||
177 | struct task_struct, thread.fpu.fpr[16]); | ||
178 | offset("THREAD_FPR17", | ||
179 | struct task_struct, thread.fpu.fpr[17]); | ||
180 | offset("THREAD_FPR18", | ||
181 | struct task_struct, thread.fpu.fpr[18]); | ||
182 | offset("THREAD_FPR19", | ||
183 | struct task_struct, thread.fpu.fpr[19]); | ||
184 | offset("THREAD_FPR20", | ||
185 | struct task_struct, thread.fpu.fpr[20]); | ||
186 | offset("THREAD_FPR21", | ||
187 | struct task_struct, thread.fpu.fpr[21]); | ||
188 | offset("THREAD_FPR22", | ||
189 | struct task_struct, thread.fpu.fpr[22]); | ||
190 | offset("THREAD_FPR23", | ||
191 | struct task_struct, thread.fpu.fpr[23]); | ||
192 | offset("THREAD_FPR24", | ||
193 | struct task_struct, thread.fpu.fpr[24]); | ||
194 | offset("THREAD_FPR25", | ||
195 | struct task_struct, thread.fpu.fpr[25]); | ||
196 | offset("THREAD_FPR26", | ||
197 | struct task_struct, thread.fpu.fpr[26]); | ||
198 | offset("THREAD_FPR27", | ||
199 | struct task_struct, thread.fpu.fpr[27]); | ||
200 | offset("THREAD_FPR28", | ||
201 | struct task_struct, thread.fpu.fpr[28]); | ||
202 | offset("THREAD_FPR29", | ||
203 | struct task_struct, thread.fpu.fpr[29]); | ||
204 | offset("THREAD_FPR30", | ||
205 | struct task_struct, thread.fpu.fpr[30]); | ||
206 | offset("THREAD_FPR31", | ||
207 | struct task_struct, thread.fpu.fpr[31]); | ||
208 | 166 | ||
209 | offset("THREAD_FCR31", | 167 | OFFSET(THREAD_FCR31, task_struct, thread.fpu.fcr31); |
210 | struct task_struct, thread.fpu.fcr31); | 168 | BLANK(); |
211 | linefeed; | ||
212 | } | 169 | } |
213 | 170 | ||
214 | void output_mm_defines(void) | 171 | void output_mm_defines(void) |
215 | { | 172 | { |
216 | text("Size of struct page"); | 173 | COMMENT("Size of struct page"); |
217 | size("STRUCT_PAGE_SIZE", struct page); | 174 | DEFINE(STRUCT_PAGE_SIZE, sizeof(struct page)); |
218 | linefeed; | 175 | BLANK(); |
219 | text("Linux mm_struct offsets."); | 176 | COMMENT("Linux mm_struct offsets."); |
220 | offset("MM_USERS", struct mm_struct, mm_users); | 177 | OFFSET(MM_USERS, mm_struct, mm_users); |
221 | offset("MM_PGD", struct mm_struct, pgd); | 178 | OFFSET(MM_PGD, mm_struct, pgd); |
222 | offset("MM_CONTEXT", struct mm_struct, context); | 179 | OFFSET(MM_CONTEXT, mm_struct, context); |
223 | linefeed; | 180 | BLANK(); |
224 | constant("_PAGE_SIZE", PAGE_SIZE); | 181 | DEFINE(_PAGE_SIZE, PAGE_SIZE); |
225 | constant("_PAGE_SHIFT", PAGE_SHIFT); | 182 | DEFINE(_PAGE_SHIFT, PAGE_SHIFT); |
226 | linefeed; | 183 | BLANK(); |
227 | constant("_PGD_T_SIZE", sizeof(pgd_t)); | 184 | DEFINE(_PGD_T_SIZE, sizeof(pgd_t)); |
228 | constant("_PMD_T_SIZE", sizeof(pmd_t)); | 185 | DEFINE(_PMD_T_SIZE, sizeof(pmd_t)); |
229 | constant("_PTE_T_SIZE", sizeof(pte_t)); | 186 | DEFINE(_PTE_T_SIZE, sizeof(pte_t)); |
230 | linefeed; | 187 | BLANK(); |
231 | constant("_PGD_T_LOG2", PGD_T_LOG2); | 188 | DEFINE(_PGD_T_LOG2, PGD_T_LOG2); |
232 | constant("_PMD_T_LOG2", PMD_T_LOG2); | 189 | DEFINE(_PMD_T_LOG2, PMD_T_LOG2); |
233 | constant("_PTE_T_LOG2", PTE_T_LOG2); | 190 | DEFINE(_PTE_T_LOG2, PTE_T_LOG2); |
234 | linefeed; | 191 | BLANK(); |
235 | constant("_PGD_ORDER", PGD_ORDER); | 192 | DEFINE(_PGD_ORDER, PGD_ORDER); |
236 | constant("_PMD_ORDER", PMD_ORDER); | 193 | DEFINE(_PMD_ORDER, PMD_ORDER); |
237 | constant("_PTE_ORDER", PTE_ORDER); | 194 | DEFINE(_PTE_ORDER, PTE_ORDER); |
238 | linefeed; | 195 | BLANK(); |
239 | constant("_PMD_SHIFT", PMD_SHIFT); | 196 | DEFINE(_PMD_SHIFT, PMD_SHIFT); |
240 | constant("_PGDIR_SHIFT", PGDIR_SHIFT); | 197 | DEFINE(_PGDIR_SHIFT, PGDIR_SHIFT); |
241 | linefeed; | 198 | BLANK(); |
242 | constant("_PTRS_PER_PGD", PTRS_PER_PGD); | 199 | DEFINE(_PTRS_PER_PGD, PTRS_PER_PGD); |
243 | constant("_PTRS_PER_PMD", PTRS_PER_PMD); | 200 | DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD); |
244 | constant("_PTRS_PER_PTE", PTRS_PER_PTE); | 201 | DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE); |
245 | linefeed; | 202 | BLANK(); |
246 | } | 203 | } |
247 | 204 | ||
248 | #ifdef CONFIG_32BIT | 205 | #ifdef CONFIG_32BIT |
249 | void output_sc_defines(void) | 206 | void output_sc_defines(void) |
250 | { | 207 | { |
251 | text("Linux sigcontext offsets."); | 208 | COMMENT("Linux sigcontext offsets."); |
252 | offset("SC_REGS", struct sigcontext, sc_regs); | 209 | OFFSET(SC_REGS, sigcontext, sc_regs); |
253 | offset("SC_FPREGS", struct sigcontext, sc_fpregs); | 210 | OFFSET(SC_FPREGS, sigcontext, sc_fpregs); |
254 | offset("SC_ACX", struct sigcontext, sc_acx); | 211 | OFFSET(SC_ACX, sigcontext, sc_acx); |
255 | offset("SC_MDHI", struct sigcontext, sc_mdhi); | 212 | OFFSET(SC_MDHI, sigcontext, sc_mdhi); |
256 | offset("SC_MDLO", struct sigcontext, sc_mdlo); | 213 | OFFSET(SC_MDLO, sigcontext, sc_mdlo); |
257 | offset("SC_PC", struct sigcontext, sc_pc); | 214 | OFFSET(SC_PC, sigcontext, sc_pc); |
258 | offset("SC_FPC_CSR", struct sigcontext, sc_fpc_csr); | 215 | OFFSET(SC_FPC_CSR, sigcontext, sc_fpc_csr); |
259 | offset("SC_FPC_EIR", struct sigcontext, sc_fpc_eir); | 216 | OFFSET(SC_FPC_EIR, sigcontext, sc_fpc_eir); |
260 | offset("SC_HI1", struct sigcontext, sc_hi1); | 217 | OFFSET(SC_HI1, sigcontext, sc_hi1); |
261 | offset("SC_LO1", struct sigcontext, sc_lo1); | 218 | OFFSET(SC_LO1, sigcontext, sc_lo1); |
262 | offset("SC_HI2", struct sigcontext, sc_hi2); | 219 | OFFSET(SC_HI2, sigcontext, sc_hi2); |
263 | offset("SC_LO2", struct sigcontext, sc_lo2); | 220 | OFFSET(SC_LO2, sigcontext, sc_lo2); |
264 | offset("SC_HI3", struct sigcontext, sc_hi3); | 221 | OFFSET(SC_HI3, sigcontext, sc_hi3); |
265 | offset("SC_LO3", struct sigcontext, sc_lo3); | 222 | OFFSET(SC_LO3, sigcontext, sc_lo3); |
266 | linefeed; | 223 | BLANK(); |
267 | } | 224 | } |
268 | #endif | 225 | #endif |
269 | 226 | ||
270 | #ifdef CONFIG_64BIT | 227 | #ifdef CONFIG_64BIT |
271 | void output_sc_defines(void) | 228 | void output_sc_defines(void) |
272 | { | 229 | { |
273 | text("Linux sigcontext offsets."); | 230 | COMMENT("Linux sigcontext offsets."); |
274 | offset("SC_REGS", struct sigcontext, sc_regs); | 231 | OFFSET(SC_REGS, sigcontext, sc_regs); |
275 | offset("SC_FPREGS", struct sigcontext, sc_fpregs); | 232 | OFFSET(SC_FPREGS, sigcontext, sc_fpregs); |
276 | offset("SC_MDHI", struct sigcontext, sc_mdhi); | 233 | OFFSET(SC_MDHI, sigcontext, sc_mdhi); |
277 | offset("SC_MDLO", struct sigcontext, sc_mdlo); | 234 | OFFSET(SC_MDLO, sigcontext, sc_mdlo); |
278 | offset("SC_PC", struct sigcontext, sc_pc); | 235 | OFFSET(SC_PC, sigcontext, sc_pc); |
279 | offset("SC_FPC_CSR", struct sigcontext, sc_fpc_csr); | 236 | OFFSET(SC_FPC_CSR, sigcontext, sc_fpc_csr); |
280 | linefeed; | 237 | BLANK(); |
281 | } | 238 | } |
282 | #endif | 239 | #endif |
283 | 240 | ||
284 | #ifdef CONFIG_MIPS32_COMPAT | 241 | #ifdef CONFIG_MIPS32_COMPAT |
285 | void output_sc32_defines(void) | 242 | void output_sc32_defines(void) |
286 | { | 243 | { |
287 | text("Linux 32-bit sigcontext offsets."); | 244 | COMMENT("Linux 32-bit sigcontext offsets."); |
288 | offset("SC32_FPREGS", struct sigcontext32, sc_fpregs); | 245 | OFFSET(SC32_FPREGS, sigcontext32, sc_fpregs); |
289 | offset("SC32_FPC_CSR", struct sigcontext32, sc_fpc_csr); | 246 | OFFSET(SC32_FPC_CSR, sigcontext32, sc_fpc_csr); |
290 | offset("SC32_FPC_EIR", struct sigcontext32, sc_fpc_eir); | 247 | OFFSET(SC32_FPC_EIR, sigcontext32, sc_fpc_eir); |
291 | linefeed; | 248 | BLANK(); |
292 | } | 249 | } |
293 | #endif | 250 | #endif |
294 | 251 | ||
295 | void output_signal_defined(void) | 252 | void output_signal_defined(void) |
296 | { | 253 | { |
297 | text("Linux signal numbers."); | 254 | COMMENT("Linux signal numbers."); |
298 | constant("_SIGHUP", SIGHUP); | 255 | DEFINE(_SIGHUP, SIGHUP); |
299 | constant("_SIGINT", SIGINT); | 256 | DEFINE(_SIGINT, SIGINT); |
300 | constant("_SIGQUIT", SIGQUIT); | 257 | DEFINE(_SIGQUIT, SIGQUIT); |
301 | constant("_SIGILL", SIGILL); | 258 | DEFINE(_SIGILL, SIGILL); |
302 | constant("_SIGTRAP", SIGTRAP); | 259 | DEFINE(_SIGTRAP, SIGTRAP); |
303 | constant("_SIGIOT", SIGIOT); | 260 | DEFINE(_SIGIOT, SIGIOT); |
304 | constant("_SIGABRT", SIGABRT); | 261 | DEFINE(_SIGABRT, SIGABRT); |
305 | constant("_SIGEMT", SIGEMT); | 262 | DEFINE(_SIGEMT, SIGEMT); |
306 | constant("_SIGFPE", SIGFPE); | 263 | DEFINE(_SIGFPE, SIGFPE); |
307 | constant("_SIGKILL", SIGKILL); | 264 | DEFINE(_SIGKILL, SIGKILL); |
308 | constant("_SIGBUS", SIGBUS); | 265 | DEFINE(_SIGBUS, SIGBUS); |
309 | constant("_SIGSEGV", SIGSEGV); | 266 | DEFINE(_SIGSEGV, SIGSEGV); |
310 | constant("_SIGSYS", SIGSYS); | 267 | DEFINE(_SIGSYS, SIGSYS); |
311 | constant("_SIGPIPE", SIGPIPE); | 268 | DEFINE(_SIGPIPE, SIGPIPE); |
312 | constant("_SIGALRM", SIGALRM); | 269 | DEFINE(_SIGALRM, SIGALRM); |
313 | constant("_SIGTERM", SIGTERM); | 270 | DEFINE(_SIGTERM, SIGTERM); |
314 | constant("_SIGUSR1", SIGUSR1); | 271 | DEFINE(_SIGUSR1, SIGUSR1); |
315 | constant("_SIGUSR2", SIGUSR2); | 272 | DEFINE(_SIGUSR2, SIGUSR2); |
316 | constant("_SIGCHLD", SIGCHLD); | 273 | DEFINE(_SIGCHLD, SIGCHLD); |
317 | constant("_SIGPWR", SIGPWR); | 274 | DEFINE(_SIGPWR, SIGPWR); |
318 | constant("_SIGWINCH", SIGWINCH); | 275 | DEFINE(_SIGWINCH, SIGWINCH); |
319 | constant("_SIGURG", SIGURG); | 276 | DEFINE(_SIGURG, SIGURG); |
320 | constant("_SIGIO", SIGIO); | 277 | DEFINE(_SIGIO, SIGIO); |
321 | constant("_SIGSTOP", SIGSTOP); | 278 | DEFINE(_SIGSTOP, SIGSTOP); |
322 | constant("_SIGTSTP", SIGTSTP); | 279 | DEFINE(_SIGTSTP, SIGTSTP); |
323 | constant("_SIGCONT", SIGCONT); | 280 | DEFINE(_SIGCONT, SIGCONT); |
324 | constant("_SIGTTIN", SIGTTIN); | 281 | DEFINE(_SIGTTIN, SIGTTIN); |
325 | constant("_SIGTTOU", SIGTTOU); | 282 | DEFINE(_SIGTTOU, SIGTTOU); |
326 | constant("_SIGVTALRM", SIGVTALRM); | 283 | DEFINE(_SIGVTALRM, SIGVTALRM); |
327 | constant("_SIGPROF", SIGPROF); | 284 | DEFINE(_SIGPROF, SIGPROF); |
328 | constant("_SIGXCPU", SIGXCPU); | 285 | DEFINE(_SIGXCPU, SIGXCPU); |
329 | constant("_SIGXFSZ", SIGXFSZ); | 286 | DEFINE(_SIGXFSZ, SIGXFSZ); |
330 | linefeed; | 287 | BLANK(); |
331 | } | 288 | } |
332 | 289 | ||
333 | void output_irq_cpustat_t_defines(void) | 290 | void output_irq_cpustat_t_defines(void) |
334 | { | 291 | { |
335 | text("Linux irq_cpustat_t offsets."); | 292 | COMMENT("Linux irq_cpustat_t offsets."); |
336 | offset("IC_SOFTIRQ_PENDING", irq_cpustat_t, __softirq_pending); | 293 | DEFINE(IC_SOFTIRQ_PENDING, |
337 | size("IC_IRQ_CPUSTAT_T", irq_cpustat_t); | 294 | offsetof(irq_cpustat_t, __softirq_pending)); |
338 | linefeed; | 295 | DEFINE(IC_IRQ_CPUSTAT_T, sizeof(irq_cpustat_t)); |
296 | BLANK(); | ||
339 | } | 297 | } |
diff --git a/arch/mips/lib/iomap-pci.c b/arch/mips/lib/iomap-pci.c index c11b2494bb6e..2ab899c4b4ce 100644 --- a/arch/mips/lib/iomap-pci.c +++ b/arch/mips/lib/iomap-pci.c | |||
@@ -45,8 +45,8 @@ static void __iomem *ioport_map_pci(struct pci_dev *dev, | |||
45 | */ | 45 | */ |
46 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 46 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
47 | { | 47 | { |
48 | unsigned long start = pci_resource_start(dev, bar); | 48 | resource_size_t start = pci_resource_start(dev, bar); |
49 | unsigned long len = pci_resource_len(dev, bar); | 49 | resource_size_t len = pci_resource_len(dev, bar); |
50 | unsigned long flags = pci_resource_flags(dev, bar); | 50 | unsigned long flags = pci_resource_flags(dev, bar); |
51 | 51 | ||
52 | if (!len || !start) | 52 | if (!len || !start) |
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c index 855977ca51cd..6537d90a25bb 100644 --- a/arch/mips/pmc-sierra/yosemite/setup.c +++ b/arch/mips/pmc-sierra/yosemite/setup.c | |||
@@ -143,9 +143,6 @@ void __init plat_time_init(void) | |||
143 | mips_hpt_frequency = 33000000 * 3 * 5; | 143 | mips_hpt_frequency = 33000000 * 3 * 5; |
144 | } | 144 | } |
145 | 145 | ||
146 | /* No other usable initialization hook than this ... */ | ||
147 | extern void (*late_time_init)(void); | ||
148 | |||
149 | unsigned long ocd_base; | 146 | unsigned long ocd_base; |
150 | 147 | ||
151 | EXPORT_SYMBOL(ocd_base); | 148 | EXPORT_SYMBOL(ocd_base); |
diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c index ee2d9f8af5ad..2646fcbd7d89 100644 --- a/arch/mn10300/kernel/asm-offsets.c +++ b/arch/mn10300/kernel/asm-offsets.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/signal.h> | 8 | #include <linux/signal.h> |
9 | #include <linux/personality.h> | 9 | #include <linux/personality.h> |
10 | #include <linux/kbuild.h> | ||
10 | #include <asm/ucontext.h> | 11 | #include <asm/ucontext.h> |
11 | #include <asm/processor.h> | 12 | #include <asm/processor.h> |
12 | #include <asm/thread_info.h> | 13 | #include <asm/thread_info.h> |
@@ -14,14 +15,6 @@ | |||
14 | #include "sigframe.h" | 15 | #include "sigframe.h" |
15 | #include "mn10300-serial.h" | 16 | #include "mn10300-serial.h" |
16 | 17 | ||
17 | #define DEFINE(sym, val) \ | ||
18 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
19 | |||
20 | #define BLANK() asm volatile("\n->") | ||
21 | |||
22 | #define OFFSET(sym, str, mem) \ | ||
23 | DEFINE(sym, offsetof(struct str, mem)); | ||
24 | |||
25 | void foo(void) | 18 | void foo(void) |
26 | { | 19 | { |
27 | OFFSET(SIGCONTEXT_d0, sigcontext, d0); | 20 | OFFSET(SIGCONTEXT_d0, sigcontext, d0); |
diff --git a/arch/mn10300/unit-asb2305/pci-iomap.c b/arch/mn10300/unit-asb2305/pci-iomap.c index dbceae4307da..c1a8d8f941fd 100644 --- a/arch/mn10300/unit-asb2305/pci-iomap.c +++ b/arch/mn10300/unit-asb2305/pci-iomap.c | |||
@@ -16,8 +16,8 @@ | |||
16 | */ | 16 | */ |
17 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 17 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
18 | { | 18 | { |
19 | unsigned long start = pci_resource_start(dev, bar); | 19 | resource_size_t start = pci_resource_start(dev, bar); |
20 | unsigned long len = pci_resource_len(dev, bar); | 20 | resource_size_t len = pci_resource_len(dev, bar); |
21 | unsigned long flags = pci_resource_flags(dev, bar); | 21 | unsigned long flags = pci_resource_flags(dev, bar); |
22 | 22 | ||
23 | if (!len || !start) | 23 | if (!len || !start) |
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c index eaa79bc14d94..3efc0b73e4ff 100644 --- a/arch/parisc/kernel/asm-offsets.c +++ b/arch/parisc/kernel/asm-offsets.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/thread_info.h> | 32 | #include <linux/thread_info.h> |
33 | #include <linux/ptrace.h> | 33 | #include <linux/ptrace.h> |
34 | #include <linux/hardirq.h> | 34 | #include <linux/hardirq.h> |
35 | #include <linux/kbuild.h> | ||
35 | 36 | ||
36 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
37 | #include <asm/ptrace.h> | 38 | #include <asm/ptrace.h> |
@@ -39,11 +40,6 @@ | |||
39 | #include <asm/pdc.h> | 40 | #include <asm/pdc.h> |
40 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
41 | 42 | ||
42 | #define DEFINE(sym, val) \ | ||
43 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
44 | |||
45 | #define BLANK() asm volatile("\n->" : : ) | ||
46 | |||
47 | #ifdef CONFIG_64BIT | 43 | #ifdef CONFIG_64BIT |
48 | #define FRAME_SIZE 128 | 44 | #define FRAME_SIZE 128 |
49 | #else | 45 | #else |
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 9448d4e91142..ccd61b9567a6 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
@@ -397,10 +397,9 @@ pcxl_dma_init(void) | |||
397 | "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); | 397 | "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); |
398 | else { | 398 | else { |
399 | struct proc_dir_entry* ent; | 399 | struct proc_dir_entry* ent; |
400 | ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root); | 400 | ent = proc_create("pcxl_dma", 0, proc_gsc_root, |
401 | if (ent) | 401 | &proc_pcxl_dma_ops); |
402 | ent->proc_fops = &proc_pcxl_dma_ops; | 402 | if (!ent) |
403 | else | ||
404 | printk(KERN_WARNING | 403 | printk(KERN_WARNING |
405 | "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); | 404 | "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); |
406 | } | 405 | } |
diff --git a/arch/parisc/lib/iomap.c b/arch/parisc/lib/iomap.c index f4a811690ab3..9abed07db7fc 100644 --- a/arch/parisc/lib/iomap.c +++ b/arch/parisc/lib/iomap.c | |||
@@ -438,8 +438,8 @@ void ioport_unmap(void __iomem *addr) | |||
438 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 438 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ |
439 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 439 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
440 | { | 440 | { |
441 | unsigned long start = pci_resource_start(dev, bar); | 441 | resource_size_t start = pci_resource_start(dev, bar); |
442 | unsigned long len = pci_resource_len(dev, bar); | 442 | resource_size_t len = pci_resource_len(dev, bar); |
443 | unsigned long flags = pci_resource_flags(dev, bar); | 443 | unsigned long flags = pci_resource_flags(dev, bar); |
444 | 444 | ||
445 | if (!len || !start) | 445 | if (!len || !start) |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4e40c122bf26..3934e2659407 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -608,6 +608,19 @@ source "drivers/pcmcia/Kconfig" | |||
608 | 608 | ||
609 | source "drivers/pci/hotplug/Kconfig" | 609 | source "drivers/pci/hotplug/Kconfig" |
610 | 610 | ||
611 | config HAS_RAPIDIO | ||
612 | bool | ||
613 | default n | ||
614 | |||
615 | config RAPIDIO | ||
616 | bool "RapidIO support" | ||
617 | depends on HAS_RAPIDIO | ||
618 | help | ||
619 | If you say Y here, the kernel will include drivers and | ||
620 | infrastructure code to support RapidIO interconnect devices. | ||
621 | |||
622 | source "drivers/rapidio/Kconfig" | ||
623 | |||
611 | endmenu | 624 | endmenu |
612 | 625 | ||
613 | menu "Advanced setup" | 626 | menu "Advanced setup" |
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 807a2dce6263..a7d24e692bab 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
@@ -118,7 +118,6 @@ config XMON_DISASSEMBLY | |||
118 | 118 | ||
119 | config IRQSTACKS | 119 | config IRQSTACKS |
120 | bool "Use separate kernel stacks when processing interrupts" | 120 | bool "Use separate kernel stacks when processing interrupts" |
121 | depends on PPC64 | ||
122 | help | 121 | help |
123 | If you say Y here the kernel will use separate kernel stacks | 122 | If you say Y here the kernel will use separate kernel stacks |
124 | for handling hard and soft interrupts. This can help avoid | 123 | for handling hard and soft interrupts. This can help avoid |
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts index c6ca6319e4f7..2f74cc4e093e 100644 --- a/arch/powerpc/boot/dts/cm5200.dts +++ b/arch/powerpc/boot/dts/cm5200.dts | |||
@@ -10,11 +10,7 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* | 13 | /dts-v1/; |
14 | * WARNING: Do not depend on this tree layout remaining static just yet. | ||
15 | * The MPC5200 device tree conventions are still in flux | ||
16 | * Keep an eye on the linuxppc-dev mailing list for more details | ||
17 | */ | ||
18 | 14 | ||
19 | / { | 15 | / { |
20 | model = "schindler,cm5200"; | 16 | model = "schindler,cm5200"; |
@@ -29,10 +25,10 @@ | |||
29 | PowerPC,5200@0 { | 25 | PowerPC,5200@0 { |
30 | device_type = "cpu"; | 26 | device_type = "cpu"; |
31 | reg = <0>; | 27 | reg = <0>; |
32 | d-cache-line-size = <20>; | 28 | d-cache-line-size = <32>; |
33 | i-cache-line-size = <20>; | 29 | i-cache-line-size = <32>; |
34 | d-cache-size = <4000>; // L1, 16K | 30 | d-cache-size = <0x4000>; // L1, 16K |
35 | i-cache-size = <4000>; // L1, 16K | 31 | i-cache-size = <0x4000>; // L1, 16K |
36 | timebase-frequency = <0>; // from bootloader | 32 | timebase-frequency = <0>; // from bootloader |
37 | bus-frequency = <0>; // from bootloader | 33 | bus-frequency = <0>; // from bootloader |
38 | clock-frequency = <0>; // from bootloader | 34 | clock-frequency = <0>; // from bootloader |
@@ -41,34 +37,34 @@ | |||
41 | 37 | ||
42 | memory { | 38 | memory { |
43 | device_type = "memory"; | 39 | device_type = "memory"; |
44 | reg = <00000000 04000000>; // 64MB | 40 | reg = <0x00000000 0x04000000>; // 64MB |
45 | }; | 41 | }; |
46 | 42 | ||
47 | soc5200@f0000000 { | 43 | soc5200@f0000000 { |
48 | #address-cells = <1>; | 44 | #address-cells = <1>; |
49 | #size-cells = <1>; | 45 | #size-cells = <1>; |
50 | compatible = "fsl,mpc5200b-immr"; | 46 | compatible = "fsl,mpc5200b-immr"; |
51 | ranges = <0 f0000000 0000c000>; | 47 | ranges = <0 0xf0000000 0x0000c000>; |
52 | reg = <f0000000 00000100>; | 48 | reg = <0xf0000000 0x00000100>; |
53 | bus-frequency = <0>; // from bootloader | 49 | bus-frequency = <0>; // from bootloader |
54 | system-frequency = <0>; // from bootloader | 50 | system-frequency = <0>; // from bootloader |
55 | 51 | ||
56 | cdm@200 { | 52 | cdm@200 { |
57 | compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; | 53 | compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; |
58 | reg = <200 38>; | 54 | reg = <0x200 0x38>; |
59 | }; | 55 | }; |
60 | 56 | ||
61 | mpc5200_pic: pic@500 { | 57 | mpc5200_pic: interrupt-controller@500 { |
62 | // 5200 interrupts are encoded into two levels; | 58 | // 5200 interrupts are encoded into two levels; |
63 | interrupt-controller; | 59 | interrupt-controller; |
64 | #interrupt-cells = <3>; | 60 | #interrupt-cells = <3>; |
65 | compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; | 61 | compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; |
66 | reg = <500 80>; | 62 | reg = <0x500 0x80>; |
67 | }; | 63 | }; |
68 | 64 | ||
69 | timer@600 { // General Purpose Timer | 65 | timer@600 { // General Purpose Timer |
70 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 66 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
71 | reg = <600 10>; | 67 | reg = <0x600 0x10>; |
72 | interrupts = <1 9 0>; | 68 | interrupts = <1 9 0>; |
73 | interrupt-parent = <&mpc5200_pic>; | 69 | interrupt-parent = <&mpc5200_pic>; |
74 | fsl,has-wdt; | 70 | fsl,has-wdt; |
@@ -76,108 +72,108 @@ | |||
76 | 72 | ||
77 | timer@610 { // General Purpose Timer | 73 | timer@610 { // General Purpose Timer |
78 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 74 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
79 | reg = <610 10>; | 75 | reg = <0x610 0x10>; |
80 | interrupts = <1 a 0>; | 76 | interrupts = <1 10 0>; |
81 | interrupt-parent = <&mpc5200_pic>; | 77 | interrupt-parent = <&mpc5200_pic>; |
82 | }; | 78 | }; |
83 | 79 | ||
84 | timer@620 { // General Purpose Timer | 80 | timer@620 { // General Purpose Timer |
85 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 81 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
86 | reg = <620 10>; | 82 | reg = <0x620 0x10>; |
87 | interrupts = <1 b 0>; | 83 | interrupts = <1 11 0>; |
88 | interrupt-parent = <&mpc5200_pic>; | 84 | interrupt-parent = <&mpc5200_pic>; |
89 | }; | 85 | }; |
90 | 86 | ||
91 | timer@630 { // General Purpose Timer | 87 | timer@630 { // General Purpose Timer |
92 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 88 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
93 | reg = <630 10>; | 89 | reg = <0x630 0x10>; |
94 | interrupts = <1 c 0>; | 90 | interrupts = <1 12 0>; |
95 | interrupt-parent = <&mpc5200_pic>; | 91 | interrupt-parent = <&mpc5200_pic>; |
96 | }; | 92 | }; |
97 | 93 | ||
98 | timer@640 { // General Purpose Timer | 94 | timer@640 { // General Purpose Timer |
99 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 95 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
100 | reg = <640 10>; | 96 | reg = <0x640 0x10>; |
101 | interrupts = <1 d 0>; | 97 | interrupts = <1 13 0>; |
102 | interrupt-parent = <&mpc5200_pic>; | 98 | interrupt-parent = <&mpc5200_pic>; |
103 | }; | 99 | }; |
104 | 100 | ||
105 | timer@650 { // General Purpose Timer | 101 | timer@650 { // General Purpose Timer |
106 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 102 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
107 | reg = <650 10>; | 103 | reg = <0x650 0x10>; |
108 | interrupts = <1 e 0>; | 104 | interrupts = <1 14 0>; |
109 | interrupt-parent = <&mpc5200_pic>; | 105 | interrupt-parent = <&mpc5200_pic>; |
110 | }; | 106 | }; |
111 | 107 | ||
112 | timer@660 { // General Purpose Timer | 108 | timer@660 { // General Purpose Timer |
113 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 109 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
114 | reg = <660 10>; | 110 | reg = <0x660 0x10>; |
115 | interrupts = <1 f 0>; | 111 | interrupts = <1 15 0>; |
116 | interrupt-parent = <&mpc5200_pic>; | 112 | interrupt-parent = <&mpc5200_pic>; |
117 | }; | 113 | }; |
118 | 114 | ||
119 | timer@670 { // General Purpose Timer | 115 | timer@670 { // General Purpose Timer |
120 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 116 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
121 | reg = <670 10>; | 117 | reg = <0x670 0x10>; |
122 | interrupts = <1 10 0>; | 118 | interrupts = <1 16 0>; |
123 | interrupt-parent = <&mpc5200_pic>; | 119 | interrupt-parent = <&mpc5200_pic>; |
124 | }; | 120 | }; |
125 | 121 | ||
126 | rtc@800 { // Real time clock | 122 | rtc@800 { // Real time clock |
127 | compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; | 123 | compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; |
128 | reg = <800 100>; | 124 | reg = <0x800 0x100>; |
129 | interrupts = <1 5 0 1 6 0>; | 125 | interrupts = <1 5 0 1 6 0>; |
130 | interrupt-parent = <&mpc5200_pic>; | 126 | interrupt-parent = <&mpc5200_pic>; |
131 | }; | 127 | }; |
132 | 128 | ||
133 | gpio@b00 { | 129 | gpio@b00 { |
134 | compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; | 130 | compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; |
135 | reg = <b00 40>; | 131 | reg = <0xb00 0x40>; |
136 | interrupts = <1 7 0>; | 132 | interrupts = <1 7 0>; |
137 | interrupt-parent = <&mpc5200_pic>; | 133 | interrupt-parent = <&mpc5200_pic>; |
138 | }; | 134 | }; |
139 | 135 | ||
140 | gpio@c00 { | 136 | gpio@c00 { |
141 | compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; | 137 | compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; |
142 | reg = <c00 40>; | 138 | reg = <0xc00 0x40>; |
143 | interrupts = <1 8 0 0 3 0>; | 139 | interrupts = <1 8 0 0 3 0>; |
144 | interrupt-parent = <&mpc5200_pic>; | 140 | interrupt-parent = <&mpc5200_pic>; |
145 | }; | 141 | }; |
146 | 142 | ||
147 | spi@f00 { | 143 | spi@f00 { |
148 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; | 144 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; |
149 | reg = <f00 20>; | 145 | reg = <0xf00 0x20>; |
150 | interrupts = <2 d 0 2 e 0>; | 146 | interrupts = <2 13 0 2 14 0>; |
151 | interrupt-parent = <&mpc5200_pic>; | 147 | interrupt-parent = <&mpc5200_pic>; |
152 | }; | 148 | }; |
153 | 149 | ||
154 | usb@1000 { | 150 | usb@1000 { |
155 | compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; | 151 | compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; |
156 | reg = <1000 ff>; | 152 | reg = <0x1000 0xff>; |
157 | interrupts = <2 6 0>; | 153 | interrupts = <2 6 0>; |
158 | interrupt-parent = <&mpc5200_pic>; | 154 | interrupt-parent = <&mpc5200_pic>; |
159 | }; | 155 | }; |
160 | 156 | ||
161 | dma-controller@1200 { | 157 | dma-controller@1200 { |
162 | compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; | 158 | compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; |
163 | reg = <1200 80>; | 159 | reg = <0x1200 0x80>; |
164 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | 160 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 |
165 | 3 4 0 3 5 0 3 6 0 3 7 0 | 161 | 3 4 0 3 5 0 3 6 0 3 7 0 |
166 | 3 8 0 3 9 0 3 a 0 3 b 0 | 162 | 3 8 0 3 9 0 3 10 0 3 11 0 |
167 | 3 c 0 3 d 0 3 e 0 3 f 0>; | 163 | 3 12 0 3 13 0 3 14 0 3 15 0>; |
168 | interrupt-parent = <&mpc5200_pic>; | 164 | interrupt-parent = <&mpc5200_pic>; |
169 | }; | 165 | }; |
170 | 166 | ||
171 | xlb@1f00 { | 167 | xlb@1f00 { |
172 | compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb"; | 168 | compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb"; |
173 | reg = <1f00 100>; | 169 | reg = <0x1f00 0x100>; |
174 | }; | 170 | }; |
175 | 171 | ||
176 | serial@2000 { // PSC1 | 172 | serial@2000 { // PSC1 |
177 | device_type = "serial"; | 173 | device_type = "serial"; |
178 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | 174 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; |
179 | port-number = <0>; // Logical port assignment | 175 | port-number = <0>; // Logical port assignment |
180 | reg = <2000 100>; | 176 | reg = <0x2000 0x100>; |
181 | interrupts = <2 1 0>; | 177 | interrupts = <2 1 0>; |
182 | interrupt-parent = <&mpc5200_pic>; | 178 | interrupt-parent = <&mpc5200_pic>; |
183 | }; | 179 | }; |
@@ -186,7 +182,7 @@ | |||
186 | device_type = "serial"; | 182 | device_type = "serial"; |
187 | compatible = "fsl,mpc5200-psc-uart"; | 183 | compatible = "fsl,mpc5200-psc-uart"; |
188 | port-number = <1>; // Logical port assignment | 184 | port-number = <1>; // Logical port assignment |
189 | reg = <2200 100>; | 185 | reg = <0x2200 0x100>; |
190 | interrupts = <2 2 0>; | 186 | interrupts = <2 2 0>; |
191 | interrupt-parent = <&mpc5200_pic>; | 187 | interrupt-parent = <&mpc5200_pic>; |
192 | }; | 188 | }; |
@@ -195,7 +191,7 @@ | |||
195 | device_type = "serial"; | 191 | device_type = "serial"; |
196 | compatible = "fsl,mpc5200-psc-uart"; | 192 | compatible = "fsl,mpc5200-psc-uart"; |
197 | port-number = <2>; // Logical port assignment | 193 | port-number = <2>; // Logical port assignment |
198 | reg = <2400 100>; | 194 | reg = <0x2400 0x100>; |
199 | interrupts = <2 3 0>; | 195 | interrupts = <2 3 0>; |
200 | interrupt-parent = <&mpc5200_pic>; | 196 | interrupt-parent = <&mpc5200_pic>; |
201 | }; | 197 | }; |
@@ -204,7 +200,7 @@ | |||
204 | device_type = "serial"; | 200 | device_type = "serial"; |
205 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | 201 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; |
206 | port-number = <5>; // Logical port assignment | 202 | port-number = <5>; // Logical port assignment |
207 | reg = <2c00 100>; | 203 | reg = <0x2c00 0x100>; |
208 | interrupts = <2 4 0>; | 204 | interrupts = <2 4 0>; |
209 | interrupt-parent = <&mpc5200_pic>; | 205 | interrupt-parent = <&mpc5200_pic>; |
210 | }; | 206 | }; |
@@ -212,7 +208,7 @@ | |||
212 | ethernet@3000 { | 208 | ethernet@3000 { |
213 | device_type = "network"; | 209 | device_type = "network"; |
214 | compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; | 210 | compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; |
215 | reg = <3000 400>; | 211 | reg = <0x3000 0x400>; |
216 | local-mac-address = [ 00 00 00 00 00 00 ]; | 212 | local-mac-address = [ 00 00 00 00 00 00 ]; |
217 | interrupts = <2 5 0>; | 213 | interrupts = <2 5 0>; |
218 | interrupt-parent = <&mpc5200_pic>; | 214 | interrupt-parent = <&mpc5200_pic>; |
@@ -223,7 +219,7 @@ | |||
223 | #address-cells = <1>; | 219 | #address-cells = <1>; |
224 | #size-cells = <0>; | 220 | #size-cells = <0>; |
225 | compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio"; | 221 | compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio"; |
226 | reg = <3000 400>; // fec range, since we need to setup fec interrupts | 222 | reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts |
227 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. | 223 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. |
228 | interrupt-parent = <&mpc5200_pic>; | 224 | interrupt-parent = <&mpc5200_pic>; |
229 | 225 | ||
@@ -237,15 +233,15 @@ | |||
237 | #address-cells = <1>; | 233 | #address-cells = <1>; |
238 | #size-cells = <0>; | 234 | #size-cells = <0>; |
239 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; | 235 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; |
240 | reg = <3d40 40>; | 236 | reg = <0x3d40 0x40>; |
241 | interrupts = <2 10 0>; | 237 | interrupts = <2 16 0>; |
242 | interrupt-parent = <&mpc5200_pic>; | 238 | interrupt-parent = <&mpc5200_pic>; |
243 | fsl5200-clocking; | 239 | fsl5200-clocking; |
244 | }; | 240 | }; |
245 | 241 | ||
246 | sram@8000 { | 242 | sram@8000 { |
247 | compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram"; | 243 | compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram"; |
248 | reg = <8000 4000>; | 244 | reg = <0x8000 0x4000>; |
249 | }; | 245 | }; |
250 | }; | 246 | }; |
251 | 247 | ||
@@ -254,12 +250,12 @@ | |||
254 | compatible = "fsl,lpb"; | 250 | compatible = "fsl,lpb"; |
255 | #address-cells = <2>; | 251 | #address-cells = <2>; |
256 | #size-cells = <1>; | 252 | #size-cells = <1>; |
257 | ranges = <0 0 fc000000 2000000>; | 253 | ranges = <0 0 0xfc000000 0x2000000>; |
258 | 254 | ||
259 | // 16-bit flash device at LocalPlus Bus CS0 | 255 | // 16-bit flash device at LocalPlus Bus CS0 |
260 | flash@0,0 { | 256 | flash@0,0 { |
261 | compatible = "cfi-flash"; | 257 | compatible = "cfi-flash"; |
262 | reg = <0 0 2000000>; | 258 | reg = <0 0 0x2000000>; |
263 | bank-width = <2>; | 259 | bank-width = <2>; |
264 | device-width = <2>; | 260 | device-width = <2>; |
265 | #size-cells = <1>; | 261 | #size-cells = <1>; |
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index 09b4e16154d6..2cf9a8768f44 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts | |||
@@ -10,6 +10,8 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /dts-v1/; | ||
14 | |||
13 | / { | 15 | / { |
14 | model = "fsl,lite5200"; | 16 | model = "fsl,lite5200"; |
15 | compatible = "fsl,lite5200"; | 17 | compatible = "fsl,lite5200"; |
@@ -23,10 +25,10 @@ | |||
23 | PowerPC,5200@0 { | 25 | PowerPC,5200@0 { |
24 | device_type = "cpu"; | 26 | device_type = "cpu"; |
25 | reg = <0>; | 27 | reg = <0>; |
26 | d-cache-line-size = <20>; | 28 | d-cache-line-size = <32>; |
27 | i-cache-line-size = <20>; | 29 | i-cache-line-size = <32>; |
28 | d-cache-size = <4000>; // L1, 16K | 30 | d-cache-size = <0x4000>; // L1, 16K |
29 | i-cache-size = <4000>; // L1, 16K | 31 | i-cache-size = <0x4000>; // L1, 16K |
30 | timebase-frequency = <0>; // from bootloader | 32 | timebase-frequency = <0>; // from bootloader |
31 | bus-frequency = <0>; // from bootloader | 33 | bus-frequency = <0>; // from bootloader |
32 | clock-frequency = <0>; // from bootloader | 34 | clock-frequency = <0>; // from bootloader |
@@ -35,21 +37,21 @@ | |||
35 | 37 | ||
36 | memory { | 38 | memory { |
37 | device_type = "memory"; | 39 | device_type = "memory"; |
38 | reg = <00000000 04000000>; // 64MB | 40 | reg = <0x00000000 0x04000000>; // 64MB |
39 | }; | 41 | }; |
40 | 42 | ||
41 | soc5200@f0000000 { | 43 | soc5200@f0000000 { |
42 | #address-cells = <1>; | 44 | #address-cells = <1>; |
43 | #size-cells = <1>; | 45 | #size-cells = <1>; |
44 | compatible = "fsl,mpc5200-immr"; | 46 | compatible = "fsl,mpc5200-immr"; |
45 | ranges = <0 f0000000 0000c000>; | 47 | ranges = <0 0xf0000000 0x0000c000>; |
46 | reg = <f0000000 00000100>; | 48 | reg = <0xf0000000 0x00000100>; |
47 | bus-frequency = <0>; // from bootloader | 49 | bus-frequency = <0>; // from bootloader |
48 | system-frequency = <0>; // from bootloader | 50 | system-frequency = <0>; // from bootloader |
49 | 51 | ||
50 | cdm@200 { | 52 | cdm@200 { |
51 | compatible = "fsl,mpc5200-cdm"; | 53 | compatible = "fsl,mpc5200-cdm"; |
52 | reg = <200 38>; | 54 | reg = <0x200 0x38>; |
53 | }; | 55 | }; |
54 | 56 | ||
55 | mpc5200_pic: interrupt-controller@500 { | 57 | mpc5200_pic: interrupt-controller@500 { |
@@ -58,13 +60,13 @@ | |||
58 | #interrupt-cells = <3>; | 60 | #interrupt-cells = <3>; |
59 | device_type = "interrupt-controller"; | 61 | device_type = "interrupt-controller"; |
60 | compatible = "fsl,mpc5200-pic"; | 62 | compatible = "fsl,mpc5200-pic"; |
61 | reg = <500 80>; | 63 | reg = <0x500 0x80>; |
62 | }; | 64 | }; |
63 | 65 | ||
64 | timer@600 { // General Purpose Timer | 66 | timer@600 { // General Purpose Timer |
65 | compatible = "fsl,mpc5200-gpt"; | 67 | compatible = "fsl,mpc5200-gpt"; |
66 | cell-index = <0>; | 68 | cell-index = <0>; |
67 | reg = <600 10>; | 69 | reg = <0x600 0x10>; |
68 | interrupts = <1 9 0>; | 70 | interrupts = <1 9 0>; |
69 | interrupt-parent = <&mpc5200_pic>; | 71 | interrupt-parent = <&mpc5200_pic>; |
70 | fsl,has-wdt; | 72 | fsl,has-wdt; |
@@ -73,63 +75,63 @@ | |||
73 | timer@610 { // General Purpose Timer | 75 | timer@610 { // General Purpose Timer |
74 | compatible = "fsl,mpc5200-gpt"; | 76 | compatible = "fsl,mpc5200-gpt"; |
75 | cell-index = <1>; | 77 | cell-index = <1>; |
76 | reg = <610 10>; | 78 | reg = <0x610 0x10>; |
77 | interrupts = <1 a 0>; | 79 | interrupts = <1 10 0>; |
78 | interrupt-parent = <&mpc5200_pic>; | 80 | interrupt-parent = <&mpc5200_pic>; |
79 | }; | 81 | }; |
80 | 82 | ||
81 | timer@620 { // General Purpose Timer | 83 | timer@620 { // General Purpose Timer |
82 | compatible = "fsl,mpc5200-gpt"; | 84 | compatible = "fsl,mpc5200-gpt"; |
83 | cell-index = <2>; | 85 | cell-index = <2>; |
84 | reg = <620 10>; | 86 | reg = <0x620 0x10>; |
85 | interrupts = <1 b 0>; | 87 | interrupts = <1 11 0>; |
86 | interrupt-parent = <&mpc5200_pic>; | 88 | interrupt-parent = <&mpc5200_pic>; |
87 | }; | 89 | }; |
88 | 90 | ||
89 | timer@630 { // General Purpose Timer | 91 | timer@630 { // General Purpose Timer |
90 | compatible = "fsl,mpc5200-gpt"; | 92 | compatible = "fsl,mpc5200-gpt"; |
91 | cell-index = <3>; | 93 | cell-index = <3>; |
92 | reg = <630 10>; | 94 | reg = <0x630 0x10>; |
93 | interrupts = <1 c 0>; | 95 | interrupts = <1 12 0>; |
94 | interrupt-parent = <&mpc5200_pic>; | 96 | interrupt-parent = <&mpc5200_pic>; |
95 | }; | 97 | }; |
96 | 98 | ||
97 | timer@640 { // General Purpose Timer | 99 | timer@640 { // General Purpose Timer |
98 | compatible = "fsl,mpc5200-gpt"; | 100 | compatible = "fsl,mpc5200-gpt"; |
99 | cell-index = <4>; | 101 | cell-index = <4>; |
100 | reg = <640 10>; | 102 | reg = <0x640 0x10>; |
101 | interrupts = <1 d 0>; | 103 | interrupts = <1 13 0>; |
102 | interrupt-parent = <&mpc5200_pic>; | 104 | interrupt-parent = <&mpc5200_pic>; |
103 | }; | 105 | }; |
104 | 106 | ||
105 | timer@650 { // General Purpose Timer | 107 | timer@650 { // General Purpose Timer |
106 | compatible = "fsl,mpc5200-gpt"; | 108 | compatible = "fsl,mpc5200-gpt"; |
107 | cell-index = <5>; | 109 | cell-index = <5>; |
108 | reg = <650 10>; | 110 | reg = <0x650 0x10>; |
109 | interrupts = <1 e 0>; | 111 | interrupts = <1 14 0>; |
110 | interrupt-parent = <&mpc5200_pic>; | 112 | interrupt-parent = <&mpc5200_pic>; |
111 | }; | 113 | }; |
112 | 114 | ||
113 | timer@660 { // General Purpose Timer | 115 | timer@660 { // General Purpose Timer |
114 | compatible = "fsl,mpc5200-gpt"; | 116 | compatible = "fsl,mpc5200-gpt"; |
115 | cell-index = <6>; | 117 | cell-index = <6>; |
116 | reg = <660 10>; | 118 | reg = <0x660 0x10>; |
117 | interrupts = <1 f 0>; | 119 | interrupts = <1 15 0>; |
118 | interrupt-parent = <&mpc5200_pic>; | 120 | interrupt-parent = <&mpc5200_pic>; |
119 | }; | 121 | }; |
120 | 122 | ||
121 | timer@670 { // General Purpose Timer | 123 | timer@670 { // General Purpose Timer |
122 | compatible = "fsl,mpc5200-gpt"; | 124 | compatible = "fsl,mpc5200-gpt"; |
123 | cell-index = <7>; | 125 | cell-index = <7>; |
124 | reg = <670 10>; | 126 | reg = <0x670 0x10>; |
125 | interrupts = <1 10 0>; | 127 | interrupts = <1 16 0>; |
126 | interrupt-parent = <&mpc5200_pic>; | 128 | interrupt-parent = <&mpc5200_pic>; |
127 | }; | 129 | }; |
128 | 130 | ||
129 | rtc@800 { // Real time clock | 131 | rtc@800 { // Real time clock |
130 | compatible = "fsl,mpc5200-rtc"; | 132 | compatible = "fsl,mpc5200-rtc"; |
131 | device_type = "rtc"; | 133 | device_type = "rtc"; |
132 | reg = <800 100>; | 134 | reg = <0x800 0x100>; |
133 | interrupts = <1 5 0 1 6 0>; | 135 | interrupts = <1 5 0 1 6 0>; |
134 | interrupt-parent = <&mpc5200_pic>; | 136 | interrupt-parent = <&mpc5200_pic>; |
135 | }; | 137 | }; |
@@ -137,43 +139,43 @@ | |||
137 | can@900 { | 139 | can@900 { |
138 | compatible = "fsl,mpc5200-mscan"; | 140 | compatible = "fsl,mpc5200-mscan"; |
139 | cell-index = <0>; | 141 | cell-index = <0>; |
140 | interrupts = <2 11 0>; | 142 | interrupts = <2 17 0>; |
141 | interrupt-parent = <&mpc5200_pic>; | 143 | interrupt-parent = <&mpc5200_pic>; |
142 | reg = <900 80>; | 144 | reg = <0x900 0x80>; |
143 | }; | 145 | }; |
144 | 146 | ||
145 | can@980 { | 147 | can@980 { |
146 | compatible = "fsl,mpc5200-mscan"; | 148 | compatible = "fsl,mpc5200-mscan"; |
147 | cell-index = <1>; | 149 | cell-index = <1>; |
148 | interrupts = <2 12 0>; | 150 | interrupts = <2 18 0>; |
149 | interrupt-parent = <&mpc5200_pic>; | 151 | interrupt-parent = <&mpc5200_pic>; |
150 | reg = <980 80>; | 152 | reg = <0x980 0x80>; |
151 | }; | 153 | }; |
152 | 154 | ||
153 | gpio@b00 { | 155 | gpio@b00 { |
154 | compatible = "fsl,mpc5200-gpio"; | 156 | compatible = "fsl,mpc5200-gpio"; |
155 | reg = <b00 40>; | 157 | reg = <0xb00 0x40>; |
156 | interrupts = <1 7 0>; | 158 | interrupts = <1 7 0>; |
157 | interrupt-parent = <&mpc5200_pic>; | 159 | interrupt-parent = <&mpc5200_pic>; |
158 | }; | 160 | }; |
159 | 161 | ||
160 | gpio@c00 { | 162 | gpio@c00 { |
161 | compatible = "fsl,mpc5200-gpio-wkup"; | 163 | compatible = "fsl,mpc5200-gpio-wkup"; |
162 | reg = <c00 40>; | 164 | reg = <0xc00 0x40>; |
163 | interrupts = <1 8 0 0 3 0>; | 165 | interrupts = <1 8 0 0 3 0>; |
164 | interrupt-parent = <&mpc5200_pic>; | 166 | interrupt-parent = <&mpc5200_pic>; |
165 | }; | 167 | }; |
166 | 168 | ||
167 | spi@f00 { | 169 | spi@f00 { |
168 | compatible = "fsl,mpc5200-spi"; | 170 | compatible = "fsl,mpc5200-spi"; |
169 | reg = <f00 20>; | 171 | reg = <0xf00 0x20>; |
170 | interrupts = <2 d 0 2 e 0>; | 172 | interrupts = <2 13 0 2 14 0>; |
171 | interrupt-parent = <&mpc5200_pic>; | 173 | interrupt-parent = <&mpc5200_pic>; |
172 | }; | 174 | }; |
173 | 175 | ||
174 | usb@1000 { | 176 | usb@1000 { |
175 | compatible = "fsl,mpc5200-ohci","ohci-be"; | 177 | compatible = "fsl,mpc5200-ohci","ohci-be"; |
176 | reg = <1000 ff>; | 178 | reg = <0x1000 0xff>; |
177 | interrupts = <2 6 0>; | 179 | interrupts = <2 6 0>; |
178 | interrupt-parent = <&mpc5200_pic>; | 180 | interrupt-parent = <&mpc5200_pic>; |
179 | }; | 181 | }; |
@@ -181,17 +183,17 @@ | |||
181 | dma-controller@1200 { | 183 | dma-controller@1200 { |
182 | device_type = "dma-controller"; | 184 | device_type = "dma-controller"; |
183 | compatible = "fsl,mpc5200-bestcomm"; | 185 | compatible = "fsl,mpc5200-bestcomm"; |
184 | reg = <1200 80>; | 186 | reg = <0x1200 0x80>; |
185 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | 187 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 |
186 | 3 4 0 3 5 0 3 6 0 3 7 0 | 188 | 3 4 0 3 5 0 3 6 0 3 7 0 |
187 | 3 8 0 3 9 0 3 a 0 3 b 0 | 189 | 3 8 0 3 9 0 3 10 0 3 11 0 |
188 | 3 c 0 3 d 0 3 e 0 3 f 0>; | 190 | 3 12 0 3 13 0 3 14 0 3 15 0>; |
189 | interrupt-parent = <&mpc5200_pic>; | 191 | interrupt-parent = <&mpc5200_pic>; |
190 | }; | 192 | }; |
191 | 193 | ||
192 | xlb@1f00 { | 194 | xlb@1f00 { |
193 | compatible = "fsl,mpc5200-xlb"; | 195 | compatible = "fsl,mpc5200-xlb"; |
194 | reg = <1f00 100>; | 196 | reg = <0x1f00 0x100>; |
195 | }; | 197 | }; |
196 | 198 | ||
197 | serial@2000 { // PSC1 | 199 | serial@2000 { // PSC1 |
@@ -199,7 +201,7 @@ | |||
199 | compatible = "fsl,mpc5200-psc-uart"; | 201 | compatible = "fsl,mpc5200-psc-uart"; |
200 | port-number = <0>; // Logical port assignment | 202 | port-number = <0>; // Logical port assignment |
201 | cell-index = <0>; | 203 | cell-index = <0>; |
202 | reg = <2000 100>; | 204 | reg = <0x2000 0x100>; |
203 | interrupts = <2 1 0>; | 205 | interrupts = <2 1 0>; |
204 | interrupt-parent = <&mpc5200_pic>; | 206 | interrupt-parent = <&mpc5200_pic>; |
205 | }; | 207 | }; |
@@ -208,7 +210,7 @@ | |||
208 | //ac97@2200 { // PSC2 | 210 | //ac97@2200 { // PSC2 |
209 | // compatible = "fsl,mpc5200-psc-ac97"; | 211 | // compatible = "fsl,mpc5200-psc-ac97"; |
210 | // cell-index = <1>; | 212 | // cell-index = <1>; |
211 | // reg = <2200 100>; | 213 | // reg = <0x2200 0x100>; |
212 | // interrupts = <2 2 0>; | 214 | // interrupts = <2 2 0>; |
213 | // interrupt-parent = <&mpc5200_pic>; | 215 | // interrupt-parent = <&mpc5200_pic>; |
214 | //}; | 216 | //}; |
@@ -217,7 +219,7 @@ | |||
217 | //i2s@2400 { // PSC3 | 219 | //i2s@2400 { // PSC3 |
218 | // compatible = "fsl,mpc5200-psc-i2s"; | 220 | // compatible = "fsl,mpc5200-psc-i2s"; |
219 | // cell-index = <2>; | 221 | // cell-index = <2>; |
220 | // reg = <2400 100>; | 222 | // reg = <0x2400 0x100>; |
221 | // interrupts = <2 3 0>; | 223 | // interrupts = <2 3 0>; |
222 | // interrupt-parent = <&mpc5200_pic>; | 224 | // interrupt-parent = <&mpc5200_pic>; |
223 | //}; | 225 | //}; |
@@ -227,8 +229,8 @@ | |||
227 | // device_type = "serial"; | 229 | // device_type = "serial"; |
228 | // compatible = "fsl,mpc5200-psc-uart"; | 230 | // compatible = "fsl,mpc5200-psc-uart"; |
229 | // cell-index = <3>; | 231 | // cell-index = <3>; |
230 | // reg = <2600 100>; | 232 | // reg = <0x2600 0x100>; |
231 | // interrupts = <2 b 0>; | 233 | // interrupts = <2 11 0>; |
232 | // interrupt-parent = <&mpc5200_pic>; | 234 | // interrupt-parent = <&mpc5200_pic>; |
233 | //}; | 235 | //}; |
234 | 236 | ||
@@ -237,8 +239,8 @@ | |||
237 | // device_type = "serial"; | 239 | // device_type = "serial"; |
238 | // compatible = "fsl,mpc5200-psc-uart"; | 240 | // compatible = "fsl,mpc5200-psc-uart"; |
239 | // cell-index = <4>; | 241 | // cell-index = <4>; |
240 | // reg = <2800 100>; | 242 | // reg = <0x2800 0x100>; |
241 | // interrupts = <2 c 0>; | 243 | // interrupts = <2 12 0>; |
242 | // interrupt-parent = <&mpc5200_pic>; | 244 | // interrupt-parent = <&mpc5200_pic>; |
243 | //}; | 245 | //}; |
244 | 246 | ||
@@ -246,7 +248,7 @@ | |||
246 | //spi@2c00 { // PSC6 | 248 | //spi@2c00 { // PSC6 |
247 | // compatible = "fsl,mpc5200-psc-spi"; | 249 | // compatible = "fsl,mpc5200-psc-spi"; |
248 | // cell-index = <5>; | 250 | // cell-index = <5>; |
249 | // reg = <2c00 100>; | 251 | // reg = <0x2c00 0x100>; |
250 | // interrupts = <2 4 0>; | 252 | // interrupts = <2 4 0>; |
251 | // interrupt-parent = <&mpc5200_pic>; | 253 | // interrupt-parent = <&mpc5200_pic>; |
252 | //}; | 254 | //}; |
@@ -254,7 +256,7 @@ | |||
254 | ethernet@3000 { | 256 | ethernet@3000 { |
255 | device_type = "network"; | 257 | device_type = "network"; |
256 | compatible = "fsl,mpc5200-fec"; | 258 | compatible = "fsl,mpc5200-fec"; |
257 | reg = <3000 800>; | 259 | reg = <0x3000 0x400>; |
258 | local-mac-address = [ 00 00 00 00 00 00 ]; | 260 | local-mac-address = [ 00 00 00 00 00 00 ]; |
259 | interrupts = <2 5 0>; | 261 | interrupts = <2 5 0>; |
260 | interrupt-parent = <&mpc5200_pic>; | 262 | interrupt-parent = <&mpc5200_pic>; |
@@ -265,11 +267,11 @@ | |||
265 | #address-cells = <1>; | 267 | #address-cells = <1>; |
266 | #size-cells = <0>; | 268 | #size-cells = <0>; |
267 | compatible = "fsl,mpc5200-mdio"; | 269 | compatible = "fsl,mpc5200-mdio"; |
268 | reg = <3000 400>; // fec range, since we need to setup fec interrupts | 270 | reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts |
269 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. | 271 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. |
270 | interrupt-parent = <&mpc5200_pic>; | 272 | interrupt-parent = <&mpc5200_pic>; |
271 | 273 | ||
272 | phy0:ethernet-phy@1 { | 274 | phy0: ethernet-phy@1 { |
273 | device_type = "ethernet-phy"; | 275 | device_type = "ethernet-phy"; |
274 | reg = <1>; | 276 | reg = <1>; |
275 | }; | 277 | }; |
@@ -278,7 +280,7 @@ | |||
278 | ata@3a00 { | 280 | ata@3a00 { |
279 | device_type = "ata"; | 281 | device_type = "ata"; |
280 | compatible = "fsl,mpc5200-ata"; | 282 | compatible = "fsl,mpc5200-ata"; |
281 | reg = <3a00 100>; | 283 | reg = <0x3a00 0x100>; |
282 | interrupts = <2 7 0>; | 284 | interrupts = <2 7 0>; |
283 | interrupt-parent = <&mpc5200_pic>; | 285 | interrupt-parent = <&mpc5200_pic>; |
284 | }; | 286 | }; |
@@ -288,8 +290,8 @@ | |||
288 | #size-cells = <0>; | 290 | #size-cells = <0>; |
289 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; | 291 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; |
290 | cell-index = <0>; | 292 | cell-index = <0>; |
291 | reg = <3d00 40>; | 293 | reg = <0x3d00 0x40>; |
292 | interrupts = <2 f 0>; | 294 | interrupts = <2 15 0>; |
293 | interrupt-parent = <&mpc5200_pic>; | 295 | interrupt-parent = <&mpc5200_pic>; |
294 | fsl5200-clocking; | 296 | fsl5200-clocking; |
295 | }; | 297 | }; |
@@ -299,14 +301,14 @@ | |||
299 | #size-cells = <0>; | 301 | #size-cells = <0>; |
300 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; | 302 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; |
301 | cell-index = <1>; | 303 | cell-index = <1>; |
302 | reg = <3d40 40>; | 304 | reg = <0x3d40 0x40>; |
303 | interrupts = <2 10 0>; | 305 | interrupts = <2 16 0>; |
304 | interrupt-parent = <&mpc5200_pic>; | 306 | interrupt-parent = <&mpc5200_pic>; |
305 | fsl5200-clocking; | 307 | fsl5200-clocking; |
306 | }; | 308 | }; |
307 | sram@8000 { | 309 | sram@8000 { |
308 | compatible = "fsl,mpc5200-sram","sram"; | 310 | compatible = "fsl,mpc5200-sram","sram"; |
309 | reg = <8000 4000>; | 311 | reg = <0x8000 0x4000>; |
310 | }; | 312 | }; |
311 | }; | 313 | }; |
312 | 314 | ||
@@ -316,18 +318,18 @@ | |||
316 | #address-cells = <3>; | 318 | #address-cells = <3>; |
317 | device_type = "pci"; | 319 | device_type = "pci"; |
318 | compatible = "fsl,mpc5200-pci"; | 320 | compatible = "fsl,mpc5200-pci"; |
319 | reg = <f0000d00 100>; | 321 | reg = <0xf0000d00 0x100>; |
320 | interrupt-map-mask = <f800 0 0 7>; | 322 | interrupt-map-mask = <0xf800 0 0 7>; |
321 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 | 323 | interrupt-map = <0xc000 0 0 1 &mpc5200_pic 0 0 3 |
322 | c000 0 0 2 &mpc5200_pic 0 0 3 | 324 | 0xc000 0 0 2 &mpc5200_pic 0 0 3 |
323 | c000 0 0 3 &mpc5200_pic 0 0 3 | 325 | 0xc000 0 0 3 &mpc5200_pic 0 0 3 |
324 | c000 0 0 4 &mpc5200_pic 0 0 3>; | 326 | 0xc000 0 0 4 &mpc5200_pic 0 0 3>; |
325 | clock-frequency = <0>; // From boot loader | 327 | clock-frequency = <0>; // From boot loader |
326 | interrupts = <2 8 0 2 9 0 2 a 0>; | 328 | interrupts = <2 8 0 2 9 0 2 10 0>; |
327 | interrupt-parent = <&mpc5200_pic>; | 329 | interrupt-parent = <&mpc5200_pic>; |
328 | bus-range = <0 0>; | 330 | bus-range = <0 0>; |
329 | ranges = <42000000 0 80000000 80000000 0 20000000 | 331 | ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000 |
330 | 02000000 0 a0000000 a0000000 0 10000000 | 332 | 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 |
331 | 01000000 0 00000000 b0000000 0 01000000>; | 333 | 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>; |
332 | }; | 334 | }; |
333 | }; | 335 | }; |
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index 2e9bc397ae9a..7bd5b9c399b8 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts | |||
@@ -10,11 +10,7 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* | 13 | /dts-v1/; |
14 | * WARNING: Do not depend on this tree layout remaining static just yet. | ||
15 | * The MPC5200 device tree conventions are still in flux | ||
16 | * Keep an eye on the linuxppc-dev mailing list for more details | ||
17 | */ | ||
18 | 14 | ||
19 | / { | 15 | / { |
20 | model = "fsl,lite5200b"; | 16 | model = "fsl,lite5200b"; |
@@ -29,10 +25,10 @@ | |||
29 | PowerPC,5200@0 { | 25 | PowerPC,5200@0 { |
30 | device_type = "cpu"; | 26 | device_type = "cpu"; |
31 | reg = <0>; | 27 | reg = <0>; |
32 | d-cache-line-size = <20>; | 28 | d-cache-line-size = <32>; |
33 | i-cache-line-size = <20>; | 29 | i-cache-line-size = <32>; |
34 | d-cache-size = <4000>; // L1, 16K | 30 | d-cache-size = <0x4000>; // L1, 16K |
35 | i-cache-size = <4000>; // L1, 16K | 31 | i-cache-size = <0x4000>; // L1, 16K |
36 | timebase-frequency = <0>; // from bootloader | 32 | timebase-frequency = <0>; // from bootloader |
37 | bus-frequency = <0>; // from bootloader | 33 | bus-frequency = <0>; // from bootloader |
38 | clock-frequency = <0>; // from bootloader | 34 | clock-frequency = <0>; // from bootloader |
@@ -41,21 +37,21 @@ | |||
41 | 37 | ||
42 | memory { | 38 | memory { |
43 | device_type = "memory"; | 39 | device_type = "memory"; |
44 | reg = <00000000 10000000>; // 256MB | 40 | reg = <0x00000000 0x10000000>; // 256MB |
45 | }; | 41 | }; |
46 | 42 | ||
47 | soc5200@f0000000 { | 43 | soc5200@f0000000 { |
48 | #address-cells = <1>; | 44 | #address-cells = <1>; |
49 | #size-cells = <1>; | 45 | #size-cells = <1>; |
50 | compatible = "fsl,mpc5200b-immr"; | 46 | compatible = "fsl,mpc5200b-immr"; |
51 | ranges = <0 f0000000 0000c000>; | 47 | ranges = <0 0xf0000000 0x0000c000>; |
52 | reg = <f0000000 00000100>; | 48 | reg = <0xf0000000 0x00000100>; |
53 | bus-frequency = <0>; // from bootloader | 49 | bus-frequency = <0>; // from bootloader |
54 | system-frequency = <0>; // from bootloader | 50 | system-frequency = <0>; // from bootloader |
55 | 51 | ||
56 | cdm@200 { | 52 | cdm@200 { |
57 | compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; | 53 | compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; |
58 | reg = <200 38>; | 54 | reg = <0x200 0x38>; |
59 | }; | 55 | }; |
60 | 56 | ||
61 | mpc5200_pic: interrupt-controller@500 { | 57 | mpc5200_pic: interrupt-controller@500 { |
@@ -64,13 +60,13 @@ | |||
64 | #interrupt-cells = <3>; | 60 | #interrupt-cells = <3>; |
65 | device_type = "interrupt-controller"; | 61 | device_type = "interrupt-controller"; |
66 | compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; | 62 | compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; |
67 | reg = <500 80>; | 63 | reg = <0x500 0x80>; |
68 | }; | 64 | }; |
69 | 65 | ||
70 | timer@600 { // General Purpose Timer | 66 | timer@600 { // General Purpose Timer |
71 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 67 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
72 | cell-index = <0>; | 68 | cell-index = <0>; |
73 | reg = <600 10>; | 69 | reg = <0x600 0x10>; |
74 | interrupts = <1 9 0>; | 70 | interrupts = <1 9 0>; |
75 | interrupt-parent = <&mpc5200_pic>; | 71 | interrupt-parent = <&mpc5200_pic>; |
76 | fsl,has-wdt; | 72 | fsl,has-wdt; |
@@ -79,63 +75,63 @@ | |||
79 | timer@610 { // General Purpose Timer | 75 | timer@610 { // General Purpose Timer |
80 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 76 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
81 | cell-index = <1>; | 77 | cell-index = <1>; |
82 | reg = <610 10>; | 78 | reg = <0x610 0x10>; |
83 | interrupts = <1 a 0>; | 79 | interrupts = <1 10 0>; |
84 | interrupt-parent = <&mpc5200_pic>; | 80 | interrupt-parent = <&mpc5200_pic>; |
85 | }; | 81 | }; |
86 | 82 | ||
87 | timer@620 { // General Purpose Timer | 83 | timer@620 { // General Purpose Timer |
88 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 84 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
89 | cell-index = <2>; | 85 | cell-index = <2>; |
90 | reg = <620 10>; | 86 | reg = <0x620 0x10>; |
91 | interrupts = <1 b 0>; | 87 | interrupts = <1 11 0>; |
92 | interrupt-parent = <&mpc5200_pic>; | 88 | interrupt-parent = <&mpc5200_pic>; |
93 | }; | 89 | }; |
94 | 90 | ||
95 | timer@630 { // General Purpose Timer | 91 | timer@630 { // General Purpose Timer |
96 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 92 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
97 | cell-index = <3>; | 93 | cell-index = <3>; |
98 | reg = <630 10>; | 94 | reg = <0x630 0x10>; |
99 | interrupts = <1 c 0>; | 95 | interrupts = <1 12 0>; |
100 | interrupt-parent = <&mpc5200_pic>; | 96 | interrupt-parent = <&mpc5200_pic>; |
101 | }; | 97 | }; |
102 | 98 | ||
103 | timer@640 { // General Purpose Timer | 99 | timer@640 { // General Purpose Timer |
104 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 100 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
105 | cell-index = <4>; | 101 | cell-index = <4>; |
106 | reg = <640 10>; | 102 | reg = <0x640 0x10>; |
107 | interrupts = <1 d 0>; | 103 | interrupts = <1 13 0>; |
108 | interrupt-parent = <&mpc5200_pic>; | 104 | interrupt-parent = <&mpc5200_pic>; |
109 | }; | 105 | }; |
110 | 106 | ||
111 | timer@650 { // General Purpose Timer | 107 | timer@650 { // General Purpose Timer |
112 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 108 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
113 | cell-index = <5>; | 109 | cell-index = <5>; |
114 | reg = <650 10>; | 110 | reg = <0x650 0x10>; |
115 | interrupts = <1 e 0>; | 111 | interrupts = <1 14 0>; |
116 | interrupt-parent = <&mpc5200_pic>; | 112 | interrupt-parent = <&mpc5200_pic>; |
117 | }; | 113 | }; |
118 | 114 | ||
119 | timer@660 { // General Purpose Timer | 115 | timer@660 { // General Purpose Timer |
120 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 116 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
121 | cell-index = <6>; | 117 | cell-index = <6>; |
122 | reg = <660 10>; | 118 | reg = <0x660 0x10>; |
123 | interrupts = <1 f 0>; | 119 | interrupts = <1 15 0>; |
124 | interrupt-parent = <&mpc5200_pic>; | 120 | interrupt-parent = <&mpc5200_pic>; |
125 | }; | 121 | }; |
126 | 122 | ||
127 | timer@670 { // General Purpose Timer | 123 | timer@670 { // General Purpose Timer |
128 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 124 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
129 | cell-index = <7>; | 125 | cell-index = <7>; |
130 | reg = <670 10>; | 126 | reg = <0x670 0x10>; |
131 | interrupts = <1 10 0>; | 127 | interrupts = <1 16 0>; |
132 | interrupt-parent = <&mpc5200_pic>; | 128 | interrupt-parent = <&mpc5200_pic>; |
133 | }; | 129 | }; |
134 | 130 | ||
135 | rtc@800 { // Real time clock | 131 | rtc@800 { // Real time clock |
136 | compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; | 132 | compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; |
137 | device_type = "rtc"; | 133 | device_type = "rtc"; |
138 | reg = <800 100>; | 134 | reg = <0x800 0x100>; |
139 | interrupts = <1 5 0 1 6 0>; | 135 | interrupts = <1 5 0 1 6 0>; |
140 | interrupt-parent = <&mpc5200_pic>; | 136 | interrupt-parent = <&mpc5200_pic>; |
141 | }; | 137 | }; |
@@ -143,43 +139,43 @@ | |||
143 | can@900 { | 139 | can@900 { |
144 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; | 140 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; |
145 | cell-index = <0>; | 141 | cell-index = <0>; |
146 | interrupts = <2 11 0>; | 142 | interrupts = <2 17 0>; |
147 | interrupt-parent = <&mpc5200_pic>; | 143 | interrupt-parent = <&mpc5200_pic>; |
148 | reg = <900 80>; | 144 | reg = <0x900 0x80>; |
149 | }; | 145 | }; |
150 | 146 | ||
151 | can@980 { | 147 | can@980 { |
152 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; | 148 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; |
153 | cell-index = <1>; | 149 | cell-index = <1>; |
154 | interrupts = <2 12 0>; | 150 | interrupts = <2 18 0>; |
155 | interrupt-parent = <&mpc5200_pic>; | 151 | interrupt-parent = <&mpc5200_pic>; |
156 | reg = <980 80>; | 152 | reg = <0x980 0x80>; |
157 | }; | 153 | }; |
158 | 154 | ||
159 | gpio@b00 { | 155 | gpio@b00 { |
160 | compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; | 156 | compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; |
161 | reg = <b00 40>; | 157 | reg = <0xb00 0x40>; |
162 | interrupts = <1 7 0>; | 158 | interrupts = <1 7 0>; |
163 | interrupt-parent = <&mpc5200_pic>; | 159 | interrupt-parent = <&mpc5200_pic>; |
164 | }; | 160 | }; |
165 | 161 | ||
166 | gpio@c00 { | 162 | gpio@c00 { |
167 | compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; | 163 | compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; |
168 | reg = <c00 40>; | 164 | reg = <0xc00 0x40>; |
169 | interrupts = <1 8 0 0 3 0>; | 165 | interrupts = <1 8 0 0 3 0>; |
170 | interrupt-parent = <&mpc5200_pic>; | 166 | interrupt-parent = <&mpc5200_pic>; |
171 | }; | 167 | }; |
172 | 168 | ||
173 | spi@f00 { | 169 | spi@f00 { |
174 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; | 170 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; |
175 | reg = <f00 20>; | 171 | reg = <0xf00 0x20>; |
176 | interrupts = <2 d 0 2 e 0>; | 172 | interrupts = <2 13 0 2 14 0>; |
177 | interrupt-parent = <&mpc5200_pic>; | 173 | interrupt-parent = <&mpc5200_pic>; |
178 | }; | 174 | }; |
179 | 175 | ||
180 | usb@1000 { | 176 | usb@1000 { |
181 | compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; | 177 | compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; |
182 | reg = <1000 ff>; | 178 | reg = <0x1000 0xff>; |
183 | interrupts = <2 6 0>; | 179 | interrupts = <2 6 0>; |
184 | interrupt-parent = <&mpc5200_pic>; | 180 | interrupt-parent = <&mpc5200_pic>; |
185 | }; | 181 | }; |
@@ -187,17 +183,17 @@ | |||
187 | dma-controller@1200 { | 183 | dma-controller@1200 { |
188 | device_type = "dma-controller"; | 184 | device_type = "dma-controller"; |
189 | compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; | 185 | compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; |
190 | reg = <1200 80>; | 186 | reg = <0x1200 0x80>; |
191 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | 187 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 |
192 | 3 4 0 3 5 0 3 6 0 3 7 0 | 188 | 3 4 0 3 5 0 3 6 0 3 7 0 |
193 | 3 8 0 3 9 0 3 a 0 3 b 0 | 189 | 3 8 0 3 9 0 3 10 0 3 11 0 |
194 | 3 c 0 3 d 0 3 e 0 3 f 0>; | 190 | 3 12 0 3 13 0 3 14 0 3 15 0>; |
195 | interrupt-parent = <&mpc5200_pic>; | 191 | interrupt-parent = <&mpc5200_pic>; |
196 | }; | 192 | }; |
197 | 193 | ||
198 | xlb@1f00 { | 194 | xlb@1f00 { |
199 | compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb"; | 195 | compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb"; |
200 | reg = <1f00 100>; | 196 | reg = <0x1f00 0x100>; |
201 | }; | 197 | }; |
202 | 198 | ||
203 | serial@2000 { // PSC1 | 199 | serial@2000 { // PSC1 |
@@ -205,7 +201,7 @@ | |||
205 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | 201 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; |
206 | port-number = <0>; // Logical port assignment | 202 | port-number = <0>; // Logical port assignment |
207 | cell-index = <0>; | 203 | cell-index = <0>; |
208 | reg = <2000 100>; | 204 | reg = <0x2000 0x100>; |
209 | interrupts = <2 1 0>; | 205 | interrupts = <2 1 0>; |
210 | interrupt-parent = <&mpc5200_pic>; | 206 | interrupt-parent = <&mpc5200_pic>; |
211 | }; | 207 | }; |
@@ -214,7 +210,7 @@ | |||
214 | //ac97@2200 { // PSC2 | 210 | //ac97@2200 { // PSC2 |
215 | // compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97"; | 211 | // compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97"; |
216 | // cell-index = <1>; | 212 | // cell-index = <1>; |
217 | // reg = <2200 100>; | 213 | // reg = <0x2200 0x100>; |
218 | // interrupts = <2 2 0>; | 214 | // interrupts = <2 2 0>; |
219 | // interrupt-parent = <&mpc5200_pic>; | 215 | // interrupt-parent = <&mpc5200_pic>; |
220 | //}; | 216 | //}; |
@@ -223,7 +219,7 @@ | |||
223 | //i2s@2400 { // PSC3 | 219 | //i2s@2400 { // PSC3 |
224 | // compatible = "fsl,mpc5200b-psc-i2s"; //not 5200 compatible | 220 | // compatible = "fsl,mpc5200b-psc-i2s"; //not 5200 compatible |
225 | // cell-index = <2>; | 221 | // cell-index = <2>; |
226 | // reg = <2400 100>; | 222 | // reg = <0x2400 0x100>; |
227 | // interrupts = <2 3 0>; | 223 | // interrupts = <2 3 0>; |
228 | // interrupt-parent = <&mpc5200_pic>; | 224 | // interrupt-parent = <&mpc5200_pic>; |
229 | //}; | 225 | //}; |
@@ -233,8 +229,8 @@ | |||
233 | // device_type = "serial"; | 229 | // device_type = "serial"; |
234 | // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | 230 | // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; |
235 | // cell-index = <3>; | 231 | // cell-index = <3>; |
236 | // reg = <2600 100>; | 232 | // reg = <0x2600 0x100>; |
237 | // interrupts = <2 b 0>; | 233 | // interrupts = <2 11 0>; |
238 | // interrupt-parent = <&mpc5200_pic>; | 234 | // interrupt-parent = <&mpc5200_pic>; |
239 | //}; | 235 | //}; |
240 | 236 | ||
@@ -243,8 +239,8 @@ | |||
243 | // device_type = "serial"; | 239 | // device_type = "serial"; |
244 | // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | 240 | // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; |
245 | // cell-index = <4>; | 241 | // cell-index = <4>; |
246 | // reg = <2800 100>; | 242 | // reg = <0x2800 0x100>; |
247 | // interrupts = <2 c 0>; | 243 | // interrupts = <2 12 0>; |
248 | // interrupt-parent = <&mpc5200_pic>; | 244 | // interrupt-parent = <&mpc5200_pic>; |
249 | //}; | 245 | //}; |
250 | 246 | ||
@@ -252,7 +248,7 @@ | |||
252 | //spi@2c00 { // PSC6 | 248 | //spi@2c00 { // PSC6 |
253 | // compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi"; | 249 | // compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi"; |
254 | // cell-index = <5>; | 250 | // cell-index = <5>; |
255 | // reg = <2c00 100>; | 251 | // reg = <0x2c00 0x100>; |
256 | // interrupts = <2 4 0>; | 252 | // interrupts = <2 4 0>; |
257 | // interrupt-parent = <&mpc5200_pic>; | 253 | // interrupt-parent = <&mpc5200_pic>; |
258 | //}; | 254 | //}; |
@@ -260,7 +256,7 @@ | |||
260 | ethernet@3000 { | 256 | ethernet@3000 { |
261 | device_type = "network"; | 257 | device_type = "network"; |
262 | compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; | 258 | compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; |
263 | reg = <3000 400>; | 259 | reg = <0x3000 0x400>; |
264 | local-mac-address = [ 00 00 00 00 00 00 ]; | 260 | local-mac-address = [ 00 00 00 00 00 00 ]; |
265 | interrupts = <2 5 0>; | 261 | interrupts = <2 5 0>; |
266 | interrupt-parent = <&mpc5200_pic>; | 262 | interrupt-parent = <&mpc5200_pic>; |
@@ -271,11 +267,11 @@ | |||
271 | #address-cells = <1>; | 267 | #address-cells = <1>; |
272 | #size-cells = <0>; | 268 | #size-cells = <0>; |
273 | compatible = "fsl,mpc5200b-mdio", "fsl,mpc5200-mdio"; | 269 | compatible = "fsl,mpc5200b-mdio", "fsl,mpc5200-mdio"; |
274 | reg = <3000 400>; // fec range, since we need to setup fec interrupts | 270 | reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts |
275 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. | 271 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. |
276 | interrupt-parent = <&mpc5200_pic>; | 272 | interrupt-parent = <&mpc5200_pic>; |
277 | 273 | ||
278 | phy0:ethernet-phy@0 { | 274 | phy0: ethernet-phy@0 { |
279 | device_type = "ethernet-phy"; | 275 | device_type = "ethernet-phy"; |
280 | reg = <0>; | 276 | reg = <0>; |
281 | }; | 277 | }; |
@@ -284,7 +280,7 @@ | |||
284 | ata@3a00 { | 280 | ata@3a00 { |
285 | device_type = "ata"; | 281 | device_type = "ata"; |
286 | compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; | 282 | compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; |
287 | reg = <3a00 100>; | 283 | reg = <0x3a00 0x100>; |
288 | interrupts = <2 7 0>; | 284 | interrupts = <2 7 0>; |
289 | interrupt-parent = <&mpc5200_pic>; | 285 | interrupt-parent = <&mpc5200_pic>; |
290 | }; | 286 | }; |
@@ -294,8 +290,8 @@ | |||
294 | #size-cells = <0>; | 290 | #size-cells = <0>; |
295 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; | 291 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; |
296 | cell-index = <0>; | 292 | cell-index = <0>; |
297 | reg = <3d00 40>; | 293 | reg = <0x3d00 0x40>; |
298 | interrupts = <2 f 0>; | 294 | interrupts = <2 15 0>; |
299 | interrupt-parent = <&mpc5200_pic>; | 295 | interrupt-parent = <&mpc5200_pic>; |
300 | fsl5200-clocking; | 296 | fsl5200-clocking; |
301 | }; | 297 | }; |
@@ -305,14 +301,14 @@ | |||
305 | #size-cells = <0>; | 301 | #size-cells = <0>; |
306 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; | 302 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; |
307 | cell-index = <1>; | 303 | cell-index = <1>; |
308 | reg = <3d40 40>; | 304 | reg = <0x3d40 0x40>; |
309 | interrupts = <2 10 0>; | 305 | interrupts = <2 16 0>; |
310 | interrupt-parent = <&mpc5200_pic>; | 306 | interrupt-parent = <&mpc5200_pic>; |
311 | fsl5200-clocking; | 307 | fsl5200-clocking; |
312 | }; | 308 | }; |
313 | sram@8000 { | 309 | sram@8000 { |
314 | compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram","sram"; | 310 | compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram","sram"; |
315 | reg = <8000 4000>; | 311 | reg = <0x8000 0x4000>; |
316 | }; | 312 | }; |
317 | }; | 313 | }; |
318 | 314 | ||
@@ -322,23 +318,23 @@ | |||
322 | #address-cells = <3>; | 318 | #address-cells = <3>; |
323 | device_type = "pci"; | 319 | device_type = "pci"; |
324 | compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci"; | 320 | compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci"; |
325 | reg = <f0000d00 100>; | 321 | reg = <0xf0000d00 0x100>; |
326 | interrupt-map-mask = <f800 0 0 7>; | 322 | interrupt-map-mask = <0xf800 0 0 7>; |
327 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot | 323 | interrupt-map = <0xc000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot |
328 | c000 0 0 2 &mpc5200_pic 1 1 3 | 324 | 0xc000 0 0 2 &mpc5200_pic 1 1 3 |
329 | c000 0 0 3 &mpc5200_pic 1 2 3 | 325 | 0xc000 0 0 3 &mpc5200_pic 1 2 3 |
330 | c000 0 0 4 &mpc5200_pic 1 3 3 | 326 | 0xc000 0 0 4 &mpc5200_pic 1 3 3 |
331 | 327 | ||
332 | c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot | 328 | 0xc800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot |
333 | c800 0 0 2 &mpc5200_pic 1 2 3 | 329 | 0xc800 0 0 2 &mpc5200_pic 1 2 3 |
334 | c800 0 0 3 &mpc5200_pic 1 3 3 | 330 | 0xc800 0 0 3 &mpc5200_pic 1 3 3 |
335 | c800 0 0 4 &mpc5200_pic 0 0 3>; | 331 | 0xc800 0 0 4 &mpc5200_pic 0 0 3>; |
336 | clock-frequency = <0>; // From boot loader | 332 | clock-frequency = <0>; // From boot loader |
337 | interrupts = <2 8 0 2 9 0 2 a 0>; | 333 | interrupts = <2 8 0 2 9 0 2 10 0>; |
338 | interrupt-parent = <&mpc5200_pic>; | 334 | interrupt-parent = <&mpc5200_pic>; |
339 | bus-range = <0 0>; | 335 | bus-range = <0 0>; |
340 | ranges = <42000000 0 80000000 80000000 0 20000000 | 336 | ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000 |
341 | 02000000 0 a0000000 a0000000 0 10000000 | 337 | 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 |
342 | 01000000 0 00000000 b0000000 0 01000000>; | 338 | 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>; |
343 | }; | 339 | }; |
344 | }; | 340 | }; |
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts index 2b0dde058f8e..9e3c921be164 100644 --- a/arch/powerpc/boot/dts/motionpro.dts +++ b/arch/powerpc/boot/dts/motionpro.dts | |||
@@ -10,6 +10,8 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /dts-v1/; | ||
14 | |||
13 | / { | 15 | / { |
14 | model = "promess,motionpro"; | 16 | model = "promess,motionpro"; |
15 | compatible = "promess,motionpro"; | 17 | compatible = "promess,motionpro"; |
@@ -23,10 +25,10 @@ | |||
23 | PowerPC,5200@0 { | 25 | PowerPC,5200@0 { |
24 | device_type = "cpu"; | 26 | device_type = "cpu"; |
25 | reg = <0>; | 27 | reg = <0>; |
26 | d-cache-line-size = <20>; | 28 | d-cache-line-size = <32>; |
27 | i-cache-line-size = <20>; | 29 | i-cache-line-size = <32>; |
28 | d-cache-size = <4000>; // L1, 16K | 30 | d-cache-size = <0x4000>; // L1, 16K |
29 | i-cache-size = <4000>; // L1, 16K | 31 | i-cache-size = <0x4000>; // L1, 16K |
30 | timebase-frequency = <0>; // from bootloader | 32 | timebase-frequency = <0>; // from bootloader |
31 | bus-frequency = <0>; // from bootloader | 33 | bus-frequency = <0>; // from bootloader |
32 | clock-frequency = <0>; // from bootloader | 34 | clock-frequency = <0>; // from bootloader |
@@ -35,21 +37,21 @@ | |||
35 | 37 | ||
36 | memory { | 38 | memory { |
37 | device_type = "memory"; | 39 | device_type = "memory"; |
38 | reg = <00000000 04000000>; // 64MB | 40 | reg = <0x00000000 0x04000000>; // 64MB |
39 | }; | 41 | }; |
40 | 42 | ||
41 | soc5200@f0000000 { | 43 | soc5200@f0000000 { |
42 | #address-cells = <1>; | 44 | #address-cells = <1>; |
43 | #size-cells = <1>; | 45 | #size-cells = <1>; |
44 | compatible = "fsl,mpc5200b-immr"; | 46 | compatible = "fsl,mpc5200b-immr"; |
45 | ranges = <0 f0000000 0000c000>; | 47 | ranges = <0 0xf0000000 0x0000c000>; |
46 | reg = <f0000000 00000100>; | 48 | reg = <0xf0000000 0x00000100>; |
47 | bus-frequency = <0>; // from bootloader | 49 | bus-frequency = <0>; // from bootloader |
48 | system-frequency = <0>; // from bootloader | 50 | system-frequency = <0>; // from bootloader |
49 | 51 | ||
50 | cdm@200 { | 52 | cdm@200 { |
51 | compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; | 53 | compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; |
52 | reg = <200 38>; | 54 | reg = <0x200 0x38>; |
53 | }; | 55 | }; |
54 | 56 | ||
55 | mpc5200_pic: interrupt-controller@500 { | 57 | mpc5200_pic: interrupt-controller@500 { |
@@ -57,12 +59,12 @@ | |||
57 | interrupt-controller; | 59 | interrupt-controller; |
58 | #interrupt-cells = <3>; | 60 | #interrupt-cells = <3>; |
59 | compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; | 61 | compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; |
60 | reg = <500 80>; | 62 | reg = <0x500 0x80>; |
61 | }; | 63 | }; |
62 | 64 | ||
63 | timer@600 { // General Purpose Timer | 65 | timer@600 { // General Purpose Timer |
64 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 66 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
65 | reg = <600 10>; | 67 | reg = <0x600 0x10>; |
66 | interrupts = <1 9 0>; | 68 | interrupts = <1 9 0>; |
67 | interrupt-parent = <&mpc5200_pic>; | 69 | interrupt-parent = <&mpc5200_pic>; |
68 | fsl,has-wdt; | 70 | fsl,has-wdt; |
@@ -70,118 +72,118 @@ | |||
70 | 72 | ||
71 | timer@610 { // General Purpose Timer | 73 | timer@610 { // General Purpose Timer |
72 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 74 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
73 | reg = <610 10>; | 75 | reg = <0x610 0x10>; |
74 | interrupts = <1 a 0>; | 76 | interrupts = <1 10 0>; |
75 | interrupt-parent = <&mpc5200_pic>; | 77 | interrupt-parent = <&mpc5200_pic>; |
76 | }; | 78 | }; |
77 | 79 | ||
78 | timer@620 { // General Purpose Timer | 80 | timer@620 { // General Purpose Timer |
79 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 81 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
80 | reg = <620 10>; | 82 | reg = <0x620 0x10>; |
81 | interrupts = <1 b 0>; | 83 | interrupts = <1 11 0>; |
82 | interrupt-parent = <&mpc5200_pic>; | 84 | interrupt-parent = <&mpc5200_pic>; |
83 | }; | 85 | }; |
84 | 86 | ||
85 | timer@630 { // General Purpose Timer | 87 | timer@630 { // General Purpose Timer |
86 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 88 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
87 | reg = <630 10>; | 89 | reg = <0x630 0x10>; |
88 | interrupts = <1 c 0>; | 90 | interrupts = <1 12 0>; |
89 | interrupt-parent = <&mpc5200_pic>; | 91 | interrupt-parent = <&mpc5200_pic>; |
90 | }; | 92 | }; |
91 | 93 | ||
92 | timer@640 { // General Purpose Timer | 94 | timer@640 { // General Purpose Timer |
93 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 95 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
94 | reg = <640 10>; | 96 | reg = <0x640 0x10>; |
95 | interrupts = <1 d 0>; | 97 | interrupts = <1 13 0>; |
96 | interrupt-parent = <&mpc5200_pic>; | 98 | interrupt-parent = <&mpc5200_pic>; |
97 | }; | 99 | }; |
98 | 100 | ||
99 | timer@650 { // General Purpose Timer | 101 | timer@650 { // General Purpose Timer |
100 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | 102 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; |
101 | reg = <650 10>; | 103 | reg = <0x650 0x10>; |
102 | interrupts = <1 e 0>; | 104 | interrupts = <1 14 0>; |
103 | interrupt-parent = <&mpc5200_pic>; | 105 | interrupt-parent = <&mpc5200_pic>; |
104 | }; | 106 | }; |
105 | 107 | ||
106 | motionpro-led@660 { // Motion-PRO status LED | 108 | motionpro-led@660 { // Motion-PRO status LED |
107 | compatible = "promess,motionpro-led"; | 109 | compatible = "promess,motionpro-led"; |
108 | label = "motionpro-statusled"; | 110 | label = "motionpro-statusled"; |
109 | reg = <660 10>; | 111 | reg = <0x660 0x10>; |
110 | interrupts = <1 f 0>; | 112 | interrupts = <1 15 0>; |
111 | interrupt-parent = <&mpc5200_pic>; | 113 | interrupt-parent = <&mpc5200_pic>; |
112 | blink-delay = <64>; // 100 msec | 114 | blink-delay = <100>; // 100 msec |
113 | }; | 115 | }; |
114 | 116 | ||
115 | motionpro-led@670 { // Motion-PRO ready LED | 117 | motionpro-led@670 { // Motion-PRO ready LED |
116 | compatible = "promess,motionpro-led"; | 118 | compatible = "promess,motionpro-led"; |
117 | label = "motionpro-readyled"; | 119 | label = "motionpro-readyled"; |
118 | reg = <670 10>; | 120 | reg = <0x670 0x10>; |
119 | interrupts = <1 10 0>; | 121 | interrupts = <1 16 0>; |
120 | interrupt-parent = <&mpc5200_pic>; | 122 | interrupt-parent = <&mpc5200_pic>; |
121 | }; | 123 | }; |
122 | 124 | ||
123 | rtc@800 { // Real time clock | 125 | rtc@800 { // Real time clock |
124 | compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; | 126 | compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; |
125 | reg = <800 100>; | 127 | reg = <0x800 0x100>; |
126 | interrupts = <1 5 0 1 6 0>; | 128 | interrupts = <1 5 0 1 6 0>; |
127 | interrupt-parent = <&mpc5200_pic>; | 129 | interrupt-parent = <&mpc5200_pic>; |
128 | }; | 130 | }; |
129 | 131 | ||
130 | mscan@980 { | 132 | can@980 { |
131 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; | 133 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; |
132 | interrupts = <2 12 0>; | 134 | interrupts = <2 18 0>; |
133 | interrupt-parent = <&mpc5200_pic>; | 135 | interrupt-parent = <&mpc5200_pic>; |
134 | reg = <980 80>; | 136 | reg = <0x980 0x80>; |
135 | }; | 137 | }; |
136 | 138 | ||
137 | gpio@b00 { | 139 | gpio@b00 { |
138 | compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; | 140 | compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; |
139 | reg = <b00 40>; | 141 | reg = <0xb00 0x40>; |
140 | interrupts = <1 7 0>; | 142 | interrupts = <1 7 0>; |
141 | interrupt-parent = <&mpc5200_pic>; | 143 | interrupt-parent = <&mpc5200_pic>; |
142 | }; | 144 | }; |
143 | 145 | ||
144 | gpio@c00 { | 146 | gpio@c00 { |
145 | compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; | 147 | compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; |
146 | reg = <c00 40>; | 148 | reg = <0xc00 0x40>; |
147 | interrupts = <1 8 0 0 3 0>; | 149 | interrupts = <1 8 0 0 3 0>; |
148 | interrupt-parent = <&mpc5200_pic>; | 150 | interrupt-parent = <&mpc5200_pic>; |
149 | }; | 151 | }; |
150 | 152 | ||
151 | spi@f00 { | 153 | spi@f00 { |
152 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; | 154 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; |
153 | reg = <f00 20>; | 155 | reg = <0xf00 0x20>; |
154 | interrupts = <2 d 0 2 e 0>; | 156 | interrupts = <2 13 0 2 14 0>; |
155 | interrupt-parent = <&mpc5200_pic>; | 157 | interrupt-parent = <&mpc5200_pic>; |
156 | }; | 158 | }; |
157 | 159 | ||
158 | usb@1000 { | 160 | usb@1000 { |
159 | compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; | 161 | compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; |
160 | reg = <1000 ff>; | 162 | reg = <0x1000 0xff>; |
161 | interrupts = <2 6 0>; | 163 | interrupts = <2 6 0>; |
162 | interrupt-parent = <&mpc5200_pic>; | 164 | interrupt-parent = <&mpc5200_pic>; |
163 | }; | 165 | }; |
164 | 166 | ||
165 | dma-controller@1200 { | 167 | dma-controller@1200 { |
166 | compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; | 168 | compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; |
167 | reg = <1200 80>; | 169 | reg = <0x1200 0x80>; |
168 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | 170 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 |
169 | 3 4 0 3 5 0 3 6 0 3 7 0 | 171 | 3 4 0 3 5 0 3 6 0 3 7 0 |
170 | 3 8 0 3 9 0 3 a 0 3 b 0 | 172 | 3 8 0 3 9 0 3 10 0 3 11 0 |
171 | 3 c 0 3 d 0 3 e 0 3 f 0>; | 173 | 3 12 0 3 13 0 3 14 0 3 15 0>; |
172 | interrupt-parent = <&mpc5200_pic>; | 174 | interrupt-parent = <&mpc5200_pic>; |
173 | }; | 175 | }; |
174 | 176 | ||
175 | xlb@1f00 { | 177 | xlb@1f00 { |
176 | compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb"; | 178 | compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb"; |
177 | reg = <1f00 100>; | 179 | reg = <0x1f00 0x100>; |
178 | }; | 180 | }; |
179 | 181 | ||
180 | serial@2000 { // PSC1 | 182 | serial@2000 { // PSC1 |
181 | device_type = "serial"; | 183 | device_type = "serial"; |
182 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | 184 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; |
183 | port-number = <0>; // Logical port assignment | 185 | port-number = <0>; // Logical port assignment |
184 | reg = <2000 100>; | 186 | reg = <0x2000 0x100>; |
185 | interrupts = <2 1 0>; | 187 | interrupts = <2 1 0>; |
186 | interrupt-parent = <&mpc5200_pic>; | 188 | interrupt-parent = <&mpc5200_pic>; |
187 | }; | 189 | }; |
@@ -190,7 +192,7 @@ | |||
190 | spi@2200 { // PSC2 | 192 | spi@2200 { // PSC2 |
191 | compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi"; | 193 | compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi"; |
192 | cell-index = <1>; | 194 | cell-index = <1>; |
193 | reg = <2200 100>; | 195 | reg = <0x2200 0x100>; |
194 | interrupts = <2 2 0>; | 196 | interrupts = <2 2 0>; |
195 | interrupt-parent = <&mpc5200_pic>; | 197 | interrupt-parent = <&mpc5200_pic>; |
196 | }; | 198 | }; |
@@ -200,15 +202,15 @@ | |||
200 | device_type = "serial"; | 202 | device_type = "serial"; |
201 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | 203 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; |
202 | port-number = <4>; // Logical port assignment | 204 | port-number = <4>; // Logical port assignment |
203 | reg = <2800 100>; | 205 | reg = <0x2800 0x100>; |
204 | interrupts = <2 c 0>; | 206 | interrupts = <2 12 0>; |
205 | interrupt-parent = <&mpc5200_pic>; | 207 | interrupt-parent = <&mpc5200_pic>; |
206 | }; | 208 | }; |
207 | 209 | ||
208 | ethernet@3000 { | 210 | ethernet@3000 { |
209 | device_type = "network"; | 211 | device_type = "network"; |
210 | compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; | 212 | compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; |
211 | reg = <3000 400>; | 213 | reg = <0x3000 0x400>; |
212 | local-mac-address = [ 00 00 00 00 00 00 ]; | 214 | local-mac-address = [ 00 00 00 00 00 00 ]; |
213 | interrupts = <2 5 0>; | 215 | interrupts = <2 5 0>; |
214 | interrupt-parent = <&mpc5200_pic>; | 216 | interrupt-parent = <&mpc5200_pic>; |
@@ -219,7 +221,7 @@ | |||
219 | #address-cells = <1>; | 221 | #address-cells = <1>; |
220 | #size-cells = <0>; | 222 | #size-cells = <0>; |
221 | compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio"; | 223 | compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio"; |
222 | reg = <3000 400>; // fec range, since we need to setup fec interrupts | 224 | reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts |
223 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. | 225 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. |
224 | interrupt-parent = <&mpc5200_pic>; | 226 | interrupt-parent = <&mpc5200_pic>; |
225 | 227 | ||
@@ -231,7 +233,7 @@ | |||
231 | 233 | ||
232 | ata@3a00 { | 234 | ata@3a00 { |
233 | compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; | 235 | compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; |
234 | reg = <3a00 100>; | 236 | reg = <0x3a00 0x100>; |
235 | interrupts = <2 7 0>; | 237 | interrupts = <2 7 0>; |
236 | interrupt-parent = <&mpc5200_pic>; | 238 | interrupt-parent = <&mpc5200_pic>; |
237 | }; | 239 | }; |
@@ -240,21 +242,21 @@ | |||
240 | #address-cells = <1>; | 242 | #address-cells = <1>; |
241 | #size-cells = <0>; | 243 | #size-cells = <0>; |
242 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; | 244 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; |
243 | reg = <3d40 40>; | 245 | reg = <0x3d40 0x40>; |
244 | interrupts = <2 10 0>; | 246 | interrupts = <2 16 0>; |
245 | interrupt-parent = <&mpc5200_pic>; | 247 | interrupt-parent = <&mpc5200_pic>; |
246 | fsl5200-clocking; | 248 | fsl5200-clocking; |
247 | 249 | ||
248 | rtc@68 { | 250 | rtc@68 { |
249 | device_type = "rtc"; | 251 | device_type = "rtc"; |
250 | compatible = "dallas,ds1339"; | 252 | compatible = "dallas,ds1339"; |
251 | reg = <68>; | 253 | reg = <0x68>; |
252 | }; | 254 | }; |
253 | }; | 255 | }; |
254 | 256 | ||
255 | sram@8000 { | 257 | sram@8000 { |
256 | compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram"; | 258 | compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram"; |
257 | reg = <8000 4000>; | 259 | reg = <0x8000 0x4000>; |
258 | }; | 260 | }; |
259 | }; | 261 | }; |
260 | 262 | ||
@@ -262,15 +264,15 @@ | |||
262 | compatible = "fsl,lpb"; | 264 | compatible = "fsl,lpb"; |
263 | #address-cells = <2>; | 265 | #address-cells = <2>; |
264 | #size-cells = <1>; | 266 | #size-cells = <1>; |
265 | ranges = <0 0 ff000000 01000000 | 267 | ranges = <0 0 0xff000000 0x01000000 |
266 | 1 0 50000000 00010000 | 268 | 1 0 0x50000000 0x00010000 |
267 | 2 0 50010000 00010000 | 269 | 2 0 0x50010000 0x00010000 |
268 | 3 0 50020000 00010000>; | 270 | 3 0 0x50020000 0x00010000>; |
269 | 271 | ||
270 | // 8-bit DualPort SRAM on LocalPlus Bus CS1 | 272 | // 8-bit DualPort SRAM on LocalPlus Bus CS1 |
271 | kollmorgen@1,0 { | 273 | kollmorgen@1,0 { |
272 | compatible = "promess,motionpro-kollmorgen"; | 274 | compatible = "promess,motionpro-kollmorgen"; |
273 | reg = <1 0 10000>; | 275 | reg = <1 0 0x10000>; |
274 | interrupts = <1 1 0>; | 276 | interrupts = <1 1 0>; |
275 | interrupt-parent = <&mpc5200_pic>; | 277 | interrupt-parent = <&mpc5200_pic>; |
276 | }; | 278 | }; |
@@ -278,13 +280,13 @@ | |||
278 | // 8-bit board CPLD on LocalPlus Bus CS2 | 280 | // 8-bit board CPLD on LocalPlus Bus CS2 |
279 | cpld@2,0 { | 281 | cpld@2,0 { |
280 | compatible = "promess,motionpro-cpld"; | 282 | compatible = "promess,motionpro-cpld"; |
281 | reg = <2 0 10000>; | 283 | reg = <2 0 0x10000>; |
282 | }; | 284 | }; |
283 | 285 | ||
284 | // 8-bit custom Anybus Module on LocalPlus Bus CS3 | 286 | // 8-bit custom Anybus Module on LocalPlus Bus CS3 |
285 | anybus@3,0 { | 287 | anybus@3,0 { |
286 | compatible = "promess,motionpro-anybus"; | 288 | compatible = "promess,motionpro-anybus"; |
287 | reg = <3 0 10000>; | 289 | reg = <3 0 0x10000>; |
288 | }; | 290 | }; |
289 | pro_module_general@3,0 { | 291 | pro_module_general@3,0 { |
290 | compatible = "promess,pro_module_general"; | 292 | compatible = "promess,pro_module_general"; |
@@ -292,13 +294,13 @@ | |||
292 | }; | 294 | }; |
293 | pro_module_dio@3,800 { | 295 | pro_module_dio@3,800 { |
294 | compatible = "promess,pro_module_dio"; | 296 | compatible = "promess,pro_module_dio"; |
295 | reg = <3 800 2>; | 297 | reg = <3 0x800 2>; |
296 | }; | 298 | }; |
297 | 299 | ||
298 | // 16-bit flash device at LocalPlus Bus CS0 | 300 | // 16-bit flash device at LocalPlus Bus CS0 |
299 | flash@0,0 { | 301 | flash@0,0 { |
300 | compatible = "cfi-flash"; | 302 | compatible = "cfi-flash"; |
301 | reg = <0 0 01000000>; | 303 | reg = <0 0 0x01000000>; |
302 | bank-width = <2>; | 304 | bank-width = <2>; |
303 | device-width = <2>; | 305 | device-width = <2>; |
304 | #size-cells = <1>; | 306 | #size-cells = <1>; |
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts index 7f9b999843ce..1e4bfe9cadb9 100644 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts | |||
@@ -26,6 +26,7 @@ | |||
26 | serial1 = &serial1; | 26 | serial1 = &serial1; |
27 | pci0 = &pci0; | 27 | pci0 = &pci0; |
28 | pci1 = &pci1; | 28 | pci1 = &pci1; |
29 | rapidio0 = &rapidio0; | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | cpus { | 32 | cpus { |
@@ -500,4 +501,15 @@ | |||
500 | 0x0 0x00100000>; | 501 | 0x0 0x00100000>; |
501 | }; | 502 | }; |
502 | }; | 503 | }; |
504 | rapidio0: rapidio@f80c0000 { | ||
505 | #address-cells = <2>; | ||
506 | #size-cells = <2>; | ||
507 | compatible = "fsl,rapidio-delta"; | ||
508 | reg = <0xf80c0000 0x20000>; | ||
509 | ranges = <0 0 0xc0000000 0 0x20000000>; | ||
510 | interrupt-parent = <&mpic>; | ||
511 | /* err_irq bell_outb_irq bell_inb_irq | ||
512 | msg1_tx_irq msg1_rx_irq msg2_tx_irq msg2_rx_irq */ | ||
513 | interrupts = <48 2 49 2 50 2 53 2 54 2 55 2 56 2>; | ||
514 | }; | ||
503 | }; | 515 | }; |
diff --git a/arch/powerpc/boot/dts/pcm030.dts b/arch/powerpc/boot/dts/pcm030.dts new file mode 100644 index 000000000000..7c1bb952360c --- /dev/null +++ b/arch/powerpc/boot/dts/pcm030.dts | |||
@@ -0,0 +1,363 @@ | |||
1 | /* | ||
2 | * phyCORE-MPC5200B-tiny (pcm030) board Device Tree Source | ||
3 | * | ||
4 | * Copyright 2006 Pengutronix | ||
5 | * Sascha Hauer <s.hauer@pengutronix.de> | ||
6 | * Copyright 2007 Pengutronix | ||
7 | * Juergen Beisert <j.beisert@pengutronix.de> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | /dts-v1/; | ||
16 | |||
17 | / { | ||
18 | model = "phytec,pcm030"; | ||
19 | compatible = "phytec,pcm030"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | |||
23 | cpus { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <0>; | ||
26 | |||
27 | PowerPC,5200@0 { | ||
28 | device_type = "cpu"; | ||
29 | reg = <0>; | ||
30 | d-cache-line-size = <32>; | ||
31 | i-cache-line-size = <32>; | ||
32 | d-cache-size = <0x4000>; /* L1, 16K */ | ||
33 | i-cache-size = <0x4000>; /* L1, 16K */ | ||
34 | timebase-frequency = <0>; /* From Bootloader */ | ||
35 | bus-frequency = <0>; /* From Bootloader */ | ||
36 | clock-frequency = <0>; /* From Bootloader */ | ||
37 | }; | ||
38 | }; | ||
39 | |||
40 | memory { | ||
41 | device_type = "memory"; | ||
42 | reg = <0x00000000 0x04000000>; /* 64MB */ | ||
43 | }; | ||
44 | |||
45 | soc5200@f0000000 { | ||
46 | #address-cells = <1>; | ||
47 | #size-cells = <1>; | ||
48 | compatible = "fsl,mpc5200b-immr"; | ||
49 | ranges = <0x0 0xf0000000 0x0000c000>; | ||
50 | bus-frequency = <0>; /* From bootloader */ | ||
51 | system-frequency = <0>; /* From bootloader */ | ||
52 | |||
53 | cdm@200 { | ||
54 | compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm"; | ||
55 | reg = <0x200 0x38>; | ||
56 | }; | ||
57 | |||
58 | mpc5200_pic: interrupt-controller@500 { | ||
59 | /* 5200 interrupts are encoded into two levels; */ | ||
60 | interrupt-controller; | ||
61 | #interrupt-cells = <3>; | ||
62 | device_type = "interrupt-controller"; | ||
63 | compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic"; | ||
64 | reg = <0x500 0x80>; | ||
65 | }; | ||
66 | |||
67 | timer@600 { /* General Purpose Timer */ | ||
68 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
69 | cell-index = <0>; | ||
70 | reg = <0x600 0x10>; | ||
71 | interrupts = <0x1 0x9 0x0>; | ||
72 | interrupt-parent = <&mpc5200_pic>; | ||
73 | fsl,has-wdt; | ||
74 | }; | ||
75 | |||
76 | timer@610 { /* General Purpose Timer */ | ||
77 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
78 | cell-index = <1>; | ||
79 | reg = <0x610 0x10>; | ||
80 | interrupts = <0x1 0xa 0x0>; | ||
81 | interrupt-parent = <&mpc5200_pic>; | ||
82 | }; | ||
83 | |||
84 | gpt2: timer@620 { /* General Purpose Timer in GPIO mode */ | ||
85 | compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; | ||
86 | cell-index = <2>; | ||
87 | reg = <0x620 0x10>; | ||
88 | interrupts = <0x1 0xb 0x0>; | ||
89 | interrupt-parent = <&mpc5200_pic>; | ||
90 | gpio-controller; | ||
91 | #gpio-cells = <2>; | ||
92 | }; | ||
93 | |||
94 | gpt3: timer@630 { /* General Purpose Timer in GPIO mode */ | ||
95 | compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; | ||
96 | cell-index = <3>; | ||
97 | reg = <0x630 0x10>; | ||
98 | interrupts = <0x1 0xc 0x0>; | ||
99 | interrupt-parent = <&mpc5200_pic>; | ||
100 | gpio-controller; | ||
101 | #gpio-cells = <2>; | ||
102 | }; | ||
103 | |||
104 | gpt4: timer@640 { /* General Purpose Timer in GPIO mode */ | ||
105 | compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; | ||
106 | cell-index = <4>; | ||
107 | reg = <0x640 0x10>; | ||
108 | interrupts = <0x1 0xd 0x0>; | ||
109 | interrupt-parent = <&mpc5200_pic>; | ||
110 | gpio-controller; | ||
111 | #gpio-cells = <2>; | ||
112 | }; | ||
113 | |||
114 | gpt5: timer@650 { /* General Purpose Timer in GPIO mode */ | ||
115 | compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; | ||
116 | cell-index = <5>; | ||
117 | reg = <0x650 0x10>; | ||
118 | interrupts = <0x1 0xe 0x0>; | ||
119 | interrupt-parent = <&mpc5200_pic>; | ||
120 | gpio-controller; | ||
121 | #gpio-cells = <2>; | ||
122 | }; | ||
123 | |||
124 | gpt6: timer@660 { /* General Purpose Timer in GPIO mode */ | ||
125 | compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; | ||
126 | cell-index = <6>; | ||
127 | reg = <0x660 0x10>; | ||
128 | interrupts = <0x1 0xf 0x0>; | ||
129 | interrupt-parent = <&mpc5200_pic>; | ||
130 | gpio-controller; | ||
131 | #gpio-cells = <2>; | ||
132 | }; | ||
133 | |||
134 | gpt7: timer@670 { /* General Purpose Timer in GPIO mode */ | ||
135 | compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio"; | ||
136 | cell-index = <7>; | ||
137 | reg = <0x670 0x10>; | ||
138 | interrupts = <0x1 0x10 0x0>; | ||
139 | interrupt-parent = <&mpc5200_pic>; | ||
140 | gpio-controller; | ||
141 | #gpio-cells = <2>; | ||
142 | }; | ||
143 | |||
144 | rtc@800 { // Real time clock | ||
145 | compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc"; | ||
146 | device_type = "rtc"; | ||
147 | reg = <0x800 0x100>; | ||
148 | interrupts = <0x1 0x5 0x0 0x1 0x6 0x0>; | ||
149 | interrupt-parent = <&mpc5200_pic>; | ||
150 | }; | ||
151 | |||
152 | can@900 { | ||
153 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; | ||
154 | cell-index = <0>; | ||
155 | interrupts = <0x2 0x11 0x0>; | ||
156 | interrupt-parent = <&mpc5200_pic>; | ||
157 | reg = <0x900 0x80>; | ||
158 | }; | ||
159 | |||
160 | can@980 { | ||
161 | compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan"; | ||
162 | cell-index = <1>; | ||
163 | interrupts = <0x2 0x12 0x0>; | ||
164 | interrupt-parent = <&mpc5200_pic>; | ||
165 | reg = <0x980 0x80>; | ||
166 | }; | ||
167 | |||
168 | gpio_simple: gpio@b00 { | ||
169 | compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio"; | ||
170 | reg = <0xb00 0x40>; | ||
171 | interrupts = <0x1 0x7 0x0>; | ||
172 | interrupt-parent = <&mpc5200_pic>; | ||
173 | gpio-controller; | ||
174 | #gpio-cells = <2>; | ||
175 | }; | ||
176 | |||
177 | gpio_wkup: gpio-wkup@c00 { | ||
178 | compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup"; | ||
179 | reg = <0xc00 0x40>; | ||
180 | interrupts = <0x1 0x8 0x0 0x0 0x3 0x0>; | ||
181 | interrupt-parent = <&mpc5200_pic>; | ||
182 | gpio-controller; | ||
183 | #gpio-cells = <2>; | ||
184 | }; | ||
185 | |||
186 | spi@f00 { | ||
187 | compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi"; | ||
188 | reg = <0xf00 0x20>; | ||
189 | interrupts = <0x2 0xd 0x0 0x2 0xe 0x0>; | ||
190 | interrupt-parent = <&mpc5200_pic>; | ||
191 | }; | ||
192 | |||
193 | usb@1000 { | ||
194 | compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be"; | ||
195 | reg = <0x1000 0xff>; | ||
196 | interrupts = <0x2 0x6 0x0>; | ||
197 | interrupt-parent = <&mpc5200_pic>; | ||
198 | }; | ||
199 | |||
200 | dma-controller@1200 { | ||
201 | device_type = "dma-controller"; | ||
202 | compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm"; | ||
203 | reg = <0x1200 0x80>; | ||
204 | interrupts = <0x3 0x0 0x0 0x3 0x1 0x0 0x3 0x2 0x0 0x3 0x3 0x0 | ||
205 | 0x3 0x4 0x0 0x3 0x5 0x0 0x3 0x6 0x0 0x3 0x7 0x0 | ||
206 | 0x3 0x8 0x0 0x3 0x9 0x0 0x3 0xa 0x0 0x3 0xb 0x0 | ||
207 | 0x3 0xc 0x0 0x3 0xd 0x0 0x3 0xe 0x0 0x3 0xf 0x0>; | ||
208 | interrupt-parent = <&mpc5200_pic>; | ||
209 | }; | ||
210 | |||
211 | xlb@1f00 { | ||
212 | compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb"; | ||
213 | reg = <0x1f00 0x100>; | ||
214 | }; | ||
215 | |||
216 | ac97@2000 { /* PSC1 in ac97 mode */ | ||
217 | device_type = "sound"; | ||
218 | compatible = "mpc5200b-psc-ac97","fsl,mpc5200b-psc-ac97"; | ||
219 | cell-index = <0>; | ||
220 | reg = <0x2000 0x100>; | ||
221 | interrupts = <0x2 0x2 0x0>; | ||
222 | interrupt-parent = <&mpc5200_pic>; | ||
223 | }; | ||
224 | |||
225 | /* PSC2 port is used by CAN1/2 */ | ||
226 | |||
227 | serial@2400 { /* PSC3 in UART mode */ | ||
228 | device_type = "serial"; | ||
229 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | ||
230 | port-number = <0>; | ||
231 | cell-index = <2>; | ||
232 | reg = <0x2400 0x100>; | ||
233 | interrupts = <0x2 0x3 0x0>; | ||
234 | interrupt-parent = <&mpc5200_pic>; | ||
235 | }; | ||
236 | |||
237 | /* PSC4 is ??? */ | ||
238 | |||
239 | /* PSC5 is ??? */ | ||
240 | |||
241 | serial@2c00 { /* PSC6 in UART mode */ | ||
242 | device_type = "serial"; | ||
243 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | ||
244 | port-number = <1>; | ||
245 | cell-index = <5>; | ||
246 | reg = <0x2c00 0x100>; | ||
247 | interrupts = <0x2 0x4 0x0>; | ||
248 | interrupt-parent = <&mpc5200_pic>; | ||
249 | }; | ||
250 | |||
251 | ethernet@3000 { | ||
252 | device_type = "network"; | ||
253 | compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec"; | ||
254 | reg = <0x3000 0x400>; | ||
255 | local-mac-address = [00 00 00 00 00 00]; | ||
256 | interrupts = <0x2 0x5 0x0>; | ||
257 | interrupt-parent = <&mpc5200_pic>; | ||
258 | phy-handle = <&phy0>; | ||
259 | }; | ||
260 | |||
261 | mdio@3000 { | ||
262 | #address-cells = <1>; | ||
263 | #size-cells = <0>; | ||
264 | compatible = "fsl,mpc5200b-mdio", "fsl,mpc5200-mdio"; | ||
265 | reg = <0x3000 0x400>; /* fec range, since we need to setup fec interrupts */ | ||
266 | interrupts = <0x2 0x5 0x0>; /* these are for "mii command finished", not link changes & co. */ | ||
267 | interrupt-parent = <&mpc5200_pic>; | ||
268 | |||
269 | phy0:ethernet-phy@0 { | ||
270 | device_type = "ethernet-phy"; | ||
271 | reg = <0x0>; | ||
272 | }; | ||
273 | }; | ||
274 | |||
275 | ata@3a00 { | ||
276 | device_type = "ata"; | ||
277 | compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata"; | ||
278 | reg = <0x3a00 0x100>; | ||
279 | interrupts = <0x2 0x7 0x0>; | ||
280 | interrupt-parent = <&mpc5200_pic>; | ||
281 | }; | ||
282 | |||
283 | i2c@3d00 { | ||
284 | #address-cells = <1>; | ||
285 | #size-cells = <0>; | ||
286 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; | ||
287 | cell-index = <0>; | ||
288 | reg = <0x3d00 0x40>; | ||
289 | interrupts = <0x2 0xf 0x0>; | ||
290 | interrupt-parent = <&mpc5200_pic>; | ||
291 | fsl5200-clocking; | ||
292 | }; | ||
293 | |||
294 | i2c@3d40 { | ||
295 | #address-cells = <1>; | ||
296 | #size-cells = <0>; | ||
297 | compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; | ||
298 | cell-index = <1>; | ||
299 | reg = <0x3d40 0x40>; | ||
300 | interrupts = <0x2 0x10 0x0>; | ||
301 | interrupt-parent = <&mpc5200_pic>; | ||
302 | fsl5200-clocking; | ||
303 | rtc@51 { | ||
304 | device_type = "rtc"; | ||
305 | compatible = "nxp,pcf8563"; | ||
306 | reg = <0x51>; | ||
307 | }; | ||
308 | /* FIXME: EEPROM */ | ||
309 | }; | ||
310 | |||
311 | sram@8000 { | ||
312 | compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram","sram"; | ||
313 | reg = <0x8000 0x4000>; | ||
314 | }; | ||
315 | |||
316 | /* This is only an example device to show the usage of gpios. It maps all available | ||
317 | * gpios to the "gpio-provider" device. | ||
318 | */ | ||
319 | gpio { | ||
320 | compatible = "gpio-provider"; | ||
321 | |||
322 | /* mpc52xx exp.con patchfield */ | ||
323 | gpios = <&gpio_wkup 0 0 /* GPIO_WKUP_7 11d jp13-3 */ | ||
324 | &gpio_wkup 1 0 /* GPIO_WKUP_6 14c */ | ||
325 | &gpio_wkup 6 0 /* PSC2_4 43c x5-11 */ | ||
326 | &gpio_simple 2 0 /* IRDA_1 24c x7-6 set GPS_PORT_CONFIG[IRDA] = 0 */ | ||
327 | &gpio_simple 3 0 /* IRDA_0 x8-5 set GPS_PORT_CONFIG[IRDA] = 0 */ | ||
328 | &gpt2 0 0 /* timer2 12d x4-4 */ | ||
329 | &gpt3 0 0 /* timer3 13d x6-4 */ | ||
330 | &gpt4 0 0 /* timer4 61c x2-16 */ | ||
331 | &gpt5 0 0 /* timer5 44c x7-11 */ | ||
332 | &gpt6 0 0 /* timer6 60c x8-15 */ | ||
333 | &gpt7 0 0 /* timer7 36a x17-9 */ | ||
334 | >; | ||
335 | }; | ||
336 | }; | ||
337 | |||
338 | pci@f0000d00 { | ||
339 | #interrupt-cells = <1>; | ||
340 | #size-cells = <2>; | ||
341 | #address-cells = <3>; | ||
342 | device_type = "pci"; | ||
343 | compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci"; | ||
344 | reg = <0xf0000d00 0x100>; | ||
345 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
346 | interrupt-map = <0xc000 0x0 0x0 0x1 &mpc5200_pic 0x0 0x0 0x3 /* 1st slot */ | ||
347 | 0xc000 0x0 0x0 0x2 &mpc5200_pic 0x1 0x1 0x3 | ||
348 | 0xc000 0x0 0x0 0x3 &mpc5200_pic 0x1 0x2 0x3 | ||
349 | 0xc000 0x0 0x0 0x4 &mpc5200_pic 0x1 0x3 0x3 | ||
350 | |||
351 | 0xc800 0x0 0x0 0x1 &mpc5200_pic 0x1 0x1 0x3 /* 2nd slot */ | ||
352 | 0xc800 0x0 0x0 0x2 &mpc5200_pic 0x1 0x2 0x3 | ||
353 | 0xc800 0x0 0x0 0x3 &mpc5200_pic 0x1 0x3 0x3 | ||
354 | 0xc800 0x0 0x0 0x4 &mpc5200_pic 0x0 0x0 0x3>; | ||
355 | clock-frequency = <0>; // From boot loader | ||
356 | interrupts = <0x2 0x8 0x0 0x2 0x9 0x0 0x2 0xa 0x0>; | ||
357 | interrupt-parent = <&mpc5200_pic>; | ||
358 | bus-range = <0 0>; | ||
359 | ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x20000000 | ||
360 | 0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000 | ||
361 | 0x01000000 0x0 0x00000000 0xb0000000 0x0 0x01000000>; | ||
362 | }; | ||
363 | }; | ||
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts index 65bcea6a0173..773a68e00058 100644 --- a/arch/powerpc/boot/dts/tqm5200.dts +++ b/arch/powerpc/boot/dts/tqm5200.dts | |||
@@ -10,6 +10,8 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /dts-v1/; | ||
14 | |||
13 | / { | 15 | / { |
14 | model = "tqc,tqm5200"; | 16 | model = "tqc,tqm5200"; |
15 | compatible = "tqc,tqm5200"; | 17 | compatible = "tqc,tqm5200"; |
@@ -23,10 +25,10 @@ | |||
23 | PowerPC,5200@0 { | 25 | PowerPC,5200@0 { |
24 | device_type = "cpu"; | 26 | device_type = "cpu"; |
25 | reg = <0>; | 27 | reg = <0>; |
26 | d-cache-line-size = <20>; | 28 | d-cache-line-size = <32>; |
27 | i-cache-line-size = <20>; | 29 | i-cache-line-size = <32>; |
28 | d-cache-size = <4000>; // L1, 16K | 30 | d-cache-size = <0x4000>; // L1, 16K |
29 | i-cache-size = <4000>; // L1, 16K | 31 | i-cache-size = <0x4000>; // L1, 16K |
30 | timebase-frequency = <0>; // from bootloader | 32 | timebase-frequency = <0>; // from bootloader |
31 | bus-frequency = <0>; // from bootloader | 33 | bus-frequency = <0>; // from bootloader |
32 | clock-frequency = <0>; // from bootloader | 34 | clock-frequency = <0>; // from bootloader |
@@ -35,21 +37,21 @@ | |||
35 | 37 | ||
36 | memory { | 38 | memory { |
37 | device_type = "memory"; | 39 | device_type = "memory"; |
38 | reg = <00000000 04000000>; // 64MB | 40 | reg = <0x00000000 0x04000000>; // 64MB |
39 | }; | 41 | }; |
40 | 42 | ||
41 | soc5200@f0000000 { | 43 | soc5200@f0000000 { |
42 | #address-cells = <1>; | 44 | #address-cells = <1>; |
43 | #size-cells = <1>; | 45 | #size-cells = <1>; |
44 | compatible = "fsl,mpc5200-immr"; | 46 | compatible = "fsl,mpc5200-immr"; |
45 | ranges = <0 f0000000 0000c000>; | 47 | ranges = <0 0xf0000000 0x0000c000>; |
46 | reg = <f0000000 00000100>; | 48 | reg = <0xf0000000 0x00000100>; |
47 | bus-frequency = <0>; // from bootloader | 49 | bus-frequency = <0>; // from bootloader |
48 | system-frequency = <0>; // from bootloader | 50 | system-frequency = <0>; // from bootloader |
49 | 51 | ||
50 | cdm@200 { | 52 | cdm@200 { |
51 | compatible = "fsl,mpc5200-cdm"; | 53 | compatible = "fsl,mpc5200-cdm"; |
52 | reg = <200 38>; | 54 | reg = <0x200 0x38>; |
53 | }; | 55 | }; |
54 | 56 | ||
55 | mpc5200_pic: interrupt-controller@500 { | 57 | mpc5200_pic: interrupt-controller@500 { |
@@ -57,12 +59,12 @@ | |||
57 | interrupt-controller; | 59 | interrupt-controller; |
58 | #interrupt-cells = <3>; | 60 | #interrupt-cells = <3>; |
59 | compatible = "fsl,mpc5200-pic"; | 61 | compatible = "fsl,mpc5200-pic"; |
60 | reg = <500 80>; | 62 | reg = <0x500 0x80>; |
61 | }; | 63 | }; |
62 | 64 | ||
63 | timer@600 { // General Purpose Timer | 65 | timer@600 { // General Purpose Timer |
64 | compatible = "fsl,mpc5200-gpt"; | 66 | compatible = "fsl,mpc5200-gpt"; |
65 | reg = <600 10>; | 67 | reg = <0x600 0x10>; |
66 | interrupts = <1 9 0>; | 68 | interrupts = <1 9 0>; |
67 | interrupt-parent = <&mpc5200_pic>; | 69 | interrupt-parent = <&mpc5200_pic>; |
68 | fsl,has-wdt; | 70 | fsl,has-wdt; |
@@ -70,38 +72,38 @@ | |||
70 | 72 | ||
71 | gpio@b00 { | 73 | gpio@b00 { |
72 | compatible = "fsl,mpc5200-gpio"; | 74 | compatible = "fsl,mpc5200-gpio"; |
73 | reg = <b00 40>; | 75 | reg = <0xb00 0x40>; |
74 | interrupts = <1 7 0>; | 76 | interrupts = <1 7 0>; |
75 | interrupt-parent = <&mpc5200_pic>; | 77 | interrupt-parent = <&mpc5200_pic>; |
76 | }; | 78 | }; |
77 | 79 | ||
78 | usb@1000 { | 80 | usb@1000 { |
79 | compatible = "fsl,mpc5200-ohci","ohci-be"; | 81 | compatible = "fsl,mpc5200-ohci","ohci-be"; |
80 | reg = <1000 ff>; | 82 | reg = <0x1000 0xff>; |
81 | interrupts = <2 6 0>; | 83 | interrupts = <2 6 0>; |
82 | interrupt-parent = <&mpc5200_pic>; | 84 | interrupt-parent = <&mpc5200_pic>; |
83 | }; | 85 | }; |
84 | 86 | ||
85 | dma-controller@1200 { | 87 | dma-controller@1200 { |
86 | compatible = "fsl,mpc5200-bestcomm"; | 88 | compatible = "fsl,mpc5200-bestcomm"; |
87 | reg = <1200 80>; | 89 | reg = <0x1200 0x80>; |
88 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | 90 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 |
89 | 3 4 0 3 5 0 3 6 0 3 7 0 | 91 | 3 4 0 3 5 0 3 6 0 3 7 0 |
90 | 3 8 0 3 9 0 3 a 0 3 b 0 | 92 | 3 8 0 3 9 0 3 10 0 3 11 0 |
91 | 3 c 0 3 d 0 3 e 0 3 f 0>; | 93 | 3 12 0 3 13 0 3 14 0 3 15 0>; |
92 | interrupt-parent = <&mpc5200_pic>; | 94 | interrupt-parent = <&mpc5200_pic>; |
93 | }; | 95 | }; |
94 | 96 | ||
95 | xlb@1f00 { | 97 | xlb@1f00 { |
96 | compatible = "fsl,mpc5200-xlb"; | 98 | compatible = "fsl,mpc5200-xlb"; |
97 | reg = <1f00 100>; | 99 | reg = <0x1f00 0x100>; |
98 | }; | 100 | }; |
99 | 101 | ||
100 | serial@2000 { // PSC1 | 102 | serial@2000 { // PSC1 |
101 | device_type = "serial"; | 103 | device_type = "serial"; |
102 | compatible = "fsl,mpc5200-psc-uart"; | 104 | compatible = "fsl,mpc5200-psc-uart"; |
103 | port-number = <0>; // Logical port assignment | 105 | port-number = <0>; // Logical port assignment |
104 | reg = <2000 100>; | 106 | reg = <0x2000 0x100>; |
105 | interrupts = <2 1 0>; | 107 | interrupts = <2 1 0>; |
106 | interrupt-parent = <&mpc5200_pic>; | 108 | interrupt-parent = <&mpc5200_pic>; |
107 | }; | 109 | }; |
@@ -110,7 +112,7 @@ | |||
110 | device_type = "serial"; | 112 | device_type = "serial"; |
111 | compatible = "fsl,mpc5200-psc-uart"; | 113 | compatible = "fsl,mpc5200-psc-uart"; |
112 | port-number = <1>; // Logical port assignment | 114 | port-number = <1>; // Logical port assignment |
113 | reg = <2200 100>; | 115 | reg = <0x2200 0x100>; |
114 | interrupts = <2 2 0>; | 116 | interrupts = <2 2 0>; |
115 | interrupt-parent = <&mpc5200_pic>; | 117 | interrupt-parent = <&mpc5200_pic>; |
116 | }; | 118 | }; |
@@ -119,7 +121,7 @@ | |||
119 | device_type = "serial"; | 121 | device_type = "serial"; |
120 | compatible = "fsl,mpc5200-psc-uart"; | 122 | compatible = "fsl,mpc5200-psc-uart"; |
121 | port-number = <2>; // Logical port assignment | 123 | port-number = <2>; // Logical port assignment |
122 | reg = <2400 100>; | 124 | reg = <0x2400 0x100>; |
123 | interrupts = <2 3 0>; | 125 | interrupts = <2 3 0>; |
124 | interrupt-parent = <&mpc5200_pic>; | 126 | interrupt-parent = <&mpc5200_pic>; |
125 | }; | 127 | }; |
@@ -127,7 +129,7 @@ | |||
127 | ethernet@3000 { | 129 | ethernet@3000 { |
128 | device_type = "network"; | 130 | device_type = "network"; |
129 | compatible = "fsl,mpc5200-fec"; | 131 | compatible = "fsl,mpc5200-fec"; |
130 | reg = <3000 400>; | 132 | reg = <0x3000 0x400>; |
131 | local-mac-address = [ 00 00 00 00 00 00 ]; | 133 | local-mac-address = [ 00 00 00 00 00 00 ]; |
132 | interrupts = <2 5 0>; | 134 | interrupts = <2 5 0>; |
133 | interrupt-parent = <&mpc5200_pic>; | 135 | interrupt-parent = <&mpc5200_pic>; |
@@ -137,8 +139,8 @@ | |||
137 | mdio@3000 { | 139 | mdio@3000 { |
138 | #address-cells = <1>; | 140 | #address-cells = <1>; |
139 | #size-cells = <0>; | 141 | #size-cells = <0>; |
140 | compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio"; | 142 | compatible = "fsl,mpc5200-mdio"; |
141 | reg = <3000 400>; // fec range, since we need to setup fec interrupts | 143 | reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts |
142 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. | 144 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. |
143 | interrupt-parent = <&mpc5200_pic>; | 145 | interrupt-parent = <&mpc5200_pic>; |
144 | 146 | ||
@@ -150,7 +152,7 @@ | |||
150 | 152 | ||
151 | ata@3a00 { | 153 | ata@3a00 { |
152 | compatible = "fsl,mpc5200-ata"; | 154 | compatible = "fsl,mpc5200-ata"; |
153 | reg = <3a00 100>; | 155 | reg = <0x3a00 0x100>; |
154 | interrupts = <2 7 0>; | 156 | interrupts = <2 7 0>; |
155 | interrupt-parent = <&mpc5200_pic>; | 157 | interrupt-parent = <&mpc5200_pic>; |
156 | }; | 158 | }; |
@@ -159,21 +161,21 @@ | |||
159 | #address-cells = <1>; | 161 | #address-cells = <1>; |
160 | #size-cells = <0>; | 162 | #size-cells = <0>; |
161 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; | 163 | compatible = "fsl,mpc5200-i2c","fsl-i2c"; |
162 | reg = <3d40 40>; | 164 | reg = <0x3d40 0x40>; |
163 | interrupts = <2 10 0>; | 165 | interrupts = <2 16 0>; |
164 | interrupt-parent = <&mpc5200_pic>; | 166 | interrupt-parent = <&mpc5200_pic>; |
165 | fsl5200-clocking; | 167 | fsl5200-clocking; |
166 | 168 | ||
167 | rtc@68 { | 169 | rtc@68 { |
168 | device_type = "rtc"; | 170 | device_type = "rtc"; |
169 | compatible = "dallas,ds1307"; | 171 | compatible = "dallas,ds1307"; |
170 | reg = <68>; | 172 | reg = <0x68>; |
171 | }; | 173 | }; |
172 | }; | 174 | }; |
173 | 175 | ||
174 | sram@8000 { | 176 | sram@8000 { |
175 | compatible = "fsl,mpc5200-sram"; | 177 | compatible = "fsl,mpc5200-sram"; |
176 | reg = <8000 4000>; | 178 | reg = <0x8000 0x4000>; |
177 | }; | 179 | }; |
178 | }; | 180 | }; |
179 | 181 | ||
@@ -182,11 +184,11 @@ | |||
182 | compatible = "fsl,lpb"; | 184 | compatible = "fsl,lpb"; |
183 | #address-cells = <2>; | 185 | #address-cells = <2>; |
184 | #size-cells = <1>; | 186 | #size-cells = <1>; |
185 | ranges = <0 0 fc000000 02000000>; | 187 | ranges = <0 0 0xfc000000 0x02000000>; |
186 | 188 | ||
187 | flash@0,0 { | 189 | flash@0,0 { |
188 | compatible = "cfi-flash"; | 190 | compatible = "cfi-flash"; |
189 | reg = <0 0 02000000>; | 191 | reg = <0 0 0x02000000>; |
190 | bank-width = <4>; | 192 | bank-width = <4>; |
191 | device-width = <2>; | 193 | device-width = <2>; |
192 | #size-cells = <1>; | 194 | #size-cells = <1>; |
@@ -200,18 +202,18 @@ | |||
200 | #address-cells = <3>; | 202 | #address-cells = <3>; |
201 | device_type = "pci"; | 203 | device_type = "pci"; |
202 | compatible = "fsl,mpc5200-pci"; | 204 | compatible = "fsl,mpc5200-pci"; |
203 | reg = <f0000d00 100>; | 205 | reg = <0xf0000d00 0x100>; |
204 | interrupt-map-mask = <f800 0 0 7>; | 206 | interrupt-map-mask = <0xf800 0 0 7>; |
205 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 | 207 | interrupt-map = <0xc000 0 0 1 &mpc5200_pic 0 0 3 |
206 | c000 0 0 2 &mpc5200_pic 0 0 3 | 208 | 0xc000 0 0 2 &mpc5200_pic 0 0 3 |
207 | c000 0 0 3 &mpc5200_pic 0 0 3 | 209 | 0xc000 0 0 3 &mpc5200_pic 0 0 3 |
208 | c000 0 0 4 &mpc5200_pic 0 0 3>; | 210 | 0xc000 0 0 4 &mpc5200_pic 0 0 3>; |
209 | clock-frequency = <0>; // From boot loader | 211 | clock-frequency = <0>; // From boot loader |
210 | interrupts = <2 8 0 2 9 0 2 a 0>; | 212 | interrupts = <2 8 0 2 9 0 2 10 0>; |
211 | interrupt-parent = <&mpc5200_pic>; | 213 | interrupt-parent = <&mpc5200_pic>; |
212 | bus-range = <0 0>; | 214 | bus-range = <0 0>; |
213 | ranges = <42000000 0 80000000 80000000 0 10000000 | 215 | ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000 |
214 | 02000000 0 90000000 90000000 0 10000000 | 216 | 0x02000000 0 0x90000000 0x90000000 0 0x10000000 |
215 | 01000000 0 00000000 a0000000 0 01000000>; | 217 | 0x01000000 0 0x00000000 0xa0000000 0 0x01000000>; |
216 | }; | 218 | }; |
217 | }; | 219 | }; |
diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig new file mode 100644 index 000000000000..c10f7395aa1b --- /dev/null +++ b/arch/powerpc/configs/52xx/cm5200_defconfig | |||
@@ -0,0 +1,1099 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.25 | ||
4 | # Tue Apr 29 07:11:37 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | CONFIG_6xx=y | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | # CONFIG_ALTIVEC is not set | ||
19 | CONFIG_PPC_STD_MMU=y | ||
20 | CONFIG_PPC_STD_MMU_32=y | ||
21 | # CONFIG_PPC_MM_SLICES is not set | ||
22 | # CONFIG_SMP is not set | ||
23 | CONFIG_PPC32=y | ||
24 | CONFIG_WORD_SIZE=32 | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
28 | CONFIG_GENERIC_TIME=y | ||
29 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
30 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
31 | CONFIG_GENERIC_HARDIRQS=y | ||
32 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
33 | CONFIG_IRQ_PER_CPU=y | ||
34 | CONFIG_STACKTRACE_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
37 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
38 | CONFIG_GENERIC_HWEIGHT=y | ||
39 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
40 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
41 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
42 | CONFIG_PPC=y | ||
43 | CONFIG_EARLY_PRINTK=y | ||
44 | CONFIG_GENERIC_NVRAM=y | ||
45 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
46 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
47 | CONFIG_PPC_OF=y | ||
48 | CONFIG_OF=y | ||
49 | # CONFIG_PPC_UDBG_16550 is not set | ||
50 | # CONFIG_GENERIC_TBSYNC is not set | ||
51 | CONFIG_AUDIT_ARCH=y | ||
52 | CONFIG_GENERIC_BUG=y | ||
53 | CONFIG_DEFAULT_UIMAGE=y | ||
54 | # CONFIG_PPC_DCR_NATIVE is not set | ||
55 | # CONFIG_PPC_DCR_MMIO is not set | ||
56 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
57 | |||
58 | # | ||
59 | # General setup | ||
60 | # | ||
61 | CONFIG_EXPERIMENTAL=y | ||
62 | CONFIG_BROKEN_ON_SMP=y | ||
63 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
64 | CONFIG_LOCALVERSION="" | ||
65 | CONFIG_LOCALVERSION_AUTO=y | ||
66 | CONFIG_SWAP=y | ||
67 | CONFIG_SYSVIPC=y | ||
68 | CONFIG_SYSVIPC_SYSCTL=y | ||
69 | # CONFIG_POSIX_MQUEUE is not set | ||
70 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
71 | # CONFIG_TASKSTATS is not set | ||
72 | # CONFIG_AUDIT is not set | ||
73 | # CONFIG_IKCONFIG is not set | ||
74 | CONFIG_LOG_BUF_SHIFT=14 | ||
75 | # CONFIG_CGROUPS is not set | ||
76 | CONFIG_GROUP_SCHED=y | ||
77 | CONFIG_FAIR_GROUP_SCHED=y | ||
78 | # CONFIG_RT_GROUP_SCHED is not set | ||
79 | CONFIG_USER_SCHED=y | ||
80 | # CONFIG_CGROUP_SCHED is not set | ||
81 | CONFIG_SYSFS_DEPRECATED=y | ||
82 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
83 | # CONFIG_RELAY is not set | ||
84 | # CONFIG_NAMESPACES is not set | ||
85 | CONFIG_BLK_DEV_INITRD=y | ||
86 | CONFIG_INITRAMFS_SOURCE="" | ||
87 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
88 | CONFIG_SYSCTL=y | ||
89 | CONFIG_EMBEDDED=y | ||
90 | # CONFIG_SYSCTL_SYSCALL is not set | ||
91 | # CONFIG_KALLSYMS is not set | ||
92 | CONFIG_HOTPLUG=y | ||
93 | CONFIG_PRINTK=y | ||
94 | CONFIG_BUG=y | ||
95 | CONFIG_ELF_CORE=y | ||
96 | CONFIG_COMPAT_BRK=y | ||
97 | CONFIG_BASE_FULL=y | ||
98 | CONFIG_FUTEX=y | ||
99 | CONFIG_ANON_INODES=y | ||
100 | # CONFIG_EPOLL is not set | ||
101 | CONFIG_SIGNALFD=y | ||
102 | CONFIG_TIMERFD=y | ||
103 | CONFIG_EVENTFD=y | ||
104 | CONFIG_SHMEM=y | ||
105 | CONFIG_VM_EVENT_COUNTERS=y | ||
106 | CONFIG_SLUB_DEBUG=y | ||
107 | # CONFIG_SLAB is not set | ||
108 | CONFIG_SLUB=y | ||
109 | # CONFIG_SLOB is not set | ||
110 | # CONFIG_PROFILING is not set | ||
111 | # CONFIG_MARKERS is not set | ||
112 | CONFIG_HAVE_OPROFILE=y | ||
113 | CONFIG_HAVE_KPROBES=y | ||
114 | CONFIG_HAVE_KRETPROBES=y | ||
115 | CONFIG_PROC_PAGE_MONITOR=y | ||
116 | CONFIG_SLABINFO=y | ||
117 | CONFIG_RT_MUTEXES=y | ||
118 | # CONFIG_TINY_SHMEM is not set | ||
119 | CONFIG_BASE_SMALL=0 | ||
120 | # CONFIG_MODULES is not set | ||
121 | CONFIG_BLOCK=y | ||
122 | # CONFIG_LBD is not set | ||
123 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
124 | # CONFIG_LSF is not set | ||
125 | # CONFIG_BLK_DEV_BSG is not set | ||
126 | |||
127 | # | ||
128 | # IO Schedulers | ||
129 | # | ||
130 | CONFIG_IOSCHED_NOOP=y | ||
131 | CONFIG_IOSCHED_AS=y | ||
132 | CONFIG_IOSCHED_DEADLINE=y | ||
133 | CONFIG_IOSCHED_CFQ=y | ||
134 | CONFIG_DEFAULT_AS=y | ||
135 | # CONFIG_DEFAULT_DEADLINE is not set | ||
136 | # CONFIG_DEFAULT_CFQ is not set | ||
137 | # CONFIG_DEFAULT_NOOP is not set | ||
138 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
139 | CONFIG_CLASSIC_RCU=y | ||
140 | |||
141 | # | ||
142 | # Platform support | ||
143 | # | ||
144 | CONFIG_PPC_MULTIPLATFORM=y | ||
145 | # CONFIG_PPC_82xx is not set | ||
146 | # CONFIG_PPC_83xx is not set | ||
147 | # CONFIG_PPC_86xx is not set | ||
148 | CONFIG_CLASSIC32=y | ||
149 | # CONFIG_PPC_CHRP is not set | ||
150 | # CONFIG_PPC_MPC512x is not set | ||
151 | # CONFIG_PPC_MPC5121 is not set | ||
152 | # CONFIG_MPC5121_ADS is not set | ||
153 | CONFIG_PPC_MPC52xx=y | ||
154 | CONFIG_PPC_MPC5200_SIMPLE=y | ||
155 | # CONFIG_PPC_EFIKA is not set | ||
156 | # CONFIG_PPC_LITE5200 is not set | ||
157 | # CONFIG_PPC_MPC5200_BUGFIX is not set | ||
158 | # CONFIG_PPC_MPC5200_GPIO is not set | ||
159 | # CONFIG_PPC_PMAC is not set | ||
160 | # CONFIG_PPC_CELL is not set | ||
161 | # CONFIG_PPC_CELL_NATIVE is not set | ||
162 | # CONFIG_PQ2ADS is not set | ||
163 | # CONFIG_EMBEDDED6xx is not set | ||
164 | # CONFIG_IPIC is not set | ||
165 | # CONFIG_MPIC is not set | ||
166 | # CONFIG_MPIC_WEIRD is not set | ||
167 | # CONFIG_PPC_I8259 is not set | ||
168 | # CONFIG_PPC_RTAS is not set | ||
169 | # CONFIG_MMIO_NVRAM is not set | ||
170 | # CONFIG_PPC_MPC106 is not set | ||
171 | # CONFIG_PPC_970_NAP is not set | ||
172 | # CONFIG_PPC_INDIRECT_IO is not set | ||
173 | # CONFIG_GENERIC_IOMAP is not set | ||
174 | # CONFIG_CPU_FREQ is not set | ||
175 | # CONFIG_TAU is not set | ||
176 | # CONFIG_FSL_ULI1575 is not set | ||
177 | CONFIG_PPC_BESTCOMM=y | ||
178 | # CONFIG_PPC_BESTCOMM_ATA is not set | ||
179 | CONFIG_PPC_BESTCOMM_FEC=y | ||
180 | # CONFIG_PPC_BESTCOMM_GEN_BD is not set | ||
181 | |||
182 | # | ||
183 | # Kernel options | ||
184 | # | ||
185 | # CONFIG_HIGHMEM is not set | ||
186 | # CONFIG_TICK_ONESHOT is not set | ||
187 | # CONFIG_NO_HZ is not set | ||
188 | # CONFIG_HIGH_RES_TIMERS is not set | ||
189 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
190 | # CONFIG_HZ_100 is not set | ||
191 | CONFIG_HZ_250=y | ||
192 | # CONFIG_HZ_300 is not set | ||
193 | # CONFIG_HZ_1000 is not set | ||
194 | CONFIG_HZ=250 | ||
195 | # CONFIG_SCHED_HRTICK is not set | ||
196 | CONFIG_PREEMPT_NONE=y | ||
197 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
198 | # CONFIG_PREEMPT is not set | ||
199 | CONFIG_BINFMT_ELF=y | ||
200 | # CONFIG_BINFMT_MISC is not set | ||
201 | # CONFIG_IOMMU_HELPER is not set | ||
202 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
203 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
204 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
205 | # CONFIG_KEXEC is not set | ||
206 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
207 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
208 | CONFIG_SELECT_MEMORY_MODEL=y | ||
209 | CONFIG_FLATMEM_MANUAL=y | ||
210 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
211 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
212 | CONFIG_FLATMEM=y | ||
213 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
214 | # CONFIG_SPARSEMEM_STATIC is not set | ||
215 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
216 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
217 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
218 | # CONFIG_RESOURCES_64BIT is not set | ||
219 | CONFIG_ZONE_DMA_FLAG=1 | ||
220 | CONFIG_BOUNCE=y | ||
221 | CONFIG_VIRT_TO_BUS=y | ||
222 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
223 | CONFIG_PROC_DEVICETREE=y | ||
224 | # CONFIG_CMDLINE_BOOL is not set | ||
225 | CONFIG_PM=y | ||
226 | # CONFIG_PM_LEGACY is not set | ||
227 | # CONFIG_PM_DEBUG is not set | ||
228 | CONFIG_SECCOMP=y | ||
229 | CONFIG_ISA_DMA_API=y | ||
230 | |||
231 | # | ||
232 | # Bus options | ||
233 | # | ||
234 | CONFIG_ZONE_DMA=y | ||
235 | CONFIG_GENERIC_ISA_DMA=y | ||
236 | CONFIG_FSL_SOC=y | ||
237 | # CONFIG_PCI is not set | ||
238 | # CONFIG_PCI_DOMAINS is not set | ||
239 | # CONFIG_PCI_SYSCALL is not set | ||
240 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
241 | # CONFIG_PCCARD is not set | ||
242 | # CONFIG_HAS_RAPIDIO is not set | ||
243 | |||
244 | # | ||
245 | # Advanced setup | ||
246 | # | ||
247 | # CONFIG_ADVANCED_OPTIONS is not set | ||
248 | |||
249 | # | ||
250 | # Default settings for advanced configuration options are used | ||
251 | # | ||
252 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
253 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
254 | CONFIG_KERNEL_START=0xc0000000 | ||
255 | CONFIG_PHYSICAL_START=0x00000000 | ||
256 | CONFIG_TASK_SIZE=0xc0000000 | ||
257 | |||
258 | # | ||
259 | # Networking | ||
260 | # | ||
261 | CONFIG_NET=y | ||
262 | |||
263 | # | ||
264 | # Networking options | ||
265 | # | ||
266 | CONFIG_PACKET=y | ||
267 | # CONFIG_PACKET_MMAP is not set | ||
268 | CONFIG_UNIX=y | ||
269 | CONFIG_XFRM=y | ||
270 | CONFIG_XFRM_USER=y | ||
271 | # CONFIG_XFRM_SUB_POLICY is not set | ||
272 | # CONFIG_XFRM_MIGRATE is not set | ||
273 | # CONFIG_XFRM_STATISTICS is not set | ||
274 | # CONFIG_NET_KEY is not set | ||
275 | CONFIG_INET=y | ||
276 | CONFIG_IP_MULTICAST=y | ||
277 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
278 | CONFIG_IP_FIB_HASH=y | ||
279 | CONFIG_IP_PNP=y | ||
280 | CONFIG_IP_PNP_DHCP=y | ||
281 | CONFIG_IP_PNP_BOOTP=y | ||
282 | # CONFIG_IP_PNP_RARP is not set | ||
283 | # CONFIG_NET_IPIP is not set | ||
284 | # CONFIG_NET_IPGRE is not set | ||
285 | # CONFIG_IP_MROUTE is not set | ||
286 | # CONFIG_ARPD is not set | ||
287 | CONFIG_SYN_COOKIES=y | ||
288 | # CONFIG_INET_AH is not set | ||
289 | # CONFIG_INET_ESP is not set | ||
290 | # CONFIG_INET_IPCOMP is not set | ||
291 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
292 | # CONFIG_INET_TUNNEL is not set | ||
293 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
294 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
295 | CONFIG_INET_XFRM_MODE_BEET=y | ||
296 | # CONFIG_INET_LRO is not set | ||
297 | CONFIG_INET_DIAG=y | ||
298 | CONFIG_INET_TCP_DIAG=y | ||
299 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
300 | CONFIG_TCP_CONG_CUBIC=y | ||
301 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
302 | # CONFIG_TCP_MD5SIG is not set | ||
303 | # CONFIG_IPV6 is not set | ||
304 | # CONFIG_NETWORK_SECMARK is not set | ||
305 | # CONFIG_NETFILTER is not set | ||
306 | # CONFIG_IP_DCCP is not set | ||
307 | # CONFIG_IP_SCTP is not set | ||
308 | # CONFIG_TIPC is not set | ||
309 | # CONFIG_ATM is not set | ||
310 | # CONFIG_BRIDGE is not set | ||
311 | # CONFIG_VLAN_8021Q is not set | ||
312 | # CONFIG_DECNET is not set | ||
313 | # CONFIG_LLC2 is not set | ||
314 | # CONFIG_IPX is not set | ||
315 | # CONFIG_ATALK is not set | ||
316 | # CONFIG_X25 is not set | ||
317 | # CONFIG_LAPB is not set | ||
318 | # CONFIG_ECONET is not set | ||
319 | # CONFIG_WAN_ROUTER is not set | ||
320 | # CONFIG_NET_SCHED is not set | ||
321 | |||
322 | # | ||
323 | # Network testing | ||
324 | # | ||
325 | # CONFIG_NET_PKTGEN is not set | ||
326 | # CONFIG_HAMRADIO is not set | ||
327 | # CONFIG_CAN is not set | ||
328 | # CONFIG_IRDA is not set | ||
329 | # CONFIG_BT is not set | ||
330 | # CONFIG_AF_RXRPC is not set | ||
331 | |||
332 | # | ||
333 | # Wireless | ||
334 | # | ||
335 | # CONFIG_CFG80211 is not set | ||
336 | # CONFIG_WIRELESS_EXT is not set | ||
337 | # CONFIG_MAC80211 is not set | ||
338 | # CONFIG_IEEE80211 is not set | ||
339 | # CONFIG_RFKILL is not set | ||
340 | # CONFIG_NET_9P is not set | ||
341 | |||
342 | # | ||
343 | # Device Drivers | ||
344 | # | ||
345 | |||
346 | # | ||
347 | # Generic Driver Options | ||
348 | # | ||
349 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
350 | CONFIG_STANDALONE=y | ||
351 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
352 | # CONFIG_FW_LOADER is not set | ||
353 | # CONFIG_DEBUG_DRIVER is not set | ||
354 | # CONFIG_DEBUG_DEVRES is not set | ||
355 | # CONFIG_SYS_HYPERVISOR is not set | ||
356 | # CONFIG_CONNECTOR is not set | ||
357 | CONFIG_MTD=y | ||
358 | # CONFIG_MTD_DEBUG is not set | ||
359 | # CONFIG_MTD_CONCAT is not set | ||
360 | CONFIG_MTD_PARTITIONS=y | ||
361 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
362 | CONFIG_MTD_CMDLINE_PARTS=y | ||
363 | # CONFIG_MTD_OF_PARTS is not set | ||
364 | # CONFIG_MTD_AR7_PARTS is not set | ||
365 | |||
366 | # | ||
367 | # User Modules And Translation Layers | ||
368 | # | ||
369 | CONFIG_MTD_CHAR=y | ||
370 | CONFIG_MTD_BLKDEVS=y | ||
371 | CONFIG_MTD_BLOCK=y | ||
372 | # CONFIG_FTL is not set | ||
373 | # CONFIG_NFTL is not set | ||
374 | # CONFIG_INFTL is not set | ||
375 | # CONFIG_RFD_FTL is not set | ||
376 | # CONFIG_SSFDC is not set | ||
377 | # CONFIG_MTD_OOPS is not set | ||
378 | |||
379 | # | ||
380 | # RAM/ROM/Flash chip drivers | ||
381 | # | ||
382 | CONFIG_MTD_CFI=y | ||
383 | # CONFIG_MTD_JEDECPROBE is not set | ||
384 | CONFIG_MTD_GEN_PROBE=y | ||
385 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
386 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
387 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
388 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
389 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
390 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
391 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
392 | CONFIG_MTD_CFI_I1=y | ||
393 | CONFIG_MTD_CFI_I2=y | ||
394 | # CONFIG_MTD_CFI_I4 is not set | ||
395 | # CONFIG_MTD_CFI_I8 is not set | ||
396 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
397 | CONFIG_MTD_CFI_AMDSTD=y | ||
398 | # CONFIG_MTD_CFI_STAA is not set | ||
399 | CONFIG_MTD_CFI_UTIL=y | ||
400 | # CONFIG_MTD_RAM is not set | ||
401 | # CONFIG_MTD_ROM is not set | ||
402 | # CONFIG_MTD_ABSENT is not set | ||
403 | |||
404 | # | ||
405 | # Mapping drivers for chip access | ||
406 | # | ||
407 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
408 | # CONFIG_MTD_PHYSMAP is not set | ||
409 | CONFIG_MTD_PHYSMAP_OF=y | ||
410 | # CONFIG_MTD_PLATRAM is not set | ||
411 | |||
412 | # | ||
413 | # Self-contained MTD device drivers | ||
414 | # | ||
415 | # CONFIG_MTD_SLRAM is not set | ||
416 | # CONFIG_MTD_PHRAM is not set | ||
417 | # CONFIG_MTD_MTDRAM is not set | ||
418 | # CONFIG_MTD_BLOCK2MTD is not set | ||
419 | |||
420 | # | ||
421 | # Disk-On-Chip Device Drivers | ||
422 | # | ||
423 | # CONFIG_MTD_DOC2000 is not set | ||
424 | # CONFIG_MTD_DOC2001 is not set | ||
425 | # CONFIG_MTD_DOC2001PLUS is not set | ||
426 | # CONFIG_MTD_NAND is not set | ||
427 | # CONFIG_MTD_ONENAND is not set | ||
428 | |||
429 | # | ||
430 | # UBI - Unsorted block images | ||
431 | # | ||
432 | # CONFIG_MTD_UBI is not set | ||
433 | CONFIG_OF_DEVICE=y | ||
434 | CONFIG_OF_I2C=y | ||
435 | # CONFIG_PARPORT is not set | ||
436 | CONFIG_BLK_DEV=y | ||
437 | # CONFIG_BLK_DEV_FD is not set | ||
438 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
439 | CONFIG_BLK_DEV_LOOP=y | ||
440 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
441 | # CONFIG_BLK_DEV_NBD is not set | ||
442 | # CONFIG_BLK_DEV_UB is not set | ||
443 | CONFIG_BLK_DEV_RAM=y | ||
444 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
445 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
446 | # CONFIG_BLK_DEV_XIP is not set | ||
447 | # CONFIG_CDROM_PKTCDVD is not set | ||
448 | # CONFIG_ATA_OVER_ETH is not set | ||
449 | # CONFIG_MISC_DEVICES is not set | ||
450 | CONFIG_HAVE_IDE=y | ||
451 | # CONFIG_IDE is not set | ||
452 | |||
453 | # | ||
454 | # SCSI device support | ||
455 | # | ||
456 | # CONFIG_RAID_ATTRS is not set | ||
457 | CONFIG_SCSI=y | ||
458 | CONFIG_SCSI_DMA=y | ||
459 | # CONFIG_SCSI_TGT is not set | ||
460 | # CONFIG_SCSI_NETLINK is not set | ||
461 | CONFIG_SCSI_PROC_FS=y | ||
462 | |||
463 | # | ||
464 | # SCSI support type (disk, tape, CD-ROM) | ||
465 | # | ||
466 | CONFIG_BLK_DEV_SD=y | ||
467 | # CONFIG_CHR_DEV_ST is not set | ||
468 | # CONFIG_CHR_DEV_OSST is not set | ||
469 | # CONFIG_BLK_DEV_SR is not set | ||
470 | CONFIG_CHR_DEV_SG=y | ||
471 | # CONFIG_CHR_DEV_SCH is not set | ||
472 | |||
473 | # | ||
474 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
475 | # | ||
476 | # CONFIG_SCSI_MULTI_LUN is not set | ||
477 | # CONFIG_SCSI_CONSTANTS is not set | ||
478 | # CONFIG_SCSI_LOGGING is not set | ||
479 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
480 | |||
481 | # | ||
482 | # SCSI Transports | ||
483 | # | ||
484 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
485 | # CONFIG_SCSI_FC_ATTRS is not set | ||
486 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
487 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
488 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
489 | # CONFIG_SCSI_LOWLEVEL is not set | ||
490 | # CONFIG_ATA is not set | ||
491 | # CONFIG_MD is not set | ||
492 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
493 | CONFIG_NETDEVICES=y | ||
494 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
495 | # CONFIG_DUMMY is not set | ||
496 | # CONFIG_BONDING is not set | ||
497 | # CONFIG_MACVLAN is not set | ||
498 | # CONFIG_EQUALIZER is not set | ||
499 | # CONFIG_TUN is not set | ||
500 | # CONFIG_VETH is not set | ||
501 | CONFIG_PHYLIB=y | ||
502 | |||
503 | # | ||
504 | # MII PHY device drivers | ||
505 | # | ||
506 | # CONFIG_MARVELL_PHY is not set | ||
507 | # CONFIG_DAVICOM_PHY is not set | ||
508 | # CONFIG_QSEMI_PHY is not set | ||
509 | CONFIG_LXT_PHY=y | ||
510 | # CONFIG_CICADA_PHY is not set | ||
511 | # CONFIG_VITESSE_PHY is not set | ||
512 | # CONFIG_SMSC_PHY is not set | ||
513 | # CONFIG_BROADCOM_PHY is not set | ||
514 | # CONFIG_ICPLUS_PHY is not set | ||
515 | # CONFIG_REALTEK_PHY is not set | ||
516 | # CONFIG_FIXED_PHY is not set | ||
517 | # CONFIG_MDIO_BITBANG is not set | ||
518 | CONFIG_NET_ETHERNET=y | ||
519 | # CONFIG_MII is not set | ||
520 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
521 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
522 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
523 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
524 | # CONFIG_B44 is not set | ||
525 | CONFIG_FEC_MPC52xx=y | ||
526 | CONFIG_FEC_MPC52xx_MDIO=y | ||
527 | # CONFIG_NETDEV_1000 is not set | ||
528 | # CONFIG_NETDEV_10000 is not set | ||
529 | |||
530 | # | ||
531 | # Wireless LAN | ||
532 | # | ||
533 | # CONFIG_WLAN_PRE80211 is not set | ||
534 | # CONFIG_WLAN_80211 is not set | ||
535 | # CONFIG_IWLWIFI is not set | ||
536 | # CONFIG_IWLWIFI_LEDS is not set | ||
537 | |||
538 | # | ||
539 | # USB Network Adapters | ||
540 | # | ||
541 | # CONFIG_USB_CATC is not set | ||
542 | # CONFIG_USB_KAWETH is not set | ||
543 | # CONFIG_USB_PEGASUS is not set | ||
544 | # CONFIG_USB_RTL8150 is not set | ||
545 | # CONFIG_USB_USBNET is not set | ||
546 | # CONFIG_WAN is not set | ||
547 | # CONFIG_PPP is not set | ||
548 | # CONFIG_SLIP is not set | ||
549 | # CONFIG_NETCONSOLE is not set | ||
550 | # CONFIG_NETPOLL is not set | ||
551 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
552 | # CONFIG_ISDN is not set | ||
553 | # CONFIG_PHONE is not set | ||
554 | |||
555 | # | ||
556 | # Input device support | ||
557 | # | ||
558 | # CONFIG_INPUT is not set | ||
559 | |||
560 | # | ||
561 | # Hardware I/O ports | ||
562 | # | ||
563 | # CONFIG_SERIO is not set | ||
564 | # CONFIG_GAMEPORT is not set | ||
565 | |||
566 | # | ||
567 | # Character devices | ||
568 | # | ||
569 | # CONFIG_VT is not set | ||
570 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
571 | |||
572 | # | ||
573 | # Serial drivers | ||
574 | # | ||
575 | # CONFIG_SERIAL_8250 is not set | ||
576 | |||
577 | # | ||
578 | # Non-8250 serial port support | ||
579 | # | ||
580 | # CONFIG_SERIAL_UARTLITE is not set | ||
581 | CONFIG_SERIAL_CORE=y | ||
582 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
583 | CONFIG_SERIAL_MPC52xx=y | ||
584 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | ||
585 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=57600 | ||
586 | CONFIG_UNIX98_PTYS=y | ||
587 | CONFIG_LEGACY_PTYS=y | ||
588 | CONFIG_LEGACY_PTY_COUNT=256 | ||
589 | # CONFIG_IPMI_HANDLER is not set | ||
590 | # CONFIG_HW_RANDOM is not set | ||
591 | # CONFIG_NVRAM is not set | ||
592 | # CONFIG_GEN_RTC is not set | ||
593 | # CONFIG_R3964 is not set | ||
594 | # CONFIG_RAW_DRIVER is not set | ||
595 | # CONFIG_TCG_TPM is not set | ||
596 | CONFIG_I2C=y | ||
597 | CONFIG_I2C_BOARDINFO=y | ||
598 | CONFIG_I2C_CHARDEV=y | ||
599 | |||
600 | # | ||
601 | # I2C Hardware Bus support | ||
602 | # | ||
603 | CONFIG_I2C_MPC=y | ||
604 | # CONFIG_I2C_OCORES is not set | ||
605 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
606 | # CONFIG_I2C_SIMTEC is not set | ||
607 | # CONFIG_I2C_TAOS_EVM is not set | ||
608 | # CONFIG_I2C_TINY_USB is not set | ||
609 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
610 | |||
611 | # | ||
612 | # Miscellaneous I2C Chip support | ||
613 | # | ||
614 | # CONFIG_DS1682 is not set | ||
615 | # CONFIG_SENSORS_EEPROM is not set | ||
616 | # CONFIG_SENSORS_PCF8574 is not set | ||
617 | # CONFIG_PCF8575 is not set | ||
618 | # CONFIG_SENSORS_PCF8591 is not set | ||
619 | # CONFIG_SENSORS_MAX6875 is not set | ||
620 | # CONFIG_SENSORS_TSL2550 is not set | ||
621 | # CONFIG_I2C_DEBUG_CORE is not set | ||
622 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
623 | # CONFIG_I2C_DEBUG_BUS is not set | ||
624 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
625 | # CONFIG_SPI is not set | ||
626 | # CONFIG_W1 is not set | ||
627 | # CONFIG_POWER_SUPPLY is not set | ||
628 | # CONFIG_HWMON is not set | ||
629 | # CONFIG_THERMAL is not set | ||
630 | CONFIG_WATCHDOG=y | ||
631 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
632 | |||
633 | # | ||
634 | # Watchdog Device Drivers | ||
635 | # | ||
636 | # CONFIG_SOFT_WATCHDOG is not set | ||
637 | # CONFIG_MPC5200_WDT is not set | ||
638 | |||
639 | # | ||
640 | # USB-based Watchdog Cards | ||
641 | # | ||
642 | # CONFIG_USBPCWATCHDOG is not set | ||
643 | |||
644 | # | ||
645 | # Sonics Silicon Backplane | ||
646 | # | ||
647 | CONFIG_SSB_POSSIBLE=y | ||
648 | # CONFIG_SSB is not set | ||
649 | |||
650 | # | ||
651 | # Multifunction device drivers | ||
652 | # | ||
653 | # CONFIG_MFD_SM501 is not set | ||
654 | # CONFIG_HTC_PASIC3 is not set | ||
655 | |||
656 | # | ||
657 | # Multimedia devices | ||
658 | # | ||
659 | # CONFIG_VIDEO_DEV is not set | ||
660 | # CONFIG_DVB_CORE is not set | ||
661 | # CONFIG_DAB is not set | ||
662 | |||
663 | # | ||
664 | # Graphics support | ||
665 | # | ||
666 | # CONFIG_VGASTATE is not set | ||
667 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
668 | # CONFIG_FB is not set | ||
669 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
670 | |||
671 | # | ||
672 | # Display device support | ||
673 | # | ||
674 | # CONFIG_DISPLAY_SUPPORT is not set | ||
675 | |||
676 | # | ||
677 | # Sound | ||
678 | # | ||
679 | # CONFIG_SOUND is not set | ||
680 | CONFIG_USB_SUPPORT=y | ||
681 | CONFIG_USB_ARCH_HAS_HCD=y | ||
682 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
683 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
684 | CONFIG_USB=y | ||
685 | # CONFIG_USB_DEBUG is not set | ||
686 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
687 | |||
688 | # | ||
689 | # Miscellaneous USB options | ||
690 | # | ||
691 | CONFIG_USB_DEVICEFS=y | ||
692 | # CONFIG_USB_DEVICE_CLASS is not set | ||
693 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
694 | # CONFIG_USB_SUSPEND is not set | ||
695 | # CONFIG_USB_OTG is not set | ||
696 | # CONFIG_USB_OTG_WHITELIST is not set | ||
697 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
698 | |||
699 | # | ||
700 | # USB Host Controller Drivers | ||
701 | # | ||
702 | # CONFIG_USB_ISP116X_HCD is not set | ||
703 | CONFIG_USB_OHCI_HCD=y | ||
704 | CONFIG_USB_OHCI_HCD_PPC_SOC=y | ||
705 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
706 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | ||
707 | # CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set | ||
708 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | ||
709 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | ||
710 | # CONFIG_USB_OHCI_LITTLE_ENDIAN is not set | ||
711 | # CONFIG_USB_SL811_HCD is not set | ||
712 | # CONFIG_USB_R8A66597_HCD is not set | ||
713 | |||
714 | # | ||
715 | # USB Device Class drivers | ||
716 | # | ||
717 | # CONFIG_USB_ACM is not set | ||
718 | # CONFIG_USB_PRINTER is not set | ||
719 | |||
720 | # | ||
721 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
722 | # | ||
723 | |||
724 | # | ||
725 | # may also be needed; see USB_STORAGE Help for more information | ||
726 | # | ||
727 | CONFIG_USB_STORAGE=y | ||
728 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
729 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
730 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
731 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
732 | # CONFIG_USB_STORAGE_DPCM is not set | ||
733 | # CONFIG_USB_STORAGE_USBAT is not set | ||
734 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
735 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
736 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
737 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
738 | # CONFIG_USB_STORAGE_KARMA is not set | ||
739 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
740 | # CONFIG_USB_LIBUSUAL is not set | ||
741 | |||
742 | # | ||
743 | # USB Imaging devices | ||
744 | # | ||
745 | # CONFIG_USB_MDC800 is not set | ||
746 | # CONFIG_USB_MICROTEK is not set | ||
747 | # CONFIG_USB_MON is not set | ||
748 | |||
749 | # | ||
750 | # USB port drivers | ||
751 | # | ||
752 | # CONFIG_USB_SERIAL is not set | ||
753 | |||
754 | # | ||
755 | # USB Miscellaneous drivers | ||
756 | # | ||
757 | # CONFIG_USB_EMI62 is not set | ||
758 | # CONFIG_USB_EMI26 is not set | ||
759 | # CONFIG_USB_ADUTUX is not set | ||
760 | # CONFIG_USB_AUERSWALD is not set | ||
761 | # CONFIG_USB_RIO500 is not set | ||
762 | # CONFIG_USB_LEGOTOWER is not set | ||
763 | # CONFIG_USB_LCD is not set | ||
764 | # CONFIG_USB_BERRY_CHARGE is not set | ||
765 | # CONFIG_USB_LED is not set | ||
766 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
767 | # CONFIG_USB_CYTHERM is not set | ||
768 | # CONFIG_USB_PHIDGET is not set | ||
769 | # CONFIG_USB_IDMOUSE is not set | ||
770 | # CONFIG_USB_FTDI_ELAN is not set | ||
771 | # CONFIG_USB_APPLEDISPLAY is not set | ||
772 | # CONFIG_USB_LD is not set | ||
773 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
774 | # CONFIG_USB_IOWARRIOR is not set | ||
775 | # CONFIG_USB_TEST is not set | ||
776 | # CONFIG_USB_GADGET is not set | ||
777 | # CONFIG_MMC is not set | ||
778 | # CONFIG_MEMSTICK is not set | ||
779 | # CONFIG_NEW_LEDS is not set | ||
780 | # CONFIG_EDAC is not set | ||
781 | # CONFIG_RTC_CLASS is not set | ||
782 | # CONFIG_DMADEVICES is not set | ||
783 | # CONFIG_UIO is not set | ||
784 | |||
785 | # | ||
786 | # File systems | ||
787 | # | ||
788 | CONFIG_EXT2_FS=y | ||
789 | # CONFIG_EXT2_FS_XATTR is not set | ||
790 | # CONFIG_EXT2_FS_XIP is not set | ||
791 | CONFIG_EXT3_FS=y | ||
792 | CONFIG_EXT3_FS_XATTR=y | ||
793 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
794 | # CONFIG_EXT3_FS_SECURITY is not set | ||
795 | # CONFIG_EXT4DEV_FS is not set | ||
796 | CONFIG_JBD=y | ||
797 | CONFIG_FS_MBCACHE=y | ||
798 | # CONFIG_REISERFS_FS is not set | ||
799 | # CONFIG_JFS_FS is not set | ||
800 | # CONFIG_FS_POSIX_ACL is not set | ||
801 | # CONFIG_XFS_FS is not set | ||
802 | # CONFIG_OCFS2_FS is not set | ||
803 | CONFIG_DNOTIFY=y | ||
804 | CONFIG_INOTIFY=y | ||
805 | CONFIG_INOTIFY_USER=y | ||
806 | # CONFIG_QUOTA is not set | ||
807 | # CONFIG_AUTOFS_FS is not set | ||
808 | # CONFIG_AUTOFS4_FS is not set | ||
809 | # CONFIG_FUSE_FS is not set | ||
810 | |||
811 | # | ||
812 | # CD-ROM/DVD Filesystems | ||
813 | # | ||
814 | # CONFIG_ISO9660_FS is not set | ||
815 | # CONFIG_UDF_FS is not set | ||
816 | |||
817 | # | ||
818 | # DOS/FAT/NT Filesystems | ||
819 | # | ||
820 | CONFIG_FAT_FS=y | ||
821 | CONFIG_MSDOS_FS=y | ||
822 | CONFIG_VFAT_FS=y | ||
823 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
824 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
825 | # CONFIG_NTFS_FS is not set | ||
826 | |||
827 | # | ||
828 | # Pseudo filesystems | ||
829 | # | ||
830 | CONFIG_PROC_FS=y | ||
831 | CONFIG_PROC_KCORE=y | ||
832 | CONFIG_PROC_SYSCTL=y | ||
833 | CONFIG_SYSFS=y | ||
834 | CONFIG_TMPFS=y | ||
835 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
836 | # CONFIG_HUGETLB_PAGE is not set | ||
837 | # CONFIG_CONFIGFS_FS is not set | ||
838 | |||
839 | # | ||
840 | # Miscellaneous filesystems | ||
841 | # | ||
842 | # CONFIG_ADFS_FS is not set | ||
843 | # CONFIG_AFFS_FS is not set | ||
844 | # CONFIG_HFS_FS is not set | ||
845 | # CONFIG_HFSPLUS_FS is not set | ||
846 | # CONFIG_BEFS_FS is not set | ||
847 | # CONFIG_BFS_FS is not set | ||
848 | # CONFIG_EFS_FS is not set | ||
849 | CONFIG_JFFS2_FS=y | ||
850 | CONFIG_JFFS2_FS_DEBUG=0 | ||
851 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
852 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
853 | # CONFIG_JFFS2_SUMMARY is not set | ||
854 | # CONFIG_JFFS2_FS_XATTR is not set | ||
855 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
856 | CONFIG_JFFS2_ZLIB=y | ||
857 | # CONFIG_JFFS2_LZO is not set | ||
858 | CONFIG_JFFS2_RTIME=y | ||
859 | # CONFIG_JFFS2_RUBIN is not set | ||
860 | CONFIG_CRAMFS=y | ||
861 | # CONFIG_VXFS_FS is not set | ||
862 | # CONFIG_MINIX_FS is not set | ||
863 | # CONFIG_HPFS_FS is not set | ||
864 | # CONFIG_QNX4FS_FS is not set | ||
865 | # CONFIG_ROMFS_FS is not set | ||
866 | # CONFIG_SYSV_FS is not set | ||
867 | # CONFIG_UFS_FS is not set | ||
868 | CONFIG_NETWORK_FILESYSTEMS=y | ||
869 | CONFIG_NFS_FS=y | ||
870 | CONFIG_NFS_V3=y | ||
871 | # CONFIG_NFS_V3_ACL is not set | ||
872 | CONFIG_NFS_V4=y | ||
873 | # CONFIG_NFSD is not set | ||
874 | CONFIG_ROOT_NFS=y | ||
875 | CONFIG_LOCKD=y | ||
876 | CONFIG_LOCKD_V4=y | ||
877 | CONFIG_NFS_COMMON=y | ||
878 | CONFIG_SUNRPC=y | ||
879 | CONFIG_SUNRPC_GSS=y | ||
880 | # CONFIG_SUNRPC_BIND34 is not set | ||
881 | CONFIG_RPCSEC_GSS_KRB5=y | ||
882 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
883 | # CONFIG_SMB_FS is not set | ||
884 | # CONFIG_CIFS is not set | ||
885 | # CONFIG_NCP_FS is not set | ||
886 | # CONFIG_CODA_FS is not set | ||
887 | # CONFIG_AFS_FS is not set | ||
888 | |||
889 | # | ||
890 | # Partition Types | ||
891 | # | ||
892 | CONFIG_PARTITION_ADVANCED=y | ||
893 | # CONFIG_ACORN_PARTITION is not set | ||
894 | # CONFIG_OSF_PARTITION is not set | ||
895 | # CONFIG_AMIGA_PARTITION is not set | ||
896 | # CONFIG_ATARI_PARTITION is not set | ||
897 | # CONFIG_MAC_PARTITION is not set | ||
898 | CONFIG_MSDOS_PARTITION=y | ||
899 | # CONFIG_BSD_DISKLABEL is not set | ||
900 | # CONFIG_MINIX_SUBPARTITION is not set | ||
901 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
902 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
903 | # CONFIG_LDM_PARTITION is not set | ||
904 | # CONFIG_SGI_PARTITION is not set | ||
905 | # CONFIG_ULTRIX_PARTITION is not set | ||
906 | # CONFIG_SUN_PARTITION is not set | ||
907 | # CONFIG_KARMA_PARTITION is not set | ||
908 | # CONFIG_EFI_PARTITION is not set | ||
909 | # CONFIG_SYSV68_PARTITION is not set | ||
910 | CONFIG_NLS=y | ||
911 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
912 | CONFIG_NLS_CODEPAGE_437=y | ||
913 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
914 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
915 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
916 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
917 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
918 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
919 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
920 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
921 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
922 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
923 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
924 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
925 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
926 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
927 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
928 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
929 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
930 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
931 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
932 | # CONFIG_NLS_ISO8859_8 is not set | ||
933 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
934 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
935 | # CONFIG_NLS_ASCII is not set | ||
936 | CONFIG_NLS_ISO8859_1=y | ||
937 | # CONFIG_NLS_ISO8859_2 is not set | ||
938 | # CONFIG_NLS_ISO8859_3 is not set | ||
939 | # CONFIG_NLS_ISO8859_4 is not set | ||
940 | # CONFIG_NLS_ISO8859_5 is not set | ||
941 | # CONFIG_NLS_ISO8859_6 is not set | ||
942 | # CONFIG_NLS_ISO8859_7 is not set | ||
943 | # CONFIG_NLS_ISO8859_9 is not set | ||
944 | # CONFIG_NLS_ISO8859_13 is not set | ||
945 | # CONFIG_NLS_ISO8859_14 is not set | ||
946 | # CONFIG_NLS_ISO8859_15 is not set | ||
947 | # CONFIG_NLS_KOI8_R is not set | ||
948 | # CONFIG_NLS_KOI8_U is not set | ||
949 | # CONFIG_NLS_UTF8 is not set | ||
950 | # CONFIG_DLM is not set | ||
951 | |||
952 | # | ||
953 | # Library routines | ||
954 | # | ||
955 | CONFIG_BITREVERSE=y | ||
956 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
957 | # CONFIG_CRC_CCITT is not set | ||
958 | # CONFIG_CRC16 is not set | ||
959 | # CONFIG_CRC_ITU_T is not set | ||
960 | CONFIG_CRC32=y | ||
961 | # CONFIG_CRC7 is not set | ||
962 | # CONFIG_LIBCRC32C is not set | ||
963 | CONFIG_ZLIB_INFLATE=y | ||
964 | CONFIG_ZLIB_DEFLATE=y | ||
965 | CONFIG_PLIST=y | ||
966 | CONFIG_HAS_IOMEM=y | ||
967 | CONFIG_HAS_IOPORT=y | ||
968 | CONFIG_HAS_DMA=y | ||
969 | CONFIG_HAVE_LMB=y | ||
970 | |||
971 | # | ||
972 | # Kernel hacking | ||
973 | # | ||
974 | CONFIG_PRINTK_TIME=y | ||
975 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
976 | CONFIG_ENABLE_MUST_CHECK=y | ||
977 | CONFIG_FRAME_WARN=1024 | ||
978 | # CONFIG_MAGIC_SYSRQ is not set | ||
979 | # CONFIG_UNUSED_SYMBOLS is not set | ||
980 | # CONFIG_DEBUG_FS is not set | ||
981 | # CONFIG_HEADERS_CHECK is not set | ||
982 | CONFIG_DEBUG_KERNEL=y | ||
983 | # CONFIG_DEBUG_SHIRQ is not set | ||
984 | CONFIG_DETECT_SOFTLOCKUP=y | ||
985 | CONFIG_SCHED_DEBUG=y | ||
986 | # CONFIG_SCHEDSTATS is not set | ||
987 | # CONFIG_TIMER_STATS is not set | ||
988 | # CONFIG_SLUB_DEBUG_ON is not set | ||
989 | # CONFIG_SLUB_STATS is not set | ||
990 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
991 | # CONFIG_RT_MUTEX_TESTER is not set | ||
992 | # CONFIG_DEBUG_SPINLOCK is not set | ||
993 | # CONFIG_DEBUG_MUTEXES is not set | ||
994 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
995 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
996 | # CONFIG_DEBUG_KOBJECT is not set | ||
997 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
998 | # CONFIG_DEBUG_INFO is not set | ||
999 | # CONFIG_DEBUG_VM is not set | ||
1000 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1001 | # CONFIG_DEBUG_LIST is not set | ||
1002 | # CONFIG_DEBUG_SG is not set | ||
1003 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1004 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1005 | # CONFIG_FAULT_INJECTION is not set | ||
1006 | # CONFIG_SAMPLES is not set | ||
1007 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1008 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1009 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
1010 | # CONFIG_DEBUGGER is not set | ||
1011 | # CONFIG_IRQSTACKS is not set | ||
1012 | # CONFIG_BDI_SWITCH is not set | ||
1013 | # CONFIG_BOOTX_TEXT is not set | ||
1014 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1015 | |||
1016 | # | ||
1017 | # Security options | ||
1018 | # | ||
1019 | # CONFIG_KEYS is not set | ||
1020 | # CONFIG_SECURITY is not set | ||
1021 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1022 | CONFIG_CRYPTO=y | ||
1023 | |||
1024 | # | ||
1025 | # Crypto core or helper | ||
1026 | # | ||
1027 | CONFIG_CRYPTO_ALGAPI=y | ||
1028 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1029 | CONFIG_CRYPTO_MANAGER=y | ||
1030 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1031 | # CONFIG_CRYPTO_NULL is not set | ||
1032 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1033 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1034 | |||
1035 | # | ||
1036 | # Authenticated Encryption with Associated Data | ||
1037 | # | ||
1038 | # CONFIG_CRYPTO_CCM is not set | ||
1039 | # CONFIG_CRYPTO_GCM is not set | ||
1040 | # CONFIG_CRYPTO_SEQIV is not set | ||
1041 | |||
1042 | # | ||
1043 | # Block modes | ||
1044 | # | ||
1045 | CONFIG_CRYPTO_CBC=y | ||
1046 | # CONFIG_CRYPTO_CTR is not set | ||
1047 | # CONFIG_CRYPTO_CTS is not set | ||
1048 | CONFIG_CRYPTO_ECB=y | ||
1049 | # CONFIG_CRYPTO_LRW is not set | ||
1050 | CONFIG_CRYPTO_PCBC=y | ||
1051 | # CONFIG_CRYPTO_XTS is not set | ||
1052 | |||
1053 | # | ||
1054 | # Hash modes | ||
1055 | # | ||
1056 | # CONFIG_CRYPTO_HMAC is not set | ||
1057 | # CONFIG_CRYPTO_XCBC is not set | ||
1058 | |||
1059 | # | ||
1060 | # Digest | ||
1061 | # | ||
1062 | # CONFIG_CRYPTO_CRC32C is not set | ||
1063 | # CONFIG_CRYPTO_MD4 is not set | ||
1064 | CONFIG_CRYPTO_MD5=y | ||
1065 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1066 | # CONFIG_CRYPTO_SHA1 is not set | ||
1067 | # CONFIG_CRYPTO_SHA256 is not set | ||
1068 | # CONFIG_CRYPTO_SHA512 is not set | ||
1069 | # CONFIG_CRYPTO_TGR192 is not set | ||
1070 | # CONFIG_CRYPTO_WP512 is not set | ||
1071 | |||
1072 | # | ||
1073 | # Ciphers | ||
1074 | # | ||
1075 | # CONFIG_CRYPTO_AES is not set | ||
1076 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1077 | # CONFIG_CRYPTO_ARC4 is not set | ||
1078 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1079 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1080 | # CONFIG_CRYPTO_CAST5 is not set | ||
1081 | # CONFIG_CRYPTO_CAST6 is not set | ||
1082 | CONFIG_CRYPTO_DES=y | ||
1083 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1084 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1085 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1086 | # CONFIG_CRYPTO_SEED is not set | ||
1087 | # CONFIG_CRYPTO_SERPENT is not set | ||
1088 | # CONFIG_CRYPTO_TEA is not set | ||
1089 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1090 | |||
1091 | # | ||
1092 | # Compression | ||
1093 | # | ||
1094 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1095 | # CONFIG_CRYPTO_LZO is not set | ||
1096 | CONFIG_CRYPTO_HW=y | ||
1097 | CONFIG_PPC_CLOCK=y | ||
1098 | CONFIG_PPC_LIB_RHEAP=y | ||
1099 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig new file mode 100644 index 000000000000..1a8a250fa11b --- /dev/null +++ b/arch/powerpc/configs/52xx/lite5200b_defconfig | |||
@@ -0,0 +1,1049 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.25 | ||
4 | # Tue Apr 29 07:12:56 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | CONFIG_6xx=y | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | # CONFIG_ALTIVEC is not set | ||
19 | CONFIG_PPC_STD_MMU=y | ||
20 | CONFIG_PPC_STD_MMU_32=y | ||
21 | # CONFIG_PPC_MM_SLICES is not set | ||
22 | # CONFIG_SMP is not set | ||
23 | CONFIG_PPC32=y | ||
24 | CONFIG_WORD_SIZE=32 | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
28 | CONFIG_GENERIC_TIME=y | ||
29 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
30 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
31 | CONFIG_GENERIC_HARDIRQS=y | ||
32 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
33 | CONFIG_IRQ_PER_CPU=y | ||
34 | CONFIG_STACKTRACE_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
37 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
38 | CONFIG_GENERIC_HWEIGHT=y | ||
39 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
40 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
41 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
42 | CONFIG_PPC=y | ||
43 | CONFIG_EARLY_PRINTK=y | ||
44 | CONFIG_GENERIC_NVRAM=y | ||
45 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
46 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
47 | CONFIG_PPC_OF=y | ||
48 | CONFIG_OF=y | ||
49 | # CONFIG_PPC_UDBG_16550 is not set | ||
50 | # CONFIG_GENERIC_TBSYNC is not set | ||
51 | CONFIG_AUDIT_ARCH=y | ||
52 | CONFIG_GENERIC_BUG=y | ||
53 | CONFIG_DEFAULT_UIMAGE=y | ||
54 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
55 | # CONFIG_PPC_DCR_NATIVE is not set | ||
56 | # CONFIG_PPC_DCR_MMIO is not set | ||
57 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
58 | |||
59 | # | ||
60 | # General setup | ||
61 | # | ||
62 | CONFIG_EXPERIMENTAL=y | ||
63 | CONFIG_BROKEN_ON_SMP=y | ||
64 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
65 | CONFIG_LOCALVERSION="" | ||
66 | CONFIG_LOCALVERSION_AUTO=y | ||
67 | CONFIG_SWAP=y | ||
68 | CONFIG_SYSVIPC=y | ||
69 | CONFIG_SYSVIPC_SYSCTL=y | ||
70 | # CONFIG_POSIX_MQUEUE is not set | ||
71 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
72 | # CONFIG_TASKSTATS is not set | ||
73 | # CONFIG_AUDIT is not set | ||
74 | # CONFIG_IKCONFIG is not set | ||
75 | CONFIG_LOG_BUF_SHIFT=14 | ||
76 | # CONFIG_CGROUPS is not set | ||
77 | CONFIG_GROUP_SCHED=y | ||
78 | # CONFIG_FAIR_GROUP_SCHED is not set | ||
79 | # CONFIG_RT_GROUP_SCHED is not set | ||
80 | CONFIG_USER_SCHED=y | ||
81 | # CONFIG_CGROUP_SCHED is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | ||
83 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
84 | # CONFIG_RELAY is not set | ||
85 | # CONFIG_NAMESPACES is not set | ||
86 | CONFIG_BLK_DEV_INITRD=y | ||
87 | CONFIG_INITRAMFS_SOURCE="" | ||
88 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
89 | CONFIG_SYSCTL=y | ||
90 | CONFIG_EMBEDDED=y | ||
91 | # CONFIG_SYSCTL_SYSCALL is not set | ||
92 | # CONFIG_KALLSYMS is not set | ||
93 | CONFIG_HOTPLUG=y | ||
94 | CONFIG_PRINTK=y | ||
95 | CONFIG_BUG=y | ||
96 | CONFIG_ELF_CORE=y | ||
97 | CONFIG_COMPAT_BRK=y | ||
98 | CONFIG_BASE_FULL=y | ||
99 | CONFIG_FUTEX=y | ||
100 | CONFIG_ANON_INODES=y | ||
101 | # CONFIG_EPOLL is not set | ||
102 | CONFIG_SIGNALFD=y | ||
103 | CONFIG_TIMERFD=y | ||
104 | CONFIG_EVENTFD=y | ||
105 | CONFIG_SHMEM=y | ||
106 | CONFIG_VM_EVENT_COUNTERS=y | ||
107 | CONFIG_SLUB_DEBUG=y | ||
108 | # CONFIG_SLAB is not set | ||
109 | CONFIG_SLUB=y | ||
110 | # CONFIG_SLOB is not set | ||
111 | # CONFIG_PROFILING is not set | ||
112 | # CONFIG_MARKERS is not set | ||
113 | CONFIG_HAVE_OPROFILE=y | ||
114 | CONFIG_HAVE_KPROBES=y | ||
115 | CONFIG_HAVE_KRETPROBES=y | ||
116 | CONFIG_PROC_PAGE_MONITOR=y | ||
117 | CONFIG_SLABINFO=y | ||
118 | CONFIG_RT_MUTEXES=y | ||
119 | # CONFIG_TINY_SHMEM is not set | ||
120 | CONFIG_BASE_SMALL=0 | ||
121 | CONFIG_MODULES=y | ||
122 | CONFIG_MODULE_UNLOAD=y | ||
123 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
124 | # CONFIG_MODVERSIONS is not set | ||
125 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
126 | # CONFIG_KMOD is not set | ||
127 | CONFIG_BLOCK=y | ||
128 | # CONFIG_LBD is not set | ||
129 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
130 | # CONFIG_LSF is not set | ||
131 | # CONFIG_BLK_DEV_BSG is not set | ||
132 | |||
133 | # | ||
134 | # IO Schedulers | ||
135 | # | ||
136 | CONFIG_IOSCHED_NOOP=y | ||
137 | CONFIG_IOSCHED_AS=y | ||
138 | CONFIG_IOSCHED_DEADLINE=y | ||
139 | CONFIG_IOSCHED_CFQ=y | ||
140 | CONFIG_DEFAULT_AS=y | ||
141 | # CONFIG_DEFAULT_DEADLINE is not set | ||
142 | # CONFIG_DEFAULT_CFQ is not set | ||
143 | # CONFIG_DEFAULT_NOOP is not set | ||
144 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
145 | CONFIG_CLASSIC_RCU=y | ||
146 | |||
147 | # | ||
148 | # Platform support | ||
149 | # | ||
150 | CONFIG_PPC_MULTIPLATFORM=y | ||
151 | # CONFIG_PPC_82xx is not set | ||
152 | # CONFIG_PPC_83xx is not set | ||
153 | # CONFIG_PPC_86xx is not set | ||
154 | CONFIG_CLASSIC32=y | ||
155 | # CONFIG_PPC_CHRP is not set | ||
156 | # CONFIG_PPC_MPC512x is not set | ||
157 | # CONFIG_PPC_MPC5121 is not set | ||
158 | # CONFIG_MPC5121_ADS is not set | ||
159 | CONFIG_PPC_MPC52xx=y | ||
160 | CONFIG_PPC_MPC5200_SIMPLE=y | ||
161 | # CONFIG_PPC_EFIKA is not set | ||
162 | CONFIG_PPC_LITE5200=y | ||
163 | # CONFIG_PPC_MPC5200_BUGFIX is not set | ||
164 | # CONFIG_PPC_MPC5200_GPIO is not set | ||
165 | # CONFIG_PPC_PMAC is not set | ||
166 | # CONFIG_PPC_CELL is not set | ||
167 | # CONFIG_PPC_CELL_NATIVE is not set | ||
168 | # CONFIG_PQ2ADS is not set | ||
169 | # CONFIG_EMBEDDED6xx is not set | ||
170 | # CONFIG_IPIC is not set | ||
171 | # CONFIG_MPIC is not set | ||
172 | # CONFIG_MPIC_WEIRD is not set | ||
173 | # CONFIG_PPC_I8259 is not set | ||
174 | # CONFIG_PPC_RTAS is not set | ||
175 | # CONFIG_MMIO_NVRAM is not set | ||
176 | # CONFIG_PPC_MPC106 is not set | ||
177 | # CONFIG_PPC_970_NAP is not set | ||
178 | # CONFIG_PPC_INDIRECT_IO is not set | ||
179 | # CONFIG_GENERIC_IOMAP is not set | ||
180 | # CONFIG_CPU_FREQ is not set | ||
181 | # CONFIG_TAU is not set | ||
182 | # CONFIG_FSL_ULI1575 is not set | ||
183 | CONFIG_PPC_BESTCOMM=y | ||
184 | CONFIG_PPC_BESTCOMM_ATA=y | ||
185 | CONFIG_PPC_BESTCOMM_FEC=y | ||
186 | CONFIG_PPC_BESTCOMM_GEN_BD=y | ||
187 | |||
188 | # | ||
189 | # Kernel options | ||
190 | # | ||
191 | # CONFIG_HIGHMEM is not set | ||
192 | CONFIG_TICK_ONESHOT=y | ||
193 | CONFIG_NO_HZ=y | ||
194 | CONFIG_HIGH_RES_TIMERS=y | ||
195 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
196 | # CONFIG_HZ_100 is not set | ||
197 | CONFIG_HZ_250=y | ||
198 | # CONFIG_HZ_300 is not set | ||
199 | # CONFIG_HZ_1000 is not set | ||
200 | CONFIG_HZ=250 | ||
201 | # CONFIG_SCHED_HRTICK is not set | ||
202 | CONFIG_PREEMPT_NONE=y | ||
203 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
204 | # CONFIG_PREEMPT is not set | ||
205 | CONFIG_BINFMT_ELF=y | ||
206 | # CONFIG_BINFMT_MISC is not set | ||
207 | # CONFIG_IOMMU_HELPER is not set | ||
208 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
209 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
210 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
211 | # CONFIG_KEXEC is not set | ||
212 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
213 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
214 | CONFIG_SELECT_MEMORY_MODEL=y | ||
215 | CONFIG_FLATMEM_MANUAL=y | ||
216 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
217 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
218 | CONFIG_FLATMEM=y | ||
219 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
220 | # CONFIG_SPARSEMEM_STATIC is not set | ||
221 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
222 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
223 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
224 | # CONFIG_RESOURCES_64BIT is not set | ||
225 | CONFIG_ZONE_DMA_FLAG=1 | ||
226 | CONFIG_BOUNCE=y | ||
227 | CONFIG_VIRT_TO_BUS=y | ||
228 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
229 | CONFIG_PROC_DEVICETREE=y | ||
230 | # CONFIG_CMDLINE_BOOL is not set | ||
231 | CONFIG_PM=y | ||
232 | # CONFIG_PM_LEGACY is not set | ||
233 | # CONFIG_PM_DEBUG is not set | ||
234 | CONFIG_PM_SLEEP=y | ||
235 | CONFIG_SUSPEND=y | ||
236 | CONFIG_SUSPEND_FREEZER=y | ||
237 | CONFIG_SECCOMP=y | ||
238 | CONFIG_ISA_DMA_API=y | ||
239 | |||
240 | # | ||
241 | # Bus options | ||
242 | # | ||
243 | CONFIG_ZONE_DMA=y | ||
244 | CONFIG_GENERIC_ISA_DMA=y | ||
245 | # CONFIG_PPC_INDIRECT_PCI is not set | ||
246 | CONFIG_FSL_SOC=y | ||
247 | CONFIG_PCI=y | ||
248 | CONFIG_PCI_DOMAINS=y | ||
249 | CONFIG_PCI_SYSCALL=y | ||
250 | # CONFIG_PCIEPORTBUS is not set | ||
251 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
252 | # CONFIG_PCI_MSI is not set | ||
253 | CONFIG_PCI_LEGACY=y | ||
254 | # CONFIG_PCI_DEBUG is not set | ||
255 | # CONFIG_PCCARD is not set | ||
256 | # CONFIG_HOTPLUG_PCI is not set | ||
257 | # CONFIG_HAS_RAPIDIO is not set | ||
258 | |||
259 | # | ||
260 | # Advanced setup | ||
261 | # | ||
262 | # CONFIG_ADVANCED_OPTIONS is not set | ||
263 | |||
264 | # | ||
265 | # Default settings for advanced configuration options are used | ||
266 | # | ||
267 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
268 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
269 | CONFIG_KERNEL_START=0xc0000000 | ||
270 | CONFIG_PHYSICAL_START=0x00000000 | ||
271 | CONFIG_TASK_SIZE=0xc0000000 | ||
272 | |||
273 | # | ||
274 | # Networking | ||
275 | # | ||
276 | CONFIG_NET=y | ||
277 | |||
278 | # | ||
279 | # Networking options | ||
280 | # | ||
281 | CONFIG_PACKET=y | ||
282 | # CONFIG_PACKET_MMAP is not set | ||
283 | CONFIG_UNIX=y | ||
284 | CONFIG_XFRM=y | ||
285 | CONFIG_XFRM_USER=m | ||
286 | # CONFIG_XFRM_SUB_POLICY is not set | ||
287 | # CONFIG_XFRM_MIGRATE is not set | ||
288 | # CONFIG_XFRM_STATISTICS is not set | ||
289 | # CONFIG_NET_KEY is not set | ||
290 | CONFIG_INET=y | ||
291 | CONFIG_IP_MULTICAST=y | ||
292 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
293 | CONFIG_IP_FIB_HASH=y | ||
294 | CONFIG_IP_PNP=y | ||
295 | CONFIG_IP_PNP_DHCP=y | ||
296 | CONFIG_IP_PNP_BOOTP=y | ||
297 | # CONFIG_IP_PNP_RARP is not set | ||
298 | # CONFIG_NET_IPIP is not set | ||
299 | # CONFIG_NET_IPGRE is not set | ||
300 | # CONFIG_IP_MROUTE is not set | ||
301 | # CONFIG_ARPD is not set | ||
302 | CONFIG_SYN_COOKIES=y | ||
303 | # CONFIG_INET_AH is not set | ||
304 | # CONFIG_INET_ESP is not set | ||
305 | # CONFIG_INET_IPCOMP is not set | ||
306 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
307 | # CONFIG_INET_TUNNEL is not set | ||
308 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
309 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
310 | CONFIG_INET_XFRM_MODE_BEET=y | ||
311 | # CONFIG_INET_LRO is not set | ||
312 | CONFIG_INET_DIAG=y | ||
313 | CONFIG_INET_TCP_DIAG=y | ||
314 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
315 | CONFIG_TCP_CONG_CUBIC=y | ||
316 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
317 | # CONFIG_TCP_MD5SIG is not set | ||
318 | # CONFIG_IPV6 is not set | ||
319 | # CONFIG_NETWORK_SECMARK is not set | ||
320 | # CONFIG_NETFILTER is not set | ||
321 | # CONFIG_IP_DCCP is not set | ||
322 | # CONFIG_IP_SCTP is not set | ||
323 | # CONFIG_TIPC is not set | ||
324 | # CONFIG_ATM is not set | ||
325 | # CONFIG_BRIDGE is not set | ||
326 | # CONFIG_VLAN_8021Q is not set | ||
327 | # CONFIG_DECNET is not set | ||
328 | # CONFIG_LLC2 is not set | ||
329 | # CONFIG_IPX is not set | ||
330 | # CONFIG_ATALK is not set | ||
331 | # CONFIG_X25 is not set | ||
332 | # CONFIG_LAPB is not set | ||
333 | # CONFIG_ECONET is not set | ||
334 | # CONFIG_WAN_ROUTER is not set | ||
335 | # CONFIG_NET_SCHED is not set | ||
336 | |||
337 | # | ||
338 | # Network testing | ||
339 | # | ||
340 | # CONFIG_NET_PKTGEN is not set | ||
341 | # CONFIG_HAMRADIO is not set | ||
342 | # CONFIG_CAN is not set | ||
343 | # CONFIG_IRDA is not set | ||
344 | # CONFIG_BT is not set | ||
345 | # CONFIG_AF_RXRPC is not set | ||
346 | |||
347 | # | ||
348 | # Wireless | ||
349 | # | ||
350 | # CONFIG_CFG80211 is not set | ||
351 | # CONFIG_WIRELESS_EXT is not set | ||
352 | # CONFIG_MAC80211 is not set | ||
353 | # CONFIG_IEEE80211 is not set | ||
354 | # CONFIG_RFKILL is not set | ||
355 | # CONFIG_NET_9P is not set | ||
356 | |||
357 | # | ||
358 | # Device Drivers | ||
359 | # | ||
360 | |||
361 | # | ||
362 | # Generic Driver Options | ||
363 | # | ||
364 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
365 | CONFIG_STANDALONE=y | ||
366 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
367 | # CONFIG_FW_LOADER is not set | ||
368 | # CONFIG_DEBUG_DRIVER is not set | ||
369 | # CONFIG_DEBUG_DEVRES is not set | ||
370 | # CONFIG_SYS_HYPERVISOR is not set | ||
371 | # CONFIG_CONNECTOR is not set | ||
372 | # CONFIG_MTD is not set | ||
373 | CONFIG_OF_DEVICE=y | ||
374 | CONFIG_OF_I2C=y | ||
375 | # CONFIG_PARPORT is not set | ||
376 | CONFIG_BLK_DEV=y | ||
377 | # CONFIG_BLK_DEV_FD is not set | ||
378 | # CONFIG_BLK_CPQ_DA is not set | ||
379 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
380 | # CONFIG_BLK_DEV_DAC960 is not set | ||
381 | # CONFIG_BLK_DEV_UMEM is not set | ||
382 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
383 | CONFIG_BLK_DEV_LOOP=y | ||
384 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
385 | # CONFIG_BLK_DEV_NBD is not set | ||
386 | # CONFIG_BLK_DEV_SX8 is not set | ||
387 | CONFIG_BLK_DEV_RAM=y | ||
388 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
389 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
390 | # CONFIG_BLK_DEV_XIP is not set | ||
391 | # CONFIG_CDROM_PKTCDVD is not set | ||
392 | # CONFIG_ATA_OVER_ETH is not set | ||
393 | CONFIG_MISC_DEVICES=y | ||
394 | # CONFIG_PHANTOM is not set | ||
395 | # CONFIG_EEPROM_93CX6 is not set | ||
396 | # CONFIG_SGI_IOC4 is not set | ||
397 | # CONFIG_TIFM_CORE is not set | ||
398 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
399 | CONFIG_HAVE_IDE=y | ||
400 | # CONFIG_IDE is not set | ||
401 | |||
402 | # | ||
403 | # SCSI device support | ||
404 | # | ||
405 | # CONFIG_RAID_ATTRS is not set | ||
406 | CONFIG_SCSI=y | ||
407 | CONFIG_SCSI_DMA=y | ||
408 | # CONFIG_SCSI_TGT is not set | ||
409 | # CONFIG_SCSI_NETLINK is not set | ||
410 | # CONFIG_SCSI_PROC_FS is not set | ||
411 | |||
412 | # | ||
413 | # SCSI support type (disk, tape, CD-ROM) | ||
414 | # | ||
415 | # CONFIG_BLK_DEV_SD is not set | ||
416 | # CONFIG_CHR_DEV_ST is not set | ||
417 | # CONFIG_CHR_DEV_OSST is not set | ||
418 | # CONFIG_BLK_DEV_SR is not set | ||
419 | # CONFIG_CHR_DEV_SG is not set | ||
420 | # CONFIG_CHR_DEV_SCH is not set | ||
421 | |||
422 | # | ||
423 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
424 | # | ||
425 | # CONFIG_SCSI_MULTI_LUN is not set | ||
426 | # CONFIG_SCSI_CONSTANTS is not set | ||
427 | # CONFIG_SCSI_LOGGING is not set | ||
428 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
429 | CONFIG_SCSI_WAIT_SCAN=m | ||
430 | |||
431 | # | ||
432 | # SCSI Transports | ||
433 | # | ||
434 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
435 | # CONFIG_SCSI_FC_ATTRS is not set | ||
436 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
437 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
438 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
439 | CONFIG_SCSI_LOWLEVEL=y | ||
440 | # CONFIG_ISCSI_TCP is not set | ||
441 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
442 | # CONFIG_SCSI_3W_9XXX is not set | ||
443 | # CONFIG_SCSI_ACARD is not set | ||
444 | # CONFIG_SCSI_AACRAID is not set | ||
445 | # CONFIG_SCSI_AIC7XXX is not set | ||
446 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
447 | # CONFIG_SCSI_AIC79XX is not set | ||
448 | # CONFIG_SCSI_AIC94XX is not set | ||
449 | # CONFIG_SCSI_DPT_I2O is not set | ||
450 | # CONFIG_SCSI_ADVANSYS is not set | ||
451 | # CONFIG_SCSI_ARCMSR is not set | ||
452 | # CONFIG_MEGARAID_NEWGEN is not set | ||
453 | # CONFIG_MEGARAID_LEGACY is not set | ||
454 | # CONFIG_MEGARAID_SAS is not set | ||
455 | # CONFIG_SCSI_HPTIOP is not set | ||
456 | # CONFIG_SCSI_BUSLOGIC is not set | ||
457 | # CONFIG_SCSI_DMX3191D is not set | ||
458 | # CONFIG_SCSI_EATA is not set | ||
459 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
460 | # CONFIG_SCSI_GDTH is not set | ||
461 | # CONFIG_SCSI_IPS is not set | ||
462 | # CONFIG_SCSI_INITIO is not set | ||
463 | # CONFIG_SCSI_INIA100 is not set | ||
464 | # CONFIG_SCSI_MVSAS is not set | ||
465 | # CONFIG_SCSI_STEX is not set | ||
466 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
467 | # CONFIG_SCSI_IPR is not set | ||
468 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
469 | # CONFIG_SCSI_QLA_FC is not set | ||
470 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
471 | # CONFIG_SCSI_LPFC is not set | ||
472 | # CONFIG_SCSI_DC395x is not set | ||
473 | # CONFIG_SCSI_DC390T is not set | ||
474 | # CONFIG_SCSI_NSP32 is not set | ||
475 | # CONFIG_SCSI_DEBUG is not set | ||
476 | # CONFIG_SCSI_SRP is not set | ||
477 | CONFIG_ATA=y | ||
478 | # CONFIG_ATA_NONSTANDARD is not set | ||
479 | CONFIG_SATA_PMP=y | ||
480 | # CONFIG_SATA_AHCI is not set | ||
481 | # CONFIG_SATA_SIL24 is not set | ||
482 | # CONFIG_SATA_FSL is not set | ||
483 | CONFIG_ATA_SFF=y | ||
484 | # CONFIG_SATA_SVW is not set | ||
485 | # CONFIG_ATA_PIIX is not set | ||
486 | # CONFIG_SATA_MV is not set | ||
487 | # CONFIG_SATA_NV is not set | ||
488 | # CONFIG_PDC_ADMA is not set | ||
489 | # CONFIG_SATA_QSTOR is not set | ||
490 | # CONFIG_SATA_PROMISE is not set | ||
491 | # CONFIG_SATA_SX4 is not set | ||
492 | # CONFIG_SATA_SIL is not set | ||
493 | # CONFIG_SATA_SIS is not set | ||
494 | # CONFIG_SATA_ULI is not set | ||
495 | # CONFIG_SATA_VIA is not set | ||
496 | # CONFIG_SATA_VITESSE is not set | ||
497 | # CONFIG_SATA_INIC162X is not set | ||
498 | # CONFIG_PATA_ALI is not set | ||
499 | # CONFIG_PATA_AMD is not set | ||
500 | # CONFIG_PATA_ARTOP is not set | ||
501 | # CONFIG_PATA_ATIIXP is not set | ||
502 | # CONFIG_PATA_CMD640_PCI is not set | ||
503 | # CONFIG_PATA_CMD64X is not set | ||
504 | # CONFIG_PATA_CS5520 is not set | ||
505 | # CONFIG_PATA_CS5530 is not set | ||
506 | # CONFIG_PATA_CYPRESS is not set | ||
507 | # CONFIG_PATA_EFAR is not set | ||
508 | # CONFIG_ATA_GENERIC is not set | ||
509 | # CONFIG_PATA_HPT366 is not set | ||
510 | # CONFIG_PATA_HPT37X is not set | ||
511 | # CONFIG_PATA_HPT3X2N is not set | ||
512 | # CONFIG_PATA_HPT3X3 is not set | ||
513 | # CONFIG_PATA_IT821X is not set | ||
514 | # CONFIG_PATA_IT8213 is not set | ||
515 | # CONFIG_PATA_JMICRON is not set | ||
516 | # CONFIG_PATA_TRIFLEX is not set | ||
517 | # CONFIG_PATA_MARVELL is not set | ||
518 | CONFIG_PATA_MPC52xx=y | ||
519 | # CONFIG_PATA_MPIIX is not set | ||
520 | # CONFIG_PATA_OLDPIIX is not set | ||
521 | # CONFIG_PATA_NETCELL is not set | ||
522 | # CONFIG_PATA_NINJA32 is not set | ||
523 | # CONFIG_PATA_NS87410 is not set | ||
524 | # CONFIG_PATA_NS87415 is not set | ||
525 | # CONFIG_PATA_OPTI is not set | ||
526 | # CONFIG_PATA_OPTIDMA is not set | ||
527 | # CONFIG_PATA_PDC_OLD is not set | ||
528 | # CONFIG_PATA_RADISYS is not set | ||
529 | # CONFIG_PATA_RZ1000 is not set | ||
530 | # CONFIG_PATA_SC1200 is not set | ||
531 | # CONFIG_PATA_SERVERWORKS is not set | ||
532 | # CONFIG_PATA_PDC2027X is not set | ||
533 | # CONFIG_PATA_SIL680 is not set | ||
534 | # CONFIG_PATA_SIS is not set | ||
535 | # CONFIG_PATA_VIA is not set | ||
536 | # CONFIG_PATA_WINBOND is not set | ||
537 | # CONFIG_PATA_PLATFORM is not set | ||
538 | # CONFIG_MD is not set | ||
539 | # CONFIG_FUSION is not set | ||
540 | |||
541 | # | ||
542 | # IEEE 1394 (FireWire) support | ||
543 | # | ||
544 | # CONFIG_FIREWIRE is not set | ||
545 | # CONFIG_IEEE1394 is not set | ||
546 | # CONFIG_I2O is not set | ||
547 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
548 | CONFIG_NETDEVICES=y | ||
549 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
550 | # CONFIG_DUMMY is not set | ||
551 | # CONFIG_BONDING is not set | ||
552 | # CONFIG_MACVLAN is not set | ||
553 | # CONFIG_EQUALIZER is not set | ||
554 | # CONFIG_TUN is not set | ||
555 | # CONFIG_VETH is not set | ||
556 | # CONFIG_ARCNET is not set | ||
557 | CONFIG_PHYLIB=y | ||
558 | |||
559 | # | ||
560 | # MII PHY device drivers | ||
561 | # | ||
562 | # CONFIG_MARVELL_PHY is not set | ||
563 | # CONFIG_DAVICOM_PHY is not set | ||
564 | # CONFIG_QSEMI_PHY is not set | ||
565 | CONFIG_LXT_PHY=y | ||
566 | # CONFIG_CICADA_PHY is not set | ||
567 | # CONFIG_VITESSE_PHY is not set | ||
568 | # CONFIG_SMSC_PHY is not set | ||
569 | # CONFIG_BROADCOM_PHY is not set | ||
570 | # CONFIG_ICPLUS_PHY is not set | ||
571 | # CONFIG_REALTEK_PHY is not set | ||
572 | # CONFIG_FIXED_PHY is not set | ||
573 | # CONFIG_MDIO_BITBANG is not set | ||
574 | CONFIG_NET_ETHERNET=y | ||
575 | # CONFIG_MII is not set | ||
576 | # CONFIG_HAPPYMEAL is not set | ||
577 | # CONFIG_SUNGEM is not set | ||
578 | # CONFIG_CASSINI is not set | ||
579 | # CONFIG_NET_VENDOR_3COM is not set | ||
580 | # CONFIG_NET_TULIP is not set | ||
581 | # CONFIG_HP100 is not set | ||
582 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
583 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
584 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
585 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
586 | # CONFIG_NET_PCI is not set | ||
587 | # CONFIG_B44 is not set | ||
588 | CONFIG_FEC_MPC52xx=y | ||
589 | CONFIG_FEC_MPC52xx_MDIO=y | ||
590 | CONFIG_NETDEV_1000=y | ||
591 | # CONFIG_ACENIC is not set | ||
592 | # CONFIG_DL2K is not set | ||
593 | # CONFIG_E1000 is not set | ||
594 | # CONFIG_E1000E is not set | ||
595 | # CONFIG_E1000E_ENABLED is not set | ||
596 | # CONFIG_IP1000 is not set | ||
597 | # CONFIG_IGB is not set | ||
598 | # CONFIG_NS83820 is not set | ||
599 | # CONFIG_HAMACHI is not set | ||
600 | # CONFIG_YELLOWFIN is not set | ||
601 | # CONFIG_R8169 is not set | ||
602 | # CONFIG_SIS190 is not set | ||
603 | # CONFIG_SKGE is not set | ||
604 | # CONFIG_SKY2 is not set | ||
605 | # CONFIG_VIA_VELOCITY is not set | ||
606 | # CONFIG_TIGON3 is not set | ||
607 | # CONFIG_BNX2 is not set | ||
608 | # CONFIG_GIANFAR is not set | ||
609 | # CONFIG_MV643XX_ETH is not set | ||
610 | # CONFIG_QLA3XXX is not set | ||
611 | # CONFIG_ATL1 is not set | ||
612 | CONFIG_NETDEV_10000=y | ||
613 | # CONFIG_CHELSIO_T1 is not set | ||
614 | # CONFIG_CHELSIO_T3 is not set | ||
615 | # CONFIG_IXGBE is not set | ||
616 | # CONFIG_IXGB is not set | ||
617 | # CONFIG_S2IO is not set | ||
618 | # CONFIG_MYRI10GE is not set | ||
619 | # CONFIG_NETXEN_NIC is not set | ||
620 | # CONFIG_NIU is not set | ||
621 | # CONFIG_MLX4_CORE is not set | ||
622 | # CONFIG_TEHUTI is not set | ||
623 | # CONFIG_BNX2X is not set | ||
624 | # CONFIG_TR is not set | ||
625 | |||
626 | # | ||
627 | # Wireless LAN | ||
628 | # | ||
629 | # CONFIG_WLAN_PRE80211 is not set | ||
630 | # CONFIG_WLAN_80211 is not set | ||
631 | # CONFIG_IWLWIFI is not set | ||
632 | # CONFIG_IWLWIFI_LEDS is not set | ||
633 | # CONFIG_WAN is not set | ||
634 | # CONFIG_FDDI is not set | ||
635 | # CONFIG_HIPPI is not set | ||
636 | # CONFIG_PPP is not set | ||
637 | # CONFIG_SLIP is not set | ||
638 | # CONFIG_NET_FC is not set | ||
639 | # CONFIG_NETCONSOLE is not set | ||
640 | # CONFIG_NETPOLL is not set | ||
641 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
642 | # CONFIG_ISDN is not set | ||
643 | # CONFIG_PHONE is not set | ||
644 | |||
645 | # | ||
646 | # Input device support | ||
647 | # | ||
648 | # CONFIG_INPUT is not set | ||
649 | |||
650 | # | ||
651 | # Hardware I/O ports | ||
652 | # | ||
653 | # CONFIG_SERIO is not set | ||
654 | # CONFIG_GAMEPORT is not set | ||
655 | |||
656 | # | ||
657 | # Character devices | ||
658 | # | ||
659 | # CONFIG_VT is not set | ||
660 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
661 | # CONFIG_NOZOMI is not set | ||
662 | |||
663 | # | ||
664 | # Serial drivers | ||
665 | # | ||
666 | # CONFIG_SERIAL_8250 is not set | ||
667 | |||
668 | # | ||
669 | # Non-8250 serial port support | ||
670 | # | ||
671 | # CONFIG_SERIAL_UARTLITE is not set | ||
672 | CONFIG_SERIAL_CORE=y | ||
673 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
674 | CONFIG_SERIAL_MPC52xx=y | ||
675 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | ||
676 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | ||
677 | # CONFIG_SERIAL_JSM is not set | ||
678 | CONFIG_UNIX98_PTYS=y | ||
679 | CONFIG_LEGACY_PTYS=y | ||
680 | CONFIG_LEGACY_PTY_COUNT=256 | ||
681 | # CONFIG_IPMI_HANDLER is not set | ||
682 | # CONFIG_HW_RANDOM is not set | ||
683 | # CONFIG_NVRAM is not set | ||
684 | CONFIG_GEN_RTC=y | ||
685 | # CONFIG_GEN_RTC_X is not set | ||
686 | # CONFIG_R3964 is not set | ||
687 | # CONFIG_APPLICOM is not set | ||
688 | # CONFIG_RAW_DRIVER is not set | ||
689 | # CONFIG_TCG_TPM is not set | ||
690 | CONFIG_DEVPORT=y | ||
691 | CONFIG_I2C=y | ||
692 | CONFIG_I2C_BOARDINFO=y | ||
693 | CONFIG_I2C_CHARDEV=y | ||
694 | |||
695 | # | ||
696 | # I2C Hardware Bus support | ||
697 | # | ||
698 | # CONFIG_I2C_ALI1535 is not set | ||
699 | # CONFIG_I2C_ALI1563 is not set | ||
700 | # CONFIG_I2C_ALI15X3 is not set | ||
701 | # CONFIG_I2C_AMD756 is not set | ||
702 | # CONFIG_I2C_AMD8111 is not set | ||
703 | # CONFIG_I2C_I801 is not set | ||
704 | # CONFIG_I2C_I810 is not set | ||
705 | # CONFIG_I2C_PIIX4 is not set | ||
706 | CONFIG_I2C_MPC=y | ||
707 | # CONFIG_I2C_NFORCE2 is not set | ||
708 | # CONFIG_I2C_OCORES is not set | ||
709 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
710 | # CONFIG_I2C_PROSAVAGE is not set | ||
711 | # CONFIG_I2C_SAVAGE4 is not set | ||
712 | # CONFIG_I2C_SIMTEC is not set | ||
713 | # CONFIG_I2C_SIS5595 is not set | ||
714 | # CONFIG_I2C_SIS630 is not set | ||
715 | # CONFIG_I2C_SIS96X is not set | ||
716 | # CONFIG_I2C_TAOS_EVM is not set | ||
717 | # CONFIG_I2C_STUB is not set | ||
718 | # CONFIG_I2C_VIA is not set | ||
719 | # CONFIG_I2C_VIAPRO is not set | ||
720 | # CONFIG_I2C_VOODOO3 is not set | ||
721 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
722 | |||
723 | # | ||
724 | # Miscellaneous I2C Chip support | ||
725 | # | ||
726 | # CONFIG_DS1682 is not set | ||
727 | # CONFIG_SENSORS_EEPROM is not set | ||
728 | # CONFIG_SENSORS_PCF8574 is not set | ||
729 | # CONFIG_PCF8575 is not set | ||
730 | # CONFIG_SENSORS_PCF8591 is not set | ||
731 | # CONFIG_SENSORS_MAX6875 is not set | ||
732 | # CONFIG_SENSORS_TSL2550 is not set | ||
733 | # CONFIG_I2C_DEBUG_CORE is not set | ||
734 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
735 | # CONFIG_I2C_DEBUG_BUS is not set | ||
736 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
737 | # CONFIG_SPI is not set | ||
738 | # CONFIG_W1 is not set | ||
739 | # CONFIG_POWER_SUPPLY is not set | ||
740 | # CONFIG_HWMON is not set | ||
741 | # CONFIG_THERMAL is not set | ||
742 | # CONFIG_WATCHDOG is not set | ||
743 | |||
744 | # | ||
745 | # Sonics Silicon Backplane | ||
746 | # | ||
747 | CONFIG_SSB_POSSIBLE=y | ||
748 | # CONFIG_SSB is not set | ||
749 | |||
750 | # | ||
751 | # Multifunction device drivers | ||
752 | # | ||
753 | # CONFIG_MFD_SM501 is not set | ||
754 | # CONFIG_HTC_PASIC3 is not set | ||
755 | |||
756 | # | ||
757 | # Multimedia devices | ||
758 | # | ||
759 | # CONFIG_VIDEO_DEV is not set | ||
760 | # CONFIG_DVB_CORE is not set | ||
761 | # CONFIG_DAB is not set | ||
762 | |||
763 | # | ||
764 | # Graphics support | ||
765 | # | ||
766 | # CONFIG_AGP is not set | ||
767 | # CONFIG_DRM is not set | ||
768 | # CONFIG_VGASTATE is not set | ||
769 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
770 | # CONFIG_FB is not set | ||
771 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
772 | |||
773 | # | ||
774 | # Display device support | ||
775 | # | ||
776 | # CONFIG_DISPLAY_SUPPORT is not set | ||
777 | |||
778 | # | ||
779 | # Sound | ||
780 | # | ||
781 | # CONFIG_SOUND is not set | ||
782 | CONFIG_USB_SUPPORT=y | ||
783 | CONFIG_USB_ARCH_HAS_HCD=y | ||
784 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
785 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
786 | # CONFIG_USB is not set | ||
787 | # CONFIG_USB_OTG_WHITELIST is not set | ||
788 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
789 | |||
790 | # | ||
791 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
792 | # | ||
793 | # CONFIG_USB_GADGET is not set | ||
794 | # CONFIG_MMC is not set | ||
795 | # CONFIG_MEMSTICK is not set | ||
796 | # CONFIG_NEW_LEDS is not set | ||
797 | # CONFIG_INFINIBAND is not set | ||
798 | # CONFIG_EDAC is not set | ||
799 | # CONFIG_RTC_CLASS is not set | ||
800 | # CONFIG_DMADEVICES is not set | ||
801 | # CONFIG_UIO is not set | ||
802 | |||
803 | # | ||
804 | # File systems | ||
805 | # | ||
806 | CONFIG_EXT2_FS=y | ||
807 | # CONFIG_EXT2_FS_XATTR is not set | ||
808 | # CONFIG_EXT2_FS_XIP is not set | ||
809 | CONFIG_EXT3_FS=y | ||
810 | CONFIG_EXT3_FS_XATTR=y | ||
811 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
812 | # CONFIG_EXT3_FS_SECURITY is not set | ||
813 | # CONFIG_EXT4DEV_FS is not set | ||
814 | CONFIG_JBD=y | ||
815 | CONFIG_FS_MBCACHE=y | ||
816 | # CONFIG_REISERFS_FS is not set | ||
817 | # CONFIG_JFS_FS is not set | ||
818 | # CONFIG_FS_POSIX_ACL is not set | ||
819 | # CONFIG_XFS_FS is not set | ||
820 | # CONFIG_OCFS2_FS is not set | ||
821 | CONFIG_DNOTIFY=y | ||
822 | CONFIG_INOTIFY=y | ||
823 | CONFIG_INOTIFY_USER=y | ||
824 | # CONFIG_QUOTA is not set | ||
825 | # CONFIG_AUTOFS_FS is not set | ||
826 | # CONFIG_AUTOFS4_FS is not set | ||
827 | # CONFIG_FUSE_FS is not set | ||
828 | |||
829 | # | ||
830 | # CD-ROM/DVD Filesystems | ||
831 | # | ||
832 | # CONFIG_ISO9660_FS is not set | ||
833 | # CONFIG_UDF_FS is not set | ||
834 | |||
835 | # | ||
836 | # DOS/FAT/NT Filesystems | ||
837 | # | ||
838 | # CONFIG_MSDOS_FS is not set | ||
839 | # CONFIG_VFAT_FS is not set | ||
840 | # CONFIG_NTFS_FS is not set | ||
841 | |||
842 | # | ||
843 | # Pseudo filesystems | ||
844 | # | ||
845 | CONFIG_PROC_FS=y | ||
846 | CONFIG_PROC_KCORE=y | ||
847 | CONFIG_PROC_SYSCTL=y | ||
848 | CONFIG_SYSFS=y | ||
849 | CONFIG_TMPFS=y | ||
850 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
851 | # CONFIG_HUGETLB_PAGE is not set | ||
852 | # CONFIG_CONFIGFS_FS is not set | ||
853 | |||
854 | # | ||
855 | # Miscellaneous filesystems | ||
856 | # | ||
857 | # CONFIG_ADFS_FS is not set | ||
858 | # CONFIG_AFFS_FS is not set | ||
859 | # CONFIG_HFS_FS is not set | ||
860 | # CONFIG_HFSPLUS_FS is not set | ||
861 | # CONFIG_BEFS_FS is not set | ||
862 | # CONFIG_BFS_FS is not set | ||
863 | # CONFIG_EFS_FS is not set | ||
864 | # CONFIG_CRAMFS is not set | ||
865 | # CONFIG_VXFS_FS is not set | ||
866 | # CONFIG_MINIX_FS is not set | ||
867 | # CONFIG_HPFS_FS is not set | ||
868 | # CONFIG_QNX4FS_FS is not set | ||
869 | # CONFIG_ROMFS_FS is not set | ||
870 | # CONFIG_SYSV_FS is not set | ||
871 | # CONFIG_UFS_FS is not set | ||
872 | CONFIG_NETWORK_FILESYSTEMS=y | ||
873 | CONFIG_NFS_FS=y | ||
874 | CONFIG_NFS_V3=y | ||
875 | # CONFIG_NFS_V3_ACL is not set | ||
876 | CONFIG_NFS_V4=y | ||
877 | # CONFIG_NFSD is not set | ||
878 | CONFIG_ROOT_NFS=y | ||
879 | CONFIG_LOCKD=y | ||
880 | CONFIG_LOCKD_V4=y | ||
881 | CONFIG_NFS_COMMON=y | ||
882 | CONFIG_SUNRPC=y | ||
883 | CONFIG_SUNRPC_GSS=y | ||
884 | # CONFIG_SUNRPC_BIND34 is not set | ||
885 | CONFIG_RPCSEC_GSS_KRB5=y | ||
886 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
887 | # CONFIG_SMB_FS is not set | ||
888 | # CONFIG_CIFS is not set | ||
889 | # CONFIG_NCP_FS is not set | ||
890 | # CONFIG_CODA_FS is not set | ||
891 | # CONFIG_AFS_FS is not set | ||
892 | |||
893 | # | ||
894 | # Partition Types | ||
895 | # | ||
896 | # CONFIG_PARTITION_ADVANCED is not set | ||
897 | CONFIG_MSDOS_PARTITION=y | ||
898 | # CONFIG_NLS is not set | ||
899 | # CONFIG_DLM is not set | ||
900 | |||
901 | # | ||
902 | # Library routines | ||
903 | # | ||
904 | CONFIG_BITREVERSE=y | ||
905 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
906 | # CONFIG_CRC_CCITT is not set | ||
907 | # CONFIG_CRC16 is not set | ||
908 | # CONFIG_CRC_ITU_T is not set | ||
909 | CONFIG_CRC32=y | ||
910 | # CONFIG_CRC7 is not set | ||
911 | # CONFIG_LIBCRC32C is not set | ||
912 | CONFIG_PLIST=y | ||
913 | CONFIG_HAS_IOMEM=y | ||
914 | CONFIG_HAS_IOPORT=y | ||
915 | CONFIG_HAS_DMA=y | ||
916 | CONFIG_HAVE_LMB=y | ||
917 | |||
918 | # | ||
919 | # Kernel hacking | ||
920 | # | ||
921 | CONFIG_PRINTK_TIME=y | ||
922 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
923 | CONFIG_ENABLE_MUST_CHECK=y | ||
924 | CONFIG_FRAME_WARN=1024 | ||
925 | # CONFIG_MAGIC_SYSRQ is not set | ||
926 | # CONFIG_UNUSED_SYMBOLS is not set | ||
927 | # CONFIG_DEBUG_FS is not set | ||
928 | # CONFIG_HEADERS_CHECK is not set | ||
929 | CONFIG_DEBUG_KERNEL=y | ||
930 | # CONFIG_DEBUG_SHIRQ is not set | ||
931 | CONFIG_DETECT_SOFTLOCKUP=y | ||
932 | CONFIG_SCHED_DEBUG=y | ||
933 | # CONFIG_SCHEDSTATS is not set | ||
934 | # CONFIG_TIMER_STATS is not set | ||
935 | # CONFIG_SLUB_DEBUG_ON is not set | ||
936 | # CONFIG_SLUB_STATS is not set | ||
937 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
938 | # CONFIG_RT_MUTEX_TESTER is not set | ||
939 | # CONFIG_DEBUG_SPINLOCK is not set | ||
940 | # CONFIG_DEBUG_MUTEXES is not set | ||
941 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
942 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
943 | # CONFIG_DEBUG_KOBJECT is not set | ||
944 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
945 | CONFIG_DEBUG_INFO=y | ||
946 | # CONFIG_DEBUG_VM is not set | ||
947 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
948 | # CONFIG_DEBUG_LIST is not set | ||
949 | # CONFIG_DEBUG_SG is not set | ||
950 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
951 | # CONFIG_RCU_TORTURE_TEST is not set | ||
952 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
953 | # CONFIG_FAULT_INJECTION is not set | ||
954 | # CONFIG_SAMPLES is not set | ||
955 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
956 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
957 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
958 | # CONFIG_DEBUGGER is not set | ||
959 | # CONFIG_IRQSTACKS is not set | ||
960 | # CONFIG_BDI_SWITCH is not set | ||
961 | # CONFIG_BOOTX_TEXT is not set | ||
962 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
963 | |||
964 | # | ||
965 | # Security options | ||
966 | # | ||
967 | # CONFIG_KEYS is not set | ||
968 | # CONFIG_SECURITY is not set | ||
969 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
970 | CONFIG_CRYPTO=y | ||
971 | |||
972 | # | ||
973 | # Crypto core or helper | ||
974 | # | ||
975 | CONFIG_CRYPTO_ALGAPI=y | ||
976 | CONFIG_CRYPTO_BLKCIPHER=y | ||
977 | CONFIG_CRYPTO_MANAGER=y | ||
978 | # CONFIG_CRYPTO_GF128MUL is not set | ||
979 | # CONFIG_CRYPTO_NULL is not set | ||
980 | # CONFIG_CRYPTO_CRYPTD is not set | ||
981 | # CONFIG_CRYPTO_AUTHENC is not set | ||
982 | # CONFIG_CRYPTO_TEST is not set | ||
983 | |||
984 | # | ||
985 | # Authenticated Encryption with Associated Data | ||
986 | # | ||
987 | # CONFIG_CRYPTO_CCM is not set | ||
988 | # CONFIG_CRYPTO_GCM is not set | ||
989 | # CONFIG_CRYPTO_SEQIV is not set | ||
990 | |||
991 | # | ||
992 | # Block modes | ||
993 | # | ||
994 | CONFIG_CRYPTO_CBC=y | ||
995 | # CONFIG_CRYPTO_CTR is not set | ||
996 | # CONFIG_CRYPTO_CTS is not set | ||
997 | # CONFIG_CRYPTO_ECB is not set | ||
998 | # CONFIG_CRYPTO_LRW is not set | ||
999 | # CONFIG_CRYPTO_PCBC is not set | ||
1000 | # CONFIG_CRYPTO_XTS is not set | ||
1001 | |||
1002 | # | ||
1003 | # Hash modes | ||
1004 | # | ||
1005 | # CONFIG_CRYPTO_HMAC is not set | ||
1006 | # CONFIG_CRYPTO_XCBC is not set | ||
1007 | |||
1008 | # | ||
1009 | # Digest | ||
1010 | # | ||
1011 | # CONFIG_CRYPTO_CRC32C is not set | ||
1012 | # CONFIG_CRYPTO_MD4 is not set | ||
1013 | CONFIG_CRYPTO_MD5=y | ||
1014 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1015 | # CONFIG_CRYPTO_SHA1 is not set | ||
1016 | # CONFIG_CRYPTO_SHA256 is not set | ||
1017 | # CONFIG_CRYPTO_SHA512 is not set | ||
1018 | # CONFIG_CRYPTO_TGR192 is not set | ||
1019 | # CONFIG_CRYPTO_WP512 is not set | ||
1020 | |||
1021 | # | ||
1022 | # Ciphers | ||
1023 | # | ||
1024 | # CONFIG_CRYPTO_AES is not set | ||
1025 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1026 | # CONFIG_CRYPTO_ARC4 is not set | ||
1027 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1028 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1029 | # CONFIG_CRYPTO_CAST5 is not set | ||
1030 | # CONFIG_CRYPTO_CAST6 is not set | ||
1031 | CONFIG_CRYPTO_DES=y | ||
1032 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1033 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1034 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1035 | # CONFIG_CRYPTO_SEED is not set | ||
1036 | # CONFIG_CRYPTO_SERPENT is not set | ||
1037 | # CONFIG_CRYPTO_TEA is not set | ||
1038 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1039 | |||
1040 | # | ||
1041 | # Compression | ||
1042 | # | ||
1043 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1044 | # CONFIG_CRYPTO_LZO is not set | ||
1045 | CONFIG_CRYPTO_HW=y | ||
1046 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | ||
1047 | CONFIG_PPC_CLOCK=y | ||
1048 | CONFIG_PPC_LIB_RHEAP=y | ||
1049 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig new file mode 100644 index 000000000000..8c7ba7c6ba49 --- /dev/null +++ b/arch/powerpc/configs/52xx/motionpro_defconfig | |||
@@ -0,0 +1,1107 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.25 | ||
4 | # Tue Apr 29 07:12:22 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | CONFIG_6xx=y | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | # CONFIG_ALTIVEC is not set | ||
19 | CONFIG_PPC_STD_MMU=y | ||
20 | CONFIG_PPC_STD_MMU_32=y | ||
21 | # CONFIG_PPC_MM_SLICES is not set | ||
22 | # CONFIG_SMP is not set | ||
23 | CONFIG_PPC32=y | ||
24 | CONFIG_WORD_SIZE=32 | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
28 | CONFIG_GENERIC_TIME=y | ||
29 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
30 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
31 | CONFIG_GENERIC_HARDIRQS=y | ||
32 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
33 | CONFIG_IRQ_PER_CPU=y | ||
34 | CONFIG_STACKTRACE_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
37 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
38 | CONFIG_GENERIC_HWEIGHT=y | ||
39 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
40 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
41 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
42 | CONFIG_PPC=y | ||
43 | CONFIG_EARLY_PRINTK=y | ||
44 | CONFIG_GENERIC_NVRAM=y | ||
45 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
46 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
47 | CONFIG_PPC_OF=y | ||
48 | CONFIG_OF=y | ||
49 | # CONFIG_PPC_UDBG_16550 is not set | ||
50 | # CONFIG_GENERIC_TBSYNC is not set | ||
51 | CONFIG_AUDIT_ARCH=y | ||
52 | CONFIG_GENERIC_BUG=y | ||
53 | CONFIG_DEFAULT_UIMAGE=y | ||
54 | # CONFIG_PPC_DCR_NATIVE is not set | ||
55 | # CONFIG_PPC_DCR_MMIO is not set | ||
56 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
57 | |||
58 | # | ||
59 | # General setup | ||
60 | # | ||
61 | CONFIG_EXPERIMENTAL=y | ||
62 | CONFIG_BROKEN_ON_SMP=y | ||
63 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
64 | CONFIG_LOCALVERSION="" | ||
65 | CONFIG_LOCALVERSION_AUTO=y | ||
66 | CONFIG_SWAP=y | ||
67 | CONFIG_SYSVIPC=y | ||
68 | CONFIG_SYSVIPC_SYSCTL=y | ||
69 | # CONFIG_POSIX_MQUEUE is not set | ||
70 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
71 | # CONFIG_TASKSTATS is not set | ||
72 | # CONFIG_AUDIT is not set | ||
73 | # CONFIG_IKCONFIG is not set | ||
74 | CONFIG_LOG_BUF_SHIFT=14 | ||
75 | # CONFIG_CGROUPS is not set | ||
76 | CONFIG_GROUP_SCHED=y | ||
77 | CONFIG_FAIR_GROUP_SCHED=y | ||
78 | # CONFIG_RT_GROUP_SCHED is not set | ||
79 | CONFIG_USER_SCHED=y | ||
80 | # CONFIG_CGROUP_SCHED is not set | ||
81 | CONFIG_SYSFS_DEPRECATED=y | ||
82 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
83 | # CONFIG_RELAY is not set | ||
84 | # CONFIG_NAMESPACES is not set | ||
85 | CONFIG_BLK_DEV_INITRD=y | ||
86 | CONFIG_INITRAMFS_SOURCE="" | ||
87 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
88 | CONFIG_SYSCTL=y | ||
89 | CONFIG_EMBEDDED=y | ||
90 | # CONFIG_SYSCTL_SYSCALL is not set | ||
91 | # CONFIG_KALLSYMS is not set | ||
92 | CONFIG_HOTPLUG=y | ||
93 | CONFIG_PRINTK=y | ||
94 | CONFIG_BUG=y | ||
95 | CONFIG_ELF_CORE=y | ||
96 | CONFIG_COMPAT_BRK=y | ||
97 | CONFIG_BASE_FULL=y | ||
98 | CONFIG_FUTEX=y | ||
99 | CONFIG_ANON_INODES=y | ||
100 | # CONFIG_EPOLL is not set | ||
101 | CONFIG_SIGNALFD=y | ||
102 | CONFIG_TIMERFD=y | ||
103 | CONFIG_EVENTFD=y | ||
104 | CONFIG_SHMEM=y | ||
105 | CONFIG_VM_EVENT_COUNTERS=y | ||
106 | CONFIG_SLUB_DEBUG=y | ||
107 | # CONFIG_SLAB is not set | ||
108 | CONFIG_SLUB=y | ||
109 | # CONFIG_SLOB is not set | ||
110 | # CONFIG_PROFILING is not set | ||
111 | # CONFIG_MARKERS is not set | ||
112 | CONFIG_HAVE_OPROFILE=y | ||
113 | CONFIG_HAVE_KPROBES=y | ||
114 | CONFIG_HAVE_KRETPROBES=y | ||
115 | CONFIG_PROC_PAGE_MONITOR=y | ||
116 | CONFIG_SLABINFO=y | ||
117 | CONFIG_RT_MUTEXES=y | ||
118 | # CONFIG_TINY_SHMEM is not set | ||
119 | CONFIG_BASE_SMALL=0 | ||
120 | # CONFIG_MODULES is not set | ||
121 | CONFIG_BLOCK=y | ||
122 | # CONFIG_LBD is not set | ||
123 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
124 | # CONFIG_LSF is not set | ||
125 | # CONFIG_BLK_DEV_BSG is not set | ||
126 | |||
127 | # | ||
128 | # IO Schedulers | ||
129 | # | ||
130 | CONFIG_IOSCHED_NOOP=y | ||
131 | CONFIG_IOSCHED_AS=y | ||
132 | CONFIG_IOSCHED_DEADLINE=y | ||
133 | CONFIG_IOSCHED_CFQ=y | ||
134 | CONFIG_DEFAULT_AS=y | ||
135 | # CONFIG_DEFAULT_DEADLINE is not set | ||
136 | # CONFIG_DEFAULT_CFQ is not set | ||
137 | # CONFIG_DEFAULT_NOOP is not set | ||
138 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
139 | CONFIG_CLASSIC_RCU=y | ||
140 | |||
141 | # | ||
142 | # Platform support | ||
143 | # | ||
144 | CONFIG_PPC_MULTIPLATFORM=y | ||
145 | # CONFIG_PPC_82xx is not set | ||
146 | # CONFIG_PPC_83xx is not set | ||
147 | # CONFIG_PPC_86xx is not set | ||
148 | CONFIG_CLASSIC32=y | ||
149 | # CONFIG_PPC_CHRP is not set | ||
150 | # CONFIG_PPC_MPC512x is not set | ||
151 | # CONFIG_PPC_MPC5121 is not set | ||
152 | # CONFIG_MPC5121_ADS is not set | ||
153 | CONFIG_PPC_MPC52xx=y | ||
154 | CONFIG_PPC_MPC5200_SIMPLE=y | ||
155 | # CONFIG_PPC_EFIKA is not set | ||
156 | # CONFIG_PPC_LITE5200 is not set | ||
157 | # CONFIG_PPC_MPC5200_BUGFIX is not set | ||
158 | # CONFIG_PPC_MPC5200_GPIO is not set | ||
159 | # CONFIG_PPC_PMAC is not set | ||
160 | # CONFIG_PPC_CELL is not set | ||
161 | # CONFIG_PPC_CELL_NATIVE is not set | ||
162 | # CONFIG_PQ2ADS is not set | ||
163 | # CONFIG_EMBEDDED6xx is not set | ||
164 | # CONFIG_IPIC is not set | ||
165 | # CONFIG_MPIC is not set | ||
166 | # CONFIG_MPIC_WEIRD is not set | ||
167 | # CONFIG_PPC_I8259 is not set | ||
168 | # CONFIG_PPC_RTAS is not set | ||
169 | # CONFIG_MMIO_NVRAM is not set | ||
170 | # CONFIG_PPC_MPC106 is not set | ||
171 | # CONFIG_PPC_970_NAP is not set | ||
172 | # CONFIG_PPC_INDIRECT_IO is not set | ||
173 | # CONFIG_GENERIC_IOMAP is not set | ||
174 | # CONFIG_CPU_FREQ is not set | ||
175 | # CONFIG_TAU is not set | ||
176 | # CONFIG_FSL_ULI1575 is not set | ||
177 | CONFIG_PPC_BESTCOMM=y | ||
178 | # CONFIG_PPC_BESTCOMM_ATA is not set | ||
179 | CONFIG_PPC_BESTCOMM_FEC=y | ||
180 | # CONFIG_PPC_BESTCOMM_GEN_BD is not set | ||
181 | |||
182 | # | ||
183 | # Kernel options | ||
184 | # | ||
185 | # CONFIG_HIGHMEM is not set | ||
186 | # CONFIG_TICK_ONESHOT is not set | ||
187 | # CONFIG_NO_HZ is not set | ||
188 | # CONFIG_HIGH_RES_TIMERS is not set | ||
189 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
190 | # CONFIG_HZ_100 is not set | ||
191 | CONFIG_HZ_250=y | ||
192 | # CONFIG_HZ_300 is not set | ||
193 | # CONFIG_HZ_1000 is not set | ||
194 | CONFIG_HZ=250 | ||
195 | # CONFIG_SCHED_HRTICK is not set | ||
196 | CONFIG_PREEMPT_NONE=y | ||
197 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
198 | # CONFIG_PREEMPT is not set | ||
199 | CONFIG_BINFMT_ELF=y | ||
200 | # CONFIG_BINFMT_MISC is not set | ||
201 | # CONFIG_IOMMU_HELPER is not set | ||
202 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
203 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
204 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
205 | # CONFIG_KEXEC is not set | ||
206 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
207 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
208 | CONFIG_SELECT_MEMORY_MODEL=y | ||
209 | CONFIG_FLATMEM_MANUAL=y | ||
210 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
211 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
212 | CONFIG_FLATMEM=y | ||
213 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
214 | # CONFIG_SPARSEMEM_STATIC is not set | ||
215 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
216 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
217 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
218 | # CONFIG_RESOURCES_64BIT is not set | ||
219 | CONFIG_ZONE_DMA_FLAG=1 | ||
220 | CONFIG_BOUNCE=y | ||
221 | CONFIG_VIRT_TO_BUS=y | ||
222 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
223 | CONFIG_PROC_DEVICETREE=y | ||
224 | # CONFIG_CMDLINE_BOOL is not set | ||
225 | CONFIG_PM=y | ||
226 | # CONFIG_PM_LEGACY is not set | ||
227 | # CONFIG_PM_DEBUG is not set | ||
228 | CONFIG_SECCOMP=y | ||
229 | CONFIG_ISA_DMA_API=y | ||
230 | |||
231 | # | ||
232 | # Bus options | ||
233 | # | ||
234 | CONFIG_ZONE_DMA=y | ||
235 | CONFIG_GENERIC_ISA_DMA=y | ||
236 | CONFIG_FSL_SOC=y | ||
237 | # CONFIG_PCI is not set | ||
238 | # CONFIG_PCI_DOMAINS is not set | ||
239 | # CONFIG_PCI_SYSCALL is not set | ||
240 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
241 | # CONFIG_PCCARD is not set | ||
242 | # CONFIG_HAS_RAPIDIO is not set | ||
243 | |||
244 | # | ||
245 | # Advanced setup | ||
246 | # | ||
247 | # CONFIG_ADVANCED_OPTIONS is not set | ||
248 | |||
249 | # | ||
250 | # Default settings for advanced configuration options are used | ||
251 | # | ||
252 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
253 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
254 | CONFIG_KERNEL_START=0xc0000000 | ||
255 | CONFIG_PHYSICAL_START=0x00000000 | ||
256 | CONFIG_TASK_SIZE=0xc0000000 | ||
257 | |||
258 | # | ||
259 | # Networking | ||
260 | # | ||
261 | CONFIG_NET=y | ||
262 | |||
263 | # | ||
264 | # Networking options | ||
265 | # | ||
266 | CONFIG_PACKET=y | ||
267 | # CONFIG_PACKET_MMAP is not set | ||
268 | CONFIG_UNIX=y | ||
269 | CONFIG_XFRM=y | ||
270 | CONFIG_XFRM_USER=y | ||
271 | # CONFIG_XFRM_SUB_POLICY is not set | ||
272 | # CONFIG_XFRM_MIGRATE is not set | ||
273 | # CONFIG_XFRM_STATISTICS is not set | ||
274 | # CONFIG_NET_KEY is not set | ||
275 | CONFIG_INET=y | ||
276 | CONFIG_IP_MULTICAST=y | ||
277 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
278 | CONFIG_IP_FIB_HASH=y | ||
279 | CONFIG_IP_PNP=y | ||
280 | CONFIG_IP_PNP_DHCP=y | ||
281 | CONFIG_IP_PNP_BOOTP=y | ||
282 | # CONFIG_IP_PNP_RARP is not set | ||
283 | # CONFIG_NET_IPIP is not set | ||
284 | # CONFIG_NET_IPGRE is not set | ||
285 | # CONFIG_IP_MROUTE is not set | ||
286 | # CONFIG_ARPD is not set | ||
287 | CONFIG_SYN_COOKIES=y | ||
288 | # CONFIG_INET_AH is not set | ||
289 | # CONFIG_INET_ESP is not set | ||
290 | # CONFIG_INET_IPCOMP is not set | ||
291 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
292 | # CONFIG_INET_TUNNEL is not set | ||
293 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
294 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
295 | CONFIG_INET_XFRM_MODE_BEET=y | ||
296 | # CONFIG_INET_LRO is not set | ||
297 | CONFIG_INET_DIAG=y | ||
298 | CONFIG_INET_TCP_DIAG=y | ||
299 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
300 | CONFIG_TCP_CONG_CUBIC=y | ||
301 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
302 | # CONFIG_TCP_MD5SIG is not set | ||
303 | # CONFIG_IPV6 is not set | ||
304 | # CONFIG_NETWORK_SECMARK is not set | ||
305 | # CONFIG_NETFILTER is not set | ||
306 | # CONFIG_IP_DCCP is not set | ||
307 | # CONFIG_IP_SCTP is not set | ||
308 | # CONFIG_TIPC is not set | ||
309 | # CONFIG_ATM is not set | ||
310 | # CONFIG_BRIDGE is not set | ||
311 | # CONFIG_VLAN_8021Q is not set | ||
312 | # CONFIG_DECNET is not set | ||
313 | # CONFIG_LLC2 is not set | ||
314 | # CONFIG_IPX is not set | ||
315 | # CONFIG_ATALK is not set | ||
316 | # CONFIG_X25 is not set | ||
317 | # CONFIG_LAPB is not set | ||
318 | # CONFIG_ECONET is not set | ||
319 | # CONFIG_WAN_ROUTER is not set | ||
320 | # CONFIG_NET_SCHED is not set | ||
321 | |||
322 | # | ||
323 | # Network testing | ||
324 | # | ||
325 | # CONFIG_NET_PKTGEN is not set | ||
326 | # CONFIG_HAMRADIO is not set | ||
327 | # CONFIG_CAN is not set | ||
328 | # CONFIG_IRDA is not set | ||
329 | # CONFIG_BT is not set | ||
330 | # CONFIG_AF_RXRPC is not set | ||
331 | |||
332 | # | ||
333 | # Wireless | ||
334 | # | ||
335 | # CONFIG_CFG80211 is not set | ||
336 | # CONFIG_WIRELESS_EXT is not set | ||
337 | # CONFIG_MAC80211 is not set | ||
338 | # CONFIG_IEEE80211 is not set | ||
339 | # CONFIG_RFKILL is not set | ||
340 | # CONFIG_NET_9P is not set | ||
341 | |||
342 | # | ||
343 | # Device Drivers | ||
344 | # | ||
345 | |||
346 | # | ||
347 | # Generic Driver Options | ||
348 | # | ||
349 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
350 | CONFIG_STANDALONE=y | ||
351 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
352 | # CONFIG_FW_LOADER is not set | ||
353 | # CONFIG_DEBUG_DRIVER is not set | ||
354 | # CONFIG_DEBUG_DEVRES is not set | ||
355 | # CONFIG_SYS_HYPERVISOR is not set | ||
356 | # CONFIG_CONNECTOR is not set | ||
357 | CONFIG_MTD=y | ||
358 | # CONFIG_MTD_DEBUG is not set | ||
359 | CONFIG_MTD_CONCAT=y | ||
360 | CONFIG_MTD_PARTITIONS=y | ||
361 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
362 | CONFIG_MTD_CMDLINE_PARTS=y | ||
363 | # CONFIG_MTD_OF_PARTS is not set | ||
364 | # CONFIG_MTD_AR7_PARTS is not set | ||
365 | |||
366 | # | ||
367 | # User Modules And Translation Layers | ||
368 | # | ||
369 | CONFIG_MTD_CHAR=y | ||
370 | CONFIG_MTD_BLKDEVS=y | ||
371 | CONFIG_MTD_BLOCK=y | ||
372 | # CONFIG_FTL is not set | ||
373 | # CONFIG_NFTL is not set | ||
374 | # CONFIG_INFTL is not set | ||
375 | # CONFIG_RFD_FTL is not set | ||
376 | # CONFIG_SSFDC is not set | ||
377 | # CONFIG_MTD_OOPS is not set | ||
378 | |||
379 | # | ||
380 | # RAM/ROM/Flash chip drivers | ||
381 | # | ||
382 | CONFIG_MTD_CFI=y | ||
383 | # CONFIG_MTD_JEDECPROBE is not set | ||
384 | CONFIG_MTD_GEN_PROBE=y | ||
385 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
386 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
387 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
388 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
389 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
390 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
391 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
392 | CONFIG_MTD_CFI_I1=y | ||
393 | CONFIG_MTD_CFI_I2=y | ||
394 | # CONFIG_MTD_CFI_I4 is not set | ||
395 | # CONFIG_MTD_CFI_I8 is not set | ||
396 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
397 | CONFIG_MTD_CFI_AMDSTD=y | ||
398 | # CONFIG_MTD_CFI_STAA is not set | ||
399 | CONFIG_MTD_CFI_UTIL=y | ||
400 | # CONFIG_MTD_RAM is not set | ||
401 | CONFIG_MTD_ROM=y | ||
402 | # CONFIG_MTD_ABSENT is not set | ||
403 | |||
404 | # | ||
405 | # Mapping drivers for chip access | ||
406 | # | ||
407 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
408 | # CONFIG_MTD_PHYSMAP is not set | ||
409 | # CONFIG_MTD_PHYSMAP_OF is not set | ||
410 | # CONFIG_MTD_PLATRAM is not set | ||
411 | |||
412 | # | ||
413 | # Self-contained MTD device drivers | ||
414 | # | ||
415 | # CONFIG_MTD_SLRAM is not set | ||
416 | # CONFIG_MTD_PHRAM is not set | ||
417 | # CONFIG_MTD_MTDRAM is not set | ||
418 | # CONFIG_MTD_BLOCK2MTD is not set | ||
419 | |||
420 | # | ||
421 | # Disk-On-Chip Device Drivers | ||
422 | # | ||
423 | # CONFIG_MTD_DOC2000 is not set | ||
424 | # CONFIG_MTD_DOC2001 is not set | ||
425 | # CONFIG_MTD_DOC2001PLUS is not set | ||
426 | # CONFIG_MTD_NAND is not set | ||
427 | # CONFIG_MTD_ONENAND is not set | ||
428 | |||
429 | # | ||
430 | # UBI - Unsorted block images | ||
431 | # | ||
432 | # CONFIG_MTD_UBI is not set | ||
433 | CONFIG_OF_DEVICE=y | ||
434 | CONFIG_OF_I2C=y | ||
435 | # CONFIG_PARPORT is not set | ||
436 | CONFIG_BLK_DEV=y | ||
437 | # CONFIG_BLK_DEV_FD is not set | ||
438 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
439 | CONFIG_BLK_DEV_LOOP=y | ||
440 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
441 | # CONFIG_BLK_DEV_NBD is not set | ||
442 | CONFIG_BLK_DEV_RAM=y | ||
443 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
444 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
445 | # CONFIG_BLK_DEV_XIP is not set | ||
446 | # CONFIG_CDROM_PKTCDVD is not set | ||
447 | # CONFIG_ATA_OVER_ETH is not set | ||
448 | CONFIG_MISC_DEVICES=y | ||
449 | # CONFIG_EEPROM_93CX6 is not set | ||
450 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
451 | CONFIG_HAVE_IDE=y | ||
452 | # CONFIG_IDE is not set | ||
453 | |||
454 | # | ||
455 | # SCSI device support | ||
456 | # | ||
457 | # CONFIG_RAID_ATTRS is not set | ||
458 | CONFIG_SCSI=y | ||
459 | CONFIG_SCSI_DMA=y | ||
460 | CONFIG_SCSI_TGT=y | ||
461 | # CONFIG_SCSI_NETLINK is not set | ||
462 | CONFIG_SCSI_PROC_FS=y | ||
463 | |||
464 | # | ||
465 | # SCSI support type (disk, tape, CD-ROM) | ||
466 | # | ||
467 | CONFIG_BLK_DEV_SD=y | ||
468 | # CONFIG_CHR_DEV_ST is not set | ||
469 | # CONFIG_CHR_DEV_OSST is not set | ||
470 | # CONFIG_BLK_DEV_SR is not set | ||
471 | CONFIG_CHR_DEV_SG=y | ||
472 | # CONFIG_CHR_DEV_SCH is not set | ||
473 | |||
474 | # | ||
475 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
476 | # | ||
477 | # CONFIG_SCSI_MULTI_LUN is not set | ||
478 | # CONFIG_SCSI_CONSTANTS is not set | ||
479 | # CONFIG_SCSI_LOGGING is not set | ||
480 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
481 | |||
482 | # | ||
483 | # SCSI Transports | ||
484 | # | ||
485 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
486 | # CONFIG_SCSI_FC_ATTRS is not set | ||
487 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
488 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
489 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
490 | CONFIG_SCSI_LOWLEVEL=y | ||
491 | # CONFIG_ISCSI_TCP is not set | ||
492 | # CONFIG_SCSI_DEBUG is not set | ||
493 | CONFIG_ATA=y | ||
494 | # CONFIG_ATA_NONSTANDARD is not set | ||
495 | CONFIG_SATA_PMP=y | ||
496 | # CONFIG_SATA_FSL is not set | ||
497 | CONFIG_ATA_SFF=y | ||
498 | # CONFIG_SATA_MV is not set | ||
499 | CONFIG_PATA_MPC52xx=y | ||
500 | # CONFIG_PATA_PLATFORM is not set | ||
501 | # CONFIG_MD is not set | ||
502 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
503 | CONFIG_NETDEVICES=y | ||
504 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
505 | # CONFIG_DUMMY is not set | ||
506 | # CONFIG_BONDING is not set | ||
507 | # CONFIG_MACVLAN is not set | ||
508 | # CONFIG_EQUALIZER is not set | ||
509 | # CONFIG_TUN is not set | ||
510 | # CONFIG_VETH is not set | ||
511 | CONFIG_PHYLIB=y | ||
512 | |||
513 | # | ||
514 | # MII PHY device drivers | ||
515 | # | ||
516 | CONFIG_MARVELL_PHY=y | ||
517 | CONFIG_DAVICOM_PHY=y | ||
518 | CONFIG_QSEMI_PHY=y | ||
519 | CONFIG_LXT_PHY=y | ||
520 | CONFIG_CICADA_PHY=y | ||
521 | CONFIG_VITESSE_PHY=y | ||
522 | CONFIG_SMSC_PHY=y | ||
523 | CONFIG_BROADCOM_PHY=y | ||
524 | CONFIG_ICPLUS_PHY=y | ||
525 | # CONFIG_REALTEK_PHY is not set | ||
526 | # CONFIG_FIXED_PHY is not set | ||
527 | CONFIG_MDIO_BITBANG=y | ||
528 | CONFIG_NET_ETHERNET=y | ||
529 | CONFIG_MII=y | ||
530 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
531 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
532 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
533 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
534 | # CONFIG_B44 is not set | ||
535 | CONFIG_FEC_MPC52xx=y | ||
536 | CONFIG_FEC_MPC52xx_MDIO=y | ||
537 | # CONFIG_NETDEV_1000 is not set | ||
538 | # CONFIG_NETDEV_10000 is not set | ||
539 | |||
540 | # | ||
541 | # Wireless LAN | ||
542 | # | ||
543 | # CONFIG_WLAN_PRE80211 is not set | ||
544 | # CONFIG_WLAN_80211 is not set | ||
545 | # CONFIG_IWLWIFI is not set | ||
546 | # CONFIG_IWLWIFI_LEDS is not set | ||
547 | # CONFIG_WAN is not set | ||
548 | # CONFIG_PPP is not set | ||
549 | # CONFIG_SLIP is not set | ||
550 | # CONFIG_NETCONSOLE is not set | ||
551 | # CONFIG_NETPOLL is not set | ||
552 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
553 | # CONFIG_ISDN is not set | ||
554 | # CONFIG_PHONE is not set | ||
555 | |||
556 | # | ||
557 | # Input device support | ||
558 | # | ||
559 | # CONFIG_INPUT is not set | ||
560 | |||
561 | # | ||
562 | # Hardware I/O ports | ||
563 | # | ||
564 | # CONFIG_SERIO is not set | ||
565 | # CONFIG_GAMEPORT is not set | ||
566 | |||
567 | # | ||
568 | # Character devices | ||
569 | # | ||
570 | # CONFIG_VT is not set | ||
571 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
572 | |||
573 | # | ||
574 | # Serial drivers | ||
575 | # | ||
576 | # CONFIG_SERIAL_8250 is not set | ||
577 | |||
578 | # | ||
579 | # Non-8250 serial port support | ||
580 | # | ||
581 | # CONFIG_SERIAL_UARTLITE is not set | ||
582 | CONFIG_SERIAL_CORE=y | ||
583 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
584 | CONFIG_SERIAL_MPC52xx=y | ||
585 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | ||
586 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | ||
587 | CONFIG_UNIX98_PTYS=y | ||
588 | CONFIG_LEGACY_PTYS=y | ||
589 | CONFIG_LEGACY_PTY_COUNT=256 | ||
590 | # CONFIG_IPMI_HANDLER is not set | ||
591 | # CONFIG_HW_RANDOM is not set | ||
592 | # CONFIG_NVRAM is not set | ||
593 | # CONFIG_R3964 is not set | ||
594 | # CONFIG_RAW_DRIVER is not set | ||
595 | # CONFIG_TCG_TPM is not set | ||
596 | CONFIG_I2C=y | ||
597 | CONFIG_I2C_BOARDINFO=y | ||
598 | CONFIG_I2C_CHARDEV=y | ||
599 | |||
600 | # | ||
601 | # I2C Hardware Bus support | ||
602 | # | ||
603 | CONFIG_I2C_MPC=y | ||
604 | # CONFIG_I2C_OCORES is not set | ||
605 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
606 | # CONFIG_I2C_SIMTEC is not set | ||
607 | # CONFIG_I2C_TAOS_EVM is not set | ||
608 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
609 | |||
610 | # | ||
611 | # Miscellaneous I2C Chip support | ||
612 | # | ||
613 | # CONFIG_DS1682 is not set | ||
614 | CONFIG_SENSORS_EEPROM=y | ||
615 | # CONFIG_SENSORS_PCF8574 is not set | ||
616 | # CONFIG_PCF8575 is not set | ||
617 | # CONFIG_SENSORS_PCF8591 is not set | ||
618 | # CONFIG_SENSORS_MAX6875 is not set | ||
619 | # CONFIG_SENSORS_TSL2550 is not set | ||
620 | # CONFIG_I2C_DEBUG_CORE is not set | ||
621 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
622 | # CONFIG_I2C_DEBUG_BUS is not set | ||
623 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
624 | # CONFIG_SPI is not set | ||
625 | # CONFIG_W1 is not set | ||
626 | # CONFIG_POWER_SUPPLY is not set | ||
627 | CONFIG_HWMON=y | ||
628 | # CONFIG_HWMON_VID is not set | ||
629 | # CONFIG_SENSORS_AD7418 is not set | ||
630 | # CONFIG_SENSORS_ADM1021 is not set | ||
631 | # CONFIG_SENSORS_ADM1025 is not set | ||
632 | # CONFIG_SENSORS_ADM1026 is not set | ||
633 | # CONFIG_SENSORS_ADM1029 is not set | ||
634 | # CONFIG_SENSORS_ADM1031 is not set | ||
635 | # CONFIG_SENSORS_ADM9240 is not set | ||
636 | # CONFIG_SENSORS_ADT7470 is not set | ||
637 | # CONFIG_SENSORS_ADT7473 is not set | ||
638 | # CONFIG_SENSORS_ATXP1 is not set | ||
639 | # CONFIG_SENSORS_DS1621 is not set | ||
640 | # CONFIG_SENSORS_F71805F is not set | ||
641 | # CONFIG_SENSORS_F71882FG is not set | ||
642 | # CONFIG_SENSORS_F75375S is not set | ||
643 | # CONFIG_SENSORS_GL518SM is not set | ||
644 | # CONFIG_SENSORS_GL520SM is not set | ||
645 | # CONFIG_SENSORS_IT87 is not set | ||
646 | # CONFIG_SENSORS_LM63 is not set | ||
647 | # CONFIG_SENSORS_LM75 is not set | ||
648 | # CONFIG_SENSORS_LM77 is not set | ||
649 | # CONFIG_SENSORS_LM78 is not set | ||
650 | # CONFIG_SENSORS_LM80 is not set | ||
651 | # CONFIG_SENSORS_LM83 is not set | ||
652 | # CONFIG_SENSORS_LM85 is not set | ||
653 | # CONFIG_SENSORS_LM87 is not set | ||
654 | # CONFIG_SENSORS_LM90 is not set | ||
655 | # CONFIG_SENSORS_LM92 is not set | ||
656 | # CONFIG_SENSORS_LM93 is not set | ||
657 | # CONFIG_SENSORS_MAX1619 is not set | ||
658 | # CONFIG_SENSORS_MAX6650 is not set | ||
659 | # CONFIG_SENSORS_PC87360 is not set | ||
660 | # CONFIG_SENSORS_PC87427 is not set | ||
661 | # CONFIG_SENSORS_DME1737 is not set | ||
662 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
663 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
664 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
665 | # CONFIG_SENSORS_ADS7828 is not set | ||
666 | # CONFIG_SENSORS_THMC50 is not set | ||
667 | # CONFIG_SENSORS_VT1211 is not set | ||
668 | # CONFIG_SENSORS_W83781D is not set | ||
669 | # CONFIG_SENSORS_W83791D is not set | ||
670 | # CONFIG_SENSORS_W83792D is not set | ||
671 | # CONFIG_SENSORS_W83793 is not set | ||
672 | # CONFIG_SENSORS_W83L785TS is not set | ||
673 | # CONFIG_SENSORS_W83L786NG is not set | ||
674 | # CONFIG_SENSORS_W83627HF is not set | ||
675 | # CONFIG_SENSORS_W83627EHF is not set | ||
676 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
677 | # CONFIG_THERMAL is not set | ||
678 | CONFIG_WATCHDOG=y | ||
679 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
680 | |||
681 | # | ||
682 | # Watchdog Device Drivers | ||
683 | # | ||
684 | # CONFIG_SOFT_WATCHDOG is not set | ||
685 | # CONFIG_MPC5200_WDT is not set | ||
686 | |||
687 | # | ||
688 | # Sonics Silicon Backplane | ||
689 | # | ||
690 | CONFIG_SSB_POSSIBLE=y | ||
691 | # CONFIG_SSB is not set | ||
692 | |||
693 | # | ||
694 | # Multifunction device drivers | ||
695 | # | ||
696 | # CONFIG_MFD_SM501 is not set | ||
697 | # CONFIG_HTC_PASIC3 is not set | ||
698 | |||
699 | # | ||
700 | # Multimedia devices | ||
701 | # | ||
702 | # CONFIG_VIDEO_DEV is not set | ||
703 | # CONFIG_DVB_CORE is not set | ||
704 | CONFIG_DAB=y | ||
705 | |||
706 | # | ||
707 | # Graphics support | ||
708 | # | ||
709 | # CONFIG_VGASTATE is not set | ||
710 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
711 | # CONFIG_FB is not set | ||
712 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
713 | |||
714 | # | ||
715 | # Display device support | ||
716 | # | ||
717 | # CONFIG_DISPLAY_SUPPORT is not set | ||
718 | |||
719 | # | ||
720 | # Sound | ||
721 | # | ||
722 | # CONFIG_SOUND is not set | ||
723 | # CONFIG_USB_SUPPORT is not set | ||
724 | # CONFIG_MMC is not set | ||
725 | # CONFIG_MEMSTICK is not set | ||
726 | CONFIG_NEW_LEDS=y | ||
727 | CONFIG_LEDS_CLASS=y | ||
728 | |||
729 | # | ||
730 | # LED drivers | ||
731 | # | ||
732 | |||
733 | # | ||
734 | # LED Triggers | ||
735 | # | ||
736 | CONFIG_LEDS_TRIGGERS=y | ||
737 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
738 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set | ||
739 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set | ||
740 | # CONFIG_EDAC is not set | ||
741 | CONFIG_RTC_LIB=y | ||
742 | CONFIG_RTC_CLASS=y | ||
743 | CONFIG_RTC_HCTOSYS=y | ||
744 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
745 | # CONFIG_RTC_DEBUG is not set | ||
746 | |||
747 | # | ||
748 | # RTC interfaces | ||
749 | # | ||
750 | CONFIG_RTC_INTF_SYSFS=y | ||
751 | CONFIG_RTC_INTF_PROC=y | ||
752 | CONFIG_RTC_INTF_DEV=y | ||
753 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
754 | # CONFIG_RTC_DRV_TEST is not set | ||
755 | |||
756 | # | ||
757 | # I2C RTC drivers | ||
758 | # | ||
759 | CONFIG_RTC_DRV_DS1307=y | ||
760 | # CONFIG_RTC_DRV_DS1374 is not set | ||
761 | # CONFIG_RTC_DRV_DS1672 is not set | ||
762 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
763 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
764 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
765 | # CONFIG_RTC_DRV_X1205 is not set | ||
766 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
767 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
768 | # CONFIG_RTC_DRV_M41T80 is not set | ||
769 | # CONFIG_RTC_DRV_S35390A is not set | ||
770 | |||
771 | # | ||
772 | # SPI RTC drivers | ||
773 | # | ||
774 | |||
775 | # | ||
776 | # Platform RTC drivers | ||
777 | # | ||
778 | # CONFIG_RTC_DRV_CMOS is not set | ||
779 | # CONFIG_RTC_DRV_DS1511 is not set | ||
780 | # CONFIG_RTC_DRV_DS1553 is not set | ||
781 | # CONFIG_RTC_DRV_DS1742 is not set | ||
782 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
783 | # CONFIG_RTC_DRV_M48T86 is not set | ||
784 | # CONFIG_RTC_DRV_M48T59 is not set | ||
785 | # CONFIG_RTC_DRV_V3020 is not set | ||
786 | |||
787 | # | ||
788 | # on-CPU RTC drivers | ||
789 | # | ||
790 | # CONFIG_DMADEVICES is not set | ||
791 | # CONFIG_UIO is not set | ||
792 | |||
793 | # | ||
794 | # File systems | ||
795 | # | ||
796 | CONFIG_EXT2_FS=y | ||
797 | # CONFIG_EXT2_FS_XATTR is not set | ||
798 | # CONFIG_EXT2_FS_XIP is not set | ||
799 | CONFIG_EXT3_FS=y | ||
800 | CONFIG_EXT3_FS_XATTR=y | ||
801 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
802 | # CONFIG_EXT3_FS_SECURITY is not set | ||
803 | # CONFIG_EXT4DEV_FS is not set | ||
804 | CONFIG_JBD=y | ||
805 | CONFIG_FS_MBCACHE=y | ||
806 | # CONFIG_REISERFS_FS is not set | ||
807 | # CONFIG_JFS_FS is not set | ||
808 | # CONFIG_FS_POSIX_ACL is not set | ||
809 | # CONFIG_XFS_FS is not set | ||
810 | # CONFIG_OCFS2_FS is not set | ||
811 | CONFIG_DNOTIFY=y | ||
812 | CONFIG_INOTIFY=y | ||
813 | CONFIG_INOTIFY_USER=y | ||
814 | # CONFIG_QUOTA is not set | ||
815 | # CONFIG_AUTOFS_FS is not set | ||
816 | # CONFIG_AUTOFS4_FS is not set | ||
817 | # CONFIG_FUSE_FS is not set | ||
818 | |||
819 | # | ||
820 | # CD-ROM/DVD Filesystems | ||
821 | # | ||
822 | # CONFIG_ISO9660_FS is not set | ||
823 | # CONFIG_UDF_FS is not set | ||
824 | |||
825 | # | ||
826 | # DOS/FAT/NT Filesystems | ||
827 | # | ||
828 | CONFIG_FAT_FS=y | ||
829 | CONFIG_MSDOS_FS=y | ||
830 | CONFIG_VFAT_FS=y | ||
831 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
832 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
833 | # CONFIG_NTFS_FS is not set | ||
834 | |||
835 | # | ||
836 | # Pseudo filesystems | ||
837 | # | ||
838 | CONFIG_PROC_FS=y | ||
839 | CONFIG_PROC_KCORE=y | ||
840 | CONFIG_PROC_SYSCTL=y | ||
841 | CONFIG_SYSFS=y | ||
842 | CONFIG_TMPFS=y | ||
843 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
844 | # CONFIG_HUGETLB_PAGE is not set | ||
845 | # CONFIG_CONFIGFS_FS is not set | ||
846 | |||
847 | # | ||
848 | # Miscellaneous filesystems | ||
849 | # | ||
850 | # CONFIG_ADFS_FS is not set | ||
851 | # CONFIG_AFFS_FS is not set | ||
852 | # CONFIG_HFS_FS is not set | ||
853 | # CONFIG_HFSPLUS_FS is not set | ||
854 | # CONFIG_BEFS_FS is not set | ||
855 | # CONFIG_BFS_FS is not set | ||
856 | # CONFIG_EFS_FS is not set | ||
857 | CONFIG_JFFS2_FS=y | ||
858 | CONFIG_JFFS2_FS_DEBUG=0 | ||
859 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
860 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
861 | # CONFIG_JFFS2_SUMMARY is not set | ||
862 | # CONFIG_JFFS2_FS_XATTR is not set | ||
863 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
864 | CONFIG_JFFS2_ZLIB=y | ||
865 | # CONFIG_JFFS2_LZO is not set | ||
866 | CONFIG_JFFS2_RTIME=y | ||
867 | # CONFIG_JFFS2_RUBIN is not set | ||
868 | CONFIG_CRAMFS=y | ||
869 | # CONFIG_VXFS_FS is not set | ||
870 | # CONFIG_MINIX_FS is not set | ||
871 | # CONFIG_HPFS_FS is not set | ||
872 | # CONFIG_QNX4FS_FS is not set | ||
873 | # CONFIG_ROMFS_FS is not set | ||
874 | # CONFIG_SYSV_FS is not set | ||
875 | # CONFIG_UFS_FS is not set | ||
876 | CONFIG_NETWORK_FILESYSTEMS=y | ||
877 | CONFIG_NFS_FS=y | ||
878 | CONFIG_NFS_V3=y | ||
879 | # CONFIG_NFS_V3_ACL is not set | ||
880 | CONFIG_NFS_V4=y | ||
881 | # CONFIG_NFSD is not set | ||
882 | CONFIG_ROOT_NFS=y | ||
883 | CONFIG_LOCKD=y | ||
884 | CONFIG_LOCKD_V4=y | ||
885 | CONFIG_NFS_COMMON=y | ||
886 | CONFIG_SUNRPC=y | ||
887 | CONFIG_SUNRPC_GSS=y | ||
888 | # CONFIG_SUNRPC_BIND34 is not set | ||
889 | CONFIG_RPCSEC_GSS_KRB5=y | ||
890 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
891 | # CONFIG_SMB_FS is not set | ||
892 | # CONFIG_CIFS is not set | ||
893 | # CONFIG_NCP_FS is not set | ||
894 | # CONFIG_CODA_FS is not set | ||
895 | # CONFIG_AFS_FS is not set | ||
896 | |||
897 | # | ||
898 | # Partition Types | ||
899 | # | ||
900 | CONFIG_PARTITION_ADVANCED=y | ||
901 | # CONFIG_ACORN_PARTITION is not set | ||
902 | # CONFIG_OSF_PARTITION is not set | ||
903 | # CONFIG_AMIGA_PARTITION is not set | ||
904 | # CONFIG_ATARI_PARTITION is not set | ||
905 | # CONFIG_MAC_PARTITION is not set | ||
906 | CONFIG_MSDOS_PARTITION=y | ||
907 | # CONFIG_BSD_DISKLABEL is not set | ||
908 | # CONFIG_MINIX_SUBPARTITION is not set | ||
909 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
910 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
911 | # CONFIG_LDM_PARTITION is not set | ||
912 | # CONFIG_SGI_PARTITION is not set | ||
913 | # CONFIG_ULTRIX_PARTITION is not set | ||
914 | # CONFIG_SUN_PARTITION is not set | ||
915 | # CONFIG_KARMA_PARTITION is not set | ||
916 | # CONFIG_EFI_PARTITION is not set | ||
917 | # CONFIG_SYSV68_PARTITION is not set | ||
918 | CONFIG_NLS=y | ||
919 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
920 | CONFIG_NLS_CODEPAGE_437=y | ||
921 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
922 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
923 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
924 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
925 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
926 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
927 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
928 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
929 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
930 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
931 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
932 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
933 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
934 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
935 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
936 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
937 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
938 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
939 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
940 | # CONFIG_NLS_ISO8859_8 is not set | ||
941 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
942 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
943 | # CONFIG_NLS_ASCII is not set | ||
944 | CONFIG_NLS_ISO8859_1=y | ||
945 | # CONFIG_NLS_ISO8859_2 is not set | ||
946 | # CONFIG_NLS_ISO8859_3 is not set | ||
947 | # CONFIG_NLS_ISO8859_4 is not set | ||
948 | # CONFIG_NLS_ISO8859_5 is not set | ||
949 | # CONFIG_NLS_ISO8859_6 is not set | ||
950 | # CONFIG_NLS_ISO8859_7 is not set | ||
951 | # CONFIG_NLS_ISO8859_9 is not set | ||
952 | # CONFIG_NLS_ISO8859_13 is not set | ||
953 | # CONFIG_NLS_ISO8859_14 is not set | ||
954 | # CONFIG_NLS_ISO8859_15 is not set | ||
955 | # CONFIG_NLS_KOI8_R is not set | ||
956 | # CONFIG_NLS_KOI8_U is not set | ||
957 | # CONFIG_NLS_UTF8 is not set | ||
958 | # CONFIG_DLM is not set | ||
959 | |||
960 | # | ||
961 | # Library routines | ||
962 | # | ||
963 | CONFIG_BITREVERSE=y | ||
964 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
965 | # CONFIG_CRC_CCITT is not set | ||
966 | # CONFIG_CRC16 is not set | ||
967 | # CONFIG_CRC_ITU_T is not set | ||
968 | CONFIG_CRC32=y | ||
969 | # CONFIG_CRC7 is not set | ||
970 | # CONFIG_LIBCRC32C is not set | ||
971 | CONFIG_ZLIB_INFLATE=y | ||
972 | CONFIG_ZLIB_DEFLATE=y | ||
973 | CONFIG_PLIST=y | ||
974 | CONFIG_HAS_IOMEM=y | ||
975 | CONFIG_HAS_IOPORT=y | ||
976 | CONFIG_HAS_DMA=y | ||
977 | CONFIG_HAVE_LMB=y | ||
978 | |||
979 | # | ||
980 | # Kernel hacking | ||
981 | # | ||
982 | CONFIG_PRINTK_TIME=y | ||
983 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
984 | CONFIG_ENABLE_MUST_CHECK=y | ||
985 | CONFIG_FRAME_WARN=1024 | ||
986 | # CONFIG_MAGIC_SYSRQ is not set | ||
987 | # CONFIG_UNUSED_SYMBOLS is not set | ||
988 | # CONFIG_DEBUG_FS is not set | ||
989 | # CONFIG_HEADERS_CHECK is not set | ||
990 | CONFIG_DEBUG_KERNEL=y | ||
991 | # CONFIG_DEBUG_SHIRQ is not set | ||
992 | CONFIG_DETECT_SOFTLOCKUP=y | ||
993 | CONFIG_SCHED_DEBUG=y | ||
994 | # CONFIG_SCHEDSTATS is not set | ||
995 | # CONFIG_TIMER_STATS is not set | ||
996 | # CONFIG_SLUB_DEBUG_ON is not set | ||
997 | # CONFIG_SLUB_STATS is not set | ||
998 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
999 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1000 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1001 | # CONFIG_DEBUG_MUTEXES is not set | ||
1002 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1003 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1004 | # CONFIG_DEBUG_KOBJECT is not set | ||
1005 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1006 | CONFIG_DEBUG_INFO=y | ||
1007 | # CONFIG_DEBUG_VM is not set | ||
1008 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1009 | # CONFIG_DEBUG_LIST is not set | ||
1010 | # CONFIG_DEBUG_SG is not set | ||
1011 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1012 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1013 | # CONFIG_FAULT_INJECTION is not set | ||
1014 | # CONFIG_SAMPLES is not set | ||
1015 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1016 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1017 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
1018 | # CONFIG_DEBUGGER is not set | ||
1019 | # CONFIG_IRQSTACKS is not set | ||
1020 | # CONFIG_BDI_SWITCH is not set | ||
1021 | # CONFIG_BOOTX_TEXT is not set | ||
1022 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1023 | |||
1024 | # | ||
1025 | # Security options | ||
1026 | # | ||
1027 | # CONFIG_KEYS is not set | ||
1028 | # CONFIG_SECURITY is not set | ||
1029 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1030 | CONFIG_CRYPTO=y | ||
1031 | |||
1032 | # | ||
1033 | # Crypto core or helper | ||
1034 | # | ||
1035 | CONFIG_CRYPTO_ALGAPI=y | ||
1036 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1037 | CONFIG_CRYPTO_MANAGER=y | ||
1038 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1039 | # CONFIG_CRYPTO_NULL is not set | ||
1040 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1041 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1042 | |||
1043 | # | ||
1044 | # Authenticated Encryption with Associated Data | ||
1045 | # | ||
1046 | # CONFIG_CRYPTO_CCM is not set | ||
1047 | # CONFIG_CRYPTO_GCM is not set | ||
1048 | # CONFIG_CRYPTO_SEQIV is not set | ||
1049 | |||
1050 | # | ||
1051 | # Block modes | ||
1052 | # | ||
1053 | CONFIG_CRYPTO_CBC=y | ||
1054 | # CONFIG_CRYPTO_CTR is not set | ||
1055 | # CONFIG_CRYPTO_CTS is not set | ||
1056 | CONFIG_CRYPTO_ECB=y | ||
1057 | # CONFIG_CRYPTO_LRW is not set | ||
1058 | CONFIG_CRYPTO_PCBC=y | ||
1059 | # CONFIG_CRYPTO_XTS is not set | ||
1060 | |||
1061 | # | ||
1062 | # Hash modes | ||
1063 | # | ||
1064 | # CONFIG_CRYPTO_HMAC is not set | ||
1065 | # CONFIG_CRYPTO_XCBC is not set | ||
1066 | |||
1067 | # | ||
1068 | # Digest | ||
1069 | # | ||
1070 | # CONFIG_CRYPTO_CRC32C is not set | ||
1071 | # CONFIG_CRYPTO_MD4 is not set | ||
1072 | CONFIG_CRYPTO_MD5=y | ||
1073 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1074 | # CONFIG_CRYPTO_SHA1 is not set | ||
1075 | # CONFIG_CRYPTO_SHA256 is not set | ||
1076 | # CONFIG_CRYPTO_SHA512 is not set | ||
1077 | # CONFIG_CRYPTO_TGR192 is not set | ||
1078 | # CONFIG_CRYPTO_WP512 is not set | ||
1079 | |||
1080 | # | ||
1081 | # Ciphers | ||
1082 | # | ||
1083 | # CONFIG_CRYPTO_AES is not set | ||
1084 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1085 | # CONFIG_CRYPTO_ARC4 is not set | ||
1086 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1087 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1088 | # CONFIG_CRYPTO_CAST5 is not set | ||
1089 | # CONFIG_CRYPTO_CAST6 is not set | ||
1090 | CONFIG_CRYPTO_DES=y | ||
1091 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1092 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1093 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1094 | # CONFIG_CRYPTO_SEED is not set | ||
1095 | # CONFIG_CRYPTO_SERPENT is not set | ||
1096 | # CONFIG_CRYPTO_TEA is not set | ||
1097 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1098 | |||
1099 | # | ||
1100 | # Compression | ||
1101 | # | ||
1102 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1103 | # CONFIG_CRYPTO_LZO is not set | ||
1104 | CONFIG_CRYPTO_HW=y | ||
1105 | CONFIG_PPC_CLOCK=y | ||
1106 | CONFIG_PPC_LIB_RHEAP=y | ||
1107 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig new file mode 100644 index 000000000000..9c0caa488b2e --- /dev/null +++ b/arch/powerpc/configs/52xx/pcm030_defconfig | |||
@@ -0,0 +1,1115 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.25 | ||
4 | # Tue Apr 29 07:13:19 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | CONFIG_6xx=y | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | # CONFIG_ALTIVEC is not set | ||
19 | CONFIG_PPC_STD_MMU=y | ||
20 | CONFIG_PPC_STD_MMU_32=y | ||
21 | # CONFIG_PPC_MM_SLICES is not set | ||
22 | # CONFIG_SMP is not set | ||
23 | CONFIG_PPC32=y | ||
24 | CONFIG_WORD_SIZE=32 | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
28 | CONFIG_GENERIC_TIME=y | ||
29 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
30 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
31 | CONFIG_GENERIC_HARDIRQS=y | ||
32 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
33 | CONFIG_IRQ_PER_CPU=y | ||
34 | CONFIG_STACKTRACE_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
37 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
38 | CONFIG_GENERIC_HWEIGHT=y | ||
39 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
40 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
41 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
42 | CONFIG_PPC=y | ||
43 | CONFIG_EARLY_PRINTK=y | ||
44 | CONFIG_GENERIC_NVRAM=y | ||
45 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
46 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
47 | CONFIG_PPC_OF=y | ||
48 | CONFIG_OF=y | ||
49 | # CONFIG_PPC_UDBG_16550 is not set | ||
50 | # CONFIG_GENERIC_TBSYNC is not set | ||
51 | CONFIG_AUDIT_ARCH=y | ||
52 | CONFIG_GENERIC_BUG=y | ||
53 | CONFIG_DEFAULT_UIMAGE=y | ||
54 | # CONFIG_PPC_DCR_NATIVE is not set | ||
55 | # CONFIG_PPC_DCR_MMIO is not set | ||
56 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
57 | |||
58 | # | ||
59 | # General setup | ||
60 | # | ||
61 | CONFIG_EXPERIMENTAL=y | ||
62 | CONFIG_BROKEN_ON_SMP=y | ||
63 | CONFIG_LOCK_KERNEL=y | ||
64 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
65 | CONFIG_LOCALVERSION="trunk" | ||
66 | # CONFIG_LOCALVERSION_AUTO is not set | ||
67 | # CONFIG_SWAP is not set | ||
68 | CONFIG_SYSVIPC=y | ||
69 | CONFIG_SYSVIPC_SYSCTL=y | ||
70 | CONFIG_POSIX_MQUEUE=y | ||
71 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
72 | # CONFIG_TASKSTATS is not set | ||
73 | # CONFIG_AUDIT is not set | ||
74 | CONFIG_IKCONFIG=y | ||
75 | CONFIG_IKCONFIG_PROC=y | ||
76 | CONFIG_LOG_BUF_SHIFT=14 | ||
77 | # CONFIG_CGROUPS is not set | ||
78 | CONFIG_GROUP_SCHED=y | ||
79 | CONFIG_FAIR_GROUP_SCHED=y | ||
80 | # CONFIG_RT_GROUP_SCHED is not set | ||
81 | CONFIG_USER_SCHED=y | ||
82 | # CONFIG_CGROUP_SCHED is not set | ||
83 | CONFIG_SYSFS_DEPRECATED=y | ||
84 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
85 | # CONFIG_RELAY is not set | ||
86 | # CONFIG_NAMESPACES is not set | ||
87 | # CONFIG_BLK_DEV_INITRD is not set | ||
88 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
89 | CONFIG_SYSCTL=y | ||
90 | CONFIG_EMBEDDED=y | ||
91 | # CONFIG_SYSCTL_SYSCALL is not set | ||
92 | CONFIG_KALLSYMS=y | ||
93 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
94 | CONFIG_HOTPLUG=y | ||
95 | CONFIG_PRINTK=y | ||
96 | CONFIG_BUG=y | ||
97 | CONFIG_ELF_CORE=y | ||
98 | CONFIG_COMPAT_BRK=y | ||
99 | CONFIG_BASE_FULL=y | ||
100 | CONFIG_FUTEX=y | ||
101 | CONFIG_ANON_INODES=y | ||
102 | CONFIG_EPOLL=y | ||
103 | CONFIG_SIGNALFD=y | ||
104 | CONFIG_TIMERFD=y | ||
105 | CONFIG_EVENTFD=y | ||
106 | CONFIG_SHMEM=y | ||
107 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
108 | CONFIG_SLAB=y | ||
109 | # CONFIG_SLUB is not set | ||
110 | # CONFIG_SLOB is not set | ||
111 | # CONFIG_PROFILING is not set | ||
112 | # CONFIG_MARKERS is not set | ||
113 | CONFIG_HAVE_OPROFILE=y | ||
114 | # CONFIG_KPROBES is not set | ||
115 | CONFIG_HAVE_KPROBES=y | ||
116 | CONFIG_HAVE_KRETPROBES=y | ||
117 | CONFIG_PROC_PAGE_MONITOR=y | ||
118 | CONFIG_SLABINFO=y | ||
119 | CONFIG_RT_MUTEXES=y | ||
120 | # CONFIG_TINY_SHMEM is not set | ||
121 | CONFIG_BASE_SMALL=0 | ||
122 | CONFIG_MODULES=y | ||
123 | CONFIG_MODULE_UNLOAD=y | ||
124 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
125 | # CONFIG_MODVERSIONS is not set | ||
126 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
127 | # CONFIG_KMOD is not set | ||
128 | CONFIG_BLOCK=y | ||
129 | # CONFIG_LBD is not set | ||
130 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
131 | # CONFIG_LSF is not set | ||
132 | # CONFIG_BLK_DEV_BSG is not set | ||
133 | |||
134 | # | ||
135 | # IO Schedulers | ||
136 | # | ||
137 | CONFIG_IOSCHED_NOOP=y | ||
138 | # CONFIG_IOSCHED_AS is not set | ||
139 | # CONFIG_IOSCHED_DEADLINE is not set | ||
140 | # CONFIG_IOSCHED_CFQ is not set | ||
141 | # CONFIG_DEFAULT_AS is not set | ||
142 | # CONFIG_DEFAULT_DEADLINE is not set | ||
143 | # CONFIG_DEFAULT_CFQ is not set | ||
144 | CONFIG_DEFAULT_NOOP=y | ||
145 | CONFIG_DEFAULT_IOSCHED="noop" | ||
146 | CONFIG_CLASSIC_RCU=y | ||
147 | |||
148 | # | ||
149 | # Platform support | ||
150 | # | ||
151 | CONFIG_PPC_MULTIPLATFORM=y | ||
152 | # CONFIG_PPC_82xx is not set | ||
153 | # CONFIG_PPC_83xx is not set | ||
154 | # CONFIG_PPC_86xx is not set | ||
155 | CONFIG_CLASSIC32=y | ||
156 | # CONFIG_PPC_CHRP is not set | ||
157 | # CONFIG_PPC_MPC512x is not set | ||
158 | # CONFIG_PPC_MPC5121 is not set | ||
159 | # CONFIG_MPC5121_ADS is not set | ||
160 | CONFIG_PPC_MPC52xx=y | ||
161 | CONFIG_PPC_MPC5200_SIMPLE=y | ||
162 | # CONFIG_PPC_EFIKA is not set | ||
163 | # CONFIG_PPC_LITE5200 is not set | ||
164 | # CONFIG_PPC_MPC5200_BUGFIX is not set | ||
165 | # CONFIG_PPC_MPC5200_GPIO is not set | ||
166 | # CONFIG_PPC_PMAC is not set | ||
167 | # CONFIG_PPC_CELL is not set | ||
168 | # CONFIG_PPC_CELL_NATIVE is not set | ||
169 | # CONFIG_PQ2ADS is not set | ||
170 | # CONFIG_EMBEDDED6xx is not set | ||
171 | # CONFIG_IPIC is not set | ||
172 | # CONFIG_MPIC is not set | ||
173 | # CONFIG_MPIC_WEIRD is not set | ||
174 | # CONFIG_PPC_I8259 is not set | ||
175 | # CONFIG_PPC_RTAS is not set | ||
176 | # CONFIG_MMIO_NVRAM is not set | ||
177 | # CONFIG_PPC_MPC106 is not set | ||
178 | # CONFIG_PPC_970_NAP is not set | ||
179 | # CONFIG_PPC_INDIRECT_IO is not set | ||
180 | # CONFIG_GENERIC_IOMAP is not set | ||
181 | # CONFIG_CPU_FREQ is not set | ||
182 | # CONFIG_TAU is not set | ||
183 | # CONFIG_FSL_ULI1575 is not set | ||
184 | CONFIG_PPC_BESTCOMM=y | ||
185 | CONFIG_PPC_BESTCOMM_ATA=y | ||
186 | CONFIG_PPC_BESTCOMM_FEC=y | ||
187 | CONFIG_PPC_BESTCOMM_GEN_BD=y | ||
188 | |||
189 | # | ||
190 | # Kernel options | ||
191 | # | ||
192 | # CONFIG_HIGHMEM is not set | ||
193 | CONFIG_TICK_ONESHOT=y | ||
194 | CONFIG_NO_HZ=y | ||
195 | CONFIG_HIGH_RES_TIMERS=y | ||
196 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
197 | CONFIG_HZ_100=y | ||
198 | # CONFIG_HZ_250 is not set | ||
199 | # CONFIG_HZ_300 is not set | ||
200 | # CONFIG_HZ_1000 is not set | ||
201 | CONFIG_HZ=100 | ||
202 | # CONFIG_SCHED_HRTICK is not set | ||
203 | # CONFIG_PREEMPT_NONE is not set | ||
204 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
205 | CONFIG_PREEMPT=y | ||
206 | # CONFIG_PREEMPT_RCU is not set | ||
207 | CONFIG_BINFMT_ELF=y | ||
208 | # CONFIG_BINFMT_MISC is not set | ||
209 | # CONFIG_IOMMU_HELPER is not set | ||
210 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
211 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
212 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
213 | # CONFIG_KEXEC is not set | ||
214 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
215 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
216 | CONFIG_SELECT_MEMORY_MODEL=y | ||
217 | CONFIG_FLATMEM_MANUAL=y | ||
218 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
219 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
220 | CONFIG_FLATMEM=y | ||
221 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
222 | # CONFIG_SPARSEMEM_STATIC is not set | ||
223 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
224 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
225 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
226 | # CONFIG_RESOURCES_64BIT is not set | ||
227 | CONFIG_ZONE_DMA_FLAG=1 | ||
228 | CONFIG_BOUNCE=y | ||
229 | CONFIG_VIRT_TO_BUS=y | ||
230 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
231 | CONFIG_PROC_DEVICETREE=y | ||
232 | # CONFIG_CMDLINE_BOOL is not set | ||
233 | # CONFIG_PM is not set | ||
234 | # CONFIG_SECCOMP is not set | ||
235 | CONFIG_ISA_DMA_API=y | ||
236 | |||
237 | # | ||
238 | # Bus options | ||
239 | # | ||
240 | CONFIG_ZONE_DMA=y | ||
241 | CONFIG_GENERIC_ISA_DMA=y | ||
242 | # CONFIG_PPC_INDIRECT_PCI is not set | ||
243 | CONFIG_FSL_SOC=y | ||
244 | CONFIG_PCI=y | ||
245 | CONFIG_PCI_DOMAINS=y | ||
246 | CONFIG_PCI_SYSCALL=y | ||
247 | # CONFIG_PCIEPORTBUS is not set | ||
248 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
249 | # CONFIG_PCI_MSI is not set | ||
250 | CONFIG_PCI_LEGACY=y | ||
251 | # CONFIG_PCCARD is not set | ||
252 | # CONFIG_HOTPLUG_PCI is not set | ||
253 | # CONFIG_HAS_RAPIDIO is not set | ||
254 | |||
255 | # | ||
256 | # Advanced setup | ||
257 | # | ||
258 | # CONFIG_ADVANCED_OPTIONS is not set | ||
259 | |||
260 | # | ||
261 | # Default settings for advanced configuration options are used | ||
262 | # | ||
263 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
264 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
265 | CONFIG_KERNEL_START=0xc0000000 | ||
266 | CONFIG_PHYSICAL_START=0x00000000 | ||
267 | CONFIG_TASK_SIZE=0xc0000000 | ||
268 | |||
269 | # | ||
270 | # Networking | ||
271 | # | ||
272 | CONFIG_NET=y | ||
273 | |||
274 | # | ||
275 | # Networking options | ||
276 | # | ||
277 | CONFIG_PACKET=y | ||
278 | # CONFIG_PACKET_MMAP is not set | ||
279 | CONFIG_UNIX=y | ||
280 | # CONFIG_NET_KEY is not set | ||
281 | CONFIG_INET=y | ||
282 | CONFIG_IP_MULTICAST=y | ||
283 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
284 | CONFIG_IP_FIB_HASH=y | ||
285 | CONFIG_IP_PNP=y | ||
286 | CONFIG_IP_PNP_DHCP=y | ||
287 | CONFIG_IP_PNP_BOOTP=y | ||
288 | # CONFIG_IP_PNP_RARP is not set | ||
289 | # CONFIG_NET_IPIP is not set | ||
290 | # CONFIG_NET_IPGRE is not set | ||
291 | # CONFIG_IP_MROUTE is not set | ||
292 | # CONFIG_ARPD is not set | ||
293 | # CONFIG_SYN_COOKIES is not set | ||
294 | # CONFIG_INET_AH is not set | ||
295 | # CONFIG_INET_ESP is not set | ||
296 | # CONFIG_INET_IPCOMP is not set | ||
297 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
298 | # CONFIG_INET_TUNNEL is not set | ||
299 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
300 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
301 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
302 | # CONFIG_INET_LRO is not set | ||
303 | # CONFIG_INET_DIAG is not set | ||
304 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
305 | CONFIG_TCP_CONG_CUBIC=y | ||
306 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
307 | # CONFIG_TCP_MD5SIG is not set | ||
308 | # CONFIG_IPV6 is not set | ||
309 | # CONFIG_NETWORK_SECMARK is not set | ||
310 | # CONFIG_NETFILTER is not set | ||
311 | # CONFIG_IP_DCCP is not set | ||
312 | # CONFIG_IP_SCTP is not set | ||
313 | # CONFIG_TIPC is not set | ||
314 | # CONFIG_ATM is not set | ||
315 | # CONFIG_BRIDGE is not set | ||
316 | # CONFIG_VLAN_8021Q is not set | ||
317 | # CONFIG_DECNET is not set | ||
318 | # CONFIG_LLC2 is not set | ||
319 | # CONFIG_IPX is not set | ||
320 | # CONFIG_ATALK is not set | ||
321 | # CONFIG_X25 is not set | ||
322 | # CONFIG_LAPB is not set | ||
323 | # CONFIG_ECONET is not set | ||
324 | # CONFIG_WAN_ROUTER is not set | ||
325 | # CONFIG_NET_SCHED is not set | ||
326 | |||
327 | # | ||
328 | # Network testing | ||
329 | # | ||
330 | # CONFIG_NET_PKTGEN is not set | ||
331 | # CONFIG_HAMRADIO is not set | ||
332 | # CONFIG_CAN is not set | ||
333 | # CONFIG_IRDA is not set | ||
334 | # CONFIG_BT is not set | ||
335 | # CONFIG_AF_RXRPC is not set | ||
336 | |||
337 | # | ||
338 | # Wireless | ||
339 | # | ||
340 | # CONFIG_CFG80211 is not set | ||
341 | # CONFIG_WIRELESS_EXT is not set | ||
342 | # CONFIG_MAC80211 is not set | ||
343 | # CONFIG_IEEE80211 is not set | ||
344 | # CONFIG_RFKILL is not set | ||
345 | # CONFIG_NET_9P is not set | ||
346 | |||
347 | # | ||
348 | # Device Drivers | ||
349 | # | ||
350 | |||
351 | # | ||
352 | # Generic Driver Options | ||
353 | # | ||
354 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
355 | CONFIG_STANDALONE=y | ||
356 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
357 | # CONFIG_FW_LOADER is not set | ||
358 | # CONFIG_SYS_HYPERVISOR is not set | ||
359 | # CONFIG_CONNECTOR is not set | ||
360 | CONFIG_MTD=y | ||
361 | # CONFIG_MTD_DEBUG is not set | ||
362 | # CONFIG_MTD_CONCAT is not set | ||
363 | CONFIG_MTD_PARTITIONS=y | ||
364 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
365 | CONFIG_MTD_CMDLINE_PARTS=y | ||
366 | # CONFIG_MTD_OF_PARTS is not set | ||
367 | # CONFIG_MTD_AR7_PARTS is not set | ||
368 | |||
369 | # | ||
370 | # User Modules And Translation Layers | ||
371 | # | ||
372 | CONFIG_MTD_CHAR=y | ||
373 | CONFIG_MTD_BLKDEVS=y | ||
374 | CONFIG_MTD_BLOCK=y | ||
375 | # CONFIG_FTL is not set | ||
376 | # CONFIG_NFTL is not set | ||
377 | # CONFIG_INFTL is not set | ||
378 | # CONFIG_RFD_FTL is not set | ||
379 | # CONFIG_SSFDC is not set | ||
380 | # CONFIG_MTD_OOPS is not set | ||
381 | |||
382 | # | ||
383 | # RAM/ROM/Flash chip drivers | ||
384 | # | ||
385 | CONFIG_MTD_CFI=y | ||
386 | # CONFIG_MTD_JEDECPROBE is not set | ||
387 | CONFIG_MTD_GEN_PROBE=y | ||
388 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
389 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
390 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
391 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
392 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
393 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
394 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
395 | CONFIG_MTD_CFI_I1=y | ||
396 | CONFIG_MTD_CFI_I2=y | ||
397 | # CONFIG_MTD_CFI_I4 is not set | ||
398 | # CONFIG_MTD_CFI_I8 is not set | ||
399 | CONFIG_MTD_CFI_INTELEXT=y | ||
400 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
401 | # CONFIG_MTD_CFI_STAA is not set | ||
402 | CONFIG_MTD_CFI_UTIL=y | ||
403 | # CONFIG_MTD_RAM is not set | ||
404 | # CONFIG_MTD_ROM is not set | ||
405 | # CONFIG_MTD_ABSENT is not set | ||
406 | |||
407 | # | ||
408 | # Mapping drivers for chip access | ||
409 | # | ||
410 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
411 | CONFIG_MTD_PHYSMAP=y | ||
412 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
413 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
414 | CONFIG_MTD_PHYSMAP_BANKWIDTH=1 | ||
415 | # CONFIG_MTD_PHYSMAP_OF is not set | ||
416 | # CONFIG_MTD_INTEL_VR_NOR is not set | ||
417 | # CONFIG_MTD_PLATRAM is not set | ||
418 | |||
419 | # | ||
420 | # Self-contained MTD device drivers | ||
421 | # | ||
422 | # CONFIG_MTD_PMC551 is not set | ||
423 | # CONFIG_MTD_SLRAM is not set | ||
424 | # CONFIG_MTD_PHRAM is not set | ||
425 | # CONFIG_MTD_MTDRAM is not set | ||
426 | # CONFIG_MTD_BLOCK2MTD is not set | ||
427 | |||
428 | # | ||
429 | # Disk-On-Chip Device Drivers | ||
430 | # | ||
431 | # CONFIG_MTD_DOC2000 is not set | ||
432 | # CONFIG_MTD_DOC2001 is not set | ||
433 | # CONFIG_MTD_DOC2001PLUS is not set | ||
434 | # CONFIG_MTD_NAND is not set | ||
435 | # CONFIG_MTD_ONENAND is not set | ||
436 | |||
437 | # | ||
438 | # UBI - Unsorted block images | ||
439 | # | ||
440 | # CONFIG_MTD_UBI is not set | ||
441 | CONFIG_OF_DEVICE=y | ||
442 | CONFIG_OF_I2C=y | ||
443 | # CONFIG_PARPORT is not set | ||
444 | # CONFIG_BLK_DEV is not set | ||
445 | # CONFIG_MISC_DEVICES is not set | ||
446 | CONFIG_HAVE_IDE=y | ||
447 | # CONFIG_IDE is not set | ||
448 | |||
449 | # | ||
450 | # SCSI device support | ||
451 | # | ||
452 | # CONFIG_RAID_ATTRS is not set | ||
453 | CONFIG_SCSI=m | ||
454 | CONFIG_SCSI_DMA=y | ||
455 | # CONFIG_SCSI_TGT is not set | ||
456 | # CONFIG_SCSI_NETLINK is not set | ||
457 | # CONFIG_SCSI_PROC_FS is not set | ||
458 | |||
459 | # | ||
460 | # SCSI support type (disk, tape, CD-ROM) | ||
461 | # | ||
462 | CONFIG_BLK_DEV_SD=m | ||
463 | # CONFIG_CHR_DEV_ST is not set | ||
464 | # CONFIG_CHR_DEV_OSST is not set | ||
465 | # CONFIG_BLK_DEV_SR is not set | ||
466 | # CONFIG_CHR_DEV_SG is not set | ||
467 | # CONFIG_CHR_DEV_SCH is not set | ||
468 | |||
469 | # | ||
470 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
471 | # | ||
472 | # CONFIG_SCSI_MULTI_LUN is not set | ||
473 | # CONFIG_SCSI_CONSTANTS is not set | ||
474 | # CONFIG_SCSI_LOGGING is not set | ||
475 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
476 | CONFIG_SCSI_WAIT_SCAN=m | ||
477 | |||
478 | # | ||
479 | # SCSI Transports | ||
480 | # | ||
481 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
482 | # CONFIG_SCSI_FC_ATTRS is not set | ||
483 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
484 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
485 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
486 | # CONFIG_SCSI_LOWLEVEL is not set | ||
487 | CONFIG_ATA=m | ||
488 | # CONFIG_ATA_NONSTANDARD is not set | ||
489 | CONFIG_SATA_PMP=y | ||
490 | # CONFIG_SATA_AHCI is not set | ||
491 | # CONFIG_SATA_SIL24 is not set | ||
492 | # CONFIG_SATA_FSL is not set | ||
493 | CONFIG_ATA_SFF=y | ||
494 | # CONFIG_SATA_SVW is not set | ||
495 | # CONFIG_ATA_PIIX is not set | ||
496 | # CONFIG_SATA_MV is not set | ||
497 | # CONFIG_SATA_NV is not set | ||
498 | # CONFIG_PDC_ADMA is not set | ||
499 | # CONFIG_SATA_QSTOR is not set | ||
500 | # CONFIG_SATA_PROMISE is not set | ||
501 | # CONFIG_SATA_SX4 is not set | ||
502 | # CONFIG_SATA_SIL is not set | ||
503 | # CONFIG_SATA_SIS is not set | ||
504 | # CONFIG_SATA_ULI is not set | ||
505 | # CONFIG_SATA_VIA is not set | ||
506 | # CONFIG_SATA_VITESSE is not set | ||
507 | # CONFIG_SATA_INIC162X is not set | ||
508 | # CONFIG_PATA_ALI is not set | ||
509 | # CONFIG_PATA_AMD is not set | ||
510 | # CONFIG_PATA_ARTOP is not set | ||
511 | # CONFIG_PATA_ATIIXP is not set | ||
512 | # CONFIG_PATA_CMD640_PCI is not set | ||
513 | # CONFIG_PATA_CMD64X is not set | ||
514 | # CONFIG_PATA_CS5520 is not set | ||
515 | # CONFIG_PATA_CS5530 is not set | ||
516 | # CONFIG_PATA_CYPRESS is not set | ||
517 | # CONFIG_PATA_EFAR is not set | ||
518 | # CONFIG_ATA_GENERIC is not set | ||
519 | # CONFIG_PATA_HPT366 is not set | ||
520 | # CONFIG_PATA_HPT37X is not set | ||
521 | # CONFIG_PATA_HPT3X2N is not set | ||
522 | # CONFIG_PATA_HPT3X3 is not set | ||
523 | # CONFIG_PATA_IT821X is not set | ||
524 | # CONFIG_PATA_IT8213 is not set | ||
525 | # CONFIG_PATA_JMICRON is not set | ||
526 | # CONFIG_PATA_TRIFLEX is not set | ||
527 | # CONFIG_PATA_MARVELL is not set | ||
528 | CONFIG_PATA_MPC52xx=m | ||
529 | # CONFIG_PATA_MPIIX is not set | ||
530 | # CONFIG_PATA_OLDPIIX is not set | ||
531 | # CONFIG_PATA_NETCELL is not set | ||
532 | # CONFIG_PATA_NINJA32 is not set | ||
533 | # CONFIG_PATA_NS87410 is not set | ||
534 | # CONFIG_PATA_NS87415 is not set | ||
535 | # CONFIG_PATA_OPTI is not set | ||
536 | # CONFIG_PATA_OPTIDMA is not set | ||
537 | # CONFIG_PATA_PDC_OLD is not set | ||
538 | # CONFIG_PATA_RADISYS is not set | ||
539 | # CONFIG_PATA_RZ1000 is not set | ||
540 | # CONFIG_PATA_SC1200 is not set | ||
541 | # CONFIG_PATA_SERVERWORKS is not set | ||
542 | # CONFIG_PATA_PDC2027X is not set | ||
543 | # CONFIG_PATA_SIL680 is not set | ||
544 | # CONFIG_PATA_SIS is not set | ||
545 | # CONFIG_PATA_VIA is not set | ||
546 | # CONFIG_PATA_WINBOND is not set | ||
547 | # CONFIG_PATA_PLATFORM is not set | ||
548 | # CONFIG_MD is not set | ||
549 | # CONFIG_FUSION is not set | ||
550 | |||
551 | # | ||
552 | # IEEE 1394 (FireWire) support | ||
553 | # | ||
554 | # CONFIG_FIREWIRE is not set | ||
555 | # CONFIG_IEEE1394 is not set | ||
556 | # CONFIG_I2O is not set | ||
557 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
558 | CONFIG_NETDEVICES=y | ||
559 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
560 | # CONFIG_DUMMY is not set | ||
561 | # CONFIG_BONDING is not set | ||
562 | # CONFIG_MACVLAN is not set | ||
563 | # CONFIG_EQUALIZER is not set | ||
564 | # CONFIG_TUN is not set | ||
565 | # CONFIG_VETH is not set | ||
566 | # CONFIG_ARCNET is not set | ||
567 | CONFIG_PHYLIB=y | ||
568 | |||
569 | # | ||
570 | # MII PHY device drivers | ||
571 | # | ||
572 | # CONFIG_MARVELL_PHY is not set | ||
573 | # CONFIG_DAVICOM_PHY is not set | ||
574 | # CONFIG_QSEMI_PHY is not set | ||
575 | # CONFIG_LXT_PHY is not set | ||
576 | # CONFIG_CICADA_PHY is not set | ||
577 | # CONFIG_VITESSE_PHY is not set | ||
578 | # CONFIG_SMSC_PHY is not set | ||
579 | # CONFIG_BROADCOM_PHY is not set | ||
580 | # CONFIG_ICPLUS_PHY is not set | ||
581 | # CONFIG_REALTEK_PHY is not set | ||
582 | # CONFIG_FIXED_PHY is not set | ||
583 | # CONFIG_MDIO_BITBANG is not set | ||
584 | CONFIG_NET_ETHERNET=y | ||
585 | CONFIG_MII=y | ||
586 | # CONFIG_HAPPYMEAL is not set | ||
587 | # CONFIG_SUNGEM is not set | ||
588 | # CONFIG_CASSINI is not set | ||
589 | # CONFIG_NET_VENDOR_3COM is not set | ||
590 | # CONFIG_NET_TULIP is not set | ||
591 | # CONFIG_HP100 is not set | ||
592 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
593 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
594 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
595 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
596 | # CONFIG_NET_PCI is not set | ||
597 | # CONFIG_B44 is not set | ||
598 | CONFIG_FEC_MPC52xx=y | ||
599 | CONFIG_FEC_MPC52xx_MDIO=y | ||
600 | # CONFIG_NETDEV_1000 is not set | ||
601 | # CONFIG_NETDEV_10000 is not set | ||
602 | # CONFIG_TR is not set | ||
603 | |||
604 | # | ||
605 | # Wireless LAN | ||
606 | # | ||
607 | # CONFIG_WLAN_PRE80211 is not set | ||
608 | # CONFIG_WLAN_80211 is not set | ||
609 | # CONFIG_IWLWIFI is not set | ||
610 | # CONFIG_IWLWIFI_LEDS is not set | ||
611 | |||
612 | # | ||
613 | # USB Network Adapters | ||
614 | # | ||
615 | # CONFIG_USB_CATC is not set | ||
616 | # CONFIG_USB_KAWETH is not set | ||
617 | # CONFIG_USB_PEGASUS is not set | ||
618 | # CONFIG_USB_RTL8150 is not set | ||
619 | # CONFIG_USB_USBNET is not set | ||
620 | # CONFIG_WAN is not set | ||
621 | # CONFIG_FDDI is not set | ||
622 | # CONFIG_HIPPI is not set | ||
623 | # CONFIG_PPP is not set | ||
624 | # CONFIG_SLIP is not set | ||
625 | # CONFIG_NET_FC is not set | ||
626 | # CONFIG_NETCONSOLE is not set | ||
627 | # CONFIG_NETPOLL is not set | ||
628 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
629 | # CONFIG_ISDN is not set | ||
630 | # CONFIG_PHONE is not set | ||
631 | |||
632 | # | ||
633 | # Input device support | ||
634 | # | ||
635 | # CONFIG_INPUT is not set | ||
636 | |||
637 | # | ||
638 | # Hardware I/O ports | ||
639 | # | ||
640 | # CONFIG_SERIO is not set | ||
641 | # CONFIG_GAMEPORT is not set | ||
642 | |||
643 | # | ||
644 | # Character devices | ||
645 | # | ||
646 | # CONFIG_VT is not set | ||
647 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
648 | # CONFIG_NOZOMI is not set | ||
649 | |||
650 | # | ||
651 | # Serial drivers | ||
652 | # | ||
653 | # CONFIG_SERIAL_8250 is not set | ||
654 | |||
655 | # | ||
656 | # Non-8250 serial port support | ||
657 | # | ||
658 | # CONFIG_SERIAL_UARTLITE is not set | ||
659 | CONFIG_SERIAL_CORE=y | ||
660 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
661 | CONFIG_SERIAL_MPC52xx=y | ||
662 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | ||
663 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600 | ||
664 | # CONFIG_SERIAL_JSM is not set | ||
665 | CONFIG_UNIX98_PTYS=y | ||
666 | # CONFIG_LEGACY_PTYS is not set | ||
667 | # CONFIG_IPMI_HANDLER is not set | ||
668 | CONFIG_HW_RANDOM=y | ||
669 | # CONFIG_NVRAM is not set | ||
670 | # CONFIG_R3964 is not set | ||
671 | # CONFIG_APPLICOM is not set | ||
672 | # CONFIG_RAW_DRIVER is not set | ||
673 | # CONFIG_TCG_TPM is not set | ||
674 | CONFIG_DEVPORT=y | ||
675 | CONFIG_I2C=y | ||
676 | CONFIG_I2C_BOARDINFO=y | ||
677 | CONFIG_I2C_CHARDEV=y | ||
678 | |||
679 | # | ||
680 | # I2C Hardware Bus support | ||
681 | # | ||
682 | # CONFIG_I2C_ALI1535 is not set | ||
683 | # CONFIG_I2C_ALI1563 is not set | ||
684 | # CONFIG_I2C_ALI15X3 is not set | ||
685 | # CONFIG_I2C_AMD756 is not set | ||
686 | # CONFIG_I2C_AMD8111 is not set | ||
687 | # CONFIG_I2C_I801 is not set | ||
688 | # CONFIG_I2C_I810 is not set | ||
689 | # CONFIG_I2C_PIIX4 is not set | ||
690 | CONFIG_I2C_MPC=y | ||
691 | # CONFIG_I2C_NFORCE2 is not set | ||
692 | # CONFIG_I2C_OCORES is not set | ||
693 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
694 | # CONFIG_I2C_PROSAVAGE is not set | ||
695 | # CONFIG_I2C_SAVAGE4 is not set | ||
696 | # CONFIG_I2C_SIMTEC is not set | ||
697 | # CONFIG_I2C_SIS5595 is not set | ||
698 | # CONFIG_I2C_SIS630 is not set | ||
699 | # CONFIG_I2C_SIS96X is not set | ||
700 | # CONFIG_I2C_TAOS_EVM is not set | ||
701 | # CONFIG_I2C_STUB is not set | ||
702 | # CONFIG_I2C_TINY_USB is not set | ||
703 | # CONFIG_I2C_VIA is not set | ||
704 | # CONFIG_I2C_VIAPRO is not set | ||
705 | # CONFIG_I2C_VOODOO3 is not set | ||
706 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
707 | |||
708 | # | ||
709 | # Miscellaneous I2C Chip support | ||
710 | # | ||
711 | # CONFIG_DS1682 is not set | ||
712 | CONFIG_SENSORS_EEPROM=m | ||
713 | # CONFIG_SENSORS_PCF8574 is not set | ||
714 | # CONFIG_PCF8575 is not set | ||
715 | # CONFIG_SENSORS_PCF8591 is not set | ||
716 | # CONFIG_SENSORS_MAX6875 is not set | ||
717 | # CONFIG_SENSORS_TSL2550 is not set | ||
718 | # CONFIG_I2C_DEBUG_CORE is not set | ||
719 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
720 | # CONFIG_I2C_DEBUG_BUS is not set | ||
721 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
722 | # CONFIG_SPI is not set | ||
723 | # CONFIG_W1 is not set | ||
724 | # CONFIG_POWER_SUPPLY is not set | ||
725 | # CONFIG_HWMON is not set | ||
726 | # CONFIG_THERMAL is not set | ||
727 | # CONFIG_WATCHDOG is not set | ||
728 | |||
729 | # | ||
730 | # Sonics Silicon Backplane | ||
731 | # | ||
732 | CONFIG_SSB_POSSIBLE=y | ||
733 | # CONFIG_SSB is not set | ||
734 | |||
735 | # | ||
736 | # Multifunction device drivers | ||
737 | # | ||
738 | # CONFIG_MFD_SM501 is not set | ||
739 | # CONFIG_HTC_PASIC3 is not set | ||
740 | |||
741 | # | ||
742 | # Multimedia devices | ||
743 | # | ||
744 | # CONFIG_VIDEO_DEV is not set | ||
745 | # CONFIG_DVB_CORE is not set | ||
746 | # CONFIG_DAB is not set | ||
747 | |||
748 | # | ||
749 | # Graphics support | ||
750 | # | ||
751 | # CONFIG_AGP is not set | ||
752 | # CONFIG_DRM is not set | ||
753 | # CONFIG_VGASTATE is not set | ||
754 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
755 | # CONFIG_FB is not set | ||
756 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
757 | |||
758 | # | ||
759 | # Display device support | ||
760 | # | ||
761 | # CONFIG_DISPLAY_SUPPORT is not set | ||
762 | |||
763 | # | ||
764 | # Sound | ||
765 | # | ||
766 | # CONFIG_SOUND is not set | ||
767 | CONFIG_USB_SUPPORT=y | ||
768 | CONFIG_USB_ARCH_HAS_HCD=y | ||
769 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
770 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
771 | CONFIG_USB=y | ||
772 | # CONFIG_USB_DEBUG is not set | ||
773 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
774 | |||
775 | # | ||
776 | # Miscellaneous USB options | ||
777 | # | ||
778 | CONFIG_USB_DEVICEFS=y | ||
779 | # CONFIG_USB_DEVICE_CLASS is not set | ||
780 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
781 | # CONFIG_USB_OTG is not set | ||
782 | # CONFIG_USB_OTG_WHITELIST is not set | ||
783 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
784 | |||
785 | # | ||
786 | # USB Host Controller Drivers | ||
787 | # | ||
788 | # CONFIG_USB_EHCI_HCD is not set | ||
789 | # CONFIG_USB_ISP116X_HCD is not set | ||
790 | CONFIG_USB_OHCI_HCD=m | ||
791 | # CONFIG_USB_OHCI_HCD_PPC_SOC is not set | ||
792 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
793 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | ||
794 | # CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set | ||
795 | # CONFIG_USB_OHCI_HCD_PCI is not set | ||
796 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | ||
797 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | ||
798 | # CONFIG_USB_OHCI_LITTLE_ENDIAN is not set | ||
799 | # CONFIG_USB_UHCI_HCD is not set | ||
800 | # CONFIG_USB_SL811_HCD is not set | ||
801 | # CONFIG_USB_R8A66597_HCD is not set | ||
802 | |||
803 | # | ||
804 | # USB Device Class drivers | ||
805 | # | ||
806 | # CONFIG_USB_ACM is not set | ||
807 | # CONFIG_USB_PRINTER is not set | ||
808 | |||
809 | # | ||
810 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
811 | # | ||
812 | |||
813 | # | ||
814 | # may also be needed; see USB_STORAGE Help for more information | ||
815 | # | ||
816 | CONFIG_USB_STORAGE=m | ||
817 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
818 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
819 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
820 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
821 | # CONFIG_USB_STORAGE_DPCM is not set | ||
822 | # CONFIG_USB_STORAGE_USBAT is not set | ||
823 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
824 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
825 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
826 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
827 | # CONFIG_USB_STORAGE_KARMA is not set | ||
828 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
829 | # CONFIG_USB_LIBUSUAL is not set | ||
830 | |||
831 | # | ||
832 | # USB Imaging devices | ||
833 | # | ||
834 | # CONFIG_USB_MDC800 is not set | ||
835 | # CONFIG_USB_MICROTEK is not set | ||
836 | # CONFIG_USB_MON is not set | ||
837 | |||
838 | # | ||
839 | # USB port drivers | ||
840 | # | ||
841 | # CONFIG_USB_SERIAL is not set | ||
842 | |||
843 | # | ||
844 | # USB Miscellaneous drivers | ||
845 | # | ||
846 | # CONFIG_USB_EMI62 is not set | ||
847 | # CONFIG_USB_EMI26 is not set | ||
848 | # CONFIG_USB_ADUTUX is not set | ||
849 | # CONFIG_USB_AUERSWALD is not set | ||
850 | # CONFIG_USB_RIO500 is not set | ||
851 | # CONFIG_USB_LEGOTOWER is not set | ||
852 | # CONFIG_USB_LCD is not set | ||
853 | # CONFIG_USB_BERRY_CHARGE is not set | ||
854 | # CONFIG_USB_LED is not set | ||
855 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
856 | # CONFIG_USB_CYTHERM is not set | ||
857 | # CONFIG_USB_PHIDGET is not set | ||
858 | # CONFIG_USB_IDMOUSE is not set | ||
859 | # CONFIG_USB_FTDI_ELAN is not set | ||
860 | # CONFIG_USB_APPLEDISPLAY is not set | ||
861 | # CONFIG_USB_LD is not set | ||
862 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
863 | # CONFIG_USB_IOWARRIOR is not set | ||
864 | # CONFIG_USB_TEST is not set | ||
865 | # CONFIG_USB_GADGET is not set | ||
866 | # CONFIG_MMC is not set | ||
867 | # CONFIG_MEMSTICK is not set | ||
868 | # CONFIG_NEW_LEDS is not set | ||
869 | # CONFIG_INFINIBAND is not set | ||
870 | # CONFIG_EDAC is not set | ||
871 | CONFIG_RTC_LIB=m | ||
872 | CONFIG_RTC_CLASS=m | ||
873 | |||
874 | # | ||
875 | # RTC interfaces | ||
876 | # | ||
877 | CONFIG_RTC_INTF_SYSFS=y | ||
878 | CONFIG_RTC_INTF_PROC=y | ||
879 | CONFIG_RTC_INTF_DEV=y | ||
880 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
881 | # CONFIG_RTC_DRV_TEST is not set | ||
882 | |||
883 | # | ||
884 | # I2C RTC drivers | ||
885 | # | ||
886 | # CONFIG_RTC_DRV_DS1307 is not set | ||
887 | # CONFIG_RTC_DRV_DS1374 is not set | ||
888 | # CONFIG_RTC_DRV_DS1672 is not set | ||
889 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
890 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
891 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
892 | # CONFIG_RTC_DRV_X1205 is not set | ||
893 | CONFIG_RTC_DRV_PCF8563=m | ||
894 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
895 | # CONFIG_RTC_DRV_M41T80 is not set | ||
896 | # CONFIG_RTC_DRV_S35390A is not set | ||
897 | |||
898 | # | ||
899 | # SPI RTC drivers | ||
900 | # | ||
901 | |||
902 | # | ||
903 | # Platform RTC drivers | ||
904 | # | ||
905 | # CONFIG_RTC_DRV_CMOS is not set | ||
906 | # CONFIG_RTC_DRV_DS1511 is not set | ||
907 | # CONFIG_RTC_DRV_DS1553 is not set | ||
908 | # CONFIG_RTC_DRV_DS1742 is not set | ||
909 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
910 | # CONFIG_RTC_DRV_M48T86 is not set | ||
911 | # CONFIG_RTC_DRV_M48T59 is not set | ||
912 | # CONFIG_RTC_DRV_V3020 is not set | ||
913 | |||
914 | # | ||
915 | # on-CPU RTC drivers | ||
916 | # | ||
917 | # CONFIG_DMADEVICES is not set | ||
918 | # CONFIG_UIO is not set | ||
919 | |||
920 | # | ||
921 | # File systems | ||
922 | # | ||
923 | CONFIG_EXT2_FS=m | ||
924 | # CONFIG_EXT2_FS_XATTR is not set | ||
925 | # CONFIG_EXT2_FS_XIP is not set | ||
926 | CONFIG_EXT3_FS=m | ||
927 | CONFIG_EXT3_FS_XATTR=y | ||
928 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
929 | # CONFIG_EXT3_FS_SECURITY is not set | ||
930 | # CONFIG_EXT4DEV_FS is not set | ||
931 | CONFIG_JBD=m | ||
932 | CONFIG_FS_MBCACHE=m | ||
933 | # CONFIG_REISERFS_FS is not set | ||
934 | # CONFIG_JFS_FS is not set | ||
935 | # CONFIG_FS_POSIX_ACL is not set | ||
936 | # CONFIG_XFS_FS is not set | ||
937 | # CONFIG_OCFS2_FS is not set | ||
938 | # CONFIG_DNOTIFY is not set | ||
939 | # CONFIG_INOTIFY is not set | ||
940 | # CONFIG_QUOTA is not set | ||
941 | # CONFIG_AUTOFS_FS is not set | ||
942 | # CONFIG_AUTOFS4_FS is not set | ||
943 | # CONFIG_FUSE_FS is not set | ||
944 | |||
945 | # | ||
946 | # CD-ROM/DVD Filesystems | ||
947 | # | ||
948 | # CONFIG_ISO9660_FS is not set | ||
949 | # CONFIG_UDF_FS is not set | ||
950 | |||
951 | # | ||
952 | # DOS/FAT/NT Filesystems | ||
953 | # | ||
954 | CONFIG_FAT_FS=m | ||
955 | # CONFIG_MSDOS_FS is not set | ||
956 | CONFIG_VFAT_FS=m | ||
957 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | ||
958 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
959 | # CONFIG_NTFS_FS is not set | ||
960 | |||
961 | # | ||
962 | # Pseudo filesystems | ||
963 | # | ||
964 | CONFIG_PROC_FS=y | ||
965 | # CONFIG_PROC_KCORE is not set | ||
966 | CONFIG_PROC_SYSCTL=y | ||
967 | CONFIG_SYSFS=y | ||
968 | CONFIG_TMPFS=y | ||
969 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
970 | # CONFIG_HUGETLB_PAGE is not set | ||
971 | # CONFIG_CONFIGFS_FS is not set | ||
972 | |||
973 | # | ||
974 | # Miscellaneous filesystems | ||
975 | # | ||
976 | # CONFIG_ADFS_FS is not set | ||
977 | # CONFIG_AFFS_FS is not set | ||
978 | # CONFIG_HFS_FS is not set | ||
979 | # CONFIG_HFSPLUS_FS is not set | ||
980 | # CONFIG_BEFS_FS is not set | ||
981 | # CONFIG_BFS_FS is not set | ||
982 | # CONFIG_EFS_FS is not set | ||
983 | CONFIG_JFFS2_FS=y | ||
984 | CONFIG_JFFS2_FS_DEBUG=0 | ||
985 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
986 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
987 | # CONFIG_JFFS2_SUMMARY is not set | ||
988 | # CONFIG_JFFS2_FS_XATTR is not set | ||
989 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
990 | CONFIG_JFFS2_ZLIB=y | ||
991 | # CONFIG_JFFS2_LZO is not set | ||
992 | CONFIG_JFFS2_RTIME=y | ||
993 | # CONFIG_JFFS2_RUBIN is not set | ||
994 | # CONFIG_CRAMFS is not set | ||
995 | # CONFIG_VXFS_FS is not set | ||
996 | # CONFIG_MINIX_FS is not set | ||
997 | # CONFIG_HPFS_FS is not set | ||
998 | # CONFIG_QNX4FS_FS is not set | ||
999 | # CONFIG_ROMFS_FS is not set | ||
1000 | # CONFIG_SYSV_FS is not set | ||
1001 | # CONFIG_UFS_FS is not set | ||
1002 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1003 | CONFIG_NFS_FS=y | ||
1004 | CONFIG_NFS_V3=y | ||
1005 | # CONFIG_NFS_V3_ACL is not set | ||
1006 | # CONFIG_NFS_V4 is not set | ||
1007 | # CONFIG_NFSD is not set | ||
1008 | CONFIG_ROOT_NFS=y | ||
1009 | CONFIG_LOCKD=y | ||
1010 | CONFIG_LOCKD_V4=y | ||
1011 | CONFIG_NFS_COMMON=y | ||
1012 | CONFIG_SUNRPC=y | ||
1013 | # CONFIG_SUNRPC_BIND34 is not set | ||
1014 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1015 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1016 | # CONFIG_SMB_FS is not set | ||
1017 | # CONFIG_CIFS is not set | ||
1018 | # CONFIG_NCP_FS is not set | ||
1019 | # CONFIG_CODA_FS is not set | ||
1020 | # CONFIG_AFS_FS is not set | ||
1021 | |||
1022 | # | ||
1023 | # Partition Types | ||
1024 | # | ||
1025 | # CONFIG_PARTITION_ADVANCED is not set | ||
1026 | CONFIG_MSDOS_PARTITION=y | ||
1027 | CONFIG_NLS=y | ||
1028 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1029 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1030 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1031 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1032 | CONFIG_NLS_CODEPAGE_850=y | ||
1033 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1034 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1035 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1036 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1037 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1038 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1039 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1040 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1041 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1042 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1043 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1044 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1045 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1046 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1047 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1048 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1049 | # CONFIG_NLS_ISO8859_8 is not set | ||
1050 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1051 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1052 | # CONFIG_NLS_ASCII is not set | ||
1053 | CONFIG_NLS_ISO8859_1=y | ||
1054 | # CONFIG_NLS_ISO8859_2 is not set | ||
1055 | # CONFIG_NLS_ISO8859_3 is not set | ||
1056 | # CONFIG_NLS_ISO8859_4 is not set | ||
1057 | # CONFIG_NLS_ISO8859_5 is not set | ||
1058 | # CONFIG_NLS_ISO8859_6 is not set | ||
1059 | # CONFIG_NLS_ISO8859_7 is not set | ||
1060 | # CONFIG_NLS_ISO8859_9 is not set | ||
1061 | # CONFIG_NLS_ISO8859_13 is not set | ||
1062 | # CONFIG_NLS_ISO8859_14 is not set | ||
1063 | # CONFIG_NLS_ISO8859_15 is not set | ||
1064 | # CONFIG_NLS_KOI8_R is not set | ||
1065 | # CONFIG_NLS_KOI8_U is not set | ||
1066 | # CONFIG_NLS_UTF8 is not set | ||
1067 | # CONFIG_DLM is not set | ||
1068 | |||
1069 | # | ||
1070 | # Library routines | ||
1071 | # | ||
1072 | CONFIG_BITREVERSE=y | ||
1073 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1074 | # CONFIG_CRC_CCITT is not set | ||
1075 | # CONFIG_CRC16 is not set | ||
1076 | # CONFIG_CRC_ITU_T is not set | ||
1077 | CONFIG_CRC32=y | ||
1078 | # CONFIG_CRC7 is not set | ||
1079 | # CONFIG_LIBCRC32C is not set | ||
1080 | CONFIG_ZLIB_INFLATE=y | ||
1081 | CONFIG_ZLIB_DEFLATE=y | ||
1082 | CONFIG_PLIST=y | ||
1083 | CONFIG_HAS_IOMEM=y | ||
1084 | CONFIG_HAS_IOPORT=y | ||
1085 | CONFIG_HAS_DMA=y | ||
1086 | CONFIG_HAVE_LMB=y | ||
1087 | |||
1088 | # | ||
1089 | # Kernel hacking | ||
1090 | # | ||
1091 | # CONFIG_PRINTK_TIME is not set | ||
1092 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1093 | CONFIG_ENABLE_MUST_CHECK=y | ||
1094 | CONFIG_FRAME_WARN=1024 | ||
1095 | # CONFIG_MAGIC_SYSRQ is not set | ||
1096 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1097 | # CONFIG_DEBUG_FS is not set | ||
1098 | # CONFIG_HEADERS_CHECK is not set | ||
1099 | # CONFIG_DEBUG_KERNEL is not set | ||
1100 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1101 | # CONFIG_SAMPLES is not set | ||
1102 | # CONFIG_IRQSTACKS is not set | ||
1103 | # CONFIG_BOOTX_TEXT is not set | ||
1104 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1105 | |||
1106 | # | ||
1107 | # Security options | ||
1108 | # | ||
1109 | # CONFIG_KEYS is not set | ||
1110 | # CONFIG_SECURITY is not set | ||
1111 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1112 | # CONFIG_CRYPTO is not set | ||
1113 | CONFIG_PPC_CLOCK=y | ||
1114 | CONFIG_PPC_LIB_RHEAP=y | ||
1115 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig new file mode 100644 index 000000000000..7672bfba3566 --- /dev/null +++ b/arch/powerpc/configs/52xx/tqm5200_defconfig | |||
@@ -0,0 +1,1214 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.25 | ||
4 | # Tue Apr 29 07:12:39 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | CONFIG_6xx=y | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | # CONFIG_ALTIVEC is not set | ||
19 | CONFIG_PPC_STD_MMU=y | ||
20 | CONFIG_PPC_STD_MMU_32=y | ||
21 | # CONFIG_PPC_MM_SLICES is not set | ||
22 | # CONFIG_SMP is not set | ||
23 | CONFIG_PPC32=y | ||
24 | CONFIG_WORD_SIZE=32 | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
28 | CONFIG_GENERIC_TIME=y | ||
29 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
30 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
31 | CONFIG_GENERIC_HARDIRQS=y | ||
32 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
33 | CONFIG_IRQ_PER_CPU=y | ||
34 | CONFIG_STACKTRACE_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
37 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
38 | CONFIG_GENERIC_HWEIGHT=y | ||
39 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
40 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
41 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
42 | CONFIG_PPC=y | ||
43 | CONFIG_EARLY_PRINTK=y | ||
44 | CONFIG_GENERIC_NVRAM=y | ||
45 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
46 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
47 | CONFIG_PPC_OF=y | ||
48 | CONFIG_OF=y | ||
49 | # CONFIG_PPC_UDBG_16550 is not set | ||
50 | # CONFIG_GENERIC_TBSYNC is not set | ||
51 | CONFIG_AUDIT_ARCH=y | ||
52 | CONFIG_GENERIC_BUG=y | ||
53 | CONFIG_DEFAULT_UIMAGE=y | ||
54 | # CONFIG_PPC_DCR_NATIVE is not set | ||
55 | # CONFIG_PPC_DCR_MMIO is not set | ||
56 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
57 | |||
58 | # | ||
59 | # General setup | ||
60 | # | ||
61 | CONFIG_EXPERIMENTAL=y | ||
62 | CONFIG_BROKEN_ON_SMP=y | ||
63 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
64 | CONFIG_LOCALVERSION="" | ||
65 | CONFIG_LOCALVERSION_AUTO=y | ||
66 | CONFIG_SWAP=y | ||
67 | CONFIG_SYSVIPC=y | ||
68 | CONFIG_SYSVIPC_SYSCTL=y | ||
69 | # CONFIG_POSIX_MQUEUE is not set | ||
70 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
71 | # CONFIG_TASKSTATS is not set | ||
72 | # CONFIG_AUDIT is not set | ||
73 | # CONFIG_IKCONFIG is not set | ||
74 | CONFIG_LOG_BUF_SHIFT=14 | ||
75 | # CONFIG_CGROUPS is not set | ||
76 | CONFIG_GROUP_SCHED=y | ||
77 | CONFIG_FAIR_GROUP_SCHED=y | ||
78 | # CONFIG_RT_GROUP_SCHED is not set | ||
79 | CONFIG_USER_SCHED=y | ||
80 | # CONFIG_CGROUP_SCHED is not set | ||
81 | CONFIG_SYSFS_DEPRECATED=y | ||
82 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
83 | # CONFIG_RELAY is not set | ||
84 | # CONFIG_NAMESPACES is not set | ||
85 | CONFIG_BLK_DEV_INITRD=y | ||
86 | CONFIG_INITRAMFS_SOURCE="" | ||
87 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
88 | CONFIG_SYSCTL=y | ||
89 | CONFIG_EMBEDDED=y | ||
90 | # CONFIG_SYSCTL_SYSCALL is not set | ||
91 | # CONFIG_KALLSYMS is not set | ||
92 | CONFIG_HOTPLUG=y | ||
93 | CONFIG_PRINTK=y | ||
94 | CONFIG_BUG=y | ||
95 | CONFIG_ELF_CORE=y | ||
96 | CONFIG_COMPAT_BRK=y | ||
97 | CONFIG_BASE_FULL=y | ||
98 | CONFIG_FUTEX=y | ||
99 | CONFIG_ANON_INODES=y | ||
100 | # CONFIG_EPOLL is not set | ||
101 | CONFIG_SIGNALFD=y | ||
102 | CONFIG_TIMERFD=y | ||
103 | CONFIG_EVENTFD=y | ||
104 | CONFIG_SHMEM=y | ||
105 | CONFIG_VM_EVENT_COUNTERS=y | ||
106 | CONFIG_SLUB_DEBUG=y | ||
107 | # CONFIG_SLAB is not set | ||
108 | CONFIG_SLUB=y | ||
109 | # CONFIG_SLOB is not set | ||
110 | # CONFIG_PROFILING is not set | ||
111 | # CONFIG_MARKERS is not set | ||
112 | CONFIG_HAVE_OPROFILE=y | ||
113 | CONFIG_HAVE_KPROBES=y | ||
114 | CONFIG_HAVE_KRETPROBES=y | ||
115 | CONFIG_PROC_PAGE_MONITOR=y | ||
116 | CONFIG_SLABINFO=y | ||
117 | CONFIG_RT_MUTEXES=y | ||
118 | # CONFIG_TINY_SHMEM is not set | ||
119 | CONFIG_BASE_SMALL=0 | ||
120 | CONFIG_MODULES=y | ||
121 | CONFIG_MODULE_UNLOAD=y | ||
122 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
123 | CONFIG_MODVERSIONS=y | ||
124 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
125 | CONFIG_KMOD=y | ||
126 | CONFIG_BLOCK=y | ||
127 | # CONFIG_LBD is not set | ||
128 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
129 | # CONFIG_LSF is not set | ||
130 | # CONFIG_BLK_DEV_BSG is not set | ||
131 | |||
132 | # | ||
133 | # IO Schedulers | ||
134 | # | ||
135 | CONFIG_IOSCHED_NOOP=y | ||
136 | CONFIG_IOSCHED_AS=y | ||
137 | CONFIG_IOSCHED_DEADLINE=y | ||
138 | CONFIG_IOSCHED_CFQ=y | ||
139 | CONFIG_DEFAULT_AS=y | ||
140 | # CONFIG_DEFAULT_DEADLINE is not set | ||
141 | # CONFIG_DEFAULT_CFQ is not set | ||
142 | # CONFIG_DEFAULT_NOOP is not set | ||
143 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
144 | CONFIG_CLASSIC_RCU=y | ||
145 | |||
146 | # | ||
147 | # Platform support | ||
148 | # | ||
149 | CONFIG_PPC_MULTIPLATFORM=y | ||
150 | # CONFIG_PPC_82xx is not set | ||
151 | # CONFIG_PPC_83xx is not set | ||
152 | # CONFIG_PPC_86xx is not set | ||
153 | CONFIG_CLASSIC32=y | ||
154 | # CONFIG_PPC_CHRP is not set | ||
155 | # CONFIG_PPC_MPC512x is not set | ||
156 | # CONFIG_PPC_MPC5121 is not set | ||
157 | # CONFIG_MPC5121_ADS is not set | ||
158 | CONFIG_PPC_MPC52xx=y | ||
159 | CONFIG_PPC_MPC5200_SIMPLE=y | ||
160 | # CONFIG_PPC_EFIKA is not set | ||
161 | # CONFIG_PPC_LITE5200 is not set | ||
162 | CONFIG_PPC_MPC5200_BUGFIX=y | ||
163 | # CONFIG_PPC_MPC5200_GPIO is not set | ||
164 | # CONFIG_PPC_PMAC is not set | ||
165 | # CONFIG_PPC_CELL is not set | ||
166 | # CONFIG_PPC_CELL_NATIVE is not set | ||
167 | # CONFIG_PQ2ADS is not set | ||
168 | # CONFIG_EMBEDDED6xx is not set | ||
169 | # CONFIG_IPIC is not set | ||
170 | # CONFIG_MPIC is not set | ||
171 | # CONFIG_MPIC_WEIRD is not set | ||
172 | # CONFIG_PPC_I8259 is not set | ||
173 | # CONFIG_PPC_RTAS is not set | ||
174 | # CONFIG_MMIO_NVRAM is not set | ||
175 | # CONFIG_PPC_MPC106 is not set | ||
176 | # CONFIG_PPC_970_NAP is not set | ||
177 | # CONFIG_PPC_INDIRECT_IO is not set | ||
178 | # CONFIG_GENERIC_IOMAP is not set | ||
179 | # CONFIG_CPU_FREQ is not set | ||
180 | # CONFIG_TAU is not set | ||
181 | # CONFIG_FSL_ULI1575 is not set | ||
182 | CONFIG_PPC_BESTCOMM=y | ||
183 | # CONFIG_PPC_BESTCOMM_ATA is not set | ||
184 | CONFIG_PPC_BESTCOMM_FEC=y | ||
185 | # CONFIG_PPC_BESTCOMM_GEN_BD is not set | ||
186 | |||
187 | # | ||
188 | # Kernel options | ||
189 | # | ||
190 | # CONFIG_HIGHMEM is not set | ||
191 | # CONFIG_TICK_ONESHOT is not set | ||
192 | # CONFIG_NO_HZ is not set | ||
193 | # CONFIG_HIGH_RES_TIMERS is not set | ||
194 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
195 | # CONFIG_HZ_100 is not set | ||
196 | CONFIG_HZ_250=y | ||
197 | # CONFIG_HZ_300 is not set | ||
198 | # CONFIG_HZ_1000 is not set | ||
199 | CONFIG_HZ=250 | ||
200 | # CONFIG_SCHED_HRTICK is not set | ||
201 | CONFIG_PREEMPT_NONE=y | ||
202 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
203 | # CONFIG_PREEMPT is not set | ||
204 | CONFIG_BINFMT_ELF=y | ||
205 | # CONFIG_BINFMT_MISC is not set | ||
206 | # CONFIG_IOMMU_HELPER is not set | ||
207 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
208 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
209 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
210 | # CONFIG_KEXEC is not set | ||
211 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
212 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
213 | CONFIG_SELECT_MEMORY_MODEL=y | ||
214 | CONFIG_FLATMEM_MANUAL=y | ||
215 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
216 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
217 | CONFIG_FLATMEM=y | ||
218 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
219 | # CONFIG_SPARSEMEM_STATIC is not set | ||
220 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
221 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
222 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
223 | # CONFIG_RESOURCES_64BIT is not set | ||
224 | CONFIG_ZONE_DMA_FLAG=1 | ||
225 | CONFIG_BOUNCE=y | ||
226 | CONFIG_VIRT_TO_BUS=y | ||
227 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
228 | CONFIG_PROC_DEVICETREE=y | ||
229 | # CONFIG_CMDLINE_BOOL is not set | ||
230 | CONFIG_PM=y | ||
231 | # CONFIG_PM_LEGACY is not set | ||
232 | # CONFIG_PM_DEBUG is not set | ||
233 | CONFIG_SECCOMP=y | ||
234 | CONFIG_ISA_DMA_API=y | ||
235 | |||
236 | # | ||
237 | # Bus options | ||
238 | # | ||
239 | CONFIG_ZONE_DMA=y | ||
240 | CONFIG_GENERIC_ISA_DMA=y | ||
241 | CONFIG_FSL_SOC=y | ||
242 | # CONFIG_PCI is not set | ||
243 | # CONFIG_PCI_DOMAINS is not set | ||
244 | # CONFIG_PCI_SYSCALL is not set | ||
245 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
246 | # CONFIG_PCCARD is not set | ||
247 | # CONFIG_HAS_RAPIDIO is not set | ||
248 | |||
249 | # | ||
250 | # Advanced setup | ||
251 | # | ||
252 | # CONFIG_ADVANCED_OPTIONS is not set | ||
253 | |||
254 | # | ||
255 | # Default settings for advanced configuration options are used | ||
256 | # | ||
257 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
258 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
259 | CONFIG_KERNEL_START=0xc0000000 | ||
260 | CONFIG_PHYSICAL_START=0x00000000 | ||
261 | CONFIG_TASK_SIZE=0xc0000000 | ||
262 | |||
263 | # | ||
264 | # Networking | ||
265 | # | ||
266 | CONFIG_NET=y | ||
267 | |||
268 | # | ||
269 | # Networking options | ||
270 | # | ||
271 | CONFIG_PACKET=y | ||
272 | # CONFIG_PACKET_MMAP is not set | ||
273 | CONFIG_UNIX=y | ||
274 | CONFIG_XFRM=y | ||
275 | CONFIG_XFRM_USER=y | ||
276 | # CONFIG_XFRM_SUB_POLICY is not set | ||
277 | # CONFIG_XFRM_MIGRATE is not set | ||
278 | # CONFIG_XFRM_STATISTICS is not set | ||
279 | # CONFIG_NET_KEY is not set | ||
280 | CONFIG_INET=y | ||
281 | CONFIG_IP_MULTICAST=y | ||
282 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
283 | CONFIG_IP_FIB_HASH=y | ||
284 | CONFIG_IP_PNP=y | ||
285 | CONFIG_IP_PNP_DHCP=y | ||
286 | CONFIG_IP_PNP_BOOTP=y | ||
287 | # CONFIG_IP_PNP_RARP is not set | ||
288 | # CONFIG_NET_IPIP is not set | ||
289 | # CONFIG_NET_IPGRE is not set | ||
290 | # CONFIG_IP_MROUTE is not set | ||
291 | # CONFIG_ARPD is not set | ||
292 | CONFIG_SYN_COOKIES=y | ||
293 | # CONFIG_INET_AH is not set | ||
294 | # CONFIG_INET_ESP is not set | ||
295 | # CONFIG_INET_IPCOMP is not set | ||
296 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
297 | # CONFIG_INET_TUNNEL is not set | ||
298 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
299 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
300 | CONFIG_INET_XFRM_MODE_BEET=y | ||
301 | # CONFIG_INET_LRO is not set | ||
302 | CONFIG_INET_DIAG=y | ||
303 | CONFIG_INET_TCP_DIAG=y | ||
304 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
305 | CONFIG_TCP_CONG_CUBIC=y | ||
306 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
307 | # CONFIG_TCP_MD5SIG is not set | ||
308 | # CONFIG_IPV6 is not set | ||
309 | # CONFIG_NETWORK_SECMARK is not set | ||
310 | # CONFIG_NETFILTER is not set | ||
311 | # CONFIG_IP_DCCP is not set | ||
312 | # CONFIG_IP_SCTP is not set | ||
313 | # CONFIG_TIPC is not set | ||
314 | # CONFIG_ATM is not set | ||
315 | # CONFIG_BRIDGE is not set | ||
316 | # CONFIG_VLAN_8021Q is not set | ||
317 | # CONFIG_DECNET is not set | ||
318 | # CONFIG_LLC2 is not set | ||
319 | # CONFIG_IPX is not set | ||
320 | # CONFIG_ATALK is not set | ||
321 | # CONFIG_X25 is not set | ||
322 | # CONFIG_LAPB is not set | ||
323 | # CONFIG_ECONET is not set | ||
324 | # CONFIG_WAN_ROUTER is not set | ||
325 | # CONFIG_NET_SCHED is not set | ||
326 | |||
327 | # | ||
328 | # Network testing | ||
329 | # | ||
330 | # CONFIG_NET_PKTGEN is not set | ||
331 | # CONFIG_HAMRADIO is not set | ||
332 | # CONFIG_CAN is not set | ||
333 | # CONFIG_IRDA is not set | ||
334 | # CONFIG_BT is not set | ||
335 | # CONFIG_AF_RXRPC is not set | ||
336 | |||
337 | # | ||
338 | # Wireless | ||
339 | # | ||
340 | # CONFIG_CFG80211 is not set | ||
341 | # CONFIG_WIRELESS_EXT is not set | ||
342 | # CONFIG_MAC80211 is not set | ||
343 | # CONFIG_IEEE80211 is not set | ||
344 | # CONFIG_RFKILL is not set | ||
345 | # CONFIG_NET_9P is not set | ||
346 | |||
347 | # | ||
348 | # Device Drivers | ||
349 | # | ||
350 | |||
351 | # | ||
352 | # Generic Driver Options | ||
353 | # | ||
354 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
355 | CONFIG_STANDALONE=y | ||
356 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
357 | # CONFIG_FW_LOADER is not set | ||
358 | # CONFIG_DEBUG_DRIVER is not set | ||
359 | # CONFIG_DEBUG_DEVRES is not set | ||
360 | # CONFIG_SYS_HYPERVISOR is not set | ||
361 | # CONFIG_CONNECTOR is not set | ||
362 | CONFIG_MTD=y | ||
363 | # CONFIG_MTD_DEBUG is not set | ||
364 | CONFIG_MTD_CONCAT=y | ||
365 | CONFIG_MTD_PARTITIONS=y | ||
366 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
367 | CONFIG_MTD_CMDLINE_PARTS=y | ||
368 | # CONFIG_MTD_OF_PARTS is not set | ||
369 | # CONFIG_MTD_AR7_PARTS is not set | ||
370 | |||
371 | # | ||
372 | # User Modules And Translation Layers | ||
373 | # | ||
374 | CONFIG_MTD_CHAR=y | ||
375 | CONFIG_MTD_BLKDEVS=y | ||
376 | CONFIG_MTD_BLOCK=y | ||
377 | # CONFIG_FTL is not set | ||
378 | # CONFIG_NFTL is not set | ||
379 | # CONFIG_INFTL is not set | ||
380 | # CONFIG_RFD_FTL is not set | ||
381 | # CONFIG_SSFDC is not set | ||
382 | # CONFIG_MTD_OOPS is not set | ||
383 | |||
384 | # | ||
385 | # RAM/ROM/Flash chip drivers | ||
386 | # | ||
387 | CONFIG_MTD_CFI=y | ||
388 | # CONFIG_MTD_JEDECPROBE is not set | ||
389 | CONFIG_MTD_GEN_PROBE=y | ||
390 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
391 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
392 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
393 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
394 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
395 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
396 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
397 | CONFIG_MTD_CFI_I1=y | ||
398 | CONFIG_MTD_CFI_I2=y | ||
399 | # CONFIG_MTD_CFI_I4 is not set | ||
400 | # CONFIG_MTD_CFI_I8 is not set | ||
401 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
402 | CONFIG_MTD_CFI_AMDSTD=y | ||
403 | # CONFIG_MTD_CFI_STAA is not set | ||
404 | CONFIG_MTD_CFI_UTIL=y | ||
405 | # CONFIG_MTD_RAM is not set | ||
406 | CONFIG_MTD_ROM=y | ||
407 | # CONFIG_MTD_ABSENT is not set | ||
408 | |||
409 | # | ||
410 | # Mapping drivers for chip access | ||
411 | # | ||
412 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
413 | # CONFIG_MTD_PHYSMAP is not set | ||
414 | CONFIG_MTD_PHYSMAP_OF=y | ||
415 | # CONFIG_MTD_PLATRAM is not set | ||
416 | |||
417 | # | ||
418 | # Self-contained MTD device drivers | ||
419 | # | ||
420 | # CONFIG_MTD_SLRAM is not set | ||
421 | # CONFIG_MTD_PHRAM is not set | ||
422 | # CONFIG_MTD_MTDRAM is not set | ||
423 | # CONFIG_MTD_BLOCK2MTD is not set | ||
424 | |||
425 | # | ||
426 | # Disk-On-Chip Device Drivers | ||
427 | # | ||
428 | # CONFIG_MTD_DOC2000 is not set | ||
429 | # CONFIG_MTD_DOC2001 is not set | ||
430 | # CONFIG_MTD_DOC2001PLUS is not set | ||
431 | # CONFIG_MTD_NAND is not set | ||
432 | # CONFIG_MTD_ONENAND is not set | ||
433 | |||
434 | # | ||
435 | # UBI - Unsorted block images | ||
436 | # | ||
437 | # CONFIG_MTD_UBI is not set | ||
438 | CONFIG_OF_DEVICE=y | ||
439 | CONFIG_OF_I2C=y | ||
440 | # CONFIG_PARPORT is not set | ||
441 | CONFIG_BLK_DEV=y | ||
442 | # CONFIG_BLK_DEV_FD is not set | ||
443 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
444 | CONFIG_BLK_DEV_LOOP=y | ||
445 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
446 | # CONFIG_BLK_DEV_NBD is not set | ||
447 | # CONFIG_BLK_DEV_UB is not set | ||
448 | CONFIG_BLK_DEV_RAM=y | ||
449 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
450 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
451 | # CONFIG_BLK_DEV_XIP is not set | ||
452 | # CONFIG_CDROM_PKTCDVD is not set | ||
453 | # CONFIG_ATA_OVER_ETH is not set | ||
454 | # CONFIG_MISC_DEVICES is not set | ||
455 | CONFIG_HAVE_IDE=y | ||
456 | # CONFIG_IDE is not set | ||
457 | |||
458 | # | ||
459 | # SCSI device support | ||
460 | # | ||
461 | # CONFIG_RAID_ATTRS is not set | ||
462 | CONFIG_SCSI=y | ||
463 | CONFIG_SCSI_DMA=y | ||
464 | # CONFIG_SCSI_TGT is not set | ||
465 | # CONFIG_SCSI_NETLINK is not set | ||
466 | CONFIG_SCSI_PROC_FS=y | ||
467 | |||
468 | # | ||
469 | # SCSI support type (disk, tape, CD-ROM) | ||
470 | # | ||
471 | CONFIG_BLK_DEV_SD=y | ||
472 | # CONFIG_CHR_DEV_ST is not set | ||
473 | # CONFIG_CHR_DEV_OSST is not set | ||
474 | # CONFIG_BLK_DEV_SR is not set | ||
475 | CONFIG_CHR_DEV_SG=y | ||
476 | # CONFIG_CHR_DEV_SCH is not set | ||
477 | |||
478 | # | ||
479 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
480 | # | ||
481 | # CONFIG_SCSI_MULTI_LUN is not set | ||
482 | # CONFIG_SCSI_CONSTANTS is not set | ||
483 | # CONFIG_SCSI_LOGGING is not set | ||
484 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
485 | CONFIG_SCSI_WAIT_SCAN=m | ||
486 | |||
487 | # | ||
488 | # SCSI Transports | ||
489 | # | ||
490 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
491 | # CONFIG_SCSI_FC_ATTRS is not set | ||
492 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
493 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
494 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
495 | CONFIG_SCSI_LOWLEVEL=y | ||
496 | # CONFIG_ISCSI_TCP is not set | ||
497 | # CONFIG_SCSI_DEBUG is not set | ||
498 | CONFIG_ATA=y | ||
499 | # CONFIG_ATA_NONSTANDARD is not set | ||
500 | CONFIG_SATA_PMP=y | ||
501 | # CONFIG_SATA_FSL is not set | ||
502 | CONFIG_ATA_SFF=y | ||
503 | # CONFIG_SATA_MV is not set | ||
504 | CONFIG_PATA_MPC52xx=y | ||
505 | CONFIG_PATA_PLATFORM=y | ||
506 | # CONFIG_PATA_OF_PLATFORM is not set | ||
507 | # CONFIG_MD is not set | ||
508 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
509 | CONFIG_NETDEVICES=y | ||
510 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
511 | # CONFIG_DUMMY is not set | ||
512 | # CONFIG_BONDING is not set | ||
513 | # CONFIG_MACVLAN is not set | ||
514 | # CONFIG_EQUALIZER is not set | ||
515 | # CONFIG_TUN is not set | ||
516 | # CONFIG_VETH is not set | ||
517 | CONFIG_PHYLIB=y | ||
518 | |||
519 | # | ||
520 | # MII PHY device drivers | ||
521 | # | ||
522 | # CONFIG_MARVELL_PHY is not set | ||
523 | # CONFIG_DAVICOM_PHY is not set | ||
524 | # CONFIG_QSEMI_PHY is not set | ||
525 | CONFIG_LXT_PHY=y | ||
526 | # CONFIG_CICADA_PHY is not set | ||
527 | # CONFIG_VITESSE_PHY is not set | ||
528 | # CONFIG_SMSC_PHY is not set | ||
529 | # CONFIG_BROADCOM_PHY is not set | ||
530 | # CONFIG_ICPLUS_PHY is not set | ||
531 | # CONFIG_REALTEK_PHY is not set | ||
532 | # CONFIG_FIXED_PHY is not set | ||
533 | # CONFIG_MDIO_BITBANG is not set | ||
534 | CONFIG_NET_ETHERNET=y | ||
535 | # CONFIG_MII is not set | ||
536 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
537 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
538 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
539 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
540 | # CONFIG_B44 is not set | ||
541 | CONFIG_FEC_MPC52xx=y | ||
542 | CONFIG_FEC_MPC52xx_MDIO=y | ||
543 | # CONFIG_NETDEV_1000 is not set | ||
544 | # CONFIG_NETDEV_10000 is not set | ||
545 | |||
546 | # | ||
547 | # Wireless LAN | ||
548 | # | ||
549 | # CONFIG_WLAN_PRE80211 is not set | ||
550 | # CONFIG_WLAN_80211 is not set | ||
551 | # CONFIG_IWLWIFI is not set | ||
552 | # CONFIG_IWLWIFI_LEDS is not set | ||
553 | |||
554 | # | ||
555 | # USB Network Adapters | ||
556 | # | ||
557 | # CONFIG_USB_CATC is not set | ||
558 | # CONFIG_USB_KAWETH is not set | ||
559 | # CONFIG_USB_PEGASUS is not set | ||
560 | # CONFIG_USB_RTL8150 is not set | ||
561 | # CONFIG_USB_USBNET is not set | ||
562 | # CONFIG_WAN is not set | ||
563 | # CONFIG_PPP is not set | ||
564 | # CONFIG_SLIP is not set | ||
565 | # CONFIG_NETCONSOLE is not set | ||
566 | # CONFIG_NETPOLL is not set | ||
567 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
568 | # CONFIG_ISDN is not set | ||
569 | # CONFIG_PHONE is not set | ||
570 | |||
571 | # | ||
572 | # Input device support | ||
573 | # | ||
574 | # CONFIG_INPUT is not set | ||
575 | |||
576 | # | ||
577 | # Hardware I/O ports | ||
578 | # | ||
579 | # CONFIG_SERIO is not set | ||
580 | # CONFIG_GAMEPORT is not set | ||
581 | |||
582 | # | ||
583 | # Character devices | ||
584 | # | ||
585 | # CONFIG_VT is not set | ||
586 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
587 | |||
588 | # | ||
589 | # Serial drivers | ||
590 | # | ||
591 | # CONFIG_SERIAL_8250 is not set | ||
592 | |||
593 | # | ||
594 | # Non-8250 serial port support | ||
595 | # | ||
596 | # CONFIG_SERIAL_UARTLITE is not set | ||
597 | CONFIG_SERIAL_CORE=y | ||
598 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
599 | CONFIG_SERIAL_MPC52xx=y | ||
600 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | ||
601 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | ||
602 | CONFIG_UNIX98_PTYS=y | ||
603 | CONFIG_LEGACY_PTYS=y | ||
604 | CONFIG_LEGACY_PTY_COUNT=256 | ||
605 | # CONFIG_IPMI_HANDLER is not set | ||
606 | # CONFIG_HW_RANDOM is not set | ||
607 | # CONFIG_NVRAM is not set | ||
608 | # CONFIG_R3964 is not set | ||
609 | # CONFIG_RAW_DRIVER is not set | ||
610 | # CONFIG_TCG_TPM is not set | ||
611 | CONFIG_I2C=y | ||
612 | CONFIG_I2C_BOARDINFO=y | ||
613 | CONFIG_I2C_CHARDEV=y | ||
614 | |||
615 | # | ||
616 | # I2C Hardware Bus support | ||
617 | # | ||
618 | CONFIG_I2C_MPC=y | ||
619 | # CONFIG_I2C_OCORES is not set | ||
620 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
621 | # CONFIG_I2C_SIMTEC is not set | ||
622 | # CONFIG_I2C_TAOS_EVM is not set | ||
623 | # CONFIG_I2C_STUB is not set | ||
624 | # CONFIG_I2C_TINY_USB is not set | ||
625 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
626 | |||
627 | # | ||
628 | # Miscellaneous I2C Chip support | ||
629 | # | ||
630 | # CONFIG_DS1682 is not set | ||
631 | # CONFIG_SENSORS_EEPROM is not set | ||
632 | # CONFIG_SENSORS_PCF8574 is not set | ||
633 | # CONFIG_PCF8575 is not set | ||
634 | # CONFIG_SENSORS_PCF8591 is not set | ||
635 | # CONFIG_SENSORS_MAX6875 is not set | ||
636 | # CONFIG_SENSORS_TSL2550 is not set | ||
637 | # CONFIG_I2C_DEBUG_CORE is not set | ||
638 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
639 | # CONFIG_I2C_DEBUG_BUS is not set | ||
640 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
641 | # CONFIG_SPI is not set | ||
642 | # CONFIG_W1 is not set | ||
643 | # CONFIG_POWER_SUPPLY is not set | ||
644 | CONFIG_HWMON=y | ||
645 | # CONFIG_HWMON_VID is not set | ||
646 | # CONFIG_SENSORS_AD7418 is not set | ||
647 | # CONFIG_SENSORS_ADM1021 is not set | ||
648 | # CONFIG_SENSORS_ADM1025 is not set | ||
649 | # CONFIG_SENSORS_ADM1026 is not set | ||
650 | # CONFIG_SENSORS_ADM1029 is not set | ||
651 | # CONFIG_SENSORS_ADM1031 is not set | ||
652 | # CONFIG_SENSORS_ADM9240 is not set | ||
653 | # CONFIG_SENSORS_ADT7470 is not set | ||
654 | # CONFIG_SENSORS_ADT7473 is not set | ||
655 | # CONFIG_SENSORS_ATXP1 is not set | ||
656 | # CONFIG_SENSORS_DS1621 is not set | ||
657 | # CONFIG_SENSORS_F71805F is not set | ||
658 | # CONFIG_SENSORS_F71882FG is not set | ||
659 | # CONFIG_SENSORS_F75375S is not set | ||
660 | # CONFIG_SENSORS_GL518SM is not set | ||
661 | # CONFIG_SENSORS_GL520SM is not set | ||
662 | # CONFIG_SENSORS_IT87 is not set | ||
663 | # CONFIG_SENSORS_LM63 is not set | ||
664 | # CONFIG_SENSORS_LM75 is not set | ||
665 | # CONFIG_SENSORS_LM77 is not set | ||
666 | # CONFIG_SENSORS_LM78 is not set | ||
667 | # CONFIG_SENSORS_LM80 is not set | ||
668 | # CONFIG_SENSORS_LM83 is not set | ||
669 | # CONFIG_SENSORS_LM85 is not set | ||
670 | # CONFIG_SENSORS_LM87 is not set | ||
671 | # CONFIG_SENSORS_LM90 is not set | ||
672 | # CONFIG_SENSORS_LM92 is not set | ||
673 | # CONFIG_SENSORS_LM93 is not set | ||
674 | # CONFIG_SENSORS_MAX1619 is not set | ||
675 | # CONFIG_SENSORS_MAX6650 is not set | ||
676 | # CONFIG_SENSORS_PC87360 is not set | ||
677 | # CONFIG_SENSORS_PC87427 is not set | ||
678 | # CONFIG_SENSORS_DME1737 is not set | ||
679 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
680 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
681 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
682 | # CONFIG_SENSORS_ADS7828 is not set | ||
683 | # CONFIG_SENSORS_THMC50 is not set | ||
684 | # CONFIG_SENSORS_VT1211 is not set | ||
685 | # CONFIG_SENSORS_W83781D is not set | ||
686 | # CONFIG_SENSORS_W83791D is not set | ||
687 | # CONFIG_SENSORS_W83792D is not set | ||
688 | # CONFIG_SENSORS_W83793 is not set | ||
689 | # CONFIG_SENSORS_W83L785TS is not set | ||
690 | # CONFIG_SENSORS_W83L786NG is not set | ||
691 | # CONFIG_SENSORS_W83627HF is not set | ||
692 | # CONFIG_SENSORS_W83627EHF is not set | ||
693 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
694 | # CONFIG_THERMAL is not set | ||
695 | CONFIG_WATCHDOG=y | ||
696 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
697 | |||
698 | # | ||
699 | # Watchdog Device Drivers | ||
700 | # | ||
701 | # CONFIG_SOFT_WATCHDOG is not set | ||
702 | # CONFIG_MPC5200_WDT is not set | ||
703 | |||
704 | # | ||
705 | # USB-based Watchdog Cards | ||
706 | # | ||
707 | # CONFIG_USBPCWATCHDOG is not set | ||
708 | |||
709 | # | ||
710 | # Sonics Silicon Backplane | ||
711 | # | ||
712 | CONFIG_SSB_POSSIBLE=y | ||
713 | # CONFIG_SSB is not set | ||
714 | |||
715 | # | ||
716 | # Multifunction device drivers | ||
717 | # | ||
718 | # CONFIG_MFD_SM501 is not set | ||
719 | # CONFIG_HTC_PASIC3 is not set | ||
720 | |||
721 | # | ||
722 | # Multimedia devices | ||
723 | # | ||
724 | # CONFIG_VIDEO_DEV is not set | ||
725 | # CONFIG_DVB_CORE is not set | ||
726 | # CONFIG_DAB is not set | ||
727 | |||
728 | # | ||
729 | # Graphics support | ||
730 | # | ||
731 | # CONFIG_VGASTATE is not set | ||
732 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
733 | # CONFIG_FB is not set | ||
734 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
735 | |||
736 | # | ||
737 | # Display device support | ||
738 | # | ||
739 | # CONFIG_DISPLAY_SUPPORT is not set | ||
740 | |||
741 | # | ||
742 | # Sound | ||
743 | # | ||
744 | # CONFIG_SOUND is not set | ||
745 | CONFIG_USB_SUPPORT=y | ||
746 | CONFIG_USB_ARCH_HAS_HCD=y | ||
747 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
748 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
749 | CONFIG_USB=y | ||
750 | # CONFIG_USB_DEBUG is not set | ||
751 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
752 | |||
753 | # | ||
754 | # Miscellaneous USB options | ||
755 | # | ||
756 | CONFIG_USB_DEVICEFS=y | ||
757 | # CONFIG_USB_DEVICE_CLASS is not set | ||
758 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
759 | # CONFIG_USB_SUSPEND is not set | ||
760 | # CONFIG_USB_OTG is not set | ||
761 | # CONFIG_USB_OTG_WHITELIST is not set | ||
762 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
763 | |||
764 | # | ||
765 | # USB Host Controller Drivers | ||
766 | # | ||
767 | # CONFIG_USB_ISP116X_HCD is not set | ||
768 | CONFIG_USB_OHCI_HCD=y | ||
769 | CONFIG_USB_OHCI_HCD_PPC_SOC=y | ||
770 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
771 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | ||
772 | # CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set | ||
773 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | ||
774 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | ||
775 | # CONFIG_USB_OHCI_LITTLE_ENDIAN is not set | ||
776 | # CONFIG_USB_SL811_HCD is not set | ||
777 | # CONFIG_USB_R8A66597_HCD is not set | ||
778 | |||
779 | # | ||
780 | # USB Device Class drivers | ||
781 | # | ||
782 | # CONFIG_USB_ACM is not set | ||
783 | # CONFIG_USB_PRINTER is not set | ||
784 | |||
785 | # | ||
786 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
787 | # | ||
788 | |||
789 | # | ||
790 | # may also be needed; see USB_STORAGE Help for more information | ||
791 | # | ||
792 | CONFIG_USB_STORAGE=y | ||
793 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
794 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
795 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
796 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
797 | # CONFIG_USB_STORAGE_DPCM is not set | ||
798 | # CONFIG_USB_STORAGE_USBAT is not set | ||
799 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
800 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
801 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
802 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
803 | # CONFIG_USB_STORAGE_KARMA is not set | ||
804 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
805 | # CONFIG_USB_LIBUSUAL is not set | ||
806 | |||
807 | # | ||
808 | # USB Imaging devices | ||
809 | # | ||
810 | # CONFIG_USB_MDC800 is not set | ||
811 | # CONFIG_USB_MICROTEK is not set | ||
812 | CONFIG_USB_MON=y | ||
813 | |||
814 | # | ||
815 | # USB port drivers | ||
816 | # | ||
817 | # CONFIG_USB_SERIAL is not set | ||
818 | |||
819 | # | ||
820 | # USB Miscellaneous drivers | ||
821 | # | ||
822 | # CONFIG_USB_EMI62 is not set | ||
823 | # CONFIG_USB_EMI26 is not set | ||
824 | # CONFIG_USB_ADUTUX is not set | ||
825 | # CONFIG_USB_AUERSWALD is not set | ||
826 | # CONFIG_USB_RIO500 is not set | ||
827 | # CONFIG_USB_LEGOTOWER is not set | ||
828 | # CONFIG_USB_LCD is not set | ||
829 | # CONFIG_USB_BERRY_CHARGE is not set | ||
830 | # CONFIG_USB_LED is not set | ||
831 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
832 | # CONFIG_USB_CYTHERM is not set | ||
833 | # CONFIG_USB_PHIDGET is not set | ||
834 | # CONFIG_USB_IDMOUSE is not set | ||
835 | # CONFIG_USB_FTDI_ELAN is not set | ||
836 | # CONFIG_USB_APPLEDISPLAY is not set | ||
837 | # CONFIG_USB_LD is not set | ||
838 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
839 | # CONFIG_USB_IOWARRIOR is not set | ||
840 | # CONFIG_USB_TEST is not set | ||
841 | # CONFIG_USB_GADGET is not set | ||
842 | # CONFIG_MMC is not set | ||
843 | # CONFIG_MEMSTICK is not set | ||
844 | # CONFIG_NEW_LEDS is not set | ||
845 | # CONFIG_EDAC is not set | ||
846 | CONFIG_RTC_LIB=y | ||
847 | CONFIG_RTC_CLASS=y | ||
848 | CONFIG_RTC_HCTOSYS=y | ||
849 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
850 | # CONFIG_RTC_DEBUG is not set | ||
851 | |||
852 | # | ||
853 | # RTC interfaces | ||
854 | # | ||
855 | CONFIG_RTC_INTF_SYSFS=y | ||
856 | CONFIG_RTC_INTF_PROC=y | ||
857 | CONFIG_RTC_INTF_DEV=y | ||
858 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
859 | # CONFIG_RTC_DRV_TEST is not set | ||
860 | |||
861 | # | ||
862 | # I2C RTC drivers | ||
863 | # | ||
864 | CONFIG_RTC_DRV_DS1307=y | ||
865 | # CONFIG_RTC_DRV_DS1374 is not set | ||
866 | # CONFIG_RTC_DRV_DS1672 is not set | ||
867 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
868 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
869 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
870 | # CONFIG_RTC_DRV_X1205 is not set | ||
871 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
872 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
873 | # CONFIG_RTC_DRV_M41T80 is not set | ||
874 | # CONFIG_RTC_DRV_S35390A is not set | ||
875 | |||
876 | # | ||
877 | # SPI RTC drivers | ||
878 | # | ||
879 | |||
880 | # | ||
881 | # Platform RTC drivers | ||
882 | # | ||
883 | # CONFIG_RTC_DRV_CMOS is not set | ||
884 | # CONFIG_RTC_DRV_DS1511 is not set | ||
885 | # CONFIG_RTC_DRV_DS1553 is not set | ||
886 | # CONFIG_RTC_DRV_DS1742 is not set | ||
887 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
888 | # CONFIG_RTC_DRV_M48T86 is not set | ||
889 | # CONFIG_RTC_DRV_M48T59 is not set | ||
890 | # CONFIG_RTC_DRV_V3020 is not set | ||
891 | |||
892 | # | ||
893 | # on-CPU RTC drivers | ||
894 | # | ||
895 | # CONFIG_DMADEVICES is not set | ||
896 | # CONFIG_UIO is not set | ||
897 | |||
898 | # | ||
899 | # File systems | ||
900 | # | ||
901 | CONFIG_EXT2_FS=y | ||
902 | # CONFIG_EXT2_FS_XATTR is not set | ||
903 | # CONFIG_EXT2_FS_XIP is not set | ||
904 | CONFIG_EXT3_FS=y | ||
905 | CONFIG_EXT3_FS_XATTR=y | ||
906 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
907 | # CONFIG_EXT3_FS_SECURITY is not set | ||
908 | # CONFIG_EXT4DEV_FS is not set | ||
909 | CONFIG_JBD=y | ||
910 | CONFIG_FS_MBCACHE=y | ||
911 | # CONFIG_REISERFS_FS is not set | ||
912 | # CONFIG_JFS_FS is not set | ||
913 | # CONFIG_FS_POSIX_ACL is not set | ||
914 | # CONFIG_XFS_FS is not set | ||
915 | # CONFIG_OCFS2_FS is not set | ||
916 | CONFIG_DNOTIFY=y | ||
917 | CONFIG_INOTIFY=y | ||
918 | CONFIG_INOTIFY_USER=y | ||
919 | # CONFIG_QUOTA is not set | ||
920 | # CONFIG_AUTOFS_FS is not set | ||
921 | # CONFIG_AUTOFS4_FS is not set | ||
922 | # CONFIG_FUSE_FS is not set | ||
923 | |||
924 | # | ||
925 | # CD-ROM/DVD Filesystems | ||
926 | # | ||
927 | # CONFIG_ISO9660_FS is not set | ||
928 | # CONFIG_UDF_FS is not set | ||
929 | |||
930 | # | ||
931 | # DOS/FAT/NT Filesystems | ||
932 | # | ||
933 | CONFIG_FAT_FS=y | ||
934 | CONFIG_MSDOS_FS=y | ||
935 | CONFIG_VFAT_FS=y | ||
936 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
937 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
938 | # CONFIG_NTFS_FS is not set | ||
939 | |||
940 | # | ||
941 | # Pseudo filesystems | ||
942 | # | ||
943 | CONFIG_PROC_FS=y | ||
944 | CONFIG_PROC_KCORE=y | ||
945 | CONFIG_PROC_SYSCTL=y | ||
946 | CONFIG_SYSFS=y | ||
947 | CONFIG_TMPFS=y | ||
948 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
949 | # CONFIG_HUGETLB_PAGE is not set | ||
950 | # CONFIG_CONFIGFS_FS is not set | ||
951 | |||
952 | # | ||
953 | # Miscellaneous filesystems | ||
954 | # | ||
955 | # CONFIG_ADFS_FS is not set | ||
956 | # CONFIG_AFFS_FS is not set | ||
957 | # CONFIG_HFS_FS is not set | ||
958 | # CONFIG_HFSPLUS_FS is not set | ||
959 | # CONFIG_BEFS_FS is not set | ||
960 | # CONFIG_BFS_FS is not set | ||
961 | # CONFIG_EFS_FS is not set | ||
962 | CONFIG_JFFS2_FS=y | ||
963 | CONFIG_JFFS2_FS_DEBUG=0 | ||
964 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
965 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
966 | # CONFIG_JFFS2_SUMMARY is not set | ||
967 | # CONFIG_JFFS2_FS_XATTR is not set | ||
968 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
969 | CONFIG_JFFS2_ZLIB=y | ||
970 | # CONFIG_JFFS2_LZO is not set | ||
971 | CONFIG_JFFS2_RTIME=y | ||
972 | # CONFIG_JFFS2_RUBIN is not set | ||
973 | CONFIG_CRAMFS=y | ||
974 | # CONFIG_VXFS_FS is not set | ||
975 | # CONFIG_MINIX_FS is not set | ||
976 | # CONFIG_HPFS_FS is not set | ||
977 | # CONFIG_QNX4FS_FS is not set | ||
978 | # CONFIG_ROMFS_FS is not set | ||
979 | # CONFIG_SYSV_FS is not set | ||
980 | # CONFIG_UFS_FS is not set | ||
981 | CONFIG_NETWORK_FILESYSTEMS=y | ||
982 | CONFIG_NFS_FS=y | ||
983 | CONFIG_NFS_V3=y | ||
984 | # CONFIG_NFS_V3_ACL is not set | ||
985 | CONFIG_NFS_V4=y | ||
986 | # CONFIG_NFSD is not set | ||
987 | CONFIG_ROOT_NFS=y | ||
988 | CONFIG_LOCKD=y | ||
989 | CONFIG_LOCKD_V4=y | ||
990 | CONFIG_NFS_COMMON=y | ||
991 | CONFIG_SUNRPC=y | ||
992 | CONFIG_SUNRPC_GSS=y | ||
993 | # CONFIG_SUNRPC_BIND34 is not set | ||
994 | CONFIG_RPCSEC_GSS_KRB5=y | ||
995 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
996 | # CONFIG_SMB_FS is not set | ||
997 | # CONFIG_CIFS is not set | ||
998 | # CONFIG_NCP_FS is not set | ||
999 | # CONFIG_CODA_FS is not set | ||
1000 | # CONFIG_AFS_FS is not set | ||
1001 | |||
1002 | # | ||
1003 | # Partition Types | ||
1004 | # | ||
1005 | CONFIG_PARTITION_ADVANCED=y | ||
1006 | # CONFIG_ACORN_PARTITION is not set | ||
1007 | # CONFIG_OSF_PARTITION is not set | ||
1008 | # CONFIG_AMIGA_PARTITION is not set | ||
1009 | # CONFIG_ATARI_PARTITION is not set | ||
1010 | # CONFIG_MAC_PARTITION is not set | ||
1011 | CONFIG_MSDOS_PARTITION=y | ||
1012 | # CONFIG_BSD_DISKLABEL is not set | ||
1013 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1014 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1015 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1016 | # CONFIG_LDM_PARTITION is not set | ||
1017 | # CONFIG_SGI_PARTITION is not set | ||
1018 | # CONFIG_ULTRIX_PARTITION is not set | ||
1019 | # CONFIG_SUN_PARTITION is not set | ||
1020 | # CONFIG_KARMA_PARTITION is not set | ||
1021 | # CONFIG_EFI_PARTITION is not set | ||
1022 | # CONFIG_SYSV68_PARTITION is not set | ||
1023 | CONFIG_NLS=y | ||
1024 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1025 | CONFIG_NLS_CODEPAGE_437=y | ||
1026 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1027 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1028 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1029 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1030 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1031 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1032 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1033 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1034 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1035 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1036 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1037 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1038 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1039 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1040 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1041 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1042 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1043 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1044 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1045 | # CONFIG_NLS_ISO8859_8 is not set | ||
1046 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1047 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1048 | # CONFIG_NLS_ASCII is not set | ||
1049 | CONFIG_NLS_ISO8859_1=y | ||
1050 | # CONFIG_NLS_ISO8859_2 is not set | ||
1051 | # CONFIG_NLS_ISO8859_3 is not set | ||
1052 | # CONFIG_NLS_ISO8859_4 is not set | ||
1053 | # CONFIG_NLS_ISO8859_5 is not set | ||
1054 | # CONFIG_NLS_ISO8859_6 is not set | ||
1055 | # CONFIG_NLS_ISO8859_7 is not set | ||
1056 | # CONFIG_NLS_ISO8859_9 is not set | ||
1057 | # CONFIG_NLS_ISO8859_13 is not set | ||
1058 | # CONFIG_NLS_ISO8859_14 is not set | ||
1059 | # CONFIG_NLS_ISO8859_15 is not set | ||
1060 | # CONFIG_NLS_KOI8_R is not set | ||
1061 | # CONFIG_NLS_KOI8_U is not set | ||
1062 | # CONFIG_NLS_UTF8 is not set | ||
1063 | # CONFIG_DLM is not set | ||
1064 | |||
1065 | # | ||
1066 | # Library routines | ||
1067 | # | ||
1068 | CONFIG_BITREVERSE=y | ||
1069 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1070 | # CONFIG_CRC_CCITT is not set | ||
1071 | # CONFIG_CRC16 is not set | ||
1072 | # CONFIG_CRC_ITU_T is not set | ||
1073 | CONFIG_CRC32=y | ||
1074 | # CONFIG_CRC7 is not set | ||
1075 | # CONFIG_LIBCRC32C is not set | ||
1076 | CONFIG_ZLIB_INFLATE=y | ||
1077 | CONFIG_ZLIB_DEFLATE=y | ||
1078 | CONFIG_PLIST=y | ||
1079 | CONFIG_HAS_IOMEM=y | ||
1080 | CONFIG_HAS_IOPORT=y | ||
1081 | CONFIG_HAS_DMA=y | ||
1082 | CONFIG_HAVE_LMB=y | ||
1083 | |||
1084 | # | ||
1085 | # Kernel hacking | ||
1086 | # | ||
1087 | CONFIG_PRINTK_TIME=y | ||
1088 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1089 | CONFIG_ENABLE_MUST_CHECK=y | ||
1090 | CONFIG_FRAME_WARN=1024 | ||
1091 | # CONFIG_MAGIC_SYSRQ is not set | ||
1092 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1093 | # CONFIG_DEBUG_FS is not set | ||
1094 | # CONFIG_HEADERS_CHECK is not set | ||
1095 | CONFIG_DEBUG_KERNEL=y | ||
1096 | # CONFIG_DEBUG_SHIRQ is not set | ||
1097 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1098 | CONFIG_SCHED_DEBUG=y | ||
1099 | # CONFIG_SCHEDSTATS is not set | ||
1100 | # CONFIG_TIMER_STATS is not set | ||
1101 | # CONFIG_SLUB_DEBUG_ON is not set | ||
1102 | # CONFIG_SLUB_STATS is not set | ||
1103 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1104 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1105 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1106 | # CONFIG_DEBUG_MUTEXES is not set | ||
1107 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1108 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1109 | # CONFIG_DEBUG_KOBJECT is not set | ||
1110 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1111 | CONFIG_DEBUG_INFO=y | ||
1112 | # CONFIG_DEBUG_VM is not set | ||
1113 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1114 | # CONFIG_DEBUG_LIST is not set | ||
1115 | # CONFIG_DEBUG_SG is not set | ||
1116 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1117 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1118 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1119 | # CONFIG_FAULT_INJECTION is not set | ||
1120 | # CONFIG_SAMPLES is not set | ||
1121 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1122 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1123 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
1124 | # CONFIG_DEBUGGER is not set | ||
1125 | # CONFIG_IRQSTACKS is not set | ||
1126 | # CONFIG_BDI_SWITCH is not set | ||
1127 | # CONFIG_BOOTX_TEXT is not set | ||
1128 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1129 | |||
1130 | # | ||
1131 | # Security options | ||
1132 | # | ||
1133 | # CONFIG_KEYS is not set | ||
1134 | # CONFIG_SECURITY is not set | ||
1135 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1136 | CONFIG_CRYPTO=y | ||
1137 | |||
1138 | # | ||
1139 | # Crypto core or helper | ||
1140 | # | ||
1141 | CONFIG_CRYPTO_ALGAPI=y | ||
1142 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1143 | CONFIG_CRYPTO_MANAGER=y | ||
1144 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1145 | # CONFIG_CRYPTO_NULL is not set | ||
1146 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1147 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1148 | # CONFIG_CRYPTO_TEST is not set | ||
1149 | |||
1150 | # | ||
1151 | # Authenticated Encryption with Associated Data | ||
1152 | # | ||
1153 | # CONFIG_CRYPTO_CCM is not set | ||
1154 | # CONFIG_CRYPTO_GCM is not set | ||
1155 | # CONFIG_CRYPTO_SEQIV is not set | ||
1156 | |||
1157 | # | ||
1158 | # Block modes | ||
1159 | # | ||
1160 | CONFIG_CRYPTO_CBC=y | ||
1161 | # CONFIG_CRYPTO_CTR is not set | ||
1162 | # CONFIG_CRYPTO_CTS is not set | ||
1163 | CONFIG_CRYPTO_ECB=y | ||
1164 | # CONFIG_CRYPTO_LRW is not set | ||
1165 | CONFIG_CRYPTO_PCBC=y | ||
1166 | # CONFIG_CRYPTO_XTS is not set | ||
1167 | |||
1168 | # | ||
1169 | # Hash modes | ||
1170 | # | ||
1171 | # CONFIG_CRYPTO_HMAC is not set | ||
1172 | # CONFIG_CRYPTO_XCBC is not set | ||
1173 | |||
1174 | # | ||
1175 | # Digest | ||
1176 | # | ||
1177 | # CONFIG_CRYPTO_CRC32C is not set | ||
1178 | # CONFIG_CRYPTO_MD4 is not set | ||
1179 | CONFIG_CRYPTO_MD5=y | ||
1180 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1181 | # CONFIG_CRYPTO_SHA1 is not set | ||
1182 | # CONFIG_CRYPTO_SHA256 is not set | ||
1183 | # CONFIG_CRYPTO_SHA512 is not set | ||
1184 | # CONFIG_CRYPTO_TGR192 is not set | ||
1185 | # CONFIG_CRYPTO_WP512 is not set | ||
1186 | |||
1187 | # | ||
1188 | # Ciphers | ||
1189 | # | ||
1190 | # CONFIG_CRYPTO_AES is not set | ||
1191 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1192 | # CONFIG_CRYPTO_ARC4 is not set | ||
1193 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1194 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1195 | # CONFIG_CRYPTO_CAST5 is not set | ||
1196 | # CONFIG_CRYPTO_CAST6 is not set | ||
1197 | CONFIG_CRYPTO_DES=y | ||
1198 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1199 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1200 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1201 | # CONFIG_CRYPTO_SEED is not set | ||
1202 | # CONFIG_CRYPTO_SERPENT is not set | ||
1203 | # CONFIG_CRYPTO_TEA is not set | ||
1204 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1205 | |||
1206 | # | ||
1207 | # Compression | ||
1208 | # | ||
1209 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1210 | # CONFIG_CRYPTO_LZO is not set | ||
1211 | CONFIG_CRYPTO_HW=y | ||
1212 | CONFIG_PPC_CLOCK=y | ||
1213 | CONFIG_PPC_LIB_RHEAP=y | ||
1214 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index a20501f89474..88338a9f5e95 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig | |||
@@ -696,6 +696,7 @@ CONFIG_WINDFARM=y | |||
696 | CONFIG_WINDFARM_PM81=y | 696 | CONFIG_WINDFARM_PM81=y |
697 | CONFIG_WINDFARM_PM91=y | 697 | CONFIG_WINDFARM_PM91=y |
698 | CONFIG_WINDFARM_PM112=y | 698 | CONFIG_WINDFARM_PM112=y |
699 | CONFIG_WINDFARM_PM121=y | ||
699 | # CONFIG_PMAC_RACKMETER is not set | 700 | # CONFIG_PMAC_RACKMETER is not set |
700 | CONFIG_NETDEVICES=y | 701 | CONFIG_NETDEVICES=y |
701 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | 702 | # CONFIG_NETDEVICES_MULTIQUEUE is not set |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 9177b21b1a95..d14cebf62bb0 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -73,7 +73,6 @@ pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o | |||
73 | obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ | 73 | obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ |
74 | pci-common.o | 74 | pci-common.o |
75 | obj-$(CONFIG_PCI_MSI) += msi.o | 75 | obj-$(CONFIG_PCI_MSI) += msi.o |
76 | obj-$(CONFIG_RAPIDIO) += rio.o | ||
77 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ | 76 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ |
78 | machine_kexec_$(CONFIG_WORD_SIZE).o | 77 | machine_kexec_$(CONFIG_WORD_SIZE).o |
79 | obj-$(CONFIG_AUDIT) += audit.o | 78 | obj-$(CONFIG_AUDIT) += audit.o |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 62134845af08..ec9228d687b0 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/time.h> | 30 | #include <linux/time.h> |
31 | #include <linux/hardirq.h> | 31 | #include <linux/hardirq.h> |
32 | #endif | 32 | #endif |
33 | #include <linux/kbuild.h> | ||
33 | 34 | ||
34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
35 | #include <asm/page.h> | 36 | #include <asm/page.h> |
@@ -51,11 +52,6 @@ | |||
51 | #include <asm/iseries/alpaca.h> | 52 | #include <asm/iseries/alpaca.h> |
52 | #endif | 53 | #endif |
53 | 54 | ||
54 | #define DEFINE(sym, val) \ | ||
55 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
56 | |||
57 | #define BLANK() asm volatile("\n->" : : ) | ||
58 | |||
59 | int main(void) | 55 | int main(void) |
60 | { | 56 | { |
61 | DEFINE(THREAD, offsetof(struct task_struct, thread)); | 57 | DEFINE(THREAD, offsetof(struct task_struct, thread)); |
@@ -67,6 +63,7 @@ int main(void) | |||
67 | #endif /* CONFIG_PPC64 */ | 63 | #endif /* CONFIG_PPC64 */ |
68 | 64 | ||
69 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); | 65 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); |
66 | DEFINE(KSP_LIMIT, offsetof(struct thread_struct, ksp_limit)); | ||
70 | DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); | 67 | DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); |
71 | DEFINE(THREAD_FPEXC_MODE, offsetof(struct thread_struct, fpexc_mode)); | 68 | DEFINE(THREAD_FPEXC_MODE, offsetof(struct thread_struct, fpexc_mode)); |
72 | DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0])); | 69 | DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0])); |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 84c868633068..0c8614d9875c 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -137,11 +137,12 @@ transfer_to_handler: | |||
137 | 2: /* if from kernel, check interrupted DOZE/NAP mode and | 137 | 2: /* if from kernel, check interrupted DOZE/NAP mode and |
138 | * check for stack overflow | 138 | * check for stack overflow |
139 | */ | 139 | */ |
140 | lwz r9,THREAD_INFO-THREAD(r12) | 140 | lwz r9,KSP_LIMIT(r12) |
141 | cmplw r1,r9 /* if r1 <= current->thread_info */ | 141 | cmplw r1,r9 /* if r1 <= ksp_limit */ |
142 | ble- stack_ovf /* then the kernel stack overflowed */ | 142 | ble- stack_ovf /* then the kernel stack overflowed */ |
143 | 5: | 143 | 5: |
144 | #ifdef CONFIG_6xx | 144 | #ifdef CONFIG_6xx |
145 | rlwinm r9,r1,0,0,31-THREAD_SHIFT | ||
145 | tophys(r9,r9) /* check local flags */ | 146 | tophys(r9,r9) /* check local flags */ |
146 | lwz r12,TI_LOCAL_FLAGS(r9) | 147 | lwz r12,TI_LOCAL_FLAGS(r9) |
147 | mtcrf 0x01,r12 | 148 | mtcrf 0x01,r12 |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 215973a2c8d5..024805e1747d 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -239,6 +239,10 @@ instruction_access_slb_pSeries: | |||
239 | .globl system_call_pSeries | 239 | .globl system_call_pSeries |
240 | system_call_pSeries: | 240 | system_call_pSeries: |
241 | HMT_MEDIUM | 241 | HMT_MEDIUM |
242 | BEGIN_FTR_SECTION | ||
243 | cmpdi r0,0x1ebe | ||
244 | beq- 1f | ||
245 | END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) | ||
242 | mr r9,r13 | 246 | mr r9,r13 |
243 | mfmsr r10 | 247 | mfmsr r10 |
244 | mfspr r13,SPRN_SPRG3 | 248 | mfspr r13,SPRN_SPRG3 |
@@ -253,6 +257,13 @@ system_call_pSeries: | |||
253 | rfid | 257 | rfid |
254 | b . /* prevent speculative execution */ | 258 | b . /* prevent speculative execution */ |
255 | 259 | ||
260 | /* Fast LE/BE switch system call */ | ||
261 | 1: mfspr r12,SPRN_SRR1 | ||
262 | xori r12,r12,MSR_LE | ||
263 | mtspr SPRN_SRR1,r12 | ||
264 | rfid /* return to userspace */ | ||
265 | b . | ||
266 | |||
256 | STD_EXCEPTION_PSERIES(0xd00, single_step) | 267 | STD_EXCEPTION_PSERIES(0xd00, single_step) |
257 | STD_EXCEPTION_PSERIES(0xe00, trap_0e) | 268 | STD_EXCEPTION_PSERIES(0xe00, trap_0e) |
258 | 269 | ||
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 425616f92d18..2f73f705d564 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -307,6 +307,7 @@ void do_IRQ(struct pt_regs *regs) | |||
307 | if (curtp != irqtp) { | 307 | if (curtp != irqtp) { |
308 | struct irq_desc *desc = irq_desc + irq; | 308 | struct irq_desc *desc = irq_desc + irq; |
309 | void *handler = desc->handle_irq; | 309 | void *handler = desc->handle_irq; |
310 | unsigned long saved_sp_limit = current->thread.ksp_limit; | ||
310 | if (handler == NULL) | 311 | if (handler == NULL) |
311 | handler = &__do_IRQ; | 312 | handler = &__do_IRQ; |
312 | irqtp->task = curtp->task; | 313 | irqtp->task = curtp->task; |
@@ -319,7 +320,10 @@ void do_IRQ(struct pt_regs *regs) | |||
319 | (irqtp->preempt_count & ~SOFTIRQ_MASK) | | 320 | (irqtp->preempt_count & ~SOFTIRQ_MASK) | |
320 | (curtp->preempt_count & SOFTIRQ_MASK); | 321 | (curtp->preempt_count & SOFTIRQ_MASK); |
321 | 322 | ||
323 | current->thread.ksp_limit = (unsigned long)irqtp + | ||
324 | _ALIGN_UP(sizeof(struct thread_info), 16); | ||
322 | call_handle_irq(irq, desc, irqtp, handler); | 325 | call_handle_irq(irq, desc, irqtp, handler); |
326 | current->thread.ksp_limit = saved_sp_limit; | ||
323 | irqtp->task = NULL; | 327 | irqtp->task = NULL; |
324 | 328 | ||
325 | 329 | ||
@@ -352,9 +356,7 @@ void __init init_IRQ(void) | |||
352 | { | 356 | { |
353 | if (ppc_md.init_IRQ) | 357 | if (ppc_md.init_IRQ) |
354 | ppc_md.init_IRQ(); | 358 | ppc_md.init_IRQ(); |
355 | #ifdef CONFIG_PPC64 | ||
356 | irq_ctx_init(); | 359 | irq_ctx_init(); |
357 | #endif | ||
358 | } | 360 | } |
359 | 361 | ||
360 | 362 | ||
@@ -383,11 +385,15 @@ void irq_ctx_init(void) | |||
383 | static inline void do_softirq_onstack(void) | 385 | static inline void do_softirq_onstack(void) |
384 | { | 386 | { |
385 | struct thread_info *curtp, *irqtp; | 387 | struct thread_info *curtp, *irqtp; |
388 | unsigned long saved_sp_limit = current->thread.ksp_limit; | ||
386 | 389 | ||
387 | curtp = current_thread_info(); | 390 | curtp = current_thread_info(); |
388 | irqtp = softirq_ctx[smp_processor_id()]; | 391 | irqtp = softirq_ctx[smp_processor_id()]; |
389 | irqtp->task = curtp->task; | 392 | irqtp->task = curtp->task; |
393 | current->thread.ksp_limit = (unsigned long)irqtp + | ||
394 | _ALIGN_UP(sizeof(struct thread_info), 16); | ||
390 | call_do_softirq(irqtp); | 395 | call_do_softirq(irqtp); |
396 | current->thread.ksp_limit = saved_sp_limit; | ||
391 | irqtp->task = NULL; | 397 | irqtp->task = NULL; |
392 | } | 398 | } |
393 | 399 | ||
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1ffacc698ffb..1e656b43ad7f 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -591,10 +591,8 @@ int __init lparcfg_init(void) | |||
591 | !firmware_has_feature(FW_FEATURE_ISERIES)) | 591 | !firmware_has_feature(FW_FEATURE_ISERIES)) |
592 | mode |= S_IWUSR; | 592 | mode |= S_IWUSR; |
593 | 593 | ||
594 | ent = create_proc_entry("ppc64/lparcfg", mode, NULL); | 594 | ent = proc_create("ppc64/lparcfg", mode, NULL, &lparcfg_fops); |
595 | if (ent) { | 595 | if (!ent) { |
596 | ent->proc_fops = &lparcfg_fops; | ||
597 | } else { | ||
598 | printk(KERN_ERR "Failed to create ppc64/lparcfg\n"); | 596 | printk(KERN_ERR "Failed to create ppc64/lparcfg\n"); |
599 | return -EIO; | 597 | return -EIO; |
600 | } | 598 | } |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 2d202f274e73..29a0e039d436 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -74,20 +74,20 @@ void __init reserve_crashkernel(void) | |||
74 | ret = parse_crashkernel(boot_command_line, lmb_phys_mem_size(), | 74 | ret = parse_crashkernel(boot_command_line, lmb_phys_mem_size(), |
75 | &crash_size, &crash_base); | 75 | &crash_size, &crash_base); |
76 | if (ret == 0 && crash_size > 0) { | 76 | if (ret == 0 && crash_size > 0) { |
77 | if (crash_base == 0) | ||
78 | crash_base = KDUMP_KERNELBASE; | ||
79 | crashk_res.start = crash_base; | 77 | crashk_res.start = crash_base; |
80 | } else { | 78 | crashk_res.end = crash_base + crash_size - 1; |
81 | /* handle the device tree */ | ||
82 | crash_size = crashk_res.end - crashk_res.start + 1; | ||
83 | } | 79 | } |
84 | 80 | ||
85 | if (crash_size == 0) | 81 | if (crashk_res.end == crashk_res.start) { |
82 | crashk_res.start = crashk_res.end = 0; | ||
86 | return; | 83 | return; |
84 | } | ||
87 | 85 | ||
88 | /* We might have got these values via the command line or the | 86 | /* We might have got these values via the command line or the |
89 | * device tree, either way sanitise them now. */ | 87 | * device tree, either way sanitise them now. */ |
90 | 88 | ||
89 | crash_size = crashk_res.end - crashk_res.start + 1; | ||
90 | |||
91 | if (crashk_res.start != KDUMP_KERNELBASE) | 91 | if (crashk_res.start != KDUMP_KERNELBASE) |
92 | printk("Crash kernel location must be 0x%x\n", | 92 | printk("Crash kernel location must be 0x%x\n", |
93 | KDUMP_KERNELBASE); | 93 | KDUMP_KERNELBASE); |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 92ccc6fcc5b0..89aaaa6f3561 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -32,6 +32,31 @@ | |||
32 | 32 | ||
33 | .text | 33 | .text |
34 | 34 | ||
35 | #ifdef CONFIG_IRQSTACKS | ||
36 | _GLOBAL(call_do_softirq) | ||
37 | mflr r0 | ||
38 | stw r0,4(r1) | ||
39 | stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r3) | ||
40 | mr r1,r3 | ||
41 | bl __do_softirq | ||
42 | lwz r1,0(r1) | ||
43 | lwz r0,4(r1) | ||
44 | mtlr r0 | ||
45 | blr | ||
46 | |||
47 | _GLOBAL(call_handle_irq) | ||
48 | mflr r0 | ||
49 | stw r0,4(r1) | ||
50 | mtctr r6 | ||
51 | stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r5) | ||
52 | mr r1,r5 | ||
53 | bctrl | ||
54 | lwz r1,0(r1) | ||
55 | lwz r0,4(r1) | ||
56 | mtlr r0 | ||
57 | blr | ||
58 | #endif /* CONFIG_IRQSTACKS */ | ||
59 | |||
35 | /* | 60 | /* |
36 | * This returns the high 64 bits of the product of two 64-bit numbers. | 61 | * This returns the high 64 bits of the product of two 64-bit numbers. |
37 | */ | 62 | */ |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 09fcb50c45ae..cf6b5a7d8b3f 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -133,9 +133,6 @@ EXPORT_SYMBOL(adb_try_handler_change); | |||
133 | EXPORT_SYMBOL(cuda_request); | 133 | EXPORT_SYMBOL(cuda_request); |
134 | EXPORT_SYMBOL(cuda_poll); | 134 | EXPORT_SYMBOL(cuda_poll); |
135 | #endif /* CONFIG_ADB_CUDA */ | 135 | #endif /* CONFIG_ADB_CUDA */ |
136 | #ifdef CONFIG_VT | ||
137 | EXPORT_SYMBOL(kd_mksound); | ||
138 | #endif | ||
139 | EXPORT_SYMBOL(to_tm); | 136 | EXPORT_SYMBOL(to_tm); |
140 | 137 | ||
141 | #ifdef CONFIG_PPC32 | 138 | #ifdef CONFIG_PPC32 |
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c index f78dfce1b771..c647ddef40dc 100644 --- a/arch/powerpc/kernel/proc_ppc64.c +++ b/arch/powerpc/kernel/proc_ppc64.c | |||
@@ -68,12 +68,11 @@ static int __init proc_ppc64_init(void) | |||
68 | { | 68 | { |
69 | struct proc_dir_entry *pde; | 69 | struct proc_dir_entry *pde; |
70 | 70 | ||
71 | pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); | 71 | pde = proc_create_data("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL, |
72 | &page_map_fops, vdso_data); | ||
72 | if (!pde) | 73 | if (!pde) |
73 | return 1; | 74 | return 1; |
74 | pde->data = vdso_data; | ||
75 | pde->size = PAGE_SIZE; | 75 | pde->size = PAGE_SIZE; |
76 | pde->proc_fops = &page_map_fops; | ||
77 | 76 | ||
78 | return 0; | 77 | return 0; |
79 | } | 78 | } |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 6caad17ea72e..7de41c3948ec 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -589,6 +589,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
589 | kregs = (struct pt_regs *) sp; | 589 | kregs = (struct pt_regs *) sp; |
590 | sp -= STACK_FRAME_OVERHEAD; | 590 | sp -= STACK_FRAME_OVERHEAD; |
591 | p->thread.ksp = sp; | 591 | p->thread.ksp = sp; |
592 | p->thread.ksp_limit = (unsigned long)task_stack_page(p) + | ||
593 | _ALIGN_UP(sizeof(struct thread_info), 16); | ||
592 | 594 | ||
593 | #ifdef CONFIG_PPC64 | 595 | #ifdef CONFIG_PPC64 |
594 | if (cpu_has_feature(CPU_FTR_SLB)) { | 596 | if (cpu_has_feature(CPU_FTR_SLB)) { |
diff --git a/arch/powerpc/kernel/rio.c b/arch/powerpc/kernel/rio.c deleted file mode 100644 index 29487fedfc76..000000000000 --- a/arch/powerpc/kernel/rio.c +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * RapidIO PPC32 support | ||
3 | * | ||
4 | * Copyright 2005 MontaVista Software, Inc. | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/rio.h> | ||
16 | |||
17 | #include <asm/rio.h> | ||
18 | |||
19 | /** | ||
20 | * platform_rio_init - Do platform specific RIO init | ||
21 | * | ||
22 | * Any platform specific initialization of RapdIO | ||
23 | * hardware is done here as well as registration | ||
24 | * of any active master ports in the system. | ||
25 | */ | ||
26 | void __attribute__ ((weak)) | ||
27 | platform_rio_init(void) | ||
28 | { | ||
29 | printk(KERN_WARNING "RIO: No platform_rio_init() present\n"); | ||
30 | } | ||
31 | |||
32 | /** | ||
33 | * ppc_rio_init - Do PPC32 RIO init | ||
34 | * | ||
35 | * Calls platform-specific RIO init code and then calls | ||
36 | * rio_init_mports() to initialize any master ports that | ||
37 | * have been registered with the RIO subsystem. | ||
38 | */ | ||
39 | static int __init ppc_rio_init(void) | ||
40 | { | ||
41 | printk(KERN_INFO "RIO: RapidIO init\n"); | ||
42 | |||
43 | /* Platform specific initialization */ | ||
44 | platform_rio_init(); | ||
45 | |||
46 | /* Enumerate all registered ports */ | ||
47 | rio_init_mports(); | ||
48 | |||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | subsys_initcall(ppc_rio_init); | ||
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index f2e3bc714d76..f9c6abc84a94 100644 --- a/arch/powerpc/kernel/rtas-proc.c +++ b/arch/powerpc/kernel/rtas-proc.c | |||
@@ -255,8 +255,6 @@ static void check_location(struct seq_file *m, const char *c); | |||
255 | 255 | ||
256 | static int __init proc_rtas_init(void) | 256 | static int __init proc_rtas_init(void) |
257 | { | 257 | { |
258 | struct proc_dir_entry *entry; | ||
259 | |||
260 | if (!machine_is(pseries)) | 258 | if (!machine_is(pseries)) |
261 | return -ENODEV; | 259 | return -ENODEV; |
262 | 260 | ||
@@ -264,35 +262,20 @@ static int __init proc_rtas_init(void) | |||
264 | if (rtas_node == NULL) | 262 | if (rtas_node == NULL) |
265 | return -ENODEV; | 263 | return -ENODEV; |
266 | 264 | ||
267 | entry = create_proc_entry("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL); | 265 | proc_create("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL, |
268 | if (entry) | 266 | &ppc_rtas_progress_operations); |
269 | entry->proc_fops = &ppc_rtas_progress_operations; | 267 | proc_create("ppc64/rtas/clock", S_IRUGO|S_IWUSR, NULL, |
270 | 268 | &ppc_rtas_clock_operations); | |
271 | entry = create_proc_entry("ppc64/rtas/clock", S_IRUGO|S_IWUSR, NULL); | 269 | proc_create("ppc64/rtas/poweron", S_IWUSR|S_IRUGO, NULL, |
272 | if (entry) | 270 | &ppc_rtas_poweron_operations); |
273 | entry->proc_fops = &ppc_rtas_clock_operations; | 271 | proc_create("ppc64/rtas/sensors", S_IRUGO, NULL, |
274 | 272 | &ppc_rtas_sensors_operations); | |
275 | entry = create_proc_entry("ppc64/rtas/poweron", S_IWUSR|S_IRUGO, NULL); | 273 | proc_create("ppc64/rtas/frequency", S_IWUSR|S_IRUGO, NULL, |
276 | if (entry) | 274 | &ppc_rtas_tone_freq_operations); |
277 | entry->proc_fops = &ppc_rtas_poweron_operations; | 275 | proc_create("ppc64/rtas/volume", S_IWUSR|S_IRUGO, NULL, |
278 | 276 | &ppc_rtas_tone_volume_operations); | |
279 | entry = create_proc_entry("ppc64/rtas/sensors", S_IRUGO, NULL); | 277 | proc_create("ppc64/rtas/rmo_buffer", S_IRUSR, NULL, |
280 | if (entry) | 278 | &ppc_rtas_rmo_buf_ops); |
281 | entry->proc_fops = &ppc_rtas_sensors_operations; | ||
282 | |||
283 | entry = create_proc_entry("ppc64/rtas/frequency", S_IWUSR|S_IRUGO, | ||
284 | NULL); | ||
285 | if (entry) | ||
286 | entry->proc_fops = &ppc_rtas_tone_freq_operations; | ||
287 | |||
288 | entry = create_proc_entry("ppc64/rtas/volume", S_IWUSR|S_IRUGO, NULL); | ||
289 | if (entry) | ||
290 | entry->proc_fops = &ppc_rtas_tone_volume_operations; | ||
291 | |||
292 | entry = create_proc_entry("ppc64/rtas/rmo_buffer", S_IRUSR, NULL); | ||
293 | if (entry) | ||
294 | entry->proc_fops = &ppc_rtas_rmo_buf_ops; | ||
295 | |||
296 | return 0; | 279 | return 0; |
297 | } | 280 | } |
298 | 281 | ||
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 627f126d1848..0a5e22b22729 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -704,18 +704,11 @@ static int initialize_flash_pde_data(const char *rtas_call_name, | |||
704 | static struct proc_dir_entry *create_flash_pde(const char *filename, | 704 | static struct proc_dir_entry *create_flash_pde(const char *filename, |
705 | const struct file_operations *fops) | 705 | const struct file_operations *fops) |
706 | { | 706 | { |
707 | struct proc_dir_entry *ent = NULL; | 707 | return proc_create(filename, S_IRUSR | S_IWUSR, NULL, fops); |
708 | |||
709 | ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); | ||
710 | if (ent != NULL) { | ||
711 | ent->proc_fops = fops; | ||
712 | ent->owner = THIS_MODULE; | ||
713 | } | ||
714 | |||
715 | return ent; | ||
716 | } | 708 | } |
717 | 709 | ||
718 | static const struct file_operations rtas_flash_operations = { | 710 | static const struct file_operations rtas_flash_operations = { |
711 | .owner = THIS_MODULE, | ||
719 | .read = rtas_flash_read, | 712 | .read = rtas_flash_read, |
720 | .write = rtas_flash_write, | 713 | .write = rtas_flash_write, |
721 | .open = rtas_excl_open, | 714 | .open = rtas_excl_open, |
@@ -723,6 +716,7 @@ static const struct file_operations rtas_flash_operations = { | |||
723 | }; | 716 | }; |
724 | 717 | ||
725 | static const struct file_operations manage_flash_operations = { | 718 | static const struct file_operations manage_flash_operations = { |
719 | .owner = THIS_MODULE, | ||
726 | .read = manage_flash_read, | 720 | .read = manage_flash_read, |
727 | .write = manage_flash_write, | 721 | .write = manage_flash_write, |
728 | .open = rtas_excl_open, | 722 | .open = rtas_excl_open, |
@@ -730,6 +724,7 @@ static const struct file_operations manage_flash_operations = { | |||
730 | }; | 724 | }; |
731 | 725 | ||
732 | static const struct file_operations validate_flash_operations = { | 726 | static const struct file_operations validate_flash_operations = { |
727 | .owner = THIS_MODULE, | ||
733 | .read = validate_flash_read, | 728 | .read = validate_flash_read, |
734 | .write = validate_flash_write, | 729 | .write = validate_flash_write, |
735 | .open = rtas_excl_open, | 730 | .open = rtas_excl_open, |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 36f6779c88d4..5112a4aa801d 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/root_dev.h> | 16 | #include <linux/root_dev.h> |
17 | #include <linux/cpu.h> | 17 | #include <linux/cpu.h> |
18 | #include <linux/console.h> | 18 | #include <linux/console.h> |
19 | #include <linux/lmb.h> | ||
19 | 20 | ||
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
@@ -229,6 +230,24 @@ int __init ppc_init(void) | |||
229 | 230 | ||
230 | arch_initcall(ppc_init); | 231 | arch_initcall(ppc_init); |
231 | 232 | ||
233 | #ifdef CONFIG_IRQSTACKS | ||
234 | static void __init irqstack_early_init(void) | ||
235 | { | ||
236 | unsigned int i; | ||
237 | |||
238 | /* interrupt stacks must be in lowmem, we get that for free on ppc32 | ||
239 | * as the lmb is limited to lowmem by LMB_REAL_LIMIT */ | ||
240 | for_each_possible_cpu(i) { | ||
241 | softirq_ctx[i] = (struct thread_info *) | ||
242 | __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); | ||
243 | hardirq_ctx[i] = (struct thread_info *) | ||
244 | __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); | ||
245 | } | ||
246 | } | ||
247 | #else | ||
248 | #define irqstack_early_init() | ||
249 | #endif | ||
250 | |||
232 | /* Warning, IO base is not yet inited */ | 251 | /* Warning, IO base is not yet inited */ |
233 | void __init setup_arch(char **cmdline_p) | 252 | void __init setup_arch(char **cmdline_p) |
234 | { | 253 | { |
@@ -286,6 +305,8 @@ void __init setup_arch(char **cmdline_p) | |||
286 | init_mm.end_data = (unsigned long) _edata; | 305 | init_mm.end_data = (unsigned long) _edata; |
287 | init_mm.brk = klimit; | 306 | init_mm.brk = klimit; |
288 | 307 | ||
308 | irqstack_early_init(); | ||
309 | |||
289 | /* set up the bootmem stuff with available memory */ | 310 | /* set up the bootmem stuff with available memory */ |
290 | do_init_bootmem(); | 311 | do_init_bootmem(); |
291 | if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab); | 312 | if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index dff6308d1b5e..25e3fd8606ab 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -487,9 +487,12 @@ static void __init emergency_stack_init(void) | |||
487 | */ | 487 | */ |
488 | limit = min(0x10000000UL, lmb.rmo_size); | 488 | limit = min(0x10000000UL, lmb.rmo_size); |
489 | 489 | ||
490 | for_each_possible_cpu(i) | 490 | for_each_possible_cpu(i) { |
491 | paca[i].emergency_sp = | 491 | unsigned long sp; |
492 | __va(lmb_alloc_base(HW_PAGE_SIZE, 128, limit)) + HW_PAGE_SIZE; | 492 | sp = lmb_alloc_base(THREAD_SIZE, THREAD_SIZE, limit); |
493 | sp += THREAD_SIZE; | ||
494 | paca[i].emergency_sp = __va(sp); | ||
495 | } | ||
493 | } | 496 | } |
494 | 497 | ||
495 | /* | 498 | /* |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index d9e37f365b54..f67e118116fa 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -154,19 +154,35 @@ out: | |||
154 | 154 | ||
155 | /* | 155 | /* |
156 | * walk_memory_resource() needs to make sure there is no holes in a given | 156 | * walk_memory_resource() needs to make sure there is no holes in a given |
157 | * memory range. On PPC64, since this range comes from /sysfs, the range | 157 | * memory range. PPC64 does not maintain the memory layout in /proc/iomem. |
158 | * is guaranteed to be valid, non-overlapping and can not contain any | 158 | * Instead it maintains it in lmb.memory structures. Walk through the |
159 | * holes. By the time we get here (memory add or remove), /proc/device-tree | 159 | * memory regions, find holes and callback for contiguous regions. |
160 | * is updated and correct. Only reason we need to check against device-tree | ||
161 | * would be if we allow user-land to specify a memory range through a | ||
162 | * system call/ioctl etc. instead of doing offline/online through /sysfs. | ||
163 | */ | 160 | */ |
164 | int | 161 | int |
165 | walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg, | 162 | walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg, |
166 | int (*func)(unsigned long, unsigned long, void *)) | 163 | int (*func)(unsigned long, unsigned long, void *)) |
167 | { | 164 | { |
168 | return (*func)(start_pfn, nr_pages, arg); | 165 | struct lmb_property res; |
166 | unsigned long pfn, len; | ||
167 | u64 end; | ||
168 | int ret = -1; | ||
169 | |||
170 | res.base = (u64) start_pfn << PAGE_SHIFT; | ||
171 | res.size = (u64) nr_pages << PAGE_SHIFT; | ||
172 | |||
173 | end = res.base + res.size - 1; | ||
174 | while ((res.base < end) && (lmb_find(&res) >= 0)) { | ||
175 | pfn = (unsigned long)(res.base >> PAGE_SHIFT); | ||
176 | len = (unsigned long)(res.size >> PAGE_SHIFT); | ||
177 | ret = (*func)(pfn, len, arg); | ||
178 | if (ret) | ||
179 | break; | ||
180 | res.base += (res.size + 1); | ||
181 | res.size = (end - res.base + 1); | ||
182 | } | ||
183 | return ret; | ||
169 | } | 184 | } |
185 | EXPORT_SYMBOL_GPL(walk_memory_resource); | ||
170 | 186 | ||
171 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 187 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
172 | 188 | ||
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index cf945d55c276..acd2fc8cf492 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
@@ -44,3 +44,9 @@ config PPC_MPC5200_BUGFIX | |||
44 | 44 | ||
45 | It is safe to say 'Y' here | 45 | It is safe to say 'Y' here |
46 | 46 | ||
47 | config PPC_MPC5200_GPIO | ||
48 | bool "MPC5200 GPIO support" | ||
49 | depends on PPC_MPC52xx | ||
50 | select HAVE_GPIO_LIB | ||
51 | help | ||
52 | Enable gpiolib support for mpc5200 based boards | ||
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile index fe1b81bb5224..daf0e1568d6d 100644 --- a/arch/powerpc/platforms/52xx/Makefile +++ b/arch/powerpc/platforms/52xx/Makefile | |||
@@ -14,3 +14,5 @@ obj-$(CONFIG_PM) += mpc52xx_sleep.o mpc52xx_pm.o | |||
14 | ifeq ($(CONFIG_PPC_LITE5200),y) | 14 | ifeq ($(CONFIG_PPC_LITE5200),y) |
15 | obj-$(CONFIG_PM) += lite5200_sleep.o lite5200_pm.o | 15 | obj-$(CONFIG_PM) += lite5200_sleep.o lite5200_pm.o |
16 | endif | 16 | endif |
17 | |||
18 | obj-$(CONFIG_PPC_MPC5200_GPIO) += mpc52xx_gpio.o \ No newline at end of file | ||
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c index c48b82bc2aad..a3bda0b9f1ff 100644 --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -51,6 +51,7 @@ static void __init mpc5200_simple_setup_arch(void) | |||
51 | /* list of the supported boards */ | 51 | /* list of the supported boards */ |
52 | static char *board[] __initdata = { | 52 | static char *board[] __initdata = { |
53 | "promess,motionpro", | 53 | "promess,motionpro", |
54 | "phytec,pcm030", | ||
54 | "schindler,cm5200", | 55 | "schindler,cm5200", |
55 | "tqc,tqm5200", | 56 | "tqc,tqm5200", |
56 | NULL | 57 | NULL |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c new file mode 100644 index 000000000000..48da5dfe4856 --- /dev/null +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c | |||
@@ -0,0 +1,465 @@ | |||
1 | /* | ||
2 | * MPC52xx gpio driver | ||
3 | * | ||
4 | * Copyright (c) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/of.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/of_gpio.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/of_platform.h> | ||
25 | |||
26 | #include <asm/gpio.h> | ||
27 | #include <asm/mpc52xx.h> | ||
28 | #include <sysdev/fsl_soc.h> | ||
29 | |||
30 | static DEFINE_SPINLOCK(gpio_lock); | ||
31 | |||
32 | struct mpc52xx_gpiochip { | ||
33 | struct of_mm_gpio_chip mmchip; | ||
34 | unsigned int shadow_dvo; | ||
35 | unsigned int shadow_gpioe; | ||
36 | unsigned int shadow_ddr; | ||
37 | }; | ||
38 | |||
39 | /* | ||
40 | * GPIO LIB API implementation for wakeup GPIOs. | ||
41 | * | ||
42 | * There's a maximum of 8 wakeup GPIOs. Which of these are available | ||
43 | * for use depends on your board setup. | ||
44 | * | ||
45 | * 0 -> GPIO_WKUP_7 | ||
46 | * 1 -> GPIO_WKUP_6 | ||
47 | * 2 -> PSC6_1 | ||
48 | * 3 -> PSC6_0 | ||
49 | * 4 -> ETH_17 | ||
50 | * 5 -> PSC3_9 | ||
51 | * 6 -> PSC2_4 | ||
52 | * 7 -> PSC1_4 | ||
53 | * | ||
54 | */ | ||
55 | static int mpc52xx_wkup_gpio_get(struct gpio_chip *gc, unsigned int gpio) | ||
56 | { | ||
57 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
58 | struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; | ||
59 | unsigned int ret; | ||
60 | |||
61 | ret = (in_8(®s->wkup_ival) >> (7 - gpio)) & 1; | ||
62 | |||
63 | pr_debug("%s: gpio: %d ret: %d\n", __func__, gpio, ret); | ||
64 | |||
65 | return ret; | ||
66 | } | ||
67 | |||
68 | static inline void | ||
69 | __mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) | ||
70 | { | ||
71 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
72 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | ||
73 | struct mpc52xx_gpiochip, mmchip); | ||
74 | struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; | ||
75 | |||
76 | if (val) | ||
77 | chip->shadow_dvo |= 1 << (7 - gpio); | ||
78 | else | ||
79 | chip->shadow_dvo &= ~(1 << (7 - gpio)); | ||
80 | |||
81 | out_8(®s->wkup_dvo, chip->shadow_dvo); | ||
82 | } | ||
83 | |||
84 | static void | ||
85 | mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) | ||
86 | { | ||
87 | unsigned long flags; | ||
88 | |||
89 | spin_lock_irqsave(&gpio_lock, flags); | ||
90 | |||
91 | __mpc52xx_wkup_gpio_set(gc, gpio, val); | ||
92 | |||
93 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
94 | |||
95 | pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); | ||
96 | } | ||
97 | |||
98 | static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | ||
99 | { | ||
100 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
101 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | ||
102 | struct mpc52xx_gpiochip, mmchip); | ||
103 | struct mpc52xx_gpio_wkup *regs = mm_gc->regs; | ||
104 | unsigned long flags; | ||
105 | |||
106 | spin_lock_irqsave(&gpio_lock, flags); | ||
107 | |||
108 | /* set the direction */ | ||
109 | chip->shadow_ddr &= ~(1 << (7 - gpio)); | ||
110 | out_8(®s->wkup_ddr, chip->shadow_ddr); | ||
111 | |||
112 | /* and enable the pin */ | ||
113 | chip->shadow_gpioe |= 1 << (7 - gpio); | ||
114 | out_8(®s->wkup_gpioe, chip->shadow_gpioe); | ||
115 | |||
116 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | static int | ||
122 | mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | ||
123 | { | ||
124 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
125 | struct mpc52xx_gpio_wkup *regs = mm_gc->regs; | ||
126 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | ||
127 | struct mpc52xx_gpiochip, mmchip); | ||
128 | unsigned long flags; | ||
129 | |||
130 | spin_lock_irqsave(&gpio_lock, flags); | ||
131 | |||
132 | __mpc52xx_wkup_gpio_set(gc, gpio, val); | ||
133 | |||
134 | /* Then set direction */ | ||
135 | chip->shadow_ddr |= 1 << (7 - gpio); | ||
136 | out_8(®s->wkup_ddr, chip->shadow_ddr); | ||
137 | |||
138 | /* Finally enable the pin */ | ||
139 | chip->shadow_gpioe |= 1 << (7 - gpio); | ||
140 | out_8(®s->wkup_gpioe, chip->shadow_gpioe); | ||
141 | |||
142 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
143 | |||
144 | pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); | ||
145 | |||
146 | return 0; | ||
147 | } | ||
148 | |||
149 | static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev, | ||
150 | const struct of_device_id *match) | ||
151 | { | ||
152 | struct mpc52xx_gpiochip *chip; | ||
153 | struct mpc52xx_gpio_wkup *regs; | ||
154 | struct of_gpio_chip *ofchip; | ||
155 | int ret; | ||
156 | |||
157 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | ||
158 | if (!chip) | ||
159 | return -ENOMEM; | ||
160 | |||
161 | ofchip = &chip->mmchip.of_gc; | ||
162 | |||
163 | ofchip->gpio_cells = 2; | ||
164 | ofchip->gc.ngpio = 8; | ||
165 | ofchip->gc.direction_input = mpc52xx_wkup_gpio_dir_in; | ||
166 | ofchip->gc.direction_output = mpc52xx_wkup_gpio_dir_out; | ||
167 | ofchip->gc.get = mpc52xx_wkup_gpio_get; | ||
168 | ofchip->gc.set = mpc52xx_wkup_gpio_set; | ||
169 | |||
170 | ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip); | ||
171 | if (ret) | ||
172 | return ret; | ||
173 | |||
174 | regs = chip->mmchip.regs; | ||
175 | chip->shadow_gpioe = in_8(®s->wkup_gpioe); | ||
176 | chip->shadow_ddr = in_8(®s->wkup_ddr); | ||
177 | chip->shadow_dvo = in_8(®s->wkup_dvo); | ||
178 | |||
179 | return 0; | ||
180 | } | ||
181 | |||
182 | static int mpc52xx_gpiochip_remove(struct of_device *ofdev) | ||
183 | { | ||
184 | return -EBUSY; | ||
185 | } | ||
186 | |||
187 | static const struct of_device_id mpc52xx_wkup_gpiochip_match[] = { | ||
188 | { | ||
189 | .compatible = "fsl,mpc5200-gpio-wkup", | ||
190 | }, | ||
191 | {} | ||
192 | }; | ||
193 | |||
194 | static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = { | ||
195 | .name = "gpio_wkup", | ||
196 | .match_table = mpc52xx_wkup_gpiochip_match, | ||
197 | .probe = mpc52xx_wkup_gpiochip_probe, | ||
198 | .remove = mpc52xx_gpiochip_remove, | ||
199 | }; | ||
200 | |||
201 | /* | ||
202 | * GPIO LIB API implementation for simple GPIOs | ||
203 | * | ||
204 | * There's a maximum of 32 simple GPIOs. Which of these are available | ||
205 | * for use depends on your board setup. | ||
206 | * The numbering reflects the bit numbering in the port registers: | ||
207 | * | ||
208 | * 0..1 > reserved | ||
209 | * 2..3 > IRDA | ||
210 | * 4..7 > ETHR | ||
211 | * 8..11 > reserved | ||
212 | * 12..15 > USB | ||
213 | * 16..17 > reserved | ||
214 | * 18..23 > PSC3 | ||
215 | * 24..27 > PSC2 | ||
216 | * 28..31 > PSC1 | ||
217 | */ | ||
218 | static int mpc52xx_simple_gpio_get(struct gpio_chip *gc, unsigned int gpio) | ||
219 | { | ||
220 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
221 | struct mpc52xx_gpio __iomem *regs = mm_gc->regs; | ||
222 | unsigned int ret; | ||
223 | |||
224 | ret = (in_be32(®s->simple_ival) >> (31 - gpio)) & 1; | ||
225 | |||
226 | return ret; | ||
227 | } | ||
228 | |||
229 | static inline void | ||
230 | __mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) | ||
231 | { | ||
232 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
233 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | ||
234 | struct mpc52xx_gpiochip, mmchip); | ||
235 | struct mpc52xx_gpio __iomem *regs = mm_gc->regs; | ||
236 | |||
237 | if (val) | ||
238 | chip->shadow_dvo |= 1 << (31 - gpio); | ||
239 | else | ||
240 | chip->shadow_dvo &= ~(1 << (31 - gpio)); | ||
241 | out_be32(®s->simple_dvo, chip->shadow_dvo); | ||
242 | } | ||
243 | |||
244 | static void | ||
245 | mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) | ||
246 | { | ||
247 | unsigned long flags; | ||
248 | |||
249 | spin_lock_irqsave(&gpio_lock, flags); | ||
250 | |||
251 | __mpc52xx_simple_gpio_set(gc, gpio, val); | ||
252 | |||
253 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
254 | |||
255 | pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); | ||
256 | } | ||
257 | |||
258 | static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | ||
259 | { | ||
260 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
261 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | ||
262 | struct mpc52xx_gpiochip, mmchip); | ||
263 | struct mpc52xx_gpio *regs = mm_gc->regs; | ||
264 | unsigned long flags; | ||
265 | |||
266 | spin_lock_irqsave(&gpio_lock, flags); | ||
267 | |||
268 | /* set the direction */ | ||
269 | chip->shadow_ddr &= ~(1 << (31 - gpio)); | ||
270 | out_be32(®s->simple_ddr, chip->shadow_ddr); | ||
271 | |||
272 | /* and enable the pin */ | ||
273 | chip->shadow_gpioe |= 1 << (31 - gpio); | ||
274 | out_be32(®s->simple_gpioe, chip->shadow_gpioe); | ||
275 | |||
276 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
277 | |||
278 | return 0; | ||
279 | } | ||
280 | |||
281 | static int | ||
282 | mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | ||
283 | { | ||
284 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
285 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | ||
286 | struct mpc52xx_gpiochip, mmchip); | ||
287 | struct mpc52xx_gpio *regs = mm_gc->regs; | ||
288 | unsigned long flags; | ||
289 | |||
290 | spin_lock_irqsave(&gpio_lock, flags); | ||
291 | |||
292 | /* First set initial value */ | ||
293 | __mpc52xx_simple_gpio_set(gc, gpio, val); | ||
294 | |||
295 | /* Then set direction */ | ||
296 | chip->shadow_ddr |= 1 << (31 - gpio); | ||
297 | out_be32(®s->simple_ddr, chip->shadow_ddr); | ||
298 | |||
299 | /* Finally enable the pin */ | ||
300 | chip->shadow_gpioe |= 1 << (31 - gpio); | ||
301 | out_be32(®s->simple_gpioe, chip->shadow_gpioe); | ||
302 | |||
303 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
304 | |||
305 | pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); | ||
306 | |||
307 | return 0; | ||
308 | } | ||
309 | |||
310 | static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev, | ||
311 | const struct of_device_id *match) | ||
312 | { | ||
313 | struct mpc52xx_gpiochip *chip; | ||
314 | struct of_gpio_chip *ofchip; | ||
315 | struct mpc52xx_gpio *regs; | ||
316 | int ret; | ||
317 | |||
318 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | ||
319 | if (!chip) | ||
320 | return -ENOMEM; | ||
321 | |||
322 | ofchip = &chip->mmchip.of_gc; | ||
323 | |||
324 | ofchip->gpio_cells = 2; | ||
325 | ofchip->gc.ngpio = 32; | ||
326 | ofchip->gc.direction_input = mpc52xx_simple_gpio_dir_in; | ||
327 | ofchip->gc.direction_output = mpc52xx_simple_gpio_dir_out; | ||
328 | ofchip->gc.get = mpc52xx_simple_gpio_get; | ||
329 | ofchip->gc.set = mpc52xx_simple_gpio_set; | ||
330 | |||
331 | ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip); | ||
332 | if (ret) | ||
333 | return ret; | ||
334 | |||
335 | regs = chip->mmchip.regs; | ||
336 | chip->shadow_gpioe = in_be32(®s->simple_gpioe); | ||
337 | chip->shadow_ddr = in_be32(®s->simple_ddr); | ||
338 | chip->shadow_dvo = in_be32(®s->simple_dvo); | ||
339 | |||
340 | return 0; | ||
341 | } | ||
342 | |||
343 | static const struct of_device_id mpc52xx_simple_gpiochip_match[] = { | ||
344 | { | ||
345 | .compatible = "fsl,mpc5200-gpio", | ||
346 | }, | ||
347 | {} | ||
348 | }; | ||
349 | |||
350 | static struct of_platform_driver mpc52xx_simple_gpiochip_driver = { | ||
351 | .name = "gpio", | ||
352 | .match_table = mpc52xx_simple_gpiochip_match, | ||
353 | .probe = mpc52xx_simple_gpiochip_probe, | ||
354 | .remove = mpc52xx_gpiochip_remove, | ||
355 | }; | ||
356 | |||
357 | /* | ||
358 | * GPIO LIB API implementation for gpt GPIOs. | ||
359 | * | ||
360 | * Each gpt only has a single GPIO. | ||
361 | */ | ||
362 | static int mpc52xx_gpt_gpio_get(struct gpio_chip *gc, unsigned int gpio) | ||
363 | { | ||
364 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
365 | struct mpc52xx_gpt __iomem *regs = mm_gc->regs; | ||
366 | unsigned int ret; | ||
367 | |||
368 | return (in_be32(®s->status) & (1 << (31 - 23))) ? 1 : 0; | ||
369 | |||
370 | return ret; | ||
371 | } | ||
372 | |||
373 | static void | ||
374 | mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) | ||
375 | { | ||
376 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
377 | struct mpc52xx_gpt __iomem *regs = mm_gc->regs; | ||
378 | |||
379 | if (val) | ||
380 | out_be32(®s->mode, 0x34); | ||
381 | else | ||
382 | out_be32(®s->mode, 0x24); | ||
383 | |||
384 | pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); | ||
385 | } | ||
386 | |||
387 | static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | ||
388 | { | ||
389 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | ||
390 | struct mpc52xx_gpt *regs = mm_gc->regs; | ||
391 | |||
392 | out_be32(®s->mode, 0x04); | ||
393 | |||
394 | return 0; | ||
395 | } | ||
396 | |||
397 | static int | ||
398 | mpc52xx_gpt_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | ||
399 | { | ||
400 | mpc52xx_gpt_gpio_set(gc, gpio, val); | ||
401 | pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); | ||
402 | |||
403 | return 0; | ||
404 | } | ||
405 | |||
406 | static int __devinit mpc52xx_gpt_gpiochip_probe(struct of_device *ofdev, | ||
407 | const struct of_device_id *match) | ||
408 | { | ||
409 | struct of_mm_gpio_chip *mmchip; | ||
410 | struct of_gpio_chip *chip; | ||
411 | |||
412 | mmchip = kzalloc(sizeof(*mmchip), GFP_KERNEL); | ||
413 | if (!mmchip) | ||
414 | return -ENOMEM; | ||
415 | |||
416 | chip = &mmchip->of_gc; | ||
417 | |||
418 | chip->gpio_cells = 2; | ||
419 | chip->gc.ngpio = 1; | ||
420 | chip->gc.direction_input = mpc52xx_gpt_gpio_dir_in; | ||
421 | chip->gc.direction_output = mpc52xx_gpt_gpio_dir_out; | ||
422 | chip->gc.get = mpc52xx_gpt_gpio_get; | ||
423 | chip->gc.set = mpc52xx_gpt_gpio_set; | ||
424 | |||
425 | return of_mm_gpiochip_add(ofdev->node, mmchip); | ||
426 | } | ||
427 | |||
428 | static const struct of_device_id mpc52xx_gpt_gpiochip_match[] = { | ||
429 | { | ||
430 | .compatible = "fsl,mpc5200-gpt-gpio", | ||
431 | }, | ||
432 | {} | ||
433 | }; | ||
434 | |||
435 | static struct of_platform_driver mpc52xx_gpt_gpiochip_driver = { | ||
436 | .name = "gpio_gpt", | ||
437 | .match_table = mpc52xx_gpt_gpiochip_match, | ||
438 | .probe = mpc52xx_gpt_gpiochip_probe, | ||
439 | .remove = mpc52xx_gpiochip_remove, | ||
440 | }; | ||
441 | |||
442 | static int __init mpc52xx_gpio_init(void) | ||
443 | { | ||
444 | if (of_register_platform_driver(&mpc52xx_wkup_gpiochip_driver)) | ||
445 | printk(KERN_ERR "Unable to register wakeup GPIO driver\n"); | ||
446 | |||
447 | if (of_register_platform_driver(&mpc52xx_simple_gpiochip_driver)) | ||
448 | printk(KERN_ERR "Unable to register simple GPIO driver\n"); | ||
449 | |||
450 | if (of_register_platform_driver(&mpc52xx_gpt_gpiochip_driver)) | ||
451 | printk(KERN_ERR "Unable to register gpt GPIO driver\n"); | ||
452 | |||
453 | return 0; | ||
454 | } | ||
455 | |||
456 | |||
457 | /* Make sure we get initialised before anyone else tries to use us */ | ||
458 | subsys_initcall(mpc52xx_gpio_init); | ||
459 | |||
460 | /* No exit call at the moment as we cannot unregister of gpio chips */ | ||
461 | |||
462 | MODULE_DESCRIPTION("Freescale MPC52xx gpio driver"); | ||
463 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de"); | ||
464 | MODULE_LICENSE("GPL v2"); | ||
465 | |||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index d0dead8b9a95..8479394e9ab4 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #undef DEBUG | 19 | #undef DEBUG |
20 | 20 | ||
21 | #include <linux/interrupt.h> | ||
21 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
22 | #include <linux/of.h> | 23 | #include <linux/of.h> |
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
@@ -109,11 +110,48 @@ static void mpc52xx_extirq_ack(unsigned int virq) | |||
109 | io_be_setbit(&intr->ctrl, 27-l2irq); | 110 | io_be_setbit(&intr->ctrl, 27-l2irq); |
110 | } | 111 | } |
111 | 112 | ||
113 | static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type) | ||
114 | { | ||
115 | u32 ctrl_reg, type; | ||
116 | int irq; | ||
117 | int l2irq; | ||
118 | |||
119 | irq = irq_map[virq].hwirq; | ||
120 | l2irq = (irq & MPC52xx_IRQ_L2_MASK) >> MPC52xx_IRQ_L2_OFFSET; | ||
121 | |||
122 | pr_debug("%s: irq=%x. l2=%d flow_type=%d\n", __func__, irq, l2irq, flow_type); | ||
123 | |||
124 | switch (flow_type) { | ||
125 | case IRQF_TRIGGER_HIGH: | ||
126 | type = 0; | ||
127 | break; | ||
128 | case IRQF_TRIGGER_RISING: | ||
129 | type = 1; | ||
130 | break; | ||
131 | case IRQF_TRIGGER_FALLING: | ||
132 | type = 2; | ||
133 | break; | ||
134 | case IRQF_TRIGGER_LOW: | ||
135 | type = 3; | ||
136 | break; | ||
137 | default: | ||
138 | type = 0; | ||
139 | } | ||
140 | |||
141 | ctrl_reg = in_be32(&intr->ctrl); | ||
142 | ctrl_reg &= ~(0x3 << (22 - (l2irq * 2))); | ||
143 | ctrl_reg |= (type << (22 - (l2irq * 2))); | ||
144 | out_be32(&intr->ctrl, ctrl_reg); | ||
145 | |||
146 | return 0; | ||
147 | } | ||
148 | |||
112 | static struct irq_chip mpc52xx_extirq_irqchip = { | 149 | static struct irq_chip mpc52xx_extirq_irqchip = { |
113 | .typename = " MPC52xx IRQ[0-3] ", | 150 | .typename = " MPC52xx IRQ[0-3] ", |
114 | .mask = mpc52xx_extirq_mask, | 151 | .mask = mpc52xx_extirq_mask, |
115 | .unmask = mpc52xx_extirq_unmask, | 152 | .unmask = mpc52xx_extirq_unmask, |
116 | .ack = mpc52xx_extirq_ack, | 153 | .ack = mpc52xx_extirq_ack, |
154 | .set_type = mpc52xx_extirq_set_type, | ||
117 | }; | 155 | }; |
118 | 156 | ||
119 | /* | 157 | /* |
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index 7442c58d44f5..053f49a1dcae 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig | |||
@@ -8,6 +8,7 @@ config MPC8641_HPCN | |||
8 | select PPC_I8259 | 8 | select PPC_I8259 |
9 | select DEFAULT_UIMAGE | 9 | select DEFAULT_UIMAGE |
10 | select FSL_ULI1575 | 10 | select FSL_ULI1575 |
11 | select HAS_RAPIDIO | ||
11 | help | 12 | help |
12 | This option enables support for the MPC8641 HPCN board. | 13 | This option enables support for the MPC8641 HPCN board. |
13 | 14 | ||
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index f947f555fd46..f13704aabbea 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -221,6 +221,7 @@ mpc86xx_time_init(void) | |||
221 | 221 | ||
222 | static __initdata struct of_device_id of_bus_ids[] = { | 222 | static __initdata struct of_device_id of_bus_ids[] = { |
223 | { .compatible = "simple-bus", }, | 223 | { .compatible = "simple-bus", }, |
224 | { .compatible = "fsl,rapidio-delta", }, | ||
224 | {}, | 225 | {}, |
225 | }; | 226 | }; |
226 | 227 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/.gitignore b/arch/powerpc/platforms/cell/spufs/.gitignore new file mode 100644 index 000000000000..a09ee8d84d6c --- /dev/null +++ b/arch/powerpc/platforms/cell/spufs/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | spu_save_dump.h | ||
2 | spu_restore_dump.h | ||
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 0ad83aeb70b1..177735f79317 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -78,6 +78,7 @@ void destroy_spu_context(struct kref *kref) | |||
78 | { | 78 | { |
79 | struct spu_context *ctx; | 79 | struct spu_context *ctx; |
80 | ctx = container_of(kref, struct spu_context, kref); | 80 | ctx = container_of(kref, struct spu_context, kref); |
81 | spu_context_nospu_trace(destroy_spu_context__enter, ctx); | ||
81 | mutex_lock(&ctx->state_mutex); | 82 | mutex_lock(&ctx->state_mutex); |
82 | spu_deactivate(ctx); | 83 | spu_deactivate(ctx); |
83 | mutex_unlock(&ctx->state_mutex); | 84 | mutex_unlock(&ctx->state_mutex); |
@@ -88,6 +89,7 @@ void destroy_spu_context(struct kref *kref) | |||
88 | kref_put(ctx->prof_priv_kref, ctx->prof_priv_release); | 89 | kref_put(ctx->prof_priv_kref, ctx->prof_priv_release); |
89 | BUG_ON(!list_empty(&ctx->rq)); | 90 | BUG_ON(!list_empty(&ctx->rq)); |
90 | atomic_dec(&nr_spu_contexts); | 91 | atomic_dec(&nr_spu_contexts); |
92 | kfree(ctx->switch_log); | ||
91 | kfree(ctx); | 93 | kfree(ctx); |
92 | } | 94 | } |
93 | 95 | ||
@@ -150,6 +152,8 @@ int spu_acquire_saved(struct spu_context *ctx) | |||
150 | { | 152 | { |
151 | int ret; | 153 | int ret; |
152 | 154 | ||
155 | spu_context_nospu_trace(spu_acquire_saved__enter, ctx); | ||
156 | |||
153 | ret = spu_acquire(ctx); | 157 | ret = spu_acquire(ctx); |
154 | if (ret) | 158 | if (ret) |
155 | return ret; | 159 | return ret; |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 08f44d1971ac..80911a373400 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -2386,6 +2386,171 @@ static const struct file_operations spufs_stat_fops = { | |||
2386 | .release = single_release, | 2386 | .release = single_release, |
2387 | }; | 2387 | }; |
2388 | 2388 | ||
2389 | static inline int spufs_switch_log_used(struct spu_context *ctx) | ||
2390 | { | ||
2391 | return (ctx->switch_log->head - ctx->switch_log->tail) % | ||
2392 | SWITCH_LOG_BUFSIZE; | ||
2393 | } | ||
2394 | |||
2395 | static inline int spufs_switch_log_avail(struct spu_context *ctx) | ||
2396 | { | ||
2397 | return SWITCH_LOG_BUFSIZE - spufs_switch_log_used(ctx); | ||
2398 | } | ||
2399 | |||
2400 | static int spufs_switch_log_open(struct inode *inode, struct file *file) | ||
2401 | { | ||
2402 | struct spu_context *ctx = SPUFS_I(inode)->i_ctx; | ||
2403 | |||
2404 | /* | ||
2405 | * We (ab-)use the mapping_lock here because it serves the similar | ||
2406 | * purpose for synchronizing open/close elsewhere. Maybe it should | ||
2407 | * be renamed eventually. | ||
2408 | */ | ||
2409 | mutex_lock(&ctx->mapping_lock); | ||
2410 | if (ctx->switch_log) { | ||
2411 | spin_lock(&ctx->switch_log->lock); | ||
2412 | ctx->switch_log->head = 0; | ||
2413 | ctx->switch_log->tail = 0; | ||
2414 | spin_unlock(&ctx->switch_log->lock); | ||
2415 | } else { | ||
2416 | /* | ||
2417 | * We allocate the switch log data structures on first open. | ||
2418 | * They will never be free because we assume a context will | ||
2419 | * be traced until it goes away. | ||
2420 | */ | ||
2421 | ctx->switch_log = kzalloc(sizeof(struct switch_log) + | ||
2422 | SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry), | ||
2423 | GFP_KERNEL); | ||
2424 | if (!ctx->switch_log) | ||
2425 | goto out; | ||
2426 | spin_lock_init(&ctx->switch_log->lock); | ||
2427 | init_waitqueue_head(&ctx->switch_log->wait); | ||
2428 | } | ||
2429 | mutex_unlock(&ctx->mapping_lock); | ||
2430 | |||
2431 | return 0; | ||
2432 | out: | ||
2433 | mutex_unlock(&ctx->mapping_lock); | ||
2434 | return -ENOMEM; | ||
2435 | } | ||
2436 | |||
2437 | static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n) | ||
2438 | { | ||
2439 | struct switch_log_entry *p; | ||
2440 | |||
2441 | p = ctx->switch_log->log + ctx->switch_log->tail % SWITCH_LOG_BUFSIZE; | ||
2442 | |||
2443 | return snprintf(tbuf, n, "%u.%09u %d %u %u %llu\n", | ||
2444 | (unsigned int) p->tstamp.tv_sec, | ||
2445 | (unsigned int) p->tstamp.tv_nsec, | ||
2446 | p->spu_id, | ||
2447 | (unsigned int) p->type, | ||
2448 | (unsigned int) p->val, | ||
2449 | (unsigned long long) p->timebase); | ||
2450 | } | ||
2451 | |||
2452 | static ssize_t spufs_switch_log_read(struct file *file, char __user *buf, | ||
2453 | size_t len, loff_t *ppos) | ||
2454 | { | ||
2455 | struct inode *inode = file->f_path.dentry->d_inode; | ||
2456 | struct spu_context *ctx = SPUFS_I(inode)->i_ctx; | ||
2457 | int error = 0, cnt = 0; | ||
2458 | |||
2459 | if (!buf || len < 0) | ||
2460 | return -EINVAL; | ||
2461 | |||
2462 | while (cnt < len) { | ||
2463 | char tbuf[128]; | ||
2464 | int width; | ||
2465 | |||
2466 | if (file->f_flags & O_NONBLOCK) { | ||
2467 | if (spufs_switch_log_used(ctx) <= 0) | ||
2468 | return cnt ? cnt : -EAGAIN; | ||
2469 | } else { | ||
2470 | /* Wait for data in buffer */ | ||
2471 | error = wait_event_interruptible(ctx->switch_log->wait, | ||
2472 | spufs_switch_log_used(ctx) > 0); | ||
2473 | if (error) | ||
2474 | break; | ||
2475 | } | ||
2476 | |||
2477 | spin_lock(&ctx->switch_log->lock); | ||
2478 | if (ctx->switch_log->head == ctx->switch_log->tail) { | ||
2479 | /* multiple readers race? */ | ||
2480 | spin_unlock(&ctx->switch_log->lock); | ||
2481 | continue; | ||
2482 | } | ||
2483 | |||
2484 | width = switch_log_sprint(ctx, tbuf, sizeof(tbuf)); | ||
2485 | if (width < len) { | ||
2486 | ctx->switch_log->tail = | ||
2487 | (ctx->switch_log->tail + 1) % | ||
2488 | SWITCH_LOG_BUFSIZE; | ||
2489 | } | ||
2490 | |||
2491 | spin_unlock(&ctx->switch_log->lock); | ||
2492 | |||
2493 | /* | ||
2494 | * If the record is greater than space available return | ||
2495 | * partial buffer (so far) | ||
2496 | */ | ||
2497 | if (width >= len) | ||
2498 | break; | ||
2499 | |||
2500 | error = copy_to_user(buf + cnt, tbuf, width); | ||
2501 | if (error) | ||
2502 | break; | ||
2503 | cnt += width; | ||
2504 | } | ||
2505 | |||
2506 | return cnt == 0 ? error : cnt; | ||
2507 | } | ||
2508 | |||
2509 | static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait) | ||
2510 | { | ||
2511 | struct inode *inode = file->f_path.dentry->d_inode; | ||
2512 | struct spu_context *ctx = SPUFS_I(inode)->i_ctx; | ||
2513 | unsigned int mask = 0; | ||
2514 | |||
2515 | poll_wait(file, &ctx->switch_log->wait, wait); | ||
2516 | |||
2517 | if (spufs_switch_log_used(ctx) > 0) | ||
2518 | mask |= POLLIN; | ||
2519 | |||
2520 | return mask; | ||
2521 | } | ||
2522 | |||
2523 | static const struct file_operations spufs_switch_log_fops = { | ||
2524 | .owner = THIS_MODULE, | ||
2525 | .open = spufs_switch_log_open, | ||
2526 | .read = spufs_switch_log_read, | ||
2527 | .poll = spufs_switch_log_poll, | ||
2528 | }; | ||
2529 | |||
2530 | void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx, | ||
2531 | u32 type, u32 val) | ||
2532 | { | ||
2533 | if (!ctx->switch_log) | ||
2534 | return; | ||
2535 | |||
2536 | spin_lock(&ctx->switch_log->lock); | ||
2537 | if (spufs_switch_log_avail(ctx) > 1) { | ||
2538 | struct switch_log_entry *p; | ||
2539 | |||
2540 | p = ctx->switch_log->log + ctx->switch_log->head; | ||
2541 | ktime_get_ts(&p->tstamp); | ||
2542 | p->timebase = get_tb(); | ||
2543 | p->spu_id = spu ? spu->number : -1; | ||
2544 | p->type = type; | ||
2545 | p->val = val; | ||
2546 | |||
2547 | ctx->switch_log->head = | ||
2548 | (ctx->switch_log->head + 1) % SWITCH_LOG_BUFSIZE; | ||
2549 | } | ||
2550 | spin_unlock(&ctx->switch_log->lock); | ||
2551 | |||
2552 | wake_up(&ctx->switch_log->wait); | ||
2553 | } | ||
2389 | 2554 | ||
2390 | struct tree_descr spufs_dir_contents[] = { | 2555 | struct tree_descr spufs_dir_contents[] = { |
2391 | { "capabilities", &spufs_caps_fops, 0444, }, | 2556 | { "capabilities", &spufs_caps_fops, 0444, }, |
@@ -2422,6 +2587,7 @@ struct tree_descr spufs_dir_contents[] = { | |||
2422 | { "proxydma_info", &spufs_proxydma_info_fops, 0444, }, | 2587 | { "proxydma_info", &spufs_proxydma_info_fops, 0444, }, |
2423 | { "tid", &spufs_tid_fops, 0444, }, | 2588 | { "tid", &spufs_tid_fops, 0444, }, |
2424 | { "stat", &spufs_stat_fops, 0444, }, | 2589 | { "stat", &spufs_stat_fops, 0444, }, |
2590 | { "switch_log", &spufs_switch_log_fops, 0444 }, | ||
2425 | {}, | 2591 | {}, |
2426 | }; | 2592 | }; |
2427 | 2593 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index 96bf7c2b86fc..a9c35b7b719f 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -405,6 +405,8 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) | |||
405 | ret = spu_run_fini(ctx, npc, &status); | 405 | ret = spu_run_fini(ctx, npc, &status); |
406 | spu_yield(ctx); | 406 | spu_yield(ctx); |
407 | 407 | ||
408 | spu_switch_log_notify(NULL, ctx, SWITCH_LOG_EXIT, status); | ||
409 | |||
408 | if ((status & SPU_STATUS_STOPPED_BY_STOP) && | 410 | if ((status & SPU_STATUS_STOPPED_BY_STOP) && |
409 | (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100)) | 411 | (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100)) |
410 | ctx->stats.libassist++; | 412 | ctx->stats.libassist++; |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 00528ef84ad2..7298e7db2c83 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -240,6 +240,7 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx) | |||
240 | spu->mfc_callback = spufs_mfc_callback; | 240 | spu->mfc_callback = spufs_mfc_callback; |
241 | mb(); | 241 | mb(); |
242 | spu_unmap_mappings(ctx); | 242 | spu_unmap_mappings(ctx); |
243 | spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0); | ||
243 | spu_restore(&ctx->csa, spu); | 244 | spu_restore(&ctx->csa, spu); |
244 | spu->timestamp = jiffies; | 245 | spu->timestamp = jiffies; |
245 | spu_cpu_affinity_set(spu, raw_smp_processor_id()); | 246 | spu_cpu_affinity_set(spu, raw_smp_processor_id()); |
@@ -419,6 +420,7 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx) | |||
419 | spu_switch_notify(spu, NULL); | 420 | spu_switch_notify(spu, NULL); |
420 | spu_unmap_mappings(ctx); | 421 | spu_unmap_mappings(ctx); |
421 | spu_save(&ctx->csa, spu); | 422 | spu_save(&ctx->csa, spu); |
423 | spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0); | ||
422 | spu->timestamp = jiffies; | 424 | spu->timestamp = jiffies; |
423 | ctx->state = SPU_STATE_SAVED; | 425 | ctx->state = SPU_STATE_SAVED; |
424 | spu->ibox_callback = NULL; | 426 | spu->ibox_callback = NULL; |
@@ -591,7 +593,7 @@ static struct spu *find_victim(struct spu_context *ctx) | |||
591 | struct spu *spu; | 593 | struct spu *spu; |
592 | int node, n; | 594 | int node, n; |
593 | 595 | ||
594 | spu_context_nospu_trace(spu_find_vitim__enter, ctx); | 596 | spu_context_nospu_trace(spu_find_victim__enter, ctx); |
595 | 597 | ||
596 | /* | 598 | /* |
597 | * Look for a possible preemption candidate on the local node first. | 599 | * Look for a possible preemption candidate on the local node first. |
@@ -1063,10 +1065,9 @@ int __init spu_sched_init(void) | |||
1063 | 1065 | ||
1064 | mod_timer(&spuloadavg_timer, 0); | 1066 | mod_timer(&spuloadavg_timer, 0); |
1065 | 1067 | ||
1066 | entry = create_proc_entry("spu_loadavg", 0, NULL); | 1068 | entry = proc_create("spu_loadavg", 0, NULL, &spu_loadavg_fops); |
1067 | if (!entry) | 1069 | if (!entry) |
1068 | goto out_stop_kthread; | 1070 | goto out_stop_kthread; |
1069 | entry->proc_fops = &spu_loadavg_fops; | ||
1070 | 1071 | ||
1071 | pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n", | 1072 | pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n", |
1072 | SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE); | 1073 | SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE); |
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index cdc515182f82..7312745b7540 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -47,6 +47,30 @@ enum { | |||
47 | SPU_SCHED_SPU_RUN, /* context is within spu_run */ | 47 | SPU_SCHED_SPU_RUN, /* context is within spu_run */ |
48 | }; | 48 | }; |
49 | 49 | ||
50 | enum { | ||
51 | SWITCH_LOG_BUFSIZE = 4096, | ||
52 | }; | ||
53 | |||
54 | enum { | ||
55 | SWITCH_LOG_START, | ||
56 | SWITCH_LOG_STOP, | ||
57 | SWITCH_LOG_EXIT, | ||
58 | }; | ||
59 | |||
60 | struct switch_log { | ||
61 | spinlock_t lock; | ||
62 | wait_queue_head_t wait; | ||
63 | unsigned long head; | ||
64 | unsigned long tail; | ||
65 | struct switch_log_entry { | ||
66 | struct timespec tstamp; | ||
67 | s32 spu_id; | ||
68 | u32 type; | ||
69 | u32 val; | ||
70 | u64 timebase; | ||
71 | } log[]; | ||
72 | }; | ||
73 | |||
50 | struct spu_context { | 74 | struct spu_context { |
51 | struct spu *spu; /* pointer to a physical SPU */ | 75 | struct spu *spu; /* pointer to a physical SPU */ |
52 | struct spu_state csa; /* SPU context save area. */ | 76 | struct spu_state csa; /* SPU context save area. */ |
@@ -116,6 +140,9 @@ struct spu_context { | |||
116 | unsigned long long libassist; | 140 | unsigned long long libassist; |
117 | } stats; | 141 | } stats; |
118 | 142 | ||
143 | /* context switch log */ | ||
144 | struct switch_log *switch_log; | ||
145 | |||
119 | struct list_head aff_list; | 146 | struct list_head aff_list; |
120 | int aff_head; | 147 | int aff_head; |
121 | int aff_offset; | 148 | int aff_offset; |
@@ -256,6 +283,8 @@ int spu_activate(struct spu_context *ctx, unsigned long flags); | |||
256 | void spu_deactivate(struct spu_context *ctx); | 283 | void spu_deactivate(struct spu_context *ctx); |
257 | void spu_yield(struct spu_context *ctx); | 284 | void spu_yield(struct spu_context *ctx); |
258 | void spu_switch_notify(struct spu *spu, struct spu_context *ctx); | 285 | void spu_switch_notify(struct spu *spu, struct spu_context *ctx); |
286 | void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx, | ||
287 | u32 type, u32 val); | ||
259 | void spu_set_timeslice(struct spu_context *ctx); | 288 | void spu_set_timeslice(struct spu_context *ctx); |
260 | void spu_update_sched_info(struct spu_context *ctx); | 289 | void spu_update_sched_info(struct spu_context *ctx); |
261 | void __spu_update_sched_info(struct spu_context *ctx); | 290 | void __spu_update_sched_info(struct spu_context *ctx); |
@@ -330,8 +359,8 @@ extern void spuctx_switch_state(struct spu_context *ctx, | |||
330 | enum spu_utilization_state new_state); | 359 | enum spu_utilization_state new_state); |
331 | 360 | ||
332 | #define spu_context_trace(name, ctx, spu) \ | 361 | #define spu_context_trace(name, ctx, spu) \ |
333 | trace_mark(name, "%p %p", ctx, spu); | 362 | trace_mark(name, "ctx %p spu %p", ctx, spu); |
334 | #define spu_context_nospu_trace(name, ctx) \ | 363 | #define spu_context_nospu_trace(name, ctx) \ |
335 | trace_mark(name, "%p", ctx); | 364 | trace_mark(name, "ctx %p", ctx); |
336 | 365 | ||
337 | #endif | 366 | #endif |
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c index 79aa773f3c99..53202422ba72 100644 --- a/arch/powerpc/platforms/cell/spufs/sputrace.c +++ b/arch/powerpc/platforms/cell/spufs/sputrace.c | |||
@@ -171,24 +171,24 @@ static void spu_context_nospu_event(void *probe_private, void *call_data, | |||
171 | } | 171 | } |
172 | 172 | ||
173 | struct spu_probe spu_probes[] = { | 173 | struct spu_probe spu_probes[] = { |
174 | { "spu_bind_context__enter", "%p %p", spu_context_event }, | 174 | { "spu_bind_context__enter", "ctx %p spu %p", spu_context_event }, |
175 | { "spu_unbind_context__enter", "%p %p", spu_context_event }, | 175 | { "spu_unbind_context__enter", "ctx %p spu %p", spu_context_event }, |
176 | { "spu_get_idle__enter", "%p", spu_context_nospu_event }, | 176 | { "spu_get_idle__enter", "ctx %p", spu_context_nospu_event }, |
177 | { "spu_get_idle__found", "%p %p", spu_context_event }, | 177 | { "spu_get_idle__found", "ctx %p spu %p", spu_context_event }, |
178 | { "spu_get_idle__not_found", "%p", spu_context_nospu_event }, | 178 | { "spu_get_idle__not_found", "ctx %p", spu_context_nospu_event }, |
179 | { "spu_find_victim__enter", "%p", spu_context_nospu_event }, | 179 | { "spu_find_victim__enter", "ctx %p", spu_context_nospu_event }, |
180 | { "spusched_tick__preempt", "%p %p", spu_context_event }, | 180 | { "spusched_tick__preempt", "ctx %p spu %p", spu_context_event }, |
181 | { "spusched_tick__newslice", "%p", spu_context_nospu_event }, | 181 | { "spusched_tick__newslice", "ctx %p", spu_context_nospu_event }, |
182 | { "spu_yield__enter", "%p", spu_context_nospu_event }, | 182 | { "spu_yield__enter", "ctx %p", spu_context_nospu_event }, |
183 | { "spu_deactivate__enter", "%p", spu_context_nospu_event }, | 183 | { "spu_deactivate__enter", "ctx %p", spu_context_nospu_event }, |
184 | { "__spu_deactivate__unload", "%p %p", spu_context_event }, | 184 | { "__spu_deactivate__unload", "ctx %p spu %p", spu_context_event }, |
185 | { "spufs_ps_nopfn__enter", "%p", spu_context_nospu_event }, | 185 | { "spufs_ps_nopfn__enter", "ctx %p", spu_context_nospu_event }, |
186 | { "spufs_ps_nopfn__sleep", "%p", spu_context_nospu_event }, | 186 | { "spufs_ps_nopfn__sleep", "ctx %p", spu_context_nospu_event }, |
187 | { "spufs_ps_nopfn__wake", "%p %p", spu_context_event }, | 187 | { "spufs_ps_nopfn__wake", "ctx %p spu %p", spu_context_event }, |
188 | { "spufs_ps_nopfn__insert", "%p %p", spu_context_event }, | 188 | { "spufs_ps_nopfn__insert", "ctx %p spu %p", spu_context_event }, |
189 | { "spu_acquire_saved__enter", "%p", spu_context_nospu_event }, | 189 | { "spu_acquire_saved__enter", "ctx %p", spu_context_nospu_event }, |
190 | { "destroy_spu_context__enter", "%p", spu_context_nospu_event }, | 190 | { "destroy_spu_context__enter", "ctx %p", spu_context_nospu_event }, |
191 | { "spufs_stop_callback__enter", "%p %p", spu_context_event }, | 191 | { "spufs_stop_callback__enter", "ctx %p spu %p", spu_context_event }, |
192 | }; | 192 | }; |
193 | 193 | ||
194 | static int __init sputrace_init(void) | 194 | static int __init sputrace_init(void) |
@@ -201,10 +201,9 @@ static int __init sputrace_init(void) | |||
201 | if (!sputrace_log) | 201 | if (!sputrace_log) |
202 | goto out; | 202 | goto out; |
203 | 203 | ||
204 | entry = create_proc_entry("sputrace", S_IRUSR, NULL); | 204 | entry = proc_create("sputrace", S_IRUSR, NULL, &sputrace_fops); |
205 | if (!entry) | 205 | if (!entry) |
206 | goto out_free_log; | 206 | goto out_free_log; |
207 | entry->proc_fops = &sputrace_fops; | ||
208 | 207 | ||
209 | for (i = 0; i < ARRAY_SIZE(spu_probes); i++) { | 208 | for (i = 0; i < ARRAY_SIZE(spu_probes); i++) { |
210 | struct spu_probe *p = &spu_probes[i]; | 209 | struct spu_probe *p = &spu_probes[i]; |
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index e5b40e3e0082..b0f8a857ec02 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c | |||
@@ -330,15 +330,11 @@ static const struct file_operations proc_lpevents_operations = { | |||
330 | 330 | ||
331 | static int __init proc_lpevents_init(void) | 331 | static int __init proc_lpevents_init(void) |
332 | { | 332 | { |
333 | struct proc_dir_entry *e; | ||
334 | |||
335 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | 333 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) |
336 | return 0; | 334 | return 0; |
337 | 335 | ||
338 | e = create_proc_entry("iSeries/lpevents", S_IFREG|S_IRUGO, NULL); | 336 | proc_create("iSeries/lpevents", S_IFREG|S_IRUGO, NULL, |
339 | if (e) | 337 | &proc_lpevents_operations); |
340 | e->proc_fops = &proc_lpevents_operations; | ||
341 | |||
342 | return 0; | 338 | return 0; |
343 | } | 339 | } |
344 | __initcall(proc_lpevents_init); | 340 | __initcall(proc_lpevents_init); |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index c0f2433bc16e..1dc7295746da 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -1255,11 +1255,11 @@ static int __init mf_proc_init(void) | |||
1255 | if (i == 3) /* no vmlinux entry for 'D' */ | 1255 | if (i == 3) /* no vmlinux entry for 'D' */ |
1256 | continue; | 1256 | continue; |
1257 | 1257 | ||
1258 | ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf); | 1258 | ent = proc_create_data("vmlinux", S_IFREG|S_IWUSR, mf, |
1259 | &proc_vmlinux_operations, | ||
1260 | (void *)(long)i); | ||
1259 | if (!ent) | 1261 | if (!ent) |
1260 | return 1; | 1262 | return 1; |
1261 | ent->data = (void *)(long)i; | ||
1262 | ent->proc_fops = &proc_vmlinux_operations; | ||
1263 | } | 1263 | } |
1264 | 1264 | ||
1265 | ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); | 1265 | ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); |
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c index f2cde4180204..91f4c6cd4b99 100644 --- a/arch/powerpc/platforms/iseries/proc.c +++ b/arch/powerpc/platforms/iseries/proc.c | |||
@@ -110,15 +110,11 @@ static const struct file_operations proc_titantod_operations = { | |||
110 | 110 | ||
111 | static int __init iseries_proc_init(void) | 111 | static int __init iseries_proc_init(void) |
112 | { | 112 | { |
113 | struct proc_dir_entry *e; | ||
114 | |||
115 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | 113 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) |
116 | return 0; | 114 | return 0; |
117 | 115 | ||
118 | e = create_proc_entry("iSeries/titanTod", S_IFREG|S_IRUGO, NULL); | 116 | proc_create("iSeries/titanTod", S_IFREG|S_IRUGO, NULL, |
119 | if (e) | 117 | &proc_titantod_operations); |
120 | e->proc_fops = &proc_titantod_operations; | ||
121 | |||
122 | return 0; | 118 | return 0; |
123 | } | 119 | } |
124 | __initcall(iseries_proc_init); | 120 | __initcall(iseries_proc_init); |
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index df23331eb25c..49ff4dc422b7 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
@@ -180,15 +180,10 @@ static const struct file_operations proc_viopath_operations = { | |||
180 | 180 | ||
181 | static int __init vio_proc_init(void) | 181 | static int __init vio_proc_init(void) |
182 | { | 182 | { |
183 | struct proc_dir_entry *e; | ||
184 | |||
185 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | 183 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) |
186 | return 0; | 184 | return 0; |
187 | 185 | ||
188 | e = create_proc_entry("iSeries/config", 0, NULL); | 186 | proc_create("iSeries/config", 0, NULL, &proc_viopath_operations); |
189 | if (e) | ||
190 | e->proc_fops = &proc_viopath_operations; | ||
191 | |||
192 | return 0; | 187 | return 0; |
193 | } | 188 | } |
194 | __initcall(vio_proc_init); | 189 | __initcall(vio_proc_init); |
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 78093d7f97af..4d72c8f72159 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile | |||
@@ -6,7 +6,10 @@ obj-y += pic.o setup.o time.o feature.o pci.o \ | |||
6 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o | 6 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o |
7 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o | 7 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o |
8 | obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o | 8 | obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o |
9 | obj-$(CONFIG_NVRAM) += nvram.o | 9 | # CONFIG_NVRAM is an arch. independant tristate symbol, for pmac32 we really |
10 | # need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really | ||
11 | # CONFIG_NVRAM=y | ||
12 | obj-$(CONFIG_NVRAM:m=y) += nvram.o | ||
10 | # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff | 13 | # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff |
11 | obj-$(CONFIG_PPC64) += nvram.o | 14 | obj-$(CONFIG_PPC64) += nvram.o |
12 | obj-$(CONFIG_PPC32) += bootx_init.o | 15 | obj-$(CONFIG_PPC32) += bootx_init.o |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index bf44c5441a36..00bd0166d07f 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -337,7 +337,8 @@ static void __init pmac_setup_arch(void) | |||
337 | find_via_pmu(); | 337 | find_via_pmu(); |
338 | smu_init(); | 338 | smu_init(); |
339 | 339 | ||
340 | #if defined(CONFIG_NVRAM) || defined(CONFIG_PPC64) | 340 | #if defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) || \ |
341 | defined(CONFIG_PPC64) | ||
341 | pmac_nvram_init(); | 342 | pmac_nvram_init(); |
342 | #endif | 343 | #endif |
343 | 344 | ||
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index bd2593ed28dd..554c6e42ef2a 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -18,6 +18,7 @@ obj-$(CONFIG_PCI) += pci.o pci_dlpar.o | |||
18 | obj-$(CONFIG_PCI_MSI) += msi.o | 18 | obj-$(CONFIG_PCI_MSI) += msi.o |
19 | 19 | ||
20 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o | 20 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o |
21 | obj-$(CONFIG_MEMORY_HOTPLUG) += hotplug-memory.o | ||
21 | 22 | ||
22 | obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o | 23 | obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o |
23 | obj-$(CONFIG_HVCS) += hvcserver.o | 24 | obj-$(CONFIG_HVCS) += hvcserver.o |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index a3fd56b186e6..6f544ba4b37f 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -1259,14 +1259,8 @@ static const struct file_operations proc_eeh_operations = { | |||
1259 | 1259 | ||
1260 | static int __init eeh_init_proc(void) | 1260 | static int __init eeh_init_proc(void) |
1261 | { | 1261 | { |
1262 | struct proc_dir_entry *e; | 1262 | if (machine_is(pseries)) |
1263 | 1263 | proc_create("ppc64/eeh", 0, NULL, &proc_eeh_operations); | |
1264 | if (machine_is(pseries)) { | ||
1265 | e = create_proc_entry("ppc64/eeh", 0, NULL); | ||
1266 | if (e) | ||
1267 | e->proc_fops = &proc_eeh_operations; | ||
1268 | } | ||
1269 | |||
1270 | return 0; | 1264 | return 0; |
1271 | } | 1265 | } |
1272 | __initcall(eeh_init_proc); | 1266 | __initcall(eeh_init_proc); |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c new file mode 100644 index 000000000000..3c5727dd5aa5 --- /dev/null +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * pseries Memory Hotplug infrastructure. | ||
3 | * | ||
4 | * Copyright (C) 2008 Badari Pulavarty, IBM Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/of.h> | ||
13 | #include <linux/lmb.h> | ||
14 | #include <asm/firmware.h> | ||
15 | #include <asm/machdep.h> | ||
16 | #include <asm/pSeries_reconfig.h> | ||
17 | |||
18 | static int pseries_remove_memory(struct device_node *np) | ||
19 | { | ||
20 | const char *type; | ||
21 | const unsigned int *my_index; | ||
22 | const unsigned int *regs; | ||
23 | u64 start_pfn, start; | ||
24 | struct zone *zone; | ||
25 | int ret = -EINVAL; | ||
26 | |||
27 | /* | ||
28 | * Check to see if we are actually removing memory | ||
29 | */ | ||
30 | type = of_get_property(np, "device_type", NULL); | ||
31 | if (type == NULL || strcmp(type, "memory") != 0) | ||
32 | return 0; | ||
33 | |||
34 | /* | ||
35 | * Find the memory index and size of the removing section | ||
36 | */ | ||
37 | my_index = of_get_property(np, "ibm,my-drc-index", NULL); | ||
38 | if (!my_index) | ||
39 | return ret; | ||
40 | |||
41 | regs = of_get_property(np, "reg", NULL); | ||
42 | if (!regs) | ||
43 | return ret; | ||
44 | |||
45 | start_pfn = section_nr_to_pfn(*my_index & 0xffff); | ||
46 | zone = page_zone(pfn_to_page(start_pfn)); | ||
47 | |||
48 | /* | ||
49 | * Remove section mappings and sysfs entries for the | ||
50 | * section of the memory we are removing. | ||
51 | * | ||
52 | * NOTE: Ideally, this should be done in generic code like | ||
53 | * remove_memory(). But remove_memory() gets called by writing | ||
54 | * to sysfs "state" file and we can't remove sysfs entries | ||
55 | * while writing to it. So we have to defer it to here. | ||
56 | */ | ||
57 | ret = __remove_pages(zone, start_pfn, regs[3] >> PAGE_SHIFT); | ||
58 | if (ret) | ||
59 | return ret; | ||
60 | |||
61 | /* | ||
62 | * Update memory regions for memory remove | ||
63 | */ | ||
64 | lmb_remove(start_pfn << PAGE_SHIFT, regs[3]); | ||
65 | |||
66 | /* | ||
67 | * Remove htab bolted mappings for this section of memory | ||
68 | */ | ||
69 | start = (unsigned long)__va(start_pfn << PAGE_SHIFT); | ||
70 | ret = remove_section_mapping(start, start + regs[3]); | ||
71 | return ret; | ||
72 | } | ||
73 | |||
74 | static int pseries_add_memory(struct device_node *np) | ||
75 | { | ||
76 | const char *type; | ||
77 | const unsigned int *my_index; | ||
78 | const unsigned int *regs; | ||
79 | u64 start_pfn; | ||
80 | int ret = -EINVAL; | ||
81 | |||
82 | /* | ||
83 | * Check to see if we are actually adding memory | ||
84 | */ | ||
85 | type = of_get_property(np, "device_type", NULL); | ||
86 | if (type == NULL || strcmp(type, "memory") != 0) | ||
87 | return 0; | ||
88 | |||
89 | /* | ||
90 | * Find the memory index and size of the added section | ||
91 | */ | ||
92 | my_index = of_get_property(np, "ibm,my-drc-index", NULL); | ||
93 | if (!my_index) | ||
94 | return ret; | ||
95 | |||
96 | regs = of_get_property(np, "reg", NULL); | ||
97 | if (!regs) | ||
98 | return ret; | ||
99 | |||
100 | start_pfn = section_nr_to_pfn(*my_index & 0xffff); | ||
101 | |||
102 | /* | ||
103 | * Update memory region to represent the memory add | ||
104 | */ | ||
105 | lmb_add(start_pfn << PAGE_SHIFT, regs[3]); | ||
106 | return 0; | ||
107 | } | ||
108 | |||
109 | static int pseries_memory_notifier(struct notifier_block *nb, | ||
110 | unsigned long action, void *node) | ||
111 | { | ||
112 | int err = NOTIFY_OK; | ||
113 | |||
114 | switch (action) { | ||
115 | case PSERIES_RECONFIG_ADD: | ||
116 | if (pseries_add_memory(node)) | ||
117 | err = NOTIFY_BAD; | ||
118 | break; | ||
119 | case PSERIES_RECONFIG_REMOVE: | ||
120 | if (pseries_remove_memory(node)) | ||
121 | err = NOTIFY_BAD; | ||
122 | break; | ||
123 | default: | ||
124 | err = NOTIFY_DONE; | ||
125 | break; | ||
126 | } | ||
127 | return err; | ||
128 | } | ||
129 | |||
130 | static struct notifier_block pseries_mem_nb = { | ||
131 | .notifier_call = pseries_memory_notifier, | ||
132 | }; | ||
133 | |||
134 | static int __init pseries_memory_hotplug_init(void) | ||
135 | { | ||
136 | if (firmware_has_feature(FW_FEATURE_LPAR)) | ||
137 | pSeries_reconfig_notifier_register(&pseries_mem_nb); | ||
138 | |||
139 | return 0; | ||
140 | } | ||
141 | machine_device_initcall(pseries, pseries_memory_hotplug_init); | ||
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index ac75c10de278..75769aae41d5 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -512,12 +512,9 @@ static int proc_ppc64_create_ofdt(void) | |||
512 | if (!machine_is(pseries)) | 512 | if (!machine_is(pseries)) |
513 | return 0; | 513 | return 0; |
514 | 514 | ||
515 | ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); | 515 | ent = proc_create("ppc64/ofdt", S_IWUSR, NULL, &ofdt_fops); |
516 | if (ent) { | 516 | if (ent) |
517 | ent->data = NULL; | ||
518 | ent->size = 0; | 517 | ent->size = 0; |
519 | ent->proc_fops = &ofdt_fops; | ||
520 | } | ||
521 | 518 | ||
522 | return 0; | 519 | return 0; |
523 | } | 520 | } |
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c index befadd4f9524..7d3e2b0bd4d2 100644 --- a/arch/powerpc/platforms/pseries/rtasd.c +++ b/arch/powerpc/platforms/pseries/rtasd.c | |||
@@ -468,10 +468,9 @@ static int __init rtas_init(void) | |||
468 | return -ENOMEM; | 468 | return -ENOMEM; |
469 | } | 469 | } |
470 | 470 | ||
471 | entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL); | 471 | entry = proc_create("ppc64/rtas/error_log", S_IRUSR, NULL, |
472 | if (entry) | 472 | &proc_rtas_log_operations); |
473 | entry->proc_fops = &proc_rtas_log_operations; | 473 | if (!entry) |
474 | else | ||
475 | printk(KERN_ERR "Failed to create error_log proc entry\n"); | 474 | printk(KERN_ERR "Failed to create error_log proc entry\n"); |
476 | 475 | ||
477 | if (kernel_thread(rtasd, NULL, CLONE_FS) < 0) | 476 | if (kernel_thread(rtasd, NULL, CLONE_FS) < 0) |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index af2425e4655f..3d920376f58e 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1,5 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * MPC85xx RapidIO support | 2 | * Freescale MPC85xx/MPC86xx RapidIO support |
3 | * | ||
4 | * Copyright (C) 2007, 2008 Freescale Semiconductor, Inc. | ||
5 | * Zhang Wei <wei.zhang@freescale.com> | ||
3 | * | 6 | * |
4 | * Copyright 2005 MontaVista Software, Inc. | 7 | * Copyright 2005 MontaVista Software, Inc. |
5 | * Matt Porter <mporter@kernel.crashing.org> | 8 | * Matt Porter <mporter@kernel.crashing.org> |
@@ -17,12 +20,23 @@ | |||
17 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
18 | #include <linux/rio.h> | 21 | #include <linux/rio.h> |
19 | #include <linux/rio_drv.h> | 22 | #include <linux/rio_drv.h> |
23 | #include <linux/of_platform.h> | ||
24 | #include <linux/delay.h> | ||
20 | 25 | ||
21 | #include <asm/io.h> | 26 | #include <asm/io.h> |
22 | 27 | ||
23 | #define RIO_REGS_BASE (CCSRBAR + 0xc0000) | 28 | /* RapidIO definition irq, which read from OF-tree */ |
29 | #define IRQ_RIO_BELL(m) (((struct rio_priv *)(m->priv))->bellirq) | ||
30 | #define IRQ_RIO_TX(m) (((struct rio_priv *)(m->priv))->txirq) | ||
31 | #define IRQ_RIO_RX(m) (((struct rio_priv *)(m->priv))->rxirq) | ||
32 | |||
24 | #define RIO_ATMU_REGS_OFFSET 0x10c00 | 33 | #define RIO_ATMU_REGS_OFFSET 0x10c00 |
25 | #define RIO_MSG_REGS_OFFSET 0x11000 | 34 | #define RIO_P_MSG_REGS_OFFSET 0x11000 |
35 | #define RIO_S_MSG_REGS_OFFSET 0x13000 | ||
36 | #define RIO_ESCSR 0x158 | ||
37 | #define RIO_CCSR 0x15c | ||
38 | #define RIO_ISR_AACR 0x10120 | ||
39 | #define RIO_ISR_AACR_AA 0x1 /* Accept All ID */ | ||
26 | #define RIO_MAINT_WIN_SIZE 0x400000 | 40 | #define RIO_MAINT_WIN_SIZE 0x400000 |
27 | #define RIO_DBELL_WIN_SIZE 0x1000 | 41 | #define RIO_DBELL_WIN_SIZE 0x1000 |
28 | 42 | ||
@@ -50,18 +64,18 @@ | |||
50 | #define DOORBELL_DSR_TE 0x00000080 | 64 | #define DOORBELL_DSR_TE 0x00000080 |
51 | #define DOORBELL_DSR_QFI 0x00000010 | 65 | #define DOORBELL_DSR_QFI 0x00000010 |
52 | #define DOORBELL_DSR_DIQI 0x00000001 | 66 | #define DOORBELL_DSR_DIQI 0x00000001 |
53 | #define DOORBELL_TID_OFFSET 0x03 | 67 | #define DOORBELL_TID_OFFSET 0x02 |
54 | #define DOORBELL_SID_OFFSET 0x05 | 68 | #define DOORBELL_SID_OFFSET 0x04 |
55 | #define DOORBELL_INFO_OFFSET 0x06 | 69 | #define DOORBELL_INFO_OFFSET 0x06 |
56 | 70 | ||
57 | #define DOORBELL_MESSAGE_SIZE 0x08 | 71 | #define DOORBELL_MESSAGE_SIZE 0x08 |
58 | #define DBELL_SID(x) (*(u8 *)(x + DOORBELL_SID_OFFSET)) | 72 | #define DBELL_SID(x) (*(u16 *)(x + DOORBELL_SID_OFFSET)) |
59 | #define DBELL_TID(x) (*(u8 *)(x + DOORBELL_TID_OFFSET)) | 73 | #define DBELL_TID(x) (*(u16 *)(x + DOORBELL_TID_OFFSET)) |
60 | #define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET)) | 74 | #define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET)) |
61 | 75 | ||
62 | struct rio_atmu_regs { | 76 | struct rio_atmu_regs { |
63 | u32 rowtar; | 77 | u32 rowtar; |
64 | u32 pad1; | 78 | u32 rowtear; |
65 | u32 rowbar; | 79 | u32 rowbar; |
66 | u32 pad2; | 80 | u32 pad2; |
67 | u32 rowar; | 81 | u32 rowar; |
@@ -87,7 +101,15 @@ struct rio_msg_regs { | |||
87 | u32 ifqdpar; | 101 | u32 ifqdpar; |
88 | u32 pad6; | 102 | u32 pad6; |
89 | u32 ifqepar; | 103 | u32 ifqepar; |
90 | u32 pad7[250]; | 104 | u32 pad7[226]; |
105 | u32 odmr; | ||
106 | u32 odsr; | ||
107 | u32 res0[4]; | ||
108 | u32 oddpr; | ||
109 | u32 oddatr; | ||
110 | u32 res1[3]; | ||
111 | u32 odretcr; | ||
112 | u32 res2[12]; | ||
91 | u32 dmr; | 113 | u32 dmr; |
92 | u32 dsr; | 114 | u32 dsr; |
93 | u32 pad8; | 115 | u32 pad8; |
@@ -112,20 +134,12 @@ struct rio_tx_desc { | |||
112 | u32 res4; | 134 | u32 res4; |
113 | }; | 135 | }; |
114 | 136 | ||
115 | static u32 regs_win; | 137 | struct rio_dbell_ring { |
116 | static struct rio_atmu_regs *atmu_regs; | ||
117 | static struct rio_atmu_regs *maint_atmu_regs; | ||
118 | static struct rio_atmu_regs *dbell_atmu_regs; | ||
119 | static u32 dbell_win; | ||
120 | static u32 maint_win; | ||
121 | static struct rio_msg_regs *msg_regs; | ||
122 | |||
123 | static struct rio_dbell_ring { | ||
124 | void *virt; | 138 | void *virt; |
125 | dma_addr_t phys; | 139 | dma_addr_t phys; |
126 | } dbell_ring; | 140 | }; |
127 | 141 | ||
128 | static struct rio_msg_tx_ring { | 142 | struct rio_msg_tx_ring { |
129 | void *virt; | 143 | void *virt; |
130 | dma_addr_t phys; | 144 | dma_addr_t phys; |
131 | void *virt_buffer[RIO_MAX_TX_RING_SIZE]; | 145 | void *virt_buffer[RIO_MAX_TX_RING_SIZE]; |
@@ -133,19 +147,35 @@ static struct rio_msg_tx_ring { | |||
133 | int tx_slot; | 147 | int tx_slot; |
134 | int size; | 148 | int size; |
135 | void *dev_id; | 149 | void *dev_id; |
136 | } msg_tx_ring; | 150 | }; |
137 | 151 | ||
138 | static struct rio_msg_rx_ring { | 152 | struct rio_msg_rx_ring { |
139 | void *virt; | 153 | void *virt; |
140 | dma_addr_t phys; | 154 | dma_addr_t phys; |
141 | void *virt_buffer[RIO_MAX_RX_RING_SIZE]; | 155 | void *virt_buffer[RIO_MAX_RX_RING_SIZE]; |
142 | int rx_slot; | 156 | int rx_slot; |
143 | int size; | 157 | int size; |
144 | void *dev_id; | 158 | void *dev_id; |
145 | } msg_rx_ring; | 159 | }; |
160 | |||
161 | struct rio_priv { | ||
162 | void __iomem *regs_win; | ||
163 | struct rio_atmu_regs __iomem *atmu_regs; | ||
164 | struct rio_atmu_regs __iomem *maint_atmu_regs; | ||
165 | struct rio_atmu_regs __iomem *dbell_atmu_regs; | ||
166 | void __iomem *dbell_win; | ||
167 | void __iomem *maint_win; | ||
168 | struct rio_msg_regs __iomem *msg_regs; | ||
169 | struct rio_dbell_ring dbell_ring; | ||
170 | struct rio_msg_tx_ring msg_tx_ring; | ||
171 | struct rio_msg_rx_ring msg_rx_ring; | ||
172 | int bellirq; | ||
173 | int txirq; | ||
174 | int rxirq; | ||
175 | }; | ||
146 | 176 | ||
147 | /** | 177 | /** |
148 | * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message | 178 | * fsl_rio_doorbell_send - Send a MPC85xx doorbell message |
149 | * @index: ID of RapidIO interface | 179 | * @index: ID of RapidIO interface |
150 | * @destid: Destination ID of target device | 180 | * @destid: Destination ID of target device |
151 | * @data: 16-bit info field of RapidIO doorbell message | 181 | * @data: 16-bit info field of RapidIO doorbell message |
@@ -153,18 +183,34 @@ static struct rio_msg_rx_ring { | |||
153 | * Sends a MPC85xx doorbell message. Returns %0 on success or | 183 | * Sends a MPC85xx doorbell message. Returns %0 on success or |
154 | * %-EINVAL on failure. | 184 | * %-EINVAL on failure. |
155 | */ | 185 | */ |
156 | static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data) | 186 | static int fsl_rio_doorbell_send(struct rio_mport *mport, |
187 | int index, u16 destid, u16 data) | ||
157 | { | 188 | { |
158 | pr_debug("mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n", | 189 | struct rio_priv *priv = mport->priv; |
190 | pr_debug("fsl_doorbell_send: index %d destid %4.4x data %4.4x\n", | ||
159 | index, destid, data); | 191 | index, destid, data); |
160 | out_be32((void *)&dbell_atmu_regs->rowtar, destid << 22); | 192 | switch (mport->phy_type) { |
161 | out_be16((void *)(dbell_win), data); | 193 | case RIO_PHY_PARALLEL: |
194 | out_be32(&priv->dbell_atmu_regs->rowtar, destid << 22); | ||
195 | out_be16(priv->dbell_win, data); | ||
196 | break; | ||
197 | case RIO_PHY_SERIAL: | ||
198 | /* In the serial version silicons, such as MPC8548, MPC8641, | ||
199 | * below operations is must be. | ||
200 | */ | ||
201 | out_be32(&priv->msg_regs->odmr, 0x00000000); | ||
202 | out_be32(&priv->msg_regs->odretcr, 0x00000004); | ||
203 | out_be32(&priv->msg_regs->oddpr, destid << 16); | ||
204 | out_be32(&priv->msg_regs->oddatr, data); | ||
205 | out_be32(&priv->msg_regs->odmr, 0x00000001); | ||
206 | break; | ||
207 | } | ||
162 | 208 | ||
163 | return 0; | 209 | return 0; |
164 | } | 210 | } |
165 | 211 | ||
166 | /** | 212 | /** |
167 | * mpc85xx_local_config_read - Generate a MPC85xx local config space read | 213 | * fsl_local_config_read - Generate a MPC85xx local config space read |
168 | * @index: ID of RapdiIO interface | 214 | * @index: ID of RapdiIO interface |
169 | * @offset: Offset into configuration space | 215 | * @offset: Offset into configuration space |
170 | * @len: Length (in bytes) of the maintenance transaction | 216 | * @len: Length (in bytes) of the maintenance transaction |
@@ -173,17 +219,19 @@ static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data) | |||
173 | * Generates a MPC85xx local configuration space read. Returns %0 on | 219 | * Generates a MPC85xx local configuration space read. Returns %0 on |
174 | * success or %-EINVAL on failure. | 220 | * success or %-EINVAL on failure. |
175 | */ | 221 | */ |
176 | static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data) | 222 | static int fsl_local_config_read(struct rio_mport *mport, |
223 | int index, u32 offset, int len, u32 *data) | ||
177 | { | 224 | { |
178 | pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index, | 225 | struct rio_priv *priv = mport->priv; |
226 | pr_debug("fsl_local_config_read: index %d offset %8.8x\n", index, | ||
179 | offset); | 227 | offset); |
180 | *data = in_be32((void *)(regs_win + offset)); | 228 | *data = in_be32(priv->regs_win + offset); |
181 | 229 | ||
182 | return 0; | 230 | return 0; |
183 | } | 231 | } |
184 | 232 | ||
185 | /** | 233 | /** |
186 | * mpc85xx_local_config_write - Generate a MPC85xx local config space write | 234 | * fsl_local_config_write - Generate a MPC85xx local config space write |
187 | * @index: ID of RapdiIO interface | 235 | * @index: ID of RapdiIO interface |
188 | * @offset: Offset into configuration space | 236 | * @offset: Offset into configuration space |
189 | * @len: Length (in bytes) of the maintenance transaction | 237 | * @len: Length (in bytes) of the maintenance transaction |
@@ -192,18 +240,20 @@ static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data) | |||
192 | * Generates a MPC85xx local configuration space write. Returns %0 on | 240 | * Generates a MPC85xx local configuration space write. Returns %0 on |
193 | * success or %-EINVAL on failure. | 241 | * success or %-EINVAL on failure. |
194 | */ | 242 | */ |
195 | static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data) | 243 | static int fsl_local_config_write(struct rio_mport *mport, |
244 | int index, u32 offset, int len, u32 data) | ||
196 | { | 245 | { |
246 | struct rio_priv *priv = mport->priv; | ||
197 | pr_debug | 247 | pr_debug |
198 | ("mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n", | 248 | ("fsl_local_config_write: index %d offset %8.8x data %8.8x\n", |
199 | index, offset, data); | 249 | index, offset, data); |
200 | out_be32((void *)(regs_win + offset), data); | 250 | out_be32(priv->regs_win + offset, data); |
201 | 251 | ||
202 | return 0; | 252 | return 0; |
203 | } | 253 | } |
204 | 254 | ||
205 | /** | 255 | /** |
206 | * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction | 256 | * fsl_rio_config_read - Generate a MPC85xx read maintenance transaction |
207 | * @index: ID of RapdiIO interface | 257 | * @index: ID of RapdiIO interface |
208 | * @destid: Destination ID of transaction | 258 | * @destid: Destination ID of transaction |
209 | * @hopcount: Number of hops to target device | 259 | * @hopcount: Number of hops to target device |
@@ -215,18 +265,19 @@ static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data) | |||
215 | * success or %-EINVAL on failure. | 265 | * success or %-EINVAL on failure. |
216 | */ | 266 | */ |
217 | static int | 267 | static int |
218 | mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len, | 268 | fsl_rio_config_read(struct rio_mport *mport, int index, u16 destid, |
219 | u32 * val) | 269 | u8 hopcount, u32 offset, int len, u32 *val) |
220 | { | 270 | { |
271 | struct rio_priv *priv = mport->priv; | ||
221 | u8 *data; | 272 | u8 *data; |
222 | 273 | ||
223 | pr_debug | 274 | pr_debug |
224 | ("mpc85xx_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n", | 275 | ("fsl_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n", |
225 | index, destid, hopcount, offset, len); | 276 | index, destid, hopcount, offset, len); |
226 | out_be32((void *)&maint_atmu_regs->rowtar, | 277 | out_be32(&priv->maint_atmu_regs->rowtar, |
227 | (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9)); | 278 | (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9)); |
228 | 279 | ||
229 | data = (u8 *) maint_win + offset; | 280 | data = (u8 *) priv->maint_win + offset; |
230 | switch (len) { | 281 | switch (len) { |
231 | case 1: | 282 | case 1: |
232 | *val = in_8((u8 *) data); | 283 | *val = in_8((u8 *) data); |
@@ -243,7 +294,7 @@ mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len, | |||
243 | } | 294 | } |
244 | 295 | ||
245 | /** | 296 | /** |
246 | * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction | 297 | * fsl_rio_config_write - Generate a MPC85xx write maintenance transaction |
247 | * @index: ID of RapdiIO interface | 298 | * @index: ID of RapdiIO interface |
248 | * @destid: Destination ID of transaction | 299 | * @destid: Destination ID of transaction |
249 | * @hopcount: Number of hops to target device | 300 | * @hopcount: Number of hops to target device |
@@ -255,17 +306,18 @@ mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len, | |||
255 | * success or %-EINVAL on failure. | 306 | * success or %-EINVAL on failure. |
256 | */ | 307 | */ |
257 | static int | 308 | static int |
258 | mpc85xx_rio_config_write(int index, u16 destid, u8 hopcount, u32 offset, | 309 | fsl_rio_config_write(struct rio_mport *mport, int index, u16 destid, |
259 | int len, u32 val) | 310 | u8 hopcount, u32 offset, int len, u32 val) |
260 | { | 311 | { |
312 | struct rio_priv *priv = mport->priv; | ||
261 | u8 *data; | 313 | u8 *data; |
262 | pr_debug | 314 | pr_debug |
263 | ("mpc85xx_rio_config_write: index %d destid %d hopcount %d offset %8.8x len %d val %8.8x\n", | 315 | ("fsl_rio_config_write: index %d destid %d hopcount %d offset %8.8x len %d val %8.8x\n", |
264 | index, destid, hopcount, offset, len, val); | 316 | index, destid, hopcount, offset, len, val); |
265 | out_be32((void *)&maint_atmu_regs->rowtar, | 317 | out_be32(&priv->maint_atmu_regs->rowtar, |
266 | (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9)); | 318 | (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9)); |
267 | 319 | ||
268 | data = (u8 *) maint_win + offset; | 320 | data = (u8 *) priv->maint_win + offset; |
269 | switch (len) { | 321 | switch (len) { |
270 | case 1: | 322 | case 1: |
271 | out_8((u8 *) data, val); | 323 | out_8((u8 *) data, val); |
@@ -296,9 +348,10 @@ int | |||
296 | rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, | 348 | rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, |
297 | void *buffer, size_t len) | 349 | void *buffer, size_t len) |
298 | { | 350 | { |
351 | struct rio_priv *priv = mport->priv; | ||
299 | u32 omr; | 352 | u32 omr; |
300 | struct rio_tx_desc *desc = | 353 | struct rio_tx_desc *desc = (struct rio_tx_desc *)priv->msg_tx_ring.virt |
301 | (struct rio_tx_desc *)msg_tx_ring.virt + msg_tx_ring.tx_slot; | 354 | + priv->msg_tx_ring.tx_slot; |
302 | int ret = 0; | 355 | int ret = 0; |
303 | 356 | ||
304 | pr_debug | 357 | pr_debug |
@@ -311,31 +364,43 @@ rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, | |||
311 | } | 364 | } |
312 | 365 | ||
313 | /* Copy and clear rest of buffer */ | 366 | /* Copy and clear rest of buffer */ |
314 | memcpy(msg_tx_ring.virt_buffer[msg_tx_ring.tx_slot], buffer, len); | 367 | memcpy(priv->msg_tx_ring.virt_buffer[priv->msg_tx_ring.tx_slot], buffer, |
368 | len); | ||
315 | if (len < (RIO_MAX_MSG_SIZE - 4)) | 369 | if (len < (RIO_MAX_MSG_SIZE - 4)) |
316 | memset((void *)((u32) msg_tx_ring. | 370 | memset(priv->msg_tx_ring.virt_buffer[priv->msg_tx_ring.tx_slot] |
317 | virt_buffer[msg_tx_ring.tx_slot] + len), 0, | 371 | + len, 0, RIO_MAX_MSG_SIZE - len); |
318 | RIO_MAX_MSG_SIZE - len); | ||
319 | 372 | ||
320 | /* Set mbox field for message */ | 373 | switch (mport->phy_type) { |
321 | desc->dport = mbox & 0x3; | 374 | case RIO_PHY_PARALLEL: |
375 | /* Set mbox field for message */ | ||
376 | desc->dport = mbox & 0x3; | ||
322 | 377 | ||
323 | /* Enable EOMI interrupt, set priority, and set destid */ | 378 | /* Enable EOMI interrupt, set priority, and set destid */ |
324 | desc->dattr = 0x28000000 | (rdev->destid << 2); | 379 | desc->dattr = 0x28000000 | (rdev->destid << 2); |
380 | break; | ||
381 | case RIO_PHY_SERIAL: | ||
382 | /* Set mbox field for message, and set destid */ | ||
383 | desc->dport = (rdev->destid << 16) | (mbox & 0x3); | ||
384 | |||
385 | /* Enable EOMI interrupt and priority */ | ||
386 | desc->dattr = 0x28000000; | ||
387 | break; | ||
388 | } | ||
325 | 389 | ||
326 | /* Set transfer size aligned to next power of 2 (in double words) */ | 390 | /* Set transfer size aligned to next power of 2 (in double words) */ |
327 | desc->dwcnt = is_power_of_2(len) ? len : 1 << get_bitmask_order(len); | 391 | desc->dwcnt = is_power_of_2(len) ? len : 1 << get_bitmask_order(len); |
328 | 392 | ||
329 | /* Set snooping and source buffer address */ | 393 | /* Set snooping and source buffer address */ |
330 | desc->saddr = 0x00000004 | msg_tx_ring.phys_buffer[msg_tx_ring.tx_slot]; | 394 | desc->saddr = 0x00000004 |
395 | | priv->msg_tx_ring.phys_buffer[priv->msg_tx_ring.tx_slot]; | ||
331 | 396 | ||
332 | /* Increment enqueue pointer */ | 397 | /* Increment enqueue pointer */ |
333 | omr = in_be32((void *)&msg_regs->omr); | 398 | omr = in_be32(&priv->msg_regs->omr); |
334 | out_be32((void *)&msg_regs->omr, omr | RIO_MSG_OMR_MUI); | 399 | out_be32(&priv->msg_regs->omr, omr | RIO_MSG_OMR_MUI); |
335 | 400 | ||
336 | /* Go to next descriptor */ | 401 | /* Go to next descriptor */ |
337 | if (++msg_tx_ring.tx_slot == msg_tx_ring.size) | 402 | if (++priv->msg_tx_ring.tx_slot == priv->msg_tx_ring.size) |
338 | msg_tx_ring.tx_slot = 0; | 403 | priv->msg_tx_ring.tx_slot = 0; |
339 | 404 | ||
340 | out: | 405 | out: |
341 | return ret; | 406 | return ret; |
@@ -344,7 +409,7 @@ rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, | |||
344 | EXPORT_SYMBOL_GPL(rio_hw_add_outb_message); | 409 | EXPORT_SYMBOL_GPL(rio_hw_add_outb_message); |
345 | 410 | ||
346 | /** | 411 | /** |
347 | * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler | 412 | * fsl_rio_tx_handler - MPC85xx outbound message interrupt handler |
348 | * @irq: Linux interrupt number | 413 | * @irq: Linux interrupt number |
349 | * @dev_instance: Pointer to interrupt-specific data | 414 | * @dev_instance: Pointer to interrupt-specific data |
350 | * | 415 | * |
@@ -352,32 +417,34 @@ EXPORT_SYMBOL_GPL(rio_hw_add_outb_message); | |||
352 | * mailbox event handler and acks the interrupt occurrence. | 417 | * mailbox event handler and acks the interrupt occurrence. |
353 | */ | 418 | */ |
354 | static irqreturn_t | 419 | static irqreturn_t |
355 | mpc85xx_rio_tx_handler(int irq, void *dev_instance) | 420 | fsl_rio_tx_handler(int irq, void *dev_instance) |
356 | { | 421 | { |
357 | int osr; | 422 | int osr; |
358 | struct rio_mport *port = (struct rio_mport *)dev_instance; | 423 | struct rio_mport *port = (struct rio_mport *)dev_instance; |
424 | struct rio_priv *priv = port->priv; | ||
359 | 425 | ||
360 | osr = in_be32((void *)&msg_regs->osr); | 426 | osr = in_be32(&priv->msg_regs->osr); |
361 | 427 | ||
362 | if (osr & RIO_MSG_OSR_TE) { | 428 | if (osr & RIO_MSG_OSR_TE) { |
363 | pr_info("RIO: outbound message transmission error\n"); | 429 | pr_info("RIO: outbound message transmission error\n"); |
364 | out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_TE); | 430 | out_be32(&priv->msg_regs->osr, RIO_MSG_OSR_TE); |
365 | goto out; | 431 | goto out; |
366 | } | 432 | } |
367 | 433 | ||
368 | if (osr & RIO_MSG_OSR_QOI) { | 434 | if (osr & RIO_MSG_OSR_QOI) { |
369 | pr_info("RIO: outbound message queue overflow\n"); | 435 | pr_info("RIO: outbound message queue overflow\n"); |
370 | out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_QOI); | 436 | out_be32(&priv->msg_regs->osr, RIO_MSG_OSR_QOI); |
371 | goto out; | 437 | goto out; |
372 | } | 438 | } |
373 | 439 | ||
374 | if (osr & RIO_MSG_OSR_EOMI) { | 440 | if (osr & RIO_MSG_OSR_EOMI) { |
375 | u32 dqp = in_be32((void *)&msg_regs->odqdpar); | 441 | u32 dqp = in_be32(&priv->msg_regs->odqdpar); |
376 | int slot = (dqp - msg_tx_ring.phys) >> 5; | 442 | int slot = (dqp - priv->msg_tx_ring.phys) >> 5; |
377 | port->outb_msg[0].mcback(port, msg_tx_ring.dev_id, -1, slot); | 443 | port->outb_msg[0].mcback(port, priv->msg_tx_ring.dev_id, -1, |
444 | slot); | ||
378 | 445 | ||
379 | /* Ack the end-of-message interrupt */ | 446 | /* Ack the end-of-message interrupt */ |
380 | out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_EOMI); | 447 | out_be32(&priv->msg_regs->osr, RIO_MSG_OSR_EOMI); |
381 | } | 448 | } |
382 | 449 | ||
383 | out: | 450 | out: |
@@ -398,6 +465,7 @@ mpc85xx_rio_tx_handler(int irq, void *dev_instance) | |||
398 | int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) | 465 | int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) |
399 | { | 466 | { |
400 | int i, j, rc = 0; | 467 | int i, j, rc = 0; |
468 | struct rio_priv *priv = mport->priv; | ||
401 | 469 | ||
402 | if ((entries < RIO_MIN_TX_RING_SIZE) || | 470 | if ((entries < RIO_MIN_TX_RING_SIZE) || |
403 | (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) { | 471 | (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) { |
@@ -406,54 +474,53 @@ int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entr | |||
406 | } | 474 | } |
407 | 475 | ||
408 | /* Initialize shadow copy ring */ | 476 | /* Initialize shadow copy ring */ |
409 | msg_tx_ring.dev_id = dev_id; | 477 | priv->msg_tx_ring.dev_id = dev_id; |
410 | msg_tx_ring.size = entries; | 478 | priv->msg_tx_ring.size = entries; |
411 | 479 | ||
412 | for (i = 0; i < msg_tx_ring.size; i++) { | 480 | for (i = 0; i < priv->msg_tx_ring.size; i++) { |
413 | if (! | 481 | priv->msg_tx_ring.virt_buffer[i] = |
414 | (msg_tx_ring.virt_buffer[i] = | 482 | dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE, |
415 | dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE, | 483 | &priv->msg_tx_ring.phys_buffer[i], GFP_KERNEL); |
416 | &msg_tx_ring.phys_buffer[i], | 484 | if (!priv->msg_tx_ring.virt_buffer[i]) { |
417 | GFP_KERNEL))) { | ||
418 | rc = -ENOMEM; | 485 | rc = -ENOMEM; |
419 | for (j = 0; j < msg_tx_ring.size; j++) | 486 | for (j = 0; j < priv->msg_tx_ring.size; j++) |
420 | if (msg_tx_ring.virt_buffer[j]) | 487 | if (priv->msg_tx_ring.virt_buffer[j]) |
421 | dma_free_coherent(NULL, | 488 | dma_free_coherent(NULL, |
422 | RIO_MSG_BUFFER_SIZE, | 489 | RIO_MSG_BUFFER_SIZE, |
423 | msg_tx_ring. | 490 | priv->msg_tx_ring. |
424 | virt_buffer[j], | 491 | virt_buffer[j], |
425 | msg_tx_ring. | 492 | priv->msg_tx_ring. |
426 | phys_buffer[j]); | 493 | phys_buffer[j]); |
427 | goto out; | 494 | goto out; |
428 | } | 495 | } |
429 | } | 496 | } |
430 | 497 | ||
431 | /* Initialize outbound message descriptor ring */ | 498 | /* Initialize outbound message descriptor ring */ |
432 | if (!(msg_tx_ring.virt = dma_alloc_coherent(NULL, | 499 | priv->msg_tx_ring.virt = dma_alloc_coherent(NULL, |
433 | msg_tx_ring.size * | 500 | priv->msg_tx_ring.size * RIO_MSG_DESC_SIZE, |
434 | RIO_MSG_DESC_SIZE, | 501 | &priv->msg_tx_ring.phys, GFP_KERNEL); |
435 | &msg_tx_ring.phys, | 502 | if (!priv->msg_tx_ring.virt) { |
436 | GFP_KERNEL))) { | ||
437 | rc = -ENOMEM; | 503 | rc = -ENOMEM; |
438 | goto out_dma; | 504 | goto out_dma; |
439 | } | 505 | } |
440 | memset(msg_tx_ring.virt, 0, msg_tx_ring.size * RIO_MSG_DESC_SIZE); | 506 | memset(priv->msg_tx_ring.virt, 0, |
441 | msg_tx_ring.tx_slot = 0; | 507 | priv->msg_tx_ring.size * RIO_MSG_DESC_SIZE); |
508 | priv->msg_tx_ring.tx_slot = 0; | ||
442 | 509 | ||
443 | /* Point dequeue/enqueue pointers at first entry in ring */ | 510 | /* Point dequeue/enqueue pointers at first entry in ring */ |
444 | out_be32((void *)&msg_regs->odqdpar, msg_tx_ring.phys); | 511 | out_be32(&priv->msg_regs->odqdpar, priv->msg_tx_ring.phys); |
445 | out_be32((void *)&msg_regs->odqepar, msg_tx_ring.phys); | 512 | out_be32(&priv->msg_regs->odqepar, priv->msg_tx_ring.phys); |
446 | 513 | ||
447 | /* Configure for snooping */ | 514 | /* Configure for snooping */ |
448 | out_be32((void *)&msg_regs->osar, 0x00000004); | 515 | out_be32(&priv->msg_regs->osar, 0x00000004); |
449 | 516 | ||
450 | /* Clear interrupt status */ | 517 | /* Clear interrupt status */ |
451 | out_be32((void *)&msg_regs->osr, 0x000000b3); | 518 | out_be32(&priv->msg_regs->osr, 0x000000b3); |
452 | 519 | ||
453 | /* Hook up outbound message handler */ | 520 | /* Hook up outbound message handler */ |
454 | if ((rc = | 521 | rc = request_irq(IRQ_RIO_TX(mport), fsl_rio_tx_handler, 0, |
455 | request_irq(MPC85xx_IRQ_RIO_TX, mpc85xx_rio_tx_handler, 0, | 522 | "msg_tx", (void *)mport); |
456 | "msg_tx", (void *)mport)) < 0) | 523 | if (rc < 0) |
457 | goto out_irq; | 524 | goto out_irq; |
458 | 525 | ||
459 | /* | 526 | /* |
@@ -463,28 +530,28 @@ int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entr | |||
463 | * Chaining mode | 530 | * Chaining mode |
464 | * Disable | 531 | * Disable |
465 | */ | 532 | */ |
466 | out_be32((void *)&msg_regs->omr, 0x00100220); | 533 | out_be32(&priv->msg_regs->omr, 0x00100220); |
467 | 534 | ||
468 | /* Set number of entries */ | 535 | /* Set number of entries */ |
469 | out_be32((void *)&msg_regs->omr, | 536 | out_be32(&priv->msg_regs->omr, |
470 | in_be32((void *)&msg_regs->omr) | | 537 | in_be32(&priv->msg_regs->omr) | |
471 | ((get_bitmask_order(entries) - 2) << 12)); | 538 | ((get_bitmask_order(entries) - 2) << 12)); |
472 | 539 | ||
473 | /* Now enable the unit */ | 540 | /* Now enable the unit */ |
474 | out_be32((void *)&msg_regs->omr, in_be32((void *)&msg_regs->omr) | 0x1); | 541 | out_be32(&priv->msg_regs->omr, in_be32(&priv->msg_regs->omr) | 0x1); |
475 | 542 | ||
476 | out: | 543 | out: |
477 | return rc; | 544 | return rc; |
478 | 545 | ||
479 | out_irq: | 546 | out_irq: |
480 | dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE, | 547 | dma_free_coherent(NULL, priv->msg_tx_ring.size * RIO_MSG_DESC_SIZE, |
481 | msg_tx_ring.virt, msg_tx_ring.phys); | 548 | priv->msg_tx_ring.virt, priv->msg_tx_ring.phys); |
482 | 549 | ||
483 | out_dma: | 550 | out_dma: |
484 | for (i = 0; i < msg_tx_ring.size; i++) | 551 | for (i = 0; i < priv->msg_tx_ring.size; i++) |
485 | dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE, | 552 | dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE, |
486 | msg_tx_ring.virt_buffer[i], | 553 | priv->msg_tx_ring.virt_buffer[i], |
487 | msg_tx_ring.phys_buffer[i]); | 554 | priv->msg_tx_ring.phys_buffer[i]); |
488 | 555 | ||
489 | return rc; | 556 | return rc; |
490 | } | 557 | } |
@@ -499,19 +566,20 @@ int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entr | |||
499 | */ | 566 | */ |
500 | void rio_close_outb_mbox(struct rio_mport *mport, int mbox) | 567 | void rio_close_outb_mbox(struct rio_mport *mport, int mbox) |
501 | { | 568 | { |
569 | struct rio_priv *priv = mport->priv; | ||
502 | /* Disable inbound message unit */ | 570 | /* Disable inbound message unit */ |
503 | out_be32((void *)&msg_regs->omr, 0); | 571 | out_be32(&priv->msg_regs->omr, 0); |
504 | 572 | ||
505 | /* Free ring */ | 573 | /* Free ring */ |
506 | dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE, | 574 | dma_free_coherent(NULL, priv->msg_tx_ring.size * RIO_MSG_DESC_SIZE, |
507 | msg_tx_ring.virt, msg_tx_ring.phys); | 575 | priv->msg_tx_ring.virt, priv->msg_tx_ring.phys); |
508 | 576 | ||
509 | /* Free interrupt */ | 577 | /* Free interrupt */ |
510 | free_irq(MPC85xx_IRQ_RIO_TX, (void *)mport); | 578 | free_irq(IRQ_RIO_TX(mport), (void *)mport); |
511 | } | 579 | } |
512 | 580 | ||
513 | /** | 581 | /** |
514 | * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler | 582 | * fsl_rio_rx_handler - MPC85xx inbound message interrupt handler |
515 | * @irq: Linux interrupt number | 583 | * @irq: Linux interrupt number |
516 | * @dev_instance: Pointer to interrupt-specific data | 584 | * @dev_instance: Pointer to interrupt-specific data |
517 | * | 585 | * |
@@ -519,16 +587,17 @@ void rio_close_outb_mbox(struct rio_mport *mport, int mbox) | |||
519 | * mailbox event handler and acks the interrupt occurrence. | 587 | * mailbox event handler and acks the interrupt occurrence. |
520 | */ | 588 | */ |
521 | static irqreturn_t | 589 | static irqreturn_t |
522 | mpc85xx_rio_rx_handler(int irq, void *dev_instance) | 590 | fsl_rio_rx_handler(int irq, void *dev_instance) |
523 | { | 591 | { |
524 | int isr; | 592 | int isr; |
525 | struct rio_mport *port = (struct rio_mport *)dev_instance; | 593 | struct rio_mport *port = (struct rio_mport *)dev_instance; |
594 | struct rio_priv *priv = port->priv; | ||
526 | 595 | ||
527 | isr = in_be32((void *)&msg_regs->isr); | 596 | isr = in_be32(&priv->msg_regs->isr); |
528 | 597 | ||
529 | if (isr & RIO_MSG_ISR_TE) { | 598 | if (isr & RIO_MSG_ISR_TE) { |
530 | pr_info("RIO: inbound message reception error\n"); | 599 | pr_info("RIO: inbound message reception error\n"); |
531 | out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_TE); | 600 | out_be32((void *)&priv->msg_regs->isr, RIO_MSG_ISR_TE); |
532 | goto out; | 601 | goto out; |
533 | } | 602 | } |
534 | 603 | ||
@@ -540,10 +609,10 @@ mpc85xx_rio_rx_handler(int irq, void *dev_instance) | |||
540 | * make the callback with an unknown/invalid mailbox number | 609 | * make the callback with an unknown/invalid mailbox number |
541 | * argument. | 610 | * argument. |
542 | */ | 611 | */ |
543 | port->inb_msg[0].mcback(port, msg_rx_ring.dev_id, -1, -1); | 612 | port->inb_msg[0].mcback(port, priv->msg_rx_ring.dev_id, -1, -1); |
544 | 613 | ||
545 | /* Ack the queueing interrupt */ | 614 | /* Ack the queueing interrupt */ |
546 | out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_DIQI); | 615 | out_be32(&priv->msg_regs->isr, RIO_MSG_ISR_DIQI); |
547 | } | 616 | } |
548 | 617 | ||
549 | out: | 618 | out: |
@@ -564,6 +633,7 @@ mpc85xx_rio_rx_handler(int irq, void *dev_instance) | |||
564 | int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) | 633 | int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) |
565 | { | 634 | { |
566 | int i, rc = 0; | 635 | int i, rc = 0; |
636 | struct rio_priv *priv = mport->priv; | ||
567 | 637 | ||
568 | if ((entries < RIO_MIN_RX_RING_SIZE) || | 638 | if ((entries < RIO_MIN_RX_RING_SIZE) || |
569 | (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) { | 639 | (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) { |
@@ -572,36 +642,35 @@ int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entri | |||
572 | } | 642 | } |
573 | 643 | ||
574 | /* Initialize client buffer ring */ | 644 | /* Initialize client buffer ring */ |
575 | msg_rx_ring.dev_id = dev_id; | 645 | priv->msg_rx_ring.dev_id = dev_id; |
576 | msg_rx_ring.size = entries; | 646 | priv->msg_rx_ring.size = entries; |
577 | msg_rx_ring.rx_slot = 0; | 647 | priv->msg_rx_ring.rx_slot = 0; |
578 | for (i = 0; i < msg_rx_ring.size; i++) | 648 | for (i = 0; i < priv->msg_rx_ring.size; i++) |
579 | msg_rx_ring.virt_buffer[i] = NULL; | 649 | priv->msg_rx_ring.virt_buffer[i] = NULL; |
580 | 650 | ||
581 | /* Initialize inbound message ring */ | 651 | /* Initialize inbound message ring */ |
582 | if (!(msg_rx_ring.virt = dma_alloc_coherent(NULL, | 652 | priv->msg_rx_ring.virt = dma_alloc_coherent(NULL, |
583 | msg_rx_ring.size * | 653 | priv->msg_rx_ring.size * RIO_MAX_MSG_SIZE, |
584 | RIO_MAX_MSG_SIZE, | 654 | &priv->msg_rx_ring.phys, GFP_KERNEL); |
585 | &msg_rx_ring.phys, | 655 | if (!priv->msg_rx_ring.virt) { |
586 | GFP_KERNEL))) { | ||
587 | rc = -ENOMEM; | 656 | rc = -ENOMEM; |
588 | goto out; | 657 | goto out; |
589 | } | 658 | } |
590 | 659 | ||
591 | /* Point dequeue/enqueue pointers at first entry in ring */ | 660 | /* Point dequeue/enqueue pointers at first entry in ring */ |
592 | out_be32((void *)&msg_regs->ifqdpar, (u32) msg_rx_ring.phys); | 661 | out_be32(&priv->msg_regs->ifqdpar, (u32) priv->msg_rx_ring.phys); |
593 | out_be32((void *)&msg_regs->ifqepar, (u32) msg_rx_ring.phys); | 662 | out_be32(&priv->msg_regs->ifqepar, (u32) priv->msg_rx_ring.phys); |
594 | 663 | ||
595 | /* Clear interrupt status */ | 664 | /* Clear interrupt status */ |
596 | out_be32((void *)&msg_regs->isr, 0x00000091); | 665 | out_be32(&priv->msg_regs->isr, 0x00000091); |
597 | 666 | ||
598 | /* Hook up inbound message handler */ | 667 | /* Hook up inbound message handler */ |
599 | if ((rc = | 668 | rc = request_irq(IRQ_RIO_RX(mport), fsl_rio_rx_handler, 0, |
600 | request_irq(MPC85xx_IRQ_RIO_RX, mpc85xx_rio_rx_handler, 0, | 669 | "msg_rx", (void *)mport); |
601 | "msg_rx", (void *)mport)) < 0) { | 670 | if (rc < 0) { |
602 | dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE, | 671 | dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE, |
603 | msg_tx_ring.virt_buffer[i], | 672 | priv->msg_tx_ring.virt_buffer[i], |
604 | msg_tx_ring.phys_buffer[i]); | 673 | priv->msg_tx_ring.phys_buffer[i]); |
605 | goto out; | 674 | goto out; |
606 | } | 675 | } |
607 | 676 | ||
@@ -612,15 +681,13 @@ int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entri | |||
612 | * Unmask all interrupt sources | 681 | * Unmask all interrupt sources |
613 | * Disable | 682 | * Disable |
614 | */ | 683 | */ |
615 | out_be32((void *)&msg_regs->imr, 0x001b0060); | 684 | out_be32(&priv->msg_regs->imr, 0x001b0060); |
616 | 685 | ||
617 | /* Set number of queue entries */ | 686 | /* Set number of queue entries */ |
618 | out_be32((void *)&msg_regs->imr, | 687 | setbits32(&priv->msg_regs->imr, (get_bitmask_order(entries) - 2) << 12); |
619 | in_be32((void *)&msg_regs->imr) | | ||
620 | ((get_bitmask_order(entries) - 2) << 12)); | ||
621 | 688 | ||
622 | /* Now enable the unit */ | 689 | /* Now enable the unit */ |
623 | out_be32((void *)&msg_regs->imr, in_be32((void *)&msg_regs->imr) | 0x1); | 690 | setbits32(&priv->msg_regs->imr, 0x1); |
624 | 691 | ||
625 | out: | 692 | out: |
626 | return rc; | 693 | return rc; |
@@ -636,15 +703,16 @@ int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entri | |||
636 | */ | 703 | */ |
637 | void rio_close_inb_mbox(struct rio_mport *mport, int mbox) | 704 | void rio_close_inb_mbox(struct rio_mport *mport, int mbox) |
638 | { | 705 | { |
706 | struct rio_priv *priv = mport->priv; | ||
639 | /* Disable inbound message unit */ | 707 | /* Disable inbound message unit */ |
640 | out_be32((void *)&msg_regs->imr, 0); | 708 | out_be32(&priv->msg_regs->imr, 0); |
641 | 709 | ||
642 | /* Free ring */ | 710 | /* Free ring */ |
643 | dma_free_coherent(NULL, msg_rx_ring.size * RIO_MAX_MSG_SIZE, | 711 | dma_free_coherent(NULL, priv->msg_rx_ring.size * RIO_MAX_MSG_SIZE, |
644 | msg_rx_ring.virt, msg_rx_ring.phys); | 712 | priv->msg_rx_ring.virt, priv->msg_rx_ring.phys); |
645 | 713 | ||
646 | /* Free interrupt */ | 714 | /* Free interrupt */ |
647 | free_irq(MPC85xx_IRQ_RIO_RX, (void *)mport); | 715 | free_irq(IRQ_RIO_RX(mport), (void *)mport); |
648 | } | 716 | } |
649 | 717 | ||
650 | /** | 718 | /** |
@@ -659,21 +727,22 @@ void rio_close_inb_mbox(struct rio_mport *mport, int mbox) | |||
659 | int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf) | 727 | int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf) |
660 | { | 728 | { |
661 | int rc = 0; | 729 | int rc = 0; |
730 | struct rio_priv *priv = mport->priv; | ||
662 | 731 | ||
663 | pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n", | 732 | pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n", |
664 | msg_rx_ring.rx_slot); | 733 | priv->msg_rx_ring.rx_slot); |
665 | 734 | ||
666 | if (msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot]) { | 735 | if (priv->msg_rx_ring.virt_buffer[priv->msg_rx_ring.rx_slot]) { |
667 | printk(KERN_ERR | 736 | printk(KERN_ERR |
668 | "RIO: error adding inbound buffer %d, buffer exists\n", | 737 | "RIO: error adding inbound buffer %d, buffer exists\n", |
669 | msg_rx_ring.rx_slot); | 738 | priv->msg_rx_ring.rx_slot); |
670 | rc = -EINVAL; | 739 | rc = -EINVAL; |
671 | goto out; | 740 | goto out; |
672 | } | 741 | } |
673 | 742 | ||
674 | msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot] = buf; | 743 | priv->msg_rx_ring.virt_buffer[priv->msg_rx_ring.rx_slot] = buf; |
675 | if (++msg_rx_ring.rx_slot == msg_rx_ring.size) | 744 | if (++priv->msg_rx_ring.rx_slot == priv->msg_rx_ring.size) |
676 | msg_rx_ring.rx_slot = 0; | 745 | priv->msg_rx_ring.rx_slot = 0; |
677 | 746 | ||
678 | out: | 747 | out: |
679 | return rc; | 748 | return rc; |
@@ -691,20 +760,21 @@ EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer); | |||
691 | */ | 760 | */ |
692 | void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox) | 761 | void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox) |
693 | { | 762 | { |
694 | u32 imr; | 763 | struct rio_priv *priv = mport->priv; |
695 | u32 phys_buf, virt_buf; | 764 | u32 phys_buf, virt_buf; |
696 | void *buf = NULL; | 765 | void *buf = NULL; |
697 | int buf_idx; | 766 | int buf_idx; |
698 | 767 | ||
699 | phys_buf = in_be32((void *)&msg_regs->ifqdpar); | 768 | phys_buf = in_be32(&priv->msg_regs->ifqdpar); |
700 | 769 | ||
701 | /* If no more messages, then bail out */ | 770 | /* If no more messages, then bail out */ |
702 | if (phys_buf == in_be32((void *)&msg_regs->ifqepar)) | 771 | if (phys_buf == in_be32(&priv->msg_regs->ifqepar)) |
703 | goto out2; | 772 | goto out2; |
704 | 773 | ||
705 | virt_buf = (u32) msg_rx_ring.virt + (phys_buf - msg_rx_ring.phys); | 774 | virt_buf = (u32) priv->msg_rx_ring.virt + (phys_buf |
706 | buf_idx = (phys_buf - msg_rx_ring.phys) / RIO_MAX_MSG_SIZE; | 775 | - priv->msg_rx_ring.phys); |
707 | buf = msg_rx_ring.virt_buffer[buf_idx]; | 776 | buf_idx = (phys_buf - priv->msg_rx_ring.phys) / RIO_MAX_MSG_SIZE; |
777 | buf = priv->msg_rx_ring.virt_buffer[buf_idx]; | ||
708 | 778 | ||
709 | if (!buf) { | 779 | if (!buf) { |
710 | printk(KERN_ERR | 780 | printk(KERN_ERR |
@@ -716,11 +786,10 @@ void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox) | |||
716 | memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE); | 786 | memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE); |
717 | 787 | ||
718 | /* Clear the available buffer */ | 788 | /* Clear the available buffer */ |
719 | msg_rx_ring.virt_buffer[buf_idx] = NULL; | 789 | priv->msg_rx_ring.virt_buffer[buf_idx] = NULL; |
720 | 790 | ||
721 | out1: | 791 | out1: |
722 | imr = in_be32((void *)&msg_regs->imr); | 792 | setbits32(&priv->msg_regs->imr, RIO_MSG_IMR_MI); |
723 | out_be32((void *)&msg_regs->imr, imr | RIO_MSG_IMR_MI); | ||
724 | 793 | ||
725 | out2: | 794 | out2: |
726 | return buf; | 795 | return buf; |
@@ -729,7 +798,7 @@ void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox) | |||
729 | EXPORT_SYMBOL_GPL(rio_hw_get_inb_message); | 798 | EXPORT_SYMBOL_GPL(rio_hw_get_inb_message); |
730 | 799 | ||
731 | /** | 800 | /** |
732 | * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler | 801 | * fsl_rio_dbell_handler - MPC85xx doorbell interrupt handler |
733 | * @irq: Linux interrupt number | 802 | * @irq: Linux interrupt number |
734 | * @dev_instance: Pointer to interrupt-specific data | 803 | * @dev_instance: Pointer to interrupt-specific data |
735 | * | 804 | * |
@@ -737,31 +806,31 @@ EXPORT_SYMBOL_GPL(rio_hw_get_inb_message); | |||
737 | * doorbell event handlers and executes a matching event handler. | 806 | * doorbell event handlers and executes a matching event handler. |
738 | */ | 807 | */ |
739 | static irqreturn_t | 808 | static irqreturn_t |
740 | mpc85xx_rio_dbell_handler(int irq, void *dev_instance) | 809 | fsl_rio_dbell_handler(int irq, void *dev_instance) |
741 | { | 810 | { |
742 | int dsr; | 811 | int dsr; |
743 | struct rio_mport *port = (struct rio_mport *)dev_instance; | 812 | struct rio_mport *port = (struct rio_mport *)dev_instance; |
813 | struct rio_priv *priv = port->priv; | ||
744 | 814 | ||
745 | dsr = in_be32((void *)&msg_regs->dsr); | 815 | dsr = in_be32(&priv->msg_regs->dsr); |
746 | 816 | ||
747 | if (dsr & DOORBELL_DSR_TE) { | 817 | if (dsr & DOORBELL_DSR_TE) { |
748 | pr_info("RIO: doorbell reception error\n"); | 818 | pr_info("RIO: doorbell reception error\n"); |
749 | out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_TE); | 819 | out_be32(&priv->msg_regs->dsr, DOORBELL_DSR_TE); |
750 | goto out; | 820 | goto out; |
751 | } | 821 | } |
752 | 822 | ||
753 | if (dsr & DOORBELL_DSR_QFI) { | 823 | if (dsr & DOORBELL_DSR_QFI) { |
754 | pr_info("RIO: doorbell queue full\n"); | 824 | pr_info("RIO: doorbell queue full\n"); |
755 | out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_QFI); | 825 | out_be32(&priv->msg_regs->dsr, DOORBELL_DSR_QFI); |
756 | goto out; | 826 | goto out; |
757 | } | 827 | } |
758 | 828 | ||
759 | /* XXX Need to check/dispatch until queue empty */ | 829 | /* XXX Need to check/dispatch until queue empty */ |
760 | if (dsr & DOORBELL_DSR_DIQI) { | 830 | if (dsr & DOORBELL_DSR_DIQI) { |
761 | u32 dmsg = | 831 | u32 dmsg = |
762 | (u32) dbell_ring.virt + | 832 | (u32) priv->dbell_ring.virt + |
763 | (in_be32((void *)&msg_regs->dqdpar) & 0xfff); | 833 | (in_be32(&priv->msg_regs->dqdpar) & 0xfff); |
764 | u32 dmr; | ||
765 | struct rio_dbell *dbell; | 834 | struct rio_dbell *dbell; |
766 | int found = 0; | 835 | int found = 0; |
767 | 836 | ||
@@ -784,9 +853,8 @@ mpc85xx_rio_dbell_handler(int irq, void *dev_instance) | |||
784 | ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n", | 853 | ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n", |
785 | DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg)); | 854 | DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg)); |
786 | } | 855 | } |
787 | dmr = in_be32((void *)&msg_regs->dmr); | 856 | setbits32(&priv->msg_regs->dmr, DOORBELL_DMR_DI); |
788 | out_be32((void *)&msg_regs->dmr, dmr | DOORBELL_DMR_DI); | 857 | out_be32(&priv->msg_regs->dsr, DOORBELL_DSR_DIQI); |
789 | out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_DIQI); | ||
790 | } | 858 | } |
791 | 859 | ||
792 | out: | 860 | out: |
@@ -794,21 +862,22 @@ mpc85xx_rio_dbell_handler(int irq, void *dev_instance) | |||
794 | } | 862 | } |
795 | 863 | ||
796 | /** | 864 | /** |
797 | * mpc85xx_rio_doorbell_init - MPC85xx doorbell interface init | 865 | * fsl_rio_doorbell_init - MPC85xx doorbell interface init |
798 | * @mport: Master port implementing the inbound doorbell unit | 866 | * @mport: Master port implementing the inbound doorbell unit |
799 | * | 867 | * |
800 | * Initializes doorbell unit hardware and inbound DMA buffer | 868 | * Initializes doorbell unit hardware and inbound DMA buffer |
801 | * ring. Called from mpc85xx_rio_setup(). Returns %0 on success | 869 | * ring. Called from fsl_rio_setup(). Returns %0 on success |
802 | * or %-ENOMEM on failure. | 870 | * or %-ENOMEM on failure. |
803 | */ | 871 | */ |
804 | static int mpc85xx_rio_doorbell_init(struct rio_mport *mport) | 872 | static int fsl_rio_doorbell_init(struct rio_mport *mport) |
805 | { | 873 | { |
874 | struct rio_priv *priv = mport->priv; | ||
806 | int rc = 0; | 875 | int rc = 0; |
807 | 876 | ||
808 | /* Map outbound doorbell window immediately after maintenance window */ | 877 | /* Map outbound doorbell window immediately after maintenance window */ |
809 | if (!(dbell_win = | 878 | priv->dbell_win = ioremap(mport->iores.start + RIO_MAINT_WIN_SIZE, |
810 | (u32) ioremap(mport->iores.start + RIO_MAINT_WIN_SIZE, | 879 | RIO_DBELL_WIN_SIZE); |
811 | RIO_DBELL_WIN_SIZE))) { | 880 | if (!priv->dbell_win) { |
812 | printk(KERN_ERR | 881 | printk(KERN_ERR |
813 | "RIO: unable to map outbound doorbell window\n"); | 882 | "RIO: unable to map outbound doorbell window\n"); |
814 | rc = -ENOMEM; | 883 | rc = -ENOMEM; |
@@ -816,37 +885,36 @@ static int mpc85xx_rio_doorbell_init(struct rio_mport *mport) | |||
816 | } | 885 | } |
817 | 886 | ||
818 | /* Initialize inbound doorbells */ | 887 | /* Initialize inbound doorbells */ |
819 | if (!(dbell_ring.virt = dma_alloc_coherent(NULL, | 888 | priv->dbell_ring.virt = dma_alloc_coherent(NULL, 512 * |
820 | 512 * DOORBELL_MESSAGE_SIZE, | 889 | DOORBELL_MESSAGE_SIZE, &priv->dbell_ring.phys, GFP_KERNEL); |
821 | &dbell_ring.phys, | 890 | if (!priv->dbell_ring.virt) { |
822 | GFP_KERNEL))) { | ||
823 | printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n"); | 891 | printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n"); |
824 | rc = -ENOMEM; | 892 | rc = -ENOMEM; |
825 | iounmap((void *)dbell_win); | 893 | iounmap(priv->dbell_win); |
826 | goto out; | 894 | goto out; |
827 | } | 895 | } |
828 | 896 | ||
829 | /* Point dequeue/enqueue pointers at first entry in ring */ | 897 | /* Point dequeue/enqueue pointers at first entry in ring */ |
830 | out_be32((void *)&msg_regs->dqdpar, (u32) dbell_ring.phys); | 898 | out_be32(&priv->msg_regs->dqdpar, (u32) priv->dbell_ring.phys); |
831 | out_be32((void *)&msg_regs->dqepar, (u32) dbell_ring.phys); | 899 | out_be32(&priv->msg_regs->dqepar, (u32) priv->dbell_ring.phys); |
832 | 900 | ||
833 | /* Clear interrupt status */ | 901 | /* Clear interrupt status */ |
834 | out_be32((void *)&msg_regs->dsr, 0x00000091); | 902 | out_be32(&priv->msg_regs->dsr, 0x00000091); |
835 | 903 | ||
836 | /* Hook up doorbell handler */ | 904 | /* Hook up doorbell handler */ |
837 | if ((rc = | 905 | rc = request_irq(IRQ_RIO_BELL(mport), fsl_rio_dbell_handler, 0, |
838 | request_irq(MPC85xx_IRQ_RIO_BELL, mpc85xx_rio_dbell_handler, 0, | 906 | "dbell_rx", (void *)mport); |
839 | "dbell_rx", (void *)mport) < 0)) { | 907 | if (rc < 0) { |
840 | iounmap((void *)dbell_win); | 908 | iounmap(priv->dbell_win); |
841 | dma_free_coherent(NULL, 512 * DOORBELL_MESSAGE_SIZE, | 909 | dma_free_coherent(NULL, 512 * DOORBELL_MESSAGE_SIZE, |
842 | dbell_ring.virt, dbell_ring.phys); | 910 | priv->dbell_ring.virt, priv->dbell_ring.phys); |
843 | printk(KERN_ERR | 911 | printk(KERN_ERR |
844 | "MPC85xx RIO: unable to request inbound doorbell irq"); | 912 | "MPC85xx RIO: unable to request inbound doorbell irq"); |
845 | goto out; | 913 | goto out; |
846 | } | 914 | } |
847 | 915 | ||
848 | /* Configure doorbells for snooping, 512 entries, and enable */ | 916 | /* Configure doorbells for snooping, 512 entries, and enable */ |
849 | out_be32((void *)&msg_regs->dmr, 0x00108161); | 917 | out_be32(&priv->msg_regs->dmr, 0x00108161); |
850 | 918 | ||
851 | out: | 919 | out: |
852 | return rc; | 920 | return rc; |
@@ -854,7 +922,7 @@ static int mpc85xx_rio_doorbell_init(struct rio_mport *mport) | |||
854 | 922 | ||
855 | static char *cmdline = NULL; | 923 | static char *cmdline = NULL; |
856 | 924 | ||
857 | static int mpc85xx_rio_get_hdid(int index) | 925 | static int fsl_rio_get_hdid(int index) |
858 | { | 926 | { |
859 | /* XXX Need to parse multiple entries in some format */ | 927 | /* XXX Need to parse multiple entries in some format */ |
860 | if (!cmdline) | 928 | if (!cmdline) |
@@ -863,7 +931,7 @@ static int mpc85xx_rio_get_hdid(int index) | |||
863 | return simple_strtol(cmdline, NULL, 0); | 931 | return simple_strtol(cmdline, NULL, 0); |
864 | } | 932 | } |
865 | 933 | ||
866 | static int mpc85xx_rio_get_cmdline(char *s) | 934 | static int fsl_rio_get_cmdline(char *s) |
867 | { | 935 | { |
868 | if (!s) | 936 | if (!s) |
869 | return 0; | 937 | return 0; |
@@ -872,61 +940,266 @@ static int mpc85xx_rio_get_cmdline(char *s) | |||
872 | return 1; | 940 | return 1; |
873 | } | 941 | } |
874 | 942 | ||
875 | __setup("riohdid=", mpc85xx_rio_get_cmdline); | 943 | __setup("riohdid=", fsl_rio_get_cmdline); |
944 | |||
945 | static inline void fsl_rio_info(struct device *dev, u32 ccsr) | ||
946 | { | ||
947 | const char *str; | ||
948 | if (ccsr & 1) { | ||
949 | /* Serial phy */ | ||
950 | switch (ccsr >> 30) { | ||
951 | case 0: | ||
952 | str = "1"; | ||
953 | break; | ||
954 | case 1: | ||
955 | str = "4"; | ||
956 | break; | ||
957 | default: | ||
958 | str = "Unknown"; | ||
959 | break;; | ||
960 | } | ||
961 | dev_info(dev, "Hardware port width: %s\n", str); | ||
962 | |||
963 | switch ((ccsr >> 27) & 7) { | ||
964 | case 0: | ||
965 | str = "Single-lane 0"; | ||
966 | break; | ||
967 | case 1: | ||
968 | str = "Single-lane 2"; | ||
969 | break; | ||
970 | case 2: | ||
971 | str = "Four-lane"; | ||
972 | break; | ||
973 | default: | ||
974 | str = "Unknown"; | ||
975 | break; | ||
976 | } | ||
977 | dev_info(dev, "Training connection status: %s\n", str); | ||
978 | } else { | ||
979 | /* Parallel phy */ | ||
980 | if (!(ccsr & 0x80000000)) | ||
981 | dev_info(dev, "Output port operating in 8-bit mode\n"); | ||
982 | if (!(ccsr & 0x08000000)) | ||
983 | dev_info(dev, "Input port operating in 8-bit mode\n"); | ||
984 | } | ||
985 | } | ||
876 | 986 | ||
877 | /** | 987 | /** |
878 | * mpc85xx_rio_setup - Setup MPC85xx RapidIO interface | 988 | * fsl_rio_setup - Setup MPC85xx RapidIO interface |
879 | * @law_start: Starting physical address of RapidIO LAW | 989 | * @fsl_rio_setup - Setup Freescale PowerPC RapidIO interface |
880 | * @law_size: Size of RapidIO LAW | ||
881 | * | 990 | * |
882 | * Initializes MPC85xx RapidIO hardware interface, configures | 991 | * Initializes MPC85xx RapidIO hardware interface, configures |
883 | * master port with system-specific info, and registers the | 992 | * master port with system-specific info, and registers the |
884 | * master port with the RapidIO subsystem. | 993 | * master port with the RapidIO subsystem. |
885 | */ | 994 | */ |
886 | void mpc85xx_rio_setup(int law_start, int law_size) | 995 | int fsl_rio_setup(struct of_device *dev) |
887 | { | 996 | { |
888 | struct rio_ops *ops; | 997 | struct rio_ops *ops; |
889 | struct rio_mport *port; | 998 | struct rio_mport *port; |
999 | struct rio_priv *priv; | ||
1000 | int rc = 0; | ||
1001 | const u32 *dt_range, *cell; | ||
1002 | struct resource regs; | ||
1003 | int rlen; | ||
1004 | u32 ccsr; | ||
1005 | u64 law_start, law_size; | ||
1006 | int paw, aw, sw; | ||
1007 | |||
1008 | if (!dev->node) { | ||
1009 | dev_err(&dev->dev, "Device OF-Node is NULL"); | ||
1010 | return -EFAULT; | ||
1011 | } | ||
1012 | |||
1013 | rc = of_address_to_resource(dev->node, 0, ®s); | ||
1014 | if (rc) { | ||
1015 | dev_err(&dev->dev, "Can't get %s property 'reg'\n", | ||
1016 | dev->node->full_name); | ||
1017 | return -EFAULT; | ||
1018 | } | ||
1019 | dev_info(&dev->dev, "Of-device full name %s\n", dev->node->full_name); | ||
1020 | dev_info(&dev->dev, "Regs start 0x%08x size 0x%08x\n", regs.start, | ||
1021 | regs.end - regs.start + 1); | ||
1022 | |||
1023 | dt_range = of_get_property(dev->node, "ranges", &rlen); | ||
1024 | if (!dt_range) { | ||
1025 | dev_err(&dev->dev, "Can't get %s property 'ranges'\n", | ||
1026 | dev->node->full_name); | ||
1027 | return -EFAULT; | ||
1028 | } | ||
1029 | |||
1030 | /* Get node address wide */ | ||
1031 | cell = of_get_property(dev->node, "#address-cells", NULL); | ||
1032 | if (cell) | ||
1033 | aw = *cell; | ||
1034 | else | ||
1035 | aw = of_n_addr_cells(dev->node); | ||
1036 | /* Get node size wide */ | ||
1037 | cell = of_get_property(dev->node, "#size-cells", NULL); | ||
1038 | if (cell) | ||
1039 | sw = *cell; | ||
1040 | else | ||
1041 | sw = of_n_size_cells(dev->node); | ||
1042 | /* Get parent address wide wide */ | ||
1043 | paw = of_n_addr_cells(dev->node); | ||
1044 | |||
1045 | law_start = of_read_number(dt_range + aw, paw); | ||
1046 | law_size = of_read_number(dt_range + aw + paw, sw); | ||
1047 | |||
1048 | dev_info(&dev->dev, "LAW start 0x%016llx, size 0x%016llx.\n", | ||
1049 | law_start, law_size); | ||
890 | 1050 | ||
891 | ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL); | 1051 | ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL); |
892 | ops->lcread = mpc85xx_local_config_read; | 1052 | ops->lcread = fsl_local_config_read; |
893 | ops->lcwrite = mpc85xx_local_config_write; | 1053 | ops->lcwrite = fsl_local_config_write; |
894 | ops->cread = mpc85xx_rio_config_read; | 1054 | ops->cread = fsl_rio_config_read; |
895 | ops->cwrite = mpc85xx_rio_config_write; | 1055 | ops->cwrite = fsl_rio_config_write; |
896 | ops->dsend = mpc85xx_rio_doorbell_send; | 1056 | ops->dsend = fsl_rio_doorbell_send; |
897 | 1057 | ||
898 | port = kmalloc(sizeof(struct rio_mport), GFP_KERNEL); | 1058 | port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL); |
899 | port->id = 0; | 1059 | port->id = 0; |
900 | port->index = 0; | 1060 | port->index = 0; |
1061 | |||
1062 | priv = kzalloc(sizeof(struct rio_priv), GFP_KERNEL); | ||
1063 | if (!priv) { | ||
1064 | printk(KERN_ERR "Can't alloc memory for 'priv'\n"); | ||
1065 | rc = -ENOMEM; | ||
1066 | goto err; | ||
1067 | } | ||
1068 | |||
901 | INIT_LIST_HEAD(&port->dbells); | 1069 | INIT_LIST_HEAD(&port->dbells); |
902 | port->iores.start = law_start; | 1070 | port->iores.start = law_start; |
903 | port->iores.end = law_start + law_size; | 1071 | port->iores.end = law_start + law_size; |
904 | port->iores.flags = IORESOURCE_MEM; | 1072 | port->iores.flags = IORESOURCE_MEM; |
905 | 1073 | ||
1074 | priv->bellirq = irq_of_parse_and_map(dev->node, 2); | ||
1075 | priv->txirq = irq_of_parse_and_map(dev->node, 3); | ||
1076 | priv->rxirq = irq_of_parse_and_map(dev->node, 4); | ||
1077 | dev_info(&dev->dev, "bellirq: %d, txirq: %d, rxirq %d\n", priv->bellirq, | ||
1078 | priv->txirq, priv->rxirq); | ||
1079 | |||
906 | rio_init_dbell_res(&port->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff); | 1080 | rio_init_dbell_res(&port->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff); |
907 | rio_init_mbox_res(&port->riores[RIO_INB_MBOX_RESOURCE], 0, 0); | 1081 | rio_init_mbox_res(&port->riores[RIO_INB_MBOX_RESOURCE], 0, 0); |
908 | rio_init_mbox_res(&port->riores[RIO_OUTB_MBOX_RESOURCE], 0, 0); | 1082 | rio_init_mbox_res(&port->riores[RIO_OUTB_MBOX_RESOURCE], 0, 0); |
909 | strcpy(port->name, "RIO0 mport"); | 1083 | strcpy(port->name, "RIO0 mport"); |
910 | 1084 | ||
911 | port->ops = ops; | 1085 | port->ops = ops; |
912 | port->host_deviceid = mpc85xx_rio_get_hdid(port->id); | 1086 | port->host_deviceid = fsl_rio_get_hdid(port->id); |
913 | 1087 | ||
1088 | port->priv = priv; | ||
914 | rio_register_mport(port); | 1089 | rio_register_mport(port); |
915 | 1090 | ||
916 | regs_win = (u32) ioremap(RIO_REGS_BASE, 0x20000); | 1091 | priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1); |
917 | atmu_regs = (struct rio_atmu_regs *)(regs_win + RIO_ATMU_REGS_OFFSET); | 1092 | |
918 | maint_atmu_regs = atmu_regs + 1; | 1093 | /* Probe the master port phy type */ |
919 | dbell_atmu_regs = atmu_regs + 2; | 1094 | ccsr = in_be32(priv->regs_win + RIO_CCSR); |
920 | msg_regs = (struct rio_msg_regs *)(regs_win + RIO_MSG_REGS_OFFSET); | 1095 | port->phy_type = (ccsr & 1) ? RIO_PHY_SERIAL : RIO_PHY_PARALLEL; |
1096 | dev_info(&dev->dev, "RapidIO PHY type: %s\n", | ||
1097 | (port->phy_type == RIO_PHY_PARALLEL) ? "parallel" : | ||
1098 | ((port->phy_type == RIO_PHY_SERIAL) ? "serial" : | ||
1099 | "unknown")); | ||
1100 | /* Checking the port training status */ | ||
1101 | if (in_be32((priv->regs_win + RIO_ESCSR)) & 1) { | ||
1102 | dev_err(&dev->dev, "Port is not ready. " | ||
1103 | "Try to restart connection...\n"); | ||
1104 | switch (port->phy_type) { | ||
1105 | case RIO_PHY_SERIAL: | ||
1106 | /* Disable ports */ | ||
1107 | out_be32(priv->regs_win + RIO_CCSR, 0); | ||
1108 | /* Set 1x lane */ | ||
1109 | setbits32(priv->regs_win + RIO_CCSR, 0x02000000); | ||
1110 | /* Enable ports */ | ||
1111 | setbits32(priv->regs_win + RIO_CCSR, 0x00600000); | ||
1112 | break; | ||
1113 | case RIO_PHY_PARALLEL: | ||
1114 | /* Disable ports */ | ||
1115 | out_be32(priv->regs_win + RIO_CCSR, 0x22000000); | ||
1116 | /* Enable ports */ | ||
1117 | out_be32(priv->regs_win + RIO_CCSR, 0x44000000); | ||
1118 | break; | ||
1119 | } | ||
1120 | msleep(100); | ||
1121 | if (in_be32((priv->regs_win + RIO_ESCSR)) & 1) { | ||
1122 | dev_err(&dev->dev, "Port restart failed.\n"); | ||
1123 | rc = -ENOLINK; | ||
1124 | goto err; | ||
1125 | } | ||
1126 | dev_info(&dev->dev, "Port restart success!\n"); | ||
1127 | } | ||
1128 | fsl_rio_info(&dev->dev, ccsr); | ||
1129 | |||
1130 | port->sys_size = (in_be32((priv->regs_win + RIO_PEF_CAR)) | ||
1131 | & RIO_PEF_CTLS) >> 4; | ||
1132 | dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n", | ||
1133 | port->sys_size ? 65536 : 256); | ||
1134 | |||
1135 | priv->atmu_regs = (struct rio_atmu_regs *)(priv->regs_win | ||
1136 | + RIO_ATMU_REGS_OFFSET); | ||
1137 | priv->maint_atmu_regs = priv->atmu_regs + 1; | ||
1138 | priv->dbell_atmu_regs = priv->atmu_regs + 2; | ||
1139 | priv->msg_regs = (struct rio_msg_regs *)(priv->regs_win + | ||
1140 | ((port->phy_type == RIO_PHY_SERIAL) ? | ||
1141 | RIO_S_MSG_REGS_OFFSET : RIO_P_MSG_REGS_OFFSET)); | ||
1142 | |||
1143 | /* Set to receive any dist ID for serial RapidIO controller. */ | ||
1144 | if (port->phy_type == RIO_PHY_SERIAL) | ||
1145 | out_be32((priv->regs_win + RIO_ISR_AACR), RIO_ISR_AACR_AA); | ||
921 | 1146 | ||
922 | /* Configure maintenance transaction window */ | 1147 | /* Configure maintenance transaction window */ |
923 | out_be32((void *)&maint_atmu_regs->rowbar, 0x000c0000); | 1148 | out_be32(&priv->maint_atmu_regs->rowbar, 0x000c0000); |
924 | out_be32((void *)&maint_atmu_regs->rowar, 0x80077015); | 1149 | out_be32(&priv->maint_atmu_regs->rowar, 0x80077015); |
925 | 1150 | ||
926 | maint_win = (u32) ioremap(law_start, RIO_MAINT_WIN_SIZE); | 1151 | priv->maint_win = ioremap(law_start, RIO_MAINT_WIN_SIZE); |
927 | 1152 | ||
928 | /* Configure outbound doorbell window */ | 1153 | /* Configure outbound doorbell window */ |
929 | out_be32((void *)&dbell_atmu_regs->rowbar, 0x000c0400); | 1154 | out_be32(&priv->dbell_atmu_regs->rowbar, 0x000c0400); |
930 | out_be32((void *)&dbell_atmu_regs->rowar, 0x8004200b); | 1155 | out_be32(&priv->dbell_atmu_regs->rowar, 0x8004200b); |
931 | mpc85xx_rio_doorbell_init(port); | 1156 | fsl_rio_doorbell_init(port); |
1157 | |||
1158 | return 0; | ||
1159 | err: | ||
1160 | if (priv) | ||
1161 | iounmap(priv->regs_win); | ||
1162 | kfree(ops); | ||
1163 | kfree(priv); | ||
1164 | kfree(port); | ||
1165 | return rc; | ||
1166 | } | ||
1167 | |||
1168 | /* The probe function for RapidIO peer-to-peer network. | ||
1169 | */ | ||
1170 | static int __devinit fsl_of_rio_rpn_probe(struct of_device *dev, | ||
1171 | const struct of_device_id *match) | ||
1172 | { | ||
1173 | int rc; | ||
1174 | printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", | ||
1175 | dev->node->full_name); | ||
1176 | |||
1177 | rc = fsl_rio_setup(dev); | ||
1178 | if (rc) | ||
1179 | goto out; | ||
1180 | |||
1181 | /* Enumerate all registered ports */ | ||
1182 | rc = rio_init_mports(); | ||
1183 | out: | ||
1184 | return rc; | ||
1185 | }; | ||
1186 | |||
1187 | static const struct of_device_id fsl_of_rio_rpn_ids[] = { | ||
1188 | { | ||
1189 | .compatible = "fsl,rapidio-delta", | ||
1190 | }, | ||
1191 | {}, | ||
1192 | }; | ||
1193 | |||
1194 | static struct of_platform_driver fsl_of_rio_rpn_driver = { | ||
1195 | .name = "fsl-of-rio", | ||
1196 | .match_table = fsl_of_rio_rpn_ids, | ||
1197 | .probe = fsl_of_rio_rpn_probe, | ||
1198 | }; | ||
1199 | |||
1200 | static __init int fsl_of_rio_rpn_init(void) | ||
1201 | { | ||
1202 | return of_register_platform_driver(&fsl_of_rio_rpn_driver); | ||
932 | } | 1203 | } |
1204 | |||
1205 | subsys_initcall(fsl_of_rio_rpn_init); | ||
diff --git a/arch/powerpc/sysdev/fsl_rio.h b/arch/powerpc/sysdev/fsl_rio.h deleted file mode 100644 index 6d3ff30b1579..000000000000 --- a/arch/powerpc/sysdev/fsl_rio.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * MPC85xx RapidIO definitions | ||
3 | * | ||
4 | * Copyright 2005 MontaVista Software, Inc. | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PPC_SYSLIB_PPC85XX_RIO_H | ||
14 | #define __PPC_SYSLIB_PPC85XX_RIO_H | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | |||
18 | extern void mpc85xx_rio_setup(int law_start, int law_size); | ||
19 | |||
20 | #endif /* __PPC_SYSLIB_PPC85XX_RIO_H */ | ||
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 7b45670c7af3..324c01b70ddd 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -418,22 +418,21 @@ arch_initcall(gfar_of_init); | |||
418 | #include <linux/i2c.h> | 418 | #include <linux/i2c.h> |
419 | struct i2c_driver_device { | 419 | struct i2c_driver_device { |
420 | char *of_device; | 420 | char *of_device; |
421 | char *i2c_driver; | ||
422 | char *i2c_type; | 421 | char *i2c_type; |
423 | }; | 422 | }; |
424 | 423 | ||
425 | static struct i2c_driver_device i2c_devices[] __initdata = { | 424 | static struct i2c_driver_device i2c_devices[] __initdata = { |
426 | {"ricoh,rs5c372a", "rtc-rs5c372", "rs5c372a",}, | 425 | {"ricoh,rs5c372a", "rs5c372a"}, |
427 | {"ricoh,rs5c372b", "rtc-rs5c372", "rs5c372b",}, | 426 | {"ricoh,rs5c372b", "rs5c372b"}, |
428 | {"ricoh,rv5c386", "rtc-rs5c372", "rv5c386",}, | 427 | {"ricoh,rv5c386", "rv5c386"}, |
429 | {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",}, | 428 | {"ricoh,rv5c387a", "rv5c387a"}, |
430 | {"dallas,ds1307", "rtc-ds1307", "ds1307",}, | 429 | {"dallas,ds1307", "ds1307"}, |
431 | {"dallas,ds1337", "rtc-ds1307", "ds1337",}, | 430 | {"dallas,ds1337", "ds1337"}, |
432 | {"dallas,ds1338", "rtc-ds1307", "ds1338",}, | 431 | {"dallas,ds1338", "ds1338"}, |
433 | {"dallas,ds1339", "rtc-ds1307", "ds1339",}, | 432 | {"dallas,ds1339", "ds1339"}, |
434 | {"dallas,ds1340", "rtc-ds1307", "ds1340",}, | 433 | {"dallas,ds1340", "ds1340"}, |
435 | {"stm,m41t00", "rtc-ds1307", "m41t00"}, | 434 | {"stm,m41t00", "m41t00"}, |
436 | {"dallas,ds1374", "rtc-ds1374", "rtc-ds1374",}, | 435 | {"dallas,ds1374", "rtc-ds1374"}, |
437 | }; | 436 | }; |
438 | 437 | ||
439 | static int __init of_find_i2c_driver(struct device_node *node, | 438 | static int __init of_find_i2c_driver(struct device_node *node, |
@@ -444,9 +443,7 @@ static int __init of_find_i2c_driver(struct device_node *node, | |||
444 | for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { | 443 | for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { |
445 | if (!of_device_is_compatible(node, i2c_devices[i].of_device)) | 444 | if (!of_device_is_compatible(node, i2c_devices[i].of_device)) |
446 | continue; | 445 | continue; |
447 | if (strlcpy(info->driver_name, i2c_devices[i].i2c_driver, | 446 | if (strlcpy(info->type, i2c_devices[i].i2c_type, |
448 | KOBJ_NAME_LEN) >= KOBJ_NAME_LEN || | ||
449 | strlcpy(info->type, i2c_devices[i].i2c_type, | ||
450 | I2C_NAME_SIZE) >= I2C_NAME_SIZE) | 447 | I2C_NAME_SIZE) >= I2C_NAME_SIZE) |
451 | return -ENOMEM; | 448 | return -ENOMEM; |
452 | return 0; | 449 | return 0; |
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c index a51a17714231..8dcbdd6c2d2c 100644 --- a/arch/ppc/kernel/asm-offsets.c +++ b/arch/ppc/kernel/asm-offsets.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/suspend.h> | 18 | #include <linux/suspend.h> |
19 | #include <linux/mman.h> | 19 | #include <linux/mman.h> |
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/kbuild.h> | ||
22 | |||
21 | #include <asm/io.h> | 23 | #include <asm/io.h> |
22 | #include <asm/page.h> | 24 | #include <asm/page.h> |
23 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
@@ -26,11 +28,6 @@ | |||
26 | #include <asm/thread_info.h> | 28 | #include <asm/thread_info.h> |
27 | #include <asm/vdso_datapage.h> | 29 | #include <asm/vdso_datapage.h> |
28 | 30 | ||
29 | #define DEFINE(sym, val) \ | ||
30 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
31 | |||
32 | #define BLANK() asm volatile("\n->" : : ) | ||
33 | |||
34 | int | 31 | int |
35 | main(void) | 32 | main(void) |
36 | { | 33 | { |
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 50ce83f20adb..df3ef6db072c 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c | |||
@@ -1121,8 +1121,8 @@ void __init pci_init_resource(struct resource *res, resource_size_t start, | |||
1121 | 1121 | ||
1122 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | 1122 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) |
1123 | { | 1123 | { |
1124 | unsigned long start = pci_resource_start(dev, bar); | 1124 | resource_size_t start = pci_resource_start(dev, bar); |
1125 | unsigned long len = pci_resource_len(dev, bar); | 1125 | resource_size_t len = pci_resource_len(dev, bar); |
1126 | unsigned long flags = pci_resource_flags(dev, bar); | 1126 | unsigned long flags = pci_resource_flags(dev, bar); |
1127 | 1127 | ||
1128 | if (!len) | 1128 | if (!len) |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index d9036ef0b658..16ac11ca7ba0 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -183,9 +183,6 @@ EXPORT_SYMBOL(cuda_poll); | |||
183 | #if defined(CONFIG_BOOTX_TEXT) | 183 | #if defined(CONFIG_BOOTX_TEXT) |
184 | EXPORT_SYMBOL(btext_update_display); | 184 | EXPORT_SYMBOL(btext_update_display); |
185 | #endif | 185 | #endif |
186 | #ifdef CONFIG_VT | ||
187 | EXPORT_SYMBOL(kd_mksound); | ||
188 | #endif | ||
189 | EXPORT_SYMBOL(to_tm); | 186 | EXPORT_SYMBOL(to_tm); |
190 | 187 | ||
191 | EXPORT_SYMBOL(pm_power_off); | 188 | EXPORT_SYMBOL(pm_power_off); |
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c index 0df6aacb8237..24f6e0694ac1 100644 --- a/arch/ppc/platforms/sbc82xx.c +++ b/arch/ppc/platforms/sbc82xx.c | |||
@@ -30,8 +30,6 @@ static void (*callback_init_IRQ)(void); | |||
30 | 30 | ||
31 | extern unsigned char __res[sizeof(bd_t)]; | 31 | extern unsigned char __res[sizeof(bd_t)]; |
32 | 32 | ||
33 | extern void (*late_time_init)(void); | ||
34 | |||
35 | #ifdef CONFIG_GEN_RTC | 33 | #ifdef CONFIG_GEN_RTC |
36 | TODC_ALLOC(); | 34 | TODC_ALLOC(); |
37 | 35 | ||
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 8f5f02160ffc..29a7940f284f 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -300,6 +300,14 @@ comment "Kernel preemption" | |||
300 | 300 | ||
301 | source "kernel/Kconfig.preempt" | 301 | source "kernel/Kconfig.preempt" |
302 | 302 | ||
303 | config ARCH_SPARSEMEM_ENABLE | ||
304 | def_bool y | ||
305 | select SPARSEMEM_VMEMMAP_ENABLE | ||
306 | select SPARSEMEM_VMEMMAP | ||
307 | |||
308 | config ARCH_SPARSEMEM_DEFAULT | ||
309 | def_bool y | ||
310 | |||
303 | source "mm/Kconfig" | 311 | source "mm/Kconfig" |
304 | 312 | ||
305 | comment "I/O subsystem configuration" | 313 | comment "I/O subsystem configuration" |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index a72f208e62d0..aa341d0ea1e6 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc4 | 3 | # Linux kernel version: 2.6.25 |
4 | # Wed Mar 5 11:22:59 2008 | 4 | # Wed Apr 30 11:07:45 2008 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -14,10 +14,12 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y | |||
14 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 14 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
15 | CONFIG_GENERIC_HWEIGHT=y | 15 | CONFIG_GENERIC_HWEIGHT=y |
16 | CONFIG_GENERIC_TIME=y | 16 | CONFIG_GENERIC_TIME=y |
17 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
17 | CONFIG_GENERIC_BUG=y | 18 | CONFIG_GENERIC_BUG=y |
18 | CONFIG_NO_IOMEM=y | 19 | CONFIG_NO_IOMEM=y |
19 | CONFIG_NO_DMA=y | 20 | CONFIG_NO_DMA=y |
20 | CONFIG_GENERIC_LOCKBREAK=y | 21 | CONFIG_GENERIC_LOCKBREAK=y |
22 | CONFIG_PGSTE=y | ||
21 | CONFIG_S390=y | 23 | CONFIG_S390=y |
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 25 | ||
@@ -43,6 +45,7 @@ CONFIG_LOG_BUF_SHIFT=17 | |||
43 | CONFIG_CGROUPS=y | 45 | CONFIG_CGROUPS=y |
44 | # CONFIG_CGROUP_DEBUG is not set | 46 | # CONFIG_CGROUP_DEBUG is not set |
45 | CONFIG_CGROUP_NS=y | 47 | CONFIG_CGROUP_NS=y |
48 | # CONFIG_CGROUP_DEVICE is not set | ||
46 | # CONFIG_CPUSETS is not set | 49 | # CONFIG_CPUSETS is not set |
47 | CONFIG_GROUP_SCHED=y | 50 | CONFIG_GROUP_SCHED=y |
48 | CONFIG_FAIR_GROUP_SCHED=y | 51 | CONFIG_FAIR_GROUP_SCHED=y |
@@ -65,6 +68,7 @@ CONFIG_INITRAMFS_SOURCE="" | |||
65 | CONFIG_SYSCTL=y | 68 | CONFIG_SYSCTL=y |
66 | # CONFIG_EMBEDDED is not set | 69 | # CONFIG_EMBEDDED is not set |
67 | CONFIG_SYSCTL_SYSCALL=y | 70 | CONFIG_SYSCTL_SYSCALL=y |
71 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
68 | CONFIG_KALLSYMS=y | 72 | CONFIG_KALLSYMS=y |
69 | # CONFIG_KALLSYMS_ALL is not set | 73 | # CONFIG_KALLSYMS_ALL is not set |
70 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 74 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -92,6 +96,7 @@ CONFIG_KPROBES=y | |||
92 | CONFIG_KRETPROBES=y | 96 | CONFIG_KRETPROBES=y |
93 | CONFIG_HAVE_KPROBES=y | 97 | CONFIG_HAVE_KPROBES=y |
94 | CONFIG_HAVE_KRETPROBES=y | 98 | CONFIG_HAVE_KRETPROBES=y |
99 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
95 | CONFIG_PROC_PAGE_MONITOR=y | 100 | CONFIG_PROC_PAGE_MONITOR=y |
96 | CONFIG_SLABINFO=y | 101 | CONFIG_SLABINFO=y |
97 | CONFIG_RT_MUTEXES=y | 102 | CONFIG_RT_MUTEXES=y |
@@ -121,8 +126,8 @@ CONFIG_DEFAULT_DEADLINE=y | |||
121 | # CONFIG_DEFAULT_CFQ is not set | 126 | # CONFIG_DEFAULT_CFQ is not set |
122 | # CONFIG_DEFAULT_NOOP is not set | 127 | # CONFIG_DEFAULT_NOOP is not set |
123 | CONFIG_DEFAULT_IOSCHED="deadline" | 128 | CONFIG_DEFAULT_IOSCHED="deadline" |
129 | CONFIG_PREEMPT_NOTIFIERS=y | ||
124 | CONFIG_CLASSIC_RCU=y | 130 | CONFIG_CLASSIC_RCU=y |
125 | # CONFIG_PREEMPT_RCU is not set | ||
126 | 131 | ||
127 | # | 132 | # |
128 | # Base setup | 133 | # Base setup |
@@ -131,6 +136,10 @@ CONFIG_CLASSIC_RCU=y | |||
131 | # | 136 | # |
132 | # Processor type and features | 137 | # Processor type and features |
133 | # | 138 | # |
139 | CONFIG_TICK_ONESHOT=y | ||
140 | CONFIG_NO_HZ=y | ||
141 | CONFIG_HIGH_RES_TIMERS=y | ||
142 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
134 | CONFIG_64BIT=y | 143 | CONFIG_64BIT=y |
135 | CONFIG_SMP=y | 144 | CONFIG_SMP=y |
136 | CONFIG_NR_CPUS=32 | 145 | CONFIG_NR_CPUS=32 |
@@ -161,15 +170,20 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y | |||
161 | # CONFIG_PREEMPT_NONE is not set | 170 | # CONFIG_PREEMPT_NONE is not set |
162 | # CONFIG_PREEMPT_VOLUNTARY is not set | 171 | # CONFIG_PREEMPT_VOLUNTARY is not set |
163 | CONFIG_PREEMPT=y | 172 | CONFIG_PREEMPT=y |
164 | # CONFIG_RCU_TRACE is not set | 173 | # CONFIG_PREEMPT_RCU is not set |
174 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | ||
175 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y | ||
165 | CONFIG_SELECT_MEMORY_MODEL=y | 176 | CONFIG_SELECT_MEMORY_MODEL=y |
166 | CONFIG_FLATMEM_MANUAL=y | 177 | # CONFIG_FLATMEM_MANUAL is not set |
167 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 178 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
168 | # CONFIG_SPARSEMEM_MANUAL is not set | 179 | CONFIG_SPARSEMEM_MANUAL=y |
169 | CONFIG_FLATMEM=y | 180 | CONFIG_SPARSEMEM=y |
170 | CONFIG_FLAT_NODE_MEM_MAP=y | 181 | CONFIG_HAVE_MEMORY_PRESENT=y |
171 | # CONFIG_SPARSEMEM_STATIC is not set | 182 | # CONFIG_SPARSEMEM_STATIC is not set |
172 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | 183 | CONFIG_SPARSEMEM_EXTREME=y |
184 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | ||
185 | CONFIG_SPARSEMEM_VMEMMAP=y | ||
186 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
173 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 187 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
174 | CONFIG_RESOURCES_64BIT=y | 188 | CONFIG_RESOURCES_64BIT=y |
175 | CONFIG_ZONE_DMA_FLAG=1 | 189 | CONFIG_ZONE_DMA_FLAG=1 |
@@ -205,11 +219,10 @@ CONFIG_HZ_100=y | |||
205 | # CONFIG_HZ_1000 is not set | 219 | # CONFIG_HZ_1000 is not set |
206 | CONFIG_HZ=100 | 220 | CONFIG_HZ=100 |
207 | # CONFIG_SCHED_HRTICK is not set | 221 | # CONFIG_SCHED_HRTICK is not set |
208 | CONFIG_NO_IDLE_HZ=y | ||
209 | CONFIG_NO_IDLE_HZ_INIT=y | ||
210 | CONFIG_S390_HYPFS_FS=y | 222 | CONFIG_S390_HYPFS_FS=y |
211 | CONFIG_KEXEC=y | 223 | CONFIG_KEXEC=y |
212 | # CONFIG_ZFCPDUMP is not set | 224 | # CONFIG_ZFCPDUMP is not set |
225 | CONFIG_S390_GUEST=y | ||
213 | 226 | ||
214 | # | 227 | # |
215 | # Networking | 228 | # Networking |
@@ -272,8 +285,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y | |||
272 | CONFIG_INET6_XFRM_MODE_BEET=y | 285 | CONFIG_INET6_XFRM_MODE_BEET=y |
273 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 286 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
274 | CONFIG_IPV6_SIT=y | 287 | CONFIG_IPV6_SIT=y |
288 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
275 | # CONFIG_IPV6_TUNNEL is not set | 289 | # CONFIG_IPV6_TUNNEL is not set |
276 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 290 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
291 | # CONFIG_IPV6_MROUTE is not set | ||
277 | # CONFIG_NETWORK_SECMARK is not set | 292 | # CONFIG_NETWORK_SECMARK is not set |
278 | CONFIG_NETFILTER=y | 293 | CONFIG_NETFILTER=y |
279 | # CONFIG_NETFILTER_DEBUG is not set | 294 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -289,6 +304,7 @@ CONFIG_NF_CONNTRACK=m | |||
289 | # CONFIG_NF_CT_ACCT is not set | 304 | # CONFIG_NF_CT_ACCT is not set |
290 | # CONFIG_NF_CONNTRACK_MARK is not set | 305 | # CONFIG_NF_CONNTRACK_MARK is not set |
291 | # CONFIG_NF_CONNTRACK_EVENTS is not set | 306 | # CONFIG_NF_CONNTRACK_EVENTS is not set |
307 | # CONFIG_NF_CT_PROTO_DCCP is not set | ||
292 | # CONFIG_NF_CT_PROTO_SCTP is not set | 308 | # CONFIG_NF_CT_PROTO_SCTP is not set |
293 | # CONFIG_NF_CT_PROTO_UDPLITE is not set | 309 | # CONFIG_NF_CT_PROTO_UDPLITE is not set |
294 | # CONFIG_NF_CONNTRACK_AMANDA is not set | 310 | # CONFIG_NF_CONNTRACK_AMANDA is not set |
@@ -439,6 +455,7 @@ CONFIG_DASD_ECKD=y | |||
439 | CONFIG_DASD_FBA=y | 455 | CONFIG_DASD_FBA=y |
440 | CONFIG_DASD_DIAG=y | 456 | CONFIG_DASD_DIAG=y |
441 | CONFIG_DASD_EER=y | 457 | CONFIG_DASD_EER=y |
458 | CONFIG_VIRTIO_BLK=m | ||
442 | CONFIG_MISC_DEVICES=y | 459 | CONFIG_MISC_DEVICES=y |
443 | # CONFIG_EEPROM_93CX6 is not set | 460 | # CONFIG_EEPROM_93CX6 is not set |
444 | # CONFIG_ENCLOSURE_SERVICES is not set | 461 | # CONFIG_ENCLOSURE_SERVICES is not set |
@@ -533,7 +550,7 @@ CONFIG_NETDEV_10000=y | |||
533 | # S/390 network device drivers | 550 | # S/390 network device drivers |
534 | # | 551 | # |
535 | CONFIG_LCS=m | 552 | CONFIG_LCS=m |
536 | CONFIG_CTC=m | 553 | CONFIG_CTCM=m |
537 | # CONFIG_NETIUCV is not set | 554 | # CONFIG_NETIUCV is not set |
538 | # CONFIG_SMSGIUCV is not set | 555 | # CONFIG_SMSGIUCV is not set |
539 | # CONFIG_CLAW is not set | 556 | # CONFIG_CLAW is not set |
@@ -547,10 +564,12 @@ CONFIG_CCWGROUP=y | |||
547 | # CONFIG_NETCONSOLE is not set | 564 | # CONFIG_NETCONSOLE is not set |
548 | # CONFIG_NETPOLL is not set | 565 | # CONFIG_NETPOLL is not set |
549 | # CONFIG_NET_POLL_CONTROLLER is not set | 566 | # CONFIG_NET_POLL_CONTROLLER is not set |
567 | CONFIG_VIRTIO_NET=m | ||
550 | 568 | ||
551 | # | 569 | # |
552 | # Character devices | 570 | # Character devices |
553 | # | 571 | # |
572 | CONFIG_DEVKMEM=y | ||
554 | CONFIG_UNIX98_PTYS=y | 573 | CONFIG_UNIX98_PTYS=y |
555 | CONFIG_LEGACY_PTYS=y | 574 | CONFIG_LEGACY_PTYS=y |
556 | CONFIG_LEGACY_PTY_COUNT=256 | 575 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -600,6 +619,7 @@ CONFIG_S390_VMUR=m | |||
600 | # Sonics Silicon Backplane | 619 | # Sonics Silicon Backplane |
601 | # | 620 | # |
602 | # CONFIG_MEMSTICK is not set | 621 | # CONFIG_MEMSTICK is not set |
622 | # CONFIG_NEW_LEDS is not set | ||
603 | 623 | ||
604 | # | 624 | # |
605 | # File systems | 625 | # File systems |
@@ -652,6 +672,7 @@ CONFIG_PROC_SYSCTL=y | |||
652 | CONFIG_SYSFS=y | 672 | CONFIG_SYSFS=y |
653 | CONFIG_TMPFS=y | 673 | CONFIG_TMPFS=y |
654 | CONFIG_TMPFS_POSIX_ACL=y | 674 | CONFIG_TMPFS_POSIX_ACL=y |
675 | # CONFIG_HUGETLBFS is not set | ||
655 | # CONFIG_HUGETLB_PAGE is not set | 676 | # CONFIG_HUGETLB_PAGE is not set |
656 | CONFIG_CONFIGFS_FS=m | 677 | CONFIG_CONFIGFS_FS=m |
657 | 678 | ||
@@ -678,12 +699,10 @@ CONFIG_NFS_FS=y | |||
678 | CONFIG_NFS_V3=y | 699 | CONFIG_NFS_V3=y |
679 | # CONFIG_NFS_V3_ACL is not set | 700 | # CONFIG_NFS_V3_ACL is not set |
680 | # CONFIG_NFS_V4 is not set | 701 | # CONFIG_NFS_V4 is not set |
681 | # CONFIG_NFS_DIRECTIO is not set | ||
682 | CONFIG_NFSD=y | 702 | CONFIG_NFSD=y |
683 | CONFIG_NFSD_V3=y | 703 | CONFIG_NFSD_V3=y |
684 | # CONFIG_NFSD_V3_ACL is not set | 704 | # CONFIG_NFSD_V3_ACL is not set |
685 | # CONFIG_NFSD_V4 is not set | 705 | # CONFIG_NFSD_V4 is not set |
686 | CONFIG_NFSD_TCP=y | ||
687 | CONFIG_LOCKD=y | 706 | CONFIG_LOCKD=y |
688 | CONFIG_LOCKD_V4=y | 707 | CONFIG_LOCKD_V4=y |
689 | CONFIG_EXPORTFS=y | 708 | CONFIG_EXPORTFS=y |
@@ -731,6 +750,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y | |||
731 | # CONFIG_PRINTK_TIME is not set | 750 | # CONFIG_PRINTK_TIME is not set |
732 | CONFIG_ENABLE_WARN_DEPRECATED=y | 751 | CONFIG_ENABLE_WARN_DEPRECATED=y |
733 | CONFIG_ENABLE_MUST_CHECK=y | 752 | CONFIG_ENABLE_MUST_CHECK=y |
753 | CONFIG_FRAME_WARN=2048 | ||
734 | CONFIG_MAGIC_SYSRQ=y | 754 | CONFIG_MAGIC_SYSRQ=y |
735 | # CONFIG_UNUSED_SYMBOLS is not set | 755 | # CONFIG_UNUSED_SYMBOLS is not set |
736 | CONFIG_DEBUG_FS=y | 756 | CONFIG_DEBUG_FS=y |
@@ -754,6 +774,7 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y | |||
754 | CONFIG_DEBUG_BUGVERBOSE=y | 774 | CONFIG_DEBUG_BUGVERBOSE=y |
755 | # CONFIG_DEBUG_INFO is not set | 775 | # CONFIG_DEBUG_INFO is not set |
756 | # CONFIG_DEBUG_VM is not set | 776 | # CONFIG_DEBUG_VM is not set |
777 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
757 | # CONFIG_DEBUG_LIST is not set | 778 | # CONFIG_DEBUG_LIST is not set |
758 | # CONFIG_DEBUG_SG is not set | 779 | # CONFIG_DEBUG_SG is not set |
759 | # CONFIG_FRAME_POINTER is not set | 780 | # CONFIG_FRAME_POINTER is not set |
@@ -775,58 +796,88 @@ CONFIG_SAMPLES=y | |||
775 | # CONFIG_SECURITY is not set | 796 | # CONFIG_SECURITY is not set |
776 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 797 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
777 | CONFIG_CRYPTO=y | 798 | CONFIG_CRYPTO=y |
799 | |||
800 | # | ||
801 | # Crypto core or helper | ||
802 | # | ||
778 | CONFIG_CRYPTO_ALGAPI=y | 803 | CONFIG_CRYPTO_ALGAPI=y |
779 | CONFIG_CRYPTO_AEAD=m | 804 | CONFIG_CRYPTO_AEAD=m |
780 | CONFIG_CRYPTO_BLKCIPHER=y | 805 | CONFIG_CRYPTO_BLKCIPHER=y |
781 | CONFIG_CRYPTO_SEQIV=m | ||
782 | CONFIG_CRYPTO_HASH=m | 806 | CONFIG_CRYPTO_HASH=m |
783 | CONFIG_CRYPTO_MANAGER=y | 807 | CONFIG_CRYPTO_MANAGER=y |
808 | CONFIG_CRYPTO_GF128MUL=m | ||
809 | # CONFIG_CRYPTO_NULL is not set | ||
810 | # CONFIG_CRYPTO_CRYPTD is not set | ||
811 | CONFIG_CRYPTO_AUTHENC=m | ||
812 | # CONFIG_CRYPTO_TEST is not set | ||
813 | |||
814 | # | ||
815 | # Authenticated Encryption with Associated Data | ||
816 | # | ||
817 | CONFIG_CRYPTO_CCM=m | ||
818 | CONFIG_CRYPTO_GCM=m | ||
819 | CONFIG_CRYPTO_SEQIV=m | ||
820 | |||
821 | # | ||
822 | # Block modes | ||
823 | # | ||
824 | CONFIG_CRYPTO_CBC=y | ||
825 | CONFIG_CRYPTO_CTR=m | ||
826 | CONFIG_CRYPTO_CTS=m | ||
827 | CONFIG_CRYPTO_ECB=m | ||
828 | # CONFIG_CRYPTO_LRW is not set | ||
829 | CONFIG_CRYPTO_PCBC=m | ||
830 | # CONFIG_CRYPTO_XTS is not set | ||
831 | |||
832 | # | ||
833 | # Hash modes | ||
834 | # | ||
784 | CONFIG_CRYPTO_HMAC=m | 835 | CONFIG_CRYPTO_HMAC=m |
785 | # CONFIG_CRYPTO_XCBC is not set | 836 | # CONFIG_CRYPTO_XCBC is not set |
786 | # CONFIG_CRYPTO_NULL is not set | 837 | |
838 | # | ||
839 | # Digest | ||
840 | # | ||
841 | # CONFIG_CRYPTO_CRC32C is not set | ||
787 | # CONFIG_CRYPTO_MD4 is not set | 842 | # CONFIG_CRYPTO_MD4 is not set |
788 | CONFIG_CRYPTO_MD5=m | 843 | CONFIG_CRYPTO_MD5=m |
844 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
789 | CONFIG_CRYPTO_SHA1=m | 845 | CONFIG_CRYPTO_SHA1=m |
790 | # CONFIG_CRYPTO_SHA256 is not set | 846 | # CONFIG_CRYPTO_SHA256 is not set |
791 | # CONFIG_CRYPTO_SHA512 is not set | 847 | # CONFIG_CRYPTO_SHA512 is not set |
792 | # CONFIG_CRYPTO_WP512 is not set | ||
793 | # CONFIG_CRYPTO_TGR192 is not set | 848 | # CONFIG_CRYPTO_TGR192 is not set |
794 | CONFIG_CRYPTO_GF128MUL=m | 849 | # CONFIG_CRYPTO_WP512 is not set |
795 | CONFIG_CRYPTO_ECB=m | 850 | |
796 | CONFIG_CRYPTO_CBC=y | 851 | # |
797 | CONFIG_CRYPTO_PCBC=m | 852 | # Ciphers |
798 | # CONFIG_CRYPTO_LRW is not set | 853 | # |
799 | # CONFIG_CRYPTO_XTS is not set | ||
800 | CONFIG_CRYPTO_CTR=m | ||
801 | CONFIG_CRYPTO_GCM=m | ||
802 | CONFIG_CRYPTO_CCM=m | ||
803 | # CONFIG_CRYPTO_CRYPTD is not set | ||
804 | # CONFIG_CRYPTO_DES is not set | ||
805 | CONFIG_CRYPTO_FCRYPT=m | ||
806 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
807 | # CONFIG_CRYPTO_TWOFISH is not set | ||
808 | # CONFIG_CRYPTO_SERPENT is not set | ||
809 | # CONFIG_CRYPTO_AES is not set | 854 | # CONFIG_CRYPTO_AES is not set |
855 | # CONFIG_CRYPTO_ANUBIS is not set | ||
856 | # CONFIG_CRYPTO_ARC4 is not set | ||
857 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
858 | CONFIG_CRYPTO_CAMELLIA=m | ||
810 | # CONFIG_CRYPTO_CAST5 is not set | 859 | # CONFIG_CRYPTO_CAST5 is not set |
811 | # CONFIG_CRYPTO_CAST6 is not set | 860 | # CONFIG_CRYPTO_CAST6 is not set |
812 | # CONFIG_CRYPTO_TEA is not set | 861 | # CONFIG_CRYPTO_DES is not set |
813 | # CONFIG_CRYPTO_ARC4 is not set | 862 | CONFIG_CRYPTO_FCRYPT=m |
814 | # CONFIG_CRYPTO_KHAZAD is not set | 863 | # CONFIG_CRYPTO_KHAZAD is not set |
815 | # CONFIG_CRYPTO_ANUBIS is not set | ||
816 | CONFIG_CRYPTO_SEED=m | ||
817 | CONFIG_CRYPTO_SALSA20=m | 864 | CONFIG_CRYPTO_SALSA20=m |
865 | CONFIG_CRYPTO_SEED=m | ||
866 | # CONFIG_CRYPTO_SERPENT is not set | ||
867 | # CONFIG_CRYPTO_TEA is not set | ||
868 | # CONFIG_CRYPTO_TWOFISH is not set | ||
869 | |||
870 | # | ||
871 | # Compression | ||
872 | # | ||
818 | # CONFIG_CRYPTO_DEFLATE is not set | 873 | # CONFIG_CRYPTO_DEFLATE is not set |
819 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
820 | # CONFIG_CRYPTO_CRC32C is not set | ||
821 | CONFIG_CRYPTO_CAMELLIA=m | ||
822 | # CONFIG_CRYPTO_TEST is not set | ||
823 | CONFIG_CRYPTO_AUTHENC=m | ||
824 | CONFIG_CRYPTO_LZO=m | 874 | CONFIG_CRYPTO_LZO=m |
825 | CONFIG_CRYPTO_HW=y | 875 | CONFIG_CRYPTO_HW=y |
826 | CONFIG_ZCRYPT=m | 876 | CONFIG_ZCRYPT=m |
827 | # CONFIG_ZCRYPT_MONOLITHIC is not set | 877 | # CONFIG_ZCRYPT_MONOLITHIC is not set |
828 | # CONFIG_CRYPTO_SHA1_S390 is not set | 878 | # CONFIG_CRYPTO_SHA1_S390 is not set |
829 | # CONFIG_CRYPTO_SHA256_S390 is not set | 879 | # CONFIG_CRYPTO_SHA256_S390 is not set |
880 | CONFIG_CRYPTO_SHA512_S390=m | ||
830 | # CONFIG_CRYPTO_DES_S390 is not set | 881 | # CONFIG_CRYPTO_DES_S390 is not set |
831 | # CONFIG_CRYPTO_AES_S390 is not set | 882 | # CONFIG_CRYPTO_AES_S390 is not set |
832 | CONFIG_S390_PRNG=m | 883 | CONFIG_S390_PRNG=m |
@@ -835,6 +886,8 @@ CONFIG_S390_PRNG=m | |||
835 | # Library routines | 886 | # Library routines |
836 | # | 887 | # |
837 | CONFIG_BITREVERSE=m | 888 | CONFIG_BITREVERSE=m |
889 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
890 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
838 | # CONFIG_CRC_CCITT is not set | 891 | # CONFIG_CRC_CCITT is not set |
839 | # CONFIG_CRC16 is not set | 892 | # CONFIG_CRC16 is not set |
840 | # CONFIG_CRC_ITU_T is not set | 893 | # CONFIG_CRC_ITU_T is not set |
@@ -844,3 +897,9 @@ CONFIG_LIBCRC32C=m | |||
844 | CONFIG_LZO_COMPRESS=m | 897 | CONFIG_LZO_COMPRESS=m |
845 | CONFIG_LZO_DECOMPRESS=m | 898 | CONFIG_LZO_DECOMPRESS=m |
846 | CONFIG_PLIST=y | 899 | CONFIG_PLIST=y |
900 | CONFIG_HAVE_KVM=y | ||
901 | CONFIG_VIRTUALIZATION=y | ||
902 | CONFIG_KVM=m | ||
903 | CONFIG_VIRTIO=y | ||
904 | CONFIG_VIRTIO_RING=y | ||
905 | CONFIG_VIRTIO_BALLOON=m | ||
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index 77051cd27925..6302f5082588 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
@@ -2,8 +2,6 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | EXTRA_AFLAGS := -traditional | ||
6 | |||
7 | # | 5 | # |
8 | # Passing null pointers is ok for smp code, since we access the lowcore here. | 6 | # Passing null pointers is ok for smp code, since we access the lowcore here. |
9 | # | 7 | # |
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index 1375f8a4469e..fa28ecae636b 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
@@ -5,44 +5,38 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | 8 | #include <linux/kbuild.h> | |
9 | /* Use marker if you need to separate the values later */ | ||
10 | |||
11 | #define DEFINE(sym, val, marker) \ | ||
12 | asm volatile("\n->" #sym " %0 " #val " " #marker : : "i" (val)) | ||
13 | |||
14 | #define BLANK() asm volatile("\n->" : : ) | ||
15 | 9 | ||
16 | int main(void) | 10 | int main(void) |
17 | { | 11 | { |
18 | DEFINE(__THREAD_info, offsetof(struct task_struct, stack),); | 12 | DEFINE(__THREAD_info, offsetof(struct task_struct, stack)); |
19 | DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),); | 13 | DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp)); |
20 | DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),); | 14 | DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info)); |
21 | DEFINE(__THREAD_mm_segment, | 15 | DEFINE(__THREAD_mm_segment, |
22 | offsetof(struct task_struct, thread.mm_segment),); | 16 | offsetof(struct task_struct, thread.mm_segment)); |
23 | BLANK(); | 17 | BLANK(); |
24 | DEFINE(__TASK_pid, offsetof(struct task_struct, pid),); | 18 | DEFINE(__TASK_pid, offsetof(struct task_struct, pid)); |
25 | BLANK(); | 19 | BLANK(); |
26 | DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),); | 20 | DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid)); |
27 | DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),); | 21 | DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address)); |
28 | DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id),); | 22 | DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id)); |
29 | BLANK(); | 23 | BLANK(); |
30 | DEFINE(__TI_task, offsetof(struct thread_info, task),); | 24 | DEFINE(__TI_task, offsetof(struct thread_info, task)); |
31 | DEFINE(__TI_domain, offsetof(struct thread_info, exec_domain),); | 25 | DEFINE(__TI_domain, offsetof(struct thread_info, exec_domain)); |
32 | DEFINE(__TI_flags, offsetof(struct thread_info, flags),); | 26 | DEFINE(__TI_flags, offsetof(struct thread_info, flags)); |
33 | DEFINE(__TI_cpu, offsetof(struct thread_info, cpu),); | 27 | DEFINE(__TI_cpu, offsetof(struct thread_info, cpu)); |
34 | DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count),); | 28 | DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count)); |
35 | BLANK(); | 29 | BLANK(); |
36 | DEFINE(__PT_ARGS, offsetof(struct pt_regs, args),); | 30 | DEFINE(__PT_ARGS, offsetof(struct pt_regs, args)); |
37 | DEFINE(__PT_PSW, offsetof(struct pt_regs, psw),); | 31 | DEFINE(__PT_PSW, offsetof(struct pt_regs, psw)); |
38 | DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs),); | 32 | DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs)); |
39 | DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2),); | 33 | DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2)); |
40 | DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc),); | 34 | DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc)); |
41 | DEFINE(__PT_TRAP, offsetof(struct pt_regs, trap),); | 35 | DEFINE(__PT_TRAP, offsetof(struct pt_regs, trap)); |
42 | DEFINE(__PT_SIZE, sizeof(struct pt_regs),); | 36 | DEFINE(__PT_SIZE, sizeof(struct pt_regs)); |
43 | BLANK(); | 37 | BLANK(); |
44 | DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain),); | 38 | DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain)); |
45 | DEFINE(__SF_GPRS, offsetof(struct stack_frame, gprs),); | 39 | DEFINE(__SF_GPRS, offsetof(struct stack_frame, gprs)); |
46 | DEFINE(__SF_EMPTY, offsetof(struct stack_frame, empty1),); | 40 | DEFINE(__SF_EMPTY, offsetof(struct stack_frame, empty1)); |
47 | return 0; | 41 | return 0; |
48 | } | 42 | } |
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 68ec4083bf73..d0e09684b9ce 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -139,15 +139,15 @@ static noinline __init void detect_machine_type(void) | |||
139 | 139 | ||
140 | /* Running under z/VM ? */ | 140 | /* Running under z/VM ? */ |
141 | if (cpuinfo->cpu_id.version == 0xff) | 141 | if (cpuinfo->cpu_id.version == 0xff) |
142 | machine_flags |= 1; | 142 | machine_flags |= MACHINE_FLAG_VM; |
143 | 143 | ||
144 | /* Running on a P/390 ? */ | 144 | /* Running on a P/390 ? */ |
145 | if (cpuinfo->cpu_id.machine == 0x7490) | 145 | if (cpuinfo->cpu_id.machine == 0x7490) |
146 | machine_flags |= 4; | 146 | machine_flags |= MACHINE_FLAG_P390; |
147 | 147 | ||
148 | /* Running under KVM ? */ | 148 | /* Running under KVM ? */ |
149 | if (cpuinfo->cpu_id.version == 0xfe) | 149 | if (cpuinfo->cpu_id.version == 0xfe) |
150 | machine_flags |= 64; | 150 | machine_flags |= MACHINE_FLAG_KVM; |
151 | } | 151 | } |
152 | 152 | ||
153 | #ifdef CONFIG_64BIT | 153 | #ifdef CONFIG_64BIT |
@@ -268,6 +268,118 @@ static noinline __init void setup_lowcore_early(void) | |||
268 | s390_base_pgm_handler_fn = early_pgm_check_handler; | 268 | s390_base_pgm_handler_fn = early_pgm_check_handler; |
269 | } | 269 | } |
270 | 270 | ||
271 | static noinline __init void setup_hpage(void) | ||
272 | { | ||
273 | #ifndef CONFIG_DEBUG_PAGEALLOC | ||
274 | unsigned int facilities; | ||
275 | |||
276 | facilities = stfl(); | ||
277 | if (!(facilities & (1UL << 23)) || !(facilities & (1UL << 29))) | ||
278 | return; | ||
279 | machine_flags |= MACHINE_FLAG_HPAGE; | ||
280 | __ctl_set_bit(0, 23); | ||
281 | #endif | ||
282 | } | ||
283 | |||
284 | static __init void detect_mvpg(void) | ||
285 | { | ||
286 | #ifndef CONFIG_64BIT | ||
287 | int rc; | ||
288 | |||
289 | asm volatile( | ||
290 | " la 0,0\n" | ||
291 | " mvpg %2,%2\n" | ||
292 | "0: la %0,0\n" | ||
293 | "1:\n" | ||
294 | EX_TABLE(0b,1b) | ||
295 | : "=d" (rc) : "0" (-EOPNOTSUPP), "a" (0) : "memory", "cc", "0"); | ||
296 | if (!rc) | ||
297 | machine_flags |= MACHINE_FLAG_MVPG; | ||
298 | #endif | ||
299 | } | ||
300 | |||
301 | static __init void detect_ieee(void) | ||
302 | { | ||
303 | #ifndef CONFIG_64BIT | ||
304 | int rc, tmp; | ||
305 | |||
306 | asm volatile( | ||
307 | " efpc %1,0\n" | ||
308 | "0: la %0,0\n" | ||
309 | "1:\n" | ||
310 | EX_TABLE(0b,1b) | ||
311 | : "=d" (rc), "=d" (tmp): "0" (-EOPNOTSUPP) : "cc"); | ||
312 | if (!rc) | ||
313 | machine_flags |= MACHINE_FLAG_IEEE; | ||
314 | #endif | ||
315 | } | ||
316 | |||
317 | static __init void detect_csp(void) | ||
318 | { | ||
319 | #ifndef CONFIG_64BIT | ||
320 | int rc; | ||
321 | |||
322 | asm volatile( | ||
323 | " la 0,0\n" | ||
324 | " la 1,0\n" | ||
325 | " la 2,4\n" | ||
326 | " csp 0,2\n" | ||
327 | "0: la %0,0\n" | ||
328 | "1:\n" | ||
329 | EX_TABLE(0b,1b) | ||
330 | : "=d" (rc) : "0" (-EOPNOTSUPP) : "cc", "0", "1", "2"); | ||
331 | if (!rc) | ||
332 | machine_flags |= MACHINE_FLAG_CSP; | ||
333 | #endif | ||
334 | } | ||
335 | |||
336 | static __init void detect_diag9c(void) | ||
337 | { | ||
338 | unsigned int cpu_address; | ||
339 | int rc; | ||
340 | |||
341 | cpu_address = stap(); | ||
342 | asm volatile( | ||
343 | " diag %2,0,0x9c\n" | ||
344 | "0: la %0,0\n" | ||
345 | "1:\n" | ||
346 | EX_TABLE(0b,1b) | ||
347 | : "=d" (rc) : "0" (-EOPNOTSUPP), "d" (cpu_address) : "cc"); | ||
348 | if (!rc) | ||
349 | machine_flags |= MACHINE_FLAG_DIAG9C; | ||
350 | } | ||
351 | |||
352 | static __init void detect_diag44(void) | ||
353 | { | ||
354 | #ifdef CONFIG_64BIT | ||
355 | int rc; | ||
356 | |||
357 | asm volatile( | ||
358 | " diag 0,0,0x44\n" | ||
359 | "0: la %0,0\n" | ||
360 | "1:\n" | ||
361 | EX_TABLE(0b,1b) | ||
362 | : "=d" (rc) : "0" (-EOPNOTSUPP) : "cc"); | ||
363 | if (!rc) | ||
364 | machine_flags |= MACHINE_FLAG_DIAG44; | ||
365 | #endif | ||
366 | } | ||
367 | |||
368 | static __init void detect_machine_facilities(void) | ||
369 | { | ||
370 | #ifdef CONFIG_64BIT | ||
371 | unsigned int facilities; | ||
372 | |||
373 | facilities = stfl(); | ||
374 | if (facilities & (1 << 28)) | ||
375 | machine_flags |= MACHINE_FLAG_IDTE; | ||
376 | if (facilities & (1 << 23)) | ||
377 | machine_flags |= MACHINE_FLAG_PFMF; | ||
378 | if (facilities & (1 << 4)) | ||
379 | machine_flags |= MACHINE_FLAG_MVCOS; | ||
380 | #endif | ||
381 | } | ||
382 | |||
271 | /* | 383 | /* |
272 | * Save ipl parameters, clear bss memory, initialize storage keys | 384 | * Save ipl parameters, clear bss memory, initialize storage keys |
273 | * and create a kernel NSS at startup if the SAVESYS= parm is defined | 385 | * and create a kernel NSS at startup if the SAVESYS= parm is defined |
@@ -285,6 +397,13 @@ void __init startup_init(void) | |||
285 | create_kernel_nss(); | 397 | create_kernel_nss(); |
286 | sort_main_extable(); | 398 | sort_main_extable(); |
287 | setup_lowcore_early(); | 399 | setup_lowcore_early(); |
400 | detect_mvpg(); | ||
401 | detect_ieee(); | ||
402 | detect_csp(); | ||
403 | detect_diag9c(); | ||
404 | detect_diag44(); | ||
405 | detect_machine_facilities(); | ||
406 | setup_hpage(); | ||
288 | sclp_read_info_early(); | 407 | sclp_read_info_early(); |
289 | sclp_facilities_detect(); | 408 | sclp_facilities_detect(); |
290 | memsize = sclp_memory_detect(); | 409 | memsize = sclp_memory_detect(); |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 6766e37fe8ea..bdbb3bcd78a5 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -49,9 +49,9 @@ SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC | |||
49 | SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP | 49 | SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP |
50 | SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE | 50 | SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE |
51 | 51 | ||
52 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | 52 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ |
53 | _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) | 53 | _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) |
54 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | 54 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ |
55 | _TIF_MCCK_PENDING) | 55 | _TIF_MCCK_PENDING) |
56 | 56 | ||
57 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 57 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
@@ -316,7 +316,7 @@ sysc_work: | |||
316 | bo BASED(sysc_mcck_pending) | 316 | bo BASED(sysc_mcck_pending) |
317 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED | 317 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED |
318 | bo BASED(sysc_reschedule) | 318 | bo BASED(sysc_reschedule) |
319 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 319 | tm __TI_flags+3(%r9),_TIF_SIGPENDING |
320 | bnz BASED(sysc_sigpending) | 320 | bnz BASED(sysc_sigpending) |
321 | tm __TI_flags+3(%r9),_TIF_RESTART_SVC | 321 | tm __TI_flags+3(%r9),_TIF_RESTART_SVC |
322 | bo BASED(sysc_restart) | 322 | bo BASED(sysc_restart) |
@@ -342,7 +342,7 @@ sysc_mcck_pending: | |||
342 | br %r1 # TIF bit will be cleared by handler | 342 | br %r1 # TIF bit will be cleared by handler |
343 | 343 | ||
344 | # | 344 | # |
345 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal | 345 | # _TIF_SIGPENDING is set, call do_signal |
346 | # | 346 | # |
347 | sysc_sigpending: | 347 | sysc_sigpending: |
348 | ni __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP | 348 | ni __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP |
@@ -657,7 +657,7 @@ io_work: | |||
657 | lr %r15,%r1 | 657 | lr %r15,%r1 |
658 | # | 658 | # |
659 | # One of the work bits is on. Find out which one. | 659 | # One of the work bits is on. Find out which one. |
660 | # Checked are: _TIF_SIGPENDING, _TIF_RESTORE_SIGMASK, _TIF_NEED_RESCHED | 660 | # Checked are: _TIF_SIGPENDING, _TIF_NEED_RESCHED |
661 | # and _TIF_MCCK_PENDING | 661 | # and _TIF_MCCK_PENDING |
662 | # | 662 | # |
663 | io_work_loop: | 663 | io_work_loop: |
@@ -665,7 +665,7 @@ io_work_loop: | |||
665 | bo BASED(io_mcck_pending) | 665 | bo BASED(io_mcck_pending) |
666 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED | 666 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED |
667 | bo BASED(io_reschedule) | 667 | bo BASED(io_reschedule) |
668 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 668 | tm __TI_flags+3(%r9),_TIF_SIGPENDING |
669 | bnz BASED(io_sigpending) | 669 | bnz BASED(io_sigpending) |
670 | b BASED(io_restore) | 670 | b BASED(io_restore) |
671 | io_work_done: | 671 | io_work_done: |
@@ -693,7 +693,7 @@ io_reschedule: | |||
693 | b BASED(io_work_loop) | 693 | b BASED(io_work_loop) |
694 | 694 | ||
695 | # | 695 | # |
696 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal | 696 | # _TIF_SIGPENDING is set, call do_signal |
697 | # | 697 | # |
698 | io_sigpending: | 698 | io_sigpending: |
699 | TRACE_IRQS_ON | 699 | TRACE_IRQS_ON |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index cd959c0b2e16..5a4a7bcd2bba 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -52,9 +52,9 @@ SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE | |||
52 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 52 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
53 | STACK_SIZE = 1 << STACK_SHIFT | 53 | STACK_SIZE = 1 << STACK_SHIFT |
54 | 54 | ||
55 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | 55 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ |
56 | _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) | 56 | _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) |
57 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | 57 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ |
58 | _TIF_MCCK_PENDING) | 58 | _TIF_MCCK_PENDING) |
59 | 59 | ||
60 | #define BASED(name) name-system_call(%r13) | 60 | #define BASED(name) name-system_call(%r13) |
@@ -308,7 +308,7 @@ sysc_work: | |||
308 | jo sysc_mcck_pending | 308 | jo sysc_mcck_pending |
309 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 309 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
310 | jo sysc_reschedule | 310 | jo sysc_reschedule |
311 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 311 | tm __TI_flags+7(%r9),_TIF_SIGPENDING |
312 | jnz sysc_sigpending | 312 | jnz sysc_sigpending |
313 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC | 313 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC |
314 | jo sysc_restart | 314 | jo sysc_restart |
@@ -332,7 +332,7 @@ sysc_mcck_pending: | |||
332 | jg s390_handle_mcck # TIF bit will be cleared by handler | 332 | jg s390_handle_mcck # TIF bit will be cleared by handler |
333 | 333 | ||
334 | # | 334 | # |
335 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal | 335 | # _TIF_SIGPENDING is set, call do_signal |
336 | # | 336 | # |
337 | sysc_sigpending: | 337 | sysc_sigpending: |
338 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP | 338 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP |
@@ -648,7 +648,7 @@ io_work_loop: | |||
648 | jo io_mcck_pending | 648 | jo io_mcck_pending |
649 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 649 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
650 | jo io_reschedule | 650 | jo io_reschedule |
651 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 651 | tm __TI_flags+7(%r9),_TIF_SIGPENDING |
652 | jnz io_sigpending | 652 | jnz io_sigpending |
653 | j io_restore | 653 | j io_restore |
654 | io_work_done: | 654 | io_work_done: |
@@ -674,7 +674,7 @@ io_reschedule: | |||
674 | j io_work_loop | 674 | j io_work_loop |
675 | 675 | ||
676 | # | 676 | # |
677 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal | 677 | # _TIF_SIGPENDING or is set, call do_signal |
678 | # | 678 | # |
679 | io_sigpending: | 679 | io_sigpending: |
680 | TRACE_IRQS_ON | 680 | TRACE_IRQS_ON |
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index dc364c1419af..a816e2de32b9 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S | |||
@@ -57,61 +57,6 @@ startup_continue: | |||
57 | # | 57 | # |
58 | l %r14,.Lstartup_init-.LPG1(%r13) | 58 | l %r14,.Lstartup_init-.LPG1(%r13) |
59 | basr %r14,%r14 | 59 | basr %r14,%r14 |
60 | |||
61 | l %r12,.Lmflags-.LPG1(%r13) # get address of machine_flags | ||
62 | # | ||
63 | # find out if we have an IEEE fpu | ||
64 | # | ||
65 | mvc __LC_PGM_NEW_PSW(8),.Lpcfpu-.LPG1(%r13) | ||
66 | efpc %r0,0 # test IEEE extract fpc instruction | ||
67 | oi 3(%r12),2 # set IEEE fpu flag | ||
68 | .Lchkfpu: | ||
69 | |||
70 | # | ||
71 | # find out if we have the CSP instruction | ||
72 | # | ||
73 | mvc __LC_PGM_NEW_PSW(8),.Lpccsp-.LPG1(%r13) | ||
74 | la %r0,0 | ||
75 | lr %r1,%r0 | ||
76 | la %r2,4 | ||
77 | csp %r0,%r2 # Test CSP instruction | ||
78 | oi 3(%r12),8 # set CSP flag | ||
79 | .Lchkcsp: | ||
80 | |||
81 | # | ||
82 | # find out if we have the MVPG instruction | ||
83 | # | ||
84 | mvc __LC_PGM_NEW_PSW(8),.Lpcmvpg-.LPG1(%r13) | ||
85 | sr %r0,%r0 | ||
86 | la %r1,0 | ||
87 | la %r2,0 | ||
88 | mvpg %r1,%r2 # Test CSP instruction | ||
89 | oi 3(%r12),16 # set MVPG flag | ||
90 | .Lchkmvpg: | ||
91 | |||
92 | # | ||
93 | # find out if we have the IDTE instruction | ||
94 | # | ||
95 | mvc __LC_PGM_NEW_PSW(8),.Lpcidte-.LPG1(%r13) | ||
96 | .long 0xb2b10000 # store facility list | ||
97 | tm 0xc8,0x08 # check bit for clearing-by-ASCE | ||
98 | bno .Lchkidte-.LPG1(%r13) | ||
99 | lhi %r1,2094 | ||
100 | lhi %r2,0 | ||
101 | .long 0xb98e2001 | ||
102 | oi 3(%r12),0x80 # set IDTE flag | ||
103 | .Lchkidte: | ||
104 | |||
105 | # | ||
106 | # find out if the diag 0x9c is available | ||
107 | # | ||
108 | mvc __LC_PGM_NEW_PSW(8),.Lpcdiag9c-.LPG1(%r13) | ||
109 | stap __LC_CPUID+4 # store cpu address | ||
110 | lh %r1,__LC_CPUID+4 | ||
111 | diag %r1,0,0x9c # test diag 0x9c | ||
112 | oi 2(%r12),1 # set diag9c flag | ||
113 | .Lchkdiag9c: | ||
114 | |||
115 | lpsw .Lentry-.LPG1(13) # jump to _stext in primary-space, | 60 | lpsw .Lentry-.LPG1(13) # jump to _stext in primary-space, |
116 | # virtual and never return ... | 61 | # virtual and never return ... |
117 | .align 8 | 62 | .align 8 |
@@ -132,13 +77,7 @@ startup_continue: | |||
132 | .long 0 # cr13: home space segment table | 77 | .long 0 # cr13: home space segment table |
133 | .long 0xc0000000 # cr14: machine check handling off | 78 | .long 0xc0000000 # cr14: machine check handling off |
134 | .long 0 # cr15: linkage stack operations | 79 | .long 0 # cr15: linkage stack operations |
135 | .Lpcfpu:.long 0x00080000,0x80000000 + .Lchkfpu | ||
136 | .Lpccsp:.long 0x00080000,0x80000000 + .Lchkcsp | ||
137 | .Lpcmvpg:.long 0x00080000,0x80000000 + .Lchkmvpg | ||
138 | .Lpcidte:.long 0x00080000,0x80000000 + .Lchkidte | ||
139 | .Lpcdiag9c:.long 0x00080000,0x80000000 + .Lchkdiag9c | ||
140 | .Lmchunk:.long memory_chunk | 80 | .Lmchunk:.long memory_chunk |
141 | .Lmflags:.long machine_flags | ||
142 | .Lbss_bgn: .long __bss_start | 81 | .Lbss_bgn: .long __bss_start |
143 | .Lbss_end: .long _end | 82 | .Lbss_end: .long _end |
144 | .Lparmaddr: .long PARMAREA | 83 | .Lparmaddr: .long PARMAREA |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 79dccd206a6e..1d06961e87b3 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -125,73 +125,11 @@ startup_continue: | |||
125 | # and create a kernel NSS if the SAVESYS= parm is defined | 125 | # and create a kernel NSS if the SAVESYS= parm is defined |
126 | # | 126 | # |
127 | brasl %r14,startup_init | 127 | brasl %r14,startup_init |
128 | # set program check new psw mask | ||
129 | mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13) | ||
130 | larl %r12,machine_flags | ||
131 | # | ||
132 | # find out if we have the MVPG instruction | ||
133 | # | ||
134 | la %r1,0f-.LPG1(%r13) # set program check address | ||
135 | stg %r1,__LC_PGM_NEW_PSW+8 | ||
136 | sgr %r0,%r0 | ||
137 | lghi %r1,0 | ||
138 | lghi %r2,0 | ||
139 | mvpg %r1,%r2 # test MVPG instruction | ||
140 | oi 7(%r12),16 # set MVPG flag | ||
141 | 0: | ||
142 | |||
143 | # | ||
144 | # find out if the diag 0x44 works in 64 bit mode | ||
145 | # | ||
146 | la %r1,0f-.LPG1(%r13) # set program check address | ||
147 | stg %r1,__LC_PGM_NEW_PSW+8 | ||
148 | diag 0,0,0x44 # test diag 0x44 | ||
149 | oi 7(%r12),32 # set diag44 flag | ||
150 | 0: | ||
151 | |||
152 | # | ||
153 | # find out if we have the IDTE instruction | ||
154 | # | ||
155 | la %r1,0f-.LPG1(%r13) # set program check address | ||
156 | stg %r1,__LC_PGM_NEW_PSW+8 | ||
157 | .long 0xb2b10000 # store facility list | ||
158 | tm 0xc8,0x08 # check bit for clearing-by-ASCE | ||
159 | bno 0f-.LPG1(%r13) | ||
160 | lhi %r1,2048 | ||
161 | lhi %r2,0 | ||
162 | .long 0xb98e2001 | ||
163 | oi 7(%r12),0x80 # set IDTE flag | ||
164 | 0: | ||
165 | |||
166 | # | ||
167 | # find out if the diag 0x9c is available | ||
168 | # | ||
169 | la %r1,0f-.LPG1(%r13) # set program check address | ||
170 | stg %r1,__LC_PGM_NEW_PSW+8 | ||
171 | stap __LC_CPUID+4 # store cpu address | ||
172 | lh %r1,__LC_CPUID+4 | ||
173 | diag %r1,0,0x9c # test diag 0x9c | ||
174 | oi 6(%r12),1 # set diag9c flag | ||
175 | 0: | ||
176 | |||
177 | # | ||
178 | # find out if we have the MVCOS instruction | ||
179 | # | ||
180 | la %r1,0f-.LPG1(%r13) # set program check address | ||
181 | stg %r1,__LC_PGM_NEW_PSW+8 | ||
182 | .short 0xc800 # mvcos 0(%r0),0(%r0),%r0 | ||
183 | .short 0x0000 | ||
184 | .short 0x0000 | ||
185 | 0: tm 0x8f,0x13 # special-operation exception? | ||
186 | bno 1f-.LPG1(%r13) # if yes, MVCOS is present | ||
187 | oi 6(%r12),2 # set MVCOS flag | ||
188 | 1: | ||
189 | |||
190 | lpswe .Lentry-.LPG1(13) # jump to _stext in primary-space, | 128 | lpswe .Lentry-.LPG1(13) # jump to _stext in primary-space, |
191 | # virtual and never return ... | 129 | # virtual and never return ... |
192 | .align 16 | 130 | .align 16 |
193 | .Lentry:.quad 0x0000000180000000,_stext | 131 | .Lentry:.quad 0x0000000180000000,_stext |
194 | .Lctl: .quad 0x04b50002 # cr0: various things | 132 | .Lctl: .quad 0x04350002 # cr0: various things |
195 | .quad 0 # cr1: primary space segment table | 133 | .quad 0 # cr1: primary space segment table |
196 | .quad .Lduct # cr2: dispatchable unit control table | 134 | .quad .Lduct # cr2: dispatchable unit control table |
197 | .quad 0 # cr3: instruction authorization | 135 | .quad 0 # cr3: instruction authorization |
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index c36d8123ca14..c59a86dca584 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -60,8 +60,6 @@ init_IRQ(void) | |||
60 | /* | 60 | /* |
61 | * Switch to the asynchronous interrupt stack for softirq execution. | 61 | * Switch to the asynchronous interrupt stack for softirq execution. |
62 | */ | 62 | */ |
63 | extern void __do_softirq(void); | ||
64 | |||
65 | asmlinkage void do_softirq(void) | 63 | asmlinkage void do_softirq(void) |
66 | { | 64 | { |
67 | unsigned long flags, old, new; | 65 | unsigned long flags, old, new; |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index c1aff194141d..7920861109d2 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -180,24 +180,6 @@ void cpu_idle(void) | |||
180 | } | 180 | } |
181 | } | 181 | } |
182 | 182 | ||
183 | void show_regs(struct pt_regs *regs) | ||
184 | { | ||
185 | print_modules(); | ||
186 | printk("CPU: %d %s %s %.*s\n", | ||
187 | task_thread_info(current)->cpu, print_tainted(), | ||
188 | init_utsname()->release, | ||
189 | (int)strcspn(init_utsname()->version, " "), | ||
190 | init_utsname()->version); | ||
191 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | ||
192 | current->comm, current->pid, current, | ||
193 | (void *) current->thread.ksp); | ||
194 | show_registers(regs); | ||
195 | /* Show stack backtrace if pt_regs is from kernel mode */ | ||
196 | if (!(regs->psw.mask & PSW_MASK_PSTATE)) | ||
197 | show_trace(NULL, (unsigned long *) regs->gprs[15]); | ||
198 | show_last_breaking_event(regs); | ||
199 | } | ||
200 | |||
201 | extern void kernel_thread_starter(void); | 183 | extern void kernel_thread_starter(void); |
202 | 184 | ||
203 | asm( | 185 | asm( |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 58a064296987..7f4270163744 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -607,38 +607,8 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data) | |||
607 | } | 607 | } |
608 | #endif | 608 | #endif |
609 | 609 | ||
610 | #define PT32_IEEE_IP 0x13c | 610 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
611 | |||
612 | static int | ||
613 | do_ptrace(struct task_struct *child, long request, long addr, long data) | ||
614 | { | 611 | { |
615 | int ret; | ||
616 | |||
617 | if (request == PTRACE_ATTACH) | ||
618 | return ptrace_attach(child); | ||
619 | |||
620 | /* | ||
621 | * Special cases to get/store the ieee instructions pointer. | ||
622 | */ | ||
623 | if (child == current) { | ||
624 | if (request == PTRACE_PEEKUSR && addr == PT_IEEE_IP) | ||
625 | return peek_user(child, addr, data); | ||
626 | if (request == PTRACE_POKEUSR && addr == PT_IEEE_IP) | ||
627 | return poke_user(child, addr, data); | ||
628 | #ifdef CONFIG_COMPAT | ||
629 | if (request == PTRACE_PEEKUSR && | ||
630 | addr == PT32_IEEE_IP && test_thread_flag(TIF_31BIT)) | ||
631 | return peek_user_emu31(child, addr, data); | ||
632 | if (request == PTRACE_POKEUSR && | ||
633 | addr == PT32_IEEE_IP && test_thread_flag(TIF_31BIT)) | ||
634 | return poke_user_emu31(child, addr, data); | ||
635 | #endif | ||
636 | } | ||
637 | |||
638 | ret = ptrace_check_attach(child, request == PTRACE_KILL); | ||
639 | if (ret < 0) | ||
640 | return ret; | ||
641 | |||
642 | switch (request) { | 612 | switch (request) { |
643 | case PTRACE_SYSCALL: | 613 | case PTRACE_SYSCALL: |
644 | /* continue and stop at next (return from) syscall */ | 614 | /* continue and stop at next (return from) syscall */ |
@@ -693,31 +663,6 @@ do_ptrace(struct task_struct *child, long request, long addr, long data) | |||
693 | return -EIO; | 663 | return -EIO; |
694 | } | 664 | } |
695 | 665 | ||
696 | asmlinkage long | ||
697 | sys_ptrace(long request, long pid, long addr, long data) | ||
698 | { | ||
699 | struct task_struct *child; | ||
700 | int ret; | ||
701 | |||
702 | lock_kernel(); | ||
703 | if (request == PTRACE_TRACEME) { | ||
704 | ret = ptrace_traceme(); | ||
705 | goto out; | ||
706 | } | ||
707 | |||
708 | child = ptrace_get_task_struct(pid); | ||
709 | if (IS_ERR(child)) { | ||
710 | ret = PTR_ERR(child); | ||
711 | goto out; | ||
712 | } | ||
713 | |||
714 | ret = do_ptrace(child, request, addr, data); | ||
715 | put_task_struct(child); | ||
716 | out: | ||
717 | unlock_kernel(); | ||
718 | return ret; | ||
719 | } | ||
720 | |||
721 | asmlinkage void | 666 | asmlinkage void |
722 | syscall_trace(struct pt_regs *regs, int entryexit) | 667 | syscall_trace(struct pt_regs *regs, int entryexit) |
723 | { | 668 | { |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index a9d18aafa5f4..2bc70b6e876a 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -73,7 +73,7 @@ EXPORT_SYMBOL(uaccess); | |||
73 | unsigned int console_mode = 0; | 73 | unsigned int console_mode = 0; |
74 | unsigned int console_devno = -1; | 74 | unsigned int console_devno = -1; |
75 | unsigned int console_irq = -1; | 75 | unsigned int console_irq = -1; |
76 | unsigned long machine_flags = 0; | 76 | unsigned long machine_flags; |
77 | unsigned long elf_hwcap = 0; | 77 | unsigned long elf_hwcap = 0; |
78 | char elf_platform[ELF_PLATFORM_SIZE]; | 78 | char elf_platform[ELF_PLATFORM_SIZE]; |
79 | 79 | ||
@@ -683,15 +683,6 @@ setup_memory(void) | |||
683 | #endif | 683 | #endif |
684 | } | 684 | } |
685 | 685 | ||
686 | static __init unsigned int stfl(void) | ||
687 | { | ||
688 | asm volatile( | ||
689 | " .insn s,0xb2b10000,0(0)\n" /* stfl */ | ||
690 | "0:\n" | ||
691 | EX_TABLE(0b,0b)); | ||
692 | return S390_lowcore.stfl_fac_list; | ||
693 | } | ||
694 | |||
695 | static int __init __stfle(unsigned long long *list, int doublewords) | 686 | static int __init __stfle(unsigned long long *list, int doublewords) |
696 | { | 687 | { |
697 | typedef struct { unsigned long long _[doublewords]; } addrtype; | 688 | typedef struct { unsigned long long _[doublewords]; } addrtype; |
@@ -758,6 +749,9 @@ static void __init setup_hwcaps(void) | |||
758 | elf_hwcap |= 1UL << 6; | 749 | elf_hwcap |= 1UL << 6; |
759 | } | 750 | } |
760 | 751 | ||
752 | if (MACHINE_HAS_HPAGE) | ||
753 | elf_hwcap |= 1UL << 7; | ||
754 | |||
761 | switch (cpuinfo->cpu_id.machine) { | 755 | switch (cpuinfo->cpu_id.machine) { |
762 | case 0x9672: | 756 | case 0x9672: |
763 | #if !defined(CONFIG_64BIT) | 757 | #if !defined(CONFIG_64BIT) |
@@ -881,8 +875,9 @@ void __cpuinit print_cpu_info(struct cpuinfo_S390 *cpuinfo) | |||
881 | 875 | ||
882 | static int show_cpuinfo(struct seq_file *m, void *v) | 876 | static int show_cpuinfo(struct seq_file *m, void *v) |
883 | { | 877 | { |
884 | static const char *hwcap_str[7] = { | 878 | static const char *hwcap_str[8] = { |
885 | "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp" | 879 | "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", |
880 | "edat" | ||
886 | }; | 881 | }; |
887 | struct cpuinfo_S390 *cpuinfo; | 882 | struct cpuinfo_S390 *cpuinfo; |
888 | unsigned long n = (unsigned long) v - 1; | 883 | unsigned long n = (unsigned long) v - 1; |
@@ -897,7 +892,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
897 | num_online_cpus(), loops_per_jiffy/(500000/HZ), | 892 | num_online_cpus(), loops_per_jiffy/(500000/HZ), |
898 | (loops_per_jiffy/(5000/HZ))%100); | 893 | (loops_per_jiffy/(5000/HZ))%100); |
899 | seq_puts(m, "features\t: "); | 894 | seq_puts(m, "features\t: "); |
900 | for (i = 0; i < 7; i++) | 895 | for (i = 0; i < 8; i++) |
901 | if (hwcap_str[i] && (elf_hwcap & (1UL << i))) | 896 | if (hwcap_str[i] && (elf_hwcap & (1UL << i))) |
902 | seq_printf(m, "%s ", hwcap_str[i]); | 897 | seq_printf(m, "%s ", hwcap_str[i]); |
903 | seq_puts(m, "\n"); | 898 | seq_puts(m, "\n"); |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 0dfa988c1b26..0aeb290060d9 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -505,7 +505,7 @@ out: | |||
505 | return rc; | 505 | return rc; |
506 | } | 506 | } |
507 | 507 | ||
508 | static int smp_rescan_cpus(void) | 508 | static int __smp_rescan_cpus(void) |
509 | { | 509 | { |
510 | cpumask_t avail; | 510 | cpumask_t avail; |
511 | 511 | ||
@@ -570,7 +570,7 @@ out: | |||
570 | kfree(info); | 570 | kfree(info); |
571 | printk(KERN_INFO "CPUs: %d configured, %d standby\n", c_cpus, s_cpus); | 571 | printk(KERN_INFO "CPUs: %d configured, %d standby\n", c_cpus, s_cpus); |
572 | get_online_cpus(); | 572 | get_online_cpus(); |
573 | smp_rescan_cpus(); | 573 | __smp_rescan_cpus(); |
574 | put_online_cpus(); | 574 | put_online_cpus(); |
575 | } | 575 | } |
576 | 576 | ||
@@ -890,8 +890,8 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf, | |||
890 | if (val != 0 && val != 1) | 890 | if (val != 0 && val != 1) |
891 | return -EINVAL; | 891 | return -EINVAL; |
892 | 892 | ||
893 | mutex_lock(&smp_cpu_state_mutex); | ||
894 | get_online_cpus(); | 893 | get_online_cpus(); |
894 | mutex_lock(&smp_cpu_state_mutex); | ||
895 | rc = -EBUSY; | 895 | rc = -EBUSY; |
896 | if (cpu_online(cpu)) | 896 | if (cpu_online(cpu)) |
897 | goto out; | 897 | goto out; |
@@ -919,8 +919,8 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf, | |||
919 | break; | 919 | break; |
920 | } | 920 | } |
921 | out: | 921 | out: |
922 | put_online_cpus(); | ||
923 | mutex_unlock(&smp_cpu_state_mutex); | 922 | mutex_unlock(&smp_cpu_state_mutex); |
923 | put_online_cpus(); | ||
924 | return rc ? rc : count; | 924 | return rc ? rc : count; |
925 | } | 925 | } |
926 | static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); | 926 | static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); |
@@ -1088,17 +1088,17 @@ out: | |||
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | #ifdef CONFIG_HOTPLUG_CPU | 1090 | #ifdef CONFIG_HOTPLUG_CPU |
1091 | static ssize_t __ref rescan_store(struct sys_device *dev, | 1091 | |
1092 | const char *buf, size_t count) | 1092 | int smp_rescan_cpus(void) |
1093 | { | 1093 | { |
1094 | cpumask_t newcpus; | 1094 | cpumask_t newcpus; |
1095 | int cpu; | 1095 | int cpu; |
1096 | int rc; | 1096 | int rc; |
1097 | 1097 | ||
1098 | mutex_lock(&smp_cpu_state_mutex); | ||
1099 | get_online_cpus(); | 1098 | get_online_cpus(); |
1099 | mutex_lock(&smp_cpu_state_mutex); | ||
1100 | newcpus = cpu_present_map; | 1100 | newcpus = cpu_present_map; |
1101 | rc = smp_rescan_cpus(); | 1101 | rc = __smp_rescan_cpus(); |
1102 | if (rc) | 1102 | if (rc) |
1103 | goto out; | 1103 | goto out; |
1104 | cpus_andnot(newcpus, cpu_present_map, newcpus); | 1104 | cpus_andnot(newcpus, cpu_present_map, newcpus); |
@@ -1109,10 +1109,19 @@ static ssize_t __ref rescan_store(struct sys_device *dev, | |||
1109 | } | 1109 | } |
1110 | rc = 0; | 1110 | rc = 0; |
1111 | out: | 1111 | out: |
1112 | put_online_cpus(); | ||
1113 | mutex_unlock(&smp_cpu_state_mutex); | 1112 | mutex_unlock(&smp_cpu_state_mutex); |
1113 | put_online_cpus(); | ||
1114 | if (!cpus_empty(newcpus)) | 1114 | if (!cpus_empty(newcpus)) |
1115 | topology_schedule_update(); | 1115 | topology_schedule_update(); |
1116 | return rc; | ||
1117 | } | ||
1118 | |||
1119 | static ssize_t __ref rescan_store(struct sys_device *dev, const char *buf, | ||
1120 | size_t count) | ||
1121 | { | ||
1122 | int rc; | ||
1123 | |||
1124 | rc = smp_rescan_cpus(); | ||
1116 | return rc ? rc : count; | 1125 | return rc ? rc : count; |
1117 | } | 1126 | } |
1118 | static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); | 1127 | static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); |
@@ -1139,16 +1148,16 @@ static ssize_t dispatching_store(struct sys_device *dev, const char *buf, | |||
1139 | if (val != 0 && val != 1) | 1148 | if (val != 0 && val != 1) |
1140 | return -EINVAL; | 1149 | return -EINVAL; |
1141 | rc = 0; | 1150 | rc = 0; |
1142 | mutex_lock(&smp_cpu_state_mutex); | ||
1143 | get_online_cpus(); | 1151 | get_online_cpus(); |
1152 | mutex_lock(&smp_cpu_state_mutex); | ||
1144 | if (cpu_management == val) | 1153 | if (cpu_management == val) |
1145 | goto out; | 1154 | goto out; |
1146 | rc = topology_set_cpu_management(val); | 1155 | rc = topology_set_cpu_management(val); |
1147 | if (!rc) | 1156 | if (!rc) |
1148 | cpu_management = val; | 1157 | cpu_management = val; |
1149 | out: | 1158 | out: |
1150 | put_online_cpus(); | ||
1151 | mutex_unlock(&smp_cpu_state_mutex); | 1159 | mutex_unlock(&smp_cpu_state_mutex); |
1160 | put_online_cpus(); | ||
1152 | return rc ? rc : count; | 1161 | return rc ? rc : count; |
1153 | } | 1162 | } |
1154 | static SYSDEV_ATTR(dispatching, 0644, dispatching_show, dispatching_store); | 1163 | static SYSDEV_ATTR(dispatching, 0644, dispatching_show, dispatching_store); |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 12b39b3d9c38..661a07217057 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/bootmem.h> | 10 | #include <linux/bootmem.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/kthread.h> | ||
12 | #include <linux/workqueue.h> | 13 | #include <linux/workqueue.h> |
13 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
14 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
@@ -66,6 +67,8 @@ static struct timer_list topology_timer; | |||
66 | static void set_topology_timer(void); | 67 | static void set_topology_timer(void); |
67 | static DECLARE_WORK(topology_work, topology_work_fn); | 68 | static DECLARE_WORK(topology_work, topology_work_fn); |
68 | 69 | ||
70 | cpumask_t cpu_core_map[NR_CPUS]; | ||
71 | |||
69 | cpumask_t cpu_coregroup_map(unsigned int cpu) | 72 | cpumask_t cpu_coregroup_map(unsigned int cpu) |
70 | { | 73 | { |
71 | struct core_info *core = &core_info; | 74 | struct core_info *core = &core_info; |
@@ -199,6 +202,14 @@ int topology_set_cpu_management(int fc) | |||
199 | return rc; | 202 | return rc; |
200 | } | 203 | } |
201 | 204 | ||
205 | static void update_cpu_core_map(void) | ||
206 | { | ||
207 | int cpu; | ||
208 | |||
209 | for_each_present_cpu(cpu) | ||
210 | cpu_core_map[cpu] = cpu_coregroup_map(cpu); | ||
211 | } | ||
212 | |||
202 | void arch_update_cpu_topology(void) | 213 | void arch_update_cpu_topology(void) |
203 | { | 214 | { |
204 | struct tl_info *info = tl_info; | 215 | struct tl_info *info = tl_info; |
@@ -206,20 +217,33 @@ void arch_update_cpu_topology(void) | |||
206 | int cpu; | 217 | int cpu; |
207 | 218 | ||
208 | if (!machine_has_topology) { | 219 | if (!machine_has_topology) { |
220 | update_cpu_core_map(); | ||
209 | topology_update_polarization_simple(); | 221 | topology_update_polarization_simple(); |
210 | return; | 222 | return; |
211 | } | 223 | } |
212 | stsi(info, 15, 1, 2); | 224 | stsi(info, 15, 1, 2); |
213 | tl_to_cores(info); | 225 | tl_to_cores(info); |
226 | update_cpu_core_map(); | ||
214 | for_each_online_cpu(cpu) { | 227 | for_each_online_cpu(cpu) { |
215 | sysdev = get_cpu_sysdev(cpu); | 228 | sysdev = get_cpu_sysdev(cpu); |
216 | kobject_uevent(&sysdev->kobj, KOBJ_CHANGE); | 229 | kobject_uevent(&sysdev->kobj, KOBJ_CHANGE); |
217 | } | 230 | } |
218 | } | 231 | } |
219 | 232 | ||
220 | static void topology_work_fn(struct work_struct *work) | 233 | static int topology_kthread(void *data) |
221 | { | 234 | { |
222 | arch_reinit_sched_domains(); | 235 | arch_reinit_sched_domains(); |
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static void topology_work_fn(struct work_struct *work) | ||
240 | { | ||
241 | /* We can't call arch_reinit_sched_domains() from a multi-threaded | ||
242 | * workqueue context since it may deadlock in case of cpu hotplug. | ||
243 | * So we have to create a kernel thread in order to call | ||
244 | * arch_reinit_sched_domains(). | ||
245 | */ | ||
246 | kthread_run(topology_kthread, NULL, "topology_update"); | ||
223 | } | 247 | } |
224 | 248 | ||
225 | void topology_schedule_update(void) | 249 | void topology_schedule_update(void) |
@@ -251,20 +275,23 @@ static int __init init_topology_update(void) | |||
251 | { | 275 | { |
252 | int rc; | 276 | int rc; |
253 | 277 | ||
278 | rc = 0; | ||
254 | if (!machine_has_topology) { | 279 | if (!machine_has_topology) { |
255 | topology_update_polarization_simple(); | 280 | topology_update_polarization_simple(); |
256 | return 0; | 281 | goto out; |
257 | } | 282 | } |
258 | init_timer_deferrable(&topology_timer); | 283 | init_timer_deferrable(&topology_timer); |
259 | if (machine_has_topology_irq) { | 284 | if (machine_has_topology_irq) { |
260 | rc = register_external_interrupt(0x2005, topology_interrupt); | 285 | rc = register_external_interrupt(0x2005, topology_interrupt); |
261 | if (rc) | 286 | if (rc) |
262 | return rc; | 287 | goto out; |
263 | ctl_set_bit(0, 8); | 288 | ctl_set_bit(0, 8); |
264 | } | 289 | } |
265 | else | 290 | else |
266 | set_topology_timer(); | 291 | set_topology_timer(); |
267 | return 0; | 292 | out: |
293 | update_cpu_core_map(); | ||
294 | return rc; | ||
268 | } | 295 | } |
269 | __initcall(init_topology_update); | 296 | __initcall(init_topology_update); |
270 | 297 | ||
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 57b607b61100..4584d81984c0 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -113,7 +113,7 @@ __show_trace(unsigned long sp, unsigned long low, unsigned long high) | |||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | void show_trace(struct task_struct *task, unsigned long *stack) | 116 | static void show_trace(struct task_struct *task, unsigned long *stack) |
117 | { | 117 | { |
118 | register unsigned long __r15 asm ("15"); | 118 | register unsigned long __r15 asm ("15"); |
119 | unsigned long sp; | 119 | unsigned long sp; |
@@ -161,14 +161,14 @@ void show_stack(struct task_struct *task, unsigned long *sp) | |||
161 | show_trace(task, sp); | 161 | show_trace(task, sp); |
162 | } | 162 | } |
163 | 163 | ||
164 | #ifdef CONFIG_64BIT | 164 | static void show_last_breaking_event(struct pt_regs *regs) |
165 | void show_last_breaking_event(struct pt_regs *regs) | ||
166 | { | 165 | { |
166 | #ifdef CONFIG_64BIT | ||
167 | printk("Last Breaking-Event-Address:\n"); | 167 | printk("Last Breaking-Event-Address:\n"); |
168 | printk(" [<%016lx>] ", regs->args[0] & PSW_ADDR_INSN); | 168 | printk(" [<%016lx>] ", regs->args[0] & PSW_ADDR_INSN); |
169 | print_symbol("%s\n", regs->args[0] & PSW_ADDR_INSN); | 169 | print_symbol("%s\n", regs->args[0] & PSW_ADDR_INSN); |
170 | } | ||
171 | #endif | 170 | #endif |
171 | } | ||
172 | 172 | ||
173 | /* | 173 | /* |
174 | * The architecture-independent dump_stack generator | 174 | * The architecture-independent dump_stack generator |
@@ -223,6 +223,24 @@ void show_registers(struct pt_regs *regs) | |||
223 | show_code(regs); | 223 | show_code(regs); |
224 | } | 224 | } |
225 | 225 | ||
226 | void show_regs(struct pt_regs *regs) | ||
227 | { | ||
228 | print_modules(); | ||
229 | printk("CPU: %d %s %s %.*s\n", | ||
230 | task_thread_info(current)->cpu, print_tainted(), | ||
231 | init_utsname()->release, | ||
232 | (int)strcspn(init_utsname()->version, " "), | ||
233 | init_utsname()->version); | ||
234 | printk("Process %s (pid: %d, task: %p, ksp: %p)\n", | ||
235 | current->comm, current->pid, current, | ||
236 | (void *) current->thread.ksp); | ||
237 | show_registers(regs); | ||
238 | /* Show stack backtrace if pt_regs is from kernel mode */ | ||
239 | if (!(regs->psw.mask & PSW_MASK_PSTATE)) | ||
240 | show_trace(NULL, (unsigned long *) regs->gprs[15]); | ||
241 | show_last_breaking_event(regs); | ||
242 | } | ||
243 | |||
226 | /* This is called from fs/proc/array.c */ | 244 | /* This is called from fs/proc/array.c */ |
227 | void task_show_regs(struct seq_file *m, struct task_struct *task) | 245 | void task_show_regs(struct seq_file *m, struct task_struct *task) |
228 | { | 246 | { |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 1465946325c5..c02286c6a931 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -151,18 +151,9 @@ static int handle_chsc(struct kvm_vcpu *vcpu) | |||
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | static unsigned int kvm_stfl(void) | ||
155 | { | ||
156 | asm volatile( | ||
157 | " .insn s,0xb2b10000,0(0)\n" /* stfl */ | ||
158 | "0:\n" | ||
159 | EX_TABLE(0b, 0b)); | ||
160 | return S390_lowcore.stfl_fac_list; | ||
161 | } | ||
162 | |||
163 | static int handle_stfl(struct kvm_vcpu *vcpu) | 154 | static int handle_stfl(struct kvm_vcpu *vcpu) |
164 | { | 155 | { |
165 | unsigned int facility_list = kvm_stfl(); | 156 | unsigned int facility_list = stfl(); |
166 | int rc; | 157 | int rc; |
167 | 158 | ||
168 | vcpu->stat.instruction_stfl++; | 159 | vcpu->stat.instruction_stfl++; |
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index 52084436ab69..ab6735df2d21 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile | |||
@@ -2,8 +2,6 @@ | |||
2 | # Makefile for s390-specific library files.. | 2 | # Makefile for s390-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | EXTRA_AFLAGS := -traditional | ||
6 | |||
7 | lib-y += delay.o string.o uaccess_std.o uaccess_pt.o | 5 | lib-y += delay.o string.o uaccess_std.o uaccess_pt.o |
8 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o | 6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o |
9 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o | 7 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o |
diff --git a/arch/s390/lib/uaccess_mvcos.c b/arch/s390/lib/uaccess_mvcos.c index 6d8772339d76..3f15aaf54855 100644 --- a/arch/s390/lib/uaccess_mvcos.c +++ b/arch/s390/lib/uaccess_mvcos.c | |||
@@ -162,6 +162,7 @@ static size_t clear_user_mvcos(size_t size, void __user *to) | |||
162 | return size; | 162 | return size; |
163 | } | 163 | } |
164 | 164 | ||
165 | #ifdef CONFIG_S390_SWITCH_AMODE | ||
165 | static size_t strnlen_user_mvcos(size_t count, const char __user *src) | 166 | static size_t strnlen_user_mvcos(size_t count, const char __user *src) |
166 | { | 167 | { |
167 | char buf[256]; | 168 | char buf[256]; |
@@ -199,6 +200,7 @@ static size_t strncpy_from_user_mvcos(size_t count, const char __user *src, | |||
199 | } while ((len_str == len) && (done < count)); | 200 | } while ((len_str == len) && (done < count)); |
200 | return done; | 201 | return done; |
201 | } | 202 | } |
203 | #endif /* CONFIG_S390_SWITCH_AMODE */ | ||
202 | 204 | ||
203 | struct uaccess_ops uaccess_mvcos = { | 205 | struct uaccess_ops uaccess_mvcos = { |
204 | .copy_from_user = copy_from_user_mvcos_check, | 206 | .copy_from_user = copy_from_user_mvcos_check, |
diff --git a/arch/s390/math-emu/Makefile b/arch/s390/math-emu/Makefile index 73b3e72efc46..c84890341052 100644 --- a/arch/s390/math-emu/Makefile +++ b/arch/s390/math-emu/Makefile | |||
@@ -5,4 +5,3 @@ | |||
5 | obj-$(CONFIG_MATHEMU) := math.o | 5 | obj-$(CONFIG_MATHEMU) := math.o |
6 | 6 | ||
7 | EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w | 7 | EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w |
8 | EXTRA_AFLAGS := -traditional | ||
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile index 66401930f83e..fb988a48a754 100644 --- a/arch/s390/mm/Makefile +++ b/arch/s390/mm/Makefile | |||
@@ -4,4 +4,4 @@ | |||
4 | 4 | ||
5 | obj-y := init.o fault.o extmem.o mmap.o vmem.o pgtable.o | 5 | obj-y := init.o fault.o extmem.o mmap.o vmem.o pgtable.o |
6 | obj-$(CONFIG_CMM) += cmm.o | 6 | obj-$(CONFIG_CMM) += cmm.o |
7 | 7 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o | |
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c index ed2af0a3303b..f231f5ec74b6 100644 --- a/arch/s390/mm/extmem.c +++ b/arch/s390/mm/extmem.c | |||
@@ -287,7 +287,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
287 | if (rc < 0) | 287 | if (rc < 0) |
288 | goto out_free; | 288 | goto out_free; |
289 | 289 | ||
290 | rc = add_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); | 290 | rc = vmem_add_mapping(seg->start_addr, seg->end - seg->start_addr + 1); |
291 | 291 | ||
292 | if (rc) | 292 | if (rc) |
293 | goto out_free; | 293 | goto out_free; |
@@ -351,7 +351,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
351 | release_resource(seg->res); | 351 | release_resource(seg->res); |
352 | kfree(seg->res); | 352 | kfree(seg->res); |
353 | out_shared: | 353 | out_shared: |
354 | remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); | 354 | vmem_remove_mapping(seg->start_addr, seg->end - seg->start_addr + 1); |
355 | out_free: | 355 | out_free: |
356 | kfree(seg); | 356 | kfree(seg); |
357 | out: | 357 | out: |
@@ -474,7 +474,7 @@ segment_modify_shared (char *name, int do_nonshared) | |||
474 | rc = 0; | 474 | rc = 0; |
475 | goto out_unlock; | 475 | goto out_unlock; |
476 | out_del: | 476 | out_del: |
477 | remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); | 477 | vmem_remove_mapping(seg->start_addr, seg->end - seg->start_addr + 1); |
478 | list_del(&seg->list); | 478 | list_del(&seg->list); |
479 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); | 479 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); |
480 | kfree(seg); | 480 | kfree(seg); |
@@ -508,7 +508,7 @@ segment_unload(char *name) | |||
508 | goto out_unlock; | 508 | goto out_unlock; |
509 | release_resource(seg->res); | 509 | release_resource(seg->res); |
510 | kfree(seg->res); | 510 | kfree(seg->res); |
511 | remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); | 511 | vmem_remove_mapping(seg->start_addr, seg->end - seg->start_addr + 1); |
512 | list_del(&seg->list); | 512 | list_del(&seg->list); |
513 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); | 513 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); |
514 | kfree(seg); | 514 | kfree(seg); |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 2650f46001d0..4d537205e83c 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
29 | #include <linux/kprobes.h> | 29 | #include <linux/kprobes.h> |
30 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | #include <linux/hugetlb.h> | ||
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
32 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
33 | #include <asm/s390_ext.h> | 34 | #include <asm/s390_ext.h> |
@@ -367,6 +368,8 @@ good_area: | |||
367 | } | 368 | } |
368 | 369 | ||
369 | survive: | 370 | survive: |
371 | if (is_vm_hugetlb_page(vma)) | ||
372 | address &= HPAGE_MASK; | ||
370 | /* | 373 | /* |
371 | * If for any reason at all we couldn't handle the fault, | 374 | * If for any reason at all we couldn't handle the fault, |
372 | * make sure we exit gracefully rather than endlessly redo | 375 | * make sure we exit gracefully rather than endlessly redo |
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c new file mode 100644 index 000000000000..f4b6124fdb75 --- /dev/null +++ b/arch/s390/mm/hugetlbpage.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * IBM System z Huge TLB Page Support for Kernel. | ||
3 | * | ||
4 | * Copyright 2007 IBM Corp. | ||
5 | * Author(s): Gerald Schaefer <gerald.schaefer@de.ibm.com> | ||
6 | */ | ||
7 | |||
8 | #include <linux/mm.h> | ||
9 | #include <linux/hugetlb.h> | ||
10 | |||
11 | |||
12 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | ||
13 | pte_t *pteptr, pte_t pteval) | ||
14 | { | ||
15 | pmd_t *pmdp = (pmd_t *) pteptr; | ||
16 | pte_t shadow_pteval = pteval; | ||
17 | unsigned long mask; | ||
18 | |||
19 | if (!MACHINE_HAS_HPAGE) { | ||
20 | pteptr = (pte_t *) pte_page(pteval)[1].index; | ||
21 | mask = pte_val(pteval) & | ||
22 | (_SEGMENT_ENTRY_INV | _SEGMENT_ENTRY_RO); | ||
23 | pte_val(pteval) = (_SEGMENT_ENTRY + __pa(pteptr)) | mask; | ||
24 | if (mm->context.noexec) { | ||
25 | pteptr += PTRS_PER_PTE; | ||
26 | pte_val(shadow_pteval) = | ||
27 | (_SEGMENT_ENTRY + __pa(pteptr)) | mask; | ||
28 | } | ||
29 | } | ||
30 | |||
31 | pmd_val(*pmdp) = pte_val(pteval); | ||
32 | if (mm->context.noexec) { | ||
33 | pmdp = get_shadow_table(pmdp); | ||
34 | pmd_val(*pmdp) = pte_val(shadow_pteval); | ||
35 | } | ||
36 | } | ||
37 | |||
38 | int arch_prepare_hugepage(struct page *page) | ||
39 | { | ||
40 | unsigned long addr = page_to_phys(page); | ||
41 | pte_t pte; | ||
42 | pte_t *ptep; | ||
43 | int i; | ||
44 | |||
45 | if (MACHINE_HAS_HPAGE) | ||
46 | return 0; | ||
47 | |||
48 | ptep = (pte_t *) pte_alloc_one(&init_mm, address); | ||
49 | if (!ptep) | ||
50 | return -ENOMEM; | ||
51 | |||
52 | pte = mk_pte(page, PAGE_RW); | ||
53 | for (i = 0; i < PTRS_PER_PTE; i++) { | ||
54 | set_pte_at(&init_mm, addr + i * PAGE_SIZE, ptep + i, pte); | ||
55 | pte_val(pte) += PAGE_SIZE; | ||
56 | } | ||
57 | page[1].index = (unsigned long) ptep; | ||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | void arch_release_hugepage(struct page *page) | ||
62 | { | ||
63 | pte_t *ptep; | ||
64 | |||
65 | if (MACHINE_HAS_HPAGE) | ||
66 | return; | ||
67 | |||
68 | ptep = (pte_t *) page[1].index; | ||
69 | if (!ptep) | ||
70 | return; | ||
71 | pte_free(&init_mm, ptep); | ||
72 | page[1].index = 0; | ||
73 | } | ||
74 | |||
75 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | ||
76 | { | ||
77 | pgd_t *pgdp; | ||
78 | pud_t *pudp; | ||
79 | pmd_t *pmdp = NULL; | ||
80 | |||
81 | pgdp = pgd_offset(mm, addr); | ||
82 | pudp = pud_alloc(mm, pgdp, addr); | ||
83 | if (pudp) | ||
84 | pmdp = pmd_alloc(mm, pudp, addr); | ||
85 | return (pte_t *) pmdp; | ||
86 | } | ||
87 | |||
88 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | ||
89 | { | ||
90 | pgd_t *pgdp; | ||
91 | pud_t *pudp; | ||
92 | pmd_t *pmdp = NULL; | ||
93 | |||
94 | pgdp = pgd_offset(mm, addr); | ||
95 | if (pgd_present(*pgdp)) { | ||
96 | pudp = pud_offset(pgdp, addr); | ||
97 | if (pud_present(*pudp)) | ||
98 | pmdp = pmd_offset(pudp, addr); | ||
99 | } | ||
100 | return (pte_t *) pmdp; | ||
101 | } | ||
102 | |||
103 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | ||
104 | { | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, | ||
109 | int write) | ||
110 | { | ||
111 | return ERR_PTR(-EINVAL); | ||
112 | } | ||
113 | |||
114 | int pmd_huge(pmd_t pmd) | ||
115 | { | ||
116 | if (!MACHINE_HAS_HPAGE) | ||
117 | return 0; | ||
118 | |||
119 | return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE); | ||
120 | } | ||
121 | |||
122 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | ||
123 | pmd_t *pmdp, int write) | ||
124 | { | ||
125 | struct page *page; | ||
126 | |||
127 | if (!MACHINE_HAS_HPAGE) | ||
128 | return NULL; | ||
129 | |||
130 | page = pmd_page(*pmdp); | ||
131 | if (page) | ||
132 | page += ((address & ~HPAGE_MASK) >> PAGE_SHIFT); | ||
133 | return page; | ||
134 | } | ||
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 202c952a29b4..fa31de6ae97a 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -77,28 +77,6 @@ void show_mem(void) | |||
77 | printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); | 77 | printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); |
78 | } | 78 | } |
79 | 79 | ||
80 | static void __init setup_ro_region(void) | ||
81 | { | ||
82 | pgd_t *pgd; | ||
83 | pud_t *pud; | ||
84 | pmd_t *pmd; | ||
85 | pte_t *pte; | ||
86 | pte_t new_pte; | ||
87 | unsigned long address, end; | ||
88 | |||
89 | address = ((unsigned long)&_stext) & PAGE_MASK; | ||
90 | end = PFN_ALIGN((unsigned long)&_eshared); | ||
91 | |||
92 | for (; address < end; address += PAGE_SIZE) { | ||
93 | pgd = pgd_offset_k(address); | ||
94 | pud = pud_offset(pgd, address); | ||
95 | pmd = pmd_offset(pud, address); | ||
96 | pte = pte_offset_kernel(pmd, address); | ||
97 | new_pte = mk_pte_phys(address, __pgprot(_PAGE_RO)); | ||
98 | *pte = new_pte; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | /* | 80 | /* |
103 | * paging_init() sets up the page tables | 81 | * paging_init() sets up the page tables |
104 | */ | 82 | */ |
@@ -121,7 +99,6 @@ void __init paging_init(void) | |||
121 | clear_table((unsigned long *) init_mm.pgd, pgd_type, | 99 | clear_table((unsigned long *) init_mm.pgd, pgd_type, |
122 | sizeof(unsigned long)*2048); | 100 | sizeof(unsigned long)*2048); |
123 | vmem_map_init(); | 101 | vmem_map_init(); |
124 | setup_ro_region(); | ||
125 | 102 | ||
126 | /* enable virtual mapping in kernel mode */ | 103 | /* enable virtual mapping in kernel mode */ |
127 | __ctl_load(S390_lowcore.kernel_asce, 1, 1); | 104 | __ctl_load(S390_lowcore.kernel_asce, 1, 1); |
@@ -129,6 +106,8 @@ void __init paging_init(void) | |||
129 | __ctl_load(S390_lowcore.kernel_asce, 13, 13); | 106 | __ctl_load(S390_lowcore.kernel_asce, 13, 13); |
130 | __raw_local_irq_ssm(ssm_mask); | 107 | __raw_local_irq_ssm(ssm_mask); |
131 | 108 | ||
109 | sparse_memory_present_with_active_regions(MAX_NUMNODES); | ||
110 | sparse_init(); | ||
132 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 111 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
133 | #ifdef CONFIG_ZONE_DMA | 112 | #ifdef CONFIG_ZONE_DMA |
134 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); | 113 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index 35d90a4720fd..beccacf907f3 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -10,10 +10,12 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/hugetlb.h> | ||
13 | #include <asm/pgalloc.h> | 14 | #include <asm/pgalloc.h> |
14 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable.h> |
15 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
16 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
18 | #include <asm/sections.h> | ||
17 | 19 | ||
18 | static DEFINE_MUTEX(vmem_mutex); | 20 | static DEFINE_MUTEX(vmem_mutex); |
19 | 21 | ||
@@ -25,43 +27,6 @@ struct memory_segment { | |||
25 | 27 | ||
26 | static LIST_HEAD(mem_segs); | 28 | static LIST_HEAD(mem_segs); |
27 | 29 | ||
28 | void __meminit memmap_init(unsigned long size, int nid, unsigned long zone, | ||
29 | unsigned long start_pfn) | ||
30 | { | ||
31 | struct page *start, *end; | ||
32 | struct page *map_start, *map_end; | ||
33 | int i; | ||
34 | |||
35 | start = pfn_to_page(start_pfn); | ||
36 | end = start + size; | ||
37 | |||
38 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | ||
39 | unsigned long cstart, cend; | ||
40 | |||
41 | cstart = PFN_DOWN(memory_chunk[i].addr); | ||
42 | cend = cstart + PFN_DOWN(memory_chunk[i].size); | ||
43 | |||
44 | map_start = mem_map + cstart; | ||
45 | map_end = mem_map + cend; | ||
46 | |||
47 | if (map_start < start) | ||
48 | map_start = start; | ||
49 | if (map_end > end) | ||
50 | map_end = end; | ||
51 | |||
52 | map_start -= ((unsigned long) map_start & (PAGE_SIZE - 1)) | ||
53 | / sizeof(struct page); | ||
54 | map_end += ((PFN_ALIGN((unsigned long) map_end) | ||
55 | - (unsigned long) map_end) | ||
56 | / sizeof(struct page)); | ||
57 | |||
58 | if (map_start < map_end) | ||
59 | memmap_init_zone((unsigned long)(map_end - map_start), | ||
60 | nid, zone, page_to_pfn(map_start), | ||
61 | MEMMAP_EARLY); | ||
62 | } | ||
63 | } | ||
64 | |||
65 | static void __ref *vmem_alloc_pages(unsigned int order) | 30 | static void __ref *vmem_alloc_pages(unsigned int order) |
66 | { | 31 | { |
67 | if (slab_is_available()) | 32 | if (slab_is_available()) |
@@ -77,8 +42,7 @@ static inline pud_t *vmem_pud_alloc(void) | |||
77 | pud = vmem_alloc_pages(2); | 42 | pud = vmem_alloc_pages(2); |
78 | if (!pud) | 43 | if (!pud) |
79 | return NULL; | 44 | return NULL; |
80 | pud_val(*pud) = _REGION3_ENTRY_EMPTY; | 45 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); |
81 | memcpy(pud + 1, pud, (PTRS_PER_PUD - 1)*sizeof(pud_t)); | ||
82 | #endif | 46 | #endif |
83 | return pud; | 47 | return pud; |
84 | } | 48 | } |
@@ -91,7 +55,7 @@ static inline pmd_t *vmem_pmd_alloc(void) | |||
91 | pmd = vmem_alloc_pages(2); | 55 | pmd = vmem_alloc_pages(2); |
92 | if (!pmd) | 56 | if (!pmd) |
93 | return NULL; | 57 | return NULL; |
94 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE*4); | 58 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); |
95 | #endif | 59 | #endif |
96 | return pmd; | 60 | return pmd; |
97 | } | 61 | } |
@@ -114,7 +78,7 @@ static pte_t __init_refok *vmem_pte_alloc(void) | |||
114 | /* | 78 | /* |
115 | * Add a physical memory range to the 1:1 mapping. | 79 | * Add a physical memory range to the 1:1 mapping. |
116 | */ | 80 | */ |
117 | static int vmem_add_range(unsigned long start, unsigned long size) | 81 | static int vmem_add_mem(unsigned long start, unsigned long size, int ro) |
118 | { | 82 | { |
119 | unsigned long address; | 83 | unsigned long address; |
120 | pgd_t *pg_dir; | 84 | pgd_t *pg_dir; |
@@ -141,7 +105,19 @@ static int vmem_add_range(unsigned long start, unsigned long size) | |||
141 | pud_populate_kernel(&init_mm, pu_dir, pm_dir); | 105 | pud_populate_kernel(&init_mm, pu_dir, pm_dir); |
142 | } | 106 | } |
143 | 107 | ||
108 | pte = mk_pte_phys(address, __pgprot(ro ? _PAGE_RO : 0)); | ||
144 | pm_dir = pmd_offset(pu_dir, address); | 109 | pm_dir = pmd_offset(pu_dir, address); |
110 | |||
111 | #ifdef __s390x__ | ||
112 | if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && | ||
113 | (address + HPAGE_SIZE <= start + size) && | ||
114 | (address >= HPAGE_SIZE)) { | ||
115 | pte_val(pte) |= _SEGMENT_ENTRY_LARGE; | ||
116 | pmd_val(*pm_dir) = pte_val(pte); | ||
117 | address += HPAGE_SIZE - PAGE_SIZE; | ||
118 | continue; | ||
119 | } | ||
120 | #endif | ||
145 | if (pmd_none(*pm_dir)) { | 121 | if (pmd_none(*pm_dir)) { |
146 | pt_dir = vmem_pte_alloc(); | 122 | pt_dir = vmem_pte_alloc(); |
147 | if (!pt_dir) | 123 | if (!pt_dir) |
@@ -150,7 +126,6 @@ static int vmem_add_range(unsigned long start, unsigned long size) | |||
150 | } | 126 | } |
151 | 127 | ||
152 | pt_dir = pte_offset_kernel(pm_dir, address); | 128 | pt_dir = pte_offset_kernel(pm_dir, address); |
153 | pte = pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL); | ||
154 | *pt_dir = pte; | 129 | *pt_dir = pte; |
155 | } | 130 | } |
156 | ret = 0; | 131 | ret = 0; |
@@ -181,6 +156,13 @@ static void vmem_remove_range(unsigned long start, unsigned long size) | |||
181 | pm_dir = pmd_offset(pu_dir, address); | 156 | pm_dir = pmd_offset(pu_dir, address); |
182 | if (pmd_none(*pm_dir)) | 157 | if (pmd_none(*pm_dir)) |
183 | continue; | 158 | continue; |
159 | |||
160 | if (pmd_huge(*pm_dir)) { | ||
161 | pmd_clear_kernel(pm_dir); | ||
162 | address += HPAGE_SIZE - PAGE_SIZE; | ||
163 | continue; | ||
164 | } | ||
165 | |||
184 | pt_dir = pte_offset_kernel(pm_dir, address); | 166 | pt_dir = pte_offset_kernel(pm_dir, address); |
185 | *pt_dir = pte; | 167 | *pt_dir = pte; |
186 | } | 168 | } |
@@ -190,10 +172,9 @@ static void vmem_remove_range(unsigned long start, unsigned long size) | |||
190 | /* | 172 | /* |
191 | * Add a backed mem_map array to the virtual mem_map array. | 173 | * Add a backed mem_map array to the virtual mem_map array. |
192 | */ | 174 | */ |
193 | static int vmem_add_mem_map(unsigned long start, unsigned long size) | 175 | int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) |
194 | { | 176 | { |
195 | unsigned long address, start_addr, end_addr; | 177 | unsigned long address, start_addr, end_addr; |
196 | struct page *map_start, *map_end; | ||
197 | pgd_t *pg_dir; | 178 | pgd_t *pg_dir; |
198 | pud_t *pu_dir; | 179 | pud_t *pu_dir; |
199 | pmd_t *pm_dir; | 180 | pmd_t *pm_dir; |
@@ -201,11 +182,8 @@ static int vmem_add_mem_map(unsigned long start, unsigned long size) | |||
201 | pte_t pte; | 182 | pte_t pte; |
202 | int ret = -ENOMEM; | 183 | int ret = -ENOMEM; |
203 | 184 | ||
204 | map_start = VMEM_MAP + PFN_DOWN(start); | 185 | start_addr = (unsigned long) start; |
205 | map_end = VMEM_MAP + PFN_DOWN(start + size); | 186 | end_addr = (unsigned long) (start + nr); |
206 | |||
207 | start_addr = (unsigned long) map_start & PAGE_MASK; | ||
208 | end_addr = PFN_ALIGN((unsigned long) map_end); | ||
209 | 187 | ||
210 | for (address = start_addr; address < end_addr; address += PAGE_SIZE) { | 188 | for (address = start_addr; address < end_addr; address += PAGE_SIZE) { |
211 | pg_dir = pgd_offset_k(address); | 189 | pg_dir = pgd_offset_k(address); |
@@ -249,16 +227,6 @@ out: | |||
249 | return ret; | 227 | return ret; |
250 | } | 228 | } |
251 | 229 | ||
252 | static int vmem_add_mem(unsigned long start, unsigned long size) | ||
253 | { | ||
254 | int ret; | ||
255 | |||
256 | ret = vmem_add_mem_map(start, size); | ||
257 | if (ret) | ||
258 | return ret; | ||
259 | return vmem_add_range(start, size); | ||
260 | } | ||
261 | |||
262 | /* | 230 | /* |
263 | * Add memory segment to the segment list if it doesn't overlap with | 231 | * Add memory segment to the segment list if it doesn't overlap with |
264 | * an already present segment. | 232 | * an already present segment. |
@@ -296,7 +264,7 @@ static void __remove_shared_memory(struct memory_segment *seg) | |||
296 | vmem_remove_range(seg->start, seg->size); | 264 | vmem_remove_range(seg->start, seg->size); |
297 | } | 265 | } |
298 | 266 | ||
299 | int remove_shared_memory(unsigned long start, unsigned long size) | 267 | int vmem_remove_mapping(unsigned long start, unsigned long size) |
300 | { | 268 | { |
301 | struct memory_segment *seg; | 269 | struct memory_segment *seg; |
302 | int ret; | 270 | int ret; |
@@ -320,11 +288,9 @@ out: | |||
320 | return ret; | 288 | return ret; |
321 | } | 289 | } |
322 | 290 | ||
323 | int add_shared_memory(unsigned long start, unsigned long size) | 291 | int vmem_add_mapping(unsigned long start, unsigned long size) |
324 | { | 292 | { |
325 | struct memory_segment *seg; | 293 | struct memory_segment *seg; |
326 | struct page *page; | ||
327 | unsigned long pfn, num_pfn, end_pfn; | ||
328 | int ret; | 294 | int ret; |
329 | 295 | ||
330 | mutex_lock(&vmem_mutex); | 296 | mutex_lock(&vmem_mutex); |
@@ -339,24 +305,9 @@ int add_shared_memory(unsigned long start, unsigned long size) | |||
339 | if (ret) | 305 | if (ret) |
340 | goto out_free; | 306 | goto out_free; |
341 | 307 | ||
342 | ret = vmem_add_mem(start, size); | 308 | ret = vmem_add_mem(start, size, 0); |
343 | if (ret) | 309 | if (ret) |
344 | goto out_remove; | 310 | goto out_remove; |
345 | |||
346 | pfn = PFN_DOWN(start); | ||
347 | num_pfn = PFN_DOWN(size); | ||
348 | end_pfn = pfn + num_pfn; | ||
349 | |||
350 | page = pfn_to_page(pfn); | ||
351 | memset(page, 0, num_pfn * sizeof(struct page)); | ||
352 | |||
353 | for (; pfn < end_pfn; pfn++) { | ||
354 | page = pfn_to_page(pfn); | ||
355 | init_page_count(page); | ||
356 | reset_page_mapcount(page); | ||
357 | SetPageReserved(page); | ||
358 | INIT_LIST_HEAD(&page->lru); | ||
359 | } | ||
360 | goto out; | 311 | goto out; |
361 | 312 | ||
362 | out_remove: | 313 | out_remove: |
@@ -375,14 +326,34 @@ out: | |||
375 | */ | 326 | */ |
376 | void __init vmem_map_init(void) | 327 | void __init vmem_map_init(void) |
377 | { | 328 | { |
329 | unsigned long ro_start, ro_end; | ||
330 | unsigned long start, end; | ||
378 | int i; | 331 | int i; |
379 | 332 | ||
380 | INIT_LIST_HEAD(&init_mm.context.crst_list); | 333 | INIT_LIST_HEAD(&init_mm.context.crst_list); |
381 | INIT_LIST_HEAD(&init_mm.context.pgtable_list); | 334 | INIT_LIST_HEAD(&init_mm.context.pgtable_list); |
382 | init_mm.context.noexec = 0; | 335 | init_mm.context.noexec = 0; |
383 | NODE_DATA(0)->node_mem_map = VMEM_MAP; | 336 | ro_start = ((unsigned long)&_stext) & PAGE_MASK; |
384 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) | 337 | ro_end = PFN_ALIGN((unsigned long)&_eshared); |
385 | vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); | 338 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { |
339 | start = memory_chunk[i].addr; | ||
340 | end = memory_chunk[i].addr + memory_chunk[i].size; | ||
341 | if (start >= ro_end || end <= ro_start) | ||
342 | vmem_add_mem(start, end - start, 0); | ||
343 | else if (start >= ro_start && end <= ro_end) | ||
344 | vmem_add_mem(start, end - start, 1); | ||
345 | else if (start >= ro_start) { | ||
346 | vmem_add_mem(start, ro_end - start, 1); | ||
347 | vmem_add_mem(ro_end, end - ro_end, 0); | ||
348 | } else if (end < ro_end) { | ||
349 | vmem_add_mem(start, ro_start - start, 0); | ||
350 | vmem_add_mem(ro_start, end - ro_start, 1); | ||
351 | } else { | ||
352 | vmem_add_mem(start, ro_start - start, 0); | ||
353 | vmem_add_mem(ro_start, ro_end - ro_start, 1); | ||
354 | vmem_add_mem(ro_end, end - ro_end, 0); | ||
355 | } | ||
356 | } | ||
386 | } | 357 | } |
387 | 358 | ||
388 | /* | 359 | /* |
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c index 00d52a20d8a5..e7c150d49702 100644 --- a/arch/sh/boards/renesas/migor/setup.c +++ b/arch/sh/boards/renesas/migor/setup.c | |||
@@ -199,8 +199,7 @@ static struct platform_device *migor_devices[] __initdata = { | |||
199 | 199 | ||
200 | static struct i2c_board_info __initdata migor_i2c_devices[] = { | 200 | static struct i2c_board_info __initdata migor_i2c_devices[] = { |
201 | { | 201 | { |
202 | I2C_BOARD_INFO("rtc-rs5c372", 0x32), | 202 | I2C_BOARD_INFO("rs5c372b", 0x32), |
203 | .type = "rs5c372b", | ||
204 | }, | 203 | }, |
205 | { | 204 | { |
206 | I2C_BOARD_INFO("migor_ts", 0x51), | 205 | I2C_BOARD_INFO("migor_ts", 0x51), |
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index a5c5e9236501..ac0a96522e45 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c | |||
@@ -199,8 +199,7 @@ static struct platform_device smbus_device = { | |||
199 | 199 | ||
200 | static struct i2c_board_info __initdata highlander_i2c_devices[] = { | 200 | static struct i2c_board_info __initdata highlander_i2c_devices[] = { |
201 | { | 201 | { |
202 | I2C_BOARD_INFO("rtc-rs5c372", 0x32), | 202 | I2C_BOARD_INFO("r2025sd", 0x32), |
203 | .type = "r2025sd", | ||
204 | }, | 203 | }, |
205 | }; | 204 | }; |
206 | 205 | ||
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 49b435c3a57a..08d2e7325252 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
@@ -191,8 +191,8 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq) | |||
191 | 191 | ||
192 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 192 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
193 | { | 193 | { |
194 | unsigned long start = pci_resource_start(dev, bar); | 194 | resource_size_t start = pci_resource_start(dev, bar); |
195 | unsigned long len = pci_resource_len(dev, bar); | 195 | resource_size_t len = pci_resource_len(dev, bar); |
196 | unsigned long flags = pci_resource_flags(dev, bar); | 196 | unsigned long flags = pci_resource_flags(dev, bar); |
197 | 197 | ||
198 | if (unlikely(!len || !start)) | 198 | if (unlikely(!len || !start)) |
diff --git a/arch/sh/kernel/asm-offsets.c b/arch/sh/kernel/asm-offsets.c index dc6725c51a89..57cf0e0680f3 100644 --- a/arch/sh/kernel/asm-offsets.c +++ b/arch/sh/kernel/asm-offsets.c | |||
@@ -11,12 +11,9 @@ | |||
11 | #include <linux/stddef.h> | 11 | #include <linux/stddef.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <asm/thread_info.h> | 14 | #include <linux/kbuild.h> |
15 | |||
16 | #define DEFINE(sym, val) \ | ||
17 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
18 | 15 | ||
19 | #define BLANK() asm volatile("\n->" : : ) | 16 | #include <asm/thread_info.h> |
20 | 17 | ||
21 | int main(void) | 18 | int main(void) |
22 | { | 19 | { |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 9bf19b00696a..a2a99e487e33 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -200,8 +200,6 @@ void irq_ctx_exit(int cpu) | |||
200 | hardirq_ctx[cpu] = NULL; | 200 | hardirq_ctx[cpu] = NULL; |
201 | } | 201 | } |
202 | 202 | ||
203 | extern asmlinkage void __do_softirq(void); | ||
204 | |||
205 | asmlinkage void do_softirq(void) | 203 | asmlinkage void do_softirq(void) |
206 | { | 204 | { |
207 | unsigned long flags; | 205 | unsigned long flags; |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 49590f8fe98c..d211fdb24584 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -68,6 +68,7 @@ config SPARC | |||
68 | default y | 68 | default y |
69 | select HAVE_IDE | 69 | select HAVE_IDE |
70 | select HAVE_OPROFILE | 70 | select HAVE_OPROFILE |
71 | select HAVE_ARCH_KGDB if !SMP | ||
71 | 72 | ||
72 | # Identify this as a Sparc32 build | 73 | # Identify this as a Sparc32 build |
73 | config SPARC32 | 74 | config SPARC32 |
diff --git a/arch/sparc/defconfig b/arch/sparc/defconfig index 6a2c57a2fe71..2e3a149ea0e7 100644 --- a/arch/sparc/defconfig +++ b/arch/sparc/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25 | 3 | # Linux kernel version: 2.6.25 |
4 | # Sun Apr 20 01:49:51 2008 | 4 | # Tue Apr 29 01:28:58 2008 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_HIGHMEM=y | 7 | CONFIG_HIGHMEM=y |
@@ -217,12 +217,7 @@ CONFIG_IPV6_TUNNEL=m | |||
217 | # CONFIG_NETWORK_SECMARK is not set | 217 | # CONFIG_NETWORK_SECMARK is not set |
218 | # CONFIG_NETFILTER is not set | 218 | # CONFIG_NETFILTER is not set |
219 | # CONFIG_IP_DCCP is not set | 219 | # CONFIG_IP_DCCP is not set |
220 | CONFIG_IP_SCTP=m | 220 | # CONFIG_IP_SCTP is not set |
221 | # CONFIG_SCTP_DBG_MSG is not set | ||
222 | CONFIG_SCTP_DBG_OBJCNT=y | ||
223 | # CONFIG_SCTP_HMAC_NONE is not set | ||
224 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
225 | CONFIG_SCTP_HMAC_MD5=y | ||
226 | # CONFIG_TIPC is not set | 221 | # CONFIG_TIPC is not set |
227 | # CONFIG_ATM is not set | 222 | # CONFIG_ATM is not set |
228 | # CONFIG_BRIDGE is not set | 223 | # CONFIG_BRIDGE is not set |
@@ -245,9 +240,7 @@ CONFIG_NET_PKTGEN=m | |||
245 | # CONFIG_CAN is not set | 240 | # CONFIG_CAN is not set |
246 | # CONFIG_IRDA is not set | 241 | # CONFIG_IRDA is not set |
247 | # CONFIG_BT is not set | 242 | # CONFIG_BT is not set |
248 | CONFIG_AF_RXRPC=m | 243 | # CONFIG_AF_RXRPC is not set |
249 | # CONFIG_AF_RXRPC_DEBUG is not set | ||
250 | # CONFIG_RXKAD is not set | ||
251 | 244 | ||
252 | # | 245 | # |
253 | # Wireless | 246 | # Wireless |
@@ -390,7 +383,7 @@ CONFIG_DUMMY=m | |||
390 | # CONFIG_BONDING is not set | 383 | # CONFIG_BONDING is not set |
391 | # CONFIG_MACVLAN is not set | 384 | # CONFIG_MACVLAN is not set |
392 | # CONFIG_EQUALIZER is not set | 385 | # CONFIG_EQUALIZER is not set |
393 | CONFIG_TUN=m | 386 | # CONFIG_TUN is not set |
394 | # CONFIG_VETH is not set | 387 | # CONFIG_VETH is not set |
395 | # CONFIG_ARCNET is not set | 388 | # CONFIG_ARCNET is not set |
396 | # CONFIG_PHYLIB is not set | 389 | # CONFIG_PHYLIB is not set |
@@ -544,6 +537,7 @@ CONFIG_SERIAL_SUNSU_CONSOLE=y | |||
544 | # CONFIG_SERIAL_SUNSAB is not set | 537 | # CONFIG_SERIAL_SUNSAB is not set |
545 | CONFIG_SERIAL_CORE=y | 538 | CONFIG_SERIAL_CORE=y |
546 | CONFIG_SERIAL_CORE_CONSOLE=y | 539 | CONFIG_SERIAL_CORE_CONSOLE=y |
540 | CONFIG_CONSOLE_POLL=y | ||
547 | # CONFIG_SERIAL_JSM is not set | 541 | # CONFIG_SERIAL_JSM is not set |
548 | CONFIG_UNIX98_PTYS=y | 542 | CONFIG_UNIX98_PTYS=y |
549 | CONFIG_LEGACY_PTYS=y | 543 | CONFIG_LEGACY_PTYS=y |
@@ -595,6 +589,7 @@ CONFIG_SSB_POSSIBLE=y | |||
595 | # Multifunction device drivers | 589 | # Multifunction device drivers |
596 | # | 590 | # |
597 | # CONFIG_MFD_SM501 is not set | 591 | # CONFIG_MFD_SM501 is not set |
592 | # CONFIG_HTC_PASIC3 is not set | ||
598 | 593 | ||
599 | # | 594 | # |
600 | # Multimedia devices | 595 | # Multimedia devices |
@@ -645,10 +640,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
645 | # CONFIG_NEW_LEDS is not set | 640 | # CONFIG_NEW_LEDS is not set |
646 | # CONFIG_INFINIBAND is not set | 641 | # CONFIG_INFINIBAND is not set |
647 | # CONFIG_RTC_CLASS is not set | 642 | # CONFIG_RTC_CLASS is not set |
648 | |||
649 | # | ||
650 | # Userspace I/O | ||
651 | # | ||
652 | # CONFIG_UIO is not set | 643 | # CONFIG_UIO is not set |
653 | 644 | ||
654 | # | 645 | # |
@@ -680,16 +671,12 @@ CONFIG_FS_MBCACHE=y | |||
680 | # CONFIG_REISERFS_FS is not set | 671 | # CONFIG_REISERFS_FS is not set |
681 | # CONFIG_JFS_FS is not set | 672 | # CONFIG_JFS_FS is not set |
682 | CONFIG_FS_POSIX_ACL=y | 673 | CONFIG_FS_POSIX_ACL=y |
683 | CONFIG_XFS_FS=m | 674 | # CONFIG_XFS_FS is not set |
684 | CONFIG_XFS_QUOTA=y | ||
685 | CONFIG_XFS_POSIX_ACL=y | ||
686 | CONFIG_XFS_RT=y | ||
687 | # CONFIG_OCFS2_FS is not set | 675 | # CONFIG_OCFS2_FS is not set |
688 | CONFIG_DNOTIFY=y | 676 | CONFIG_DNOTIFY=y |
689 | CONFIG_INOTIFY=y | 677 | CONFIG_INOTIFY=y |
690 | CONFIG_INOTIFY_USER=y | 678 | CONFIG_INOTIFY_USER=y |
691 | # CONFIG_QUOTA is not set | 679 | # CONFIG_QUOTA is not set |
692 | CONFIG_QUOTACTL=y | ||
693 | CONFIG_AUTOFS_FS=m | 680 | CONFIG_AUTOFS_FS=m |
694 | CONFIG_AUTOFS4_FS=m | 681 | CONFIG_AUTOFS4_FS=m |
695 | # CONFIG_FUSE_FS is not set | 682 | # CONFIG_FUSE_FS is not set |
@@ -725,11 +712,9 @@ CONFIG_SYSFS=y | |||
725 | # | 712 | # |
726 | # CONFIG_ADFS_FS is not set | 713 | # CONFIG_ADFS_FS is not set |
727 | # CONFIG_AFFS_FS is not set | 714 | # CONFIG_AFFS_FS is not set |
728 | # CONFIG_ECRYPT_FS is not set | ||
729 | # CONFIG_HFS_FS is not set | 715 | # CONFIG_HFS_FS is not set |
730 | # CONFIG_HFSPLUS_FS is not set | 716 | # CONFIG_HFSPLUS_FS is not set |
731 | CONFIG_BEFS_FS=m | 717 | # CONFIG_BEFS_FS is not set |
732 | # CONFIG_BEFS_DEBUG is not set | ||
733 | # CONFIG_BFS_FS is not set | 718 | # CONFIG_BFS_FS is not set |
734 | # CONFIG_EFS_FS is not set | 719 | # CONFIG_EFS_FS is not set |
735 | # CONFIG_CRAMFS is not set | 720 | # CONFIG_CRAMFS is not set |
@@ -744,7 +729,6 @@ CONFIG_NETWORK_FILESYSTEMS=y | |||
744 | CONFIG_NFS_FS=y | 729 | CONFIG_NFS_FS=y |
745 | # CONFIG_NFS_V3 is not set | 730 | # CONFIG_NFS_V3 is not set |
746 | # CONFIG_NFS_V4 is not set | 731 | # CONFIG_NFS_V4 is not set |
747 | # CONFIG_NFS_DIRECTIO is not set | ||
748 | # CONFIG_NFSD is not set | 732 | # CONFIG_NFSD is not set |
749 | CONFIG_ROOT_NFS=y | 733 | CONFIG_ROOT_NFS=y |
750 | CONFIG_LOCKD=y | 734 | CONFIG_LOCKD=y |
@@ -755,16 +739,10 @@ CONFIG_SUNRPC_GSS=m | |||
755 | CONFIG_RPCSEC_GSS_KRB5=m | 739 | CONFIG_RPCSEC_GSS_KRB5=m |
756 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 740 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
757 | # CONFIG_SMB_FS is not set | 741 | # CONFIG_SMB_FS is not set |
758 | CONFIG_CIFS=m | 742 | # CONFIG_CIFS is not set |
759 | # CONFIG_CIFS_STATS is not set | ||
760 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
761 | # CONFIG_CIFS_XATTR is not set | ||
762 | # CONFIG_CIFS_DEBUG2 is not set | ||
763 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
764 | # CONFIG_NCP_FS is not set | 743 | # CONFIG_NCP_FS is not set |
765 | # CONFIG_CODA_FS is not set | 744 | # CONFIG_CODA_FS is not set |
766 | CONFIG_AFS_FS=m | 745 | # CONFIG_AFS_FS is not set |
767 | # CONFIG_AFS_DEBUG is not set | ||
768 | 746 | ||
769 | # | 747 | # |
770 | # Partition Types | 748 | # Partition Types |
@@ -821,6 +799,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y | |||
821 | # CONFIG_PRINTK_TIME is not set | 799 | # CONFIG_PRINTK_TIME is not set |
822 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | 800 | # CONFIG_ENABLE_WARN_DEPRECATED is not set |
823 | CONFIG_ENABLE_MUST_CHECK=y | 801 | CONFIG_ENABLE_MUST_CHECK=y |
802 | CONFIG_FRAME_WARN=1024 | ||
824 | CONFIG_MAGIC_SYSRQ=y | 803 | CONFIG_MAGIC_SYSRQ=y |
825 | # CONFIG_UNUSED_SYMBOLS is not set | 804 | # CONFIG_UNUSED_SYMBOLS is not set |
826 | # CONFIG_DEBUG_FS is not set | 805 | # CONFIG_DEBUG_FS is not set |
@@ -842,70 +821,105 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
842 | CONFIG_DEBUG_BUGVERBOSE=y | 821 | CONFIG_DEBUG_BUGVERBOSE=y |
843 | # CONFIG_DEBUG_INFO is not set | 822 | # CONFIG_DEBUG_INFO is not set |
844 | # CONFIG_DEBUG_VM is not set | 823 | # CONFIG_DEBUG_VM is not set |
824 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
845 | # CONFIG_DEBUG_LIST is not set | 825 | # CONFIG_DEBUG_LIST is not set |
846 | # CONFIG_DEBUG_SG is not set | 826 | # CONFIG_DEBUG_SG is not set |
827 | CONFIG_FRAME_POINTER=y | ||
847 | # CONFIG_BOOT_PRINTK_DELAY is not set | 828 | # CONFIG_BOOT_PRINTK_DELAY is not set |
848 | # CONFIG_RCU_TORTURE_TEST is not set | 829 | # CONFIG_RCU_TORTURE_TEST is not set |
849 | # CONFIG_BACKTRACE_SELF_TEST is not set | 830 | # CONFIG_BACKTRACE_SELF_TEST is not set |
850 | # CONFIG_FAULT_INJECTION is not set | 831 | # CONFIG_FAULT_INJECTION is not set |
851 | # CONFIG_SAMPLES is not set | 832 | # CONFIG_SAMPLES is not set |
833 | CONFIG_KGDB=y | ||
834 | CONFIG_HAVE_ARCH_KGDB=y | ||
835 | CONFIG_KGDB_SERIAL_CONSOLE=y | ||
836 | CONFIG_KGDB_TESTS=y | ||
837 | # CONFIG_KGDB_TESTS_ON_BOOT is not set | ||
852 | # CONFIG_DEBUG_STACK_USAGE is not set | 838 | # CONFIG_DEBUG_STACK_USAGE is not set |
853 | 839 | ||
854 | # | 840 | # |
855 | # Security options | 841 | # Security options |
856 | # | 842 | # |
857 | CONFIG_KEYS=y | 843 | # CONFIG_KEYS is not set |
858 | # CONFIG_KEYS_DEBUG_PROC_KEYS is not set | ||
859 | # CONFIG_SECURITY is not set | 844 | # CONFIG_SECURITY is not set |
860 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 845 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
861 | CONFIG_CRYPTO=y | 846 | CONFIG_CRYPTO=y |
847 | |||
848 | # | ||
849 | # Crypto core or helper | ||
850 | # | ||
862 | CONFIG_CRYPTO_ALGAPI=y | 851 | CONFIG_CRYPTO_ALGAPI=y |
863 | CONFIG_CRYPTO_AEAD=y | 852 | CONFIG_CRYPTO_AEAD=y |
864 | CONFIG_CRYPTO_BLKCIPHER=y | 853 | CONFIG_CRYPTO_BLKCIPHER=y |
865 | # CONFIG_CRYPTO_SEQIV is not set | ||
866 | CONFIG_CRYPTO_HASH=y | 854 | CONFIG_CRYPTO_HASH=y |
867 | CONFIG_CRYPTO_MANAGER=y | 855 | CONFIG_CRYPTO_MANAGER=y |
856 | # CONFIG_CRYPTO_GF128MUL is not set | ||
857 | CONFIG_CRYPTO_NULL=m | ||
858 | # CONFIG_CRYPTO_CRYPTD is not set | ||
859 | CONFIG_CRYPTO_AUTHENC=y | ||
860 | # CONFIG_CRYPTO_TEST is not set | ||
861 | |||
862 | # | ||
863 | # Authenticated Encryption with Associated Data | ||
864 | # | ||
865 | # CONFIG_CRYPTO_CCM is not set | ||
866 | # CONFIG_CRYPTO_GCM is not set | ||
867 | # CONFIG_CRYPTO_SEQIV is not set | ||
868 | |||
869 | # | ||
870 | # Block modes | ||
871 | # | ||
872 | CONFIG_CRYPTO_CBC=y | ||
873 | # CONFIG_CRYPTO_CTR is not set | ||
874 | # CONFIG_CRYPTO_CTS is not set | ||
875 | CONFIG_CRYPTO_ECB=m | ||
876 | # CONFIG_CRYPTO_LRW is not set | ||
877 | CONFIG_CRYPTO_PCBC=m | ||
878 | # CONFIG_CRYPTO_XTS is not set | ||
879 | |||
880 | # | ||
881 | # Hash modes | ||
882 | # | ||
868 | CONFIG_CRYPTO_HMAC=y | 883 | CONFIG_CRYPTO_HMAC=y |
869 | # CONFIG_CRYPTO_XCBC is not set | 884 | # CONFIG_CRYPTO_XCBC is not set |
870 | CONFIG_CRYPTO_NULL=m | 885 | |
886 | # | ||
887 | # Digest | ||
888 | # | ||
889 | CONFIG_CRYPTO_CRC32C=m | ||
871 | CONFIG_CRYPTO_MD4=y | 890 | CONFIG_CRYPTO_MD4=y |
872 | CONFIG_CRYPTO_MD5=y | 891 | CONFIG_CRYPTO_MD5=y |
892 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
873 | CONFIG_CRYPTO_SHA1=y | 893 | CONFIG_CRYPTO_SHA1=y |
874 | CONFIG_CRYPTO_SHA256=m | 894 | CONFIG_CRYPTO_SHA256=m |
875 | CONFIG_CRYPTO_SHA512=m | 895 | CONFIG_CRYPTO_SHA512=m |
876 | # CONFIG_CRYPTO_WP512 is not set | ||
877 | # CONFIG_CRYPTO_TGR192 is not set | 896 | # CONFIG_CRYPTO_TGR192 is not set |
878 | # CONFIG_CRYPTO_GF128MUL is not set | 897 | # CONFIG_CRYPTO_WP512 is not set |
879 | CONFIG_CRYPTO_ECB=m | 898 | |
880 | CONFIG_CRYPTO_CBC=y | 899 | # |
881 | CONFIG_CRYPTO_PCBC=m | 900 | # Ciphers |
882 | # CONFIG_CRYPTO_LRW is not set | 901 | # |
883 | # CONFIG_CRYPTO_XTS is not set | ||
884 | # CONFIG_CRYPTO_CTR is not set | ||
885 | # CONFIG_CRYPTO_GCM is not set | ||
886 | # CONFIG_CRYPTO_CCM is not set | ||
887 | # CONFIG_CRYPTO_CRYPTD is not set | ||
888 | CONFIG_CRYPTO_DES=y | ||
889 | # CONFIG_CRYPTO_FCRYPT is not set | ||
890 | CONFIG_CRYPTO_BLOWFISH=m | ||
891 | CONFIG_CRYPTO_TWOFISH=m | ||
892 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
893 | CONFIG_CRYPTO_SERPENT=m | ||
894 | CONFIG_CRYPTO_AES=m | 902 | CONFIG_CRYPTO_AES=m |
903 | # CONFIG_CRYPTO_ANUBIS is not set | ||
904 | CONFIG_CRYPTO_ARC4=m | ||
905 | CONFIG_CRYPTO_BLOWFISH=m | ||
906 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
895 | CONFIG_CRYPTO_CAST5=m | 907 | CONFIG_CRYPTO_CAST5=m |
896 | CONFIG_CRYPTO_CAST6=m | 908 | CONFIG_CRYPTO_CAST6=m |
897 | # CONFIG_CRYPTO_TEA is not set | 909 | CONFIG_CRYPTO_DES=y |
898 | CONFIG_CRYPTO_ARC4=m | 910 | # CONFIG_CRYPTO_FCRYPT is not set |
899 | # CONFIG_CRYPTO_KHAZAD is not set | 911 | # CONFIG_CRYPTO_KHAZAD is not set |
900 | # CONFIG_CRYPTO_ANUBIS is not set | ||
901 | # CONFIG_CRYPTO_SEED is not set | ||
902 | # CONFIG_CRYPTO_SALSA20 is not set | 912 | # CONFIG_CRYPTO_SALSA20 is not set |
913 | # CONFIG_CRYPTO_SEED is not set | ||
914 | CONFIG_CRYPTO_SERPENT=m | ||
915 | # CONFIG_CRYPTO_TEA is not set | ||
916 | CONFIG_CRYPTO_TWOFISH=m | ||
917 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
918 | |||
919 | # | ||
920 | # Compression | ||
921 | # | ||
903 | CONFIG_CRYPTO_DEFLATE=y | 922 | CONFIG_CRYPTO_DEFLATE=y |
904 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
905 | CONFIG_CRYPTO_CRC32C=m | ||
906 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
907 | # CONFIG_CRYPTO_TEST is not set | ||
908 | CONFIG_CRYPTO_AUTHENC=y | ||
909 | # CONFIG_CRYPTO_LZO is not set | 923 | # CONFIG_CRYPTO_LZO is not set |
910 | # CONFIG_CRYPTO_HW is not set | 924 | # CONFIG_CRYPTO_HW is not set |
911 | 925 | ||
@@ -913,6 +927,7 @@ CONFIG_CRYPTO_AUTHENC=y | |||
913 | # Library routines | 927 | # Library routines |
914 | # | 928 | # |
915 | CONFIG_BITREVERSE=y | 929 | CONFIG_BITREVERSE=y |
930 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
916 | # CONFIG_CRC_CCITT is not set | 931 | # CONFIG_CRC_CCITT is not set |
917 | # CONFIG_CRC16 is not set | 932 | # CONFIG_CRC16 is not set |
918 | # CONFIG_CRC_ITU_T is not set | 933 | # CONFIG_CRC_ITU_T is not set |
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 59700aaaae93..6e03a2a7863c 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -25,3 +25,4 @@ obj-$(CONFIG_PCI) += ebus.o | |||
25 | obj-$(CONFIG_SUN_PM) += apc.o pmc.o | 25 | obj-$(CONFIG_SUN_PM) += apc.o pmc.o |
26 | obj-$(CONFIG_MODULES) += module.o sparc_ksyms.o | 26 | obj-$(CONFIG_MODULES) += module.o sparc_ksyms.o |
27 | obj-$(CONFIG_SPARC_LED) += led.o | 27 | obj-$(CONFIG_SPARC_LED) += led.o |
28 | obj-$(CONFIG_KGDB) += kgdb.o | ||
diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c index 6773ed76e414..cd3f7694e9b9 100644 --- a/arch/sparc/kernel/asm-offsets.c +++ b/arch/sparc/kernel/asm-offsets.c | |||
@@ -12,11 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | // #include <linux/mm.h> | 14 | // #include <linux/mm.h> |
15 | 15 | #include <linux/kbuild.h> | |
16 | #define DEFINE(sym, val) \ | ||
17 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
18 | |||
19 | #define BLANK() asm volatile("\n->" : : ) | ||
20 | 16 | ||
21 | int foo(void) | 17 | int foo(void) |
22 | { | 18 | { |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 484c83d23eef..57d1bbdd0bd2 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/head.h> | 12 | #include <asm/head.h> |
13 | #include <asm/asi.h> | 13 | #include <asm/asi.h> |
14 | #include <asm/smp.h> | 14 | #include <asm/smp.h> |
15 | #include <asm/kgdb.h> | ||
16 | #include <asm/contregs.h> | 15 | #include <asm/contregs.h> |
17 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
18 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
@@ -45,91 +44,20 @@ | |||
45 | _SV; _SV; _SV; _SV; _SV; _SV; _SV; \ | 44 | _SV; _SV; _SV; _SV; _SV; _SV; _SV; \ |
46 | _RS; _RS; _RS; _RS; _RS; _RS; _RS; | 45 | _RS; _RS; _RS; _RS; _RS; _RS; _RS; |
47 | 46 | ||
48 | /* First, KGDB low level things. This is a rewrite | ||
49 | * of the routines found in the sparc-stub.c asm() statement | ||
50 | * from the gdb distribution. This is also dual-purpose | ||
51 | * as a software trap for userlevel programs. | ||
52 | */ | ||
53 | .data | ||
54 | .align 4 | ||
55 | |||
56 | in_trap_handler: | ||
57 | .word 0 | ||
58 | |||
59 | .text | 47 | .text |
60 | .align 4 | ||
61 | 48 | ||
62 | #if 0 /* kgdb is dropped from 2.5.33 */ | 49 | #ifdef CONFIG_KGDB |
63 | ! This function is called when any SPARC trap (except window overflow or | 50 | .align 4 |
64 | ! underflow) occurs. It makes sure that the invalid register window is still | 51 | .globl arch_kgdb_breakpoint |
65 | ! available before jumping into C code. It will also restore the world if you | 52 | .type arch_kgdb_breakpoint,#function |
66 | ! return from handle_exception. | 53 | arch_kgdb_breakpoint: |
67 | 54 | ta 0x7d | |
68 | .globl trap_low | 55 | retl |
69 | trap_low: | 56 | nop |
70 | rd %wim, %l3 | 57 | .size arch_kgdb_breakpoint,.-arch_kgdb_breakpoint |
71 | SAVE_ALL | ||
72 | |||
73 | sethi %hi(in_trap_handler), %l4 | ||
74 | ld [%lo(in_trap_handler) + %l4], %l5 | ||
75 | inc %l5 | ||
76 | st %l5, [%lo(in_trap_handler) + %l4] | ||
77 | |||
78 | /* Make sure kgdb sees the same state we just saved. */ | ||
79 | LOAD_PT_GLOBALS(sp) | ||
80 | LOAD_PT_INS(sp) | ||
81 | ld [%sp + STACKFRAME_SZ + PT_Y], %l4 | ||
82 | ld [%sp + STACKFRAME_SZ + PT_WIM], %l3 | ||
83 | ld [%sp + STACKFRAME_SZ + PT_PSR], %l0 | ||
84 | ld [%sp + STACKFRAME_SZ + PT_PC], %l1 | ||
85 | ld [%sp + STACKFRAME_SZ + PT_NPC], %l2 | ||
86 | rd %tbr, %l5 /* Never changes... */ | ||
87 | |||
88 | /* Make kgdb exception frame. */ | ||
89 | sub %sp,(16+1+6+1+72)*4,%sp ! Make room for input & locals | ||
90 | ! + hidden arg + arg spill | ||
91 | ! + doubleword alignment | ||
92 | ! + registers[72] local var | ||
93 | SAVE_KGDB_GLOBALS(sp) | ||
94 | SAVE_KGDB_INS(sp) | ||
95 | SAVE_KGDB_SREGS(sp, l4, l0, l3, l5, l1, l2) | ||
96 | |||
97 | /* We are increasing PIL, so two writes. */ | ||
98 | or %l0, PSR_PIL, %l0 | ||
99 | wr %l0, 0, %psr | ||
100 | WRITE_PAUSE | ||
101 | wr %l0, PSR_ET, %psr | ||
102 | WRITE_PAUSE | ||
103 | |||
104 | call handle_exception | ||
105 | add %sp, STACKFRAME_SZ, %o0 ! Pass address of registers | ||
106 | |||
107 | /* Load new kgdb register set. */ | ||
108 | LOAD_KGDB_GLOBALS(sp) | ||
109 | LOAD_KGDB_INS(sp) | ||
110 | LOAD_KGDB_SREGS(sp, l4, l0, l3, l5, l1, l2) | ||
111 | wr %l4, 0x0, %y | ||
112 | |||
113 | sethi %hi(in_trap_handler), %l4 | ||
114 | ld [%lo(in_trap_handler) + %l4], %l5 | ||
115 | dec %l5 | ||
116 | st %l5, [%lo(in_trap_handler) + %l4] | ||
117 | |||
118 | add %sp,(16+1+6+1+72)*4,%sp ! Undo the kgdb trap frame. | ||
119 | |||
120 | /* Now take what kgdb did and place it into the pt_regs | ||
121 | * frame which SparcLinux RESTORE_ALL understands., | ||
122 | */ | ||
123 | STORE_PT_INS(sp) | ||
124 | STORE_PT_GLOBALS(sp) | ||
125 | STORE_PT_YREG(sp, g2) | ||
126 | STORE_PT_PRIV(sp, l0, l1, l2) | ||
127 | |||
128 | RESTORE_ALL | ||
129 | #endif | 58 | #endif |
130 | 59 | ||
131 | #if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE) | 60 | #if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE) |
132 | .text | ||
133 | .align 4 | 61 | .align 4 |
134 | .globl floppy_hardint | 62 | .globl floppy_hardint |
135 | floppy_hardint: | 63 | floppy_hardint: |
@@ -1596,6 +1524,23 @@ breakpoint_trap: | |||
1596 | 1524 | ||
1597 | RESTORE_ALL | 1525 | RESTORE_ALL |
1598 | 1526 | ||
1527 | #ifdef CONFIG_KGDB | ||
1528 | .align 4 | ||
1529 | .globl kgdb_trap_low | ||
1530 | .type kgdb_trap_low,#function | ||
1531 | kgdb_trap_low: | ||
1532 | rd %wim,%l3 | ||
1533 | SAVE_ALL | ||
1534 | wr %l0, PSR_ET, %psr | ||
1535 | WRITE_PAUSE | ||
1536 | |||
1537 | call kgdb_trap | ||
1538 | add %sp, STACKFRAME_SZ, %o0 | ||
1539 | |||
1540 | RESTORE_ALL | ||
1541 | .size kgdb_trap_low,.-kgdb_trap_low | ||
1542 | #endif | ||
1543 | |||
1599 | .align 4 | 1544 | .align 4 |
1600 | .globl __handle_exception, flush_patch_exception | 1545 | .globl __handle_exception, flush_patch_exception |
1601 | __handle_exception: | 1546 | __handle_exception: |
@@ -1698,4 +1643,22 @@ pcic_nmi_trap_patch: | |||
1698 | 1643 | ||
1699 | #endif /* CONFIG_PCI */ | 1644 | #endif /* CONFIG_PCI */ |
1700 | 1645 | ||
1646 | .globl flushw_all | ||
1647 | flushw_all: | ||
1648 | save %sp, -0x40, %sp | ||
1649 | save %sp, -0x40, %sp | ||
1650 | save %sp, -0x40, %sp | ||
1651 | save %sp, -0x40, %sp | ||
1652 | save %sp, -0x40, %sp | ||
1653 | save %sp, -0x40, %sp | ||
1654 | save %sp, -0x40, %sp | ||
1655 | restore | ||
1656 | restore | ||
1657 | restore | ||
1658 | restore | ||
1659 | restore | ||
1660 | restore | ||
1661 | ret | ||
1662 | restore | ||
1663 | |||
1701 | /* End of entry.S */ | 1664 | /* End of entry.S */ |
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index b7f1e81c8ff2..8bec05fa5795 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S | |||
@@ -191,7 +191,8 @@ t_bade8:BAD_TRAP(0xe8) BAD_TRAP(0xe9) BAD_TRAP(0xea) BAD_TRAP(0xeb) BAD_TRAP(0xe | |||
191 | t_baded:BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) | 191 | t_baded:BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) |
192 | t_badf2:BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) | 192 | t_badf2:BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) |
193 | t_badf7:BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) | 193 | t_badf7:BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) |
194 | t_badfc:BAD_TRAP(0xfc) BAD_TRAP(0xfd) | 194 | t_badfc:BAD_TRAP(0xfc) |
195 | t_kgdb: KGDB_TRAP(0xfd) | ||
195 | dbtrap: BAD_TRAP(0xfe) /* Debugger/PROM breakpoint #1 */ | 196 | dbtrap: BAD_TRAP(0xfe) /* Debugger/PROM breakpoint #1 */ |
196 | dbtrap2:BAD_TRAP(0xff) /* Debugger/PROM breakpoint #2 */ | 197 | dbtrap2:BAD_TRAP(0xff) /* Debugger/PROM breakpoint #2 */ |
197 | 198 | ||
@@ -267,7 +268,7 @@ trapbase_cpu1: | |||
267 | BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) | 268 | BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) |
268 | BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) | 269 | BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) |
269 | BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) | 270 | BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) |
270 | BAD_TRAP(0xfc) BAD_TRAP(0xfd) BAD_TRAP(0xfe) BAD_TRAP(0xff) | 271 | BAD_TRAP(0xfc) KGDB_TRAP(0xfd) BAD_TRAP(0xfe) BAD_TRAP(0xff) |
271 | 272 | ||
272 | trapbase_cpu2: | 273 | trapbase_cpu2: |
273 | BAD_TRAP(0x0) SRMMU_TFAULT TRAP_ENTRY(0x2, bad_instruction) | 274 | BAD_TRAP(0x0) SRMMU_TFAULT TRAP_ENTRY(0x2, bad_instruction) |
@@ -335,7 +336,7 @@ trapbase_cpu2: | |||
335 | BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) | 336 | BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) |
336 | BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) | 337 | BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) |
337 | BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) | 338 | BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) |
338 | BAD_TRAP(0xfc) BAD_TRAP(0xfd) BAD_TRAP(0xfe) BAD_TRAP(0xff) | 339 | BAD_TRAP(0xfc) KGDB_TRAP(0xfd) BAD_TRAP(0xfe) BAD_TRAP(0xff) |
339 | 340 | ||
340 | trapbase_cpu3: | 341 | trapbase_cpu3: |
341 | BAD_TRAP(0x0) SRMMU_TFAULT TRAP_ENTRY(0x2, bad_instruction) | 342 | BAD_TRAP(0x0) SRMMU_TFAULT TRAP_ENTRY(0x2, bad_instruction) |
@@ -403,7 +404,7 @@ trapbase_cpu3: | |||
403 | BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) | 404 | BAD_TRAP(0xed) BAD_TRAP(0xee) BAD_TRAP(0xef) BAD_TRAP(0xf0) BAD_TRAP(0xf1) |
404 | BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) | 405 | BAD_TRAP(0xf2) BAD_TRAP(0xf3) BAD_TRAP(0xf4) BAD_TRAP(0xf5) BAD_TRAP(0xf6) |
405 | BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) | 406 | BAD_TRAP(0xf7) BAD_TRAP(0xf8) BAD_TRAP(0xf9) BAD_TRAP(0xfa) BAD_TRAP(0xfb) |
406 | BAD_TRAP(0xfc) BAD_TRAP(0xfd) BAD_TRAP(0xfe) BAD_TRAP(0xff) | 407 | BAD_TRAP(0xfc) KGDB_TRAP(0xfd) BAD_TRAP(0xfe) BAD_TRAP(0xff) |
407 | 408 | ||
408 | #endif | 409 | #endif |
409 | .align PAGE_SIZE | 410 | .align PAGE_SIZE |
diff --git a/arch/sparc/kernel/kgdb.c b/arch/sparc/kernel/kgdb.c new file mode 100644 index 000000000000..757805ce02ee --- /dev/null +++ b/arch/sparc/kernel/kgdb.c | |||
@@ -0,0 +1,164 @@ | |||
1 | /* kgdb.c: KGDB support for 32-bit sparc. | ||
2 | * | ||
3 | * Copyright (C) 2008 David S. Miller <davem@davemloft.net> | ||
4 | */ | ||
5 | |||
6 | #include <linux/kgdb.h> | ||
7 | #include <linux/kdebug.h> | ||
8 | |||
9 | #include <asm/kdebug.h> | ||
10 | #include <asm/ptrace.h> | ||
11 | #include <asm/irq.h> | ||
12 | |||
13 | extern unsigned long trapbase; | ||
14 | |||
15 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | ||
16 | { | ||
17 | struct reg_window *win; | ||
18 | int i; | ||
19 | |||
20 | gdb_regs[GDB_G0] = 0; | ||
21 | for (i = 0; i < 15; i++) | ||
22 | gdb_regs[GDB_G1 + i] = regs->u_regs[UREG_G1 + i]; | ||
23 | |||
24 | win = (struct reg_window *) regs->u_regs[UREG_FP]; | ||
25 | for (i = 0; i < 8; i++) | ||
26 | gdb_regs[GDB_L0 + i] = win->locals[i]; | ||
27 | for (i = 0; i < 8; i++) | ||
28 | gdb_regs[GDB_I0 + i] = win->ins[i]; | ||
29 | |||
30 | for (i = GDB_F0; i <= GDB_F31; i++) | ||
31 | gdb_regs[i] = 0; | ||
32 | |||
33 | gdb_regs[GDB_Y] = regs->y; | ||
34 | gdb_regs[GDB_PSR] = regs->psr; | ||
35 | gdb_regs[GDB_WIM] = 0; | ||
36 | gdb_regs[GDB_TBR] = (unsigned long) &trapbase; | ||
37 | gdb_regs[GDB_PC] = regs->pc; | ||
38 | gdb_regs[GDB_NPC] = regs->npc; | ||
39 | gdb_regs[GDB_FSR] = 0; | ||
40 | gdb_regs[GDB_CSR] = 0; | ||
41 | } | ||
42 | |||
43 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | ||
44 | { | ||
45 | struct thread_info *t = task_thread_info(p); | ||
46 | struct reg_window *win; | ||
47 | int i; | ||
48 | |||
49 | for (i = GDB_G0; i < GDB_G6; i++) | ||
50 | gdb_regs[i] = 0; | ||
51 | gdb_regs[GDB_G6] = (unsigned long) t; | ||
52 | gdb_regs[GDB_G7] = 0; | ||
53 | for (i = GDB_O0; i < GDB_SP; i++) | ||
54 | gdb_regs[i] = 0; | ||
55 | gdb_regs[GDB_SP] = t->ksp; | ||
56 | gdb_regs[GDB_O7] = 0; | ||
57 | |||
58 | win = (struct reg_window *) t->ksp; | ||
59 | for (i = 0; i < 8; i++) | ||
60 | gdb_regs[GDB_L0 + i] = win->locals[i]; | ||
61 | for (i = 0; i < 8; i++) | ||
62 | gdb_regs[GDB_I0 + i] = win->ins[i]; | ||
63 | |||
64 | for (i = GDB_F0; i <= GDB_F31; i++) | ||
65 | gdb_regs[i] = 0; | ||
66 | |||
67 | gdb_regs[GDB_Y] = 0; | ||
68 | |||
69 | gdb_regs[GDB_PSR] = t->kpsr; | ||
70 | gdb_regs[GDB_WIM] = t->kwim; | ||
71 | gdb_regs[GDB_TBR] = (unsigned long) &trapbase; | ||
72 | gdb_regs[GDB_PC] = t->kpc; | ||
73 | gdb_regs[GDB_NPC] = t->kpc + 4; | ||
74 | gdb_regs[GDB_FSR] = 0; | ||
75 | gdb_regs[GDB_CSR] = 0; | ||
76 | } | ||
77 | |||
78 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | ||
79 | { | ||
80 | struct reg_window *win; | ||
81 | int i; | ||
82 | |||
83 | for (i = 0; i < 15; i++) | ||
84 | regs->u_regs[UREG_G1 + i] = gdb_regs[GDB_G1 + i]; | ||
85 | |||
86 | /* If the PSR register is changing, we have to preserve | ||
87 | * the CWP field, otherwise window save/restore explodes. | ||
88 | */ | ||
89 | if (regs->psr != gdb_regs[GDB_PSR]) { | ||
90 | unsigned long cwp = regs->psr & PSR_CWP; | ||
91 | |||
92 | regs->psr = (gdb_regs[GDB_PSR] & ~PSR_CWP) | cwp; | ||
93 | } | ||
94 | |||
95 | regs->pc = gdb_regs[GDB_PC]; | ||
96 | regs->npc = gdb_regs[GDB_NPC]; | ||
97 | regs->y = gdb_regs[GDB_Y]; | ||
98 | |||
99 | win = (struct reg_window *) regs->u_regs[UREG_FP]; | ||
100 | for (i = 0; i < 8; i++) | ||
101 | win->locals[i] = gdb_regs[GDB_L0 + i]; | ||
102 | for (i = 0; i < 8; i++) | ||
103 | win->ins[i] = gdb_regs[GDB_I0 + i]; | ||
104 | } | ||
105 | |||
106 | int kgdb_arch_handle_exception(int e_vector, int signo, int err_code, | ||
107 | char *remcomInBuffer, char *remcomOutBuffer, | ||
108 | struct pt_regs *linux_regs) | ||
109 | { | ||
110 | unsigned long addr; | ||
111 | char *ptr; | ||
112 | |||
113 | switch (remcomInBuffer[0]) { | ||
114 | case 'c': | ||
115 | /* try to read optional parameter, pc unchanged if no parm */ | ||
116 | ptr = &remcomInBuffer[1]; | ||
117 | if (kgdb_hex2long(&ptr, &addr)) { | ||
118 | linux_regs->pc = addr; | ||
119 | linux_regs->npc = addr + 4; | ||
120 | } | ||
121 | /* fallthru */ | ||
122 | |||
123 | case 'D': | ||
124 | case 'k': | ||
125 | if (linux_regs->pc == (unsigned long) arch_kgdb_breakpoint) { | ||
126 | linux_regs->pc = linux_regs->npc; | ||
127 | linux_regs->npc += 4; | ||
128 | } | ||
129 | return 0; | ||
130 | } | ||
131 | return -1; | ||
132 | } | ||
133 | |||
134 | extern void do_hw_interrupt(struct pt_regs *regs, unsigned long type); | ||
135 | |||
136 | asmlinkage void kgdb_trap(struct pt_regs *regs) | ||
137 | { | ||
138 | unsigned long flags; | ||
139 | |||
140 | if (user_mode(regs)) { | ||
141 | do_hw_interrupt(regs, 0xfd); | ||
142 | return; | ||
143 | } | ||
144 | |||
145 | flushw_all(); | ||
146 | |||
147 | local_irq_save(flags); | ||
148 | kgdb_handle_exception(0x172, SIGTRAP, 0, regs); | ||
149 | local_irq_restore(flags); | ||
150 | } | ||
151 | |||
152 | int kgdb_arch_init(void) | ||
153 | { | ||
154 | return 0; | ||
155 | } | ||
156 | |||
157 | void kgdb_arch_exit(void) | ||
158 | { | ||
159 | } | ||
160 | |||
161 | struct kgdb_arch arch_kgdb_ops = { | ||
162 | /* Breakpoint instruction: ta 0x7d */ | ||
163 | .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d }, | ||
164 | }; | ||
diff --git a/arch/sparc/kernel/sparc-stub.c b/arch/sparc/kernel/sparc-stub.c deleted file mode 100644 index e84f815e6903..000000000000 --- a/arch/sparc/kernel/sparc-stub.c +++ /dev/null | |||
@@ -1,724 +0,0 @@ | |||
1 | /* $Id: sparc-stub.c,v 1.28 2001/10/30 04:54:21 davem Exp $ | ||
2 | * sparc-stub.c: KGDB support for the Linux kernel. | ||
3 | * | ||
4 | * Modifications to run under Linux | ||
5 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
6 | * | ||
7 | * This file originally came from the gdb sources, and the | ||
8 | * copyright notices have been retained below. | ||
9 | */ | ||
10 | |||
11 | /**************************************************************************** | ||
12 | |||
13 | THIS SOFTWARE IS NOT COPYRIGHTED | ||
14 | |||
15 | HP offers the following for use in the public domain. HP makes no | ||
16 | warranty with regard to the software or its performance and the | ||
17 | user accepts the software "AS IS" with all faults. | ||
18 | |||
19 | HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD | ||
20 | TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
21 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
22 | |||
23 | ****************************************************************************/ | ||
24 | |||
25 | /**************************************************************************** | ||
26 | * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $ | ||
27 | * | ||
28 | * Module name: remcom.c $ | ||
29 | * Revision: 1.34 $ | ||
30 | * Date: 91/03/09 12:29:49 $ | ||
31 | * Contributor: Lake Stevens Instrument Division$ | ||
32 | * | ||
33 | * Description: low level support for gdb debugger. $ | ||
34 | * | ||
35 | * Considerations: only works on target hardware $ | ||
36 | * | ||
37 | * Written by: Glenn Engel $ | ||
38 | * ModuleState: Experimental $ | ||
39 | * | ||
40 | * NOTES: See Below $ | ||
41 | * | ||
42 | * Modified for SPARC by Stu Grossman, Cygnus Support. | ||
43 | * | ||
44 | * This code has been extensively tested on the Fujitsu SPARClite demo board. | ||
45 | * | ||
46 | * To enable debugger support, two things need to happen. One, a | ||
47 | * call to set_debug_traps() is necessary in order to allow any breakpoints | ||
48 | * or error conditions to be properly intercepted and reported to gdb. | ||
49 | * Two, a breakpoint needs to be generated to begin communication. This | ||
50 | * is most easily accomplished by a call to breakpoint(). Breakpoint() | ||
51 | * simulates a breakpoint by executing a trap #1. | ||
52 | * | ||
53 | ************* | ||
54 | * | ||
55 | * The following gdb commands are supported: | ||
56 | * | ||
57 | * command function Return value | ||
58 | * | ||
59 | * g return the value of the CPU registers hex data or ENN | ||
60 | * G set the value of the CPU registers OK or ENN | ||
61 | * | ||
62 | * mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN | ||
63 | * MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN | ||
64 | * | ||
65 | * c Resume at current address SNN ( signal NN) | ||
66 | * cAA..AA Continue at address AA..AA SNN | ||
67 | * | ||
68 | * s Step one instruction SNN | ||
69 | * sAA..AA Step one instruction from AA..AA SNN | ||
70 | * | ||
71 | * k kill | ||
72 | * | ||
73 | * ? What was the last sigval ? SNN (signal NN) | ||
74 | * | ||
75 | * bBB..BB Set baud rate to BB..BB OK or BNN, then sets | ||
76 | * baud rate | ||
77 | * | ||
78 | * All commands and responses are sent with a packet which includes a | ||
79 | * checksum. A packet consists of | ||
80 | * | ||
81 | * $<packet info>#<checksum>. | ||
82 | * | ||
83 | * where | ||
84 | * <packet info> :: <characters representing the command or response> | ||
85 | * <checksum> :: < two hex digits computed as modulo 256 sum of <packetinfo>> | ||
86 | * | ||
87 | * When a packet is received, it is first acknowledged with either '+' or '-'. | ||
88 | * '+' indicates a successful transfer. '-' indicates a failed transfer. | ||
89 | * | ||
90 | * Example: | ||
91 | * | ||
92 | * Host: Reply: | ||
93 | * $m0,10#2a +$00010203040506070809101112131415#42 | ||
94 | * | ||
95 | ****************************************************************************/ | ||
96 | |||
97 | #include <linux/kernel.h> | ||
98 | #include <linux/string.h> | ||
99 | #include <linux/mm.h> | ||
100 | #include <linux/smp.h> | ||
101 | #include <linux/smp_lock.h> | ||
102 | |||
103 | #include <asm/system.h> | ||
104 | #include <asm/signal.h> | ||
105 | #include <asm/oplib.h> | ||
106 | #include <asm/head.h> | ||
107 | #include <asm/traps.h> | ||
108 | #include <asm/vac-ops.h> | ||
109 | #include <asm/kgdb.h> | ||
110 | #include <asm/pgalloc.h> | ||
111 | #include <asm/pgtable.h> | ||
112 | #include <asm/cacheflush.h> | ||
113 | |||
114 | /* | ||
115 | * | ||
116 | * external low-level support routines | ||
117 | */ | ||
118 | |||
119 | extern void putDebugChar(char); /* write a single character */ | ||
120 | extern char getDebugChar(void); /* read and return a single char */ | ||
121 | |||
122 | /* | ||
123 | * BUFMAX defines the maximum number of characters in inbound/outbound buffers | ||
124 | * at least NUMREGBYTES*2 are needed for register packets | ||
125 | */ | ||
126 | #define BUFMAX 2048 | ||
127 | |||
128 | static int initialized; /* !0 means we've been initialized */ | ||
129 | |||
130 | static const char hexchars[]="0123456789abcdef"; | ||
131 | |||
132 | #define NUMREGS 72 | ||
133 | |||
134 | /* Number of bytes of registers. */ | ||
135 | #define NUMREGBYTES (NUMREGS * 4) | ||
136 | enum regnames {G0, G1, G2, G3, G4, G5, G6, G7, | ||
137 | O0, O1, O2, O3, O4, O5, SP, O7, | ||
138 | L0, L1, L2, L3, L4, L5, L6, L7, | ||
139 | I0, I1, I2, I3, I4, I5, FP, I7, | ||
140 | |||
141 | F0, F1, F2, F3, F4, F5, F6, F7, | ||
142 | F8, F9, F10, F11, F12, F13, F14, F15, | ||
143 | F16, F17, F18, F19, F20, F21, F22, F23, | ||
144 | F24, F25, F26, F27, F28, F29, F30, F31, | ||
145 | Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR }; | ||
146 | |||
147 | |||
148 | extern void trap_low(void); /* In arch/sparc/kernel/entry.S */ | ||
149 | |||
150 | unsigned long get_sun4cpte(unsigned long addr) | ||
151 | { | ||
152 | unsigned long entry; | ||
153 | |||
154 | __asm__ __volatile__("\n\tlda [%1] %2, %0\n\t" : | ||
155 | "=r" (entry) : | ||
156 | "r" (addr), "i" (ASI_PTE)); | ||
157 | return entry; | ||
158 | } | ||
159 | |||
160 | unsigned long get_sun4csegmap(unsigned long addr) | ||
161 | { | ||
162 | unsigned long entry; | ||
163 | |||
164 | __asm__ __volatile__("\n\tlduba [%1] %2, %0\n\t" : | ||
165 | "=r" (entry) : | ||
166 | "r" (addr), "i" (ASI_SEGMAP)); | ||
167 | return entry; | ||
168 | } | ||
169 | |||
170 | #if 0 | ||
171 | /* Have to sort this out. This cannot be done after initialization. */ | ||
172 | static void flush_cache_all_nop(void) {} | ||
173 | #endif | ||
174 | |||
175 | /* Place where we save old trap entries for restoration */ | ||
176 | struct tt_entry kgdb_savettable[256]; | ||
177 | typedef void (*trapfunc_t)(void); | ||
178 | |||
179 | /* Helper routine for manipulation of kgdb_savettable */ | ||
180 | static inline void copy_ttentry(struct tt_entry *src, struct tt_entry *dest) | ||
181 | { | ||
182 | dest->inst_one = src->inst_one; | ||
183 | dest->inst_two = src->inst_two; | ||
184 | dest->inst_three = src->inst_three; | ||
185 | dest->inst_four = src->inst_four; | ||
186 | } | ||
187 | |||
188 | /* Initialize the kgdb_savettable so that debugging can commence */ | ||
189 | static void eh_init(void) | ||
190 | { | ||
191 | int i; | ||
192 | |||
193 | for(i=0; i < 256; i++) | ||
194 | copy_ttentry(&sparc_ttable[i], &kgdb_savettable[i]); | ||
195 | } | ||
196 | |||
197 | /* Install an exception handler for kgdb */ | ||
198 | static void exceptionHandler(int tnum, trapfunc_t trap_entry) | ||
199 | { | ||
200 | unsigned long te_addr = (unsigned long) trap_entry; | ||
201 | |||
202 | /* Make new vector */ | ||
203 | sparc_ttable[tnum].inst_one = | ||
204 | SPARC_BRANCH((unsigned long) te_addr, | ||
205 | (unsigned long) &sparc_ttable[tnum].inst_one); | ||
206 | sparc_ttable[tnum].inst_two = SPARC_RD_PSR_L0; | ||
207 | sparc_ttable[tnum].inst_three = SPARC_NOP; | ||
208 | sparc_ttable[tnum].inst_four = SPARC_NOP; | ||
209 | } | ||
210 | |||
211 | /* Convert ch from a hex digit to an int */ | ||
212 | static int | ||
213 | hex(unsigned char ch) | ||
214 | { | ||
215 | if (ch >= 'a' && ch <= 'f') | ||
216 | return ch-'a'+10; | ||
217 | if (ch >= '0' && ch <= '9') | ||
218 | return ch-'0'; | ||
219 | if (ch >= 'A' && ch <= 'F') | ||
220 | return ch-'A'+10; | ||
221 | return -1; | ||
222 | } | ||
223 | |||
224 | /* scan for the sequence $<data>#<checksum> */ | ||
225 | static void | ||
226 | getpacket(char *buffer) | ||
227 | { | ||
228 | unsigned char checksum; | ||
229 | unsigned char xmitcsum; | ||
230 | int i; | ||
231 | int count; | ||
232 | unsigned char ch; | ||
233 | |||
234 | do { | ||
235 | /* wait around for the start character, ignore all other characters */ | ||
236 | while ((ch = (getDebugChar() & 0x7f)) != '$') ; | ||
237 | |||
238 | checksum = 0; | ||
239 | xmitcsum = -1; | ||
240 | |||
241 | count = 0; | ||
242 | |||
243 | /* now, read until a # or end of buffer is found */ | ||
244 | while (count < BUFMAX) { | ||
245 | ch = getDebugChar() & 0x7f; | ||
246 | if (ch == '#') | ||
247 | break; | ||
248 | checksum = checksum + ch; | ||
249 | buffer[count] = ch; | ||
250 | count = count + 1; | ||
251 | } | ||
252 | |||
253 | if (count >= BUFMAX) | ||
254 | continue; | ||
255 | |||
256 | buffer[count] = 0; | ||
257 | |||
258 | if (ch == '#') { | ||
259 | xmitcsum = hex(getDebugChar() & 0x7f) << 4; | ||
260 | xmitcsum |= hex(getDebugChar() & 0x7f); | ||
261 | if (checksum != xmitcsum) | ||
262 | putDebugChar('-'); /* failed checksum */ | ||
263 | else { | ||
264 | putDebugChar('+'); /* successful transfer */ | ||
265 | /* if a sequence char is present, reply the ID */ | ||
266 | if (buffer[2] == ':') { | ||
267 | putDebugChar(buffer[0]); | ||
268 | putDebugChar(buffer[1]); | ||
269 | /* remove sequence chars from buffer */ | ||
270 | count = strlen(buffer); | ||
271 | for (i=3; i <= count; i++) | ||
272 | buffer[i-3] = buffer[i]; | ||
273 | } | ||
274 | } | ||
275 | } | ||
276 | } while (checksum != xmitcsum); | ||
277 | } | ||
278 | |||
279 | /* send the packet in buffer. */ | ||
280 | |||
281 | static void | ||
282 | putpacket(unsigned char *buffer) | ||
283 | { | ||
284 | unsigned char checksum; | ||
285 | int count; | ||
286 | unsigned char ch, recv; | ||
287 | |||
288 | /* $<packet info>#<checksum>. */ | ||
289 | do { | ||
290 | putDebugChar('$'); | ||
291 | checksum = 0; | ||
292 | count = 0; | ||
293 | |||
294 | while ((ch = buffer[count])) { | ||
295 | putDebugChar(ch); | ||
296 | checksum += ch; | ||
297 | count += 1; | ||
298 | } | ||
299 | |||
300 | putDebugChar('#'); | ||
301 | putDebugChar(hexchars[checksum >> 4]); | ||
302 | putDebugChar(hexchars[checksum & 0xf]); | ||
303 | recv = getDebugChar(); | ||
304 | } while ((recv & 0x7f) != '+'); | ||
305 | } | ||
306 | |||
307 | static char remcomInBuffer[BUFMAX]; | ||
308 | static char remcomOutBuffer[BUFMAX]; | ||
309 | |||
310 | /* Convert the memory pointed to by mem into hex, placing result in buf. | ||
311 | * Return a pointer to the last char put in buf (null), in case of mem fault, | ||
312 | * return 0. | ||
313 | */ | ||
314 | |||
315 | static unsigned char * | ||
316 | mem2hex(char *mem, char *buf, int count) | ||
317 | { | ||
318 | unsigned char ch; | ||
319 | |||
320 | while (count-- > 0) { | ||
321 | /* This assembler code is basically: ch = *mem++; | ||
322 | * except that we use the SPARC/Linux exception table | ||
323 | * mechanism (see how "fixup" works in kernel_mna_trap_fault) | ||
324 | * to arrange for a "return 0" upon a memory fault | ||
325 | */ | ||
326 | __asm__( | ||
327 | "\n1:\n\t" | ||
328 | "ldub [%0], %1\n\t" | ||
329 | "inc %0\n\t" | ||
330 | ".section .fixup,#alloc,#execinstr\n\t" | ||
331 | ".align 4\n" | ||
332 | "2:\n\t" | ||
333 | "retl\n\t" | ||
334 | " mov 0, %%o0\n\t" | ||
335 | ".section __ex_table, #alloc\n\t" | ||
336 | ".align 4\n\t" | ||
337 | ".word 1b, 2b\n\t" | ||
338 | ".text\n" | ||
339 | : "=r" (mem), "=r" (ch) : "0" (mem)); | ||
340 | *buf++ = hexchars[ch >> 4]; | ||
341 | *buf++ = hexchars[ch & 0xf]; | ||
342 | } | ||
343 | |||
344 | *buf = 0; | ||
345 | return buf; | ||
346 | } | ||
347 | |||
348 | /* convert the hex array pointed to by buf into binary to be placed in mem | ||
349 | * return a pointer to the character AFTER the last byte written. | ||
350 | */ | ||
351 | static char * | ||
352 | hex2mem(char *buf, char *mem, int count) | ||
353 | { | ||
354 | int i; | ||
355 | unsigned char ch; | ||
356 | |||
357 | for (i=0; i<count; i++) { | ||
358 | |||
359 | ch = hex(*buf++) << 4; | ||
360 | ch |= hex(*buf++); | ||
361 | /* Assembler code is *mem++ = ch; with return 0 on fault */ | ||
362 | __asm__( | ||
363 | "\n1:\n\t" | ||
364 | "stb %1, [%0]\n\t" | ||
365 | "inc %0\n\t" | ||
366 | ".section .fixup,#alloc,#execinstr\n\t" | ||
367 | ".align 4\n" | ||
368 | "2:\n\t" | ||
369 | "retl\n\t" | ||
370 | " mov 0, %%o0\n\t" | ||
371 | ".section __ex_table, #alloc\n\t" | ||
372 | ".align 4\n\t" | ||
373 | ".word 1b, 2b\n\t" | ||
374 | ".text\n" | ||
375 | : "=r" (mem) : "r" (ch) , "0" (mem)); | ||
376 | } | ||
377 | return mem; | ||
378 | } | ||
379 | |||
380 | /* This table contains the mapping between SPARC hardware trap types, and | ||
381 | signals, which are primarily what GDB understands. It also indicates | ||
382 | which hardware traps we need to commandeer when initializing the stub. */ | ||
383 | |||
384 | static struct hard_trap_info | ||
385 | { | ||
386 | unsigned char tt; /* Trap type code for SPARC */ | ||
387 | unsigned char signo; /* Signal that we map this trap into */ | ||
388 | } hard_trap_info[] = { | ||
389 | {SP_TRAP_SBPT, SIGTRAP}, /* ta 1 - Linux/KGDB software breakpoint */ | ||
390 | {0, 0} /* Must be last */ | ||
391 | }; | ||
392 | |||
393 | /* Set up exception handlers for tracing and breakpoints */ | ||
394 | |||
395 | void | ||
396 | set_debug_traps(void) | ||
397 | { | ||
398 | struct hard_trap_info *ht; | ||
399 | unsigned long flags; | ||
400 | |||
401 | local_irq_save(flags); | ||
402 | #if 0 | ||
403 | /* Have to sort this out. This cannot be done after initialization. */ | ||
404 | BTFIXUPSET_CALL(flush_cache_all, flush_cache_all_nop, BTFIXUPCALL_NOP); | ||
405 | #endif | ||
406 | |||
407 | /* Initialize our copy of the Linux Sparc trap table */ | ||
408 | eh_init(); | ||
409 | |||
410 | for (ht = hard_trap_info; ht->tt && ht->signo; ht++) { | ||
411 | /* Only if it doesn't destroy our fault handlers */ | ||
412 | if((ht->tt != SP_TRAP_TFLT) && | ||
413 | (ht->tt != SP_TRAP_DFLT)) | ||
414 | exceptionHandler(ht->tt, trap_low); | ||
415 | } | ||
416 | |||
417 | /* In case GDB is started before us, ack any packets (presumably | ||
418 | * "$?#xx") sitting there. | ||
419 | * | ||
420 | * I've found this code causes more problems than it solves, | ||
421 | * so that's why it's commented out. GDB seems to work fine | ||
422 | * now starting either before or after the kernel -bwb | ||
423 | */ | ||
424 | #if 0 | ||
425 | while((c = getDebugChar()) != '$'); | ||
426 | while((c = getDebugChar()) != '#'); | ||
427 | c = getDebugChar(); /* eat first csum byte */ | ||
428 | c = getDebugChar(); /* eat second csum byte */ | ||
429 | putDebugChar('+'); /* ack it */ | ||
430 | #endif | ||
431 | |||
432 | initialized = 1; /* connect! */ | ||
433 | local_irq_restore(flags); | ||
434 | } | ||
435 | |||
436 | /* Convert the SPARC hardware trap type code to a unix signal number. */ | ||
437 | |||
438 | static int | ||
439 | computeSignal(int tt) | ||
440 | { | ||
441 | struct hard_trap_info *ht; | ||
442 | |||
443 | for (ht = hard_trap_info; ht->tt && ht->signo; ht++) | ||
444 | if (ht->tt == tt) | ||
445 | return ht->signo; | ||
446 | |||
447 | return SIGHUP; /* default for things we don't know about */ | ||
448 | } | ||
449 | |||
450 | /* | ||
451 | * While we find nice hex chars, build an int. | ||
452 | * Return number of chars processed. | ||
453 | */ | ||
454 | |||
455 | static int | ||
456 | hexToInt(char **ptr, int *intValue) | ||
457 | { | ||
458 | int numChars = 0; | ||
459 | int hexValue; | ||
460 | |||
461 | *intValue = 0; | ||
462 | |||
463 | while (**ptr) { | ||
464 | hexValue = hex(**ptr); | ||
465 | if (hexValue < 0) | ||
466 | break; | ||
467 | |||
468 | *intValue = (*intValue << 4) | hexValue; | ||
469 | numChars ++; | ||
470 | |||
471 | (*ptr)++; | ||
472 | } | ||
473 | |||
474 | return (numChars); | ||
475 | } | ||
476 | |||
477 | /* | ||
478 | * This function does all command processing for interfacing to gdb. It | ||
479 | * returns 1 if you should skip the instruction at the trap address, 0 | ||
480 | * otherwise. | ||
481 | */ | ||
482 | |||
483 | extern void breakinst(void); | ||
484 | |||
485 | void | ||
486 | handle_exception (unsigned long *registers) | ||
487 | { | ||
488 | int tt; /* Trap type */ | ||
489 | int sigval; | ||
490 | int addr; | ||
491 | int length; | ||
492 | char *ptr; | ||
493 | unsigned long *sp; | ||
494 | |||
495 | /* First, we must force all of the windows to be spilled out */ | ||
496 | |||
497 | asm("save %sp, -64, %sp\n\t" | ||
498 | "save %sp, -64, %sp\n\t" | ||
499 | "save %sp, -64, %sp\n\t" | ||
500 | "save %sp, -64, %sp\n\t" | ||
501 | "save %sp, -64, %sp\n\t" | ||
502 | "save %sp, -64, %sp\n\t" | ||
503 | "save %sp, -64, %sp\n\t" | ||
504 | "save %sp, -64, %sp\n\t" | ||
505 | "restore\n\t" | ||
506 | "restore\n\t" | ||
507 | "restore\n\t" | ||
508 | "restore\n\t" | ||
509 | "restore\n\t" | ||
510 | "restore\n\t" | ||
511 | "restore\n\t" | ||
512 | "restore\n\t"); | ||
513 | |||
514 | lock_kernel(); | ||
515 | if (registers[PC] == (unsigned long)breakinst) { | ||
516 | /* Skip over breakpoint trap insn */ | ||
517 | registers[PC] = registers[NPC]; | ||
518 | registers[NPC] += 4; | ||
519 | } | ||
520 | |||
521 | sp = (unsigned long *)registers[SP]; | ||
522 | |||
523 | tt = (registers[TBR] >> 4) & 0xff; | ||
524 | |||
525 | /* reply to host that an exception has occurred */ | ||
526 | sigval = computeSignal(tt); | ||
527 | ptr = remcomOutBuffer; | ||
528 | |||
529 | *ptr++ = 'T'; | ||
530 | *ptr++ = hexchars[sigval >> 4]; | ||
531 | *ptr++ = hexchars[sigval & 0xf]; | ||
532 | |||
533 | *ptr++ = hexchars[PC >> 4]; | ||
534 | *ptr++ = hexchars[PC & 0xf]; | ||
535 | *ptr++ = ':'; | ||
536 | ptr = mem2hex((char *)®isters[PC], ptr, 4); | ||
537 | *ptr++ = ';'; | ||
538 | |||
539 | *ptr++ = hexchars[FP >> 4]; | ||
540 | *ptr++ = hexchars[FP & 0xf]; | ||
541 | *ptr++ = ':'; | ||
542 | ptr = mem2hex((char *) (sp + 8 + 6), ptr, 4); /* FP */ | ||
543 | *ptr++ = ';'; | ||
544 | |||
545 | *ptr++ = hexchars[SP >> 4]; | ||
546 | *ptr++ = hexchars[SP & 0xf]; | ||
547 | *ptr++ = ':'; | ||
548 | ptr = mem2hex((char *)&sp, ptr, 4); | ||
549 | *ptr++ = ';'; | ||
550 | |||
551 | *ptr++ = hexchars[NPC >> 4]; | ||
552 | *ptr++ = hexchars[NPC & 0xf]; | ||
553 | *ptr++ = ':'; | ||
554 | ptr = mem2hex((char *)®isters[NPC], ptr, 4); | ||
555 | *ptr++ = ';'; | ||
556 | |||
557 | *ptr++ = hexchars[O7 >> 4]; | ||
558 | *ptr++ = hexchars[O7 & 0xf]; | ||
559 | *ptr++ = ':'; | ||
560 | ptr = mem2hex((char *)®isters[O7], ptr, 4); | ||
561 | *ptr++ = ';'; | ||
562 | |||
563 | *ptr++ = 0; | ||
564 | |||
565 | putpacket(remcomOutBuffer); | ||
566 | |||
567 | /* XXX We may want to add some features dealing with poking the | ||
568 | * XXX page tables, the real ones on the srmmu, and what is currently | ||
569 | * XXX loaded in the sun4/sun4c tlb at this point in time. But this | ||
570 | * XXX also required hacking to the gdb sources directly... | ||
571 | */ | ||
572 | |||
573 | while (1) { | ||
574 | remcomOutBuffer[0] = 0; | ||
575 | |||
576 | getpacket(remcomInBuffer); | ||
577 | switch (remcomInBuffer[0]) { | ||
578 | case '?': | ||
579 | remcomOutBuffer[0] = 'S'; | ||
580 | remcomOutBuffer[1] = hexchars[sigval >> 4]; | ||
581 | remcomOutBuffer[2] = hexchars[sigval & 0xf]; | ||
582 | remcomOutBuffer[3] = 0; | ||
583 | break; | ||
584 | |||
585 | case 'd': | ||
586 | /* toggle debug flag */ | ||
587 | break; | ||
588 | |||
589 | case 'g': /* return the value of the CPU registers */ | ||
590 | { | ||
591 | ptr = remcomOutBuffer; | ||
592 | /* G & O regs */ | ||
593 | ptr = mem2hex((char *)registers, ptr, 16 * 4); | ||
594 | /* L & I regs */ | ||
595 | ptr = mem2hex((char *) (sp + 0), ptr, 16 * 4); | ||
596 | /* Floating point */ | ||
597 | memset(ptr, '0', 32 * 8); | ||
598 | /* Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR */ | ||
599 | mem2hex((char *)®isters[Y], (ptr + 32 * 4 * 2), (8 * 4)); | ||
600 | } | ||
601 | break; | ||
602 | |||
603 | case 'G': /* set the value of the CPU registers - return OK */ | ||
604 | { | ||
605 | unsigned long *newsp, psr; | ||
606 | |||
607 | psr = registers[PSR]; | ||
608 | |||
609 | ptr = &remcomInBuffer[1]; | ||
610 | /* G & O regs */ | ||
611 | hex2mem(ptr, (char *)registers, 16 * 4); | ||
612 | /* L & I regs */ | ||
613 | hex2mem(ptr + 16 * 4 * 2, (char *) (sp + 0), 16 * 4); | ||
614 | /* Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR */ | ||
615 | hex2mem(ptr + 64 * 4 * 2, (char *)®isters[Y], 8 * 4); | ||
616 | |||
617 | /* See if the stack pointer has moved. If so, | ||
618 | * then copy the saved locals and ins to the | ||
619 | * new location. This keeps the window | ||
620 | * overflow and underflow routines happy. | ||
621 | */ | ||
622 | |||
623 | newsp = (unsigned long *)registers[SP]; | ||
624 | if (sp != newsp) | ||
625 | sp = memcpy(newsp, sp, 16 * 4); | ||
626 | |||
627 | /* Don't allow CWP to be modified. */ | ||
628 | |||
629 | if (psr != registers[PSR]) | ||
630 | registers[PSR] = (psr & 0x1f) | (registers[PSR] & ~0x1f); | ||
631 | |||
632 | strcpy(remcomOutBuffer,"OK"); | ||
633 | } | ||
634 | break; | ||
635 | |||
636 | case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */ | ||
637 | /* Try to read %x,%x. */ | ||
638 | |||
639 | ptr = &remcomInBuffer[1]; | ||
640 | |||
641 | if (hexToInt(&ptr, &addr) | ||
642 | && *ptr++ == ',' | ||
643 | && hexToInt(&ptr, &length)) { | ||
644 | if (mem2hex((char *)addr, remcomOutBuffer, length)) | ||
645 | break; | ||
646 | |||
647 | strcpy (remcomOutBuffer, "E03"); | ||
648 | } else { | ||
649 | strcpy(remcomOutBuffer,"E01"); | ||
650 | } | ||
651 | break; | ||
652 | |||
653 | case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */ | ||
654 | /* Try to read '%x,%x:'. */ | ||
655 | |||
656 | ptr = &remcomInBuffer[1]; | ||
657 | |||
658 | if (hexToInt(&ptr, &addr) | ||
659 | && *ptr++ == ',' | ||
660 | && hexToInt(&ptr, &length) | ||
661 | && *ptr++ == ':') { | ||
662 | if (hex2mem(ptr, (char *)addr, length)) { | ||
663 | strcpy(remcomOutBuffer, "OK"); | ||
664 | } else { | ||
665 | strcpy(remcomOutBuffer, "E03"); | ||
666 | } | ||
667 | } else { | ||
668 | strcpy(remcomOutBuffer, "E02"); | ||
669 | } | ||
670 | break; | ||
671 | |||
672 | case 'c': /* cAA..AA Continue at address AA..AA(optional) */ | ||
673 | /* try to read optional parameter, pc unchanged if no parm */ | ||
674 | |||
675 | ptr = &remcomInBuffer[1]; | ||
676 | if (hexToInt(&ptr, &addr)) { | ||
677 | registers[PC] = addr; | ||
678 | registers[NPC] = addr + 4; | ||
679 | } | ||
680 | |||
681 | /* Need to flush the instruction cache here, as we may have deposited a | ||
682 | * breakpoint, and the icache probably has no way of knowing that a data ref to | ||
683 | * some location may have changed something that is in the instruction cache. | ||
684 | */ | ||
685 | flush_cache_all(); | ||
686 | unlock_kernel(); | ||
687 | return; | ||
688 | |||
689 | /* kill the program */ | ||
690 | case 'k' : /* do nothing */ | ||
691 | break; | ||
692 | case 'r': /* Reset */ | ||
693 | asm ("call 0\n\t" | ||
694 | "nop\n\t"); | ||
695 | break; | ||
696 | } /* switch */ | ||
697 | |||
698 | /* reply to the request */ | ||
699 | putpacket(remcomOutBuffer); | ||
700 | } /* while(1) */ | ||
701 | } | ||
702 | |||
703 | /* This function will generate a breakpoint exception. It is used at the | ||
704 | beginning of a program to sync up with a debugger and can be used | ||
705 | otherwise as a quick means to stop program execution and "break" into | ||
706 | the debugger. */ | ||
707 | |||
708 | void | ||
709 | breakpoint(void) | ||
710 | { | ||
711 | if (!initialized) | ||
712 | return; | ||
713 | |||
714 | /* Again, watch those c-prefixes for ELF kernels */ | ||
715 | #if defined(__svr4__) || defined(__ELF__) | ||
716 | asm(".globl breakinst\n" | ||
717 | "breakinst:\n\t" | ||
718 | "ta 1\n"); | ||
719 | #else | ||
720 | asm(".globl _breakinst\n" | ||
721 | "_breakinst:\n\t" | ||
722 | "ta 1\n"); | ||
723 | #endif | ||
724 | } | ||
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 0bcf98a7ef38..aa8ee06cf488 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -282,3 +282,5 @@ EXPORT_SYMBOL(do_BUG); | |||
282 | 282 | ||
283 | /* Sun Power Management Idle Handler */ | 283 | /* Sun Power Management Idle Handler */ |
284 | EXPORT_SYMBOL(pm_idle); | 284 | EXPORT_SYMBOL(pm_idle); |
285 | |||
286 | EXPORT_SYMBOL(empty_zero_page); | ||
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 0def48158c7d..dfde77ff0848 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -335,37 +335,6 @@ void smp4d_cross_call_irq(void) | |||
335 | ccall_info.processors_out[i] = 1; | 335 | ccall_info.processors_out[i] = 1; |
336 | } | 336 | } |
337 | 337 | ||
338 | static int smp4d_stop_cpu_sender; | ||
339 | |||
340 | static void smp4d_stop_cpu(void) | ||
341 | { | ||
342 | int me = hard_smp4d_processor_id(); | ||
343 | |||
344 | if (me != smp4d_stop_cpu_sender) | ||
345 | while(1) barrier(); | ||
346 | } | ||
347 | |||
348 | /* Cross calls, in order to work efficiently and atomically do all | ||
349 | * the message passing work themselves, only stopcpu and reschedule | ||
350 | * messages come through here. | ||
351 | */ | ||
352 | void smp4d_message_pass(int target, int msg, unsigned long data, int wait) | ||
353 | { | ||
354 | int me = hard_smp4d_processor_id(); | ||
355 | |||
356 | SMP_PRINTK(("smp4d_message_pass %d %d %08lx %d\n", target, msg, data, wait)); | ||
357 | if (msg == MSG_STOP_CPU && target == MSG_ALL_BUT_SELF) { | ||
358 | unsigned long flags; | ||
359 | static DEFINE_SPINLOCK(stop_cpu_lock); | ||
360 | spin_lock_irqsave(&stop_cpu_lock, flags); | ||
361 | smp4d_stop_cpu_sender = me; | ||
362 | smp4d_cross_call((smpfunc_t)smp4d_stop_cpu, 0, 0, 0, 0, 0); | ||
363 | spin_unlock_irqrestore(&stop_cpu_lock, flags); | ||
364 | } | ||
365 | printk("Yeeee, trying to send SMP msg(%d) to %d on cpu %d\n", msg, target, me); | ||
366 | panic("Bogon SMP message pass."); | ||
367 | } | ||
368 | |||
369 | void smp4d_percpu_timer_interrupt(struct pt_regs *regs) | 338 | void smp4d_percpu_timer_interrupt(struct pt_regs *regs) |
370 | { | 339 | { |
371 | struct pt_regs *old_regs; | 340 | struct pt_regs *old_regs; |
@@ -439,7 +408,6 @@ void __init sun4d_init_smp(void) | |||
439 | BTFIXUPSET_BLACKBOX(hard_smp_processor_id, smp4d_blackbox_id); | 408 | BTFIXUPSET_BLACKBOX(hard_smp_processor_id, smp4d_blackbox_id); |
440 | BTFIXUPSET_BLACKBOX(load_current, smp4d_blackbox_current); | 409 | BTFIXUPSET_BLACKBOX(load_current, smp4d_blackbox_current); |
441 | BTFIXUPSET_CALL(smp_cross_call, smp4d_cross_call, BTFIXUPCALL_NORM); | 410 | BTFIXUPSET_CALL(smp_cross_call, smp4d_cross_call, BTFIXUPCALL_NORM); |
442 | BTFIXUPSET_CALL(smp_message_pass, smp4d_message_pass, BTFIXUPCALL_NORM); | ||
443 | BTFIXUPSET_CALL(__hard_smp_processor_id, __smp4d_processor_id, BTFIXUPCALL_NORM); | 411 | BTFIXUPSET_CALL(__hard_smp_processor_id, __smp4d_processor_id, BTFIXUPCALL_NORM); |
444 | 412 | ||
445 | for (i = 0; i < NR_CPUS; i++) { | 413 | for (i = 0; i < NR_CPUS; i++) { |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 0b9407267162..ffb875aacb7e 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -34,8 +34,6 @@ | |||
34 | 34 | ||
35 | #include "irq.h" | 35 | #include "irq.h" |
36 | 36 | ||
37 | #define IRQ_RESCHEDULE 13 | ||
38 | #define IRQ_STOP_CPU 14 | ||
39 | #define IRQ_CROSS_CALL 15 | 37 | #define IRQ_CROSS_CALL 15 |
40 | 38 | ||
41 | extern ctxd_t *srmmu_ctx_table_phys; | 39 | extern ctxd_t *srmmu_ctx_table_phys; |
@@ -232,48 +230,6 @@ void smp4m_irq_rotate(int cpu) | |||
232 | set_irq_udt(next); | 230 | set_irq_udt(next); |
233 | } | 231 | } |
234 | 232 | ||
235 | /* Cross calls, in order to work efficiently and atomically do all | ||
236 | * the message passing work themselves, only stopcpu and reschedule | ||
237 | * messages come through here. | ||
238 | */ | ||
239 | void smp4m_message_pass(int target, int msg, unsigned long data, int wait) | ||
240 | { | ||
241 | static unsigned long smp_cpu_in_msg[NR_CPUS]; | ||
242 | cpumask_t mask; | ||
243 | int me = smp_processor_id(); | ||
244 | int irq, i; | ||
245 | |||
246 | if(msg == MSG_RESCHEDULE) { | ||
247 | irq = IRQ_RESCHEDULE; | ||
248 | |||
249 | if(smp_cpu_in_msg[me]) | ||
250 | return; | ||
251 | } else if(msg == MSG_STOP_CPU) { | ||
252 | irq = IRQ_STOP_CPU; | ||
253 | } else { | ||
254 | goto barf; | ||
255 | } | ||
256 | |||
257 | smp_cpu_in_msg[me]++; | ||
258 | if(target == MSG_ALL_BUT_SELF || target == MSG_ALL) { | ||
259 | mask = cpu_online_map; | ||
260 | if(target == MSG_ALL_BUT_SELF) | ||
261 | cpu_clear(me, mask); | ||
262 | for(i = 0; i < 4; i++) { | ||
263 | if (cpu_isset(i, mask)) | ||
264 | set_cpu_int(i, irq); | ||
265 | } | ||
266 | } else { | ||
267 | set_cpu_int(target, irq); | ||
268 | } | ||
269 | smp_cpu_in_msg[me]--; | ||
270 | |||
271 | return; | ||
272 | barf: | ||
273 | printk("Yeeee, trying to send SMP msg(%d) on cpu %d\n", msg, me); | ||
274 | panic("Bogon SMP message pass."); | ||
275 | } | ||
276 | |||
277 | static struct smp_funcall { | 233 | static struct smp_funcall { |
278 | smpfunc_t func; | 234 | smpfunc_t func; |
279 | unsigned long arg1; | 235 | unsigned long arg1; |
@@ -413,6 +369,5 @@ void __init sun4m_init_smp(void) | |||
413 | BTFIXUPSET_BLACKBOX(hard_smp_processor_id, smp4m_blackbox_id); | 369 | BTFIXUPSET_BLACKBOX(hard_smp_processor_id, smp4m_blackbox_id); |
414 | BTFIXUPSET_BLACKBOX(load_current, smp4m_blackbox_current); | 370 | BTFIXUPSET_BLACKBOX(load_current, smp4m_blackbox_current); |
415 | BTFIXUPSET_CALL(smp_cross_call, smp4m_cross_call, BTFIXUPCALL_NORM); | 371 | BTFIXUPSET_CALL(smp_cross_call, smp4m_cross_call, BTFIXUPCALL_NORM); |
416 | BTFIXUPSET_CALL(smp_message_pass, smp4m_message_pass, BTFIXUPCALL_NORM); | ||
417 | BTFIXUPSET_CALL(__hard_smp_processor_id, __smp4m_processor_id, BTFIXUPCALL_NORM); | 372 | BTFIXUPSET_CALL(__hard_smp_processor_id, __smp4m_processor_id, BTFIXUPCALL_NORM); |
418 | } | 373 | } |
diff --git a/arch/sparc/lib/iomap.c b/arch/sparc/lib/iomap.c index 54501c1ca785..9ef37e13a920 100644 --- a/arch/sparc/lib/iomap.c +++ b/arch/sparc/lib/iomap.c | |||
@@ -21,8 +21,8 @@ EXPORT_SYMBOL(ioport_unmap); | |||
21 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 21 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ |
22 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 22 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
23 | { | 23 | { |
24 | unsigned long start = pci_resource_start(dev, bar); | 24 | resource_size_t start = pci_resource_start(dev, bar); |
25 | unsigned long len = pci_resource_len(dev, bar); | 25 | resource_size_t len = pci_resource_len(dev, bar); |
26 | unsigned long flags = pci_resource_flags(dev, bar); | 26 | unsigned long flags = pci_resource_flags(dev, bar); |
27 | 27 | ||
28 | if (!len || !start) | 28 | if (!len || !start) |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index edbe71e3fab9..eb36f3b746b8 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -13,6 +13,7 @@ config SPARC64 | |||
13 | default y | 13 | default y |
14 | select HAVE_IDE | 14 | select HAVE_IDE |
15 | select HAVE_LMB | 15 | select HAVE_LMB |
16 | select HAVE_ARCH_KGDB | ||
16 | 17 | ||
17 | config GENERIC_TIME | 18 | config GENERIC_TIME |
18 | bool | 19 | bool |
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index 2bd0340b743d..ec4f5ebb1ca6 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile | |||
@@ -29,3 +29,4 @@ obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o | |||
29 | obj-$(CONFIG_AUDIT) += audit.o | 29 | obj-$(CONFIG_AUDIT) += audit.o |
30 | obj-$(CONFIG_AUDIT)$(CONFIG_COMPAT) += compat_audit.o | 30 | obj-$(CONFIG_AUDIT)$(CONFIG_COMPAT) += compat_audit.o |
31 | obj-y += $(obj-yy) | 31 | obj-y += $(obj-yy) |
32 | obj-$(CONFIG_KGDB) += kgdb.o | ||
diff --git a/arch/sparc64/kernel/cherrs.S b/arch/sparc64/kernel/cherrs.S new file mode 100644 index 000000000000..89afebd7eca0 --- /dev/null +++ b/arch/sparc64/kernel/cherrs.S | |||
@@ -0,0 +1,579 @@ | |||
1 | /* These get patched into the trap table at boot time | ||
2 | * once we know we have a cheetah processor. | ||
3 | */ | ||
4 | .globl cheetah_fecc_trap_vector | ||
5 | .type cheetah_fecc_trap_vector,#function | ||
6 | cheetah_fecc_trap_vector: | ||
7 | membar #Sync | ||
8 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
9 | andn %g1, DCU_DC | DCU_IC, %g1 | ||
10 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
11 | membar #Sync | ||
12 | sethi %hi(cheetah_fast_ecc), %g2 | ||
13 | jmpl %g2 + %lo(cheetah_fast_ecc), %g0 | ||
14 | mov 0, %g1 | ||
15 | .size cheetah_fecc_trap_vector,.-cheetah_fecc_trap_vector | ||
16 | |||
17 | .globl cheetah_fecc_trap_vector_tl1 | ||
18 | .type cheetah_fecc_trap_vector_tl1,#function | ||
19 | cheetah_fecc_trap_vector_tl1: | ||
20 | membar #Sync | ||
21 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
22 | andn %g1, DCU_DC | DCU_IC, %g1 | ||
23 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
24 | membar #Sync | ||
25 | sethi %hi(cheetah_fast_ecc), %g2 | ||
26 | jmpl %g2 + %lo(cheetah_fast_ecc), %g0 | ||
27 | mov 1, %g1 | ||
28 | .size cheetah_fecc_trap_vector_tl1,.-cheetah_fecc_trap_vector_tl1 | ||
29 | |||
30 | .globl cheetah_cee_trap_vector | ||
31 | .type cheetah_cee_trap_vector,#function | ||
32 | cheetah_cee_trap_vector: | ||
33 | membar #Sync | ||
34 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
35 | andn %g1, DCU_IC, %g1 | ||
36 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
37 | membar #Sync | ||
38 | sethi %hi(cheetah_cee), %g2 | ||
39 | jmpl %g2 + %lo(cheetah_cee), %g0 | ||
40 | mov 0, %g1 | ||
41 | .size cheetah_cee_trap_vector,.-cheetah_cee_trap_vector | ||
42 | |||
43 | .globl cheetah_cee_trap_vector_tl1 | ||
44 | .type cheetah_cee_trap_vector_tl1,#function | ||
45 | cheetah_cee_trap_vector_tl1: | ||
46 | membar #Sync | ||
47 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
48 | andn %g1, DCU_IC, %g1 | ||
49 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
50 | membar #Sync | ||
51 | sethi %hi(cheetah_cee), %g2 | ||
52 | jmpl %g2 + %lo(cheetah_cee), %g0 | ||
53 | mov 1, %g1 | ||
54 | .size cheetah_cee_trap_vector_tl1,.-cheetah_cee_trap_vector_tl1 | ||
55 | |||
56 | .globl cheetah_deferred_trap_vector | ||
57 | .type cheetah_deferred_trap_vector,#function | ||
58 | cheetah_deferred_trap_vector: | ||
59 | membar #Sync | ||
60 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1; | ||
61 | andn %g1, DCU_DC | DCU_IC, %g1; | ||
62 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG; | ||
63 | membar #Sync; | ||
64 | sethi %hi(cheetah_deferred_trap), %g2 | ||
65 | jmpl %g2 + %lo(cheetah_deferred_trap), %g0 | ||
66 | mov 0, %g1 | ||
67 | .size cheetah_deferred_trap_vector,.-cheetah_deferred_trap_vector | ||
68 | |||
69 | .globl cheetah_deferred_trap_vector_tl1 | ||
70 | .type cheetah_deferred_trap_vector_tl1,#function | ||
71 | cheetah_deferred_trap_vector_tl1: | ||
72 | membar #Sync; | ||
73 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1; | ||
74 | andn %g1, DCU_DC | DCU_IC, %g1; | ||
75 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG; | ||
76 | membar #Sync; | ||
77 | sethi %hi(cheetah_deferred_trap), %g2 | ||
78 | jmpl %g2 + %lo(cheetah_deferred_trap), %g0 | ||
79 | mov 1, %g1 | ||
80 | .size cheetah_deferred_trap_vector_tl1,.-cheetah_deferred_trap_vector_tl1 | ||
81 | |||
82 | /* Cheetah+ specific traps. These are for the new I/D cache parity | ||
83 | * error traps. The first argument to cheetah_plus_parity_handler | ||
84 | * is encoded as follows: | ||
85 | * | ||
86 | * Bit0: 0=dcache,1=icache | ||
87 | * Bit1: 0=recoverable,1=unrecoverable | ||
88 | */ | ||
89 | .globl cheetah_plus_dcpe_trap_vector | ||
90 | .type cheetah_plus_dcpe_trap_vector,#function | ||
91 | cheetah_plus_dcpe_trap_vector: | ||
92 | membar #Sync | ||
93 | sethi %hi(do_cheetah_plus_data_parity), %g7 | ||
94 | jmpl %g7 + %lo(do_cheetah_plus_data_parity), %g0 | ||
95 | nop | ||
96 | nop | ||
97 | nop | ||
98 | nop | ||
99 | nop | ||
100 | .size cheetah_plus_dcpe_trap_vector,.-cheetah_plus_dcpe_trap_vector | ||
101 | |||
102 | .type do_cheetah_plus_data_parity,#function | ||
103 | do_cheetah_plus_data_parity: | ||
104 | rdpr %pil, %g2 | ||
105 | wrpr %g0, 15, %pil | ||
106 | ba,pt %xcc, etrap_irq | ||
107 | rd %pc, %g7 | ||
108 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
109 | call trace_hardirqs_off | ||
110 | nop | ||
111 | #endif | ||
112 | mov 0x0, %o0 | ||
113 | call cheetah_plus_parity_error | ||
114 | add %sp, PTREGS_OFF, %o1 | ||
115 | ba,a,pt %xcc, rtrap_irq | ||
116 | .size do_cheetah_plus_data_parity,.-do_cheetah_plus_data_parity | ||
117 | |||
118 | .globl cheetah_plus_dcpe_trap_vector_tl1 | ||
119 | .type cheetah_plus_dcpe_trap_vector_tl1,#function | ||
120 | cheetah_plus_dcpe_trap_vector_tl1: | ||
121 | membar #Sync | ||
122 | wrpr PSTATE_IG | PSTATE_PEF | PSTATE_PRIV, %pstate | ||
123 | sethi %hi(do_dcpe_tl1), %g3 | ||
124 | jmpl %g3 + %lo(do_dcpe_tl1), %g0 | ||
125 | nop | ||
126 | nop | ||
127 | nop | ||
128 | nop | ||
129 | .size cheetah_plus_dcpe_trap_vector_tl1,.-cheetah_plus_dcpe_trap_vector_tl1 | ||
130 | |||
131 | .globl cheetah_plus_icpe_trap_vector | ||
132 | .type cheetah_plus_icpe_trap_vector,#function | ||
133 | cheetah_plus_icpe_trap_vector: | ||
134 | membar #Sync | ||
135 | sethi %hi(do_cheetah_plus_insn_parity), %g7 | ||
136 | jmpl %g7 + %lo(do_cheetah_plus_insn_parity), %g0 | ||
137 | nop | ||
138 | nop | ||
139 | nop | ||
140 | nop | ||
141 | nop | ||
142 | .size cheetah_plus_icpe_trap_vector,.-cheetah_plus_icpe_trap_vector | ||
143 | |||
144 | .type do_cheetah_plus_insn_parity,#function | ||
145 | do_cheetah_plus_insn_parity: | ||
146 | rdpr %pil, %g2 | ||
147 | wrpr %g0, 15, %pil | ||
148 | ba,pt %xcc, etrap_irq | ||
149 | rd %pc, %g7 | ||
150 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
151 | call trace_hardirqs_off | ||
152 | nop | ||
153 | #endif | ||
154 | mov 0x1, %o0 | ||
155 | call cheetah_plus_parity_error | ||
156 | add %sp, PTREGS_OFF, %o1 | ||
157 | ba,a,pt %xcc, rtrap_irq | ||
158 | .size do_cheetah_plus_insn_parity,.-do_cheetah_plus_insn_parity | ||
159 | |||
160 | .globl cheetah_plus_icpe_trap_vector_tl1 | ||
161 | .type cheetah_plus_icpe_trap_vector_tl1,#function | ||
162 | cheetah_plus_icpe_trap_vector_tl1: | ||
163 | membar #Sync | ||
164 | wrpr PSTATE_IG | PSTATE_PEF | PSTATE_PRIV, %pstate | ||
165 | sethi %hi(do_icpe_tl1), %g3 | ||
166 | jmpl %g3 + %lo(do_icpe_tl1), %g0 | ||
167 | nop | ||
168 | nop | ||
169 | nop | ||
170 | nop | ||
171 | .size cheetah_plus_icpe_trap_vector_tl1,.-cheetah_plus_icpe_trap_vector_tl1 | ||
172 | |||
173 | /* If we take one of these traps when tl >= 1, then we | ||
174 | * jump to interrupt globals. If some trap level above us | ||
175 | * was also using interrupt globals, we cannot recover. | ||
176 | * We may use all interrupt global registers except %g6. | ||
177 | */ | ||
178 | .globl do_dcpe_tl1 | ||
179 | .type do_dcpe_tl1,#function | ||
180 | do_dcpe_tl1: | ||
181 | rdpr %tl, %g1 ! Save original trap level | ||
182 | mov 1, %g2 ! Setup TSTATE checking loop | ||
183 | sethi %hi(TSTATE_IG), %g3 ! TSTATE mask bit | ||
184 | 1: wrpr %g2, %tl ! Set trap level to check | ||
185 | rdpr %tstate, %g4 ! Read TSTATE for this level | ||
186 | andcc %g4, %g3, %g0 ! Interrupt globals in use? | ||
187 | bne,a,pn %xcc, do_dcpe_tl1_fatal ! Yep, irrecoverable | ||
188 | wrpr %g1, %tl ! Restore original trap level | ||
189 | add %g2, 1, %g2 ! Next trap level | ||
190 | cmp %g2, %g1 ! Hit them all yet? | ||
191 | ble,pt %icc, 1b ! Not yet | ||
192 | nop | ||
193 | wrpr %g1, %tl ! Restore original trap level | ||
194 | do_dcpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ | ||
195 | sethi %hi(dcache_parity_tl1_occurred), %g2 | ||
196 | lduw [%g2 + %lo(dcache_parity_tl1_occurred)], %g1 | ||
197 | add %g1, 1, %g1 | ||
198 | stw %g1, [%g2 + %lo(dcache_parity_tl1_occurred)] | ||
199 | /* Reset D-cache parity */ | ||
200 | sethi %hi(1 << 16), %g1 ! D-cache size | ||
201 | mov (1 << 5), %g2 ! D-cache line size | ||
202 | sub %g1, %g2, %g1 ! Move down 1 cacheline | ||
203 | 1: srl %g1, 14, %g3 ! Compute UTAG | ||
204 | membar #Sync | ||
205 | stxa %g3, [%g1] ASI_DCACHE_UTAG | ||
206 | membar #Sync | ||
207 | sub %g2, 8, %g3 ! 64-bit data word within line | ||
208 | 2: membar #Sync | ||
209 | stxa %g0, [%g1 + %g3] ASI_DCACHE_DATA | ||
210 | membar #Sync | ||
211 | subcc %g3, 8, %g3 ! Next 64-bit data word | ||
212 | bge,pt %icc, 2b | ||
213 | nop | ||
214 | subcc %g1, %g2, %g1 ! Next cacheline | ||
215 | bge,pt %icc, 1b | ||
216 | nop | ||
217 | ba,pt %xcc, dcpe_icpe_tl1_common | ||
218 | nop | ||
219 | |||
220 | do_dcpe_tl1_fatal: | ||
221 | sethi %hi(1f), %g7 | ||
222 | ba,pt %xcc, etraptl1 | ||
223 | 1: or %g7, %lo(1b), %g7 | ||
224 | mov 0x2, %o0 | ||
225 | call cheetah_plus_parity_error | ||
226 | add %sp, PTREGS_OFF, %o1 | ||
227 | ba,pt %xcc, rtrap | ||
228 | nop | ||
229 | .size do_dcpe_tl1,.-do_dcpe_tl1 | ||
230 | |||
231 | .globl do_icpe_tl1 | ||
232 | .type do_icpe_tl1,#function | ||
233 | do_icpe_tl1: | ||
234 | rdpr %tl, %g1 ! Save original trap level | ||
235 | mov 1, %g2 ! Setup TSTATE checking loop | ||
236 | sethi %hi(TSTATE_IG), %g3 ! TSTATE mask bit | ||
237 | 1: wrpr %g2, %tl ! Set trap level to check | ||
238 | rdpr %tstate, %g4 ! Read TSTATE for this level | ||
239 | andcc %g4, %g3, %g0 ! Interrupt globals in use? | ||
240 | bne,a,pn %xcc, do_icpe_tl1_fatal ! Yep, irrecoverable | ||
241 | wrpr %g1, %tl ! Restore original trap level | ||
242 | add %g2, 1, %g2 ! Next trap level | ||
243 | cmp %g2, %g1 ! Hit them all yet? | ||
244 | ble,pt %icc, 1b ! Not yet | ||
245 | nop | ||
246 | wrpr %g1, %tl ! Restore original trap level | ||
247 | do_icpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ | ||
248 | sethi %hi(icache_parity_tl1_occurred), %g2 | ||
249 | lduw [%g2 + %lo(icache_parity_tl1_occurred)], %g1 | ||
250 | add %g1, 1, %g1 | ||
251 | stw %g1, [%g2 + %lo(icache_parity_tl1_occurred)] | ||
252 | /* Flush I-cache */ | ||
253 | sethi %hi(1 << 15), %g1 ! I-cache size | ||
254 | mov (1 << 5), %g2 ! I-cache line size | ||
255 | sub %g1, %g2, %g1 | ||
256 | 1: or %g1, (2 << 3), %g3 | ||
257 | stxa %g0, [%g3] ASI_IC_TAG | ||
258 | membar #Sync | ||
259 | subcc %g1, %g2, %g1 | ||
260 | bge,pt %icc, 1b | ||
261 | nop | ||
262 | ba,pt %xcc, dcpe_icpe_tl1_common | ||
263 | nop | ||
264 | |||
265 | do_icpe_tl1_fatal: | ||
266 | sethi %hi(1f), %g7 | ||
267 | ba,pt %xcc, etraptl1 | ||
268 | 1: or %g7, %lo(1b), %g7 | ||
269 | mov 0x3, %o0 | ||
270 | call cheetah_plus_parity_error | ||
271 | add %sp, PTREGS_OFF, %o1 | ||
272 | ba,pt %xcc, rtrap | ||
273 | nop | ||
274 | .size do_icpe_tl1,.-do_icpe_tl1 | ||
275 | |||
276 | .type dcpe_icpe_tl1_common,#function | ||
277 | dcpe_icpe_tl1_common: | ||
278 | /* Flush D-cache, re-enable D/I caches in DCU and finally | ||
279 | * retry the trapping instruction. | ||
280 | */ | ||
281 | sethi %hi(1 << 16), %g1 ! D-cache size | ||
282 | mov (1 << 5), %g2 ! D-cache line size | ||
283 | sub %g1, %g2, %g1 | ||
284 | 1: stxa %g0, [%g1] ASI_DCACHE_TAG | ||
285 | membar #Sync | ||
286 | subcc %g1, %g2, %g1 | ||
287 | bge,pt %icc, 1b | ||
288 | nop | ||
289 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
290 | or %g1, (DCU_DC | DCU_IC), %g1 | ||
291 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
292 | membar #Sync | ||
293 | retry | ||
294 | .size dcpe_icpe_tl1_common,.-dcpe_icpe_tl1_common | ||
295 | |||
296 | /* Capture I/D/E-cache state into per-cpu error scoreboard. | ||
297 | * | ||
298 | * %g1: (TL>=0) ? 1 : 0 | ||
299 | * %g2: scratch | ||
300 | * %g3: scratch | ||
301 | * %g4: AFSR | ||
302 | * %g5: AFAR | ||
303 | * %g6: unused, will have current thread ptr after etrap | ||
304 | * %g7: scratch | ||
305 | */ | ||
306 | .type __cheetah_log_error,#function | ||
307 | __cheetah_log_error: | ||
308 | /* Put "TL1" software bit into AFSR. */ | ||
309 | and %g1, 0x1, %g1 | ||
310 | sllx %g1, 63, %g2 | ||
311 | or %g4, %g2, %g4 | ||
312 | |||
313 | /* Get log entry pointer for this cpu at this trap level. */ | ||
314 | BRANCH_IF_JALAPENO(g2,g3,50f) | ||
315 | ldxa [%g0] ASI_SAFARI_CONFIG, %g2 | ||
316 | srlx %g2, 17, %g2 | ||
317 | ba,pt %xcc, 60f | ||
318 | and %g2, 0x3ff, %g2 | ||
319 | |||
320 | 50: ldxa [%g0] ASI_JBUS_CONFIG, %g2 | ||
321 | srlx %g2, 17, %g2 | ||
322 | and %g2, 0x1f, %g2 | ||
323 | |||
324 | 60: sllx %g2, 9, %g2 | ||
325 | sethi %hi(cheetah_error_log), %g3 | ||
326 | ldx [%g3 + %lo(cheetah_error_log)], %g3 | ||
327 | brz,pn %g3, 80f | ||
328 | nop | ||
329 | |||
330 | add %g3, %g2, %g3 | ||
331 | sllx %g1, 8, %g1 | ||
332 | add %g3, %g1, %g1 | ||
333 | |||
334 | /* %g1 holds pointer to the top of the logging scoreboard */ | ||
335 | ldx [%g1 + 0x0], %g7 | ||
336 | cmp %g7, -1 | ||
337 | bne,pn %xcc, 80f | ||
338 | nop | ||
339 | |||
340 | stx %g4, [%g1 + 0x0] | ||
341 | stx %g5, [%g1 + 0x8] | ||
342 | add %g1, 0x10, %g1 | ||
343 | |||
344 | /* %g1 now points to D-cache logging area */ | ||
345 | set 0x3ff8, %g2 /* DC_addr mask */ | ||
346 | and %g5, %g2, %g2 /* DC_addr bits of AFAR */ | ||
347 | srlx %g5, 12, %g3 | ||
348 | or %g3, 1, %g3 /* PHYS tag + valid */ | ||
349 | |||
350 | 10: ldxa [%g2] ASI_DCACHE_TAG, %g7 | ||
351 | cmp %g3, %g7 /* TAG match? */ | ||
352 | bne,pt %xcc, 13f | ||
353 | nop | ||
354 | |||
355 | /* Yep, what we want, capture state. */ | ||
356 | stx %g2, [%g1 + 0x20] | ||
357 | stx %g7, [%g1 + 0x28] | ||
358 | |||
359 | /* A membar Sync is required before and after utag access. */ | ||
360 | membar #Sync | ||
361 | ldxa [%g2] ASI_DCACHE_UTAG, %g7 | ||
362 | membar #Sync | ||
363 | stx %g7, [%g1 + 0x30] | ||
364 | ldxa [%g2] ASI_DCACHE_SNOOP_TAG, %g7 | ||
365 | stx %g7, [%g1 + 0x38] | ||
366 | clr %g3 | ||
367 | |||
368 | 12: ldxa [%g2 + %g3] ASI_DCACHE_DATA, %g7 | ||
369 | stx %g7, [%g1] | ||
370 | add %g3, (1 << 5), %g3 | ||
371 | cmp %g3, (4 << 5) | ||
372 | bl,pt %xcc, 12b | ||
373 | add %g1, 0x8, %g1 | ||
374 | |||
375 | ba,pt %xcc, 20f | ||
376 | add %g1, 0x20, %g1 | ||
377 | |||
378 | 13: sethi %hi(1 << 14), %g7 | ||
379 | add %g2, %g7, %g2 | ||
380 | srlx %g2, 14, %g7 | ||
381 | cmp %g7, 4 | ||
382 | bl,pt %xcc, 10b | ||
383 | nop | ||
384 | |||
385 | add %g1, 0x40, %g1 | ||
386 | |||
387 | /* %g1 now points to I-cache logging area */ | ||
388 | 20: set 0x1fe0, %g2 /* IC_addr mask */ | ||
389 | and %g5, %g2, %g2 /* IC_addr bits of AFAR */ | ||
390 | sllx %g2, 1, %g2 /* IC_addr[13:6]==VA[12:5] */ | ||
391 | srlx %g5, (13 - 8), %g3 /* Make PTAG */ | ||
392 | andn %g3, 0xff, %g3 /* Mask off undefined bits */ | ||
393 | |||
394 | 21: ldxa [%g2] ASI_IC_TAG, %g7 | ||
395 | andn %g7, 0xff, %g7 | ||
396 | cmp %g3, %g7 | ||
397 | bne,pt %xcc, 23f | ||
398 | nop | ||
399 | |||
400 | /* Yep, what we want, capture state. */ | ||
401 | stx %g2, [%g1 + 0x40] | ||
402 | stx %g7, [%g1 + 0x48] | ||
403 | add %g2, (1 << 3), %g2 | ||
404 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
405 | add %g2, (1 << 3), %g2 | ||
406 | stx %g7, [%g1 + 0x50] | ||
407 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
408 | add %g2, (1 << 3), %g2 | ||
409 | stx %g7, [%g1 + 0x60] | ||
410 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
411 | stx %g7, [%g1 + 0x68] | ||
412 | sub %g2, (3 << 3), %g2 | ||
413 | ldxa [%g2] ASI_IC_STAG, %g7 | ||
414 | stx %g7, [%g1 + 0x58] | ||
415 | clr %g3 | ||
416 | srlx %g2, 2, %g2 | ||
417 | |||
418 | 22: ldxa [%g2 + %g3] ASI_IC_INSTR, %g7 | ||
419 | stx %g7, [%g1] | ||
420 | add %g3, (1 << 3), %g3 | ||
421 | cmp %g3, (8 << 3) | ||
422 | bl,pt %xcc, 22b | ||
423 | add %g1, 0x8, %g1 | ||
424 | |||
425 | ba,pt %xcc, 30f | ||
426 | add %g1, 0x30, %g1 | ||
427 | |||
428 | 23: sethi %hi(1 << 14), %g7 | ||
429 | add %g2, %g7, %g2 | ||
430 | srlx %g2, 14, %g7 | ||
431 | cmp %g7, 4 | ||
432 | bl,pt %xcc, 21b | ||
433 | nop | ||
434 | |||
435 | add %g1, 0x70, %g1 | ||
436 | |||
437 | /* %g1 now points to E-cache logging area */ | ||
438 | 30: andn %g5, (32 - 1), %g2 | ||
439 | stx %g2, [%g1 + 0x20] | ||
440 | ldxa [%g2] ASI_EC_TAG_DATA, %g7 | ||
441 | stx %g7, [%g1 + 0x28] | ||
442 | ldxa [%g2] ASI_EC_R, %g0 | ||
443 | clr %g3 | ||
444 | |||
445 | 31: ldxa [%g3] ASI_EC_DATA, %g7 | ||
446 | stx %g7, [%g1 + %g3] | ||
447 | add %g3, 0x8, %g3 | ||
448 | cmp %g3, 0x20 | ||
449 | |||
450 | bl,pt %xcc, 31b | ||
451 | nop | ||
452 | 80: | ||
453 | rdpr %tt, %g2 | ||
454 | cmp %g2, 0x70 | ||
455 | be c_fast_ecc | ||
456 | cmp %g2, 0x63 | ||
457 | be c_cee | ||
458 | nop | ||
459 | ba,pt %xcc, c_deferred | ||
460 | .size __cheetah_log_error,.-__cheetah_log_error | ||
461 | |||
462 | /* Cheetah FECC trap handling, we get here from tl{0,1}_fecc | ||
463 | * in the trap table. That code has done a memory barrier | ||
464 | * and has disabled both the I-cache and D-cache in the DCU | ||
465 | * control register. The I-cache is disabled so that we may | ||
466 | * capture the corrupted cache line, and the D-cache is disabled | ||
467 | * because corrupt data may have been placed there and we don't | ||
468 | * want to reference it. | ||
469 | * | ||
470 | * %g1 is one if this trap occurred at %tl >= 1. | ||
471 | * | ||
472 | * Next, we turn off error reporting so that we don't recurse. | ||
473 | */ | ||
474 | .globl cheetah_fast_ecc | ||
475 | .type cheetah_fast_ecc,#function | ||
476 | cheetah_fast_ecc: | ||
477 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g2 | ||
478 | andn %g2, ESTATE_ERROR_NCEEN | ESTATE_ERROR_CEEN, %g2 | ||
479 | stxa %g2, [%g0] ASI_ESTATE_ERROR_EN | ||
480 | membar #Sync | ||
481 | |||
482 | /* Fetch and clear AFSR/AFAR */ | ||
483 | ldxa [%g0] ASI_AFSR, %g4 | ||
484 | ldxa [%g0] ASI_AFAR, %g5 | ||
485 | stxa %g4, [%g0] ASI_AFSR | ||
486 | membar #Sync | ||
487 | |||
488 | ba,pt %xcc, __cheetah_log_error | ||
489 | nop | ||
490 | .size cheetah_fast_ecc,.-cheetah_fast_ecc | ||
491 | |||
492 | .type c_fast_ecc,#function | ||
493 | c_fast_ecc: | ||
494 | rdpr %pil, %g2 | ||
495 | wrpr %g0, 15, %pil | ||
496 | ba,pt %xcc, etrap_irq | ||
497 | rd %pc, %g7 | ||
498 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
499 | call trace_hardirqs_off | ||
500 | nop | ||
501 | #endif | ||
502 | mov %l4, %o1 | ||
503 | mov %l5, %o2 | ||
504 | call cheetah_fecc_handler | ||
505 | add %sp, PTREGS_OFF, %o0 | ||
506 | ba,a,pt %xcc, rtrap_irq | ||
507 | .size c_fast_ecc,.-c_fast_ecc | ||
508 | |||
509 | /* Our caller has disabled I-cache and performed membar Sync. */ | ||
510 | .globl cheetah_cee | ||
511 | .type cheetah_cee,#function | ||
512 | cheetah_cee: | ||
513 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g2 | ||
514 | andn %g2, ESTATE_ERROR_CEEN, %g2 | ||
515 | stxa %g2, [%g0] ASI_ESTATE_ERROR_EN | ||
516 | membar #Sync | ||
517 | |||
518 | /* Fetch and clear AFSR/AFAR */ | ||
519 | ldxa [%g0] ASI_AFSR, %g4 | ||
520 | ldxa [%g0] ASI_AFAR, %g5 | ||
521 | stxa %g4, [%g0] ASI_AFSR | ||
522 | membar #Sync | ||
523 | |||
524 | ba,pt %xcc, __cheetah_log_error | ||
525 | nop | ||
526 | .size cheetah_cee,.-cheetah_cee | ||
527 | |||
528 | .type c_cee,#function | ||
529 | c_cee: | ||
530 | rdpr %pil, %g2 | ||
531 | wrpr %g0, 15, %pil | ||
532 | ba,pt %xcc, etrap_irq | ||
533 | rd %pc, %g7 | ||
534 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
535 | call trace_hardirqs_off | ||
536 | nop | ||
537 | #endif | ||
538 | mov %l4, %o1 | ||
539 | mov %l5, %o2 | ||
540 | call cheetah_cee_handler | ||
541 | add %sp, PTREGS_OFF, %o0 | ||
542 | ba,a,pt %xcc, rtrap_irq | ||
543 | .size c_cee,.-c_cee | ||
544 | |||
545 | /* Our caller has disabled I-cache+D-cache and performed membar Sync. */ | ||
546 | .globl cheetah_deferred_trap | ||
547 | .type cheetah_deferred_trap,#function | ||
548 | cheetah_deferred_trap: | ||
549 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g2 | ||
550 | andn %g2, ESTATE_ERROR_NCEEN | ESTATE_ERROR_CEEN, %g2 | ||
551 | stxa %g2, [%g0] ASI_ESTATE_ERROR_EN | ||
552 | membar #Sync | ||
553 | |||
554 | /* Fetch and clear AFSR/AFAR */ | ||
555 | ldxa [%g0] ASI_AFSR, %g4 | ||
556 | ldxa [%g0] ASI_AFAR, %g5 | ||
557 | stxa %g4, [%g0] ASI_AFSR | ||
558 | membar #Sync | ||
559 | |||
560 | ba,pt %xcc, __cheetah_log_error | ||
561 | nop | ||
562 | .size cheetah_deferred_trap,.-cheetah_deferred_trap | ||
563 | |||
564 | .type c_deferred,#function | ||
565 | c_deferred: | ||
566 | rdpr %pil, %g2 | ||
567 | wrpr %g0, 15, %pil | ||
568 | ba,pt %xcc, etrap_irq | ||
569 | rd %pc, %g7 | ||
570 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
571 | call trace_hardirqs_off | ||
572 | nop | ||
573 | #endif | ||
574 | mov %l4, %o1 | ||
575 | mov %l5, %o2 | ||
576 | call cheetah_deferred_handler | ||
577 | add %sp, PTREGS_OFF, %o0 | ||
578 | ba,a,pt %xcc, rtrap_irq | ||
579 | .size c_deferred,.-c_deferred | ||
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S deleted file mode 100644 index fd06e937ae1e..000000000000 --- a/arch/sparc64/kernel/entry.S +++ /dev/null | |||
@@ -1,2575 +0,0 @@ | |||
1 | /* $Id: entry.S,v 1.144 2002/02/09 19:49:30 davem Exp $ | ||
2 | * arch/sparc64/kernel/entry.S: Sparc64 trap low-level entry points. | ||
3 | * | ||
4 | * Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu) | ||
5 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) | ||
6 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | ||
7 | * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | ||
8 | */ | ||
9 | |||
10 | #include <linux/errno.h> | ||
11 | |||
12 | #include <asm/head.h> | ||
13 | #include <asm/asi.h> | ||
14 | #include <asm/smp.h> | ||
15 | #include <asm/ptrace.h> | ||
16 | #include <asm/page.h> | ||
17 | #include <asm/signal.h> | ||
18 | #include <asm/pgtable.h> | ||
19 | #include <asm/processor.h> | ||
20 | #include <asm/visasm.h> | ||
21 | #include <asm/estate.h> | ||
22 | #include <asm/auxio.h> | ||
23 | #include <asm/sfafsr.h> | ||
24 | #include <asm/pil.h> | ||
25 | #include <asm/unistd.h> | ||
26 | |||
27 | #define curptr g6 | ||
28 | |||
29 | .text | ||
30 | .align 32 | ||
31 | |||
32 | /* This is trivial with the new code... */ | ||
33 | .globl do_fpdis | ||
34 | do_fpdis: | ||
35 | sethi %hi(TSTATE_PEF), %g4 | ||
36 | rdpr %tstate, %g5 | ||
37 | andcc %g5, %g4, %g0 | ||
38 | be,pt %xcc, 1f | ||
39 | nop | ||
40 | rd %fprs, %g5 | ||
41 | andcc %g5, FPRS_FEF, %g0 | ||
42 | be,pt %xcc, 1f | ||
43 | nop | ||
44 | |||
45 | /* Legal state when DCR_IFPOE is set in Cheetah %dcr. */ | ||
46 | sethi %hi(109f), %g7 | ||
47 | ba,pt %xcc, etrap | ||
48 | 109: or %g7, %lo(109b), %g7 | ||
49 | add %g0, %g0, %g0 | ||
50 | ba,a,pt %xcc, rtrap | ||
51 | |||
52 | 1: TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
53 | ldub [%g6 + TI_FPSAVED], %g5 | ||
54 | wr %g0, FPRS_FEF, %fprs | ||
55 | andcc %g5, FPRS_FEF, %g0 | ||
56 | be,a,pt %icc, 1f | ||
57 | clr %g7 | ||
58 | ldx [%g6 + TI_GSR], %g7 | ||
59 | 1: andcc %g5, FPRS_DL, %g0 | ||
60 | bne,pn %icc, 2f | ||
61 | fzero %f0 | ||
62 | andcc %g5, FPRS_DU, %g0 | ||
63 | bne,pn %icc, 1f | ||
64 | fzero %f2 | ||
65 | faddd %f0, %f2, %f4 | ||
66 | fmuld %f0, %f2, %f6 | ||
67 | faddd %f0, %f2, %f8 | ||
68 | fmuld %f0, %f2, %f10 | ||
69 | faddd %f0, %f2, %f12 | ||
70 | fmuld %f0, %f2, %f14 | ||
71 | faddd %f0, %f2, %f16 | ||
72 | fmuld %f0, %f2, %f18 | ||
73 | faddd %f0, %f2, %f20 | ||
74 | fmuld %f0, %f2, %f22 | ||
75 | faddd %f0, %f2, %f24 | ||
76 | fmuld %f0, %f2, %f26 | ||
77 | faddd %f0, %f2, %f28 | ||
78 | fmuld %f0, %f2, %f30 | ||
79 | faddd %f0, %f2, %f32 | ||
80 | fmuld %f0, %f2, %f34 | ||
81 | faddd %f0, %f2, %f36 | ||
82 | fmuld %f0, %f2, %f38 | ||
83 | faddd %f0, %f2, %f40 | ||
84 | fmuld %f0, %f2, %f42 | ||
85 | faddd %f0, %f2, %f44 | ||
86 | fmuld %f0, %f2, %f46 | ||
87 | faddd %f0, %f2, %f48 | ||
88 | fmuld %f0, %f2, %f50 | ||
89 | faddd %f0, %f2, %f52 | ||
90 | fmuld %f0, %f2, %f54 | ||
91 | faddd %f0, %f2, %f56 | ||
92 | fmuld %f0, %f2, %f58 | ||
93 | b,pt %xcc, fpdis_exit2 | ||
94 | faddd %f0, %f2, %f60 | ||
95 | 1: mov SECONDARY_CONTEXT, %g3 | ||
96 | add %g6, TI_FPREGS + 0x80, %g1 | ||
97 | faddd %f0, %f2, %f4 | ||
98 | fmuld %f0, %f2, %f6 | ||
99 | |||
100 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
101 | .section .sun4v_1insn_patch, "ax" | ||
102 | .word 661b | ||
103 | ldxa [%g3] ASI_MMU, %g5 | ||
104 | .previous | ||
105 | |||
106 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
107 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
108 | |||
109 | 661: stxa %g2, [%g3] ASI_DMMU | ||
110 | .section .sun4v_1insn_patch, "ax" | ||
111 | .word 661b | ||
112 | stxa %g2, [%g3] ASI_MMU | ||
113 | .previous | ||
114 | |||
115 | membar #Sync | ||
116 | add %g6, TI_FPREGS + 0xc0, %g2 | ||
117 | faddd %f0, %f2, %f8 | ||
118 | fmuld %f0, %f2, %f10 | ||
119 | membar #Sync | ||
120 | ldda [%g1] ASI_BLK_S, %f32 | ||
121 | ldda [%g2] ASI_BLK_S, %f48 | ||
122 | membar #Sync | ||
123 | faddd %f0, %f2, %f12 | ||
124 | fmuld %f0, %f2, %f14 | ||
125 | faddd %f0, %f2, %f16 | ||
126 | fmuld %f0, %f2, %f18 | ||
127 | faddd %f0, %f2, %f20 | ||
128 | fmuld %f0, %f2, %f22 | ||
129 | faddd %f0, %f2, %f24 | ||
130 | fmuld %f0, %f2, %f26 | ||
131 | faddd %f0, %f2, %f28 | ||
132 | fmuld %f0, %f2, %f30 | ||
133 | b,pt %xcc, fpdis_exit | ||
134 | nop | ||
135 | 2: andcc %g5, FPRS_DU, %g0 | ||
136 | bne,pt %icc, 3f | ||
137 | fzero %f32 | ||
138 | mov SECONDARY_CONTEXT, %g3 | ||
139 | fzero %f34 | ||
140 | |||
141 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
142 | .section .sun4v_1insn_patch, "ax" | ||
143 | .word 661b | ||
144 | ldxa [%g3] ASI_MMU, %g5 | ||
145 | .previous | ||
146 | |||
147 | add %g6, TI_FPREGS, %g1 | ||
148 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
149 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
150 | |||
151 | 661: stxa %g2, [%g3] ASI_DMMU | ||
152 | .section .sun4v_1insn_patch, "ax" | ||
153 | .word 661b | ||
154 | stxa %g2, [%g3] ASI_MMU | ||
155 | .previous | ||
156 | |||
157 | membar #Sync | ||
158 | add %g6, TI_FPREGS + 0x40, %g2 | ||
159 | faddd %f32, %f34, %f36 | ||
160 | fmuld %f32, %f34, %f38 | ||
161 | membar #Sync | ||
162 | ldda [%g1] ASI_BLK_S, %f0 | ||
163 | ldda [%g2] ASI_BLK_S, %f16 | ||
164 | membar #Sync | ||
165 | faddd %f32, %f34, %f40 | ||
166 | fmuld %f32, %f34, %f42 | ||
167 | faddd %f32, %f34, %f44 | ||
168 | fmuld %f32, %f34, %f46 | ||
169 | faddd %f32, %f34, %f48 | ||
170 | fmuld %f32, %f34, %f50 | ||
171 | faddd %f32, %f34, %f52 | ||
172 | fmuld %f32, %f34, %f54 | ||
173 | faddd %f32, %f34, %f56 | ||
174 | fmuld %f32, %f34, %f58 | ||
175 | faddd %f32, %f34, %f60 | ||
176 | fmuld %f32, %f34, %f62 | ||
177 | ba,pt %xcc, fpdis_exit | ||
178 | nop | ||
179 | 3: mov SECONDARY_CONTEXT, %g3 | ||
180 | add %g6, TI_FPREGS, %g1 | ||
181 | |||
182 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
183 | .section .sun4v_1insn_patch, "ax" | ||
184 | .word 661b | ||
185 | ldxa [%g3] ASI_MMU, %g5 | ||
186 | .previous | ||
187 | |||
188 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
189 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
190 | |||
191 | 661: stxa %g2, [%g3] ASI_DMMU | ||
192 | .section .sun4v_1insn_patch, "ax" | ||
193 | .word 661b | ||
194 | stxa %g2, [%g3] ASI_MMU | ||
195 | .previous | ||
196 | |||
197 | membar #Sync | ||
198 | mov 0x40, %g2 | ||
199 | membar #Sync | ||
200 | ldda [%g1] ASI_BLK_S, %f0 | ||
201 | ldda [%g1 + %g2] ASI_BLK_S, %f16 | ||
202 | add %g1, 0x80, %g1 | ||
203 | ldda [%g1] ASI_BLK_S, %f32 | ||
204 | ldda [%g1 + %g2] ASI_BLK_S, %f48 | ||
205 | membar #Sync | ||
206 | fpdis_exit: | ||
207 | |||
208 | 661: stxa %g5, [%g3] ASI_DMMU | ||
209 | .section .sun4v_1insn_patch, "ax" | ||
210 | .word 661b | ||
211 | stxa %g5, [%g3] ASI_MMU | ||
212 | .previous | ||
213 | |||
214 | membar #Sync | ||
215 | fpdis_exit2: | ||
216 | wr %g7, 0, %gsr | ||
217 | ldx [%g6 + TI_XFSR], %fsr | ||
218 | rdpr %tstate, %g3 | ||
219 | or %g3, %g4, %g3 ! anal... | ||
220 | wrpr %g3, %tstate | ||
221 | wr %g0, FPRS_FEF, %fprs ! clean DU/DL bits | ||
222 | retry | ||
223 | |||
224 | .align 32 | ||
225 | fp_other_bounce: | ||
226 | call do_fpother | ||
227 | add %sp, PTREGS_OFF, %o0 | ||
228 | ba,pt %xcc, rtrap | ||
229 | nop | ||
230 | |||
231 | .globl do_fpother_check_fitos | ||
232 | .align 32 | ||
233 | do_fpother_check_fitos: | ||
234 | TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
235 | sethi %hi(fp_other_bounce - 4), %g7 | ||
236 | or %g7, %lo(fp_other_bounce - 4), %g7 | ||
237 | |||
238 | /* NOTE: Need to preserve %g7 until we fully commit | ||
239 | * to the fitos fixup. | ||
240 | */ | ||
241 | stx %fsr, [%g6 + TI_XFSR] | ||
242 | rdpr %tstate, %g3 | ||
243 | andcc %g3, TSTATE_PRIV, %g0 | ||
244 | bne,pn %xcc, do_fptrap_after_fsr | ||
245 | nop | ||
246 | ldx [%g6 + TI_XFSR], %g3 | ||
247 | srlx %g3, 14, %g1 | ||
248 | and %g1, 7, %g1 | ||
249 | cmp %g1, 2 ! Unfinished FP-OP | ||
250 | bne,pn %xcc, do_fptrap_after_fsr | ||
251 | sethi %hi(1 << 23), %g1 ! Inexact | ||
252 | andcc %g3, %g1, %g0 | ||
253 | bne,pn %xcc, do_fptrap_after_fsr | ||
254 | rdpr %tpc, %g1 | ||
255 | lduwa [%g1] ASI_AIUP, %g3 ! This cannot ever fail | ||
256 | #define FITOS_MASK 0xc1f83fe0 | ||
257 | #define FITOS_COMPARE 0x81a01880 | ||
258 | sethi %hi(FITOS_MASK), %g1 | ||
259 | or %g1, %lo(FITOS_MASK), %g1 | ||
260 | and %g3, %g1, %g1 | ||
261 | sethi %hi(FITOS_COMPARE), %g2 | ||
262 | or %g2, %lo(FITOS_COMPARE), %g2 | ||
263 | cmp %g1, %g2 | ||
264 | bne,pn %xcc, do_fptrap_after_fsr | ||
265 | nop | ||
266 | std %f62, [%g6 + TI_FPREGS + (62 * 4)] | ||
267 | sethi %hi(fitos_table_1), %g1 | ||
268 | and %g3, 0x1f, %g2 | ||
269 | or %g1, %lo(fitos_table_1), %g1 | ||
270 | sllx %g2, 2, %g2 | ||
271 | jmpl %g1 + %g2, %g0 | ||
272 | ba,pt %xcc, fitos_emul_continue | ||
273 | |||
274 | fitos_table_1: | ||
275 | fitod %f0, %f62 | ||
276 | fitod %f1, %f62 | ||
277 | fitod %f2, %f62 | ||
278 | fitod %f3, %f62 | ||
279 | fitod %f4, %f62 | ||
280 | fitod %f5, %f62 | ||
281 | fitod %f6, %f62 | ||
282 | fitod %f7, %f62 | ||
283 | fitod %f8, %f62 | ||
284 | fitod %f9, %f62 | ||
285 | fitod %f10, %f62 | ||
286 | fitod %f11, %f62 | ||
287 | fitod %f12, %f62 | ||
288 | fitod %f13, %f62 | ||
289 | fitod %f14, %f62 | ||
290 | fitod %f15, %f62 | ||
291 | fitod %f16, %f62 | ||
292 | fitod %f17, %f62 | ||
293 | fitod %f18, %f62 | ||
294 | fitod %f19, %f62 | ||
295 | fitod %f20, %f62 | ||
296 | fitod %f21, %f62 | ||
297 | fitod %f22, %f62 | ||
298 | fitod %f23, %f62 | ||
299 | fitod %f24, %f62 | ||
300 | fitod %f25, %f62 | ||
301 | fitod %f26, %f62 | ||
302 | fitod %f27, %f62 | ||
303 | fitod %f28, %f62 | ||
304 | fitod %f29, %f62 | ||
305 | fitod %f30, %f62 | ||
306 | fitod %f31, %f62 | ||
307 | |||
308 | fitos_emul_continue: | ||
309 | sethi %hi(fitos_table_2), %g1 | ||
310 | srl %g3, 25, %g2 | ||
311 | or %g1, %lo(fitos_table_2), %g1 | ||
312 | and %g2, 0x1f, %g2 | ||
313 | sllx %g2, 2, %g2 | ||
314 | jmpl %g1 + %g2, %g0 | ||
315 | ba,pt %xcc, fitos_emul_fini | ||
316 | |||
317 | fitos_table_2: | ||
318 | fdtos %f62, %f0 | ||
319 | fdtos %f62, %f1 | ||
320 | fdtos %f62, %f2 | ||
321 | fdtos %f62, %f3 | ||
322 | fdtos %f62, %f4 | ||
323 | fdtos %f62, %f5 | ||
324 | fdtos %f62, %f6 | ||
325 | fdtos %f62, %f7 | ||
326 | fdtos %f62, %f8 | ||
327 | fdtos %f62, %f9 | ||
328 | fdtos %f62, %f10 | ||
329 | fdtos %f62, %f11 | ||
330 | fdtos %f62, %f12 | ||
331 | fdtos %f62, %f13 | ||
332 | fdtos %f62, %f14 | ||
333 | fdtos %f62, %f15 | ||
334 | fdtos %f62, %f16 | ||
335 | fdtos %f62, %f17 | ||
336 | fdtos %f62, %f18 | ||
337 | fdtos %f62, %f19 | ||
338 | fdtos %f62, %f20 | ||
339 | fdtos %f62, %f21 | ||
340 | fdtos %f62, %f22 | ||
341 | fdtos %f62, %f23 | ||
342 | fdtos %f62, %f24 | ||
343 | fdtos %f62, %f25 | ||
344 | fdtos %f62, %f26 | ||
345 | fdtos %f62, %f27 | ||
346 | fdtos %f62, %f28 | ||
347 | fdtos %f62, %f29 | ||
348 | fdtos %f62, %f30 | ||
349 | fdtos %f62, %f31 | ||
350 | |||
351 | fitos_emul_fini: | ||
352 | ldd [%g6 + TI_FPREGS + (62 * 4)], %f62 | ||
353 | done | ||
354 | |||
355 | .globl do_fptrap | ||
356 | .align 32 | ||
357 | do_fptrap: | ||
358 | TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
359 | stx %fsr, [%g6 + TI_XFSR] | ||
360 | do_fptrap_after_fsr: | ||
361 | ldub [%g6 + TI_FPSAVED], %g3 | ||
362 | rd %fprs, %g1 | ||
363 | or %g3, %g1, %g3 | ||
364 | stb %g3, [%g6 + TI_FPSAVED] | ||
365 | rd %gsr, %g3 | ||
366 | stx %g3, [%g6 + TI_GSR] | ||
367 | mov SECONDARY_CONTEXT, %g3 | ||
368 | |||
369 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
370 | .section .sun4v_1insn_patch, "ax" | ||
371 | .word 661b | ||
372 | ldxa [%g3] ASI_MMU, %g5 | ||
373 | .previous | ||
374 | |||
375 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
376 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
377 | |||
378 | 661: stxa %g2, [%g3] ASI_DMMU | ||
379 | .section .sun4v_1insn_patch, "ax" | ||
380 | .word 661b | ||
381 | stxa %g2, [%g3] ASI_MMU | ||
382 | .previous | ||
383 | |||
384 | membar #Sync | ||
385 | add %g6, TI_FPREGS, %g2 | ||
386 | andcc %g1, FPRS_DL, %g0 | ||
387 | be,pn %icc, 4f | ||
388 | mov 0x40, %g3 | ||
389 | stda %f0, [%g2] ASI_BLK_S | ||
390 | stda %f16, [%g2 + %g3] ASI_BLK_S | ||
391 | andcc %g1, FPRS_DU, %g0 | ||
392 | be,pn %icc, 5f | ||
393 | 4: add %g2, 128, %g2 | ||
394 | stda %f32, [%g2] ASI_BLK_S | ||
395 | stda %f48, [%g2 + %g3] ASI_BLK_S | ||
396 | 5: mov SECONDARY_CONTEXT, %g1 | ||
397 | membar #Sync | ||
398 | |||
399 | 661: stxa %g5, [%g1] ASI_DMMU | ||
400 | .section .sun4v_1insn_patch, "ax" | ||
401 | .word 661b | ||
402 | stxa %g5, [%g1] ASI_MMU | ||
403 | .previous | ||
404 | |||
405 | membar #Sync | ||
406 | ba,pt %xcc, etrap | ||
407 | wr %g0, 0, %fprs | ||
408 | |||
409 | /* The registers for cross calls will be: | ||
410 | * | ||
411 | * DATA 0: [low 32-bits] Address of function to call, jmp to this | ||
412 | * [high 32-bits] MMU Context Argument 0, place in %g5 | ||
413 | * DATA 1: Address Argument 1, place in %g1 | ||
414 | * DATA 2: Address Argument 2, place in %g7 | ||
415 | * | ||
416 | * With this method we can do most of the cross-call tlb/cache | ||
417 | * flushing very quickly. | ||
418 | */ | ||
419 | .text | ||
420 | .align 32 | ||
421 | .globl do_ivec | ||
422 | do_ivec: | ||
423 | mov 0x40, %g3 | ||
424 | ldxa [%g3 + %g0] ASI_INTR_R, %g3 | ||
425 | sethi %hi(KERNBASE), %g4 | ||
426 | cmp %g3, %g4 | ||
427 | bgeu,pn %xcc, do_ivec_xcall | ||
428 | srlx %g3, 32, %g5 | ||
429 | stxa %g0, [%g0] ASI_INTR_RECEIVE | ||
430 | membar #Sync | ||
431 | |||
432 | sethi %hi(ivector_table_pa), %g2 | ||
433 | ldx [%g2 + %lo(ivector_table_pa)], %g2 | ||
434 | sllx %g3, 4, %g3 | ||
435 | add %g2, %g3, %g3 | ||
436 | |||
437 | TRAP_LOAD_IRQ_WORK_PA(%g6, %g1) | ||
438 | |||
439 | ldx [%g6], %g5 | ||
440 | stxa %g5, [%g3] ASI_PHYS_USE_EC | ||
441 | stx %g3, [%g6] | ||
442 | wr %g0, 1 << PIL_DEVICE_IRQ, %set_softint | ||
443 | retry | ||
444 | do_ivec_xcall: | ||
445 | mov 0x50, %g1 | ||
446 | ldxa [%g1 + %g0] ASI_INTR_R, %g1 | ||
447 | srl %g3, 0, %g3 | ||
448 | |||
449 | mov 0x60, %g7 | ||
450 | ldxa [%g7 + %g0] ASI_INTR_R, %g7 | ||
451 | stxa %g0, [%g0] ASI_INTR_RECEIVE | ||
452 | membar #Sync | ||
453 | ba,pt %xcc, 1f | ||
454 | nop | ||
455 | |||
456 | .align 32 | ||
457 | 1: jmpl %g3, %g0 | ||
458 | nop | ||
459 | |||
460 | .globl getcc, setcc | ||
461 | getcc: | ||
462 | ldx [%o0 + PT_V9_TSTATE], %o1 | ||
463 | srlx %o1, 32, %o1 | ||
464 | and %o1, 0xf, %o1 | ||
465 | retl | ||
466 | stx %o1, [%o0 + PT_V9_G1] | ||
467 | setcc: | ||
468 | ldx [%o0 + PT_V9_TSTATE], %o1 | ||
469 | ldx [%o0 + PT_V9_G1], %o2 | ||
470 | or %g0, %ulo(TSTATE_ICC), %o3 | ||
471 | sllx %o3, 32, %o3 | ||
472 | andn %o1, %o3, %o1 | ||
473 | sllx %o2, 32, %o2 | ||
474 | and %o2, %o3, %o2 | ||
475 | or %o1, %o2, %o1 | ||
476 | retl | ||
477 | stx %o1, [%o0 + PT_V9_TSTATE] | ||
478 | |||
479 | .globl utrap_trap | ||
480 | utrap_trap: /* %g3=handler,%g4=level */ | ||
481 | TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
482 | ldx [%g6 + TI_UTRAPS], %g1 | ||
483 | brnz,pt %g1, invoke_utrap | ||
484 | nop | ||
485 | |||
486 | ba,pt %xcc, etrap | ||
487 | rd %pc, %g7 | ||
488 | mov %l4, %o1 | ||
489 | call bad_trap | ||
490 | add %sp, PTREGS_OFF, %o0 | ||
491 | ba,pt %xcc, rtrap | ||
492 | nop | ||
493 | |||
494 | invoke_utrap: | ||
495 | sllx %g3, 3, %g3 | ||
496 | ldx [%g1 + %g3], %g1 | ||
497 | save %sp, -128, %sp | ||
498 | rdpr %tstate, %l6 | ||
499 | rdpr %cwp, %l7 | ||
500 | andn %l6, TSTATE_CWP, %l6 | ||
501 | wrpr %l6, %l7, %tstate | ||
502 | rdpr %tpc, %l6 | ||
503 | rdpr %tnpc, %l7 | ||
504 | wrpr %g1, 0, %tnpc | ||
505 | done | ||
506 | |||
507 | /* We need to carefully read the error status, ACK | ||
508 | * the errors, prevent recursive traps, and pass the | ||
509 | * information on to C code for logging. | ||
510 | * | ||
511 | * We pass the AFAR in as-is, and we encode the status | ||
512 | * information as described in asm-sparc64/sfafsr.h | ||
513 | */ | ||
514 | .globl __spitfire_access_error | ||
515 | __spitfire_access_error: | ||
516 | /* Disable ESTATE error reporting so that we do not | ||
517 | * take recursive traps and RED state the processor. | ||
518 | */ | ||
519 | stxa %g0, [%g0] ASI_ESTATE_ERROR_EN | ||
520 | membar #Sync | ||
521 | |||
522 | mov UDBE_UE, %g1 | ||
523 | ldxa [%g0] ASI_AFSR, %g4 ! Get AFSR | ||
524 | |||
525 | /* __spitfire_cee_trap branches here with AFSR in %g4 and | ||
526 | * UDBE_CE in %g1. It only clears ESTATE_ERR_CE in the | ||
527 | * ESTATE Error Enable register. | ||
528 | */ | ||
529 | __spitfire_cee_trap_continue: | ||
530 | ldxa [%g0] ASI_AFAR, %g5 ! Get AFAR | ||
531 | |||
532 | rdpr %tt, %g3 | ||
533 | and %g3, 0x1ff, %g3 ! Paranoia | ||
534 | sllx %g3, SFSTAT_TRAP_TYPE_SHIFT, %g3 | ||
535 | or %g4, %g3, %g4 | ||
536 | rdpr %tl, %g3 | ||
537 | cmp %g3, 1 | ||
538 | mov 1, %g3 | ||
539 | bleu %xcc, 1f | ||
540 | sllx %g3, SFSTAT_TL_GT_ONE_SHIFT, %g3 | ||
541 | |||
542 | or %g4, %g3, %g4 | ||
543 | |||
544 | /* Read in the UDB error register state, clearing the | ||
545 | * sticky error bits as-needed. We only clear them if | ||
546 | * the UE bit is set. Likewise, __spitfire_cee_trap | ||
547 | * below will only do so if the CE bit is set. | ||
548 | * | ||
549 | * NOTE: UltraSparc-I/II have high and low UDB error | ||
550 | * registers, corresponding to the two UDB units | ||
551 | * present on those chips. UltraSparc-IIi only | ||
552 | * has a single UDB, called "SDB" in the manual. | ||
553 | * For IIi the upper UDB register always reads | ||
554 | * as zero so for our purposes things will just | ||
555 | * work with the checks below. | ||
556 | */ | ||
557 | 1: ldxa [%g0] ASI_UDBH_ERROR_R, %g3 | ||
558 | and %g3, 0x3ff, %g7 ! Paranoia | ||
559 | sllx %g7, SFSTAT_UDBH_SHIFT, %g7 | ||
560 | or %g4, %g7, %g4 | ||
561 | andcc %g3, %g1, %g3 ! UDBE_UE or UDBE_CE | ||
562 | be,pn %xcc, 1f | ||
563 | nop | ||
564 | stxa %g3, [%g0] ASI_UDB_ERROR_W | ||
565 | membar #Sync | ||
566 | |||
567 | 1: mov 0x18, %g3 | ||
568 | ldxa [%g3] ASI_UDBL_ERROR_R, %g3 | ||
569 | and %g3, 0x3ff, %g7 ! Paranoia | ||
570 | sllx %g7, SFSTAT_UDBL_SHIFT, %g7 | ||
571 | or %g4, %g7, %g4 | ||
572 | andcc %g3, %g1, %g3 ! UDBE_UE or UDBE_CE | ||
573 | be,pn %xcc, 1f | ||
574 | nop | ||
575 | mov 0x18, %g7 | ||
576 | stxa %g3, [%g7] ASI_UDB_ERROR_W | ||
577 | membar #Sync | ||
578 | |||
579 | 1: /* Ok, now that we've latched the error state, | ||
580 | * clear the sticky bits in the AFSR. | ||
581 | */ | ||
582 | stxa %g4, [%g0] ASI_AFSR | ||
583 | membar #Sync | ||
584 | |||
585 | rdpr %tl, %g2 | ||
586 | cmp %g2, 1 | ||
587 | rdpr %pil, %g2 | ||
588 | bleu,pt %xcc, 1f | ||
589 | wrpr %g0, 15, %pil | ||
590 | |||
591 | ba,pt %xcc, etraptl1 | ||
592 | rd %pc, %g7 | ||
593 | |||
594 | ba,pt %xcc, 2f | ||
595 | nop | ||
596 | |||
597 | 1: ba,pt %xcc, etrap_irq | ||
598 | rd %pc, %g7 | ||
599 | |||
600 | 2: | ||
601 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
602 | call trace_hardirqs_off | ||
603 | nop | ||
604 | #endif | ||
605 | mov %l4, %o1 | ||
606 | mov %l5, %o2 | ||
607 | call spitfire_access_error | ||
608 | add %sp, PTREGS_OFF, %o0 | ||
609 | ba,pt %xcc, rtrap | ||
610 | nop | ||
611 | |||
612 | /* This is the trap handler entry point for ECC correctable | ||
613 | * errors. They are corrected, but we listen for the trap | ||
614 | * so that the event can be logged. | ||
615 | * | ||
616 | * Disrupting errors are either: | ||
617 | * 1) single-bit ECC errors during UDB reads to system | ||
618 | * memory | ||
619 | * 2) data parity errors during write-back events | ||
620 | * | ||
621 | * As far as I can make out from the manual, the CEE trap | ||
622 | * is only for correctable errors during memory read | ||
623 | * accesses by the front-end of the processor. | ||
624 | * | ||
625 | * The code below is only for trap level 1 CEE events, | ||
626 | * as it is the only situation where we can safely record | ||
627 | * and log. For trap level >1 we just clear the CE bit | ||
628 | * in the AFSR and return. | ||
629 | * | ||
630 | * This is just like __spiftire_access_error above, but it | ||
631 | * specifically handles correctable errors. If an | ||
632 | * uncorrectable error is indicated in the AFSR we | ||
633 | * will branch directly above to __spitfire_access_error | ||
634 | * to handle it instead. Uncorrectable therefore takes | ||
635 | * priority over correctable, and the error logging | ||
636 | * C code will notice this case by inspecting the | ||
637 | * trap type. | ||
638 | */ | ||
639 | .globl __spitfire_cee_trap | ||
640 | __spitfire_cee_trap: | ||
641 | ldxa [%g0] ASI_AFSR, %g4 ! Get AFSR | ||
642 | mov 1, %g3 | ||
643 | sllx %g3, SFAFSR_UE_SHIFT, %g3 | ||
644 | andcc %g4, %g3, %g0 ! Check for UE | ||
645 | bne,pn %xcc, __spitfire_access_error | ||
646 | nop | ||
647 | |||
648 | /* Ok, in this case we only have a correctable error. | ||
649 | * Indicate we only wish to capture that state in register | ||
650 | * %g1, and we only disable CE error reporting unlike UE | ||
651 | * handling which disables all errors. | ||
652 | */ | ||
653 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g3 | ||
654 | andn %g3, ESTATE_ERR_CE, %g3 | ||
655 | stxa %g3, [%g0] ASI_ESTATE_ERROR_EN | ||
656 | membar #Sync | ||
657 | |||
658 | /* Preserve AFSR in %g4, indicate UDB state to capture in %g1 */ | ||
659 | ba,pt %xcc, __spitfire_cee_trap_continue | ||
660 | mov UDBE_CE, %g1 | ||
661 | |||
662 | .globl __spitfire_data_access_exception | ||
663 | .globl __spitfire_data_access_exception_tl1 | ||
664 | __spitfire_data_access_exception_tl1: | ||
665 | rdpr %pstate, %g4 | ||
666 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
667 | mov TLB_SFSR, %g3 | ||
668 | mov DMMU_SFAR, %g5 | ||
669 | ldxa [%g3] ASI_DMMU, %g4 ! Get SFSR | ||
670 | ldxa [%g5] ASI_DMMU, %g5 ! Get SFAR | ||
671 | stxa %g0, [%g3] ASI_DMMU ! Clear SFSR.FaultValid bit | ||
672 | membar #Sync | ||
673 | rdpr %tt, %g3 | ||
674 | cmp %g3, 0x80 ! first win spill/fill trap | ||
675 | blu,pn %xcc, 1f | ||
676 | cmp %g3, 0xff ! last win spill/fill trap | ||
677 | bgu,pn %xcc, 1f | ||
678 | nop | ||
679 | ba,pt %xcc, winfix_dax | ||
680 | rdpr %tpc, %g3 | ||
681 | 1: sethi %hi(109f), %g7 | ||
682 | ba,pt %xcc, etraptl1 | ||
683 | 109: or %g7, %lo(109b), %g7 | ||
684 | mov %l4, %o1 | ||
685 | mov %l5, %o2 | ||
686 | call spitfire_data_access_exception_tl1 | ||
687 | add %sp, PTREGS_OFF, %o0 | ||
688 | ba,pt %xcc, rtrap | ||
689 | nop | ||
690 | |||
691 | __spitfire_data_access_exception: | ||
692 | rdpr %pstate, %g4 | ||
693 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
694 | mov TLB_SFSR, %g3 | ||
695 | mov DMMU_SFAR, %g5 | ||
696 | ldxa [%g3] ASI_DMMU, %g4 ! Get SFSR | ||
697 | ldxa [%g5] ASI_DMMU, %g5 ! Get SFAR | ||
698 | stxa %g0, [%g3] ASI_DMMU ! Clear SFSR.FaultValid bit | ||
699 | membar #Sync | ||
700 | sethi %hi(109f), %g7 | ||
701 | ba,pt %xcc, etrap | ||
702 | 109: or %g7, %lo(109b), %g7 | ||
703 | mov %l4, %o1 | ||
704 | mov %l5, %o2 | ||
705 | call spitfire_data_access_exception | ||
706 | add %sp, PTREGS_OFF, %o0 | ||
707 | ba,pt %xcc, rtrap | ||
708 | nop | ||
709 | |||
710 | .globl __spitfire_insn_access_exception | ||
711 | .globl __spitfire_insn_access_exception_tl1 | ||
712 | __spitfire_insn_access_exception_tl1: | ||
713 | rdpr %pstate, %g4 | ||
714 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
715 | mov TLB_SFSR, %g3 | ||
716 | ldxa [%g3] ASI_IMMU, %g4 ! Get SFSR | ||
717 | rdpr %tpc, %g5 ! IMMU has no SFAR, use TPC | ||
718 | stxa %g0, [%g3] ASI_IMMU ! Clear FaultValid bit | ||
719 | membar #Sync | ||
720 | sethi %hi(109f), %g7 | ||
721 | ba,pt %xcc, etraptl1 | ||
722 | 109: or %g7, %lo(109b), %g7 | ||
723 | mov %l4, %o1 | ||
724 | mov %l5, %o2 | ||
725 | call spitfire_insn_access_exception_tl1 | ||
726 | add %sp, PTREGS_OFF, %o0 | ||
727 | ba,pt %xcc, rtrap | ||
728 | nop | ||
729 | |||
730 | __spitfire_insn_access_exception: | ||
731 | rdpr %pstate, %g4 | ||
732 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
733 | mov TLB_SFSR, %g3 | ||
734 | ldxa [%g3] ASI_IMMU, %g4 ! Get SFSR | ||
735 | rdpr %tpc, %g5 ! IMMU has no SFAR, use TPC | ||
736 | stxa %g0, [%g3] ASI_IMMU ! Clear FaultValid bit | ||
737 | membar #Sync | ||
738 | sethi %hi(109f), %g7 | ||
739 | ba,pt %xcc, etrap | ||
740 | 109: or %g7, %lo(109b), %g7 | ||
741 | mov %l4, %o1 | ||
742 | mov %l5, %o2 | ||
743 | call spitfire_insn_access_exception | ||
744 | add %sp, PTREGS_OFF, %o0 | ||
745 | ba,pt %xcc, rtrap | ||
746 | nop | ||
747 | |||
748 | /* These get patched into the trap table at boot time | ||
749 | * once we know we have a cheetah processor. | ||
750 | */ | ||
751 | .globl cheetah_fecc_trap_vector, cheetah_fecc_trap_vector_tl1 | ||
752 | cheetah_fecc_trap_vector: | ||
753 | membar #Sync | ||
754 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
755 | andn %g1, DCU_DC | DCU_IC, %g1 | ||
756 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
757 | membar #Sync | ||
758 | sethi %hi(cheetah_fast_ecc), %g2 | ||
759 | jmpl %g2 + %lo(cheetah_fast_ecc), %g0 | ||
760 | mov 0, %g1 | ||
761 | cheetah_fecc_trap_vector_tl1: | ||
762 | membar #Sync | ||
763 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
764 | andn %g1, DCU_DC | DCU_IC, %g1 | ||
765 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
766 | membar #Sync | ||
767 | sethi %hi(cheetah_fast_ecc), %g2 | ||
768 | jmpl %g2 + %lo(cheetah_fast_ecc), %g0 | ||
769 | mov 1, %g1 | ||
770 | .globl cheetah_cee_trap_vector, cheetah_cee_trap_vector_tl1 | ||
771 | cheetah_cee_trap_vector: | ||
772 | membar #Sync | ||
773 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
774 | andn %g1, DCU_IC, %g1 | ||
775 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
776 | membar #Sync | ||
777 | sethi %hi(cheetah_cee), %g2 | ||
778 | jmpl %g2 + %lo(cheetah_cee), %g0 | ||
779 | mov 0, %g1 | ||
780 | cheetah_cee_trap_vector_tl1: | ||
781 | membar #Sync | ||
782 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
783 | andn %g1, DCU_IC, %g1 | ||
784 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
785 | membar #Sync | ||
786 | sethi %hi(cheetah_cee), %g2 | ||
787 | jmpl %g2 + %lo(cheetah_cee), %g0 | ||
788 | mov 1, %g1 | ||
789 | .globl cheetah_deferred_trap_vector, cheetah_deferred_trap_vector_tl1 | ||
790 | cheetah_deferred_trap_vector: | ||
791 | membar #Sync | ||
792 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1; | ||
793 | andn %g1, DCU_DC | DCU_IC, %g1; | ||
794 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG; | ||
795 | membar #Sync; | ||
796 | sethi %hi(cheetah_deferred_trap), %g2 | ||
797 | jmpl %g2 + %lo(cheetah_deferred_trap), %g0 | ||
798 | mov 0, %g1 | ||
799 | cheetah_deferred_trap_vector_tl1: | ||
800 | membar #Sync; | ||
801 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1; | ||
802 | andn %g1, DCU_DC | DCU_IC, %g1; | ||
803 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG; | ||
804 | membar #Sync; | ||
805 | sethi %hi(cheetah_deferred_trap), %g2 | ||
806 | jmpl %g2 + %lo(cheetah_deferred_trap), %g0 | ||
807 | mov 1, %g1 | ||
808 | |||
809 | /* Cheetah+ specific traps. These are for the new I/D cache parity | ||
810 | * error traps. The first argument to cheetah_plus_parity_handler | ||
811 | * is encoded as follows: | ||
812 | * | ||
813 | * Bit0: 0=dcache,1=icache | ||
814 | * Bit1: 0=recoverable,1=unrecoverable | ||
815 | */ | ||
816 | .globl cheetah_plus_dcpe_trap_vector, cheetah_plus_dcpe_trap_vector_tl1 | ||
817 | cheetah_plus_dcpe_trap_vector: | ||
818 | membar #Sync | ||
819 | sethi %hi(do_cheetah_plus_data_parity), %g7 | ||
820 | jmpl %g7 + %lo(do_cheetah_plus_data_parity), %g0 | ||
821 | nop | ||
822 | nop | ||
823 | nop | ||
824 | nop | ||
825 | nop | ||
826 | |||
827 | do_cheetah_plus_data_parity: | ||
828 | rdpr %pil, %g2 | ||
829 | wrpr %g0, 15, %pil | ||
830 | ba,pt %xcc, etrap_irq | ||
831 | rd %pc, %g7 | ||
832 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
833 | call trace_hardirqs_off | ||
834 | nop | ||
835 | #endif | ||
836 | mov 0x0, %o0 | ||
837 | call cheetah_plus_parity_error | ||
838 | add %sp, PTREGS_OFF, %o1 | ||
839 | ba,a,pt %xcc, rtrap_irq | ||
840 | |||
841 | cheetah_plus_dcpe_trap_vector_tl1: | ||
842 | membar #Sync | ||
843 | wrpr PSTATE_IG | PSTATE_PEF | PSTATE_PRIV, %pstate | ||
844 | sethi %hi(do_dcpe_tl1), %g3 | ||
845 | jmpl %g3 + %lo(do_dcpe_tl1), %g0 | ||
846 | nop | ||
847 | nop | ||
848 | nop | ||
849 | nop | ||
850 | |||
851 | .globl cheetah_plus_icpe_trap_vector, cheetah_plus_icpe_trap_vector_tl1 | ||
852 | cheetah_plus_icpe_trap_vector: | ||
853 | membar #Sync | ||
854 | sethi %hi(do_cheetah_plus_insn_parity), %g7 | ||
855 | jmpl %g7 + %lo(do_cheetah_plus_insn_parity), %g0 | ||
856 | nop | ||
857 | nop | ||
858 | nop | ||
859 | nop | ||
860 | nop | ||
861 | |||
862 | do_cheetah_plus_insn_parity: | ||
863 | rdpr %pil, %g2 | ||
864 | wrpr %g0, 15, %pil | ||
865 | ba,pt %xcc, etrap_irq | ||
866 | rd %pc, %g7 | ||
867 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
868 | call trace_hardirqs_off | ||
869 | nop | ||
870 | #endif | ||
871 | mov 0x1, %o0 | ||
872 | call cheetah_plus_parity_error | ||
873 | add %sp, PTREGS_OFF, %o1 | ||
874 | ba,a,pt %xcc, rtrap_irq | ||
875 | |||
876 | cheetah_plus_icpe_trap_vector_tl1: | ||
877 | membar #Sync | ||
878 | wrpr PSTATE_IG | PSTATE_PEF | PSTATE_PRIV, %pstate | ||
879 | sethi %hi(do_icpe_tl1), %g3 | ||
880 | jmpl %g3 + %lo(do_icpe_tl1), %g0 | ||
881 | nop | ||
882 | nop | ||
883 | nop | ||
884 | nop | ||
885 | |||
886 | /* If we take one of these traps when tl >= 1, then we | ||
887 | * jump to interrupt globals. If some trap level above us | ||
888 | * was also using interrupt globals, we cannot recover. | ||
889 | * We may use all interrupt global registers except %g6. | ||
890 | */ | ||
891 | .globl do_dcpe_tl1, do_icpe_tl1 | ||
892 | do_dcpe_tl1: | ||
893 | rdpr %tl, %g1 ! Save original trap level | ||
894 | mov 1, %g2 ! Setup TSTATE checking loop | ||
895 | sethi %hi(TSTATE_IG), %g3 ! TSTATE mask bit | ||
896 | 1: wrpr %g2, %tl ! Set trap level to check | ||
897 | rdpr %tstate, %g4 ! Read TSTATE for this level | ||
898 | andcc %g4, %g3, %g0 ! Interrupt globals in use? | ||
899 | bne,a,pn %xcc, do_dcpe_tl1_fatal ! Yep, irrecoverable | ||
900 | wrpr %g1, %tl ! Restore original trap level | ||
901 | add %g2, 1, %g2 ! Next trap level | ||
902 | cmp %g2, %g1 ! Hit them all yet? | ||
903 | ble,pt %icc, 1b ! Not yet | ||
904 | nop | ||
905 | wrpr %g1, %tl ! Restore original trap level | ||
906 | do_dcpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ | ||
907 | sethi %hi(dcache_parity_tl1_occurred), %g2 | ||
908 | lduw [%g2 + %lo(dcache_parity_tl1_occurred)], %g1 | ||
909 | add %g1, 1, %g1 | ||
910 | stw %g1, [%g2 + %lo(dcache_parity_tl1_occurred)] | ||
911 | /* Reset D-cache parity */ | ||
912 | sethi %hi(1 << 16), %g1 ! D-cache size | ||
913 | mov (1 << 5), %g2 ! D-cache line size | ||
914 | sub %g1, %g2, %g1 ! Move down 1 cacheline | ||
915 | 1: srl %g1, 14, %g3 ! Compute UTAG | ||
916 | membar #Sync | ||
917 | stxa %g3, [%g1] ASI_DCACHE_UTAG | ||
918 | membar #Sync | ||
919 | sub %g2, 8, %g3 ! 64-bit data word within line | ||
920 | 2: membar #Sync | ||
921 | stxa %g0, [%g1 + %g3] ASI_DCACHE_DATA | ||
922 | membar #Sync | ||
923 | subcc %g3, 8, %g3 ! Next 64-bit data word | ||
924 | bge,pt %icc, 2b | ||
925 | nop | ||
926 | subcc %g1, %g2, %g1 ! Next cacheline | ||
927 | bge,pt %icc, 1b | ||
928 | nop | ||
929 | ba,pt %xcc, dcpe_icpe_tl1_common | ||
930 | nop | ||
931 | |||
932 | do_dcpe_tl1_fatal: | ||
933 | sethi %hi(1f), %g7 | ||
934 | ba,pt %xcc, etraptl1 | ||
935 | 1: or %g7, %lo(1b), %g7 | ||
936 | mov 0x2, %o0 | ||
937 | call cheetah_plus_parity_error | ||
938 | add %sp, PTREGS_OFF, %o1 | ||
939 | ba,pt %xcc, rtrap | ||
940 | nop | ||
941 | |||
942 | do_icpe_tl1: | ||
943 | rdpr %tl, %g1 ! Save original trap level | ||
944 | mov 1, %g2 ! Setup TSTATE checking loop | ||
945 | sethi %hi(TSTATE_IG), %g3 ! TSTATE mask bit | ||
946 | 1: wrpr %g2, %tl ! Set trap level to check | ||
947 | rdpr %tstate, %g4 ! Read TSTATE for this level | ||
948 | andcc %g4, %g3, %g0 ! Interrupt globals in use? | ||
949 | bne,a,pn %xcc, do_icpe_tl1_fatal ! Yep, irrecoverable | ||
950 | wrpr %g1, %tl ! Restore original trap level | ||
951 | add %g2, 1, %g2 ! Next trap level | ||
952 | cmp %g2, %g1 ! Hit them all yet? | ||
953 | ble,pt %icc, 1b ! Not yet | ||
954 | nop | ||
955 | wrpr %g1, %tl ! Restore original trap level | ||
956 | do_icpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ | ||
957 | sethi %hi(icache_parity_tl1_occurred), %g2 | ||
958 | lduw [%g2 + %lo(icache_parity_tl1_occurred)], %g1 | ||
959 | add %g1, 1, %g1 | ||
960 | stw %g1, [%g2 + %lo(icache_parity_tl1_occurred)] | ||
961 | /* Flush I-cache */ | ||
962 | sethi %hi(1 << 15), %g1 ! I-cache size | ||
963 | mov (1 << 5), %g2 ! I-cache line size | ||
964 | sub %g1, %g2, %g1 | ||
965 | 1: or %g1, (2 << 3), %g3 | ||
966 | stxa %g0, [%g3] ASI_IC_TAG | ||
967 | membar #Sync | ||
968 | subcc %g1, %g2, %g1 | ||
969 | bge,pt %icc, 1b | ||
970 | nop | ||
971 | ba,pt %xcc, dcpe_icpe_tl1_common | ||
972 | nop | ||
973 | |||
974 | do_icpe_tl1_fatal: | ||
975 | sethi %hi(1f), %g7 | ||
976 | ba,pt %xcc, etraptl1 | ||
977 | 1: or %g7, %lo(1b), %g7 | ||
978 | mov 0x3, %o0 | ||
979 | call cheetah_plus_parity_error | ||
980 | add %sp, PTREGS_OFF, %o1 | ||
981 | ba,pt %xcc, rtrap | ||
982 | nop | ||
983 | |||
984 | dcpe_icpe_tl1_common: | ||
985 | /* Flush D-cache, re-enable D/I caches in DCU and finally | ||
986 | * retry the trapping instruction. | ||
987 | */ | ||
988 | sethi %hi(1 << 16), %g1 ! D-cache size | ||
989 | mov (1 << 5), %g2 ! D-cache line size | ||
990 | sub %g1, %g2, %g1 | ||
991 | 1: stxa %g0, [%g1] ASI_DCACHE_TAG | ||
992 | membar #Sync | ||
993 | subcc %g1, %g2, %g1 | ||
994 | bge,pt %icc, 1b | ||
995 | nop | ||
996 | ldxa [%g0] ASI_DCU_CONTROL_REG, %g1 | ||
997 | or %g1, (DCU_DC | DCU_IC), %g1 | ||
998 | stxa %g1, [%g0] ASI_DCU_CONTROL_REG | ||
999 | membar #Sync | ||
1000 | retry | ||
1001 | |||
1002 | /* Capture I/D/E-cache state into per-cpu error scoreboard. | ||
1003 | * | ||
1004 | * %g1: (TL>=0) ? 1 : 0 | ||
1005 | * %g2: scratch | ||
1006 | * %g3: scratch | ||
1007 | * %g4: AFSR | ||
1008 | * %g5: AFAR | ||
1009 | * %g6: unused, will have current thread ptr after etrap | ||
1010 | * %g7: scratch | ||
1011 | */ | ||
1012 | __cheetah_log_error: | ||
1013 | /* Put "TL1" software bit into AFSR. */ | ||
1014 | and %g1, 0x1, %g1 | ||
1015 | sllx %g1, 63, %g2 | ||
1016 | or %g4, %g2, %g4 | ||
1017 | |||
1018 | /* Get log entry pointer for this cpu at this trap level. */ | ||
1019 | BRANCH_IF_JALAPENO(g2,g3,50f) | ||
1020 | ldxa [%g0] ASI_SAFARI_CONFIG, %g2 | ||
1021 | srlx %g2, 17, %g2 | ||
1022 | ba,pt %xcc, 60f | ||
1023 | and %g2, 0x3ff, %g2 | ||
1024 | |||
1025 | 50: ldxa [%g0] ASI_JBUS_CONFIG, %g2 | ||
1026 | srlx %g2, 17, %g2 | ||
1027 | and %g2, 0x1f, %g2 | ||
1028 | |||
1029 | 60: sllx %g2, 9, %g2 | ||
1030 | sethi %hi(cheetah_error_log), %g3 | ||
1031 | ldx [%g3 + %lo(cheetah_error_log)], %g3 | ||
1032 | brz,pn %g3, 80f | ||
1033 | nop | ||
1034 | |||
1035 | add %g3, %g2, %g3 | ||
1036 | sllx %g1, 8, %g1 | ||
1037 | add %g3, %g1, %g1 | ||
1038 | |||
1039 | /* %g1 holds pointer to the top of the logging scoreboard */ | ||
1040 | ldx [%g1 + 0x0], %g7 | ||
1041 | cmp %g7, -1 | ||
1042 | bne,pn %xcc, 80f | ||
1043 | nop | ||
1044 | |||
1045 | stx %g4, [%g1 + 0x0] | ||
1046 | stx %g5, [%g1 + 0x8] | ||
1047 | add %g1, 0x10, %g1 | ||
1048 | |||
1049 | /* %g1 now points to D-cache logging area */ | ||
1050 | set 0x3ff8, %g2 /* DC_addr mask */ | ||
1051 | and %g5, %g2, %g2 /* DC_addr bits of AFAR */ | ||
1052 | srlx %g5, 12, %g3 | ||
1053 | or %g3, 1, %g3 /* PHYS tag + valid */ | ||
1054 | |||
1055 | 10: ldxa [%g2] ASI_DCACHE_TAG, %g7 | ||
1056 | cmp %g3, %g7 /* TAG match? */ | ||
1057 | bne,pt %xcc, 13f | ||
1058 | nop | ||
1059 | |||
1060 | /* Yep, what we want, capture state. */ | ||
1061 | stx %g2, [%g1 + 0x20] | ||
1062 | stx %g7, [%g1 + 0x28] | ||
1063 | |||
1064 | /* A membar Sync is required before and after utag access. */ | ||
1065 | membar #Sync | ||
1066 | ldxa [%g2] ASI_DCACHE_UTAG, %g7 | ||
1067 | membar #Sync | ||
1068 | stx %g7, [%g1 + 0x30] | ||
1069 | ldxa [%g2] ASI_DCACHE_SNOOP_TAG, %g7 | ||
1070 | stx %g7, [%g1 + 0x38] | ||
1071 | clr %g3 | ||
1072 | |||
1073 | 12: ldxa [%g2 + %g3] ASI_DCACHE_DATA, %g7 | ||
1074 | stx %g7, [%g1] | ||
1075 | add %g3, (1 << 5), %g3 | ||
1076 | cmp %g3, (4 << 5) | ||
1077 | bl,pt %xcc, 12b | ||
1078 | add %g1, 0x8, %g1 | ||
1079 | |||
1080 | ba,pt %xcc, 20f | ||
1081 | add %g1, 0x20, %g1 | ||
1082 | |||
1083 | 13: sethi %hi(1 << 14), %g7 | ||
1084 | add %g2, %g7, %g2 | ||
1085 | srlx %g2, 14, %g7 | ||
1086 | cmp %g7, 4 | ||
1087 | bl,pt %xcc, 10b | ||
1088 | nop | ||
1089 | |||
1090 | add %g1, 0x40, %g1 | ||
1091 | |||
1092 | /* %g1 now points to I-cache logging area */ | ||
1093 | 20: set 0x1fe0, %g2 /* IC_addr mask */ | ||
1094 | and %g5, %g2, %g2 /* IC_addr bits of AFAR */ | ||
1095 | sllx %g2, 1, %g2 /* IC_addr[13:6]==VA[12:5] */ | ||
1096 | srlx %g5, (13 - 8), %g3 /* Make PTAG */ | ||
1097 | andn %g3, 0xff, %g3 /* Mask off undefined bits */ | ||
1098 | |||
1099 | 21: ldxa [%g2] ASI_IC_TAG, %g7 | ||
1100 | andn %g7, 0xff, %g7 | ||
1101 | cmp %g3, %g7 | ||
1102 | bne,pt %xcc, 23f | ||
1103 | nop | ||
1104 | |||
1105 | /* Yep, what we want, capture state. */ | ||
1106 | stx %g2, [%g1 + 0x40] | ||
1107 | stx %g7, [%g1 + 0x48] | ||
1108 | add %g2, (1 << 3), %g2 | ||
1109 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
1110 | add %g2, (1 << 3), %g2 | ||
1111 | stx %g7, [%g1 + 0x50] | ||
1112 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
1113 | add %g2, (1 << 3), %g2 | ||
1114 | stx %g7, [%g1 + 0x60] | ||
1115 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
1116 | stx %g7, [%g1 + 0x68] | ||
1117 | sub %g2, (3 << 3), %g2 | ||
1118 | ldxa [%g2] ASI_IC_STAG, %g7 | ||
1119 | stx %g7, [%g1 + 0x58] | ||
1120 | clr %g3 | ||
1121 | srlx %g2, 2, %g2 | ||
1122 | |||
1123 | 22: ldxa [%g2 + %g3] ASI_IC_INSTR, %g7 | ||
1124 | stx %g7, [%g1] | ||
1125 | add %g3, (1 << 3), %g3 | ||
1126 | cmp %g3, (8 << 3) | ||
1127 | bl,pt %xcc, 22b | ||
1128 | add %g1, 0x8, %g1 | ||
1129 | |||
1130 | ba,pt %xcc, 30f | ||
1131 | add %g1, 0x30, %g1 | ||
1132 | |||
1133 | 23: sethi %hi(1 << 14), %g7 | ||
1134 | add %g2, %g7, %g2 | ||
1135 | srlx %g2, 14, %g7 | ||
1136 | cmp %g7, 4 | ||
1137 | bl,pt %xcc, 21b | ||
1138 | nop | ||
1139 | |||
1140 | add %g1, 0x70, %g1 | ||
1141 | |||
1142 | /* %g1 now points to E-cache logging area */ | ||
1143 | 30: andn %g5, (32 - 1), %g2 | ||
1144 | stx %g2, [%g1 + 0x20] | ||
1145 | ldxa [%g2] ASI_EC_TAG_DATA, %g7 | ||
1146 | stx %g7, [%g1 + 0x28] | ||
1147 | ldxa [%g2] ASI_EC_R, %g0 | ||
1148 | clr %g3 | ||
1149 | |||
1150 | 31: ldxa [%g3] ASI_EC_DATA, %g7 | ||
1151 | stx %g7, [%g1 + %g3] | ||
1152 | add %g3, 0x8, %g3 | ||
1153 | cmp %g3, 0x20 | ||
1154 | |||
1155 | bl,pt %xcc, 31b | ||
1156 | nop | ||
1157 | 80: | ||
1158 | rdpr %tt, %g2 | ||
1159 | cmp %g2, 0x70 | ||
1160 | be c_fast_ecc | ||
1161 | cmp %g2, 0x63 | ||
1162 | be c_cee | ||
1163 | nop | ||
1164 | ba,pt %xcc, c_deferred | ||
1165 | |||
1166 | /* Cheetah FECC trap handling, we get here from tl{0,1}_fecc | ||
1167 | * in the trap table. That code has done a memory barrier | ||
1168 | * and has disabled both the I-cache and D-cache in the DCU | ||
1169 | * control register. The I-cache is disabled so that we may | ||
1170 | * capture the corrupted cache line, and the D-cache is disabled | ||
1171 | * because corrupt data may have been placed there and we don't | ||
1172 | * want to reference it. | ||
1173 | * | ||
1174 | * %g1 is one if this trap occurred at %tl >= 1. | ||
1175 | * | ||
1176 | * Next, we turn off error reporting so that we don't recurse. | ||
1177 | */ | ||
1178 | .globl cheetah_fast_ecc | ||
1179 | cheetah_fast_ecc: | ||
1180 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g2 | ||
1181 | andn %g2, ESTATE_ERROR_NCEEN | ESTATE_ERROR_CEEN, %g2 | ||
1182 | stxa %g2, [%g0] ASI_ESTATE_ERROR_EN | ||
1183 | membar #Sync | ||
1184 | |||
1185 | /* Fetch and clear AFSR/AFAR */ | ||
1186 | ldxa [%g0] ASI_AFSR, %g4 | ||
1187 | ldxa [%g0] ASI_AFAR, %g5 | ||
1188 | stxa %g4, [%g0] ASI_AFSR | ||
1189 | membar #Sync | ||
1190 | |||
1191 | ba,pt %xcc, __cheetah_log_error | ||
1192 | nop | ||
1193 | |||
1194 | c_fast_ecc: | ||
1195 | rdpr %pil, %g2 | ||
1196 | wrpr %g0, 15, %pil | ||
1197 | ba,pt %xcc, etrap_irq | ||
1198 | rd %pc, %g7 | ||
1199 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1200 | call trace_hardirqs_off | ||
1201 | nop | ||
1202 | #endif | ||
1203 | mov %l4, %o1 | ||
1204 | mov %l5, %o2 | ||
1205 | call cheetah_fecc_handler | ||
1206 | add %sp, PTREGS_OFF, %o0 | ||
1207 | ba,a,pt %xcc, rtrap_irq | ||
1208 | |||
1209 | /* Our caller has disabled I-cache and performed membar Sync. */ | ||
1210 | .globl cheetah_cee | ||
1211 | cheetah_cee: | ||
1212 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g2 | ||
1213 | andn %g2, ESTATE_ERROR_CEEN, %g2 | ||
1214 | stxa %g2, [%g0] ASI_ESTATE_ERROR_EN | ||
1215 | membar #Sync | ||
1216 | |||
1217 | /* Fetch and clear AFSR/AFAR */ | ||
1218 | ldxa [%g0] ASI_AFSR, %g4 | ||
1219 | ldxa [%g0] ASI_AFAR, %g5 | ||
1220 | stxa %g4, [%g0] ASI_AFSR | ||
1221 | membar #Sync | ||
1222 | |||
1223 | ba,pt %xcc, __cheetah_log_error | ||
1224 | nop | ||
1225 | |||
1226 | c_cee: | ||
1227 | rdpr %pil, %g2 | ||
1228 | wrpr %g0, 15, %pil | ||
1229 | ba,pt %xcc, etrap_irq | ||
1230 | rd %pc, %g7 | ||
1231 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1232 | call trace_hardirqs_off | ||
1233 | nop | ||
1234 | #endif | ||
1235 | mov %l4, %o1 | ||
1236 | mov %l5, %o2 | ||
1237 | call cheetah_cee_handler | ||
1238 | add %sp, PTREGS_OFF, %o0 | ||
1239 | ba,a,pt %xcc, rtrap_irq | ||
1240 | |||
1241 | /* Our caller has disabled I-cache+D-cache and performed membar Sync. */ | ||
1242 | .globl cheetah_deferred_trap | ||
1243 | cheetah_deferred_trap: | ||
1244 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g2 | ||
1245 | andn %g2, ESTATE_ERROR_NCEEN | ESTATE_ERROR_CEEN, %g2 | ||
1246 | stxa %g2, [%g0] ASI_ESTATE_ERROR_EN | ||
1247 | membar #Sync | ||
1248 | |||
1249 | /* Fetch and clear AFSR/AFAR */ | ||
1250 | ldxa [%g0] ASI_AFSR, %g4 | ||
1251 | ldxa [%g0] ASI_AFAR, %g5 | ||
1252 | stxa %g4, [%g0] ASI_AFSR | ||
1253 | membar #Sync | ||
1254 | |||
1255 | ba,pt %xcc, __cheetah_log_error | ||
1256 | nop | ||
1257 | |||
1258 | c_deferred: | ||
1259 | rdpr %pil, %g2 | ||
1260 | wrpr %g0, 15, %pil | ||
1261 | ba,pt %xcc, etrap_irq | ||
1262 | rd %pc, %g7 | ||
1263 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1264 | call trace_hardirqs_off | ||
1265 | nop | ||
1266 | #endif | ||
1267 | mov %l4, %o1 | ||
1268 | mov %l5, %o2 | ||
1269 | call cheetah_deferred_handler | ||
1270 | add %sp, PTREGS_OFF, %o0 | ||
1271 | ba,a,pt %xcc, rtrap_irq | ||
1272 | |||
1273 | .globl __do_privact | ||
1274 | __do_privact: | ||
1275 | mov TLB_SFSR, %g3 | ||
1276 | stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit | ||
1277 | membar #Sync | ||
1278 | sethi %hi(109f), %g7 | ||
1279 | ba,pt %xcc, etrap | ||
1280 | 109: or %g7, %lo(109b), %g7 | ||
1281 | call do_privact | ||
1282 | add %sp, PTREGS_OFF, %o0 | ||
1283 | ba,pt %xcc, rtrap | ||
1284 | nop | ||
1285 | |||
1286 | .globl do_mna | ||
1287 | do_mna: | ||
1288 | rdpr %tl, %g3 | ||
1289 | cmp %g3, 1 | ||
1290 | |||
1291 | /* Setup %g4/%g5 now as they are used in the | ||
1292 | * winfixup code. | ||
1293 | */ | ||
1294 | mov TLB_SFSR, %g3 | ||
1295 | mov DMMU_SFAR, %g4 | ||
1296 | ldxa [%g4] ASI_DMMU, %g4 | ||
1297 | ldxa [%g3] ASI_DMMU, %g5 | ||
1298 | stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit | ||
1299 | membar #Sync | ||
1300 | bgu,pn %icc, winfix_mna | ||
1301 | rdpr %tpc, %g3 | ||
1302 | |||
1303 | 1: sethi %hi(109f), %g7 | ||
1304 | ba,pt %xcc, etrap | ||
1305 | 109: or %g7, %lo(109b), %g7 | ||
1306 | mov %l4, %o1 | ||
1307 | mov %l5, %o2 | ||
1308 | call mem_address_unaligned | ||
1309 | add %sp, PTREGS_OFF, %o0 | ||
1310 | ba,pt %xcc, rtrap | ||
1311 | nop | ||
1312 | |||
1313 | .globl do_lddfmna | ||
1314 | do_lddfmna: | ||
1315 | sethi %hi(109f), %g7 | ||
1316 | mov TLB_SFSR, %g4 | ||
1317 | ldxa [%g4] ASI_DMMU, %g5 | ||
1318 | stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit | ||
1319 | membar #Sync | ||
1320 | mov DMMU_SFAR, %g4 | ||
1321 | ldxa [%g4] ASI_DMMU, %g4 | ||
1322 | ba,pt %xcc, etrap | ||
1323 | 109: or %g7, %lo(109b), %g7 | ||
1324 | mov %l4, %o1 | ||
1325 | mov %l5, %o2 | ||
1326 | call handle_lddfmna | ||
1327 | add %sp, PTREGS_OFF, %o0 | ||
1328 | ba,pt %xcc, rtrap | ||
1329 | nop | ||
1330 | |||
1331 | .globl do_stdfmna | ||
1332 | do_stdfmna: | ||
1333 | sethi %hi(109f), %g7 | ||
1334 | mov TLB_SFSR, %g4 | ||
1335 | ldxa [%g4] ASI_DMMU, %g5 | ||
1336 | stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit | ||
1337 | membar #Sync | ||
1338 | mov DMMU_SFAR, %g4 | ||
1339 | ldxa [%g4] ASI_DMMU, %g4 | ||
1340 | ba,pt %xcc, etrap | ||
1341 | 109: or %g7, %lo(109b), %g7 | ||
1342 | mov %l4, %o1 | ||
1343 | mov %l5, %o2 | ||
1344 | call handle_stdfmna | ||
1345 | add %sp, PTREGS_OFF, %o0 | ||
1346 | ba,pt %xcc, rtrap | ||
1347 | nop | ||
1348 | |||
1349 | .globl breakpoint_trap | ||
1350 | breakpoint_trap: | ||
1351 | call sparc_breakpoint | ||
1352 | add %sp, PTREGS_OFF, %o0 | ||
1353 | ba,pt %xcc, rtrap | ||
1354 | nop | ||
1355 | |||
1356 | /* SunOS's execv() call only specifies the argv argument, the | ||
1357 | * environment settings are the same as the calling processes. | ||
1358 | */ | ||
1359 | .globl sunos_execv | ||
1360 | sys_execve: | ||
1361 | sethi %hi(sparc_execve), %g1 | ||
1362 | ba,pt %xcc, execve_merge | ||
1363 | or %g1, %lo(sparc_execve), %g1 | ||
1364 | #ifdef CONFIG_COMPAT | ||
1365 | .globl sys_execve | ||
1366 | sunos_execv: | ||
1367 | stx %g0, [%sp + PTREGS_OFF + PT_V9_I2] | ||
1368 | .globl sys32_execve | ||
1369 | sys32_execve: | ||
1370 | sethi %hi(sparc32_execve), %g1 | ||
1371 | or %g1, %lo(sparc32_execve), %g1 | ||
1372 | #endif | ||
1373 | execve_merge: | ||
1374 | flushw | ||
1375 | jmpl %g1, %g0 | ||
1376 | add %sp, PTREGS_OFF, %o0 | ||
1377 | |||
1378 | .globl sys_pipe, sys_sigpause, sys_nis_syscall | ||
1379 | .globl sys_rt_sigreturn | ||
1380 | .globl sys_ptrace | ||
1381 | .globl sys_sigaltstack | ||
1382 | .align 32 | ||
1383 | sys_pipe: ba,pt %xcc, sparc_pipe | ||
1384 | add %sp, PTREGS_OFF, %o0 | ||
1385 | sys_nis_syscall:ba,pt %xcc, c_sys_nis_syscall | ||
1386 | add %sp, PTREGS_OFF, %o0 | ||
1387 | sys_memory_ordering: | ||
1388 | ba,pt %xcc, sparc_memory_ordering | ||
1389 | add %sp, PTREGS_OFF, %o1 | ||
1390 | sys_sigaltstack:ba,pt %xcc, do_sigaltstack | ||
1391 | add %i6, STACK_BIAS, %o2 | ||
1392 | #ifdef CONFIG_COMPAT | ||
1393 | .globl sys32_sigstack | ||
1394 | sys32_sigstack: ba,pt %xcc, do_sys32_sigstack | ||
1395 | mov %i6, %o2 | ||
1396 | .globl sys32_sigaltstack | ||
1397 | sys32_sigaltstack: | ||
1398 | ba,pt %xcc, do_sys32_sigaltstack | ||
1399 | mov %i6, %o2 | ||
1400 | #endif | ||
1401 | .align 32 | ||
1402 | #ifdef CONFIG_COMPAT | ||
1403 | .globl sys32_sigreturn | ||
1404 | sys32_sigreturn: | ||
1405 | add %sp, PTREGS_OFF, %o0 | ||
1406 | call do_sigreturn32 | ||
1407 | add %o7, 1f-.-4, %o7 | ||
1408 | nop | ||
1409 | #endif | ||
1410 | sys_rt_sigreturn: | ||
1411 | add %sp, PTREGS_OFF, %o0 | ||
1412 | call do_rt_sigreturn | ||
1413 | add %o7, 1f-.-4, %o7 | ||
1414 | nop | ||
1415 | #ifdef CONFIG_COMPAT | ||
1416 | .globl sys32_rt_sigreturn | ||
1417 | sys32_rt_sigreturn: | ||
1418 | add %sp, PTREGS_OFF, %o0 | ||
1419 | call do_rt_sigreturn32 | ||
1420 | add %o7, 1f-.-4, %o7 | ||
1421 | nop | ||
1422 | #endif | ||
1423 | .align 32 | ||
1424 | 1: ldx [%curptr + TI_FLAGS], %l5 | ||
1425 | andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | ||
1426 | be,pt %icc, rtrap | ||
1427 | nop | ||
1428 | add %sp, PTREGS_OFF, %o0 | ||
1429 | call syscall_trace | ||
1430 | mov 1, %o1 | ||
1431 | |||
1432 | ba,pt %xcc, rtrap | ||
1433 | nop | ||
1434 | |||
1435 | /* This is how fork() was meant to be done, 8 instruction entry. | ||
1436 | * | ||
1437 | * I questioned the following code briefly, let me clear things | ||
1438 | * up so you must not reason on it like I did. | ||
1439 | * | ||
1440 | * Know the fork_kpsr etc. we use in the sparc32 port? We don't | ||
1441 | * need it here because the only piece of window state we copy to | ||
1442 | * the child is the CWP register. Even if the parent sleeps, | ||
1443 | * we are safe because we stuck it into pt_regs of the parent | ||
1444 | * so it will not change. | ||
1445 | * | ||
1446 | * XXX This raises the question, whether we can do the same on | ||
1447 | * XXX sparc32 to get rid of fork_kpsr _and_ fork_kwim. The | ||
1448 | * XXX answer is yes. We stick fork_kpsr in UREG_G0 and | ||
1449 | * XXX fork_kwim in UREG_G1 (global registers are considered | ||
1450 | * XXX volatile across a system call in the sparc ABI I think | ||
1451 | * XXX if it isn't we can use regs->y instead, anyone who depends | ||
1452 | * XXX upon the Y register being preserved across a fork deserves | ||
1453 | * XXX to lose). | ||
1454 | * | ||
1455 | * In fact we should take advantage of that fact for other things | ||
1456 | * during system calls... | ||
1457 | */ | ||
1458 | .globl sys_fork, sys_vfork, sys_clone, sparc_exit | ||
1459 | .globl ret_from_syscall | ||
1460 | .align 32 | ||
1461 | sys_vfork: /* Under Linux, vfork and fork are just special cases of clone. */ | ||
1462 | sethi %hi(0x4000 | 0x0100 | SIGCHLD), %o0 | ||
1463 | or %o0, %lo(0x4000 | 0x0100 | SIGCHLD), %o0 | ||
1464 | ba,pt %xcc, sys_clone | ||
1465 | sys_fork: clr %o1 | ||
1466 | mov SIGCHLD, %o0 | ||
1467 | sys_clone: flushw | ||
1468 | movrz %o1, %fp, %o1 | ||
1469 | mov 0, %o3 | ||
1470 | ba,pt %xcc, sparc_do_fork | ||
1471 | add %sp, PTREGS_OFF, %o2 | ||
1472 | ret_from_syscall: | ||
1473 | /* Clear current_thread_info()->new_child, and | ||
1474 | * check performance counter stuff too. | ||
1475 | */ | ||
1476 | stb %g0, [%g6 + TI_NEW_CHILD] | ||
1477 | ldx [%g6 + TI_FLAGS], %l0 | ||
1478 | call schedule_tail | ||
1479 | mov %g7, %o0 | ||
1480 | andcc %l0, _TIF_PERFCTR, %g0 | ||
1481 | be,pt %icc, 1f | ||
1482 | nop | ||
1483 | ldx [%g6 + TI_PCR], %o7 | ||
1484 | wr %g0, %o7, %pcr | ||
1485 | |||
1486 | /* Blackbird errata workaround. See commentary in | ||
1487 | * smp.c:smp_percpu_timer_interrupt() for more | ||
1488 | * information. | ||
1489 | */ | ||
1490 | ba,pt %xcc, 99f | ||
1491 | nop | ||
1492 | .align 64 | ||
1493 | 99: wr %g0, %g0, %pic | ||
1494 | rd %pic, %g0 | ||
1495 | |||
1496 | 1: b,pt %xcc, ret_sys_call | ||
1497 | ldx [%sp + PTREGS_OFF + PT_V9_I0], %o0 | ||
1498 | sparc_exit: rdpr %pstate, %g2 | ||
1499 | wrpr %g2, PSTATE_IE, %pstate | ||
1500 | rdpr %otherwin, %g1 | ||
1501 | rdpr %cansave, %g3 | ||
1502 | add %g3, %g1, %g3 | ||
1503 | wrpr %g3, 0x0, %cansave | ||
1504 | wrpr %g0, 0x0, %otherwin | ||
1505 | wrpr %g2, 0x0, %pstate | ||
1506 | ba,pt %xcc, sys_exit | ||
1507 | stb %g0, [%g6 + TI_WSAVED] | ||
1508 | |||
1509 | linux_sparc_ni_syscall: | ||
1510 | sethi %hi(sys_ni_syscall), %l7 | ||
1511 | b,pt %xcc, 4f | ||
1512 | or %l7, %lo(sys_ni_syscall), %l7 | ||
1513 | |||
1514 | linux_syscall_trace32: | ||
1515 | add %sp, PTREGS_OFF, %o0 | ||
1516 | call syscall_trace | ||
1517 | clr %o1 | ||
1518 | srl %i0, 0, %o0 | ||
1519 | srl %i4, 0, %o4 | ||
1520 | srl %i1, 0, %o1 | ||
1521 | srl %i2, 0, %o2 | ||
1522 | b,pt %xcc, 2f | ||
1523 | srl %i3, 0, %o3 | ||
1524 | |||
1525 | linux_syscall_trace: | ||
1526 | add %sp, PTREGS_OFF, %o0 | ||
1527 | call syscall_trace | ||
1528 | clr %o1 | ||
1529 | mov %i0, %o0 | ||
1530 | mov %i1, %o1 | ||
1531 | mov %i2, %o2 | ||
1532 | mov %i3, %o3 | ||
1533 | b,pt %xcc, 2f | ||
1534 | mov %i4, %o4 | ||
1535 | |||
1536 | |||
1537 | /* Linux 32-bit system calls enter here... */ | ||
1538 | .align 32 | ||
1539 | .globl linux_sparc_syscall32 | ||
1540 | linux_sparc_syscall32: | ||
1541 | /* Direct access to user regs, much faster. */ | ||
1542 | cmp %g1, NR_SYSCALLS ! IEU1 Group | ||
1543 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | ||
1544 | srl %i0, 0, %o0 ! IEU0 | ||
1545 | sll %g1, 2, %l4 ! IEU0 Group | ||
1546 | srl %i4, 0, %o4 ! IEU1 | ||
1547 | lduw [%l7 + %l4], %l7 ! Load | ||
1548 | srl %i1, 0, %o1 ! IEU0 Group | ||
1549 | ldx [%curptr + TI_FLAGS], %l0 ! Load | ||
1550 | |||
1551 | srl %i5, 0, %o5 ! IEU1 | ||
1552 | srl %i2, 0, %o2 ! IEU0 Group | ||
1553 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | ||
1554 | bne,pn %icc, linux_syscall_trace32 ! CTI | ||
1555 | mov %i0, %l5 ! IEU1 | ||
1556 | call %l7 ! CTI Group brk forced | ||
1557 | srl %i3, 0, %o3 ! IEU0 | ||
1558 | ba,a,pt %xcc, 3f | ||
1559 | |||
1560 | /* Linux native system calls enter here... */ | ||
1561 | .align 32 | ||
1562 | .globl linux_sparc_syscall | ||
1563 | linux_sparc_syscall: | ||
1564 | /* Direct access to user regs, much faster. */ | ||
1565 | cmp %g1, NR_SYSCALLS ! IEU1 Group | ||
1566 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | ||
1567 | mov %i0, %o0 ! IEU0 | ||
1568 | sll %g1, 2, %l4 ! IEU0 Group | ||
1569 | mov %i1, %o1 ! IEU1 | ||
1570 | lduw [%l7 + %l4], %l7 ! Load | ||
1571 | 4: mov %i2, %o2 ! IEU0 Group | ||
1572 | ldx [%curptr + TI_FLAGS], %l0 ! Load | ||
1573 | |||
1574 | mov %i3, %o3 ! IEU1 | ||
1575 | mov %i4, %o4 ! IEU0 Group | ||
1576 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | ||
1577 | bne,pn %icc, linux_syscall_trace ! CTI Group | ||
1578 | mov %i0, %l5 ! IEU0 | ||
1579 | 2: call %l7 ! CTI Group brk forced | ||
1580 | mov %i5, %o5 ! IEU0 | ||
1581 | nop | ||
1582 | |||
1583 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
1584 | ret_sys_call: | ||
1585 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 | ||
1586 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc | ||
1587 | sra %o0, 0, %o0 | ||
1588 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 | ||
1589 | sllx %g2, 32, %g2 | ||
1590 | |||
1591 | /* Check if force_successful_syscall_return() | ||
1592 | * was invoked. | ||
1593 | */ | ||
1594 | ldub [%curptr + TI_SYS_NOERROR], %l2 | ||
1595 | brnz,a,pn %l2, 80f | ||
1596 | stb %g0, [%curptr + TI_SYS_NOERROR] | ||
1597 | |||
1598 | cmp %o0, -ERESTART_RESTARTBLOCK | ||
1599 | bgeu,pn %xcc, 1f | ||
1600 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 | ||
1601 | 80: | ||
1602 | /* System call success, clear Carry condition code. */ | ||
1603 | andn %g3, %g2, %g3 | ||
1604 | stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] | ||
1605 | bne,pn %icc, linux_syscall_trace2 | ||
1606 | add %l1, 0x4, %l2 ! npc = npc+4 | ||
1607 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | ||
1608 | ba,pt %xcc, rtrap | ||
1609 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | ||
1610 | |||
1611 | 1: | ||
1612 | /* System call failure, set Carry condition code. | ||
1613 | * Also, get abs(errno) to return to the process. | ||
1614 | */ | ||
1615 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 | ||
1616 | sub %g0, %o0, %o0 | ||
1617 | or %g3, %g2, %g3 | ||
1618 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
1619 | stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] | ||
1620 | bne,pn %icc, linux_syscall_trace2 | ||
1621 | add %l1, 0x4, %l2 ! npc = npc+4 | ||
1622 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | ||
1623 | |||
1624 | b,pt %xcc, rtrap | ||
1625 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | ||
1626 | linux_syscall_trace2: | ||
1627 | add %sp, PTREGS_OFF, %o0 | ||
1628 | call syscall_trace | ||
1629 | mov 1, %o1 | ||
1630 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | ||
1631 | ba,pt %xcc, rtrap | ||
1632 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | ||
1633 | |||
1634 | .align 32 | ||
1635 | .globl __flushw_user | ||
1636 | __flushw_user: | ||
1637 | rdpr %otherwin, %g1 | ||
1638 | brz,pn %g1, 2f | ||
1639 | clr %g2 | ||
1640 | 1: save %sp, -128, %sp | ||
1641 | rdpr %otherwin, %g1 | ||
1642 | brnz,pt %g1, 1b | ||
1643 | add %g2, 1, %g2 | ||
1644 | 1: sub %g2, 1, %g2 | ||
1645 | brnz,pt %g2, 1b | ||
1646 | restore %g0, %g0, %g0 | ||
1647 | 2: retl | ||
1648 | nop | ||
1649 | |||
1650 | /* Flush %fp and %i7 to the stack for all register | ||
1651 | * windows active inside of the cpu. This allows | ||
1652 | * show_stack_trace() to avoid using an expensive | ||
1653 | * 'flushw'. | ||
1654 | */ | ||
1655 | .globl stack_trace_flush | ||
1656 | .type stack_trace_flush,#function | ||
1657 | stack_trace_flush: | ||
1658 | rdpr %pstate, %o0 | ||
1659 | wrpr %o0, PSTATE_IE, %pstate | ||
1660 | |||
1661 | rdpr %cwp, %g1 | ||
1662 | rdpr %canrestore, %g2 | ||
1663 | sub %g1, 1, %g3 | ||
1664 | |||
1665 | 1: brz,pn %g2, 2f | ||
1666 | sub %g2, 1, %g2 | ||
1667 | wrpr %g3, %cwp | ||
1668 | stx %fp, [%sp + STACK_BIAS + RW_V9_I6] | ||
1669 | stx %i7, [%sp + STACK_BIAS + RW_V9_I7] | ||
1670 | ba,pt %xcc, 1b | ||
1671 | sub %g3, 1, %g3 | ||
1672 | |||
1673 | 2: wrpr %g1, %cwp | ||
1674 | wrpr %o0, %pstate | ||
1675 | |||
1676 | retl | ||
1677 | nop | ||
1678 | .size stack_trace_flush,.-stack_trace_flush | ||
1679 | |||
1680 | #ifdef CONFIG_SMP | ||
1681 | .globl hard_smp_processor_id | ||
1682 | hard_smp_processor_id: | ||
1683 | #endif | ||
1684 | .globl real_hard_smp_processor_id | ||
1685 | real_hard_smp_processor_id: | ||
1686 | __GET_CPUID(%o0) | ||
1687 | retl | ||
1688 | nop | ||
1689 | |||
1690 | /* %o0: devhandle | ||
1691 | * %o1: devino | ||
1692 | * | ||
1693 | * returns %o0: sysino | ||
1694 | */ | ||
1695 | .globl sun4v_devino_to_sysino | ||
1696 | .type sun4v_devino_to_sysino,#function | ||
1697 | sun4v_devino_to_sysino: | ||
1698 | mov HV_FAST_INTR_DEVINO2SYSINO, %o5 | ||
1699 | ta HV_FAST_TRAP | ||
1700 | retl | ||
1701 | mov %o1, %o0 | ||
1702 | .size sun4v_devino_to_sysino, .-sun4v_devino_to_sysino | ||
1703 | |||
1704 | /* %o0: sysino | ||
1705 | * | ||
1706 | * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED}) | ||
1707 | */ | ||
1708 | .globl sun4v_intr_getenabled | ||
1709 | .type sun4v_intr_getenabled,#function | ||
1710 | sun4v_intr_getenabled: | ||
1711 | mov HV_FAST_INTR_GETENABLED, %o5 | ||
1712 | ta HV_FAST_TRAP | ||
1713 | retl | ||
1714 | mov %o1, %o0 | ||
1715 | .size sun4v_intr_getenabled, .-sun4v_intr_getenabled | ||
1716 | |||
1717 | /* %o0: sysino | ||
1718 | * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED}) | ||
1719 | */ | ||
1720 | .globl sun4v_intr_setenabled | ||
1721 | .type sun4v_intr_setenabled,#function | ||
1722 | sun4v_intr_setenabled: | ||
1723 | mov HV_FAST_INTR_SETENABLED, %o5 | ||
1724 | ta HV_FAST_TRAP | ||
1725 | retl | ||
1726 | nop | ||
1727 | .size sun4v_intr_setenabled, .-sun4v_intr_setenabled | ||
1728 | |||
1729 | /* %o0: sysino | ||
1730 | * | ||
1731 | * returns %o0: intr_state (HV_INTR_STATE_*) | ||
1732 | */ | ||
1733 | .globl sun4v_intr_getstate | ||
1734 | .type sun4v_intr_getstate,#function | ||
1735 | sun4v_intr_getstate: | ||
1736 | mov HV_FAST_INTR_GETSTATE, %o5 | ||
1737 | ta HV_FAST_TRAP | ||
1738 | retl | ||
1739 | mov %o1, %o0 | ||
1740 | .size sun4v_intr_getstate, .-sun4v_intr_getstate | ||
1741 | |||
1742 | /* %o0: sysino | ||
1743 | * %o1: intr_state (HV_INTR_STATE_*) | ||
1744 | */ | ||
1745 | .globl sun4v_intr_setstate | ||
1746 | .type sun4v_intr_setstate,#function | ||
1747 | sun4v_intr_setstate: | ||
1748 | mov HV_FAST_INTR_SETSTATE, %o5 | ||
1749 | ta HV_FAST_TRAP | ||
1750 | retl | ||
1751 | nop | ||
1752 | .size sun4v_intr_setstate, .-sun4v_intr_setstate | ||
1753 | |||
1754 | /* %o0: sysino | ||
1755 | * | ||
1756 | * returns %o0: cpuid | ||
1757 | */ | ||
1758 | .globl sun4v_intr_gettarget | ||
1759 | .type sun4v_intr_gettarget,#function | ||
1760 | sun4v_intr_gettarget: | ||
1761 | mov HV_FAST_INTR_GETTARGET, %o5 | ||
1762 | ta HV_FAST_TRAP | ||
1763 | retl | ||
1764 | mov %o1, %o0 | ||
1765 | .size sun4v_intr_gettarget, .-sun4v_intr_gettarget | ||
1766 | |||
1767 | /* %o0: sysino | ||
1768 | * %o1: cpuid | ||
1769 | */ | ||
1770 | .globl sun4v_intr_settarget | ||
1771 | .type sun4v_intr_settarget,#function | ||
1772 | sun4v_intr_settarget: | ||
1773 | mov HV_FAST_INTR_SETTARGET, %o5 | ||
1774 | ta HV_FAST_TRAP | ||
1775 | retl | ||
1776 | nop | ||
1777 | .size sun4v_intr_settarget, .-sun4v_intr_settarget | ||
1778 | |||
1779 | /* %o0: cpuid | ||
1780 | * %o1: pc | ||
1781 | * %o2: rtba | ||
1782 | * %o3: arg0 | ||
1783 | * | ||
1784 | * returns %o0: status | ||
1785 | */ | ||
1786 | .globl sun4v_cpu_start | ||
1787 | .type sun4v_cpu_start,#function | ||
1788 | sun4v_cpu_start: | ||
1789 | mov HV_FAST_CPU_START, %o5 | ||
1790 | ta HV_FAST_TRAP | ||
1791 | retl | ||
1792 | nop | ||
1793 | .size sun4v_cpu_start, .-sun4v_cpu_start | ||
1794 | |||
1795 | /* %o0: cpuid | ||
1796 | * | ||
1797 | * returns %o0: status | ||
1798 | */ | ||
1799 | .globl sun4v_cpu_stop | ||
1800 | .type sun4v_cpu_stop,#function | ||
1801 | sun4v_cpu_stop: | ||
1802 | mov HV_FAST_CPU_STOP, %o5 | ||
1803 | ta HV_FAST_TRAP | ||
1804 | retl | ||
1805 | nop | ||
1806 | .size sun4v_cpu_stop, .-sun4v_cpu_stop | ||
1807 | |||
1808 | /* returns %o0: status */ | ||
1809 | .globl sun4v_cpu_yield | ||
1810 | .type sun4v_cpu_yield, #function | ||
1811 | sun4v_cpu_yield: | ||
1812 | mov HV_FAST_CPU_YIELD, %o5 | ||
1813 | ta HV_FAST_TRAP | ||
1814 | retl | ||
1815 | nop | ||
1816 | .size sun4v_cpu_yield, .-sun4v_cpu_yield | ||
1817 | |||
1818 | /* %o0: type | ||
1819 | * %o1: queue paddr | ||
1820 | * %o2: num queue entries | ||
1821 | * | ||
1822 | * returns %o0: status | ||
1823 | */ | ||
1824 | .globl sun4v_cpu_qconf | ||
1825 | .type sun4v_cpu_qconf,#function | ||
1826 | sun4v_cpu_qconf: | ||
1827 | mov HV_FAST_CPU_QCONF, %o5 | ||
1828 | ta HV_FAST_TRAP | ||
1829 | retl | ||
1830 | nop | ||
1831 | .size sun4v_cpu_qconf, .-sun4v_cpu_qconf | ||
1832 | |||
1833 | /* %o0: num cpus in cpu list | ||
1834 | * %o1: cpu list paddr | ||
1835 | * %o2: mondo block paddr | ||
1836 | * | ||
1837 | * returns %o0: status | ||
1838 | */ | ||
1839 | .globl sun4v_cpu_mondo_send | ||
1840 | .type sun4v_cpu_mondo_send,#function | ||
1841 | sun4v_cpu_mondo_send: | ||
1842 | mov HV_FAST_CPU_MONDO_SEND, %o5 | ||
1843 | ta HV_FAST_TRAP | ||
1844 | retl | ||
1845 | nop | ||
1846 | .size sun4v_cpu_mondo_send, .-sun4v_cpu_mondo_send | ||
1847 | |||
1848 | /* %o0: CPU ID | ||
1849 | * | ||
1850 | * returns %o0: -status if status non-zero, else | ||
1851 | * %o0: cpu state as HV_CPU_STATE_* | ||
1852 | */ | ||
1853 | .globl sun4v_cpu_state | ||
1854 | .type sun4v_cpu_state,#function | ||
1855 | sun4v_cpu_state: | ||
1856 | mov HV_FAST_CPU_STATE, %o5 | ||
1857 | ta HV_FAST_TRAP | ||
1858 | brnz,pn %o0, 1f | ||
1859 | sub %g0, %o0, %o0 | ||
1860 | mov %o1, %o0 | ||
1861 | 1: retl | ||
1862 | nop | ||
1863 | .size sun4v_cpu_state, .-sun4v_cpu_state | ||
1864 | |||
1865 | /* %o0: virtual address | ||
1866 | * %o1: must be zero | ||
1867 | * %o2: TTE | ||
1868 | * %o3: HV_MMU_* flags | ||
1869 | * | ||
1870 | * returns %o0: status | ||
1871 | */ | ||
1872 | .globl sun4v_mmu_map_perm_addr | ||
1873 | .type sun4v_mmu_map_perm_addr,#function | ||
1874 | sun4v_mmu_map_perm_addr: | ||
1875 | mov HV_FAST_MMU_MAP_PERM_ADDR, %o5 | ||
1876 | ta HV_FAST_TRAP | ||
1877 | retl | ||
1878 | nop | ||
1879 | .size sun4v_mmu_map_perm_addr, .-sun4v_mmu_map_perm_addr | ||
1880 | |||
1881 | /* %o0: number of TSB descriptions | ||
1882 | * %o1: TSB descriptions real address | ||
1883 | * | ||
1884 | * returns %o0: status | ||
1885 | */ | ||
1886 | .globl sun4v_mmu_tsb_ctx0 | ||
1887 | .type sun4v_mmu_tsb_ctx0,#function | ||
1888 | sun4v_mmu_tsb_ctx0: | ||
1889 | mov HV_FAST_MMU_TSB_CTX0, %o5 | ||
1890 | ta HV_FAST_TRAP | ||
1891 | retl | ||
1892 | nop | ||
1893 | .size sun4v_mmu_tsb_ctx0, .-sun4v_mmu_tsb_ctx0 | ||
1894 | |||
1895 | /* %o0: API group number | ||
1896 | * %o1: pointer to unsigned long major number storage | ||
1897 | * %o2: pointer to unsigned long minor number storage | ||
1898 | * | ||
1899 | * returns %o0: status | ||
1900 | */ | ||
1901 | .globl sun4v_get_version | ||
1902 | .type sun4v_get_version,#function | ||
1903 | sun4v_get_version: | ||
1904 | mov HV_CORE_GET_VER, %o5 | ||
1905 | mov %o1, %o3 | ||
1906 | mov %o2, %o4 | ||
1907 | ta HV_CORE_TRAP | ||
1908 | stx %o1, [%o3] | ||
1909 | retl | ||
1910 | stx %o2, [%o4] | ||
1911 | .size sun4v_get_version, .-sun4v_get_version | ||
1912 | |||
1913 | /* %o0: API group number | ||
1914 | * %o1: desired major number | ||
1915 | * %o2: desired minor number | ||
1916 | * %o3: pointer to unsigned long actual minor number storage | ||
1917 | * | ||
1918 | * returns %o0: status | ||
1919 | */ | ||
1920 | .globl sun4v_set_version | ||
1921 | .type sun4v_set_version,#function | ||
1922 | sun4v_set_version: | ||
1923 | mov HV_CORE_SET_VER, %o5 | ||
1924 | mov %o3, %o4 | ||
1925 | ta HV_CORE_TRAP | ||
1926 | retl | ||
1927 | stx %o1, [%o4] | ||
1928 | .size sun4v_set_version, .-sun4v_set_version | ||
1929 | |||
1930 | /* %o0: pointer to unsigned long time | ||
1931 | * | ||
1932 | * returns %o0: status | ||
1933 | */ | ||
1934 | .globl sun4v_tod_get | ||
1935 | .type sun4v_tod_get,#function | ||
1936 | sun4v_tod_get: | ||
1937 | mov %o0, %o4 | ||
1938 | mov HV_FAST_TOD_GET, %o5 | ||
1939 | ta HV_FAST_TRAP | ||
1940 | stx %o1, [%o4] | ||
1941 | retl | ||
1942 | nop | ||
1943 | .size sun4v_tod_get, .-sun4v_tod_get | ||
1944 | |||
1945 | /* %o0: time | ||
1946 | * | ||
1947 | * returns %o0: status | ||
1948 | */ | ||
1949 | .globl sun4v_tod_set | ||
1950 | .type sun4v_tod_set,#function | ||
1951 | sun4v_tod_set: | ||
1952 | mov HV_FAST_TOD_SET, %o5 | ||
1953 | ta HV_FAST_TRAP | ||
1954 | retl | ||
1955 | nop | ||
1956 | .size sun4v_tod_set, .-sun4v_tod_set | ||
1957 | |||
1958 | /* %o0: pointer to unsigned long status | ||
1959 | * | ||
1960 | * returns %o0: signed character | ||
1961 | */ | ||
1962 | .globl sun4v_con_getchar | ||
1963 | .type sun4v_con_getchar,#function | ||
1964 | sun4v_con_getchar: | ||
1965 | mov %o0, %o4 | ||
1966 | mov HV_FAST_CONS_GETCHAR, %o5 | ||
1967 | clr %o0 | ||
1968 | clr %o1 | ||
1969 | ta HV_FAST_TRAP | ||
1970 | stx %o0, [%o4] | ||
1971 | retl | ||
1972 | sra %o1, 0, %o0 | ||
1973 | .size sun4v_con_getchar, .-sun4v_con_getchar | ||
1974 | |||
1975 | /* %o0: signed long character | ||
1976 | * | ||
1977 | * returns %o0: status | ||
1978 | */ | ||
1979 | .globl sun4v_con_putchar | ||
1980 | .type sun4v_con_putchar,#function | ||
1981 | sun4v_con_putchar: | ||
1982 | mov HV_FAST_CONS_PUTCHAR, %o5 | ||
1983 | ta HV_FAST_TRAP | ||
1984 | retl | ||
1985 | sra %o0, 0, %o0 | ||
1986 | .size sun4v_con_putchar, .-sun4v_con_putchar | ||
1987 | |||
1988 | /* %o0: buffer real address | ||
1989 | * %o1: buffer size | ||
1990 | * %o2: pointer to unsigned long bytes_read | ||
1991 | * | ||
1992 | * returns %o0: status | ||
1993 | */ | ||
1994 | .globl sun4v_con_read | ||
1995 | .type sun4v_con_read,#function | ||
1996 | sun4v_con_read: | ||
1997 | mov %o2, %o4 | ||
1998 | mov HV_FAST_CONS_READ, %o5 | ||
1999 | ta HV_FAST_TRAP | ||
2000 | brnz %o0, 1f | ||
2001 | cmp %o1, -1 /* break */ | ||
2002 | be,a,pn %icc, 1f | ||
2003 | mov %o1, %o0 | ||
2004 | cmp %o1, -2 /* hup */ | ||
2005 | be,a,pn %icc, 1f | ||
2006 | mov %o1, %o0 | ||
2007 | stx %o1, [%o4] | ||
2008 | 1: retl | ||
2009 | nop | ||
2010 | .size sun4v_con_read, .-sun4v_con_read | ||
2011 | |||
2012 | /* %o0: buffer real address | ||
2013 | * %o1: buffer size | ||
2014 | * %o2: pointer to unsigned long bytes_written | ||
2015 | * | ||
2016 | * returns %o0: status | ||
2017 | */ | ||
2018 | .globl sun4v_con_write | ||
2019 | .type sun4v_con_write,#function | ||
2020 | sun4v_con_write: | ||
2021 | mov %o2, %o4 | ||
2022 | mov HV_FAST_CONS_WRITE, %o5 | ||
2023 | ta HV_FAST_TRAP | ||
2024 | stx %o1, [%o4] | ||
2025 | retl | ||
2026 | nop | ||
2027 | .size sun4v_con_write, .-sun4v_con_write | ||
2028 | |||
2029 | /* %o0: soft state | ||
2030 | * %o1: address of description string | ||
2031 | * | ||
2032 | * returns %o0: status | ||
2033 | */ | ||
2034 | .globl sun4v_mach_set_soft_state | ||
2035 | .type sun4v_mach_set_soft_state,#function | ||
2036 | sun4v_mach_set_soft_state: | ||
2037 | mov HV_FAST_MACH_SET_SOFT_STATE, %o5 | ||
2038 | ta HV_FAST_TRAP | ||
2039 | retl | ||
2040 | nop | ||
2041 | .size sun4v_mach_set_soft_state, .-sun4v_mach_set_soft_state | ||
2042 | |||
2043 | /* %o0: exit code | ||
2044 | * | ||
2045 | * Does not return. | ||
2046 | */ | ||
2047 | .globl sun4v_mach_exit | ||
2048 | .type sun4v_mach_exit,#function | ||
2049 | sun4v_mach_exit: | ||
2050 | mov HV_FAST_MACH_EXIT, %o5 | ||
2051 | ta HV_FAST_TRAP | ||
2052 | retl | ||
2053 | nop | ||
2054 | .size sun4v_mach_exit, .-sun4v_mach_exit | ||
2055 | |||
2056 | /* %o0: buffer real address | ||
2057 | * %o1: buffer length | ||
2058 | * %o2: pointer to unsigned long real_buf_len | ||
2059 | * | ||
2060 | * returns %o0: status | ||
2061 | */ | ||
2062 | .globl sun4v_mach_desc | ||
2063 | .type sun4v_mach_desc,#function | ||
2064 | sun4v_mach_desc: | ||
2065 | mov %o2, %o4 | ||
2066 | mov HV_FAST_MACH_DESC, %o5 | ||
2067 | ta HV_FAST_TRAP | ||
2068 | stx %o1, [%o4] | ||
2069 | retl | ||
2070 | nop | ||
2071 | .size sun4v_mach_desc, .-sun4v_mach_desc | ||
2072 | |||
2073 | /* %o0: new timeout in milliseconds | ||
2074 | * %o1: pointer to unsigned long orig_timeout | ||
2075 | * | ||
2076 | * returns %o0: status | ||
2077 | */ | ||
2078 | .globl sun4v_mach_set_watchdog | ||
2079 | .type sun4v_mach_set_watchdog,#function | ||
2080 | sun4v_mach_set_watchdog: | ||
2081 | mov %o1, %o4 | ||
2082 | mov HV_FAST_MACH_SET_WATCHDOG, %o5 | ||
2083 | ta HV_FAST_TRAP | ||
2084 | stx %o1, [%o4] | ||
2085 | retl | ||
2086 | nop | ||
2087 | .size sun4v_mach_set_watchdog, .-sun4v_mach_set_watchdog | ||
2088 | |||
2089 | /* No inputs and does not return. */ | ||
2090 | .globl sun4v_mach_sir | ||
2091 | .type sun4v_mach_sir,#function | ||
2092 | sun4v_mach_sir: | ||
2093 | mov %o1, %o4 | ||
2094 | mov HV_FAST_MACH_SIR, %o5 | ||
2095 | ta HV_FAST_TRAP | ||
2096 | stx %o1, [%o4] | ||
2097 | retl | ||
2098 | nop | ||
2099 | .size sun4v_mach_sir, .-sun4v_mach_sir | ||
2100 | |||
2101 | /* %o0: channel | ||
2102 | * %o1: ra | ||
2103 | * %o2: num_entries | ||
2104 | * | ||
2105 | * returns %o0: status | ||
2106 | */ | ||
2107 | .globl sun4v_ldc_tx_qconf | ||
2108 | .type sun4v_ldc_tx_qconf,#function | ||
2109 | sun4v_ldc_tx_qconf: | ||
2110 | mov HV_FAST_LDC_TX_QCONF, %o5 | ||
2111 | ta HV_FAST_TRAP | ||
2112 | retl | ||
2113 | nop | ||
2114 | .size sun4v_ldc_tx_qconf, .-sun4v_ldc_tx_qconf | ||
2115 | |||
2116 | /* %o0: channel | ||
2117 | * %o1: pointer to unsigned long ra | ||
2118 | * %o2: pointer to unsigned long num_entries | ||
2119 | * | ||
2120 | * returns %o0: status | ||
2121 | */ | ||
2122 | .globl sun4v_ldc_tx_qinfo | ||
2123 | .type sun4v_ldc_tx_qinfo,#function | ||
2124 | sun4v_ldc_tx_qinfo: | ||
2125 | mov %o1, %g1 | ||
2126 | mov %o2, %g2 | ||
2127 | mov HV_FAST_LDC_TX_QINFO, %o5 | ||
2128 | ta HV_FAST_TRAP | ||
2129 | stx %o1, [%g1] | ||
2130 | stx %o2, [%g2] | ||
2131 | retl | ||
2132 | nop | ||
2133 | .size sun4v_ldc_tx_qinfo, .-sun4v_ldc_tx_qinfo | ||
2134 | |||
2135 | /* %o0: channel | ||
2136 | * %o1: pointer to unsigned long head_off | ||
2137 | * %o2: pointer to unsigned long tail_off | ||
2138 | * %o2: pointer to unsigned long chan_state | ||
2139 | * | ||
2140 | * returns %o0: status | ||
2141 | */ | ||
2142 | .globl sun4v_ldc_tx_get_state | ||
2143 | .type sun4v_ldc_tx_get_state,#function | ||
2144 | sun4v_ldc_tx_get_state: | ||
2145 | mov %o1, %g1 | ||
2146 | mov %o2, %g2 | ||
2147 | mov %o3, %g3 | ||
2148 | mov HV_FAST_LDC_TX_GET_STATE, %o5 | ||
2149 | ta HV_FAST_TRAP | ||
2150 | stx %o1, [%g1] | ||
2151 | stx %o2, [%g2] | ||
2152 | stx %o3, [%g3] | ||
2153 | retl | ||
2154 | nop | ||
2155 | .size sun4v_ldc_tx_get_state, .-sun4v_ldc_tx_get_state | ||
2156 | |||
2157 | /* %o0: channel | ||
2158 | * %o1: tail_off | ||
2159 | * | ||
2160 | * returns %o0: status | ||
2161 | */ | ||
2162 | .globl sun4v_ldc_tx_set_qtail | ||
2163 | .type sun4v_ldc_tx_set_qtail,#function | ||
2164 | sun4v_ldc_tx_set_qtail: | ||
2165 | mov HV_FAST_LDC_TX_SET_QTAIL, %o5 | ||
2166 | ta HV_FAST_TRAP | ||
2167 | retl | ||
2168 | nop | ||
2169 | .size sun4v_ldc_tx_set_qtail, .-sun4v_ldc_tx_set_qtail | ||
2170 | |||
2171 | /* %o0: channel | ||
2172 | * %o1: ra | ||
2173 | * %o2: num_entries | ||
2174 | * | ||
2175 | * returns %o0: status | ||
2176 | */ | ||
2177 | .globl sun4v_ldc_rx_qconf | ||
2178 | .type sun4v_ldc_rx_qconf,#function | ||
2179 | sun4v_ldc_rx_qconf: | ||
2180 | mov HV_FAST_LDC_RX_QCONF, %o5 | ||
2181 | ta HV_FAST_TRAP | ||
2182 | retl | ||
2183 | nop | ||
2184 | .size sun4v_ldc_rx_qconf, .-sun4v_ldc_rx_qconf | ||
2185 | |||
2186 | /* %o0: channel | ||
2187 | * %o1: pointer to unsigned long ra | ||
2188 | * %o2: pointer to unsigned long num_entries | ||
2189 | * | ||
2190 | * returns %o0: status | ||
2191 | */ | ||
2192 | .globl sun4v_ldc_rx_qinfo | ||
2193 | .type sun4v_ldc_rx_qinfo,#function | ||
2194 | sun4v_ldc_rx_qinfo: | ||
2195 | mov %o1, %g1 | ||
2196 | mov %o2, %g2 | ||
2197 | mov HV_FAST_LDC_RX_QINFO, %o5 | ||
2198 | ta HV_FAST_TRAP | ||
2199 | stx %o1, [%g1] | ||
2200 | stx %o2, [%g2] | ||
2201 | retl | ||
2202 | nop | ||
2203 | .size sun4v_ldc_rx_qinfo, .-sun4v_ldc_rx_qinfo | ||
2204 | |||
2205 | /* %o0: channel | ||
2206 | * %o1: pointer to unsigned long head_off | ||
2207 | * %o2: pointer to unsigned long tail_off | ||
2208 | * %o2: pointer to unsigned long chan_state | ||
2209 | * | ||
2210 | * returns %o0: status | ||
2211 | */ | ||
2212 | .globl sun4v_ldc_rx_get_state | ||
2213 | .type sun4v_ldc_rx_get_state,#function | ||
2214 | sun4v_ldc_rx_get_state: | ||
2215 | mov %o1, %g1 | ||
2216 | mov %o2, %g2 | ||
2217 | mov %o3, %g3 | ||
2218 | mov HV_FAST_LDC_RX_GET_STATE, %o5 | ||
2219 | ta HV_FAST_TRAP | ||
2220 | stx %o1, [%g1] | ||
2221 | stx %o2, [%g2] | ||
2222 | stx %o3, [%g3] | ||
2223 | retl | ||
2224 | nop | ||
2225 | .size sun4v_ldc_rx_get_state, .-sun4v_ldc_rx_get_state | ||
2226 | |||
2227 | /* %o0: channel | ||
2228 | * %o1: head_off | ||
2229 | * | ||
2230 | * returns %o0: status | ||
2231 | */ | ||
2232 | .globl sun4v_ldc_rx_set_qhead | ||
2233 | .type sun4v_ldc_rx_set_qhead,#function | ||
2234 | sun4v_ldc_rx_set_qhead: | ||
2235 | mov HV_FAST_LDC_RX_SET_QHEAD, %o5 | ||
2236 | ta HV_FAST_TRAP | ||
2237 | retl | ||
2238 | nop | ||
2239 | .size sun4v_ldc_rx_set_qhead, .-sun4v_ldc_rx_set_qhead | ||
2240 | |||
2241 | /* %o0: channel | ||
2242 | * %o1: ra | ||
2243 | * %o2: num_entries | ||
2244 | * | ||
2245 | * returns %o0: status | ||
2246 | */ | ||
2247 | .globl sun4v_ldc_set_map_table | ||
2248 | .type sun4v_ldc_set_map_table,#function | ||
2249 | sun4v_ldc_set_map_table: | ||
2250 | mov HV_FAST_LDC_SET_MAP_TABLE, %o5 | ||
2251 | ta HV_FAST_TRAP | ||
2252 | retl | ||
2253 | nop | ||
2254 | .size sun4v_ldc_set_map_table, .-sun4v_ldc_set_map_table | ||
2255 | |||
2256 | /* %o0: channel | ||
2257 | * %o1: pointer to unsigned long ra | ||
2258 | * %o2: pointer to unsigned long num_entries | ||
2259 | * | ||
2260 | * returns %o0: status | ||
2261 | */ | ||
2262 | .globl sun4v_ldc_get_map_table | ||
2263 | .type sun4v_ldc_get_map_table,#function | ||
2264 | sun4v_ldc_get_map_table: | ||
2265 | mov %o1, %g1 | ||
2266 | mov %o2, %g2 | ||
2267 | mov HV_FAST_LDC_GET_MAP_TABLE, %o5 | ||
2268 | ta HV_FAST_TRAP | ||
2269 | stx %o1, [%g1] | ||
2270 | stx %o2, [%g2] | ||
2271 | retl | ||
2272 | nop | ||
2273 | .size sun4v_ldc_get_map_table, .-sun4v_ldc_get_map_table | ||
2274 | |||
2275 | /* %o0: channel | ||
2276 | * %o1: dir_code | ||
2277 | * %o2: tgt_raddr | ||
2278 | * %o3: lcl_raddr | ||
2279 | * %o4: len | ||
2280 | * %o5: pointer to unsigned long actual_len | ||
2281 | * | ||
2282 | * returns %o0: status | ||
2283 | */ | ||
2284 | .globl sun4v_ldc_copy | ||
2285 | .type sun4v_ldc_copy,#function | ||
2286 | sun4v_ldc_copy: | ||
2287 | mov %o5, %g1 | ||
2288 | mov HV_FAST_LDC_COPY, %o5 | ||
2289 | ta HV_FAST_TRAP | ||
2290 | stx %o1, [%g1] | ||
2291 | retl | ||
2292 | nop | ||
2293 | .size sun4v_ldc_copy, .-sun4v_ldc_copy | ||
2294 | |||
2295 | /* %o0: channel | ||
2296 | * %o1: cookie | ||
2297 | * %o2: pointer to unsigned long ra | ||
2298 | * %o3: pointer to unsigned long perm | ||
2299 | * | ||
2300 | * returns %o0: status | ||
2301 | */ | ||
2302 | .globl sun4v_ldc_mapin | ||
2303 | .type sun4v_ldc_mapin,#function | ||
2304 | sun4v_ldc_mapin: | ||
2305 | mov %o2, %g1 | ||
2306 | mov %o3, %g2 | ||
2307 | mov HV_FAST_LDC_MAPIN, %o5 | ||
2308 | ta HV_FAST_TRAP | ||
2309 | stx %o1, [%g1] | ||
2310 | stx %o2, [%g2] | ||
2311 | retl | ||
2312 | nop | ||
2313 | .size sun4v_ldc_mapin, .-sun4v_ldc_mapin | ||
2314 | |||
2315 | /* %o0: ra | ||
2316 | * | ||
2317 | * returns %o0: status | ||
2318 | */ | ||
2319 | .globl sun4v_ldc_unmap | ||
2320 | .type sun4v_ldc_unmap,#function | ||
2321 | sun4v_ldc_unmap: | ||
2322 | mov HV_FAST_LDC_UNMAP, %o5 | ||
2323 | ta HV_FAST_TRAP | ||
2324 | retl | ||
2325 | nop | ||
2326 | .size sun4v_ldc_unmap, .-sun4v_ldc_unmap | ||
2327 | |||
2328 | /* %o0: channel | ||
2329 | * %o1: cookie | ||
2330 | * %o2: mte_cookie | ||
2331 | * | ||
2332 | * returns %o0: status | ||
2333 | */ | ||
2334 | .globl sun4v_ldc_revoke | ||
2335 | .type sun4v_ldc_revoke,#function | ||
2336 | sun4v_ldc_revoke: | ||
2337 | mov HV_FAST_LDC_REVOKE, %o5 | ||
2338 | ta HV_FAST_TRAP | ||
2339 | retl | ||
2340 | nop | ||
2341 | .size sun4v_ldc_revoke, .-sun4v_ldc_revoke | ||
2342 | |||
2343 | /* %o0: device handle | ||
2344 | * %o1: device INO | ||
2345 | * %o2: pointer to unsigned long cookie | ||
2346 | * | ||
2347 | * returns %o0: status | ||
2348 | */ | ||
2349 | .globl sun4v_vintr_get_cookie | ||
2350 | .type sun4v_vintr_get_cookie,#function | ||
2351 | sun4v_vintr_get_cookie: | ||
2352 | mov %o2, %g1 | ||
2353 | mov HV_FAST_VINTR_GET_COOKIE, %o5 | ||
2354 | ta HV_FAST_TRAP | ||
2355 | stx %o1, [%g1] | ||
2356 | retl | ||
2357 | nop | ||
2358 | .size sun4v_vintr_get_cookie, .-sun4v_vintr_get_cookie | ||
2359 | |||
2360 | /* %o0: device handle | ||
2361 | * %o1: device INO | ||
2362 | * %o2: cookie | ||
2363 | * | ||
2364 | * returns %o0: status | ||
2365 | */ | ||
2366 | .globl sun4v_vintr_set_cookie | ||
2367 | .type sun4v_vintr_set_cookie,#function | ||
2368 | sun4v_vintr_set_cookie: | ||
2369 | mov HV_FAST_VINTR_SET_COOKIE, %o5 | ||
2370 | ta HV_FAST_TRAP | ||
2371 | retl | ||
2372 | nop | ||
2373 | .size sun4v_vintr_set_cookie, .-sun4v_vintr_set_cookie | ||
2374 | |||
2375 | /* %o0: device handle | ||
2376 | * %o1: device INO | ||
2377 | * %o2: pointer to unsigned long valid_state | ||
2378 | * | ||
2379 | * returns %o0: status | ||
2380 | */ | ||
2381 | .globl sun4v_vintr_get_valid | ||
2382 | .type sun4v_vintr_get_valid,#function | ||
2383 | sun4v_vintr_get_valid: | ||
2384 | mov %o2, %g1 | ||
2385 | mov HV_FAST_VINTR_GET_VALID, %o5 | ||
2386 | ta HV_FAST_TRAP | ||
2387 | stx %o1, [%g1] | ||
2388 | retl | ||
2389 | nop | ||
2390 | .size sun4v_vintr_get_valid, .-sun4v_vintr_get_valid | ||
2391 | |||
2392 | /* %o0: device handle | ||
2393 | * %o1: device INO | ||
2394 | * %o2: valid_state | ||
2395 | * | ||
2396 | * returns %o0: status | ||
2397 | */ | ||
2398 | .globl sun4v_vintr_set_valid | ||
2399 | .type sun4v_vintr_set_valid,#function | ||
2400 | sun4v_vintr_set_valid: | ||
2401 | mov HV_FAST_VINTR_SET_VALID, %o5 | ||
2402 | ta HV_FAST_TRAP | ||
2403 | retl | ||
2404 | nop | ||
2405 | .size sun4v_vintr_set_valid, .-sun4v_vintr_set_valid | ||
2406 | |||
2407 | /* %o0: device handle | ||
2408 | * %o1: device INO | ||
2409 | * %o2: pointer to unsigned long state | ||
2410 | * | ||
2411 | * returns %o0: status | ||
2412 | */ | ||
2413 | .globl sun4v_vintr_get_state | ||
2414 | .type sun4v_vintr_get_state,#function | ||
2415 | sun4v_vintr_get_state: | ||
2416 | mov %o2, %g1 | ||
2417 | mov HV_FAST_VINTR_GET_STATE, %o5 | ||
2418 | ta HV_FAST_TRAP | ||
2419 | stx %o1, [%g1] | ||
2420 | retl | ||
2421 | nop | ||
2422 | .size sun4v_vintr_get_state, .-sun4v_vintr_get_state | ||
2423 | |||
2424 | /* %o0: device handle | ||
2425 | * %o1: device INO | ||
2426 | * %o2: state | ||
2427 | * | ||
2428 | * returns %o0: status | ||
2429 | */ | ||
2430 | .globl sun4v_vintr_set_state | ||
2431 | .type sun4v_vintr_set_state,#function | ||
2432 | sun4v_vintr_set_state: | ||
2433 | mov HV_FAST_VINTR_SET_STATE, %o5 | ||
2434 | ta HV_FAST_TRAP | ||
2435 | retl | ||
2436 | nop | ||
2437 | .size sun4v_vintr_set_state, .-sun4v_vintr_set_state | ||
2438 | |||
2439 | /* %o0: device handle | ||
2440 | * %o1: device INO | ||
2441 | * %o2: pointer to unsigned long cpuid | ||
2442 | * | ||
2443 | * returns %o0: status | ||
2444 | */ | ||
2445 | .globl sun4v_vintr_get_target | ||
2446 | .type sun4v_vintr_get_target,#function | ||
2447 | sun4v_vintr_get_target: | ||
2448 | mov %o2, %g1 | ||
2449 | mov HV_FAST_VINTR_GET_TARGET, %o5 | ||
2450 | ta HV_FAST_TRAP | ||
2451 | stx %o1, [%g1] | ||
2452 | retl | ||
2453 | nop | ||
2454 | .size sun4v_vintr_get_target, .-sun4v_vintr_get_target | ||
2455 | |||
2456 | /* %o0: device handle | ||
2457 | * %o1: device INO | ||
2458 | * %o2: cpuid | ||
2459 | * | ||
2460 | * returns %o0: status | ||
2461 | */ | ||
2462 | .globl sun4v_vintr_set_target | ||
2463 | .type sun4v_vintr_set_target,#function | ||
2464 | sun4v_vintr_set_target: | ||
2465 | mov HV_FAST_VINTR_SET_TARGET, %o5 | ||
2466 | ta HV_FAST_TRAP | ||
2467 | retl | ||
2468 | nop | ||
2469 | .size sun4v_vintr_set_target, .-sun4v_vintr_set_target | ||
2470 | |||
2471 | /* %o0: NCS sub-function | ||
2472 | * %o1: sub-function arg real-address | ||
2473 | * %o2: sub-function arg size | ||
2474 | * | ||
2475 | * returns %o0: status | ||
2476 | */ | ||
2477 | .globl sun4v_ncs_request | ||
2478 | .type sun4v_ncs_request,#function | ||
2479 | sun4v_ncs_request: | ||
2480 | mov HV_FAST_NCS_REQUEST, %o5 | ||
2481 | ta HV_FAST_TRAP | ||
2482 | retl | ||
2483 | nop | ||
2484 | .size sun4v_ncs_request, .-sun4v_ncs_request | ||
2485 | |||
2486 | .globl sun4v_svc_send | ||
2487 | .type sun4v_svc_send,#function | ||
2488 | sun4v_svc_send: | ||
2489 | save %sp, -192, %sp | ||
2490 | mov %i0, %o0 | ||
2491 | mov %i1, %o1 | ||
2492 | mov %i2, %o2 | ||
2493 | mov HV_FAST_SVC_SEND, %o5 | ||
2494 | ta HV_FAST_TRAP | ||
2495 | stx %o1, [%i3] | ||
2496 | ret | ||
2497 | restore | ||
2498 | .size sun4v_svc_send, .-sun4v_svc_send | ||
2499 | |||
2500 | .globl sun4v_svc_recv | ||
2501 | .type sun4v_svc_recv,#function | ||
2502 | sun4v_svc_recv: | ||
2503 | save %sp, -192, %sp | ||
2504 | mov %i0, %o0 | ||
2505 | mov %i1, %o1 | ||
2506 | mov %i2, %o2 | ||
2507 | mov HV_FAST_SVC_RECV, %o5 | ||
2508 | ta HV_FAST_TRAP | ||
2509 | stx %o1, [%i3] | ||
2510 | ret | ||
2511 | restore | ||
2512 | .size sun4v_svc_recv, .-sun4v_svc_recv | ||
2513 | |||
2514 | .globl sun4v_svc_getstatus | ||
2515 | .type sun4v_svc_getstatus,#function | ||
2516 | sun4v_svc_getstatus: | ||
2517 | mov HV_FAST_SVC_GETSTATUS, %o5 | ||
2518 | mov %o1, %o4 | ||
2519 | ta HV_FAST_TRAP | ||
2520 | stx %o1, [%o4] | ||
2521 | retl | ||
2522 | nop | ||
2523 | .size sun4v_svc_getstatus, .-sun4v_svc_getstatus | ||
2524 | |||
2525 | .globl sun4v_svc_setstatus | ||
2526 | .type sun4v_svc_setstatus,#function | ||
2527 | sun4v_svc_setstatus: | ||
2528 | mov HV_FAST_SVC_SETSTATUS, %o5 | ||
2529 | ta HV_FAST_TRAP | ||
2530 | retl | ||
2531 | nop | ||
2532 | .size sun4v_svc_setstatus, .-sun4v_svc_setstatus | ||
2533 | |||
2534 | .globl sun4v_svc_clrstatus | ||
2535 | .type sun4v_svc_clrstatus,#function | ||
2536 | sun4v_svc_clrstatus: | ||
2537 | mov HV_FAST_SVC_CLRSTATUS, %o5 | ||
2538 | ta HV_FAST_TRAP | ||
2539 | retl | ||
2540 | nop | ||
2541 | .size sun4v_svc_clrstatus, .-sun4v_svc_clrstatus | ||
2542 | |||
2543 | .globl sun4v_mmustat_conf | ||
2544 | .type sun4v_mmustat_conf,#function | ||
2545 | sun4v_mmustat_conf: | ||
2546 | mov %o1, %o4 | ||
2547 | mov HV_FAST_MMUSTAT_CONF, %o5 | ||
2548 | ta HV_FAST_TRAP | ||
2549 | stx %o1, [%o4] | ||
2550 | retl | ||
2551 | nop | ||
2552 | .size sun4v_mmustat_conf, .-sun4v_mmustat_conf | ||
2553 | |||
2554 | .globl sun4v_mmustat_info | ||
2555 | .type sun4v_mmustat_info,#function | ||
2556 | sun4v_mmustat_info: | ||
2557 | mov %o0, %o4 | ||
2558 | mov HV_FAST_MMUSTAT_INFO, %o5 | ||
2559 | ta HV_FAST_TRAP | ||
2560 | stx %o1, [%o4] | ||
2561 | retl | ||
2562 | nop | ||
2563 | .size sun4v_mmustat_info, .-sun4v_mmustat_info | ||
2564 | |||
2565 | .globl sun4v_mmu_demap_all | ||
2566 | .type sun4v_mmu_demap_all,#function | ||
2567 | sun4v_mmu_demap_all: | ||
2568 | clr %o0 | ||
2569 | clr %o1 | ||
2570 | mov HV_MMU_ALL, %o2 | ||
2571 | mov HV_FAST_MMU_DEMAP_ALL, %o5 | ||
2572 | ta HV_FAST_TRAP | ||
2573 | retl | ||
2574 | nop | ||
2575 | .size sun4v_mmu_demap_all, .-sun4v_mmu_demap_all | ||
diff --git a/arch/sparc64/kernel/fpu_traps.S b/arch/sparc64/kernel/fpu_traps.S new file mode 100644 index 000000000000..a6864826a4bd --- /dev/null +++ b/arch/sparc64/kernel/fpu_traps.S | |||
@@ -0,0 +1,384 @@ | |||
1 | /* This is trivial with the new code... */ | ||
2 | .globl do_fpdis | ||
3 | .type do_fpdis,#function | ||
4 | do_fpdis: | ||
5 | sethi %hi(TSTATE_PEF), %g4 | ||
6 | rdpr %tstate, %g5 | ||
7 | andcc %g5, %g4, %g0 | ||
8 | be,pt %xcc, 1f | ||
9 | nop | ||
10 | rd %fprs, %g5 | ||
11 | andcc %g5, FPRS_FEF, %g0 | ||
12 | be,pt %xcc, 1f | ||
13 | nop | ||
14 | |||
15 | /* Legal state when DCR_IFPOE is set in Cheetah %dcr. */ | ||
16 | sethi %hi(109f), %g7 | ||
17 | ba,pt %xcc, etrap | ||
18 | 109: or %g7, %lo(109b), %g7 | ||
19 | add %g0, %g0, %g0 | ||
20 | ba,a,pt %xcc, rtrap | ||
21 | |||
22 | 1: TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
23 | ldub [%g6 + TI_FPSAVED], %g5 | ||
24 | wr %g0, FPRS_FEF, %fprs | ||
25 | andcc %g5, FPRS_FEF, %g0 | ||
26 | be,a,pt %icc, 1f | ||
27 | clr %g7 | ||
28 | ldx [%g6 + TI_GSR], %g7 | ||
29 | 1: andcc %g5, FPRS_DL, %g0 | ||
30 | bne,pn %icc, 2f | ||
31 | fzero %f0 | ||
32 | andcc %g5, FPRS_DU, %g0 | ||
33 | bne,pn %icc, 1f | ||
34 | fzero %f2 | ||
35 | faddd %f0, %f2, %f4 | ||
36 | fmuld %f0, %f2, %f6 | ||
37 | faddd %f0, %f2, %f8 | ||
38 | fmuld %f0, %f2, %f10 | ||
39 | faddd %f0, %f2, %f12 | ||
40 | fmuld %f0, %f2, %f14 | ||
41 | faddd %f0, %f2, %f16 | ||
42 | fmuld %f0, %f2, %f18 | ||
43 | faddd %f0, %f2, %f20 | ||
44 | fmuld %f0, %f2, %f22 | ||
45 | faddd %f0, %f2, %f24 | ||
46 | fmuld %f0, %f2, %f26 | ||
47 | faddd %f0, %f2, %f28 | ||
48 | fmuld %f0, %f2, %f30 | ||
49 | faddd %f0, %f2, %f32 | ||
50 | fmuld %f0, %f2, %f34 | ||
51 | faddd %f0, %f2, %f36 | ||
52 | fmuld %f0, %f2, %f38 | ||
53 | faddd %f0, %f2, %f40 | ||
54 | fmuld %f0, %f2, %f42 | ||
55 | faddd %f0, %f2, %f44 | ||
56 | fmuld %f0, %f2, %f46 | ||
57 | faddd %f0, %f2, %f48 | ||
58 | fmuld %f0, %f2, %f50 | ||
59 | faddd %f0, %f2, %f52 | ||
60 | fmuld %f0, %f2, %f54 | ||
61 | faddd %f0, %f2, %f56 | ||
62 | fmuld %f0, %f2, %f58 | ||
63 | b,pt %xcc, fpdis_exit2 | ||
64 | faddd %f0, %f2, %f60 | ||
65 | 1: mov SECONDARY_CONTEXT, %g3 | ||
66 | add %g6, TI_FPREGS + 0x80, %g1 | ||
67 | faddd %f0, %f2, %f4 | ||
68 | fmuld %f0, %f2, %f6 | ||
69 | |||
70 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
71 | .section .sun4v_1insn_patch, "ax" | ||
72 | .word 661b | ||
73 | ldxa [%g3] ASI_MMU, %g5 | ||
74 | .previous | ||
75 | |||
76 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
77 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
78 | |||
79 | 661: stxa %g2, [%g3] ASI_DMMU | ||
80 | .section .sun4v_1insn_patch, "ax" | ||
81 | .word 661b | ||
82 | stxa %g2, [%g3] ASI_MMU | ||
83 | .previous | ||
84 | |||
85 | membar #Sync | ||
86 | add %g6, TI_FPREGS + 0xc0, %g2 | ||
87 | faddd %f0, %f2, %f8 | ||
88 | fmuld %f0, %f2, %f10 | ||
89 | membar #Sync | ||
90 | ldda [%g1] ASI_BLK_S, %f32 | ||
91 | ldda [%g2] ASI_BLK_S, %f48 | ||
92 | membar #Sync | ||
93 | faddd %f0, %f2, %f12 | ||
94 | fmuld %f0, %f2, %f14 | ||
95 | faddd %f0, %f2, %f16 | ||
96 | fmuld %f0, %f2, %f18 | ||
97 | faddd %f0, %f2, %f20 | ||
98 | fmuld %f0, %f2, %f22 | ||
99 | faddd %f0, %f2, %f24 | ||
100 | fmuld %f0, %f2, %f26 | ||
101 | faddd %f0, %f2, %f28 | ||
102 | fmuld %f0, %f2, %f30 | ||
103 | b,pt %xcc, fpdis_exit | ||
104 | nop | ||
105 | 2: andcc %g5, FPRS_DU, %g0 | ||
106 | bne,pt %icc, 3f | ||
107 | fzero %f32 | ||
108 | mov SECONDARY_CONTEXT, %g3 | ||
109 | fzero %f34 | ||
110 | |||
111 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
112 | .section .sun4v_1insn_patch, "ax" | ||
113 | .word 661b | ||
114 | ldxa [%g3] ASI_MMU, %g5 | ||
115 | .previous | ||
116 | |||
117 | add %g6, TI_FPREGS, %g1 | ||
118 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
119 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
120 | |||
121 | 661: stxa %g2, [%g3] ASI_DMMU | ||
122 | .section .sun4v_1insn_patch, "ax" | ||
123 | .word 661b | ||
124 | stxa %g2, [%g3] ASI_MMU | ||
125 | .previous | ||
126 | |||
127 | membar #Sync | ||
128 | add %g6, TI_FPREGS + 0x40, %g2 | ||
129 | faddd %f32, %f34, %f36 | ||
130 | fmuld %f32, %f34, %f38 | ||
131 | membar #Sync | ||
132 | ldda [%g1] ASI_BLK_S, %f0 | ||
133 | ldda [%g2] ASI_BLK_S, %f16 | ||
134 | membar #Sync | ||
135 | faddd %f32, %f34, %f40 | ||
136 | fmuld %f32, %f34, %f42 | ||
137 | faddd %f32, %f34, %f44 | ||
138 | fmuld %f32, %f34, %f46 | ||
139 | faddd %f32, %f34, %f48 | ||
140 | fmuld %f32, %f34, %f50 | ||
141 | faddd %f32, %f34, %f52 | ||
142 | fmuld %f32, %f34, %f54 | ||
143 | faddd %f32, %f34, %f56 | ||
144 | fmuld %f32, %f34, %f58 | ||
145 | faddd %f32, %f34, %f60 | ||
146 | fmuld %f32, %f34, %f62 | ||
147 | ba,pt %xcc, fpdis_exit | ||
148 | nop | ||
149 | 3: mov SECONDARY_CONTEXT, %g3 | ||
150 | add %g6, TI_FPREGS, %g1 | ||
151 | |||
152 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
153 | .section .sun4v_1insn_patch, "ax" | ||
154 | .word 661b | ||
155 | ldxa [%g3] ASI_MMU, %g5 | ||
156 | .previous | ||
157 | |||
158 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
159 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
160 | |||
161 | 661: stxa %g2, [%g3] ASI_DMMU | ||
162 | .section .sun4v_1insn_patch, "ax" | ||
163 | .word 661b | ||
164 | stxa %g2, [%g3] ASI_MMU | ||
165 | .previous | ||
166 | |||
167 | membar #Sync | ||
168 | mov 0x40, %g2 | ||
169 | membar #Sync | ||
170 | ldda [%g1] ASI_BLK_S, %f0 | ||
171 | ldda [%g1 + %g2] ASI_BLK_S, %f16 | ||
172 | add %g1, 0x80, %g1 | ||
173 | ldda [%g1] ASI_BLK_S, %f32 | ||
174 | ldda [%g1 + %g2] ASI_BLK_S, %f48 | ||
175 | membar #Sync | ||
176 | fpdis_exit: | ||
177 | |||
178 | 661: stxa %g5, [%g3] ASI_DMMU | ||
179 | .section .sun4v_1insn_patch, "ax" | ||
180 | .word 661b | ||
181 | stxa %g5, [%g3] ASI_MMU | ||
182 | .previous | ||
183 | |||
184 | membar #Sync | ||
185 | fpdis_exit2: | ||
186 | wr %g7, 0, %gsr | ||
187 | ldx [%g6 + TI_XFSR], %fsr | ||
188 | rdpr %tstate, %g3 | ||
189 | or %g3, %g4, %g3 ! anal... | ||
190 | wrpr %g3, %tstate | ||
191 | wr %g0, FPRS_FEF, %fprs ! clean DU/DL bits | ||
192 | retry | ||
193 | .size do_fpdis,.-do_fpdis | ||
194 | |||
195 | .align 32 | ||
196 | .type fp_other_bounce,#function | ||
197 | fp_other_bounce: | ||
198 | call do_fpother | ||
199 | add %sp, PTREGS_OFF, %o0 | ||
200 | ba,pt %xcc, rtrap | ||
201 | nop | ||
202 | .size fp_other_bounce,.-fp_other_bounce | ||
203 | |||
204 | .align 32 | ||
205 | .globl do_fpother_check_fitos | ||
206 | .type do_fpother_check_fitos,#function | ||
207 | do_fpother_check_fitos: | ||
208 | TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
209 | sethi %hi(fp_other_bounce - 4), %g7 | ||
210 | or %g7, %lo(fp_other_bounce - 4), %g7 | ||
211 | |||
212 | /* NOTE: Need to preserve %g7 until we fully commit | ||
213 | * to the fitos fixup. | ||
214 | */ | ||
215 | stx %fsr, [%g6 + TI_XFSR] | ||
216 | rdpr %tstate, %g3 | ||
217 | andcc %g3, TSTATE_PRIV, %g0 | ||
218 | bne,pn %xcc, do_fptrap_after_fsr | ||
219 | nop | ||
220 | ldx [%g6 + TI_XFSR], %g3 | ||
221 | srlx %g3, 14, %g1 | ||
222 | and %g1, 7, %g1 | ||
223 | cmp %g1, 2 ! Unfinished FP-OP | ||
224 | bne,pn %xcc, do_fptrap_after_fsr | ||
225 | sethi %hi(1 << 23), %g1 ! Inexact | ||
226 | andcc %g3, %g1, %g0 | ||
227 | bne,pn %xcc, do_fptrap_after_fsr | ||
228 | rdpr %tpc, %g1 | ||
229 | lduwa [%g1] ASI_AIUP, %g3 ! This cannot ever fail | ||
230 | #define FITOS_MASK 0xc1f83fe0 | ||
231 | #define FITOS_COMPARE 0x81a01880 | ||
232 | sethi %hi(FITOS_MASK), %g1 | ||
233 | or %g1, %lo(FITOS_MASK), %g1 | ||
234 | and %g3, %g1, %g1 | ||
235 | sethi %hi(FITOS_COMPARE), %g2 | ||
236 | or %g2, %lo(FITOS_COMPARE), %g2 | ||
237 | cmp %g1, %g2 | ||
238 | bne,pn %xcc, do_fptrap_after_fsr | ||
239 | nop | ||
240 | std %f62, [%g6 + TI_FPREGS + (62 * 4)] | ||
241 | sethi %hi(fitos_table_1), %g1 | ||
242 | and %g3, 0x1f, %g2 | ||
243 | or %g1, %lo(fitos_table_1), %g1 | ||
244 | sllx %g2, 2, %g2 | ||
245 | jmpl %g1 + %g2, %g0 | ||
246 | ba,pt %xcc, fitos_emul_continue | ||
247 | |||
248 | fitos_table_1: | ||
249 | fitod %f0, %f62 | ||
250 | fitod %f1, %f62 | ||
251 | fitod %f2, %f62 | ||
252 | fitod %f3, %f62 | ||
253 | fitod %f4, %f62 | ||
254 | fitod %f5, %f62 | ||
255 | fitod %f6, %f62 | ||
256 | fitod %f7, %f62 | ||
257 | fitod %f8, %f62 | ||
258 | fitod %f9, %f62 | ||
259 | fitod %f10, %f62 | ||
260 | fitod %f11, %f62 | ||
261 | fitod %f12, %f62 | ||
262 | fitod %f13, %f62 | ||
263 | fitod %f14, %f62 | ||
264 | fitod %f15, %f62 | ||
265 | fitod %f16, %f62 | ||
266 | fitod %f17, %f62 | ||
267 | fitod %f18, %f62 | ||
268 | fitod %f19, %f62 | ||
269 | fitod %f20, %f62 | ||
270 | fitod %f21, %f62 | ||
271 | fitod %f22, %f62 | ||
272 | fitod %f23, %f62 | ||
273 | fitod %f24, %f62 | ||
274 | fitod %f25, %f62 | ||
275 | fitod %f26, %f62 | ||
276 | fitod %f27, %f62 | ||
277 | fitod %f28, %f62 | ||
278 | fitod %f29, %f62 | ||
279 | fitod %f30, %f62 | ||
280 | fitod %f31, %f62 | ||
281 | |||
282 | fitos_emul_continue: | ||
283 | sethi %hi(fitos_table_2), %g1 | ||
284 | srl %g3, 25, %g2 | ||
285 | or %g1, %lo(fitos_table_2), %g1 | ||
286 | and %g2, 0x1f, %g2 | ||
287 | sllx %g2, 2, %g2 | ||
288 | jmpl %g1 + %g2, %g0 | ||
289 | ba,pt %xcc, fitos_emul_fini | ||
290 | |||
291 | fitos_table_2: | ||
292 | fdtos %f62, %f0 | ||
293 | fdtos %f62, %f1 | ||
294 | fdtos %f62, %f2 | ||
295 | fdtos %f62, %f3 | ||
296 | fdtos %f62, %f4 | ||
297 | fdtos %f62, %f5 | ||
298 | fdtos %f62, %f6 | ||
299 | fdtos %f62, %f7 | ||
300 | fdtos %f62, %f8 | ||
301 | fdtos %f62, %f9 | ||
302 | fdtos %f62, %f10 | ||
303 | fdtos %f62, %f11 | ||
304 | fdtos %f62, %f12 | ||
305 | fdtos %f62, %f13 | ||
306 | fdtos %f62, %f14 | ||
307 | fdtos %f62, %f15 | ||
308 | fdtos %f62, %f16 | ||
309 | fdtos %f62, %f17 | ||
310 | fdtos %f62, %f18 | ||
311 | fdtos %f62, %f19 | ||
312 | fdtos %f62, %f20 | ||
313 | fdtos %f62, %f21 | ||
314 | fdtos %f62, %f22 | ||
315 | fdtos %f62, %f23 | ||
316 | fdtos %f62, %f24 | ||
317 | fdtos %f62, %f25 | ||
318 | fdtos %f62, %f26 | ||
319 | fdtos %f62, %f27 | ||
320 | fdtos %f62, %f28 | ||
321 | fdtos %f62, %f29 | ||
322 | fdtos %f62, %f30 | ||
323 | fdtos %f62, %f31 | ||
324 | |||
325 | fitos_emul_fini: | ||
326 | ldd [%g6 + TI_FPREGS + (62 * 4)], %f62 | ||
327 | done | ||
328 | .size do_fpother_check_fitos,.-do_fpother_check_fitos | ||
329 | |||
330 | .align 32 | ||
331 | .globl do_fptrap | ||
332 | .type do_fptrap,#function | ||
333 | do_fptrap: | ||
334 | TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
335 | stx %fsr, [%g6 + TI_XFSR] | ||
336 | do_fptrap_after_fsr: | ||
337 | ldub [%g6 + TI_FPSAVED], %g3 | ||
338 | rd %fprs, %g1 | ||
339 | or %g3, %g1, %g3 | ||
340 | stb %g3, [%g6 + TI_FPSAVED] | ||
341 | rd %gsr, %g3 | ||
342 | stx %g3, [%g6 + TI_GSR] | ||
343 | mov SECONDARY_CONTEXT, %g3 | ||
344 | |||
345 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
346 | .section .sun4v_1insn_patch, "ax" | ||
347 | .word 661b | ||
348 | ldxa [%g3] ASI_MMU, %g5 | ||
349 | .previous | ||
350 | |||
351 | sethi %hi(sparc64_kern_sec_context), %g2 | ||
352 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | ||
353 | |||
354 | 661: stxa %g2, [%g3] ASI_DMMU | ||
355 | .section .sun4v_1insn_patch, "ax" | ||
356 | .word 661b | ||
357 | stxa %g2, [%g3] ASI_MMU | ||
358 | .previous | ||
359 | |||
360 | membar #Sync | ||
361 | add %g6, TI_FPREGS, %g2 | ||
362 | andcc %g1, FPRS_DL, %g0 | ||
363 | be,pn %icc, 4f | ||
364 | mov 0x40, %g3 | ||
365 | stda %f0, [%g2] ASI_BLK_S | ||
366 | stda %f16, [%g2 + %g3] ASI_BLK_S | ||
367 | andcc %g1, FPRS_DU, %g0 | ||
368 | be,pn %icc, 5f | ||
369 | 4: add %g2, 128, %g2 | ||
370 | stda %f32, [%g2] ASI_BLK_S | ||
371 | stda %f48, [%g2 + %g3] ASI_BLK_S | ||
372 | 5: mov SECONDARY_CONTEXT, %g1 | ||
373 | membar #Sync | ||
374 | |||
375 | 661: stxa %g5, [%g1] ASI_DMMU | ||
376 | .section .sun4v_1insn_patch, "ax" | ||
377 | .word 661b | ||
378 | stxa %g5, [%g1] ASI_MMU | ||
379 | .previous | ||
380 | |||
381 | membar #Sync | ||
382 | ba,pt %xcc, etrap | ||
383 | wr %g0, 0, %fprs | ||
384 | .size do_fptrap,.-do_fptrap | ||
diff --git a/arch/sparc64/kernel/getsetcc.S b/arch/sparc64/kernel/getsetcc.S new file mode 100644 index 000000000000..a14d272d2061 --- /dev/null +++ b/arch/sparc64/kernel/getsetcc.S | |||
@@ -0,0 +1,24 @@ | |||
1 | .globl getcc | ||
2 | .type getcc,#function | ||
3 | getcc: | ||
4 | ldx [%o0 + PT_V9_TSTATE], %o1 | ||
5 | srlx %o1, 32, %o1 | ||
6 | and %o1, 0xf, %o1 | ||
7 | retl | ||
8 | stx %o1, [%o0 + PT_V9_G1] | ||
9 | .size getcc,.-getcc | ||
10 | |||
11 | .globl setcc | ||
12 | .type setcc,#function | ||
13 | setcc: | ||
14 | ldx [%o0 + PT_V9_TSTATE], %o1 | ||
15 | ldx [%o0 + PT_V9_G1], %o2 | ||
16 | or %g0, %ulo(TSTATE_ICC), %o3 | ||
17 | sllx %o3, 32, %o3 | ||
18 | andn %o1, %o3, %o1 | ||
19 | sllx %o2, 32, %o2 | ||
20 | and %o2, %o3, %o2 | ||
21 | or %o1, %o2, %o1 | ||
22 | retl | ||
23 | stx %o1, [%o0 + PT_V9_TSTATE] | ||
24 | .size setcc,.-setcc | ||
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index 34f8ff57c56b..c9afef093d51 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
@@ -27,6 +27,10 @@ | |||
27 | #include <asm/ttable.h> | 27 | #include <asm/ttable.h> |
28 | #include <asm/mmu.h> | 28 | #include <asm/mmu.h> |
29 | #include <asm/cpudata.h> | 29 | #include <asm/cpudata.h> |
30 | #include <asm/pil.h> | ||
31 | #include <asm/estate.h> | ||
32 | #include <asm/sfafsr.h> | ||
33 | #include <asm/unistd.h> | ||
30 | 34 | ||
31 | /* This section from from _start to sparc64_boot_end should fit into | 35 | /* This section from from _start to sparc64_boot_end should fit into |
32 | * 0x0000000000404000 to 0x0000000000408000. | 36 | * 0x0000000000404000 to 0x0000000000408000. |
@@ -823,7 +827,16 @@ sparc64_boot_end: | |||
823 | #include "etrap.S" | 827 | #include "etrap.S" |
824 | #include "rtrap.S" | 828 | #include "rtrap.S" |
825 | #include "winfixup.S" | 829 | #include "winfixup.S" |
826 | #include "entry.S" | 830 | #include "fpu_traps.S" |
831 | #include "ivec.S" | ||
832 | #include "getsetcc.S" | ||
833 | #include "utrap.S" | ||
834 | #include "spiterrs.S" | ||
835 | #include "cherrs.S" | ||
836 | #include "misctrap.S" | ||
837 | #include "syscalls.S" | ||
838 | #include "helpers.S" | ||
839 | #include "hvcalls.S" | ||
827 | #include "sun4v_tlb_miss.S" | 840 | #include "sun4v_tlb_miss.S" |
828 | #include "sun4v_ivec.S" | 841 | #include "sun4v_ivec.S" |
829 | #include "ktlb.S" | 842 | #include "ktlb.S" |
diff --git a/arch/sparc64/kernel/helpers.S b/arch/sparc64/kernel/helpers.S new file mode 100644 index 000000000000..314dd0c9fc5b --- /dev/null +++ b/arch/sparc64/kernel/helpers.S | |||
@@ -0,0 +1,63 @@ | |||
1 | .align 32 | ||
2 | .globl __flushw_user | ||
3 | .type __flushw_user,#function | ||
4 | __flushw_user: | ||
5 | rdpr %otherwin, %g1 | ||
6 | brz,pn %g1, 2f | ||
7 | clr %g2 | ||
8 | 1: save %sp, -128, %sp | ||
9 | rdpr %otherwin, %g1 | ||
10 | brnz,pt %g1, 1b | ||
11 | add %g2, 1, %g2 | ||
12 | 1: sub %g2, 1, %g2 | ||
13 | brnz,pt %g2, 1b | ||
14 | restore %g0, %g0, %g0 | ||
15 | 2: retl | ||
16 | nop | ||
17 | .size __flushw_user,.-__flushw_user | ||
18 | |||
19 | /* Flush %fp and %i7 to the stack for all register | ||
20 | * windows active inside of the cpu. This allows | ||
21 | * show_stack_trace() to avoid using an expensive | ||
22 | * 'flushw'. | ||
23 | */ | ||
24 | .globl stack_trace_flush | ||
25 | .type stack_trace_flush,#function | ||
26 | stack_trace_flush: | ||
27 | rdpr %pstate, %o0 | ||
28 | wrpr %o0, PSTATE_IE, %pstate | ||
29 | |||
30 | rdpr %cwp, %g1 | ||
31 | rdpr %canrestore, %g2 | ||
32 | sub %g1, 1, %g3 | ||
33 | |||
34 | 1: brz,pn %g2, 2f | ||
35 | sub %g2, 1, %g2 | ||
36 | wrpr %g3, %cwp | ||
37 | stx %fp, [%sp + STACK_BIAS + RW_V9_I6] | ||
38 | stx %i7, [%sp + STACK_BIAS + RW_V9_I7] | ||
39 | ba,pt %xcc, 1b | ||
40 | sub %g3, 1, %g3 | ||
41 | |||
42 | 2: wrpr %g1, %cwp | ||
43 | wrpr %o0, %pstate | ||
44 | |||
45 | retl | ||
46 | nop | ||
47 | .size stack_trace_flush,.-stack_trace_flush | ||
48 | |||
49 | #ifdef CONFIG_SMP | ||
50 | .globl hard_smp_processor_id | ||
51 | .type hard_smp_processor_id,#function | ||
52 | hard_smp_processor_id: | ||
53 | #endif | ||
54 | .globl real_hard_smp_processor_id | ||
55 | .type real_hard_smp_processor_id,#function | ||
56 | real_hard_smp_processor_id: | ||
57 | __GET_CPUID(%o0) | ||
58 | retl | ||
59 | nop | ||
60 | #ifdef CONFIG_SMP | ||
61 | .size hard_smp_processor_id,.-hard_smp_processor_id | ||
62 | #endif | ||
63 | .size real_hard_smp_processor_id,.-real_hard_smp_processor_id | ||
diff --git a/arch/sparc64/kernel/hvcalls.S b/arch/sparc64/kernel/hvcalls.S new file mode 100644 index 000000000000..a2810f3ac70f --- /dev/null +++ b/arch/sparc64/kernel/hvcalls.S | |||
@@ -0,0 +1,886 @@ | |||
1 | /* %o0: devhandle | ||
2 | * %o1: devino | ||
3 | * | ||
4 | * returns %o0: sysino | ||
5 | */ | ||
6 | .globl sun4v_devino_to_sysino | ||
7 | .type sun4v_devino_to_sysino,#function | ||
8 | sun4v_devino_to_sysino: | ||
9 | mov HV_FAST_INTR_DEVINO2SYSINO, %o5 | ||
10 | ta HV_FAST_TRAP | ||
11 | retl | ||
12 | mov %o1, %o0 | ||
13 | .size sun4v_devino_to_sysino, .-sun4v_devino_to_sysino | ||
14 | |||
15 | /* %o0: sysino | ||
16 | * | ||
17 | * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED}) | ||
18 | */ | ||
19 | .globl sun4v_intr_getenabled | ||
20 | .type sun4v_intr_getenabled,#function | ||
21 | sun4v_intr_getenabled: | ||
22 | mov HV_FAST_INTR_GETENABLED, %o5 | ||
23 | ta HV_FAST_TRAP | ||
24 | retl | ||
25 | mov %o1, %o0 | ||
26 | .size sun4v_intr_getenabled, .-sun4v_intr_getenabled | ||
27 | |||
28 | /* %o0: sysino | ||
29 | * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED}) | ||
30 | */ | ||
31 | .globl sun4v_intr_setenabled | ||
32 | .type sun4v_intr_setenabled,#function | ||
33 | sun4v_intr_setenabled: | ||
34 | mov HV_FAST_INTR_SETENABLED, %o5 | ||
35 | ta HV_FAST_TRAP | ||
36 | retl | ||
37 | nop | ||
38 | .size sun4v_intr_setenabled, .-sun4v_intr_setenabled | ||
39 | |||
40 | /* %o0: sysino | ||
41 | * | ||
42 | * returns %o0: intr_state (HV_INTR_STATE_*) | ||
43 | */ | ||
44 | .globl sun4v_intr_getstate | ||
45 | .type sun4v_intr_getstate,#function | ||
46 | sun4v_intr_getstate: | ||
47 | mov HV_FAST_INTR_GETSTATE, %o5 | ||
48 | ta HV_FAST_TRAP | ||
49 | retl | ||
50 | mov %o1, %o0 | ||
51 | .size sun4v_intr_getstate, .-sun4v_intr_getstate | ||
52 | |||
53 | /* %o0: sysino | ||
54 | * %o1: intr_state (HV_INTR_STATE_*) | ||
55 | */ | ||
56 | .globl sun4v_intr_setstate | ||
57 | .type sun4v_intr_setstate,#function | ||
58 | sun4v_intr_setstate: | ||
59 | mov HV_FAST_INTR_SETSTATE, %o5 | ||
60 | ta HV_FAST_TRAP | ||
61 | retl | ||
62 | nop | ||
63 | .size sun4v_intr_setstate, .-sun4v_intr_setstate | ||
64 | |||
65 | /* %o0: sysino | ||
66 | * | ||
67 | * returns %o0: cpuid | ||
68 | */ | ||
69 | .globl sun4v_intr_gettarget | ||
70 | .type sun4v_intr_gettarget,#function | ||
71 | sun4v_intr_gettarget: | ||
72 | mov HV_FAST_INTR_GETTARGET, %o5 | ||
73 | ta HV_FAST_TRAP | ||
74 | retl | ||
75 | mov %o1, %o0 | ||
76 | .size sun4v_intr_gettarget, .-sun4v_intr_gettarget | ||
77 | |||
78 | /* %o0: sysino | ||
79 | * %o1: cpuid | ||
80 | */ | ||
81 | .globl sun4v_intr_settarget | ||
82 | .type sun4v_intr_settarget,#function | ||
83 | sun4v_intr_settarget: | ||
84 | mov HV_FAST_INTR_SETTARGET, %o5 | ||
85 | ta HV_FAST_TRAP | ||
86 | retl | ||
87 | nop | ||
88 | .size sun4v_intr_settarget, .-sun4v_intr_settarget | ||
89 | |||
90 | /* %o0: cpuid | ||
91 | * %o1: pc | ||
92 | * %o2: rtba | ||
93 | * %o3: arg0 | ||
94 | * | ||
95 | * returns %o0: status | ||
96 | */ | ||
97 | .globl sun4v_cpu_start | ||
98 | .type sun4v_cpu_start,#function | ||
99 | sun4v_cpu_start: | ||
100 | mov HV_FAST_CPU_START, %o5 | ||
101 | ta HV_FAST_TRAP | ||
102 | retl | ||
103 | nop | ||
104 | .size sun4v_cpu_start, .-sun4v_cpu_start | ||
105 | |||
106 | /* %o0: cpuid | ||
107 | * | ||
108 | * returns %o0: status | ||
109 | */ | ||
110 | .globl sun4v_cpu_stop | ||
111 | .type sun4v_cpu_stop,#function | ||
112 | sun4v_cpu_stop: | ||
113 | mov HV_FAST_CPU_STOP, %o5 | ||
114 | ta HV_FAST_TRAP | ||
115 | retl | ||
116 | nop | ||
117 | .size sun4v_cpu_stop, .-sun4v_cpu_stop | ||
118 | |||
119 | /* returns %o0: status */ | ||
120 | .globl sun4v_cpu_yield | ||
121 | .type sun4v_cpu_yield, #function | ||
122 | sun4v_cpu_yield: | ||
123 | mov HV_FAST_CPU_YIELD, %o5 | ||
124 | ta HV_FAST_TRAP | ||
125 | retl | ||
126 | nop | ||
127 | .size sun4v_cpu_yield, .-sun4v_cpu_yield | ||
128 | |||
129 | /* %o0: type | ||
130 | * %o1: queue paddr | ||
131 | * %o2: num queue entries | ||
132 | * | ||
133 | * returns %o0: status | ||
134 | */ | ||
135 | .globl sun4v_cpu_qconf | ||
136 | .type sun4v_cpu_qconf,#function | ||
137 | sun4v_cpu_qconf: | ||
138 | mov HV_FAST_CPU_QCONF, %o5 | ||
139 | ta HV_FAST_TRAP | ||
140 | retl | ||
141 | nop | ||
142 | .size sun4v_cpu_qconf, .-sun4v_cpu_qconf | ||
143 | |||
144 | /* %o0: num cpus in cpu list | ||
145 | * %o1: cpu list paddr | ||
146 | * %o2: mondo block paddr | ||
147 | * | ||
148 | * returns %o0: status | ||
149 | */ | ||
150 | .globl sun4v_cpu_mondo_send | ||
151 | .type sun4v_cpu_mondo_send,#function | ||
152 | sun4v_cpu_mondo_send: | ||
153 | mov HV_FAST_CPU_MONDO_SEND, %o5 | ||
154 | ta HV_FAST_TRAP | ||
155 | retl | ||
156 | nop | ||
157 | .size sun4v_cpu_mondo_send, .-sun4v_cpu_mondo_send | ||
158 | |||
159 | /* %o0: CPU ID | ||
160 | * | ||
161 | * returns %o0: -status if status non-zero, else | ||
162 | * %o0: cpu state as HV_CPU_STATE_* | ||
163 | */ | ||
164 | .globl sun4v_cpu_state | ||
165 | .type sun4v_cpu_state,#function | ||
166 | sun4v_cpu_state: | ||
167 | mov HV_FAST_CPU_STATE, %o5 | ||
168 | ta HV_FAST_TRAP | ||
169 | brnz,pn %o0, 1f | ||
170 | sub %g0, %o0, %o0 | ||
171 | mov %o1, %o0 | ||
172 | 1: retl | ||
173 | nop | ||
174 | .size sun4v_cpu_state, .-sun4v_cpu_state | ||
175 | |||
176 | /* %o0: virtual address | ||
177 | * %o1: must be zero | ||
178 | * %o2: TTE | ||
179 | * %o3: HV_MMU_* flags | ||
180 | * | ||
181 | * returns %o0: status | ||
182 | */ | ||
183 | .globl sun4v_mmu_map_perm_addr | ||
184 | .type sun4v_mmu_map_perm_addr,#function | ||
185 | sun4v_mmu_map_perm_addr: | ||
186 | mov HV_FAST_MMU_MAP_PERM_ADDR, %o5 | ||
187 | ta HV_FAST_TRAP | ||
188 | retl | ||
189 | nop | ||
190 | .size sun4v_mmu_map_perm_addr, .-sun4v_mmu_map_perm_addr | ||
191 | |||
192 | /* %o0: number of TSB descriptions | ||
193 | * %o1: TSB descriptions real address | ||
194 | * | ||
195 | * returns %o0: status | ||
196 | */ | ||
197 | .globl sun4v_mmu_tsb_ctx0 | ||
198 | .type sun4v_mmu_tsb_ctx0,#function | ||
199 | sun4v_mmu_tsb_ctx0: | ||
200 | mov HV_FAST_MMU_TSB_CTX0, %o5 | ||
201 | ta HV_FAST_TRAP | ||
202 | retl | ||
203 | nop | ||
204 | .size sun4v_mmu_tsb_ctx0, .-sun4v_mmu_tsb_ctx0 | ||
205 | |||
206 | /* %o0: API group number | ||
207 | * %o1: pointer to unsigned long major number storage | ||
208 | * %o2: pointer to unsigned long minor number storage | ||
209 | * | ||
210 | * returns %o0: status | ||
211 | */ | ||
212 | .globl sun4v_get_version | ||
213 | .type sun4v_get_version,#function | ||
214 | sun4v_get_version: | ||
215 | mov HV_CORE_GET_VER, %o5 | ||
216 | mov %o1, %o3 | ||
217 | mov %o2, %o4 | ||
218 | ta HV_CORE_TRAP | ||
219 | stx %o1, [%o3] | ||
220 | retl | ||
221 | stx %o2, [%o4] | ||
222 | .size sun4v_get_version, .-sun4v_get_version | ||
223 | |||
224 | /* %o0: API group number | ||
225 | * %o1: desired major number | ||
226 | * %o2: desired minor number | ||
227 | * %o3: pointer to unsigned long actual minor number storage | ||
228 | * | ||
229 | * returns %o0: status | ||
230 | */ | ||
231 | .globl sun4v_set_version | ||
232 | .type sun4v_set_version,#function | ||
233 | sun4v_set_version: | ||
234 | mov HV_CORE_SET_VER, %o5 | ||
235 | mov %o3, %o4 | ||
236 | ta HV_CORE_TRAP | ||
237 | retl | ||
238 | stx %o1, [%o4] | ||
239 | .size sun4v_set_version, .-sun4v_set_version | ||
240 | |||
241 | /* %o0: pointer to unsigned long time | ||
242 | * | ||
243 | * returns %o0: status | ||
244 | */ | ||
245 | .globl sun4v_tod_get | ||
246 | .type sun4v_tod_get,#function | ||
247 | sun4v_tod_get: | ||
248 | mov %o0, %o4 | ||
249 | mov HV_FAST_TOD_GET, %o5 | ||
250 | ta HV_FAST_TRAP | ||
251 | stx %o1, [%o4] | ||
252 | retl | ||
253 | nop | ||
254 | .size sun4v_tod_get, .-sun4v_tod_get | ||
255 | |||
256 | /* %o0: time | ||
257 | * | ||
258 | * returns %o0: status | ||
259 | */ | ||
260 | .globl sun4v_tod_set | ||
261 | .type sun4v_tod_set,#function | ||
262 | sun4v_tod_set: | ||
263 | mov HV_FAST_TOD_SET, %o5 | ||
264 | ta HV_FAST_TRAP | ||
265 | retl | ||
266 | nop | ||
267 | .size sun4v_tod_set, .-sun4v_tod_set | ||
268 | |||
269 | /* %o0: pointer to unsigned long status | ||
270 | * | ||
271 | * returns %o0: signed character | ||
272 | */ | ||
273 | .globl sun4v_con_getchar | ||
274 | .type sun4v_con_getchar,#function | ||
275 | sun4v_con_getchar: | ||
276 | mov %o0, %o4 | ||
277 | mov HV_FAST_CONS_GETCHAR, %o5 | ||
278 | clr %o0 | ||
279 | clr %o1 | ||
280 | ta HV_FAST_TRAP | ||
281 | stx %o0, [%o4] | ||
282 | retl | ||
283 | sra %o1, 0, %o0 | ||
284 | .size sun4v_con_getchar, .-sun4v_con_getchar | ||
285 | |||
286 | /* %o0: signed long character | ||
287 | * | ||
288 | * returns %o0: status | ||
289 | */ | ||
290 | .globl sun4v_con_putchar | ||
291 | .type sun4v_con_putchar,#function | ||
292 | sun4v_con_putchar: | ||
293 | mov HV_FAST_CONS_PUTCHAR, %o5 | ||
294 | ta HV_FAST_TRAP | ||
295 | retl | ||
296 | sra %o0, 0, %o0 | ||
297 | .size sun4v_con_putchar, .-sun4v_con_putchar | ||
298 | |||
299 | /* %o0: buffer real address | ||
300 | * %o1: buffer size | ||
301 | * %o2: pointer to unsigned long bytes_read | ||
302 | * | ||
303 | * returns %o0: status | ||
304 | */ | ||
305 | .globl sun4v_con_read | ||
306 | .type sun4v_con_read,#function | ||
307 | sun4v_con_read: | ||
308 | mov %o2, %o4 | ||
309 | mov HV_FAST_CONS_READ, %o5 | ||
310 | ta HV_FAST_TRAP | ||
311 | brnz %o0, 1f | ||
312 | cmp %o1, -1 /* break */ | ||
313 | be,a,pn %icc, 1f | ||
314 | mov %o1, %o0 | ||
315 | cmp %o1, -2 /* hup */ | ||
316 | be,a,pn %icc, 1f | ||
317 | mov %o1, %o0 | ||
318 | stx %o1, [%o4] | ||
319 | 1: retl | ||
320 | nop | ||
321 | .size sun4v_con_read, .-sun4v_con_read | ||
322 | |||
323 | /* %o0: buffer real address | ||
324 | * %o1: buffer size | ||
325 | * %o2: pointer to unsigned long bytes_written | ||
326 | * | ||
327 | * returns %o0: status | ||
328 | */ | ||
329 | .globl sun4v_con_write | ||
330 | .type sun4v_con_write,#function | ||
331 | sun4v_con_write: | ||
332 | mov %o2, %o4 | ||
333 | mov HV_FAST_CONS_WRITE, %o5 | ||
334 | ta HV_FAST_TRAP | ||
335 | stx %o1, [%o4] | ||
336 | retl | ||
337 | nop | ||
338 | .size sun4v_con_write, .-sun4v_con_write | ||
339 | |||
340 | /* %o0: soft state | ||
341 | * %o1: address of description string | ||
342 | * | ||
343 | * returns %o0: status | ||
344 | */ | ||
345 | .globl sun4v_mach_set_soft_state | ||
346 | .type sun4v_mach_set_soft_state,#function | ||
347 | sun4v_mach_set_soft_state: | ||
348 | mov HV_FAST_MACH_SET_SOFT_STATE, %o5 | ||
349 | ta HV_FAST_TRAP | ||
350 | retl | ||
351 | nop | ||
352 | .size sun4v_mach_set_soft_state, .-sun4v_mach_set_soft_state | ||
353 | |||
354 | /* %o0: exit code | ||
355 | * | ||
356 | * Does not return. | ||
357 | */ | ||
358 | .globl sun4v_mach_exit | ||
359 | .type sun4v_mach_exit,#function | ||
360 | sun4v_mach_exit: | ||
361 | mov HV_FAST_MACH_EXIT, %o5 | ||
362 | ta HV_FAST_TRAP | ||
363 | retl | ||
364 | nop | ||
365 | .size sun4v_mach_exit, .-sun4v_mach_exit | ||
366 | |||
367 | /* %o0: buffer real address | ||
368 | * %o1: buffer length | ||
369 | * %o2: pointer to unsigned long real_buf_len | ||
370 | * | ||
371 | * returns %o0: status | ||
372 | */ | ||
373 | .globl sun4v_mach_desc | ||
374 | .type sun4v_mach_desc,#function | ||
375 | sun4v_mach_desc: | ||
376 | mov %o2, %o4 | ||
377 | mov HV_FAST_MACH_DESC, %o5 | ||
378 | ta HV_FAST_TRAP | ||
379 | stx %o1, [%o4] | ||
380 | retl | ||
381 | nop | ||
382 | .size sun4v_mach_desc, .-sun4v_mach_desc | ||
383 | |||
384 | /* %o0: new timeout in milliseconds | ||
385 | * %o1: pointer to unsigned long orig_timeout | ||
386 | * | ||
387 | * returns %o0: status | ||
388 | */ | ||
389 | .globl sun4v_mach_set_watchdog | ||
390 | .type sun4v_mach_set_watchdog,#function | ||
391 | sun4v_mach_set_watchdog: | ||
392 | mov %o1, %o4 | ||
393 | mov HV_FAST_MACH_SET_WATCHDOG, %o5 | ||
394 | ta HV_FAST_TRAP | ||
395 | stx %o1, [%o4] | ||
396 | retl | ||
397 | nop | ||
398 | .size sun4v_mach_set_watchdog, .-sun4v_mach_set_watchdog | ||
399 | |||
400 | /* No inputs and does not return. */ | ||
401 | .globl sun4v_mach_sir | ||
402 | .type sun4v_mach_sir,#function | ||
403 | sun4v_mach_sir: | ||
404 | mov %o1, %o4 | ||
405 | mov HV_FAST_MACH_SIR, %o5 | ||
406 | ta HV_FAST_TRAP | ||
407 | stx %o1, [%o4] | ||
408 | retl | ||
409 | nop | ||
410 | .size sun4v_mach_sir, .-sun4v_mach_sir | ||
411 | |||
412 | /* %o0: channel | ||
413 | * %o1: ra | ||
414 | * %o2: num_entries | ||
415 | * | ||
416 | * returns %o0: status | ||
417 | */ | ||
418 | .globl sun4v_ldc_tx_qconf | ||
419 | .type sun4v_ldc_tx_qconf,#function | ||
420 | sun4v_ldc_tx_qconf: | ||
421 | mov HV_FAST_LDC_TX_QCONF, %o5 | ||
422 | ta HV_FAST_TRAP | ||
423 | retl | ||
424 | nop | ||
425 | .size sun4v_ldc_tx_qconf, .-sun4v_ldc_tx_qconf | ||
426 | |||
427 | /* %o0: channel | ||
428 | * %o1: pointer to unsigned long ra | ||
429 | * %o2: pointer to unsigned long num_entries | ||
430 | * | ||
431 | * returns %o0: status | ||
432 | */ | ||
433 | .globl sun4v_ldc_tx_qinfo | ||
434 | .type sun4v_ldc_tx_qinfo,#function | ||
435 | sun4v_ldc_tx_qinfo: | ||
436 | mov %o1, %g1 | ||
437 | mov %o2, %g2 | ||
438 | mov HV_FAST_LDC_TX_QINFO, %o5 | ||
439 | ta HV_FAST_TRAP | ||
440 | stx %o1, [%g1] | ||
441 | stx %o2, [%g2] | ||
442 | retl | ||
443 | nop | ||
444 | .size sun4v_ldc_tx_qinfo, .-sun4v_ldc_tx_qinfo | ||
445 | |||
446 | /* %o0: channel | ||
447 | * %o1: pointer to unsigned long head_off | ||
448 | * %o2: pointer to unsigned long tail_off | ||
449 | * %o2: pointer to unsigned long chan_state | ||
450 | * | ||
451 | * returns %o0: status | ||
452 | */ | ||
453 | .globl sun4v_ldc_tx_get_state | ||
454 | .type sun4v_ldc_tx_get_state,#function | ||
455 | sun4v_ldc_tx_get_state: | ||
456 | mov %o1, %g1 | ||
457 | mov %o2, %g2 | ||
458 | mov %o3, %g3 | ||
459 | mov HV_FAST_LDC_TX_GET_STATE, %o5 | ||
460 | ta HV_FAST_TRAP | ||
461 | stx %o1, [%g1] | ||
462 | stx %o2, [%g2] | ||
463 | stx %o3, [%g3] | ||
464 | retl | ||
465 | nop | ||
466 | .size sun4v_ldc_tx_get_state, .-sun4v_ldc_tx_get_state | ||
467 | |||
468 | /* %o0: channel | ||
469 | * %o1: tail_off | ||
470 | * | ||
471 | * returns %o0: status | ||
472 | */ | ||
473 | .globl sun4v_ldc_tx_set_qtail | ||
474 | .type sun4v_ldc_tx_set_qtail,#function | ||
475 | sun4v_ldc_tx_set_qtail: | ||
476 | mov HV_FAST_LDC_TX_SET_QTAIL, %o5 | ||
477 | ta HV_FAST_TRAP | ||
478 | retl | ||
479 | nop | ||
480 | .size sun4v_ldc_tx_set_qtail, .-sun4v_ldc_tx_set_qtail | ||
481 | |||
482 | /* %o0: channel | ||
483 | * %o1: ra | ||
484 | * %o2: num_entries | ||
485 | * | ||
486 | * returns %o0: status | ||
487 | */ | ||
488 | .globl sun4v_ldc_rx_qconf | ||
489 | .type sun4v_ldc_rx_qconf,#function | ||
490 | sun4v_ldc_rx_qconf: | ||
491 | mov HV_FAST_LDC_RX_QCONF, %o5 | ||
492 | ta HV_FAST_TRAP | ||
493 | retl | ||
494 | nop | ||
495 | .size sun4v_ldc_rx_qconf, .-sun4v_ldc_rx_qconf | ||
496 | |||
497 | /* %o0: channel | ||
498 | * %o1: pointer to unsigned long ra | ||
499 | * %o2: pointer to unsigned long num_entries | ||
500 | * | ||
501 | * returns %o0: status | ||
502 | */ | ||
503 | .globl sun4v_ldc_rx_qinfo | ||
504 | .type sun4v_ldc_rx_qinfo,#function | ||
505 | sun4v_ldc_rx_qinfo: | ||
506 | mov %o1, %g1 | ||
507 | mov %o2, %g2 | ||
508 | mov HV_FAST_LDC_RX_QINFO, %o5 | ||
509 | ta HV_FAST_TRAP | ||
510 | stx %o1, [%g1] | ||
511 | stx %o2, [%g2] | ||
512 | retl | ||
513 | nop | ||
514 | .size sun4v_ldc_rx_qinfo, .-sun4v_ldc_rx_qinfo | ||
515 | |||
516 | /* %o0: channel | ||
517 | * %o1: pointer to unsigned long head_off | ||
518 | * %o2: pointer to unsigned long tail_off | ||
519 | * %o2: pointer to unsigned long chan_state | ||
520 | * | ||
521 | * returns %o0: status | ||
522 | */ | ||
523 | .globl sun4v_ldc_rx_get_state | ||
524 | .type sun4v_ldc_rx_get_state,#function | ||
525 | sun4v_ldc_rx_get_state: | ||
526 | mov %o1, %g1 | ||
527 | mov %o2, %g2 | ||
528 | mov %o3, %g3 | ||
529 | mov HV_FAST_LDC_RX_GET_STATE, %o5 | ||
530 | ta HV_FAST_TRAP | ||
531 | stx %o1, [%g1] | ||
532 | stx %o2, [%g2] | ||
533 | stx %o3, [%g3] | ||
534 | retl | ||
535 | nop | ||
536 | .size sun4v_ldc_rx_get_state, .-sun4v_ldc_rx_get_state | ||
537 | |||
538 | /* %o0: channel | ||
539 | * %o1: head_off | ||
540 | * | ||
541 | * returns %o0: status | ||
542 | */ | ||
543 | .globl sun4v_ldc_rx_set_qhead | ||
544 | .type sun4v_ldc_rx_set_qhead,#function | ||
545 | sun4v_ldc_rx_set_qhead: | ||
546 | mov HV_FAST_LDC_RX_SET_QHEAD, %o5 | ||
547 | ta HV_FAST_TRAP | ||
548 | retl | ||
549 | nop | ||
550 | .size sun4v_ldc_rx_set_qhead, .-sun4v_ldc_rx_set_qhead | ||
551 | |||
552 | /* %o0: channel | ||
553 | * %o1: ra | ||
554 | * %o2: num_entries | ||
555 | * | ||
556 | * returns %o0: status | ||
557 | */ | ||
558 | .globl sun4v_ldc_set_map_table | ||
559 | .type sun4v_ldc_set_map_table,#function | ||
560 | sun4v_ldc_set_map_table: | ||
561 | mov HV_FAST_LDC_SET_MAP_TABLE, %o5 | ||
562 | ta HV_FAST_TRAP | ||
563 | retl | ||
564 | nop | ||
565 | .size sun4v_ldc_set_map_table, .-sun4v_ldc_set_map_table | ||
566 | |||
567 | /* %o0: channel | ||
568 | * %o1: pointer to unsigned long ra | ||
569 | * %o2: pointer to unsigned long num_entries | ||
570 | * | ||
571 | * returns %o0: status | ||
572 | */ | ||
573 | .globl sun4v_ldc_get_map_table | ||
574 | .type sun4v_ldc_get_map_table,#function | ||
575 | sun4v_ldc_get_map_table: | ||
576 | mov %o1, %g1 | ||
577 | mov %o2, %g2 | ||
578 | mov HV_FAST_LDC_GET_MAP_TABLE, %o5 | ||
579 | ta HV_FAST_TRAP | ||
580 | stx %o1, [%g1] | ||
581 | stx %o2, [%g2] | ||
582 | retl | ||
583 | nop | ||
584 | .size sun4v_ldc_get_map_table, .-sun4v_ldc_get_map_table | ||
585 | |||
586 | /* %o0: channel | ||
587 | * %o1: dir_code | ||
588 | * %o2: tgt_raddr | ||
589 | * %o3: lcl_raddr | ||
590 | * %o4: len | ||
591 | * %o5: pointer to unsigned long actual_len | ||
592 | * | ||
593 | * returns %o0: status | ||
594 | */ | ||
595 | .globl sun4v_ldc_copy | ||
596 | .type sun4v_ldc_copy,#function | ||
597 | sun4v_ldc_copy: | ||
598 | mov %o5, %g1 | ||
599 | mov HV_FAST_LDC_COPY, %o5 | ||
600 | ta HV_FAST_TRAP | ||
601 | stx %o1, [%g1] | ||
602 | retl | ||
603 | nop | ||
604 | .size sun4v_ldc_copy, .-sun4v_ldc_copy | ||
605 | |||
606 | /* %o0: channel | ||
607 | * %o1: cookie | ||
608 | * %o2: pointer to unsigned long ra | ||
609 | * %o3: pointer to unsigned long perm | ||
610 | * | ||
611 | * returns %o0: status | ||
612 | */ | ||
613 | .globl sun4v_ldc_mapin | ||
614 | .type sun4v_ldc_mapin,#function | ||
615 | sun4v_ldc_mapin: | ||
616 | mov %o2, %g1 | ||
617 | mov %o3, %g2 | ||
618 | mov HV_FAST_LDC_MAPIN, %o5 | ||
619 | ta HV_FAST_TRAP | ||
620 | stx %o1, [%g1] | ||
621 | stx %o2, [%g2] | ||
622 | retl | ||
623 | nop | ||
624 | .size sun4v_ldc_mapin, .-sun4v_ldc_mapin | ||
625 | |||
626 | /* %o0: ra | ||
627 | * | ||
628 | * returns %o0: status | ||
629 | */ | ||
630 | .globl sun4v_ldc_unmap | ||
631 | .type sun4v_ldc_unmap,#function | ||
632 | sun4v_ldc_unmap: | ||
633 | mov HV_FAST_LDC_UNMAP, %o5 | ||
634 | ta HV_FAST_TRAP | ||
635 | retl | ||
636 | nop | ||
637 | .size sun4v_ldc_unmap, .-sun4v_ldc_unmap | ||
638 | |||
639 | /* %o0: channel | ||
640 | * %o1: cookie | ||
641 | * %o2: mte_cookie | ||
642 | * | ||
643 | * returns %o0: status | ||
644 | */ | ||
645 | .globl sun4v_ldc_revoke | ||
646 | .type sun4v_ldc_revoke,#function | ||
647 | sun4v_ldc_revoke: | ||
648 | mov HV_FAST_LDC_REVOKE, %o5 | ||
649 | ta HV_FAST_TRAP | ||
650 | retl | ||
651 | nop | ||
652 | .size sun4v_ldc_revoke, .-sun4v_ldc_revoke | ||
653 | |||
654 | /* %o0: device handle | ||
655 | * %o1: device INO | ||
656 | * %o2: pointer to unsigned long cookie | ||
657 | * | ||
658 | * returns %o0: status | ||
659 | */ | ||
660 | .globl sun4v_vintr_get_cookie | ||
661 | .type sun4v_vintr_get_cookie,#function | ||
662 | sun4v_vintr_get_cookie: | ||
663 | mov %o2, %g1 | ||
664 | mov HV_FAST_VINTR_GET_COOKIE, %o5 | ||
665 | ta HV_FAST_TRAP | ||
666 | stx %o1, [%g1] | ||
667 | retl | ||
668 | nop | ||
669 | .size sun4v_vintr_get_cookie, .-sun4v_vintr_get_cookie | ||
670 | |||
671 | /* %o0: device handle | ||
672 | * %o1: device INO | ||
673 | * %o2: cookie | ||
674 | * | ||
675 | * returns %o0: status | ||
676 | */ | ||
677 | .globl sun4v_vintr_set_cookie | ||
678 | .type sun4v_vintr_set_cookie,#function | ||
679 | sun4v_vintr_set_cookie: | ||
680 | mov HV_FAST_VINTR_SET_COOKIE, %o5 | ||
681 | ta HV_FAST_TRAP | ||
682 | retl | ||
683 | nop | ||
684 | .size sun4v_vintr_set_cookie, .-sun4v_vintr_set_cookie | ||
685 | |||
686 | /* %o0: device handle | ||
687 | * %o1: device INO | ||
688 | * %o2: pointer to unsigned long valid_state | ||
689 | * | ||
690 | * returns %o0: status | ||
691 | */ | ||
692 | .globl sun4v_vintr_get_valid | ||
693 | .type sun4v_vintr_get_valid,#function | ||
694 | sun4v_vintr_get_valid: | ||
695 | mov %o2, %g1 | ||
696 | mov HV_FAST_VINTR_GET_VALID, %o5 | ||
697 | ta HV_FAST_TRAP | ||
698 | stx %o1, [%g1] | ||
699 | retl | ||
700 | nop | ||
701 | .size sun4v_vintr_get_valid, .-sun4v_vintr_get_valid | ||
702 | |||
703 | /* %o0: device handle | ||
704 | * %o1: device INO | ||
705 | * %o2: valid_state | ||
706 | * | ||
707 | * returns %o0: status | ||
708 | */ | ||
709 | .globl sun4v_vintr_set_valid | ||
710 | .type sun4v_vintr_set_valid,#function | ||
711 | sun4v_vintr_set_valid: | ||
712 | mov HV_FAST_VINTR_SET_VALID, %o5 | ||
713 | ta HV_FAST_TRAP | ||
714 | retl | ||
715 | nop | ||
716 | .size sun4v_vintr_set_valid, .-sun4v_vintr_set_valid | ||
717 | |||
718 | /* %o0: device handle | ||
719 | * %o1: device INO | ||
720 | * %o2: pointer to unsigned long state | ||
721 | * | ||
722 | * returns %o0: status | ||
723 | */ | ||
724 | .globl sun4v_vintr_get_state | ||
725 | .type sun4v_vintr_get_state,#function | ||
726 | sun4v_vintr_get_state: | ||
727 | mov %o2, %g1 | ||
728 | mov HV_FAST_VINTR_GET_STATE, %o5 | ||
729 | ta HV_FAST_TRAP | ||
730 | stx %o1, [%g1] | ||
731 | retl | ||
732 | nop | ||
733 | .size sun4v_vintr_get_state, .-sun4v_vintr_get_state | ||
734 | |||
735 | /* %o0: device handle | ||
736 | * %o1: device INO | ||
737 | * %o2: state | ||
738 | * | ||
739 | * returns %o0: status | ||
740 | */ | ||
741 | .globl sun4v_vintr_set_state | ||
742 | .type sun4v_vintr_set_state,#function | ||
743 | sun4v_vintr_set_state: | ||
744 | mov HV_FAST_VINTR_SET_STATE, %o5 | ||
745 | ta HV_FAST_TRAP | ||
746 | retl | ||
747 | nop | ||
748 | .size sun4v_vintr_set_state, .-sun4v_vintr_set_state | ||
749 | |||
750 | /* %o0: device handle | ||
751 | * %o1: device INO | ||
752 | * %o2: pointer to unsigned long cpuid | ||
753 | * | ||
754 | * returns %o0: status | ||
755 | */ | ||
756 | .globl sun4v_vintr_get_target | ||
757 | .type sun4v_vintr_get_target,#function | ||
758 | sun4v_vintr_get_target: | ||
759 | mov %o2, %g1 | ||
760 | mov HV_FAST_VINTR_GET_TARGET, %o5 | ||
761 | ta HV_FAST_TRAP | ||
762 | stx %o1, [%g1] | ||
763 | retl | ||
764 | nop | ||
765 | .size sun4v_vintr_get_target, .-sun4v_vintr_get_target | ||
766 | |||
767 | /* %o0: device handle | ||
768 | * %o1: device INO | ||
769 | * %o2: cpuid | ||
770 | * | ||
771 | * returns %o0: status | ||
772 | */ | ||
773 | .globl sun4v_vintr_set_target | ||
774 | .type sun4v_vintr_set_target,#function | ||
775 | sun4v_vintr_set_target: | ||
776 | mov HV_FAST_VINTR_SET_TARGET, %o5 | ||
777 | ta HV_FAST_TRAP | ||
778 | retl | ||
779 | nop | ||
780 | .size sun4v_vintr_set_target, .-sun4v_vintr_set_target | ||
781 | |||
782 | /* %o0: NCS sub-function | ||
783 | * %o1: sub-function arg real-address | ||
784 | * %o2: sub-function arg size | ||
785 | * | ||
786 | * returns %o0: status | ||
787 | */ | ||
788 | .globl sun4v_ncs_request | ||
789 | .type sun4v_ncs_request,#function | ||
790 | sun4v_ncs_request: | ||
791 | mov HV_FAST_NCS_REQUEST, %o5 | ||
792 | ta HV_FAST_TRAP | ||
793 | retl | ||
794 | nop | ||
795 | .size sun4v_ncs_request, .-sun4v_ncs_request | ||
796 | |||
797 | .globl sun4v_svc_send | ||
798 | .type sun4v_svc_send,#function | ||
799 | sun4v_svc_send: | ||
800 | save %sp, -192, %sp | ||
801 | mov %i0, %o0 | ||
802 | mov %i1, %o1 | ||
803 | mov %i2, %o2 | ||
804 | mov HV_FAST_SVC_SEND, %o5 | ||
805 | ta HV_FAST_TRAP | ||
806 | stx %o1, [%i3] | ||
807 | ret | ||
808 | restore | ||
809 | .size sun4v_svc_send, .-sun4v_svc_send | ||
810 | |||
811 | .globl sun4v_svc_recv | ||
812 | .type sun4v_svc_recv,#function | ||
813 | sun4v_svc_recv: | ||
814 | save %sp, -192, %sp | ||
815 | mov %i0, %o0 | ||
816 | mov %i1, %o1 | ||
817 | mov %i2, %o2 | ||
818 | mov HV_FAST_SVC_RECV, %o5 | ||
819 | ta HV_FAST_TRAP | ||
820 | stx %o1, [%i3] | ||
821 | ret | ||
822 | restore | ||
823 | .size sun4v_svc_recv, .-sun4v_svc_recv | ||
824 | |||
825 | .globl sun4v_svc_getstatus | ||
826 | .type sun4v_svc_getstatus,#function | ||
827 | sun4v_svc_getstatus: | ||
828 | mov HV_FAST_SVC_GETSTATUS, %o5 | ||
829 | mov %o1, %o4 | ||
830 | ta HV_FAST_TRAP | ||
831 | stx %o1, [%o4] | ||
832 | retl | ||
833 | nop | ||
834 | .size sun4v_svc_getstatus, .-sun4v_svc_getstatus | ||
835 | |||
836 | .globl sun4v_svc_setstatus | ||
837 | .type sun4v_svc_setstatus,#function | ||
838 | sun4v_svc_setstatus: | ||
839 | mov HV_FAST_SVC_SETSTATUS, %o5 | ||
840 | ta HV_FAST_TRAP | ||
841 | retl | ||
842 | nop | ||
843 | .size sun4v_svc_setstatus, .-sun4v_svc_setstatus | ||
844 | |||
845 | .globl sun4v_svc_clrstatus | ||
846 | .type sun4v_svc_clrstatus,#function | ||
847 | sun4v_svc_clrstatus: | ||
848 | mov HV_FAST_SVC_CLRSTATUS, %o5 | ||
849 | ta HV_FAST_TRAP | ||
850 | retl | ||
851 | nop | ||
852 | .size sun4v_svc_clrstatus, .-sun4v_svc_clrstatus | ||
853 | |||
854 | .globl sun4v_mmustat_conf | ||
855 | .type sun4v_mmustat_conf,#function | ||
856 | sun4v_mmustat_conf: | ||
857 | mov %o1, %o4 | ||
858 | mov HV_FAST_MMUSTAT_CONF, %o5 | ||
859 | ta HV_FAST_TRAP | ||
860 | stx %o1, [%o4] | ||
861 | retl | ||
862 | nop | ||
863 | .size sun4v_mmustat_conf, .-sun4v_mmustat_conf | ||
864 | |||
865 | .globl sun4v_mmustat_info | ||
866 | .type sun4v_mmustat_info,#function | ||
867 | sun4v_mmustat_info: | ||
868 | mov %o0, %o4 | ||
869 | mov HV_FAST_MMUSTAT_INFO, %o5 | ||
870 | ta HV_FAST_TRAP | ||
871 | stx %o1, [%o4] | ||
872 | retl | ||
873 | nop | ||
874 | .size sun4v_mmustat_info, .-sun4v_mmustat_info | ||
875 | |||
876 | .globl sun4v_mmu_demap_all | ||
877 | .type sun4v_mmu_demap_all,#function | ||
878 | sun4v_mmu_demap_all: | ||
879 | clr %o0 | ||
880 | clr %o1 | ||
881 | mov HV_MMU_ALL, %o2 | ||
882 | mov HV_FAST_MMU_DEMAP_ALL, %o5 | ||
883 | ta HV_FAST_TRAP | ||
884 | retl | ||
885 | nop | ||
886 | .size sun4v_mmu_demap_all, .-sun4v_mmu_demap_all | ||
diff --git a/arch/sparc64/kernel/ivec.S b/arch/sparc64/kernel/ivec.S new file mode 100644 index 000000000000..d29f92ebca5e --- /dev/null +++ b/arch/sparc64/kernel/ivec.S | |||
@@ -0,0 +1,51 @@ | |||
1 | /* The registers for cross calls will be: | ||
2 | * | ||
3 | * DATA 0: [low 32-bits] Address of function to call, jmp to this | ||
4 | * [high 32-bits] MMU Context Argument 0, place in %g5 | ||
5 | * DATA 1: Address Argument 1, place in %g1 | ||
6 | * DATA 2: Address Argument 2, place in %g7 | ||
7 | * | ||
8 | * With this method we can do most of the cross-call tlb/cache | ||
9 | * flushing very quickly. | ||
10 | */ | ||
11 | .align 32 | ||
12 | .globl do_ivec | ||
13 | .type do_ivec,#function | ||
14 | do_ivec: | ||
15 | mov 0x40, %g3 | ||
16 | ldxa [%g3 + %g0] ASI_INTR_R, %g3 | ||
17 | sethi %hi(KERNBASE), %g4 | ||
18 | cmp %g3, %g4 | ||
19 | bgeu,pn %xcc, do_ivec_xcall | ||
20 | srlx %g3, 32, %g5 | ||
21 | stxa %g0, [%g0] ASI_INTR_RECEIVE | ||
22 | membar #Sync | ||
23 | |||
24 | sethi %hi(ivector_table_pa), %g2 | ||
25 | ldx [%g2 + %lo(ivector_table_pa)], %g2 | ||
26 | sllx %g3, 4, %g3 | ||
27 | add %g2, %g3, %g3 | ||
28 | |||
29 | TRAP_LOAD_IRQ_WORK_PA(%g6, %g1) | ||
30 | |||
31 | ldx [%g6], %g5 | ||
32 | stxa %g5, [%g3] ASI_PHYS_USE_EC | ||
33 | stx %g3, [%g6] | ||
34 | wr %g0, 1 << PIL_DEVICE_IRQ, %set_softint | ||
35 | retry | ||
36 | do_ivec_xcall: | ||
37 | mov 0x50, %g1 | ||
38 | ldxa [%g1 + %g0] ASI_INTR_R, %g1 | ||
39 | srl %g3, 0, %g3 | ||
40 | |||
41 | mov 0x60, %g7 | ||
42 | ldxa [%g7 + %g0] ASI_INTR_R, %g7 | ||
43 | stxa %g0, [%g0] ASI_INTR_RECEIVE | ||
44 | membar #Sync | ||
45 | ba,pt %xcc, 1f | ||
46 | nop | ||
47 | |||
48 | .align 32 | ||
49 | 1: jmpl %g3, %g0 | ||
50 | nop | ||
51 | .size do_ivec,.-do_ivec | ||
diff --git a/arch/sparc64/kernel/kgdb.c b/arch/sparc64/kernel/kgdb.c new file mode 100644 index 000000000000..fefbe6dc51be --- /dev/null +++ b/arch/sparc64/kernel/kgdb.c | |||
@@ -0,0 +1,186 @@ | |||
1 | /* kgdb.c: KGDB support for 64-bit sparc. | ||
2 | * | ||
3 | * Copyright (C) 2008 David S. Miller <davem@davemloft.net> | ||
4 | */ | ||
5 | |||
6 | #include <linux/kgdb.h> | ||
7 | #include <linux/kdebug.h> | ||
8 | |||
9 | #include <asm/kdebug.h> | ||
10 | #include <asm/ptrace.h> | ||
11 | #include <asm/irq.h> | ||
12 | |||
13 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | ||
14 | { | ||
15 | struct reg_window *win; | ||
16 | int i; | ||
17 | |||
18 | gdb_regs[GDB_G0] = 0; | ||
19 | for (i = 0; i < 15; i++) | ||
20 | gdb_regs[GDB_G1 + i] = regs->u_regs[UREG_G1 + i]; | ||
21 | |||
22 | win = (struct reg_window *) (regs->u_regs[UREG_FP] + STACK_BIAS); | ||
23 | for (i = 0; i < 8; i++) | ||
24 | gdb_regs[GDB_L0 + i] = win->locals[i]; | ||
25 | for (i = 0; i < 8; i++) | ||
26 | gdb_regs[GDB_I0 + i] = win->ins[i]; | ||
27 | |||
28 | for (i = GDB_F0; i <= GDB_F62; i++) | ||
29 | gdb_regs[i] = 0; | ||
30 | |||
31 | gdb_regs[GDB_PC] = regs->tpc; | ||
32 | gdb_regs[GDB_NPC] = regs->tnpc; | ||
33 | gdb_regs[GDB_STATE] = regs->tstate; | ||
34 | gdb_regs[GDB_FSR] = 0; | ||
35 | gdb_regs[GDB_FPRS] = 0; | ||
36 | gdb_regs[GDB_Y] = regs->y; | ||
37 | } | ||
38 | |||
39 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | ||
40 | { | ||
41 | struct thread_info *t = task_thread_info(p); | ||
42 | extern unsigned int switch_to_pc; | ||
43 | extern unsigned int ret_from_syscall; | ||
44 | struct reg_window *win; | ||
45 | unsigned long pc, cwp; | ||
46 | int i; | ||
47 | |||
48 | for (i = GDB_G0; i < GDB_G6; i++) | ||
49 | gdb_regs[i] = 0; | ||
50 | gdb_regs[GDB_G6] = (unsigned long) t; | ||
51 | gdb_regs[GDB_G7] = (unsigned long) p; | ||
52 | for (i = GDB_O0; i < GDB_SP; i++) | ||
53 | gdb_regs[i] = 0; | ||
54 | gdb_regs[GDB_SP] = t->ksp; | ||
55 | gdb_regs[GDB_O7] = 0; | ||
56 | |||
57 | win = (struct reg_window *) (t->ksp + STACK_BIAS); | ||
58 | for (i = 0; i < 8; i++) | ||
59 | gdb_regs[GDB_L0 + i] = win->locals[i]; | ||
60 | for (i = 0; i < 8; i++) | ||
61 | gdb_regs[GDB_I0 + i] = win->ins[i]; | ||
62 | |||
63 | for (i = GDB_F0; i <= GDB_F62; i++) | ||
64 | gdb_regs[i] = 0; | ||
65 | |||
66 | if (t->new_child) | ||
67 | pc = (unsigned long) &ret_from_syscall; | ||
68 | else | ||
69 | pc = (unsigned long) &switch_to_pc; | ||
70 | |||
71 | gdb_regs[GDB_PC] = pc; | ||
72 | gdb_regs[GDB_NPC] = pc + 4; | ||
73 | |||
74 | cwp = __thread_flag_byte_ptr(t)[TI_FLAG_BYTE_CWP]; | ||
75 | |||
76 | gdb_regs[GDB_STATE] = (TSTATE_PRIV | TSTATE_IE | cwp); | ||
77 | gdb_regs[GDB_FSR] = 0; | ||
78 | gdb_regs[GDB_FPRS] = 0; | ||
79 | gdb_regs[GDB_Y] = 0; | ||
80 | } | ||
81 | |||
82 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | ||
83 | { | ||
84 | struct reg_window *win; | ||
85 | int i; | ||
86 | |||
87 | for (i = 0; i < 15; i++) | ||
88 | regs->u_regs[UREG_G1 + i] = gdb_regs[GDB_G1 + i]; | ||
89 | |||
90 | /* If the TSTATE register is changing, we have to preserve | ||
91 | * the CWP field, otherwise window save/restore explodes. | ||
92 | */ | ||
93 | if (regs->tstate != gdb_regs[GDB_STATE]) { | ||
94 | unsigned long cwp = regs->tstate & TSTATE_CWP; | ||
95 | |||
96 | regs->tstate = (gdb_regs[GDB_STATE] & ~TSTATE_CWP) | cwp; | ||
97 | } | ||
98 | |||
99 | regs->tpc = gdb_regs[GDB_PC]; | ||
100 | regs->tnpc = gdb_regs[GDB_NPC]; | ||
101 | regs->y = gdb_regs[GDB_Y]; | ||
102 | |||
103 | win = (struct reg_window *) (regs->u_regs[UREG_FP] + STACK_BIAS); | ||
104 | for (i = 0; i < 8; i++) | ||
105 | win->locals[i] = gdb_regs[GDB_L0 + i]; | ||
106 | for (i = 0; i < 8; i++) | ||
107 | win->ins[i] = gdb_regs[GDB_I0 + i]; | ||
108 | } | ||
109 | |||
110 | #ifdef CONFIG_SMP | ||
111 | void smp_kgdb_capture_client(struct pt_regs *regs) | ||
112 | { | ||
113 | unsigned long flags; | ||
114 | |||
115 | __asm__ __volatile__("rdpr %%pstate, %0\n\t" | ||
116 | "wrpr %0, %1, %%pstate" | ||
117 | : "=r" (flags) | ||
118 | : "i" (PSTATE_IE)); | ||
119 | |||
120 | flushw_all(); | ||
121 | |||
122 | if (atomic_read(&kgdb_active) != -1) | ||
123 | kgdb_nmicallback(raw_smp_processor_id(), regs); | ||
124 | |||
125 | __asm__ __volatile__("wrpr %0, 0, %%pstate" | ||
126 | : : "r" (flags)); | ||
127 | } | ||
128 | #endif | ||
129 | |||
130 | int kgdb_arch_handle_exception(int e_vector, int signo, int err_code, | ||
131 | char *remcomInBuffer, char *remcomOutBuffer, | ||
132 | struct pt_regs *linux_regs) | ||
133 | { | ||
134 | unsigned long addr; | ||
135 | char *ptr; | ||
136 | |||
137 | switch (remcomInBuffer[0]) { | ||
138 | case 'c': | ||
139 | /* try to read optional parameter, pc unchanged if no parm */ | ||
140 | ptr = &remcomInBuffer[1]; | ||
141 | if (kgdb_hex2long(&ptr, &addr)) { | ||
142 | linux_regs->tpc = addr; | ||
143 | linux_regs->tnpc = addr + 4; | ||
144 | } | ||
145 | /* fallthru */ | ||
146 | |||
147 | case 'D': | ||
148 | case 'k': | ||
149 | if (linux_regs->tpc == (unsigned long) arch_kgdb_breakpoint) { | ||
150 | linux_regs->tpc = linux_regs->tnpc; | ||
151 | linux_regs->tnpc += 4; | ||
152 | } | ||
153 | return 0; | ||
154 | } | ||
155 | return -1; | ||
156 | } | ||
157 | |||
158 | asmlinkage void kgdb_trap(unsigned long trap_level, struct pt_regs *regs) | ||
159 | { | ||
160 | unsigned long flags; | ||
161 | |||
162 | if (user_mode(regs)) { | ||
163 | bad_trap(regs, trap_level); | ||
164 | return; | ||
165 | } | ||
166 | |||
167 | flushw_all(); | ||
168 | |||
169 | local_irq_save(flags); | ||
170 | kgdb_handle_exception(0x172, SIGTRAP, 0, regs); | ||
171 | local_irq_restore(flags); | ||
172 | } | ||
173 | |||
174 | int kgdb_arch_init(void) | ||
175 | { | ||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | void kgdb_arch_exit(void) | ||
180 | { | ||
181 | } | ||
182 | |||
183 | struct kgdb_arch arch_kgdb_ops = { | ||
184 | /* Breakpoint instruction: ta 0x72 */ | ||
185 | .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 }, | ||
186 | }; | ||
diff --git a/arch/sparc64/kernel/misctrap.S b/arch/sparc64/kernel/misctrap.S new file mode 100644 index 000000000000..753b4f031bfb --- /dev/null +++ b/arch/sparc64/kernel/misctrap.S | |||
@@ -0,0 +1,97 @@ | |||
1 | #ifdef CONFIG_KGDB | ||
2 | .globl arch_kgdb_breakpoint | ||
3 | .type arch_kgdb_breakpoint,#function | ||
4 | arch_kgdb_breakpoint: | ||
5 | ta 0x72 | ||
6 | retl | ||
7 | nop | ||
8 | .size arch_kgdb_breakpoint,.-arch_kgdb_breakpoint | ||
9 | #endif | ||
10 | |||
11 | .type __do_privact,#function | ||
12 | __do_privact: | ||
13 | mov TLB_SFSR, %g3 | ||
14 | stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit | ||
15 | membar #Sync | ||
16 | sethi %hi(109f), %g7 | ||
17 | ba,pt %xcc, etrap | ||
18 | 109: or %g7, %lo(109b), %g7 | ||
19 | call do_privact | ||
20 | add %sp, PTREGS_OFF, %o0 | ||
21 | ba,pt %xcc, rtrap | ||
22 | nop | ||
23 | .size __do_privact,.-__do_privact | ||
24 | |||
25 | .type do_mna,#function | ||
26 | do_mna: | ||
27 | rdpr %tl, %g3 | ||
28 | cmp %g3, 1 | ||
29 | |||
30 | /* Setup %g4/%g5 now as they are used in the | ||
31 | * winfixup code. | ||
32 | */ | ||
33 | mov TLB_SFSR, %g3 | ||
34 | mov DMMU_SFAR, %g4 | ||
35 | ldxa [%g4] ASI_DMMU, %g4 | ||
36 | ldxa [%g3] ASI_DMMU, %g5 | ||
37 | stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit | ||
38 | membar #Sync | ||
39 | bgu,pn %icc, winfix_mna | ||
40 | rdpr %tpc, %g3 | ||
41 | |||
42 | 1: sethi %hi(109f), %g7 | ||
43 | ba,pt %xcc, etrap | ||
44 | 109: or %g7, %lo(109b), %g7 | ||
45 | mov %l4, %o1 | ||
46 | mov %l5, %o2 | ||
47 | call mem_address_unaligned | ||
48 | add %sp, PTREGS_OFF, %o0 | ||
49 | ba,pt %xcc, rtrap | ||
50 | nop | ||
51 | .size do_mna,.-do_mna | ||
52 | |||
53 | .type do_lddfmna,#function | ||
54 | do_lddfmna: | ||
55 | sethi %hi(109f), %g7 | ||
56 | mov TLB_SFSR, %g4 | ||
57 | ldxa [%g4] ASI_DMMU, %g5 | ||
58 | stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit | ||
59 | membar #Sync | ||
60 | mov DMMU_SFAR, %g4 | ||
61 | ldxa [%g4] ASI_DMMU, %g4 | ||
62 | ba,pt %xcc, etrap | ||
63 | 109: or %g7, %lo(109b), %g7 | ||
64 | mov %l4, %o1 | ||
65 | mov %l5, %o2 | ||
66 | call handle_lddfmna | ||
67 | add %sp, PTREGS_OFF, %o0 | ||
68 | ba,pt %xcc, rtrap | ||
69 | nop | ||
70 | .size do_lddfmna,.-do_lddfmna | ||
71 | |||
72 | .type do_stdfmna,#function | ||
73 | do_stdfmna: | ||
74 | sethi %hi(109f), %g7 | ||
75 | mov TLB_SFSR, %g4 | ||
76 | ldxa [%g4] ASI_DMMU, %g5 | ||
77 | stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit | ||
78 | membar #Sync | ||
79 | mov DMMU_SFAR, %g4 | ||
80 | ldxa [%g4] ASI_DMMU, %g4 | ||
81 | ba,pt %xcc, etrap | ||
82 | 109: or %g7, %lo(109b), %g7 | ||
83 | mov %l4, %o1 | ||
84 | mov %l5, %o2 | ||
85 | call handle_stdfmna | ||
86 | add %sp, PTREGS_OFF, %o0 | ||
87 | ba,pt %xcc, rtrap | ||
88 | nop | ||
89 | .size do_stdfmna,.-do_stdfmna | ||
90 | |||
91 | .type breakpoint_trap,#function | ||
92 | breakpoint_trap: | ||
93 | call sparc_breakpoint | ||
94 | add %sp, PTREGS_OFF, %o0 | ||
95 | ba,pt %xcc, rtrap | ||
96 | nop | ||
97 | .size breakpoint_trap,.-breakpoint_trap | ||
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 409dd71f2738..3aba47624df4 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
39 | #include <asm/oplib.h> | 39 | #include <asm/oplib.h> |
40 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
41 | #include <asm/timer.h> | ||
42 | #include <asm/starfire.h> | 41 | #include <asm/starfire.h> |
43 | #include <asm/tlb.h> | 42 | #include <asm/tlb.h> |
44 | #include <asm/sections.h> | 43 | #include <asm/sections.h> |
@@ -910,6 +909,9 @@ extern unsigned long xcall_flush_tlb_kernel_range; | |||
910 | extern unsigned long xcall_report_regs; | 909 | extern unsigned long xcall_report_regs; |
911 | extern unsigned long xcall_receive_signal; | 910 | extern unsigned long xcall_receive_signal; |
912 | extern unsigned long xcall_new_mmu_context_version; | 911 | extern unsigned long xcall_new_mmu_context_version; |
912 | #ifdef CONFIG_KGDB | ||
913 | extern unsigned long xcall_kgdb_capture; | ||
914 | #endif | ||
913 | 915 | ||
914 | #ifdef DCACHE_ALIASING_POSSIBLE | 916 | #ifdef DCACHE_ALIASING_POSSIBLE |
915 | extern unsigned long xcall_flush_dcache_page_cheetah; | 917 | extern unsigned long xcall_flush_dcache_page_cheetah; |
@@ -1079,6 +1081,13 @@ void smp_new_mmu_context_version(void) | |||
1079 | smp_cross_call(&xcall_new_mmu_context_version, 0, 0, 0); | 1081 | smp_cross_call(&xcall_new_mmu_context_version, 0, 0, 0); |
1080 | } | 1082 | } |
1081 | 1083 | ||
1084 | #ifdef CONFIG_KGDB | ||
1085 | void kgdb_roundup_cpus(unsigned long flags) | ||
1086 | { | ||
1087 | smp_cross_call(&xcall_kgdb_capture, 0, 0, 0); | ||
1088 | } | ||
1089 | #endif | ||
1090 | |||
1082 | void smp_report_regs(void) | 1091 | void smp_report_regs(void) |
1083 | { | 1092 | { |
1084 | smp_cross_call(&xcall_report_regs, 0, 0, 0); | 1093 | smp_cross_call(&xcall_report_regs, 0, 0, 0); |
diff --git a/arch/sparc64/kernel/spiterrs.S b/arch/sparc64/kernel/spiterrs.S new file mode 100644 index 000000000000..ef902c6f8e3c --- /dev/null +++ b/arch/sparc64/kernel/spiterrs.S | |||
@@ -0,0 +1,245 @@ | |||
1 | /* We need to carefully read the error status, ACK the errors, | ||
2 | * prevent recursive traps, and pass the information on to C | ||
3 | * code for logging. | ||
4 | * | ||
5 | * We pass the AFAR in as-is, and we encode the status | ||
6 | * information as described in asm-sparc64/sfafsr.h | ||
7 | */ | ||
8 | .type __spitfire_access_error,#function | ||
9 | __spitfire_access_error: | ||
10 | /* Disable ESTATE error reporting so that we do not take | ||
11 | * recursive traps and RED state the processor. | ||
12 | */ | ||
13 | stxa %g0, [%g0] ASI_ESTATE_ERROR_EN | ||
14 | membar #Sync | ||
15 | |||
16 | mov UDBE_UE, %g1 | ||
17 | ldxa [%g0] ASI_AFSR, %g4 ! Get AFSR | ||
18 | |||
19 | /* __spitfire_cee_trap branches here with AFSR in %g4 and | ||
20 | * UDBE_CE in %g1. It only clears ESTATE_ERR_CE in the ESTATE | ||
21 | * Error Enable register. | ||
22 | */ | ||
23 | __spitfire_cee_trap_continue: | ||
24 | ldxa [%g0] ASI_AFAR, %g5 ! Get AFAR | ||
25 | |||
26 | rdpr %tt, %g3 | ||
27 | and %g3, 0x1ff, %g3 ! Paranoia | ||
28 | sllx %g3, SFSTAT_TRAP_TYPE_SHIFT, %g3 | ||
29 | or %g4, %g3, %g4 | ||
30 | rdpr %tl, %g3 | ||
31 | cmp %g3, 1 | ||
32 | mov 1, %g3 | ||
33 | bleu %xcc, 1f | ||
34 | sllx %g3, SFSTAT_TL_GT_ONE_SHIFT, %g3 | ||
35 | |||
36 | or %g4, %g3, %g4 | ||
37 | |||
38 | /* Read in the UDB error register state, clearing the sticky | ||
39 | * error bits as-needed. We only clear them if the UE bit is | ||
40 | * set. Likewise, __spitfire_cee_trap below will only do so | ||
41 | * if the CE bit is set. | ||
42 | * | ||
43 | * NOTE: UltraSparc-I/II have high and low UDB error | ||
44 | * registers, corresponding to the two UDB units | ||
45 | * present on those chips. UltraSparc-IIi only | ||
46 | * has a single UDB, called "SDB" in the manual. | ||
47 | * For IIi the upper UDB register always reads | ||
48 | * as zero so for our purposes things will just | ||
49 | * work with the checks below. | ||
50 | */ | ||
51 | 1: ldxa [%g0] ASI_UDBH_ERROR_R, %g3 | ||
52 | and %g3, 0x3ff, %g7 ! Paranoia | ||
53 | sllx %g7, SFSTAT_UDBH_SHIFT, %g7 | ||
54 | or %g4, %g7, %g4 | ||
55 | andcc %g3, %g1, %g3 ! UDBE_UE or UDBE_CE | ||
56 | be,pn %xcc, 1f | ||
57 | nop | ||
58 | stxa %g3, [%g0] ASI_UDB_ERROR_W | ||
59 | membar #Sync | ||
60 | |||
61 | 1: mov 0x18, %g3 | ||
62 | ldxa [%g3] ASI_UDBL_ERROR_R, %g3 | ||
63 | and %g3, 0x3ff, %g7 ! Paranoia | ||
64 | sllx %g7, SFSTAT_UDBL_SHIFT, %g7 | ||
65 | or %g4, %g7, %g4 | ||
66 | andcc %g3, %g1, %g3 ! UDBE_UE or UDBE_CE | ||
67 | be,pn %xcc, 1f | ||
68 | nop | ||
69 | mov 0x18, %g7 | ||
70 | stxa %g3, [%g7] ASI_UDB_ERROR_W | ||
71 | membar #Sync | ||
72 | |||
73 | 1: /* Ok, now that we've latched the error state, clear the | ||
74 | * sticky bits in the AFSR. | ||
75 | */ | ||
76 | stxa %g4, [%g0] ASI_AFSR | ||
77 | membar #Sync | ||
78 | |||
79 | rdpr %tl, %g2 | ||
80 | cmp %g2, 1 | ||
81 | rdpr %pil, %g2 | ||
82 | bleu,pt %xcc, 1f | ||
83 | wrpr %g0, 15, %pil | ||
84 | |||
85 | ba,pt %xcc, etraptl1 | ||
86 | rd %pc, %g7 | ||
87 | |||
88 | ba,pt %xcc, 2f | ||
89 | nop | ||
90 | |||
91 | 1: ba,pt %xcc, etrap_irq | ||
92 | rd %pc, %g7 | ||
93 | |||
94 | 2: | ||
95 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
96 | call trace_hardirqs_off | ||
97 | nop | ||
98 | #endif | ||
99 | mov %l4, %o1 | ||
100 | mov %l5, %o2 | ||
101 | call spitfire_access_error | ||
102 | add %sp, PTREGS_OFF, %o0 | ||
103 | ba,pt %xcc, rtrap | ||
104 | nop | ||
105 | .size __spitfire_access_error,.-__spitfire_access_error | ||
106 | |||
107 | /* This is the trap handler entry point for ECC correctable | ||
108 | * errors. They are corrected, but we listen for the trap so | ||
109 | * that the event can be logged. | ||
110 | * | ||
111 | * Disrupting errors are either: | ||
112 | * 1) single-bit ECC errors during UDB reads to system | ||
113 | * memory | ||
114 | * 2) data parity errors during write-back events | ||
115 | * | ||
116 | * As far as I can make out from the manual, the CEE trap is | ||
117 | * only for correctable errors during memory read accesses by | ||
118 | * the front-end of the processor. | ||
119 | * | ||
120 | * The code below is only for trap level 1 CEE events, as it | ||
121 | * is the only situation where we can safely record and log. | ||
122 | * For trap level >1 we just clear the CE bit in the AFSR and | ||
123 | * return. | ||
124 | * | ||
125 | * This is just like __spiftire_access_error above, but it | ||
126 | * specifically handles correctable errors. If an | ||
127 | * uncorrectable error is indicated in the AFSR we will branch | ||
128 | * directly above to __spitfire_access_error to handle it | ||
129 | * instead. Uncorrectable therefore takes priority over | ||
130 | * correctable, and the error logging C code will notice this | ||
131 | * case by inspecting the trap type. | ||
132 | */ | ||
133 | .type __spitfire_cee_trap,#function | ||
134 | __spitfire_cee_trap: | ||
135 | ldxa [%g0] ASI_AFSR, %g4 ! Get AFSR | ||
136 | mov 1, %g3 | ||
137 | sllx %g3, SFAFSR_UE_SHIFT, %g3 | ||
138 | andcc %g4, %g3, %g0 ! Check for UE | ||
139 | bne,pn %xcc, __spitfire_access_error | ||
140 | nop | ||
141 | |||
142 | /* Ok, in this case we only have a correctable error. | ||
143 | * Indicate we only wish to capture that state in register | ||
144 | * %g1, and we only disable CE error reporting unlike UE | ||
145 | * handling which disables all errors. | ||
146 | */ | ||
147 | ldxa [%g0] ASI_ESTATE_ERROR_EN, %g3 | ||
148 | andn %g3, ESTATE_ERR_CE, %g3 | ||
149 | stxa %g3, [%g0] ASI_ESTATE_ERROR_EN | ||
150 | membar #Sync | ||
151 | |||
152 | /* Preserve AFSR in %g4, indicate UDB state to capture in %g1 */ | ||
153 | ba,pt %xcc, __spitfire_cee_trap_continue | ||
154 | mov UDBE_CE, %g1 | ||
155 | .size __spitfire_cee_trap,.-__spitfire_cee_trap | ||
156 | |||
157 | .type __spitfire_data_access_exception_tl1,#function | ||
158 | __spitfire_data_access_exception_tl1: | ||
159 | rdpr %pstate, %g4 | ||
160 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
161 | mov TLB_SFSR, %g3 | ||
162 | mov DMMU_SFAR, %g5 | ||
163 | ldxa [%g3] ASI_DMMU, %g4 ! Get SFSR | ||
164 | ldxa [%g5] ASI_DMMU, %g5 ! Get SFAR | ||
165 | stxa %g0, [%g3] ASI_DMMU ! Clear SFSR.FaultValid bit | ||
166 | membar #Sync | ||
167 | rdpr %tt, %g3 | ||
168 | cmp %g3, 0x80 ! first win spill/fill trap | ||
169 | blu,pn %xcc, 1f | ||
170 | cmp %g3, 0xff ! last win spill/fill trap | ||
171 | bgu,pn %xcc, 1f | ||
172 | nop | ||
173 | ba,pt %xcc, winfix_dax | ||
174 | rdpr %tpc, %g3 | ||
175 | 1: sethi %hi(109f), %g7 | ||
176 | ba,pt %xcc, etraptl1 | ||
177 | 109: or %g7, %lo(109b), %g7 | ||
178 | mov %l4, %o1 | ||
179 | mov %l5, %o2 | ||
180 | call spitfire_data_access_exception_tl1 | ||
181 | add %sp, PTREGS_OFF, %o0 | ||
182 | ba,pt %xcc, rtrap | ||
183 | nop | ||
184 | .size __spitfire_data_access_exception_tl1,.-__spitfire_data_access_exception_tl1 | ||
185 | |||
186 | .type __spitfire_data_access_exception,#function | ||
187 | __spitfire_data_access_exception: | ||
188 | rdpr %pstate, %g4 | ||
189 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
190 | mov TLB_SFSR, %g3 | ||
191 | mov DMMU_SFAR, %g5 | ||
192 | ldxa [%g3] ASI_DMMU, %g4 ! Get SFSR | ||
193 | ldxa [%g5] ASI_DMMU, %g5 ! Get SFAR | ||
194 | stxa %g0, [%g3] ASI_DMMU ! Clear SFSR.FaultValid bit | ||
195 | membar #Sync | ||
196 | sethi %hi(109f), %g7 | ||
197 | ba,pt %xcc, etrap | ||
198 | 109: or %g7, %lo(109b), %g7 | ||
199 | mov %l4, %o1 | ||
200 | mov %l5, %o2 | ||
201 | call spitfire_data_access_exception | ||
202 | add %sp, PTREGS_OFF, %o0 | ||
203 | ba,pt %xcc, rtrap | ||
204 | nop | ||
205 | .size __spitfire_data_access_exception,.-__spitfire_data_access_exception | ||
206 | |||
207 | .type __spitfire_insn_access_exception_tl1,#function | ||
208 | __spitfire_insn_access_exception_tl1: | ||
209 | rdpr %pstate, %g4 | ||
210 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
211 | mov TLB_SFSR, %g3 | ||
212 | ldxa [%g3] ASI_IMMU, %g4 ! Get SFSR | ||
213 | rdpr %tpc, %g5 ! IMMU has no SFAR, use TPC | ||
214 | stxa %g0, [%g3] ASI_IMMU ! Clear FaultValid bit | ||
215 | membar #Sync | ||
216 | sethi %hi(109f), %g7 | ||
217 | ba,pt %xcc, etraptl1 | ||
218 | 109: or %g7, %lo(109b), %g7 | ||
219 | mov %l4, %o1 | ||
220 | mov %l5, %o2 | ||
221 | call spitfire_insn_access_exception_tl1 | ||
222 | add %sp, PTREGS_OFF, %o0 | ||
223 | ba,pt %xcc, rtrap | ||
224 | nop | ||
225 | .size __spitfire_insn_access_exception_tl1,.-__spitfire_insn_access_exception_tl1 | ||
226 | |||
227 | .type __spitfire_insn_access_exception,#function | ||
228 | __spitfire_insn_access_exception: | ||
229 | rdpr %pstate, %g4 | ||
230 | wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate | ||
231 | mov TLB_SFSR, %g3 | ||
232 | ldxa [%g3] ASI_IMMU, %g4 ! Get SFSR | ||
233 | rdpr %tpc, %g5 ! IMMU has no SFAR, use TPC | ||
234 | stxa %g0, [%g3] ASI_IMMU ! Clear FaultValid bit | ||
235 | membar #Sync | ||
236 | sethi %hi(109f), %g7 | ||
237 | ba,pt %xcc, etrap | ||
238 | 109: or %g7, %lo(109b), %g7 | ||
239 | mov %l4, %o1 | ||
240 | mov %l5, %o2 | ||
241 | call spitfire_insn_access_exception | ||
242 | add %sp, PTREGS_OFF, %o0 | ||
243 | ba,pt %xcc, rtrap | ||
244 | nop | ||
245 | .size __spitfire_insn_access_exception,.-__spitfire_insn_access_exception | ||
diff --git a/arch/sparc64/kernel/syscalls.S b/arch/sparc64/kernel/syscalls.S new file mode 100644 index 000000000000..db19ed67acf6 --- /dev/null +++ b/arch/sparc64/kernel/syscalls.S | |||
@@ -0,0 +1,279 @@ | |||
1 | /* SunOS's execv() call only specifies the argv argument, the | ||
2 | * environment settings are the same as the calling processes. | ||
3 | */ | ||
4 | sys_execve: | ||
5 | sethi %hi(sparc_execve), %g1 | ||
6 | ba,pt %xcc, execve_merge | ||
7 | or %g1, %lo(sparc_execve), %g1 | ||
8 | |||
9 | #ifdef CONFIG_COMPAT | ||
10 | sunos_execv: | ||
11 | stx %g0, [%sp + PTREGS_OFF + PT_V9_I2] | ||
12 | sys32_execve: | ||
13 | sethi %hi(sparc32_execve), %g1 | ||
14 | or %g1, %lo(sparc32_execve), %g1 | ||
15 | #endif | ||
16 | |||
17 | execve_merge: | ||
18 | flushw | ||
19 | jmpl %g1, %g0 | ||
20 | add %sp, PTREGS_OFF, %o0 | ||
21 | |||
22 | .align 32 | ||
23 | sys_pipe: | ||
24 | ba,pt %xcc, sparc_pipe | ||
25 | add %sp, PTREGS_OFF, %o0 | ||
26 | sys_nis_syscall: | ||
27 | ba,pt %xcc, c_sys_nis_syscall | ||
28 | add %sp, PTREGS_OFF, %o0 | ||
29 | sys_memory_ordering: | ||
30 | ba,pt %xcc, sparc_memory_ordering | ||
31 | add %sp, PTREGS_OFF, %o1 | ||
32 | sys_sigaltstack: | ||
33 | ba,pt %xcc, do_sigaltstack | ||
34 | add %i6, STACK_BIAS, %o2 | ||
35 | #ifdef CONFIG_COMPAT | ||
36 | sys32_sigstack: | ||
37 | ba,pt %xcc, do_sys32_sigstack | ||
38 | mov %i6, %o2 | ||
39 | sys32_sigaltstack: | ||
40 | ba,pt %xcc, do_sys32_sigaltstack | ||
41 | mov %i6, %o2 | ||
42 | #endif | ||
43 | .align 32 | ||
44 | #ifdef CONFIG_COMPAT | ||
45 | sys32_sigreturn: | ||
46 | add %sp, PTREGS_OFF, %o0 | ||
47 | call do_sigreturn32 | ||
48 | add %o7, 1f-.-4, %o7 | ||
49 | nop | ||
50 | #endif | ||
51 | sys_rt_sigreturn: | ||
52 | add %sp, PTREGS_OFF, %o0 | ||
53 | call do_rt_sigreturn | ||
54 | add %o7, 1f-.-4, %o7 | ||
55 | nop | ||
56 | #ifdef CONFIG_COMPAT | ||
57 | sys32_rt_sigreturn: | ||
58 | add %sp, PTREGS_OFF, %o0 | ||
59 | call do_rt_sigreturn32 | ||
60 | add %o7, 1f-.-4, %o7 | ||
61 | nop | ||
62 | #endif | ||
63 | .align 32 | ||
64 | 1: ldx [%g6 + TI_FLAGS], %l5 | ||
65 | andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | ||
66 | be,pt %icc, rtrap | ||
67 | nop | ||
68 | add %sp, PTREGS_OFF, %o0 | ||
69 | call syscall_trace | ||
70 | mov 1, %o1 | ||
71 | ba,pt %xcc, rtrap | ||
72 | nop | ||
73 | |||
74 | /* This is how fork() was meant to be done, 8 instruction entry. | ||
75 | * | ||
76 | * I questioned the following code briefly, let me clear things | ||
77 | * up so you must not reason on it like I did. | ||
78 | * | ||
79 | * Know the fork_kpsr etc. we use in the sparc32 port? We don't | ||
80 | * need it here because the only piece of window state we copy to | ||
81 | * the child is the CWP register. Even if the parent sleeps, | ||
82 | * we are safe because we stuck it into pt_regs of the parent | ||
83 | * so it will not change. | ||
84 | * | ||
85 | * XXX This raises the question, whether we can do the same on | ||
86 | * XXX sparc32 to get rid of fork_kpsr _and_ fork_kwim. The | ||
87 | * XXX answer is yes. We stick fork_kpsr in UREG_G0 and | ||
88 | * XXX fork_kwim in UREG_G1 (global registers are considered | ||
89 | * XXX volatile across a system call in the sparc ABI I think | ||
90 | * XXX if it isn't we can use regs->y instead, anyone who depends | ||
91 | * XXX upon the Y register being preserved across a fork deserves | ||
92 | * XXX to lose). | ||
93 | * | ||
94 | * In fact we should take advantage of that fact for other things | ||
95 | * during system calls... | ||
96 | */ | ||
97 | .align 32 | ||
98 | sys_vfork: /* Under Linux, vfork and fork are just special cases of clone. */ | ||
99 | sethi %hi(0x4000 | 0x0100 | SIGCHLD), %o0 | ||
100 | or %o0, %lo(0x4000 | 0x0100 | SIGCHLD), %o0 | ||
101 | ba,pt %xcc, sys_clone | ||
102 | sys_fork: | ||
103 | clr %o1 | ||
104 | mov SIGCHLD, %o0 | ||
105 | sys_clone: | ||
106 | flushw | ||
107 | movrz %o1, %fp, %o1 | ||
108 | mov 0, %o3 | ||
109 | ba,pt %xcc, sparc_do_fork | ||
110 | add %sp, PTREGS_OFF, %o2 | ||
111 | |||
112 | .globl ret_from_syscall | ||
113 | ret_from_syscall: | ||
114 | /* Clear current_thread_info()->new_child, and | ||
115 | * check performance counter stuff too. | ||
116 | */ | ||
117 | stb %g0, [%g6 + TI_NEW_CHILD] | ||
118 | ldx [%g6 + TI_FLAGS], %l0 | ||
119 | call schedule_tail | ||
120 | mov %g7, %o0 | ||
121 | andcc %l0, _TIF_PERFCTR, %g0 | ||
122 | be,pt %icc, 1f | ||
123 | nop | ||
124 | ldx [%g6 + TI_PCR], %o7 | ||
125 | wr %g0, %o7, %pcr | ||
126 | |||
127 | /* Blackbird errata workaround. See commentary in | ||
128 | * smp.c:smp_percpu_timer_interrupt() for more | ||
129 | * information. | ||
130 | */ | ||
131 | ba,pt %xcc, 99f | ||
132 | nop | ||
133 | |||
134 | .align 64 | ||
135 | 99: wr %g0, %g0, %pic | ||
136 | rd %pic, %g0 | ||
137 | |||
138 | 1: ba,pt %xcc, ret_sys_call | ||
139 | ldx [%sp + PTREGS_OFF + PT_V9_I0], %o0 | ||
140 | |||
141 | .globl sparc_exit | ||
142 | .type sparc_exit,#function | ||
143 | sparc_exit: | ||
144 | rdpr %pstate, %g2 | ||
145 | wrpr %g2, PSTATE_IE, %pstate | ||
146 | rdpr %otherwin, %g1 | ||
147 | rdpr %cansave, %g3 | ||
148 | add %g3, %g1, %g3 | ||
149 | wrpr %g3, 0x0, %cansave | ||
150 | wrpr %g0, 0x0, %otherwin | ||
151 | wrpr %g2, 0x0, %pstate | ||
152 | ba,pt %xcc, sys_exit | ||
153 | stb %g0, [%g6 + TI_WSAVED] | ||
154 | .size sparc_exit,.-sparc_exit | ||
155 | |||
156 | linux_sparc_ni_syscall: | ||
157 | sethi %hi(sys_ni_syscall), %l7 | ||
158 | ba,pt %xcc, 4f | ||
159 | or %l7, %lo(sys_ni_syscall), %l7 | ||
160 | |||
161 | linux_syscall_trace32: | ||
162 | add %sp, PTREGS_OFF, %o0 | ||
163 | call syscall_trace | ||
164 | clr %o1 | ||
165 | srl %i0, 0, %o0 | ||
166 | srl %i4, 0, %o4 | ||
167 | srl %i1, 0, %o1 | ||
168 | srl %i2, 0, %o2 | ||
169 | ba,pt %xcc, 2f | ||
170 | srl %i3, 0, %o3 | ||
171 | |||
172 | linux_syscall_trace: | ||
173 | add %sp, PTREGS_OFF, %o0 | ||
174 | call syscall_trace | ||
175 | clr %o1 | ||
176 | mov %i0, %o0 | ||
177 | mov %i1, %o1 | ||
178 | mov %i2, %o2 | ||
179 | mov %i3, %o3 | ||
180 | b,pt %xcc, 2f | ||
181 | mov %i4, %o4 | ||
182 | |||
183 | |||
184 | /* Linux 32-bit system calls enter here... */ | ||
185 | .align 32 | ||
186 | .globl linux_sparc_syscall32 | ||
187 | linux_sparc_syscall32: | ||
188 | /* Direct access to user regs, much faster. */ | ||
189 | cmp %g1, NR_SYSCALLS ! IEU1 Group | ||
190 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | ||
191 | srl %i0, 0, %o0 ! IEU0 | ||
192 | sll %g1, 2, %l4 ! IEU0 Group | ||
193 | srl %i4, 0, %o4 ! IEU1 | ||
194 | lduw [%l7 + %l4], %l7 ! Load | ||
195 | srl %i1, 0, %o1 ! IEU0 Group | ||
196 | ldx [%g6 + TI_FLAGS], %l0 ! Load | ||
197 | |||
198 | srl %i5, 0, %o5 ! IEU1 | ||
199 | srl %i2, 0, %o2 ! IEU0 Group | ||
200 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | ||
201 | bne,pn %icc, linux_syscall_trace32 ! CTI | ||
202 | mov %i0, %l5 ! IEU1 | ||
203 | call %l7 ! CTI Group brk forced | ||
204 | srl %i3, 0, %o3 ! IEU0 | ||
205 | ba,a,pt %xcc, 3f | ||
206 | |||
207 | /* Linux native system calls enter here... */ | ||
208 | .align 32 | ||
209 | .globl linux_sparc_syscall | ||
210 | linux_sparc_syscall: | ||
211 | /* Direct access to user regs, much faster. */ | ||
212 | cmp %g1, NR_SYSCALLS ! IEU1 Group | ||
213 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | ||
214 | mov %i0, %o0 ! IEU0 | ||
215 | sll %g1, 2, %l4 ! IEU0 Group | ||
216 | mov %i1, %o1 ! IEU1 | ||
217 | lduw [%l7 + %l4], %l7 ! Load | ||
218 | 4: mov %i2, %o2 ! IEU0 Group | ||
219 | ldx [%g6 + TI_FLAGS], %l0 ! Load | ||
220 | |||
221 | mov %i3, %o3 ! IEU1 | ||
222 | mov %i4, %o4 ! IEU0 Group | ||
223 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 | ||
224 | bne,pn %icc, linux_syscall_trace ! CTI Group | ||
225 | mov %i0, %l5 ! IEU0 | ||
226 | 2: call %l7 ! CTI Group brk forced | ||
227 | mov %i5, %o5 ! IEU0 | ||
228 | nop | ||
229 | |||
230 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
231 | ret_sys_call: | ||
232 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 | ||
233 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc | ||
234 | sra %o0, 0, %o0 | ||
235 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 | ||
236 | sllx %g2, 32, %g2 | ||
237 | |||
238 | /* Check if force_successful_syscall_return() | ||
239 | * was invoked. | ||
240 | */ | ||
241 | ldub [%g6 + TI_SYS_NOERROR], %l2 | ||
242 | brnz,a,pn %l2, 80f | ||
243 | stb %g0, [%g6 + TI_SYS_NOERROR] | ||
244 | |||
245 | cmp %o0, -ERESTART_RESTARTBLOCK | ||
246 | bgeu,pn %xcc, 1f | ||
247 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 | ||
248 | 80: | ||
249 | /* System call success, clear Carry condition code. */ | ||
250 | andn %g3, %g2, %g3 | ||
251 | stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] | ||
252 | bne,pn %icc, linux_syscall_trace2 | ||
253 | add %l1, 0x4, %l2 ! npc = npc+4 | ||
254 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | ||
255 | ba,pt %xcc, rtrap | ||
256 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | ||
257 | |||
258 | 1: | ||
259 | /* System call failure, set Carry condition code. | ||
260 | * Also, get abs(errno) to return to the process. | ||
261 | */ | ||
262 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 | ||
263 | sub %g0, %o0, %o0 | ||
264 | or %g3, %g2, %g3 | ||
265 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
266 | stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] | ||
267 | bne,pn %icc, linux_syscall_trace2 | ||
268 | add %l1, 0x4, %l2 ! npc = npc+4 | ||
269 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | ||
270 | |||
271 | b,pt %xcc, rtrap | ||
272 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | ||
273 | linux_syscall_trace2: | ||
274 | add %sp, PTREGS_OFF, %o0 | ||
275 | call syscall_trace | ||
276 | mov 1, %o1 | ||
277 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | ||
278 | ba,pt %xcc, rtrap | ||
279 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | ||
diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S index b0de4c00b11a..450053af039e 100644 --- a/arch/sparc64/kernel/ttable.S +++ b/arch/sparc64/kernel/ttable.S | |||
@@ -153,7 +153,7 @@ tl0_resv164: BTRAP(0x164) BTRAP(0x165) BTRAP(0x166) BTRAP(0x167) BTRAP(0x168) | |||
153 | tl0_resv169: BTRAP(0x169) BTRAP(0x16a) BTRAP(0x16b) BTRAP(0x16c) | 153 | tl0_resv169: BTRAP(0x169) BTRAP(0x16a) BTRAP(0x16b) BTRAP(0x16c) |
154 | tl0_linux64: LINUX_64BIT_SYSCALL_TRAP | 154 | tl0_linux64: LINUX_64BIT_SYSCALL_TRAP |
155 | tl0_gsctx: TRAP(sparc64_get_context) TRAP(sparc64_set_context) | 155 | tl0_gsctx: TRAP(sparc64_get_context) TRAP(sparc64_set_context) |
156 | tl0_resv170: KPROBES_TRAP(0x170) KPROBES_TRAP(0x171) BTRAP(0x172) | 156 | tl0_resv170: KPROBES_TRAP(0x170) KPROBES_TRAP(0x171) KGDB_TRAP(0x172) |
157 | tl0_resv173: BTRAP(0x173) BTRAP(0x174) BTRAP(0x175) BTRAP(0x176) BTRAP(0x177) | 157 | tl0_resv173: BTRAP(0x173) BTRAP(0x174) BTRAP(0x175) BTRAP(0x176) BTRAP(0x177) |
158 | tl0_resv178: BTRAP(0x178) BTRAP(0x179) BTRAP(0x17a) BTRAP(0x17b) BTRAP(0x17c) | 158 | tl0_resv178: BTRAP(0x178) BTRAP(0x179) BTRAP(0x17a) BTRAP(0x17b) BTRAP(0x17c) |
159 | tl0_resv17d: BTRAP(0x17d) BTRAP(0x17e) BTRAP(0x17f) | 159 | tl0_resv17d: BTRAP(0x17d) BTRAP(0x17e) BTRAP(0x17f) |
diff --git a/arch/sparc64/kernel/utrap.S b/arch/sparc64/kernel/utrap.S new file mode 100644 index 000000000000..b7f0f3f3a909 --- /dev/null +++ b/arch/sparc64/kernel/utrap.S | |||
@@ -0,0 +1,29 @@ | |||
1 | .globl utrap_trap | ||
2 | .type utrap_trap,#function | ||
3 | utrap_trap: /* %g3=handler,%g4=level */ | ||
4 | TRAP_LOAD_THREAD_REG(%g6, %g1) | ||
5 | ldx [%g6 + TI_UTRAPS], %g1 | ||
6 | brnz,pt %g1, invoke_utrap | ||
7 | nop | ||
8 | |||
9 | ba,pt %xcc, etrap | ||
10 | rd %pc, %g7 | ||
11 | mov %l4, %o1 | ||
12 | call bad_trap | ||
13 | add %sp, PTREGS_OFF, %o0 | ||
14 | ba,pt %xcc, rtrap | ||
15 | nop | ||
16 | |||
17 | invoke_utrap: | ||
18 | sllx %g3, 3, %g3 | ||
19 | ldx [%g1 + %g3], %g1 | ||
20 | save %sp, -128, %sp | ||
21 | rdpr %tstate, %l6 | ||
22 | rdpr %cwp, %l7 | ||
23 | andn %l6, TSTATE_CWP, %l6 | ||
24 | wrpr %l6, %l7, %tstate | ||
25 | rdpr %tpc, %l6 | ||
26 | rdpr %tnpc, %l7 | ||
27 | wrpr %g1, 0, %tnpc | ||
28 | done | ||
29 | .size utrap_trap,.-utrap_trap | ||
diff --git a/arch/sparc64/lib/iomap.c b/arch/sparc64/lib/iomap.c index ac556db06973..7120ebbd4d03 100644 --- a/arch/sparc64/lib/iomap.c +++ b/arch/sparc64/lib/iomap.c | |||
@@ -21,8 +21,8 @@ EXPORT_SYMBOL(ioport_unmap); | |||
21 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 21 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ |
22 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | 22 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
23 | { | 23 | { |
24 | unsigned long start = pci_resource_start(dev, bar); | 24 | resource_size_t start = pci_resource_start(dev, bar); |
25 | unsigned long len = pci_resource_len(dev, bar); | 25 | resource_size_t len = pci_resource_len(dev, bar); |
26 | unsigned long flags = pci_resource_flags(dev, bar); | 26 | unsigned long flags = pci_resource_flags(dev, bar); |
27 | 27 | ||
28 | if (!len || !start) | 28 | if (!len || !start) |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 8c2b50e8abc6..4cad0b32b0af 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -160,6 +160,7 @@ extern unsigned int sparc_ramdisk_image; | |||
160 | extern unsigned int sparc_ramdisk_size; | 160 | extern unsigned int sparc_ramdisk_size; |
161 | 161 | ||
162 | struct page *mem_map_zero __read_mostly; | 162 | struct page *mem_map_zero __read_mostly; |
163 | EXPORT_SYMBOL(mem_map_zero); | ||
163 | 164 | ||
164 | unsigned int sparc64_highest_unlocked_tlb_ent __read_mostly; | 165 | unsigned int sparc64_highest_unlocked_tlb_ent __read_mostly; |
165 | 166 | ||
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index e686a67561af..796e005dad8b 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -676,6 +676,33 @@ xcall_new_mmu_context_version: | |||
676 | wr %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint | 676 | wr %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint |
677 | retry | 677 | retry |
678 | 678 | ||
679 | #ifdef CONFIG_KGDB | ||
680 | .globl xcall_kgdb_capture | ||
681 | xcall_kgdb_capture: | ||
682 | 661: rdpr %pstate, %g2 | ||
683 | wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate | ||
684 | .section .sun4v_2insn_patch, "ax" | ||
685 | .word 661b | ||
686 | nop | ||
687 | nop | ||
688 | .previous | ||
689 | |||
690 | rdpr %pil, %g2 | ||
691 | wrpr %g0, 15, %pil | ||
692 | sethi %hi(109f), %g7 | ||
693 | ba,pt %xcc, etrap_irq | ||
694 | 109: or %g7, %lo(109b), %g7 | ||
695 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
696 | call trace_hardirqs_off | ||
697 | nop | ||
698 | #endif | ||
699 | call smp_kgdb_capture_client | ||
700 | add %sp, PTREGS_OFF, %o0 | ||
701 | /* Has to be a non-v9 branch due to the large distance. */ | ||
702 | ba rtrap_xcall | ||
703 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | ||
704 | #endif | ||
705 | |||
679 | #endif /* CONFIG_SMP */ | 706 | #endif /* CONFIG_SMP */ |
680 | 707 | ||
681 | 708 | ||
diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c index 984f80e668ca..6540d2c9fbb7 100644 --- a/arch/um/kernel/exitcode.c +++ b/arch/um/kernel/exitcode.c | |||
@@ -59,7 +59,7 @@ static int make_proc_exitcode(void) | |||
59 | { | 59 | { |
60 | struct proc_dir_entry *ent; | 60 | struct proc_dir_entry *ent; |
61 | 61 | ||
62 | ent = create_proc_entry("exitcode", 0600, &proc_root); | 62 | ent = create_proc_entry("exitcode", 0600, NULL); |
63 | if (ent == NULL) { | 63 | if (ent == NULL) { |
64 | printk(KERN_WARNING "make_proc_exitcode : Failed to register " | 64 | printk(KERN_WARNING "make_proc_exitcode : Failed to register " |
65 | "/proc/exitcode\n"); | 65 | "/proc/exitcode\n"); |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index e8cb9ff183e9..83603cfbde81 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -364,7 +364,7 @@ int __init make_proc_sysemu(void) | |||
364 | if (!sysemu_supported) | 364 | if (!sysemu_supported) |
365 | return 0; | 365 | return 0; |
366 | 366 | ||
367 | ent = create_proc_entry("sysemu", 0600, &proc_root); | 367 | ent = create_proc_entry("sysemu", 0600, NULL); |
368 | 368 | ||
369 | if (ent == NULL) | 369 | if (ent == NULL) |
370 | { | 370 | { |
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index e066e84493b1..0d0cea2ac98d 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/clockchips.h> | 6 | #include <linux/clockchips.h> |
7 | #include <linux/init.h> | ||
7 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
8 | #include <linux/jiffies.h> | 9 | #include <linux/jiffies.h> |
9 | #include <linux/threads.h> | 10 | #include <linux/threads.h> |
@@ -109,8 +110,6 @@ static void __init setup_itimer(void) | |||
109 | clockevents_register_device(&itimer_clockevent); | 110 | clockevents_register_device(&itimer_clockevent); |
110 | } | 111 | } |
111 | 112 | ||
112 | extern void (*late_time_init)(void); | ||
113 | |||
114 | void __init time_init(void) | 113 | void __init time_init(void) |
115 | { | 114 | { |
116 | long long nsecs; | 115 | long long nsecs; |
diff --git a/arch/v850/kernel/asm-offsets.c b/arch/v850/kernel/asm-offsets.c index cee5c3142d41..581e6986a776 100644 --- a/arch/v850/kernel/asm-offsets.c +++ b/arch/v850/kernel/asm-offsets.c | |||
@@ -13,14 +13,11 @@ | |||
13 | #include <linux/kernel_stat.h> | 13 | #include <linux/kernel_stat.h> |
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/hardirq.h> | 15 | #include <linux/hardirq.h> |
16 | #include <linux/kbuild.h> | ||
17 | |||
16 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
17 | #include <asm/errno.h> | 19 | #include <asm/errno.h> |
18 | 20 | ||
19 | #define DEFINE(sym, val) \ | ||
20 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
21 | |||
22 | #define BLANK() asm volatile("\n->" : : ) | ||
23 | |||
24 | int main (void) | 21 | int main (void) |
25 | { | 22 | { |
26 | /* offsets into the task struct */ | 23 | /* offsets into the task struct */ |
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c index 7165478824e7..687e367d8b64 100644 --- a/arch/v850/kernel/rte_mb_a_pci.c +++ b/arch/v850/kernel/rte_mb_a_pci.c | |||
@@ -790,8 +790,8 @@ pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, | |||
790 | 790 | ||
791 | void __iomem *pci_iomap (struct pci_dev *dev, int bar, unsigned long max) | 791 | void __iomem *pci_iomap (struct pci_dev *dev, int bar, unsigned long max) |
792 | { | 792 | { |
793 | unsigned long start = pci_resource_start (dev, bar); | 793 | resource_size_t start = pci_resource_start (dev, bar); |
794 | unsigned long len = pci_resource_len (dev, bar); | 794 | resource_size_t len = pci_resource_len (dev, bar); |
795 | 795 | ||
796 | if (!start || len == 0) | 796 | if (!start || len == 0) |
797 | return 0; | 797 | return 0; |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index a12dbb2b93f3..c3f880902d66 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -25,6 +25,18 @@ config X86 | |||
25 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) | 25 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) |
26 | select HAVE_ARCH_KGDB if !X86_VOYAGER | 26 | select HAVE_ARCH_KGDB if !X86_VOYAGER |
27 | 27 | ||
28 | config DEFCONFIG_LIST | ||
29 | string | ||
30 | depends on X86_32 | ||
31 | option defconfig_list | ||
32 | default "arch/x86/configs/i386_defconfig" | ||
33 | |||
34 | config DEFCONFIG_LIST | ||
35 | string | ||
36 | depends on X86_64 | ||
37 | option defconfig_list | ||
38 | default "arch/x86/configs/x86_64_defconfig" | ||
39 | |||
28 | 40 | ||
29 | config GENERIC_LOCKBREAK | 41 | config GENERIC_LOCKBREAK |
30 | def_bool n | 42 | def_bool n |
@@ -180,7 +192,7 @@ config X86_HT | |||
180 | 192 | ||
181 | config X86_BIOS_REBOOT | 193 | config X86_BIOS_REBOOT |
182 | bool | 194 | bool |
183 | depends on X86_32 && !(X86_VISWS || X86_VOYAGER) | 195 | depends on !X86_VISWS && !X86_VOYAGER |
184 | default y | 196 | default y |
185 | 197 | ||
186 | config X86_TRAMPOLINE | 198 | config X86_TRAMPOLINE |
@@ -537,9 +549,6 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT | |||
537 | Calgary anyway, pass 'iommu=calgary' on the kernel command line. | 549 | Calgary anyway, pass 'iommu=calgary' on the kernel command line. |
538 | If unsure, say Y. | 550 | If unsure, say Y. |
539 | 551 | ||
540 | config IOMMU_HELPER | ||
541 | def_bool (CALGARY_IOMMU || GART_IOMMU) | ||
542 | |||
543 | # need this always selected by IOMMU for the VIA workaround | 552 | # need this always selected by IOMMU for the VIA workaround |
544 | config SWIOTLB | 553 | config SWIOTLB |
545 | bool | 554 | bool |
@@ -550,6 +559,8 @@ config SWIOTLB | |||
550 | access 32-bits of memory can be used on systems with more than | 559 | access 32-bits of memory can be used on systems with more than |
551 | 3 GB of memory. If unsure, say Y. | 560 | 3 GB of memory. If unsure, say Y. |
552 | 561 | ||
562 | config IOMMU_HELPER | ||
563 | def_bool (CALGARY_IOMMU || GART_IOMMU || SWIOTLB) | ||
553 | 564 | ||
554 | config NR_CPUS | 565 | config NR_CPUS |
555 | int "Maximum number of CPUs (2-255)" | 566 | int "Maximum number of CPUs (2-255)" |
@@ -1162,7 +1173,7 @@ source kernel/Kconfig.hz | |||
1162 | 1173 | ||
1163 | config KEXEC | 1174 | config KEXEC |
1164 | bool "kexec system call" | 1175 | bool "kexec system call" |
1165 | depends on X86_64 || X86_BIOS_REBOOT | 1176 | depends on X86_BIOS_REBOOT |
1166 | help | 1177 | help |
1167 | kexec is a system call that implements the ability to shutdown your | 1178 | kexec is a system call that implements the ability to shutdown your |
1168 | current kernel, and to start another kernel. It is like a reboot | 1179 | current kernel, and to start another kernel. It is like a reboot |
@@ -1505,6 +1516,10 @@ config PCI_GODIRECT | |||
1505 | config PCI_GOANY | 1516 | config PCI_GOANY |
1506 | bool "Any" | 1517 | bool "Any" |
1507 | 1518 | ||
1519 | config PCI_GOOLPC | ||
1520 | bool "OLPC" | ||
1521 | depends on OLPC | ||
1522 | |||
1508 | endchoice | 1523 | endchoice |
1509 | 1524 | ||
1510 | config PCI_BIOS | 1525 | config PCI_BIOS |
@@ -1514,12 +1529,17 @@ config PCI_BIOS | |||
1514 | # x86-64 doesn't support PCI BIOS access from long mode so always go direct. | 1529 | # x86-64 doesn't support PCI BIOS access from long mode so always go direct. |
1515 | config PCI_DIRECT | 1530 | config PCI_DIRECT |
1516 | def_bool y | 1531 | def_bool y |
1517 | depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY) || X86_VISWS) | 1532 | depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC) || X86_VISWS) |
1518 | 1533 | ||
1519 | config PCI_MMCONFIG | 1534 | config PCI_MMCONFIG |
1520 | def_bool y | 1535 | def_bool y |
1521 | depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) | 1536 | depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) |
1522 | 1537 | ||
1538 | config PCI_OLPC | ||
1539 | bool | ||
1540 | depends on PCI && PCI_GOOLPC | ||
1541 | default y | ||
1542 | |||
1523 | config PCI_DOMAINS | 1543 | config PCI_DOMAINS |
1524 | def_bool y | 1544 | def_bool y |
1525 | depends on PCI | 1545 | depends on PCI |
@@ -1639,6 +1659,13 @@ config GEODE_MFGPT_TIMER | |||
1639 | MFGPTs have a better resolution and max interval than the | 1659 | MFGPTs have a better resolution and max interval than the |
1640 | generic PIT, and are suitable for use as high-res timers. | 1660 | generic PIT, and are suitable for use as high-res timers. |
1641 | 1661 | ||
1662 | config OLPC | ||
1663 | bool "One Laptop Per Child support" | ||
1664 | default n | ||
1665 | help | ||
1666 | Add support for detecting the unique features of the OLPC | ||
1667 | XO hardware. | ||
1668 | |||
1642 | endif # X86_32 | 1669 | endif # X86_32 |
1643 | 1670 | ||
1644 | config K8_NB | 1671 | config K8_NB |
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 7ef18b01f0bc..2ad6301849a1 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -278,11 +278,6 @@ config GENERIC_CPU | |||
278 | 278 | ||
279 | endchoice | 279 | endchoice |
280 | 280 | ||
281 | config X86_CPU | ||
282 | def_bool y | ||
283 | select GENERIC_FIND_FIRST_BIT | ||
284 | select GENERIC_FIND_NEXT_BIT | ||
285 | |||
286 | config X86_GENERIC | 281 | config X86_GENERIC |
287 | bool "Generic x86 support" | 282 | bool "Generic x86 support" |
288 | depends on X86_32 | 283 | depends on X86_32 |
@@ -297,6 +292,11 @@ config X86_GENERIC | |||
297 | 292 | ||
298 | endif | 293 | endif |
299 | 294 | ||
295 | config X86_CPU | ||
296 | def_bool y | ||
297 | select GENERIC_FIND_FIRST_BIT | ||
298 | select GENERIC_FIND_NEXT_BIT | ||
299 | |||
300 | # | 300 | # |
301 | # Define implied options from the CPU selection here | 301 | # Define implied options from the CPU selection here |
302 | config X86_L1_CACHE_BYTES | 302 | config X86_L1_CACHE_BYTES |
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 5b1979a45a1e..ac1e31ba4795 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -118,7 +118,6 @@ config DEBUG_NX_TEST | |||
118 | config 4KSTACKS | 118 | config 4KSTACKS |
119 | bool "Use 4Kb for kernel stacks instead of 8Kb" | 119 | bool "Use 4Kb for kernel stacks instead of 8Kb" |
120 | depends on X86_32 | 120 | depends on X86_32 |
121 | default y | ||
122 | help | 121 | help |
123 | If you say Y here the kernel will use a 4Kb stacksize for the | 122 | If you say Y here the kernel will use a 4Kb stacksize for the |
124 | kernel stack attached to each process/thread. This facilitates | 123 | kernel stack attached to each process/thread. This facilitates |
@@ -256,11 +255,9 @@ config CPA_DEBUG | |||
256 | help | 255 | help |
257 | Do change_page_attr() self-tests every 30 seconds. | 256 | Do change_page_attr() self-tests every 30 seconds. |
258 | 257 | ||
259 | endmenu | ||
260 | |||
261 | config OPTIMIZE_INLINING | 258 | config OPTIMIZE_INLINING |
262 | bool "Allow gcc to uninline functions marked 'inline'" | 259 | bool "Allow gcc to uninline functions marked 'inline'" |
263 | default y | 260 | depends on BROKEN |
264 | help | 261 | help |
265 | This option determines if the kernel forces gcc to inline the functions | 262 | This option determines if the kernel forces gcc to inline the functions |
266 | developers have marked 'inline'. Doing so takes away freedom from gcc to | 263 | developers have marked 'inline'. Doing so takes away freedom from gcc to |
@@ -270,3 +267,6 @@ config OPTIMIZE_INLINING | |||
270 | this algorithm is so good that allowing gcc4 to make the decision can | 267 | this algorithm is so good that allowing gcc4 to make the decision can |
271 | become the default in the future, until then this option is there to | 268 | become the default in the future, until then this option is there to |
272 | test gcc for this. | 269 | test gcc for this. |
270 | |||
271 | endmenu | ||
272 | |||
diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c index d84a48ece785..03399d64013b 100644 --- a/arch/x86/boot/edd.c +++ b/arch/x86/boot/edd.c | |||
@@ -126,17 +126,25 @@ void query_edd(void) | |||
126 | { | 126 | { |
127 | char eddarg[8]; | 127 | char eddarg[8]; |
128 | int do_mbr = 1; | 128 | int do_mbr = 1; |
129 | #ifdef CONFIG_EDD_OFF | ||
130 | int do_edd = 0; | ||
131 | #else | ||
129 | int do_edd = 1; | 132 | int do_edd = 1; |
133 | #endif | ||
130 | int be_quiet; | 134 | int be_quiet; |
131 | int devno; | 135 | int devno; |
132 | struct edd_info ei, *edp; | 136 | struct edd_info ei, *edp; |
133 | u32 *mbrptr; | 137 | u32 *mbrptr; |
134 | 138 | ||
135 | if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) { | 139 | if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) { |
136 | if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) | 140 | if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) { |
141 | do_edd = 1; | ||
137 | do_mbr = 0; | 142 | do_mbr = 0; |
143 | } | ||
138 | else if (!strcmp(eddarg, "off")) | 144 | else if (!strcmp(eddarg, "off")) |
139 | do_edd = 0; | 145 | do_edd = 0; |
146 | else if (!strcmp(eddarg, "on")) | ||
147 | do_edd = 1; | ||
140 | } | 148 | } |
141 | 149 | ||
142 | be_quiet = cmdline_find_option_bool("quiet"); | 150 | be_quiet = cmdline_find_option_bool("quiet"); |
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index bbed3a26ce55..cb3856a18c85 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -128,7 +128,7 @@ asmlinkage long sys32_sigsuspend(int history0, int history1, old_sigset_t mask) | |||
128 | 128 | ||
129 | current->state = TASK_INTERRUPTIBLE; | 129 | current->state = TASK_INTERRUPTIBLE; |
130 | schedule(); | 130 | schedule(); |
131 | set_thread_flag(TIF_RESTORE_SIGMASK); | 131 | set_restore_sigmask(); |
132 | return -ERESTARTNOHAND; | 132 | return -ERESTARTNOHAND; |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index fa19c3819540..bbdacb398d48 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -40,7 +40,6 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o | |||
40 | obj-y += cpu/ | 40 | obj-y += cpu/ |
41 | obj-y += acpi/ | 41 | obj-y += acpi/ |
42 | obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o | 42 | obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o |
43 | obj-$(CONFIG_X86_64) += reboot.o | ||
44 | obj-$(CONFIG_MCA) += mca_32.o | 43 | obj-$(CONFIG_MCA) += mca_32.o |
45 | obj-$(CONFIG_X86_MSR) += msr.o | 44 | obj-$(CONFIG_X86_MSR) += msr.o |
46 | obj-$(CONFIG_X86_CPUID) += cpuid.o | 45 | obj-$(CONFIG_X86_CPUID) += cpuid.o |
@@ -91,6 +90,8 @@ endif | |||
91 | obj-$(CONFIG_SCx200) += scx200.o | 90 | obj-$(CONFIG_SCx200) += scx200.o |
92 | scx200-y += scx200_32.o | 91 | scx200-y += scx200_32.o |
93 | 92 | ||
93 | obj-$(CONFIG_OLPC) += olpc.o | ||
94 | |||
94 | ### | 95 | ### |
95 | # 64 bit specific files | 96 | # 64 bit specific files |
96 | ifeq ($(CONFIG_X86_64),y) | 97 | ifeq ($(CONFIG_X86_64),y) |
@@ -101,4 +102,6 @@ ifeq ($(CONFIG_X86_64),y) | |||
101 | obj-$(CONFIG_GART_IOMMU) += pci-gart_64.o aperture_64.o | 102 | obj-$(CONFIG_GART_IOMMU) += pci-gart_64.o aperture_64.o |
102 | obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o | 103 | obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o |
103 | obj-$(CONFIG_SWIOTLB) += pci-swiotlb_64.o | 104 | obj-$(CONFIG_SWIOTLB) += pci-swiotlb_64.o |
105 | |||
106 | obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o | ||
104 | endif | 107 | endif |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 977ed5cdeaa3..c49ebcc6c41e 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -771,6 +771,32 @@ static void __init acpi_register_lapic_address(unsigned long address) | |||
771 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); | 771 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); |
772 | } | 772 | } |
773 | 773 | ||
774 | static int __init early_acpi_parse_madt_lapic_addr_ovr(void) | ||
775 | { | ||
776 | int count; | ||
777 | |||
778 | if (!cpu_has_apic) | ||
779 | return -ENODEV; | ||
780 | |||
781 | /* | ||
782 | * Note that the LAPIC address is obtained from the MADT (32-bit value) | ||
783 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). | ||
784 | */ | ||
785 | |||
786 | count = | ||
787 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, | ||
788 | acpi_parse_lapic_addr_ovr, 0); | ||
789 | if (count < 0) { | ||
790 | printk(KERN_ERR PREFIX | ||
791 | "Error parsing LAPIC address override entry\n"); | ||
792 | return count; | ||
793 | } | ||
794 | |||
795 | acpi_register_lapic_address(acpi_lapic_addr); | ||
796 | |||
797 | return count; | ||
798 | } | ||
799 | |||
774 | static int __init acpi_parse_madt_lapic_entries(void) | 800 | static int __init acpi_parse_madt_lapic_entries(void) |
775 | { | 801 | { |
776 | int count; | 802 | int count; |
@@ -901,6 +927,33 @@ static inline int acpi_parse_madt_ioapic_entries(void) | |||
901 | } | 927 | } |
902 | #endif /* !CONFIG_X86_IO_APIC */ | 928 | #endif /* !CONFIG_X86_IO_APIC */ |
903 | 929 | ||
930 | static void __init early_acpi_process_madt(void) | ||
931 | { | ||
932 | #ifdef CONFIG_X86_LOCAL_APIC | ||
933 | int error; | ||
934 | |||
935 | if (!acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) { | ||
936 | |||
937 | /* | ||
938 | * Parse MADT LAPIC entries | ||
939 | */ | ||
940 | error = early_acpi_parse_madt_lapic_addr_ovr(); | ||
941 | if (!error) { | ||
942 | acpi_lapic = 1; | ||
943 | smp_found_config = 1; | ||
944 | } | ||
945 | if (error == -EINVAL) { | ||
946 | /* | ||
947 | * Dell Precision Workstation 410, 610 come here. | ||
948 | */ | ||
949 | printk(KERN_ERR PREFIX | ||
950 | "Invalid BIOS MADT, disabling ACPI\n"); | ||
951 | disable_acpi(); | ||
952 | } | ||
953 | } | ||
954 | #endif | ||
955 | } | ||
956 | |||
904 | static void __init acpi_process_madt(void) | 957 | static void __init acpi_process_madt(void) |
905 | { | 958 | { |
906 | #ifdef CONFIG_X86_LOCAL_APIC | 959 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -1233,6 +1286,23 @@ int __init acpi_boot_table_init(void) | |||
1233 | return 0; | 1286 | return 0; |
1234 | } | 1287 | } |
1235 | 1288 | ||
1289 | int __init early_acpi_boot_init(void) | ||
1290 | { | ||
1291 | /* | ||
1292 | * If acpi_disabled, bail out | ||
1293 | * One exception: acpi=ht continues far enough to enumerate LAPICs | ||
1294 | */ | ||
1295 | if (acpi_disabled && !acpi_ht) | ||
1296 | return 1; | ||
1297 | |||
1298 | /* | ||
1299 | * Process the Multiple APIC Description Table (MADT), if present | ||
1300 | */ | ||
1301 | early_acpi_process_madt(); | ||
1302 | |||
1303 | return 0; | ||
1304 | } | ||
1305 | |||
1236 | int __init acpi_boot_init(void) | 1306 | int __init acpi_boot_init(void) |
1237 | { | 1307 | { |
1238 | /* | 1308 | /* |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index e4ea362e8480..bf9290e29013 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -1192,19 +1192,6 @@ static int suspend(int vetoable) | |||
1192 | int err; | 1192 | int err; |
1193 | struct apm_user *as; | 1193 | struct apm_user *as; |
1194 | 1194 | ||
1195 | if (pm_send_all(PM_SUSPEND, (void *)3)) { | ||
1196 | /* Vetoed */ | ||
1197 | if (vetoable) { | ||
1198 | if (apm_info.connection_version > 0x100) | ||
1199 | set_system_power_state(APM_STATE_REJECT); | ||
1200 | err = -EBUSY; | ||
1201 | ignore_sys_suspend = 0; | ||
1202 | printk(KERN_WARNING "apm: suspend was vetoed.\n"); | ||
1203 | goto out; | ||
1204 | } | ||
1205 | printk(KERN_CRIT "apm: suspend was vetoed, but suspending anyway.\n"); | ||
1206 | } | ||
1207 | |||
1208 | device_suspend(PMSG_SUSPEND); | 1195 | device_suspend(PMSG_SUSPEND); |
1209 | local_irq_disable(); | 1196 | local_irq_disable(); |
1210 | device_power_down(PMSG_SUSPEND); | 1197 | device_power_down(PMSG_SUSPEND); |
@@ -1227,9 +1214,7 @@ static int suspend(int vetoable) | |||
1227 | device_power_up(); | 1214 | device_power_up(); |
1228 | local_irq_enable(); | 1215 | local_irq_enable(); |
1229 | device_resume(); | 1216 | device_resume(); |
1230 | pm_send_all(PM_RESUME, (void *)0); | ||
1231 | queue_event(APM_NORMAL_RESUME, NULL); | 1217 | queue_event(APM_NORMAL_RESUME, NULL); |
1232 | out: | ||
1233 | spin_lock(&user_list_lock); | 1218 | spin_lock(&user_list_lock); |
1234 | for (as = user_list; as != NULL; as = as->next) { | 1219 | for (as = user_list; as != NULL; as = as->next) { |
1235 | as->suspend_wait = 0; | 1220 | as->suspend_wait = 0; |
@@ -1340,7 +1325,6 @@ static void check_events(void) | |||
1340 | if ((event != APM_NORMAL_RESUME) | 1325 | if ((event != APM_NORMAL_RESUME) |
1341 | || (ignore_normal_resume == 0)) { | 1326 | || (ignore_normal_resume == 0)) { |
1342 | device_resume(); | 1327 | device_resume(); |
1343 | pm_send_all(PM_RESUME, (void *)0); | ||
1344 | queue_event(event, NULL); | 1328 | queue_event(event, NULL); |
1345 | } | 1329 | } |
1346 | ignore_normal_resume = 0; | 1330 | ignore_normal_resume = 0; |
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c index 670c3c311289..92588083950f 100644 --- a/arch/x86/kernel/asm-offsets_32.c +++ b/arch/x86/kernel/asm-offsets_32.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/signal.h> | 9 | #include <linux/signal.h> |
10 | #include <linux/personality.h> | 10 | #include <linux/personality.h> |
11 | #include <linux/suspend.h> | 11 | #include <linux/suspend.h> |
12 | #include <linux/kbuild.h> | ||
12 | #include <asm/ucontext.h> | 13 | #include <asm/ucontext.h> |
13 | #include "sigframe.h" | 14 | #include "sigframe.h" |
14 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable.h> |
@@ -23,14 +24,6 @@ | |||
23 | #include <linux/lguest.h> | 24 | #include <linux/lguest.h> |
24 | #include "../../../drivers/lguest/lg.h" | 25 | #include "../../../drivers/lguest/lg.h" |
25 | 26 | ||
26 | #define DEFINE(sym, val) \ | ||
27 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
28 | |||
29 | #define BLANK() asm volatile("\n->" : : ) | ||
30 | |||
31 | #define OFFSET(sym, str, mem) \ | ||
32 | DEFINE(sym, offsetof(struct str, mem)); | ||
33 | |||
34 | /* workaround for a warning with -Wmissing-prototypes */ | 27 | /* workaround for a warning with -Wmissing-prototypes */ |
35 | void foo(void); | 28 | void foo(void); |
36 | 29 | ||
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index 494e1e096ee6..f126c05d6170 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
12 | #include <linux/suspend.h> | 12 | #include <linux/suspend.h> |
13 | #include <linux/kbuild.h> | ||
13 | #include <asm/pda.h> | 14 | #include <asm/pda.h> |
14 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
15 | #include <asm/segment.h> | 16 | #include <asm/segment.h> |
@@ -17,14 +18,6 @@ | |||
17 | #include <asm/ia32.h> | 18 | #include <asm/ia32.h> |
18 | #include <asm/bootparam.h> | 19 | #include <asm/bootparam.h> |
19 | 20 | ||
20 | #define DEFINE(sym, val) \ | ||
21 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
22 | |||
23 | #define BLANK() asm volatile("\n->" : : ) | ||
24 | |||
25 | #define OFFSET(sym, str, mem) \ | ||
26 | DEFINE(sym, offsetof(struct str, mem)) | ||
27 | |||
28 | #define __NO_STUBS 1 | 21 | #define __NO_STUBS 1 |
29 | #undef __SYSCALL | 22 | #undef __SYSCALL |
30 | #undef _ASM_X86_64_UNISTD_H_ | 23 | #undef _ASM_X86_64_UNISTD_H_ |
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index e2d870de837c..b0c8208df9fa 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -339,6 +339,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu) | |||
339 | { | 339 | { |
340 | struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); | 340 | struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); |
341 | unsigned int freq; | 341 | unsigned int freq; |
342 | unsigned int cached_freq; | ||
342 | 343 | ||
343 | dprintk("get_cur_freq_on_cpu (%d)\n", cpu); | 344 | dprintk("get_cur_freq_on_cpu (%d)\n", cpu); |
344 | 345 | ||
@@ -347,7 +348,16 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu) | |||
347 | return 0; | 348 | return 0; |
348 | } | 349 | } |
349 | 350 | ||
351 | cached_freq = data->freq_table[data->acpi_data->state].frequency; | ||
350 | freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data); | 352 | freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data); |
353 | if (freq != cached_freq) { | ||
354 | /* | ||
355 | * The dreaded BIOS frequency change behind our back. | ||
356 | * Force set the frequency on next target call. | ||
357 | */ | ||
358 | data->resume = 1; | ||
359 | } | ||
360 | |||
351 | dprintk("cur freq = %u\n", freq); | 361 | dprintk("cur freq = %u\n", freq); |
352 | 362 | ||
353 | return freq; | 363 | return freq; |
@@ -591,6 +601,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
591 | policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { | 601 | policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { |
592 | policy->cpus = perf->shared_cpu_map; | 602 | policy->cpus = perf->shared_cpu_map; |
593 | } | 603 | } |
604 | policy->related_cpus = perf->shared_cpu_map; | ||
594 | 605 | ||
595 | #ifdef CONFIG_SMP | 606 | #ifdef CONFIG_SMP |
596 | dmi_check_system(sw_any_bug_dmi_table); | 607 | dmi_check_system(sw_any_bug_dmi_table); |
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 353efe4f5017..5d241ce94a44 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
@@ -90,7 +90,7 @@ u8 mtrr_type_lookup(u64 start, u64 end) | |||
90 | * Look of multiple ranges matching this address and pick type | 90 | * Look of multiple ranges matching this address and pick type |
91 | * as per MTRR precedence | 91 | * as per MTRR precedence |
92 | */ | 92 | */ |
93 | if (!mtrr_state.enabled & 2) { | 93 | if (!(mtrr_state.enabled & 2)) { |
94 | return mtrr_state.def_type; | 94 | return mtrr_state.def_type; |
95 | } | 95 | } |
96 | 96 | ||
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index 1960f1985e5e..84c480bb3715 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c | |||
@@ -424,7 +424,7 @@ static int __init mtrr_if_init(void) | |||
424 | return -ENODEV; | 424 | return -ENODEV; |
425 | 425 | ||
426 | proc_root_mtrr = | 426 | proc_root_mtrr = |
427 | proc_create("mtrr", S_IWUSR | S_IRUGO, &proc_root, &mtrr_fops); | 427 | proc_create("mtrr", S_IWUSR | S_IRUGO, NULL, &mtrr_fops); |
428 | 428 | ||
429 | if (proc_root_mtrr) | 429 | if (proc_root_mtrr) |
430 | proc_root_mtrr->owner = THIS_MODULE; | 430 | proc_root_mtrr->owner = THIS_MODULE; |
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c index 645ee5e32a27..124480c0008d 100644 --- a/arch/x86/kernel/e820_64.c +++ b/arch/x86/kernel/e820_64.c | |||
@@ -100,7 +100,7 @@ void __init free_early(unsigned long start, unsigned long end) | |||
100 | for (j = i + 1; j < MAX_EARLY_RES && early_res[j].end; j++) | 100 | for (j = i + 1; j < MAX_EARLY_RES && early_res[j].end; j++) |
101 | ; | 101 | ; |
102 | 102 | ||
103 | memcpy(&early_res[i], &early_res[i + 1], | 103 | memmove(&early_res[i], &early_res[i + 1], |
104 | (j - 1 - i) * sizeof(struct early_res)); | 104 | (j - 1 - i) * sizeof(struct early_res)); |
105 | 105 | ||
106 | early_res[j - 1].end = 0; | 106 | early_res[j - 1].end = 0; |
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c index 021624c83583..cbaaf69bedb2 100644 --- a/arch/x86/kernel/genapic_64.c +++ b/arch/x86/kernel/genapic_64.c | |||
@@ -83,7 +83,7 @@ unsigned int read_apic_id(void) | |||
83 | { | 83 | { |
84 | unsigned int id; | 84 | unsigned int id; |
85 | 85 | ||
86 | WARN_ON(preemptible()); | 86 | WARN_ON(preemptible() && num_online_cpus() > 1); |
87 | id = apic_read(APIC_ID); | 87 | id = apic_read(APIC_ID); |
88 | if (uv_system_type >= UV_X2APIC) | 88 | if (uv_system_type >= UV_X2APIC) |
89 | id |= __get_cpu_var(x2apic_extra_bits); | 89 | id |= __get_cpu_var(x2apic_extra_bits); |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 90f038af3adc..b2cc73768a9d 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -656,15 +656,16 @@ int_msg: | |||
656 | .asciz "Unknown interrupt or fault at EIP %p %p %p\n" | 656 | .asciz "Unknown interrupt or fault at EIP %p %p %p\n" |
657 | 657 | ||
658 | fault_msg: | 658 | fault_msg: |
659 | .asciz \ | 659 | /* fault info: */ |
660 | /* fault info: */ "BUG: Int %d: CR2 %p\n" \ | 660 | .ascii "BUG: Int %d: CR2 %p\n" |
661 | /* pusha regs: */ " EDI %p ESI %p EBP %p ESP %p\n" \ | 661 | /* pusha regs: */ |
662 | " EBX %p EDX %p ECX %p EAX %p\n" \ | 662 | .ascii " EDI %p ESI %p EBP %p ESP %p\n" |
663 | /* fault frame: */ " err %p EIP %p CS %p flg %p\n" \ | 663 | .ascii " EBX %p EDX %p ECX %p EAX %p\n" |
664 | \ | 664 | /* fault frame: */ |
665 | "Stack: %p %p %p %p %p %p %p %p\n" \ | 665 | .ascii " err %p EIP %p CS %p flg %p\n" |
666 | " %p %p %p %p %p %p %p %p\n" \ | 666 | .ascii "Stack: %p %p %p %p %p %p %p %p\n" |
667 | " %p %p %p %p %p %p %p %p\n" | 667 | .ascii " %p %p %p %p %p %p %p %p\n" |
668 | .asciz " %p %p %p %p %p %p %p %p\n" | ||
668 | 669 | ||
669 | #include "../../x86/xen/xen-head.S" | 670 | #include "../../x86/xen/xen-head.S" |
670 | 671 | ||
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 9007f9ea64ee..9b5cfcdfc426 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -137,9 +137,10 @@ static void hpet_reserve_platform_timers(unsigned long id) | |||
137 | hd.hd_irq[0] = HPET_LEGACY_8254; | 137 | hd.hd_irq[0] = HPET_LEGACY_8254; |
138 | hd.hd_irq[1] = HPET_LEGACY_RTC; | 138 | hd.hd_irq[1] = HPET_LEGACY_RTC; |
139 | 139 | ||
140 | for (i = 2; i < nrtimers; timer++, i++) | 140 | for (i = 2; i < nrtimers; timer++, i++) { |
141 | hd.hd_irq[i] = (timer->hpet_config & Tn_INT_ROUTE_CNF_MASK) >> | 141 | hd.hd_irq[i] = (readl(&timer->hpet_config) & Tn_INT_ROUTE_CNF_MASK) >> |
142 | Tn_INT_ROUTE_CNF_SHIFT; | 142 | Tn_INT_ROUTE_CNF_SHIFT; |
143 | } | ||
143 | 144 | ||
144 | hpet_alloc(&hd); | 145 | hpet_alloc(&hd); |
145 | 146 | ||
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 00bda7bcda63..147352df28b9 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -190,8 +190,6 @@ void irq_ctx_exit(int cpu) | |||
190 | hardirq_ctx[cpu] = NULL; | 190 | hardirq_ctx[cpu] = NULL; |
191 | } | 191 | } |
192 | 192 | ||
193 | extern asmlinkage void __do_softirq(void); | ||
194 | |||
195 | asmlinkage void do_softirq(void) | 193 | asmlinkage void do_softirq(void) |
196 | { | 194 | { |
197 | unsigned long flags; | 195 | unsigned long flags; |
diff --git a/arch/x86/kernel/mmconf-fam10h_64.c b/arch/x86/kernel/mmconf-fam10h_64.c new file mode 100644 index 000000000000..edc5fbfe85c0 --- /dev/null +++ b/arch/x86/kernel/mmconf-fam10h_64.c | |||
@@ -0,0 +1,243 @@ | |||
1 | /* | ||
2 | * AMD Family 10h mmconfig enablement | ||
3 | */ | ||
4 | |||
5 | #include <linux/types.h> | ||
6 | #include <linux/mm.h> | ||
7 | #include <linux/string.h> | ||
8 | #include <linux/pci.h> | ||
9 | #include <linux/dmi.h> | ||
10 | #include <asm/pci-direct.h> | ||
11 | #include <linux/sort.h> | ||
12 | #include <asm/io.h> | ||
13 | #include <asm/msr.h> | ||
14 | #include <asm/acpi.h> | ||
15 | |||
16 | #include "../pci/pci.h" | ||
17 | |||
18 | struct pci_hostbridge_probe { | ||
19 | u32 bus; | ||
20 | u32 slot; | ||
21 | u32 vendor; | ||
22 | u32 device; | ||
23 | }; | ||
24 | |||
25 | static u64 __cpuinitdata fam10h_pci_mmconf_base; | ||
26 | static int __cpuinitdata fam10h_pci_mmconf_base_status; | ||
27 | |||
28 | static struct pci_hostbridge_probe pci_probes[] __cpuinitdata = { | ||
29 | { 0, 0x18, PCI_VENDOR_ID_AMD, 0x1200 }, | ||
30 | { 0xff, 0, PCI_VENDOR_ID_AMD, 0x1200 }, | ||
31 | }; | ||
32 | |||
33 | struct range { | ||
34 | u64 start; | ||
35 | u64 end; | ||
36 | }; | ||
37 | |||
38 | static int __cpuinit cmp_range(const void *x1, const void *x2) | ||
39 | { | ||
40 | const struct range *r1 = x1; | ||
41 | const struct range *r2 = x2; | ||
42 | int start1, start2; | ||
43 | |||
44 | start1 = r1->start >> 32; | ||
45 | start2 = r2->start >> 32; | ||
46 | |||
47 | return start1 - start2; | ||
48 | } | ||
49 | |||
50 | /*[47:0] */ | ||
51 | /* need to avoid (0xfd<<32) and (0xfe<<32), ht used space */ | ||
52 | #define FAM10H_PCI_MMCONF_BASE (0xfcULL<<32) | ||
53 | #define BASE_VALID(b) ((b != (0xfdULL << 32)) && (b != (0xfeULL << 32))) | ||
54 | static void __cpuinit get_fam10h_pci_mmconf_base(void) | ||
55 | { | ||
56 | int i; | ||
57 | unsigned bus; | ||
58 | unsigned slot; | ||
59 | int found; | ||
60 | |||
61 | u64 val; | ||
62 | u32 address; | ||
63 | u64 tom2; | ||
64 | u64 base = FAM10H_PCI_MMCONF_BASE; | ||
65 | |||
66 | int hi_mmio_num; | ||
67 | struct range range[8]; | ||
68 | |||
69 | /* only try to get setting from BSP */ | ||
70 | /* -1 or 1 */ | ||
71 | if (fam10h_pci_mmconf_base_status) | ||
72 | return; | ||
73 | |||
74 | if (!early_pci_allowed()) | ||
75 | goto fail; | ||
76 | |||
77 | found = 0; | ||
78 | for (i = 0; i < ARRAY_SIZE(pci_probes); i++) { | ||
79 | u32 id; | ||
80 | u16 device; | ||
81 | u16 vendor; | ||
82 | |||
83 | bus = pci_probes[i].bus; | ||
84 | slot = pci_probes[i].slot; | ||
85 | id = read_pci_config(bus, slot, 0, PCI_VENDOR_ID); | ||
86 | |||
87 | vendor = id & 0xffff; | ||
88 | device = (id>>16) & 0xffff; | ||
89 | if (pci_probes[i].vendor == vendor && | ||
90 | pci_probes[i].device == device) { | ||
91 | found = 1; | ||
92 | break; | ||
93 | } | ||
94 | } | ||
95 | |||
96 | if (!found) | ||
97 | goto fail; | ||
98 | |||
99 | /* SYS_CFG */ | ||
100 | address = MSR_K8_SYSCFG; | ||
101 | rdmsrl(address, val); | ||
102 | |||
103 | /* TOP_MEM2 is not enabled? */ | ||
104 | if (!(val & (1<<21))) { | ||
105 | tom2 = 0; | ||
106 | } else { | ||
107 | /* TOP_MEM2 */ | ||
108 | address = MSR_K8_TOP_MEM2; | ||
109 | rdmsrl(address, val); | ||
110 | tom2 = val & (0xffffULL<<32); | ||
111 | } | ||
112 | |||
113 | if (base <= tom2) | ||
114 | base = tom2 + (1ULL<<32); | ||
115 | |||
116 | /* | ||
117 | * need to check if the range is in the high mmio range that is | ||
118 | * above 4G | ||
119 | */ | ||
120 | hi_mmio_num = 0; | ||
121 | for (i = 0; i < 8; i++) { | ||
122 | u32 reg; | ||
123 | u64 start; | ||
124 | u64 end; | ||
125 | reg = read_pci_config(bus, slot, 1, 0x80 + (i << 3)); | ||
126 | if (!(reg & 3)) | ||
127 | continue; | ||
128 | |||
129 | start = (((u64)reg) << 8) & (0xffULL << 32); /* 39:16 on 31:8*/ | ||
130 | reg = read_pci_config(bus, slot, 1, 0x84 + (i << 3)); | ||
131 | end = (((u64)reg) << 8) & (0xffULL << 32); /* 39:16 on 31:8*/ | ||
132 | |||
133 | if (!end) | ||
134 | continue; | ||
135 | |||
136 | range[hi_mmio_num].start = start; | ||
137 | range[hi_mmio_num].end = end; | ||
138 | hi_mmio_num++; | ||
139 | } | ||
140 | |||
141 | if (!hi_mmio_num) | ||
142 | goto out; | ||
143 | |||
144 | /* sort the range */ | ||
145 | sort(range, hi_mmio_num, sizeof(struct range), cmp_range, NULL); | ||
146 | |||
147 | if (range[hi_mmio_num - 1].end < base) | ||
148 | goto out; | ||
149 | if (range[0].start > base) | ||
150 | goto out; | ||
151 | |||
152 | /* need to find one window */ | ||
153 | base = range[0].start - (1ULL << 32); | ||
154 | if ((base > tom2) && BASE_VALID(base)) | ||
155 | goto out; | ||
156 | base = range[hi_mmio_num - 1].end + (1ULL << 32); | ||
157 | if ((base > tom2) && BASE_VALID(base)) | ||
158 | goto out; | ||
159 | /* need to find window between ranges */ | ||
160 | if (hi_mmio_num > 1) | ||
161 | for (i = 0; i < hi_mmio_num - 1; i++) { | ||
162 | if (range[i + 1].start > (range[i].end + (1ULL << 32))) { | ||
163 | base = range[i].end + (1ULL << 32); | ||
164 | if ((base > tom2) && BASE_VALID(base)) | ||
165 | goto out; | ||
166 | } | ||
167 | } | ||
168 | |||
169 | fail: | ||
170 | fam10h_pci_mmconf_base_status = -1; | ||
171 | return; | ||
172 | out: | ||
173 | fam10h_pci_mmconf_base = base; | ||
174 | fam10h_pci_mmconf_base_status = 1; | ||
175 | } | ||
176 | |||
177 | void __cpuinit fam10h_check_enable_mmcfg(void) | ||
178 | { | ||
179 | u64 val; | ||
180 | u32 address; | ||
181 | |||
182 | if (!(pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF)) | ||
183 | return; | ||
184 | |||
185 | address = MSR_FAM10H_MMIO_CONF_BASE; | ||
186 | rdmsrl(address, val); | ||
187 | |||
188 | /* try to make sure that AP's setting is identical to BSP setting */ | ||
189 | if (val & FAM10H_MMIO_CONF_ENABLE) { | ||
190 | unsigned busnbits; | ||
191 | busnbits = (val >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) & | ||
192 | FAM10H_MMIO_CONF_BUSRANGE_MASK; | ||
193 | |||
194 | /* only trust the one handle 256 buses, if acpi=off */ | ||
195 | if (!acpi_pci_disabled || busnbits >= 8) { | ||
196 | u64 base; | ||
197 | base = val & (0xffffULL << 32); | ||
198 | if (fam10h_pci_mmconf_base_status <= 0) { | ||
199 | fam10h_pci_mmconf_base = base; | ||
200 | fam10h_pci_mmconf_base_status = 1; | ||
201 | return; | ||
202 | } else if (fam10h_pci_mmconf_base == base) | ||
203 | return; | ||
204 | } | ||
205 | } | ||
206 | |||
207 | /* | ||
208 | * if it is not enabled, try to enable it and assume only one segment | ||
209 | * with 256 buses | ||
210 | */ | ||
211 | get_fam10h_pci_mmconf_base(); | ||
212 | if (fam10h_pci_mmconf_base_status <= 0) | ||
213 | return; | ||
214 | |||
215 | printk(KERN_INFO "Enable MMCONFIG on AMD Family 10h\n"); | ||
216 | val &= ~((FAM10H_MMIO_CONF_BASE_MASK<<FAM10H_MMIO_CONF_BASE_SHIFT) | | ||
217 | (FAM10H_MMIO_CONF_BUSRANGE_MASK<<FAM10H_MMIO_CONF_BUSRANGE_SHIFT)); | ||
218 | val |= fam10h_pci_mmconf_base | (8 << FAM10H_MMIO_CONF_BUSRANGE_SHIFT) | | ||
219 | FAM10H_MMIO_CONF_ENABLE; | ||
220 | wrmsrl(address, val); | ||
221 | } | ||
222 | |||
223 | static int __devinit set_check_enable_amd_mmconf(const struct dmi_system_id *d) | ||
224 | { | ||
225 | pci_probe |= PCI_CHECK_ENABLE_AMD_MMCONF; | ||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static struct dmi_system_id __devinitdata mmconf_dmi_table[] = { | ||
230 | { | ||
231 | .callback = set_check_enable_amd_mmconf, | ||
232 | .ident = "Sun Microsystems Machine", | ||
233 | .matches = { | ||
234 | DMI_MATCH(DMI_SYS_VENDOR, "Sun Microsystems"), | ||
235 | }, | ||
236 | }, | ||
237 | {} | ||
238 | }; | ||
239 | |||
240 | void __init check_enable_amd_mmconf_dmi(void) | ||
241 | { | ||
242 | dmi_check_system(mmconf_dmi_table); | ||
243 | } | ||
diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c new file mode 100644 index 000000000000..3e6672274807 --- /dev/null +++ b/arch/x86/kernel/olpc.c | |||
@@ -0,0 +1,260 @@ | |||
1 | /* | ||
2 | * Support for the OLPC DCON and OLPC EC access | ||
3 | * | ||
4 | * Copyright © 2006 Advanced Micro Devices, Inc. | ||
5 | * Copyright © 2007-2008 Andres Salomon <dilinger@debian.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/string.h> | ||
20 | #include <asm/geode.h> | ||
21 | #include <asm/olpc.h> | ||
22 | |||
23 | #ifdef CONFIG_OPEN_FIRMWARE | ||
24 | #include <asm/ofw.h> | ||
25 | #endif | ||
26 | |||
27 | struct olpc_platform_t olpc_platform_info; | ||
28 | EXPORT_SYMBOL_GPL(olpc_platform_info); | ||
29 | |||
30 | static DEFINE_SPINLOCK(ec_lock); | ||
31 | |||
32 | /* what the timeout *should* be (in ms) */ | ||
33 | #define EC_BASE_TIMEOUT 20 | ||
34 | |||
35 | /* the timeout that bugs in the EC might force us to actually use */ | ||
36 | static int ec_timeout = EC_BASE_TIMEOUT; | ||
37 | |||
38 | static int __init olpc_ec_timeout_set(char *str) | ||
39 | { | ||
40 | if (get_option(&str, &ec_timeout) != 1) { | ||
41 | ec_timeout = EC_BASE_TIMEOUT; | ||
42 | printk(KERN_ERR "olpc-ec: invalid argument to " | ||
43 | "'olpc_ec_timeout=', ignoring!\n"); | ||
44 | } | ||
45 | printk(KERN_DEBUG "olpc-ec: using %d ms delay for EC commands.\n", | ||
46 | ec_timeout); | ||
47 | return 1; | ||
48 | } | ||
49 | __setup("olpc_ec_timeout=", olpc_ec_timeout_set); | ||
50 | |||
51 | /* | ||
52 | * These {i,o}bf_status functions return whether the buffers are full or not. | ||
53 | */ | ||
54 | |||
55 | static inline unsigned int ibf_status(unsigned int port) | ||
56 | { | ||
57 | return !!(inb(port) & 0x02); | ||
58 | } | ||
59 | |||
60 | static inline unsigned int obf_status(unsigned int port) | ||
61 | { | ||
62 | return inb(port) & 0x01; | ||
63 | } | ||
64 | |||
65 | #define wait_on_ibf(p, d) __wait_on_ibf(__LINE__, (p), (d)) | ||
66 | static int __wait_on_ibf(unsigned int line, unsigned int port, int desired) | ||
67 | { | ||
68 | unsigned int timeo; | ||
69 | int state = ibf_status(port); | ||
70 | |||
71 | for (timeo = ec_timeout; state != desired && timeo; timeo--) { | ||
72 | mdelay(1); | ||
73 | state = ibf_status(port); | ||
74 | } | ||
75 | |||
76 | if ((state == desired) && (ec_timeout > EC_BASE_TIMEOUT) && | ||
77 | timeo < (ec_timeout - EC_BASE_TIMEOUT)) { | ||
78 | printk(KERN_WARNING "olpc-ec: %d: waited %u ms for IBF!\n", | ||
79 | line, ec_timeout - timeo); | ||
80 | } | ||
81 | |||
82 | return !(state == desired); | ||
83 | } | ||
84 | |||
85 | #define wait_on_obf(p, d) __wait_on_obf(__LINE__, (p), (d)) | ||
86 | static int __wait_on_obf(unsigned int line, unsigned int port, int desired) | ||
87 | { | ||
88 | unsigned int timeo; | ||
89 | int state = obf_status(port); | ||
90 | |||
91 | for (timeo = ec_timeout; state != desired && timeo; timeo--) { | ||
92 | mdelay(1); | ||
93 | state = obf_status(port); | ||
94 | } | ||
95 | |||
96 | if ((state == desired) && (ec_timeout > EC_BASE_TIMEOUT) && | ||
97 | timeo < (ec_timeout - EC_BASE_TIMEOUT)) { | ||
98 | printk(KERN_WARNING "olpc-ec: %d: waited %u ms for OBF!\n", | ||
99 | line, ec_timeout - timeo); | ||
100 | } | ||
101 | |||
102 | return !(state == desired); | ||
103 | } | ||
104 | |||
105 | /* | ||
106 | * This allows the kernel to run Embedded Controller commands. The EC is | ||
107 | * documented at <http://wiki.laptop.org/go/Embedded_controller>, and the | ||
108 | * available EC commands are here: | ||
109 | * <http://wiki.laptop.org/go/Ec_specification>. Unfortunately, while | ||
110 | * OpenFirmware's source is available, the EC's is not. | ||
111 | */ | ||
112 | int olpc_ec_cmd(unsigned char cmd, unsigned char *inbuf, size_t inlen, | ||
113 | unsigned char *outbuf, size_t outlen) | ||
114 | { | ||
115 | unsigned long flags; | ||
116 | int ret = -EIO; | ||
117 | int i; | ||
118 | |||
119 | spin_lock_irqsave(&ec_lock, flags); | ||
120 | |||
121 | /* Clear OBF */ | ||
122 | for (i = 0; i < 10 && (obf_status(0x6c) == 1); i++) | ||
123 | inb(0x68); | ||
124 | if (i == 10) { | ||
125 | printk(KERN_ERR "olpc-ec: timeout while attempting to " | ||
126 | "clear OBF flag!\n"); | ||
127 | goto err; | ||
128 | } | ||
129 | |||
130 | if (wait_on_ibf(0x6c, 0)) { | ||
131 | printk(KERN_ERR "olpc-ec: timeout waiting for EC to " | ||
132 | "quiesce!\n"); | ||
133 | goto err; | ||
134 | } | ||
135 | |||
136 | restart: | ||
137 | /* | ||
138 | * Note that if we time out during any IBF checks, that's a failure; | ||
139 | * we have to return. There's no way for the kernel to clear that. | ||
140 | * | ||
141 | * If we time out during an OBF check, we can restart the command; | ||
142 | * reissuing it will clear the OBF flag, and we should be alright. | ||
143 | * The OBF flag will sometimes misbehave due to what we believe | ||
144 | * is a hardware quirk.. | ||
145 | */ | ||
146 | printk(KERN_DEBUG "olpc-ec: running cmd 0x%x\n", cmd); | ||
147 | outb(cmd, 0x6c); | ||
148 | |||
149 | if (wait_on_ibf(0x6c, 0)) { | ||
150 | printk(KERN_ERR "olpc-ec: timeout waiting for EC to read " | ||
151 | "command!\n"); | ||
152 | goto err; | ||
153 | } | ||
154 | |||
155 | if (inbuf && inlen) { | ||
156 | /* write data to EC */ | ||
157 | for (i = 0; i < inlen; i++) { | ||
158 | if (wait_on_ibf(0x6c, 0)) { | ||
159 | printk(KERN_ERR "olpc-ec: timeout waiting for" | ||
160 | " EC accept data!\n"); | ||
161 | goto err; | ||
162 | } | ||
163 | printk(KERN_DEBUG "olpc-ec: sending cmd arg 0x%x\n", | ||
164 | inbuf[i]); | ||
165 | outb(inbuf[i], 0x68); | ||
166 | } | ||
167 | } | ||
168 | if (outbuf && outlen) { | ||
169 | /* read data from EC */ | ||
170 | for (i = 0; i < outlen; i++) { | ||
171 | if (wait_on_obf(0x6c, 1)) { | ||
172 | printk(KERN_ERR "olpc-ec: timeout waiting for" | ||
173 | " EC to provide data!\n"); | ||
174 | goto restart; | ||
175 | } | ||
176 | outbuf[i] = inb(0x68); | ||
177 | printk(KERN_DEBUG "olpc-ec: received 0x%x\n", | ||
178 | outbuf[i]); | ||
179 | } | ||
180 | } | ||
181 | |||
182 | ret = 0; | ||
183 | err: | ||
184 | spin_unlock_irqrestore(&ec_lock, flags); | ||
185 | return ret; | ||
186 | } | ||
187 | EXPORT_SYMBOL_GPL(olpc_ec_cmd); | ||
188 | |||
189 | #ifdef CONFIG_OPEN_FIRMWARE | ||
190 | static void __init platform_detect(void) | ||
191 | { | ||
192 | size_t propsize; | ||
193 | u32 rev; | ||
194 | |||
195 | if (ofw("getprop", 4, 1, NULL, "board-revision-int", &rev, 4, | ||
196 | &propsize) || propsize != 4) { | ||
197 | printk(KERN_ERR "ofw: getprop call failed!\n"); | ||
198 | rev = 0; | ||
199 | } | ||
200 | olpc_platform_info.boardrev = be32_to_cpu(rev); | ||
201 | } | ||
202 | #else | ||
203 | static void __init platform_detect(void) | ||
204 | { | ||
205 | /* stopgap until OFW support is added to the kernel */ | ||
206 | olpc_platform_info.boardrev = be32_to_cpu(0xc2); | ||
207 | } | ||
208 | #endif | ||
209 | |||
210 | static int __init olpc_init(void) | ||
211 | { | ||
212 | unsigned char *romsig; | ||
213 | |||
214 | /* The ioremap check is dangerous; limit what we run it on */ | ||
215 | if (!is_geode() || geode_has_vsa2()) | ||
216 | return 0; | ||
217 | |||
218 | spin_lock_init(&ec_lock); | ||
219 | |||
220 | romsig = ioremap(0xffffffc0, 16); | ||
221 | if (!romsig) | ||
222 | return 0; | ||
223 | |||
224 | if (strncmp(romsig, "CL1 Q", 7)) | ||
225 | goto unmap; | ||
226 | if (strncmp(romsig+6, romsig+13, 3)) { | ||
227 | printk(KERN_INFO "OLPC BIOS signature looks invalid. " | ||
228 | "Assuming not OLPC\n"); | ||
229 | goto unmap; | ||
230 | } | ||
231 | |||
232 | printk(KERN_INFO "OLPC board with OpenFirmware %.16s\n", romsig); | ||
233 | olpc_platform_info.flags |= OLPC_F_PRESENT; | ||
234 | |||
235 | /* get the platform revision */ | ||
236 | platform_detect(); | ||
237 | |||
238 | /* assume B1 and above models always have a DCON */ | ||
239 | if (olpc_board_at_least(olpc_board(0xb1))) | ||
240 | olpc_platform_info.flags |= OLPC_F_DCON; | ||
241 | |||
242 | /* get the EC revision */ | ||
243 | olpc_ec_cmd(EC_FIRMWARE_REV, NULL, 0, | ||
244 | (unsigned char *) &olpc_platform_info.ecver, 1); | ||
245 | |||
246 | /* check to see if the VSA exists */ | ||
247 | if (geode_has_vsa2()) | ||
248 | olpc_platform_info.flags |= OLPC_F_VSA; | ||
249 | |||
250 | printk(KERN_INFO "OLPC board revision %s%X (EC=%x)\n", | ||
251 | ((olpc_platform_info.boardrev & 0xf) < 8) ? "pre" : "", | ||
252 | olpc_platform_info.boardrev >> 4, | ||
253 | olpc_platform_info.ecver); | ||
254 | |||
255 | unmap: | ||
256 | iounmap(romsig); | ||
257 | return 0; | ||
258 | } | ||
259 | |||
260 | postcore_initcall(olpc_init); | ||
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 388b113a7d88..0c37f16b6950 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -14,7 +14,7 @@ EXPORT_SYMBOL(forbid_dac); | |||
14 | const struct dma_mapping_ops *dma_ops; | 14 | const struct dma_mapping_ops *dma_ops; |
15 | EXPORT_SYMBOL(dma_ops); | 15 | EXPORT_SYMBOL(dma_ops); |
16 | 16 | ||
17 | int iommu_sac_force __read_mostly = 0; | 17 | static int iommu_sac_force __read_mostly; |
18 | 18 | ||
19 | #ifdef CONFIG_IOMMU_DEBUG | 19 | #ifdef CONFIG_IOMMU_DEBUG |
20 | int panic_on_overflow __read_mostly = 1; | 20 | int panic_on_overflow __read_mostly = 1; |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index a4a838306b2c..07c6d42ab5ff 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <asm/desc.h> | 9 | #include <asm/desc.h> |
10 | #include <asm/hpet.h> | 10 | #include <asm/hpet.h> |
11 | #include <asm/pgtable.h> | 11 | #include <asm/pgtable.h> |
12 | #include <asm/proto.h> | ||
12 | #include <asm/reboot_fixups.h> | 13 | #include <asm/reboot_fixups.h> |
13 | #include <asm/reboot.h> | 14 | #include <asm/reboot.h> |
14 | 15 | ||
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index a94fb959a87a..22c14e21c97c 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/crash_dump.h> | 29 | #include <linux/crash_dump.h> |
30 | #include <linux/root_dev.h> | 30 | #include <linux/root_dev.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <asm/pci-direct.h> | ||
32 | #include <linux/efi.h> | 33 | #include <linux/efi.h> |
33 | #include <linux/acpi.h> | 34 | #include <linux/acpi.h> |
34 | #include <linux/kallsyms.h> | 35 | #include <linux/kallsyms.h> |
@@ -40,6 +41,7 @@ | |||
40 | #include <linux/dmi.h> | 41 | #include <linux/dmi.h> |
41 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
42 | #include <linux/ctype.h> | 43 | #include <linux/ctype.h> |
44 | #include <linux/sort.h> | ||
43 | #include <linux/uaccess.h> | 45 | #include <linux/uaccess.h> |
44 | #include <linux/init_ohci1394_dma.h> | 46 | #include <linux/init_ohci1394_dma.h> |
45 | #include <linux/kvm_para.h> | 47 | #include <linux/kvm_para.h> |
@@ -288,6 +290,18 @@ static void __init parse_setup_data(void) | |||
288 | } | 290 | } |
289 | } | 291 | } |
290 | 292 | ||
293 | #ifdef CONFIG_PCI_MMCONFIG | ||
294 | extern void __cpuinit fam10h_check_enable_mmcfg(void); | ||
295 | extern void __init check_enable_amd_mmconf_dmi(void); | ||
296 | #else | ||
297 | void __cpuinit fam10h_check_enable_mmcfg(void) | ||
298 | { | ||
299 | } | ||
300 | void __init check_enable_amd_mmconf_dmi(void) | ||
301 | { | ||
302 | } | ||
303 | #endif | ||
304 | |||
291 | /* | 305 | /* |
292 | * setup_arch - architecture-specific boot-time initializations | 306 | * setup_arch - architecture-specific boot-time initializations |
293 | * | 307 | * |
@@ -515,6 +529,9 @@ void __init setup_arch(char **cmdline_p) | |||
515 | conswitchp = &dummy_con; | 529 | conswitchp = &dummy_con; |
516 | #endif | 530 | #endif |
517 | #endif | 531 | #endif |
532 | |||
533 | /* do this before identify_cpu for boot cpu */ | ||
534 | check_enable_amd_mmconf_dmi(); | ||
518 | } | 535 | } |
519 | 536 | ||
520 | static int __cpuinit get_model_name(struct cpuinfo_x86 *c) | 537 | static int __cpuinit get_model_name(struct cpuinfo_x86 *c) |
@@ -767,6 +784,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
767 | /* MFENCE stops RDTSC speculation */ | 784 | /* MFENCE stops RDTSC speculation */ |
768 | set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC); | 785 | set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC); |
769 | 786 | ||
787 | if (c->x86 == 0x10) | ||
788 | fam10h_check_enable_mmcfg(); | ||
789 | |||
770 | if (amd_apic_timer_broken()) | 790 | if (amd_apic_timer_broken()) |
771 | disable_apic_timer = 1; | 791 | disable_apic_timer = 1; |
772 | 792 | ||
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 8e05e7f7bd40..d92373630963 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -57,7 +57,7 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask) | |||
57 | 57 | ||
58 | current->state = TASK_INTERRUPTIBLE; | 58 | current->state = TASK_INTERRUPTIBLE; |
59 | schedule(); | 59 | schedule(); |
60 | set_thread_flag(TIF_RESTORE_SIGMASK); | 60 | set_restore_sigmask(); |
61 | 61 | ||
62 | return -ERESTARTNOHAND; | 62 | return -ERESTARTNOHAND; |
63 | } | 63 | } |
@@ -593,7 +593,7 @@ static void do_signal(struct pt_regs *regs) | |||
593 | if (!user_mode(regs)) | 593 | if (!user_mode(regs)) |
594 | return; | 594 | return; |
595 | 595 | ||
596 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 596 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) |
597 | oldset = ¤t->saved_sigmask; | 597 | oldset = ¤t->saved_sigmask; |
598 | else | 598 | else |
599 | oldset = ¤t->blocked; | 599 | oldset = ¤t->blocked; |
@@ -612,13 +612,12 @@ static void do_signal(struct pt_regs *regs) | |||
612 | /* Whee! Actually deliver the signal. */ | 612 | /* Whee! Actually deliver the signal. */ |
613 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { | 613 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { |
614 | /* | 614 | /* |
615 | * a signal was successfully delivered; the saved | 615 | * A signal was successfully delivered; the saved |
616 | * sigmask will have been stored in the signal frame, | 616 | * sigmask will have been stored in the signal frame, |
617 | * and will be restored by sigreturn, so we can simply | 617 | * and will be restored by sigreturn, so we can simply |
618 | * clear the TIF_RESTORE_SIGMASK flag | 618 | * clear the TS_RESTORE_SIGMASK flag. |
619 | */ | 619 | */ |
620 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 620 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
621 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
622 | } | 621 | } |
623 | return; | 622 | return; |
624 | } | 623 | } |
@@ -645,8 +644,8 @@ static void do_signal(struct pt_regs *regs) | |||
645 | * If there's no signal to deliver, we just put the saved sigmask | 644 | * If there's no signal to deliver, we just put the saved sigmask |
646 | * back. | 645 | * back. |
647 | */ | 646 | */ |
648 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | 647 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) { |
649 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 648 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
650 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | 649 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); |
651 | } | 650 | } |
652 | } | 651 | } |
@@ -665,7 +664,7 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
665 | } | 664 | } |
666 | 665 | ||
667 | /* deal with pending signal delivery */ | 666 | /* deal with pending signal delivery */ |
668 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 667 | if (thread_info_flags & _TIF_SIGPENDING) |
669 | do_signal(regs); | 668 | do_signal(regs); |
670 | 669 | ||
671 | if (thread_info_flags & _TIF_HRTICK_RESCHED) | 670 | if (thread_info_flags & _TIF_HRTICK_RESCHED) |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index ccb2a4560c2d..e53b267662e7 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -427,7 +427,7 @@ static void do_signal(struct pt_regs *regs) | |||
427 | if (!user_mode(regs)) | 427 | if (!user_mode(regs)) |
428 | return; | 428 | return; |
429 | 429 | ||
430 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 430 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) |
431 | oldset = ¤t->saved_sigmask; | 431 | oldset = ¤t->saved_sigmask; |
432 | else | 432 | else |
433 | oldset = ¤t->blocked; | 433 | oldset = ¤t->blocked; |
@@ -444,11 +444,13 @@ static void do_signal(struct pt_regs *regs) | |||
444 | 444 | ||
445 | /* Whee! Actually deliver the signal. */ | 445 | /* Whee! Actually deliver the signal. */ |
446 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { | 446 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { |
447 | /* a signal was successfully delivered; the saved | 447 | /* |
448 | * A signal was successfully delivered; the saved | ||
448 | * sigmask will have been stored in the signal frame, | 449 | * sigmask will have been stored in the signal frame, |
449 | * and will be restored by sigreturn, so we can simply | 450 | * and will be restored by sigreturn, so we can simply |
450 | * clear the TIF_RESTORE_SIGMASK flag */ | 451 | * clear the TS_RESTORE_SIGMASK flag. |
451 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 452 | */ |
453 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; | ||
452 | } | 454 | } |
453 | return; | 455 | return; |
454 | } | 456 | } |
@@ -476,8 +478,8 @@ static void do_signal(struct pt_regs *regs) | |||
476 | * If there's no signal to deliver, we just put the saved sigmask | 478 | * If there's no signal to deliver, we just put the saved sigmask |
477 | * back. | 479 | * back. |
478 | */ | 480 | */ |
479 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | 481 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) { |
480 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 482 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
481 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | 483 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); |
482 | } | 484 | } |
483 | } | 485 | } |
@@ -498,7 +500,7 @@ void do_notify_resume(struct pt_regs *regs, void *unused, | |||
498 | #endif /* CONFIG_X86_MCE */ | 500 | #endif /* CONFIG_X86_MCE */ |
499 | 501 | ||
500 | /* deal with pending signal delivery */ | 502 | /* deal with pending signal delivery */ |
501 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 503 | if (thread_info_flags & _TIF_SIGPENDING) |
502 | do_signal(regs); | 504 | do_signal(regs); |
503 | 505 | ||
504 | if (thread_info_flags & _TIF_HRTICK_RESCHED) | 506 | if (thread_info_flags & _TIF_HRTICK_RESCHED) |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 04c662ba18f1..84241a256dc8 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1149,14 +1149,10 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
1149 | "forcing use of dummy APIC emulation.\n"); | 1149 | "forcing use of dummy APIC emulation.\n"); |
1150 | smpboot_clear_io_apic(); | 1150 | smpboot_clear_io_apic(); |
1151 | #ifdef CONFIG_X86_32 | 1151 | #ifdef CONFIG_X86_32 |
1152 | if (nmi_watchdog == NMI_LOCAL_APIC) { | 1152 | connect_bsp_APIC(); |
1153 | printk(KERN_INFO "activating minimal APIC for" | ||
1154 | "NMI watchdog use.\n"); | ||
1155 | connect_bsp_APIC(); | ||
1156 | setup_local_APIC(); | ||
1157 | end_local_APIC_setup(); | ||
1158 | } | ||
1159 | #endif | 1153 | #endif |
1154 | setup_local_APIC(); | ||
1155 | end_local_APIC_setup(); | ||
1160 | return -1; | 1156 | return -1; |
1161 | } | 1157 | } |
1162 | 1158 | ||
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c index 1a89e93f3f1c..2ff21f398934 100644 --- a/arch/x86/kernel/time_32.c +++ b/arch/x86/kernel/time_32.c | |||
@@ -115,7 +115,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
115 | return IRQ_HANDLED; | 115 | return IRQ_HANDLED; |
116 | } | 116 | } |
117 | 117 | ||
118 | extern void (*late_time_init)(void); | ||
119 | /* Duplicate of time_init() below, with hpet_enable part added */ | 118 | /* Duplicate of time_init() below, with hpet_enable part added */ |
120 | void __init hpet_time_init(void) | 119 | void __init hpet_time_init(void) |
121 | { | 120 | { |
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S index b7ab3c335fae..fad3674b06a5 100644 --- a/arch/x86/kernel/vmlinux_64.lds.S +++ b/arch/x86/kernel/vmlinux_64.lds.S | |||
@@ -209,12 +209,6 @@ SECTIONS | |||
209 | EXIT_DATA | 209 | EXIT_DATA |
210 | } | 210 | } |
211 | 211 | ||
212 | /* vdso blob that is mapped into user space */ | ||
213 | vdso_start = . ; | ||
214 | .vdso : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) } | ||
215 | . = ALIGN(PAGE_SIZE); | ||
216 | vdso_end = .; | ||
217 | |||
218 | #ifdef CONFIG_BLK_DEV_INITRD | 212 | #ifdef CONFIG_BLK_DEV_INITRD |
219 | . = ALIGN(PAGE_SIZE); | 213 | . = ALIGN(PAGE_SIZE); |
220 | __initramfs_start = .; | 214 | __initramfs_start = .; |
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c index caf2a26f5cfd..ba8c0b75ab0a 100644 --- a/arch/x86/kernel/vsmp_64.c +++ b/arch/x86/kernel/vsmp_64.c | |||
@@ -133,7 +133,7 @@ int is_vsmp_box(void) | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | #else | 135 | #else |
136 | static int __init detect_vsmp_box(void) | 136 | static void __init detect_vsmp_box(void) |
137 | { | 137 | { |
138 | } | 138 | } |
139 | int is_vsmp_box(void) | 139 | int is_vsmp_box(void) |
diff --git a/arch/x86/mach-voyager/voyager_cat.c b/arch/x86/mach-voyager/voyager_cat.c index ecab9fff0fd1..2ad598c104af 100644 --- a/arch/x86/mach-voyager/voyager_cat.c +++ b/arch/x86/mach-voyager/voyager_cat.c | |||
@@ -877,7 +877,7 @@ void __init voyager_cat_init(void) | |||
877 | request_resource(&iomem_resource, res); | 877 | request_resource(&iomem_resource, res); |
878 | } | 878 | } |
879 | 879 | ||
880 | qic_addr = (unsigned long)ioremap(qic_addr, 0x400); | 880 | qic_addr = (unsigned long)ioremap_cache(qic_addr, 0x400); |
881 | 881 | ||
882 | for (j = 0; j < 4; j++) { | 882 | for (j = 0; j < 4; j++) { |
883 | __u8 cpu; | 883 | __u8 cpu; |
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index 9cf33d3ee5bc..165c871ba9af 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c | |||
@@ -155,4 +155,3 @@ EXPORT_SYMBOL(kmap); | |||
155 | EXPORT_SYMBOL(kunmap); | 155 | EXPORT_SYMBOL(kunmap); |
156 | EXPORT_SYMBOL(kmap_atomic); | 156 | EXPORT_SYMBOL(kmap_atomic); |
157 | EXPORT_SYMBOL(kunmap_atomic); | 157 | EXPORT_SYMBOL(kunmap_atomic); |
158 | EXPORT_SYMBOL(kmap_atomic_to_page); | ||
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 804de18abcc2..71bb3159031a 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -149,7 +149,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, | |||
149 | * Don't allow anybody to remap normal RAM that we're using.. | 149 | * Don't allow anybody to remap normal RAM that we're using.. |
150 | */ | 150 | */ |
151 | for (pfn = phys_addr >> PAGE_SHIFT; | 151 | for (pfn = phys_addr >> PAGE_SHIFT; |
152 | (pfn << PAGE_SHIFT) < last_addr; pfn++) { | 152 | (pfn << PAGE_SHIFT) < (last_addr & PAGE_MASK); |
153 | pfn++) { | ||
153 | 154 | ||
154 | int is_ram = page_is_ram(pfn); | 155 | int is_ram = page_is_ram(pfn); |
155 | 156 | ||
@@ -176,11 +177,11 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, | |||
176 | /* | 177 | /* |
177 | * Do not fallback to certain memory types with certain | 178 | * Do not fallback to certain memory types with certain |
178 | * requested type: | 179 | * requested type: |
179 | * - request is uncached, return cannot be write-back | 180 | * - request is uc-, return cannot be write-back |
180 | * - request is uncached, return cannot be write-combine | 181 | * - request is uc-, return cannot be write-combine |
181 | * - request is write-combine, return cannot be write-back | 182 | * - request is write-combine, return cannot be write-back |
182 | */ | 183 | */ |
183 | if ((prot_val == _PAGE_CACHE_UC && | 184 | if ((prot_val == _PAGE_CACHE_UC_MINUS && |
184 | (new_prot_val == _PAGE_CACHE_WB || | 185 | (new_prot_val == _PAGE_CACHE_WB || |
185 | new_prot_val == _PAGE_CACHE_WC)) || | 186 | new_prot_val == _PAGE_CACHE_WC)) || |
186 | (prot_val == _PAGE_CACHE_WC && | 187 | (prot_val == _PAGE_CACHE_WC && |
@@ -201,6 +202,9 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, | |||
201 | default: | 202 | default: |
202 | prot = PAGE_KERNEL_NOCACHE; | 203 | prot = PAGE_KERNEL_NOCACHE; |
203 | break; | 204 | break; |
205 | case _PAGE_CACHE_UC_MINUS: | ||
206 | prot = PAGE_KERNEL_UC_MINUS; | ||
207 | break; | ||
204 | case _PAGE_CACHE_WC: | 208 | case _PAGE_CACHE_WC: |
205 | prot = PAGE_KERNEL_WC; | 209 | prot = PAGE_KERNEL_WC; |
206 | break; | 210 | break; |
@@ -255,7 +259,16 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, | |||
255 | */ | 259 | */ |
256 | void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size) | 260 | void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size) |
257 | { | 261 | { |
258 | return __ioremap_caller(phys_addr, size, _PAGE_CACHE_UC, | 262 | /* |
263 | * Ideally, this should be: | ||
264 | * pat_wc_enabled ? _PAGE_CACHE_UC : _PAGE_CACHE_UC_MINUS; | ||
265 | * | ||
266 | * Till we fix all X drivers to use ioremap_wc(), we will use | ||
267 | * UC MINUS. | ||
268 | */ | ||
269 | unsigned long val = _PAGE_CACHE_UC_MINUS; | ||
270 | |||
271 | return __ioremap_caller(phys_addr, size, val, | ||
259 | __builtin_return_address(0)); | 272 | __builtin_return_address(0)); |
260 | } | 273 | } |
261 | EXPORT_SYMBOL(ioremap_nocache); | 274 | EXPORT_SYMBOL(ioremap_nocache); |
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c index 86808e666f9c..1f476e477844 100644 --- a/arch/x86/mm/k8topology_64.c +++ b/arch/x86/mm/k8topology_64.c | |||
@@ -13,12 +13,15 @@ | |||
13 | #include <linux/nodemask.h> | 13 | #include <linux/nodemask.h> |
14 | #include <asm/io.h> | 14 | #include <asm/io.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/acpi.h> | ||
16 | #include <asm/types.h> | 17 | #include <asm/types.h> |
17 | #include <asm/mmzone.h> | 18 | #include <asm/mmzone.h> |
18 | #include <asm/proto.h> | 19 | #include <asm/proto.h> |
19 | #include <asm/e820.h> | 20 | #include <asm/e820.h> |
20 | #include <asm/pci-direct.h> | 21 | #include <asm/pci-direct.h> |
21 | #include <asm/numa.h> | 22 | #include <asm/numa.h> |
23 | #include <asm/mpspec.h> | ||
24 | #include <asm/apic.h> | ||
22 | 25 | ||
23 | static __init int find_northbridge(void) | 26 | static __init int find_northbridge(void) |
24 | { | 27 | { |
@@ -44,6 +47,30 @@ static __init int find_northbridge(void) | |||
44 | return -1; | 47 | return -1; |
45 | } | 48 | } |
46 | 49 | ||
50 | static __init void early_get_boot_cpu_id(void) | ||
51 | { | ||
52 | /* | ||
53 | * need to get boot_cpu_id so can use that to create apicid_to_node | ||
54 | * in k8_scan_nodes() | ||
55 | */ | ||
56 | /* | ||
57 | * Find possible boot-time SMP configuration: | ||
58 | */ | ||
59 | early_find_smp_config(); | ||
60 | #ifdef CONFIG_ACPI | ||
61 | /* | ||
62 | * Read APIC information from ACPI tables. | ||
63 | */ | ||
64 | early_acpi_boot_init(); | ||
65 | #endif | ||
66 | /* | ||
67 | * get boot-time SMP configuration: | ||
68 | */ | ||
69 | if (smp_found_config) | ||
70 | early_get_smp_config(); | ||
71 | early_init_lapic_mapping(); | ||
72 | } | ||
73 | |||
47 | int __init k8_scan_nodes(unsigned long start, unsigned long end) | 74 | int __init k8_scan_nodes(unsigned long start, unsigned long end) |
48 | { | 75 | { |
49 | unsigned long prevbase; | 76 | unsigned long prevbase; |
@@ -56,6 +83,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
56 | unsigned cores; | 83 | unsigned cores; |
57 | unsigned bits; | 84 | unsigned bits; |
58 | int j; | 85 | int j; |
86 | unsigned apicid_base; | ||
59 | 87 | ||
60 | if (!early_pci_allowed()) | 88 | if (!early_pci_allowed()) |
61 | return -1; | 89 | return -1; |
@@ -174,11 +202,19 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
174 | /* use the coreid bits from early_identify_cpu */ | 202 | /* use the coreid bits from early_identify_cpu */ |
175 | bits = boot_cpu_data.x86_coreid_bits; | 203 | bits = boot_cpu_data.x86_coreid_bits; |
176 | cores = (1<<bits); | 204 | cores = (1<<bits); |
205 | apicid_base = 0; | ||
206 | /* need to get boot_cpu_id early for system with apicid lifting */ | ||
207 | early_get_boot_cpu_id(); | ||
208 | if (boot_cpu_physical_apicid > 0) { | ||
209 | printk(KERN_INFO "BSP APIC ID: %02x\n", | ||
210 | boot_cpu_physical_apicid); | ||
211 | apicid_base = boot_cpu_physical_apicid; | ||
212 | } | ||
177 | 213 | ||
178 | for (i = 0; i < 8; i++) { | 214 | for (i = 0; i < 8; i++) { |
179 | if (nodes[i].start != nodes[i].end) { | 215 | if (nodes[i].start != nodes[i].end) { |
180 | nodeid = nodeids[i]; | 216 | nodeid = nodeids[i]; |
181 | for (j = 0; j < cores; j++) | 217 | for (j = apicid_base; j < cores + apicid_base; j++) |
182 | apicid_to_node[(nodeid << bits) + j] = i; | 218 | apicid_to_node[(nodeid << bits) + j] = i; |
183 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); | 219 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); |
184 | } | 220 | } |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index bd5e05c654dc..60bcb5b6a37e 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -777,14 +777,20 @@ static inline int change_page_attr_clear(unsigned long addr, int numpages, | |||
777 | 777 | ||
778 | int _set_memory_uc(unsigned long addr, int numpages) | 778 | int _set_memory_uc(unsigned long addr, int numpages) |
779 | { | 779 | { |
780 | /* | ||
781 | * for now UC MINUS. see comments in ioremap_nocache() | ||
782 | */ | ||
780 | return change_page_attr_set(addr, numpages, | 783 | return change_page_attr_set(addr, numpages, |
781 | __pgprot(_PAGE_CACHE_UC)); | 784 | __pgprot(_PAGE_CACHE_UC_MINUS)); |
782 | } | 785 | } |
783 | 786 | ||
784 | int set_memory_uc(unsigned long addr, int numpages) | 787 | int set_memory_uc(unsigned long addr, int numpages) |
785 | { | 788 | { |
789 | /* | ||
790 | * for now UC MINUS. see comments in ioremap_nocache() | ||
791 | */ | ||
786 | if (reserve_memtype(addr, addr + numpages * PAGE_SIZE, | 792 | if (reserve_memtype(addr, addr + numpages * PAGE_SIZE, |
787 | _PAGE_CACHE_UC, NULL)) | 793 | _PAGE_CACHE_UC_MINUS, NULL)) |
788 | return -EINVAL; | 794 | return -EINVAL; |
789 | 795 | ||
790 | return _set_memory_uc(addr, numpages); | 796 | return _set_memory_uc(addr, numpages); |
diff --git a/arch/x86/pci/Makefile_32 b/arch/x86/pci/Makefile_32 index cdd6828b5abb..7fa519868d70 100644 --- a/arch/x86/pci/Makefile_32 +++ b/arch/x86/pci/Makefile_32 | |||
@@ -3,12 +3,14 @@ obj-y := i386.o init.o | |||
3 | obj-$(CONFIG_PCI_BIOS) += pcbios.o | 3 | obj-$(CONFIG_PCI_BIOS) += pcbios.o |
4 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_32.o direct.o mmconfig-shared.o | 4 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_32.o direct.o mmconfig-shared.o |
5 | obj-$(CONFIG_PCI_DIRECT) += direct.o | 5 | obj-$(CONFIG_PCI_DIRECT) += direct.o |
6 | obj-$(CONFIG_PCI_OLPC) += olpc.o | ||
6 | 7 | ||
7 | pci-y := fixup.o | 8 | pci-y := fixup.o |
8 | pci-$(CONFIG_ACPI) += acpi.o | 9 | pci-$(CONFIG_ACPI) += acpi.o |
9 | pci-y += legacy.o irq.o | 10 | pci-y += legacy.o irq.o |
10 | 11 | ||
11 | pci-$(CONFIG_X86_VISWS) := visws.o fixup.o | 12 | pci-$(CONFIG_X86_VISWS) += visws.o fixup.o |
12 | pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o | 13 | pci-$(CONFIG_X86_NUMAQ) += numa.o irq.o |
14 | pci-$(CONFIG_NUMA) += mp_bus_to_node.o | ||
13 | 15 | ||
14 | obj-y += $(pci-y) common.o early.o | 16 | obj-y += $(pci-y) common.o early.o |
diff --git a/arch/x86/pci/Makefile_64 b/arch/x86/pci/Makefile_64 index 7d8c467bf143..8fbd19832cf6 100644 --- a/arch/x86/pci/Makefile_64 +++ b/arch/x86/pci/Makefile_64 | |||
@@ -13,5 +13,5 @@ obj-y += legacy.o irq.o common.o early.o | |||
13 | # mmconfig has a 64bit special | 13 | # mmconfig has a 64bit special |
14 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_64.o direct.o mmconfig-shared.o | 14 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_64.o direct.o mmconfig-shared.o |
15 | 15 | ||
16 | obj-$(CONFIG_NUMA) += k8-bus_64.o | 16 | obj-y += k8-bus_64.o |
17 | 17 | ||
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 2664cb3fc96c..1a9c0c6a1a18 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -191,7 +191,10 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
191 | { | 191 | { |
192 | struct pci_bus *bus; | 192 | struct pci_bus *bus; |
193 | struct pci_sysdata *sd; | 193 | struct pci_sysdata *sd; |
194 | int node; | ||
195 | #ifdef CONFIG_ACPI_NUMA | ||
194 | int pxm; | 196 | int pxm; |
197 | #endif | ||
195 | 198 | ||
196 | dmi_check_system(acpi_pciprobe_dmi_table); | 199 | dmi_check_system(acpi_pciprobe_dmi_table); |
197 | 200 | ||
@@ -201,6 +204,17 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
201 | return NULL; | 204 | return NULL; |
202 | } | 205 | } |
203 | 206 | ||
207 | node = -1; | ||
208 | #ifdef CONFIG_ACPI_NUMA | ||
209 | pxm = acpi_get_pxm(device->handle); | ||
210 | if (pxm >= 0) | ||
211 | node = pxm_to_node(pxm); | ||
212 | if (node != -1) | ||
213 | set_mp_bus_to_node(busnum, node); | ||
214 | else | ||
215 | node = get_mp_bus_to_node(busnum); | ||
216 | #endif | ||
217 | |||
204 | /* Allocate per-root-bus (not per bus) arch-specific data. | 218 | /* Allocate per-root-bus (not per bus) arch-specific data. |
205 | * TODO: leak; this memory is never freed. | 219 | * TODO: leak; this memory is never freed. |
206 | * It's arguable whether it's worth the trouble to care. | 220 | * It's arguable whether it's worth the trouble to care. |
@@ -212,13 +226,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
212 | } | 226 | } |
213 | 227 | ||
214 | sd->domain = domain; | 228 | sd->domain = domain; |
215 | sd->node = -1; | 229 | sd->node = node; |
216 | |||
217 | pxm = acpi_get_pxm(device->handle); | ||
218 | #ifdef CONFIG_ACPI_NUMA | ||
219 | if (pxm >= 0) | ||
220 | sd->node = pxm_to_node(pxm); | ||
221 | #endif | ||
222 | /* | 230 | /* |
223 | * Maybe the desired pci bus has been already scanned. In such case | 231 | * Maybe the desired pci bus has been already scanned. In such case |
224 | * it is unnecessary to scan the pci bus with the given domain,busnum. | 232 | * it is unnecessary to scan the pci bus with the given domain,busnum. |
@@ -238,9 +246,9 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
238 | kfree(sd); | 246 | kfree(sd); |
239 | 247 | ||
240 | #ifdef CONFIG_ACPI_NUMA | 248 | #ifdef CONFIG_ACPI_NUMA |
241 | if (bus != NULL) { | 249 | if (bus) { |
242 | if (pxm >= 0) { | 250 | if (pxm >= 0) { |
243 | printk("bus %d -> pxm %d -> node %d\n", | 251 | printk(KERN_DEBUG "bus %02x -> pxm %d -> node %d\n", |
244 | busnum, pxm, pxm_to_node(pxm)); | 252 | busnum, pxm, pxm_to_node(pxm)); |
245 | } | 253 | } |
246 | } | 254 | } |
@@ -248,7 +256,6 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
248 | 256 | ||
249 | if (bus && (pci_probe & PCI_USE__CRS)) | 257 | if (bus && (pci_probe & PCI_USE__CRS)) |
250 | get_current_resources(device, busnum, domain, bus); | 258 | get_current_resources(device, busnum, domain, bus); |
251 | |||
252 | return bus; | 259 | return bus; |
253 | } | 260 | } |
254 | 261 | ||
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 75fcc29ecf52..2a4d751818b7 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -342,9 +342,14 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum) | |||
342 | return NULL; | 342 | return NULL; |
343 | } | 343 | } |
344 | 344 | ||
345 | sd->node = get_mp_bus_to_node(busnum); | ||
346 | |||
345 | printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum); | 347 | printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum); |
348 | bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd); | ||
349 | if (!bus) | ||
350 | kfree(sd); | ||
346 | 351 | ||
347 | return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd); | 352 | return bus; |
348 | } | 353 | } |
349 | 354 | ||
350 | extern u8 pci_cache_line_size; | 355 | extern u8 pci_cache_line_size; |
@@ -420,6 +425,10 @@ char * __devinit pcibios_setup(char *str) | |||
420 | pci_probe &= ~PCI_PROBE_MMCONF; | 425 | pci_probe &= ~PCI_PROBE_MMCONF; |
421 | return NULL; | 426 | return NULL; |
422 | } | 427 | } |
428 | else if (!strcmp(str, "check_enable_amd_mmconf")) { | ||
429 | pci_probe |= PCI_CHECK_ENABLE_AMD_MMCONF; | ||
430 | return NULL; | ||
431 | } | ||
423 | #endif | 432 | #endif |
424 | else if (!strcmp(str, "noacpi")) { | 433 | else if (!strcmp(str, "noacpi")) { |
425 | acpi_noirq_set(); | 434 | acpi_noirq_set(); |
@@ -480,7 +489,7 @@ void pcibios_disable_device (struct pci_dev *dev) | |||
480 | pcibios_disable_irq(dev); | 489 | pcibios_disable_irq(dev); |
481 | } | 490 | } |
482 | 491 | ||
483 | struct pci_bus *__devinit pci_scan_bus_with_sysdata(int busno) | 492 | struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) |
484 | { | 493 | { |
485 | struct pci_bus *bus = NULL; | 494 | struct pci_bus *bus = NULL; |
486 | struct pci_sysdata *sd; | 495 | struct pci_sysdata *sd; |
@@ -495,10 +504,15 @@ struct pci_bus *__devinit pci_scan_bus_with_sysdata(int busno) | |||
495 | printk(KERN_ERR "PCI: OOM, skipping PCI bus %02x\n", busno); | 504 | printk(KERN_ERR "PCI: OOM, skipping PCI bus %02x\n", busno); |
496 | return NULL; | 505 | return NULL; |
497 | } | 506 | } |
498 | sd->node = -1; | 507 | sd->node = node; |
499 | bus = pci_scan_bus(busno, &pci_root_ops, sd); | 508 | bus = pci_scan_bus(busno, ops, sd); |
500 | if (!bus) | 509 | if (!bus) |
501 | kfree(sd); | 510 | kfree(sd); |
502 | 511 | ||
503 | return bus; | 512 | return bus; |
504 | } | 513 | } |
514 | |||
515 | struct pci_bus *pci_scan_bus_with_sysdata(int busno) | ||
516 | { | ||
517 | return pci_scan_bus_on_node(busno, &pci_root_ops, -1); | ||
518 | } | ||
diff --git a/arch/x86/pci/direct.c b/arch/x86/pci/direct.c index 42f3e4cad179..21d1e0e0d535 100644 --- a/arch/x86/pci/direct.c +++ b/arch/x86/pci/direct.c | |||
@@ -258,7 +258,8 @@ void __init pci_direct_init(int type) | |||
258 | { | 258 | { |
259 | if (type == 0) | 259 | if (type == 0) |
260 | return; | 260 | return; |
261 | printk(KERN_INFO "PCI: Using configuration type %d\n", type); | 261 | printk(KERN_INFO "PCI: Using configuration type %d for base access\n", |
262 | type); | ||
262 | if (type == 1) | 263 | if (type == 1) |
263 | raw_pci_ops = &pci_direct_conf1; | 264 | raw_pci_ops = &pci_direct_conf1; |
264 | else | 265 | else |
@@ -275,8 +276,10 @@ int __init pci_direct_probe(void) | |||
275 | if (!region) | 276 | if (!region) |
276 | goto type2; | 277 | goto type2; |
277 | 278 | ||
278 | if (pci_check_type1()) | 279 | if (pci_check_type1()) { |
280 | raw_pci_ops = &pci_direct_conf1; | ||
279 | return 1; | 281 | return 1; |
282 | } | ||
280 | release_resource(region); | 283 | release_resource(region); |
281 | 284 | ||
282 | type2: | 285 | type2: |
@@ -290,7 +293,6 @@ int __init pci_direct_probe(void) | |||
290 | goto fail2; | 293 | goto fail2; |
291 | 294 | ||
292 | if (pci_check_type2()) { | 295 | if (pci_check_type2()) { |
293 | printk(KERN_INFO "PCI: Using configuration type 2\n"); | ||
294 | raw_pci_ops = &pci_direct_conf2; | 296 | raw_pci_ops = &pci_direct_conf2; |
295 | return 2; | 297 | return 2; |
296 | } | 298 | } |
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index a5ef5f551373..b60b2abd480c 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
@@ -493,3 +493,20 @@ static void __devinit pci_siemens_interrupt_controller(struct pci_dev *dev) | |||
493 | } | 493 | } |
494 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015, | 494 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015, |
495 | pci_siemens_interrupt_controller); | 495 | pci_siemens_interrupt_controller); |
496 | |||
497 | /* | ||
498 | * Regular PCI devices have 256 bytes, but AMD Family 10h Opteron ext config | ||
499 | * have 4096 bytes. Even if the device is capable, that doesn't mean we can | ||
500 | * access it. Maybe we don't have a way to generate extended config space | ||
501 | * accesses. So check it | ||
502 | */ | ||
503 | static void fam10h_pci_cfg_space_size(struct pci_dev *dev) | ||
504 | { | ||
505 | dev->cfg_size = pci_cfg_space_size_ext(dev, 0); | ||
506 | } | ||
507 | |||
508 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, fam10h_pci_cfg_space_size); | ||
509 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1201, fam10h_pci_cfg_space_size); | ||
510 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1202, fam10h_pci_cfg_space_size); | ||
511 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1203, fam10h_pci_cfg_space_size); | ||
512 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1204, fam10h_pci_cfg_space_size); | ||
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 94f6c73a53d0..8af0f0bae2af 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -301,6 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
301 | prot = pgprot_val(vma->vm_page_prot); | 301 | prot = pgprot_val(vma->vm_page_prot); |
302 | if (pat_wc_enabled && write_combine) | 302 | if (pat_wc_enabled && write_combine) |
303 | prot |= _PAGE_CACHE_WC; | 303 | prot |= _PAGE_CACHE_WC; |
304 | else if (pat_wc_enabled) | ||
305 | /* | ||
306 | * ioremap() and ioremap_nocache() defaults to UC MINUS for now. | ||
307 | * To avoid attribute conflicts, request UC MINUS here | ||
308 | * aswell. | ||
309 | */ | ||
310 | prot |= _PAGE_CACHE_UC_MINUS; | ||
304 | else if (boot_cpu_data.x86 > 3) | 311 | else if (boot_cpu_data.x86 > 3) |
305 | prot |= _PAGE_CACHE_UC; | 312 | prot |= _PAGE_CACHE_UC; |
306 | 313 | ||
@@ -319,9 +326,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
319 | * - request is uncached, return cannot be write-combine | 326 | * - request is uncached, return cannot be write-combine |
320 | * - request is write-combine, return cannot be write-back | 327 | * - request is write-combine, return cannot be write-back |
321 | */ | 328 | */ |
322 | if ((flags == _PAGE_CACHE_UC && | 329 | if ((flags == _PAGE_CACHE_UC_MINUS && |
323 | (new_flags == _PAGE_CACHE_WB || | 330 | (new_flags == _PAGE_CACHE_WB)) || |
324 | new_flags == _PAGE_CACHE_WC)) || | ||
325 | (flags == _PAGE_CACHE_WC && | 331 | (flags == _PAGE_CACHE_WC && |
326 | new_flags == _PAGE_CACHE_WB)) { | 332 | new_flags == _PAGE_CACHE_WB)) { |
327 | free_memtype(addr, addr+len); | 333 | free_memtype(addr, addr+len); |
diff --git a/arch/x86/pci/init.c b/arch/x86/pci/init.c index 3de9f9ba2da6..dd30c6076b5d 100644 --- a/arch/x86/pci/init.c +++ b/arch/x86/pci/init.c | |||
@@ -6,16 +6,17 @@ | |||
6 | in the right sequence from here. */ | 6 | in the right sequence from here. */ |
7 | static __init int pci_access_init(void) | 7 | static __init int pci_access_init(void) |
8 | { | 8 | { |
9 | int type __maybe_unused = 0; | ||
10 | |||
11 | #ifdef CONFIG_PCI_DIRECT | 9 | #ifdef CONFIG_PCI_DIRECT |
10 | int type = 0; | ||
11 | |||
12 | type = pci_direct_probe(); | 12 | type = pci_direct_probe(); |
13 | #endif | 13 | #endif |
14 | #ifdef CONFIG_PCI_MMCONFIG | 14 | |
15 | pci_mmcfg_init(type); | 15 | pci_mmcfg_early_init(); |
16 | |||
17 | #ifdef CONFIG_PCI_OLPC | ||
18 | pci_olpc_init(); | ||
16 | #endif | 19 | #endif |
17 | if (raw_pci_ops) | ||
18 | return 0; | ||
19 | #ifdef CONFIG_PCI_BIOS | 20 | #ifdef CONFIG_PCI_BIOS |
20 | pci_pcbios_init(); | 21 | pci_pcbios_init(); |
21 | #endif | 22 | #endif |
@@ -28,7 +29,7 @@ static __init int pci_access_init(void) | |||
28 | #ifdef CONFIG_PCI_DIRECT | 29 | #ifdef CONFIG_PCI_DIRECT |
29 | pci_direct_init(type); | 30 | pci_direct_init(type); |
30 | #endif | 31 | #endif |
31 | if (!raw_pci_ops) | 32 | if (!raw_pci_ops && !raw_pci_ext_ops) |
32 | printk(KERN_ERR | 33 | printk(KERN_ERR |
33 | "PCI: Fatal: No config space access function found\n"); | 34 | "PCI: Fatal: No config space access function found\n"); |
34 | 35 | ||
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 579745ca6b66..0908fca901bf 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -136,9 +136,11 @@ static void __init pirq_peer_trick(void) | |||
136 | busmap[e->bus] = 1; | 136 | busmap[e->bus] = 1; |
137 | } | 137 | } |
138 | for(i = 1; i < 256; i++) { | 138 | for(i = 1; i < 256; i++) { |
139 | int node; | ||
139 | if (!busmap[i] || pci_find_bus(0, i)) | 140 | if (!busmap[i] || pci_find_bus(0, i)) |
140 | continue; | 141 | continue; |
141 | if (pci_scan_bus_with_sysdata(i)) | 142 | node = get_mp_bus_to_node(i); |
143 | if (pci_scan_bus_on_node(i, &pci_root_ops, node)) | ||
142 | printk(KERN_INFO "PCI: Discovered primary peer " | 144 | printk(KERN_INFO "PCI: Discovered primary peer " |
143 | "bus %02x [IRQ]\n", i); | 145 | "bus %02x [IRQ]\n", i); |
144 | } | 146 | } |
diff --git a/arch/x86/pci/k8-bus_64.c b/arch/x86/pci/k8-bus_64.c index 9cc813e29706..ab6d4b18a88f 100644 --- a/arch/x86/pci/k8-bus_64.c +++ b/arch/x86/pci/k8-bus_64.c | |||
@@ -1,83 +1,536 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <linux/pci.h> | 2 | #include <linux/pci.h> |
3 | #include <asm/pci-direct.h> | ||
3 | #include <asm/mpspec.h> | 4 | #include <asm/mpspec.h> |
4 | #include <linux/cpumask.h> | 5 | #include <linux/cpumask.h> |
6 | #include <linux/topology.h> | ||
5 | 7 | ||
6 | /* | 8 | /* |
7 | * This discovers the pcibus <-> node mapping on AMD K8. | 9 | * This discovers the pcibus <-> node mapping on AMD K8. |
8 | * | 10 | * also get peer root bus resource for io,mmio |
9 | * RED-PEN need to call this again on PCI hotplug | ||
10 | * RED-PEN empty cpus get reported wrong | ||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define NODE_ID_REGISTER 0x60 | 13 | |
14 | #define NODE_ID(dword) (dword & 0x07) | 14 | /* |
15 | #define LDT_BUS_NUMBER_REGISTER_0 0x94 | 15 | * sub bus (transparent) will use entres from 3 to store extra from root, |
16 | #define LDT_BUS_NUMBER_REGISTER_1 0xB4 | 16 | * so need to make sure have enought slot there, increase PCI_BUS_NUM_RESOURCES? |
17 | #define LDT_BUS_NUMBER_REGISTER_2 0xD4 | 17 | */ |
18 | #define NR_LDT_BUS_NUMBER_REGISTERS 3 | 18 | #define RES_NUM 16 |
19 | #define SECONDARY_LDT_BUS_NUMBER(dword) ((dword >> 8) & 0xFF) | 19 | struct pci_root_info { |
20 | #define SUBORDINATE_LDT_BUS_NUMBER(dword) ((dword >> 16) & 0xFF) | 20 | char name[12]; |
21 | #define PCI_DEVICE_ID_K8HTCONFIG 0x1100 | 21 | unsigned int res_num; |
22 | struct resource res[RES_NUM]; | ||
23 | int bus_min; | ||
24 | int bus_max; | ||
25 | int node; | ||
26 | int link; | ||
27 | }; | ||
28 | |||
29 | /* 4 at this time, it may become to 32 */ | ||
30 | #define PCI_ROOT_NR 4 | ||
31 | static int pci_root_num; | ||
32 | static struct pci_root_info pci_root_info[PCI_ROOT_NR]; | ||
33 | |||
34 | #ifdef CONFIG_NUMA | ||
35 | |||
36 | #define BUS_NR 256 | ||
37 | |||
38 | static int mp_bus_to_node[BUS_NR]; | ||
39 | |||
40 | void set_mp_bus_to_node(int busnum, int node) | ||
41 | { | ||
42 | if (busnum >= 0 && busnum < BUS_NR) | ||
43 | mp_bus_to_node[busnum] = node; | ||
44 | } | ||
45 | |||
46 | int get_mp_bus_to_node(int busnum) | ||
47 | { | ||
48 | int node = -1; | ||
49 | |||
50 | if (busnum < 0 || busnum > (BUS_NR - 1)) | ||
51 | return node; | ||
52 | |||
53 | node = mp_bus_to_node[busnum]; | ||
54 | |||
55 | /* | ||
56 | * let numa_node_id to decide it later in dma_alloc_pages | ||
57 | * if there is no ram on that node | ||
58 | */ | ||
59 | if (node != -1 && !node_online(node)) | ||
60 | node = -1; | ||
61 | |||
62 | return node; | ||
63 | } | ||
64 | #endif | ||
65 | |||
66 | void set_pci_bus_resources_arch_default(struct pci_bus *b) | ||
67 | { | ||
68 | int i; | ||
69 | int j; | ||
70 | struct pci_root_info *info; | ||
71 | |||
72 | /* if only one root bus, don't need to anything */ | ||
73 | if (pci_root_num < 2) | ||
74 | return; | ||
75 | |||
76 | for (i = 0; i < pci_root_num; i++) { | ||
77 | if (pci_root_info[i].bus_min == b->number) | ||
78 | break; | ||
79 | } | ||
80 | |||
81 | if (i == pci_root_num) | ||
82 | return; | ||
83 | |||
84 | info = &pci_root_info[i]; | ||
85 | for (j = 0; j < info->res_num; j++) { | ||
86 | struct resource *res; | ||
87 | struct resource *root; | ||
88 | |||
89 | res = &info->res[j]; | ||
90 | b->resource[j] = res; | ||
91 | if (res->flags & IORESOURCE_IO) | ||
92 | root = &ioport_resource; | ||
93 | else | ||
94 | root = &iomem_resource; | ||
95 | insert_resource(root, res); | ||
96 | } | ||
97 | } | ||
98 | |||
99 | #define RANGE_NUM 16 | ||
100 | |||
101 | struct res_range { | ||
102 | size_t start; | ||
103 | size_t end; | ||
104 | }; | ||
105 | |||
106 | static void __init update_range(struct res_range *range, size_t start, | ||
107 | size_t end) | ||
108 | { | ||
109 | int i; | ||
110 | int j; | ||
111 | |||
112 | for (j = 0; j < RANGE_NUM; j++) { | ||
113 | if (!range[j].end) | ||
114 | continue; | ||
115 | |||
116 | if (start <= range[j].start && end >= range[j].end) { | ||
117 | range[j].start = 0; | ||
118 | range[j].end = 0; | ||
119 | continue; | ||
120 | } | ||
121 | |||
122 | if (start <= range[j].start && end < range[j].end && range[j].start < end + 1) { | ||
123 | range[j].start = end + 1; | ||
124 | continue; | ||
125 | } | ||
126 | |||
127 | |||
128 | if (start > range[j].start && end >= range[j].end && range[j].end > start - 1) { | ||
129 | range[j].end = start - 1; | ||
130 | continue; | ||
131 | } | ||
132 | |||
133 | if (start > range[j].start && end < range[j].end) { | ||
134 | /* find the new spare */ | ||
135 | for (i = 0; i < RANGE_NUM; i++) { | ||
136 | if (range[i].end == 0) | ||
137 | break; | ||
138 | } | ||
139 | if (i < RANGE_NUM) { | ||
140 | range[i].end = range[j].end; | ||
141 | range[i].start = end + 1; | ||
142 | } else { | ||
143 | printk(KERN_ERR "run of slot in ranges\n"); | ||
144 | } | ||
145 | range[j].end = start - 1; | ||
146 | continue; | ||
147 | } | ||
148 | } | ||
149 | } | ||
150 | |||
151 | static void __init update_res(struct pci_root_info *info, size_t start, | ||
152 | size_t end, unsigned long flags, int merge) | ||
153 | { | ||
154 | int i; | ||
155 | struct resource *res; | ||
156 | |||
157 | if (!merge) | ||
158 | goto addit; | ||
159 | |||
160 | /* try to merge it with old one */ | ||
161 | for (i = 0; i < info->res_num; i++) { | ||
162 | size_t final_start, final_end; | ||
163 | size_t common_start, common_end; | ||
164 | |||
165 | res = &info->res[i]; | ||
166 | if (res->flags != flags) | ||
167 | continue; | ||
168 | |||
169 | common_start = max((size_t)res->start, start); | ||
170 | common_end = min((size_t)res->end, end); | ||
171 | if (common_start > common_end + 1) | ||
172 | continue; | ||
173 | |||
174 | final_start = min((size_t)res->start, start); | ||
175 | final_end = max((size_t)res->end, end); | ||
176 | |||
177 | res->start = final_start; | ||
178 | res->end = final_end; | ||
179 | return; | ||
180 | } | ||
181 | |||
182 | addit: | ||
183 | |||
184 | /* need to add that */ | ||
185 | if (info->res_num >= RES_NUM) | ||
186 | return; | ||
187 | |||
188 | res = &info->res[info->res_num]; | ||
189 | res->name = info->name; | ||
190 | res->flags = flags; | ||
191 | res->start = start; | ||
192 | res->end = end; | ||
193 | res->child = NULL; | ||
194 | info->res_num++; | ||
195 | } | ||
196 | |||
197 | struct pci_hostbridge_probe { | ||
198 | u32 bus; | ||
199 | u32 slot; | ||
200 | u32 vendor; | ||
201 | u32 device; | ||
202 | }; | ||
203 | |||
204 | static struct pci_hostbridge_probe pci_probes[] __initdata = { | ||
205 | { 0, 0x18, PCI_VENDOR_ID_AMD, 0x1100 }, | ||
206 | { 0, 0x18, PCI_VENDOR_ID_AMD, 0x1200 }, | ||
207 | { 0xff, 0, PCI_VENDOR_ID_AMD, 0x1200 }, | ||
208 | { 0, 0x18, PCI_VENDOR_ID_AMD, 0x1300 }, | ||
209 | }; | ||
210 | |||
211 | static u64 __initdata fam10h_mmconf_start; | ||
212 | static u64 __initdata fam10h_mmconf_end; | ||
213 | static void __init get_pci_mmcfg_amd_fam10h_range(void) | ||
214 | { | ||
215 | u32 address; | ||
216 | u64 base, msr; | ||
217 | unsigned segn_busn_bits; | ||
218 | |||
219 | /* assume all cpus from fam10h have mmconf */ | ||
220 | if (boot_cpu_data.x86 < 0x10) | ||
221 | return; | ||
222 | |||
223 | address = MSR_FAM10H_MMIO_CONF_BASE; | ||
224 | rdmsrl(address, msr); | ||
225 | |||
226 | /* mmconfig is not enable */ | ||
227 | if (!(msr & FAM10H_MMIO_CONF_ENABLE)) | ||
228 | return; | ||
229 | |||
230 | base = msr & (FAM10H_MMIO_CONF_BASE_MASK<<FAM10H_MMIO_CONF_BASE_SHIFT); | ||
231 | |||
232 | segn_busn_bits = (msr >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) & | ||
233 | FAM10H_MMIO_CONF_BUSRANGE_MASK; | ||
234 | |||
235 | fam10h_mmconf_start = base; | ||
236 | fam10h_mmconf_end = base + (1ULL<<(segn_busn_bits + 20)) - 1; | ||
237 | } | ||
22 | 238 | ||
23 | /** | 239 | /** |
24 | * fill_mp_bus_to_cpumask() | 240 | * early_fill_mp_bus_to_node() |
241 | * called before pcibios_scan_root and pci_scan_bus | ||
25 | * fills the mp_bus_to_cpumask array based according to the LDT Bus Number | 242 | * fills the mp_bus_to_cpumask array based according to the LDT Bus Number |
26 | * Registers found in the K8 northbridge | 243 | * Registers found in the K8 northbridge |
27 | */ | 244 | */ |
28 | __init static int | 245 | static int __init early_fill_mp_bus_info(void) |
29 | fill_mp_bus_to_cpumask(void) | ||
30 | { | 246 | { |
31 | struct pci_dev *nb_dev = NULL; | 247 | int i; |
32 | int i, j; | 248 | int j; |
33 | u32 ldtbus, nid; | 249 | unsigned bus; |
34 | static int lbnr[3] = { | 250 | unsigned slot; |
35 | LDT_BUS_NUMBER_REGISTER_0, | 251 | int found; |
36 | LDT_BUS_NUMBER_REGISTER_1, | 252 | int node; |
37 | LDT_BUS_NUMBER_REGISTER_2 | 253 | int link; |
38 | }; | 254 | int def_node; |
39 | 255 | int def_link; | |
40 | while ((nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, | 256 | struct pci_root_info *info; |
41 | PCI_DEVICE_ID_K8HTCONFIG, nb_dev))) { | 257 | u32 reg; |
42 | pci_read_config_dword(nb_dev, NODE_ID_REGISTER, &nid); | 258 | struct resource *res; |
43 | 259 | size_t start; | |
44 | for (i = 0; i < NR_LDT_BUS_NUMBER_REGISTERS; i++) { | 260 | size_t end; |
45 | pci_read_config_dword(nb_dev, lbnr[i], &ldtbus); | 261 | struct res_range range[RANGE_NUM]; |
46 | /* | 262 | u64 val; |
47 | * if there are no busses hanging off of the current | 263 | u32 address; |
48 | * ldt link then both the secondary and subordinate | 264 | |
49 | * bus number fields are set to 0. | 265 | #ifdef CONFIG_NUMA |
50 | * | 266 | for (i = 0; i < BUS_NR; i++) |
51 | * RED-PEN | 267 | mp_bus_to_node[i] = -1; |
52 | * This is slightly broken because it assumes | 268 | #endif |
53 | * HT node IDs == Linux node ids, which is not always | 269 | |
54 | * true. However it is probably mostly true. | 270 | if (!early_pci_allowed()) |
55 | */ | 271 | return -1; |
56 | if (!(SECONDARY_LDT_BUS_NUMBER(ldtbus) == 0 | 272 | |
57 | && SUBORDINATE_LDT_BUS_NUMBER(ldtbus) == 0)) { | 273 | found = 0; |
58 | for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus); | 274 | for (i = 0; i < ARRAY_SIZE(pci_probes); i++) { |
59 | j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); | 275 | u32 id; |
60 | j++) { | 276 | u16 device; |
61 | struct pci_bus *bus; | 277 | u16 vendor; |
62 | struct pci_sysdata *sd; | 278 | |
63 | 279 | bus = pci_probes[i].bus; | |
64 | long node = NODE_ID(nid); | 280 | slot = pci_probes[i].slot; |
65 | /* Algorithm a bit dumb, but | 281 | id = read_pci_config(bus, slot, 0, PCI_VENDOR_ID); |
66 | it shouldn't matter here */ | 282 | |
67 | bus = pci_find_bus(0, j); | 283 | vendor = id & 0xffff; |
68 | if (!bus) | 284 | device = (id>>16) & 0xffff; |
69 | continue; | 285 | if (pci_probes[i].vendor == vendor && |
70 | if (!node_online(node)) | 286 | pci_probes[i].device == device) { |
71 | node = 0; | 287 | found = 1; |
72 | 288 | break; | |
73 | sd = bus->sysdata; | 289 | } |
74 | sd->node = node; | 290 | } |
75 | } | 291 | |
292 | if (!found) | ||
293 | return 0; | ||
294 | |||
295 | pci_root_num = 0; | ||
296 | for (i = 0; i < 4; i++) { | ||
297 | int min_bus; | ||
298 | int max_bus; | ||
299 | reg = read_pci_config(bus, slot, 1, 0xe0 + (i << 2)); | ||
300 | |||
301 | /* Check if that register is enabled for bus range */ | ||
302 | if ((reg & 7) != 3) | ||
303 | continue; | ||
304 | |||
305 | min_bus = (reg >> 16) & 0xff; | ||
306 | max_bus = (reg >> 24) & 0xff; | ||
307 | node = (reg >> 4) & 0x07; | ||
308 | #ifdef CONFIG_NUMA | ||
309 | for (j = min_bus; j <= max_bus; j++) | ||
310 | mp_bus_to_node[j] = (unsigned char) node; | ||
311 | #endif | ||
312 | link = (reg >> 8) & 0x03; | ||
313 | |||
314 | info = &pci_root_info[pci_root_num]; | ||
315 | info->bus_min = min_bus; | ||
316 | info->bus_max = max_bus; | ||
317 | info->node = node; | ||
318 | info->link = link; | ||
319 | sprintf(info->name, "PCI Bus #%02x", min_bus); | ||
320 | pci_root_num++; | ||
321 | } | ||
322 | |||
323 | /* get the default node and link for left over res */ | ||
324 | reg = read_pci_config(bus, slot, 0, 0x60); | ||
325 | def_node = (reg >> 8) & 0x07; | ||
326 | reg = read_pci_config(bus, slot, 0, 0x64); | ||
327 | def_link = (reg >> 8) & 0x03; | ||
328 | |||
329 | memset(range, 0, sizeof(range)); | ||
330 | range[0].end = 0xffff; | ||
331 | /* io port resource */ | ||
332 | for (i = 0; i < 4; i++) { | ||
333 | reg = read_pci_config(bus, slot, 1, 0xc0 + (i << 3)); | ||
334 | if (!(reg & 3)) | ||
335 | continue; | ||
336 | |||
337 | start = reg & 0xfff000; | ||
338 | reg = read_pci_config(bus, slot, 1, 0xc4 + (i << 3)); | ||
339 | node = reg & 0x07; | ||
340 | link = (reg >> 4) & 0x03; | ||
341 | end = (reg & 0xfff000) | 0xfff; | ||
342 | |||
343 | /* find the position */ | ||
344 | for (j = 0; j < pci_root_num; j++) { | ||
345 | info = &pci_root_info[j]; | ||
346 | if (info->node == node && info->link == link) | ||
347 | break; | ||
348 | } | ||
349 | if (j == pci_root_num) | ||
350 | continue; /* not found */ | ||
351 | |||
352 | info = &pci_root_info[j]; | ||
353 | printk(KERN_DEBUG "node %d link %d: io port [%llx, %llx]\n", | ||
354 | node, link, (u64)start, (u64)end); | ||
355 | |||
356 | /* kernel only handle 16 bit only */ | ||
357 | if (end > 0xffff) | ||
358 | end = 0xffff; | ||
359 | update_res(info, start, end, IORESOURCE_IO, 1); | ||
360 | update_range(range, start, end); | ||
361 | } | ||
362 | /* add left over io port range to def node/link, [0, 0xffff] */ | ||
363 | /* find the position */ | ||
364 | for (j = 0; j < pci_root_num; j++) { | ||
365 | info = &pci_root_info[j]; | ||
366 | if (info->node == def_node && info->link == def_link) | ||
367 | break; | ||
368 | } | ||
369 | if (j < pci_root_num) { | ||
370 | info = &pci_root_info[j]; | ||
371 | for (i = 0; i < RANGE_NUM; i++) { | ||
372 | if (!range[i].end) | ||
373 | continue; | ||
374 | |||
375 | update_res(info, range[i].start, range[i].end, | ||
376 | IORESOURCE_IO, 1); | ||
377 | } | ||
378 | } | ||
379 | |||
380 | memset(range, 0, sizeof(range)); | ||
381 | /* 0xfd00000000-0xffffffffff for HT */ | ||
382 | range[0].end = (0xfdULL<<32) - 1; | ||
383 | |||
384 | /* need to take out [0, TOM) for RAM*/ | ||
385 | address = MSR_K8_TOP_MEM1; | ||
386 | rdmsrl(address, val); | ||
387 | end = (val & 0xffffff8000000ULL); | ||
388 | printk(KERN_INFO "TOM: %016lx aka %ldM\n", end, end>>20); | ||
389 | if (end < (1ULL<<32)) | ||
390 | update_range(range, 0, end - 1); | ||
391 | |||
392 | /* get mmconfig */ | ||
393 | get_pci_mmcfg_amd_fam10h_range(); | ||
394 | /* need to take out mmconf range */ | ||
395 | if (fam10h_mmconf_end) { | ||
396 | printk(KERN_DEBUG "Fam 10h mmconf [%llx, %llx]\n", fam10h_mmconf_start, fam10h_mmconf_end); | ||
397 | update_range(range, fam10h_mmconf_start, fam10h_mmconf_end); | ||
398 | } | ||
399 | |||
400 | /* mmio resource */ | ||
401 | for (i = 0; i < 8; i++) { | ||
402 | reg = read_pci_config(bus, slot, 1, 0x80 + (i << 3)); | ||
403 | if (!(reg & 3)) | ||
404 | continue; | ||
405 | |||
406 | start = reg & 0xffffff00; /* 39:16 on 31:8*/ | ||
407 | start <<= 8; | ||
408 | reg = read_pci_config(bus, slot, 1, 0x84 + (i << 3)); | ||
409 | node = reg & 0x07; | ||
410 | link = (reg >> 4) & 0x03; | ||
411 | end = (reg & 0xffffff00); | ||
412 | end <<= 8; | ||
413 | end |= 0xffff; | ||
414 | |||
415 | /* find the position */ | ||
416 | for (j = 0; j < pci_root_num; j++) { | ||
417 | info = &pci_root_info[j]; | ||
418 | if (info->node == node && info->link == link) | ||
419 | break; | ||
420 | } | ||
421 | if (j == pci_root_num) | ||
422 | continue; /* not found */ | ||
423 | |||
424 | info = &pci_root_info[j]; | ||
425 | |||
426 | printk(KERN_DEBUG "node %d link %d: mmio [%llx, %llx]", | ||
427 | node, link, (u64)start, (u64)end); | ||
428 | /* | ||
429 | * some sick allocation would have range overlap with fam10h | ||
430 | * mmconf range, so need to update start and end. | ||
431 | */ | ||
432 | if (fam10h_mmconf_end) { | ||
433 | int changed = 0; | ||
434 | u64 endx = 0; | ||
435 | if (start >= fam10h_mmconf_start && | ||
436 | start <= fam10h_mmconf_end) { | ||
437 | start = fam10h_mmconf_end + 1; | ||
438 | changed = 1; | ||
439 | } | ||
440 | |||
441 | if (end >= fam10h_mmconf_start && | ||
442 | end <= fam10h_mmconf_end) { | ||
443 | end = fam10h_mmconf_start - 1; | ||
444 | changed = 1; | ||
445 | } | ||
446 | |||
447 | if (start < fam10h_mmconf_start && | ||
448 | end > fam10h_mmconf_end) { | ||
449 | /* we got a hole */ | ||
450 | endx = fam10h_mmconf_start - 1; | ||
451 | update_res(info, start, endx, IORESOURCE_MEM, 0); | ||
452 | update_range(range, start, endx); | ||
453 | printk(KERN_CONT " ==> [%llx, %llx]", (u64)start, endx); | ||
454 | start = fam10h_mmconf_end + 1; | ||
455 | changed = 1; | ||
456 | } | ||
457 | if (changed) { | ||
458 | if (start <= end) { | ||
459 | printk(KERN_CONT " %s [%llx, %llx]", endx?"and":"==>", (u64)start, (u64)end); | ||
460 | } else { | ||
461 | printk(KERN_CONT "%s\n", endx?"":" ==> none"); | ||
462 | continue; | ||
463 | } | ||
76 | } | 464 | } |
77 | } | 465 | } |
466 | |||
467 | update_res(info, start, end, IORESOURCE_MEM, 1); | ||
468 | update_range(range, start, end); | ||
469 | printk(KERN_CONT "\n"); | ||
470 | } | ||
471 | |||
472 | /* need to take out [4G, TOM2) for RAM*/ | ||
473 | /* SYS_CFG */ | ||
474 | address = MSR_K8_SYSCFG; | ||
475 | rdmsrl(address, val); | ||
476 | /* TOP_MEM2 is enabled? */ | ||
477 | if (val & (1<<21)) { | ||
478 | /* TOP_MEM2 */ | ||
479 | address = MSR_K8_TOP_MEM2; | ||
480 | rdmsrl(address, val); | ||
481 | end = (val & 0xffffff8000000ULL); | ||
482 | printk(KERN_INFO "TOM2: %016lx aka %ldM\n", end, end>>20); | ||
483 | update_range(range, 1ULL<<32, end - 1); | ||
484 | } | ||
485 | |||
486 | /* | ||
487 | * add left over mmio range to def node/link ? | ||
488 | * that is tricky, just record range in from start_min to 4G | ||
489 | */ | ||
490 | for (j = 0; j < pci_root_num; j++) { | ||
491 | info = &pci_root_info[j]; | ||
492 | if (info->node == def_node && info->link == def_link) | ||
493 | break; | ||
494 | } | ||
495 | if (j < pci_root_num) { | ||
496 | info = &pci_root_info[j]; | ||
497 | |||
498 | for (i = 0; i < RANGE_NUM; i++) { | ||
499 | if (!range[i].end) | ||
500 | continue; | ||
501 | |||
502 | update_res(info, range[i].start, range[i].end, | ||
503 | IORESOURCE_MEM, 1); | ||
504 | } | ||
505 | } | ||
506 | |||
507 | #ifdef CONFIG_NUMA | ||
508 | for (i = 0; i < BUS_NR; i++) { | ||
509 | node = mp_bus_to_node[i]; | ||
510 | if (node >= 0) | ||
511 | printk(KERN_DEBUG "bus: %02x to node: %02x\n", i, node); | ||
512 | } | ||
513 | #endif | ||
514 | |||
515 | for (i = 0; i < pci_root_num; i++) { | ||
516 | int res_num; | ||
517 | int busnum; | ||
518 | |||
519 | info = &pci_root_info[i]; | ||
520 | res_num = info->res_num; | ||
521 | busnum = info->bus_min; | ||
522 | printk(KERN_DEBUG "bus: [%02x,%02x] on node %x link %x\n", | ||
523 | info->bus_min, info->bus_max, info->node, info->link); | ||
524 | for (j = 0; j < res_num; j++) { | ||
525 | res = &info->res[j]; | ||
526 | printk(KERN_DEBUG "bus: %02x index %x %s: [%llx, %llx]\n", | ||
527 | busnum, j, | ||
528 | (res->flags & IORESOURCE_IO)?"io port":"mmio", | ||
529 | res->start, res->end); | ||
530 | } | ||
78 | } | 531 | } |
79 | 532 | ||
80 | return 0; | 533 | return 0; |
81 | } | 534 | } |
82 | 535 | ||
83 | fs_initcall(fill_mp_bus_to_cpumask); | 536 | postcore_initcall(early_fill_mp_bus_info); |
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c index e041ced0ce13..a67921ce60af 100644 --- a/arch/x86/pci/legacy.c +++ b/arch/x86/pci/legacy.c | |||
@@ -12,6 +12,7 @@ | |||
12 | static void __devinit pcibios_fixup_peer_bridges(void) | 12 | static void __devinit pcibios_fixup_peer_bridges(void) |
13 | { | 13 | { |
14 | int n, devfn; | 14 | int n, devfn; |
15 | long node; | ||
15 | 16 | ||
16 | if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff) | 17 | if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff) |
17 | return; | 18 | return; |
@@ -21,12 +22,13 @@ static void __devinit pcibios_fixup_peer_bridges(void) | |||
21 | u32 l; | 22 | u32 l; |
22 | if (pci_find_bus(0, n)) | 23 | if (pci_find_bus(0, n)) |
23 | continue; | 24 | continue; |
25 | node = get_mp_bus_to_node(n); | ||
24 | for (devfn = 0; devfn < 256; devfn += 8) { | 26 | for (devfn = 0; devfn < 256; devfn += 8) { |
25 | if (!raw_pci_read(0, n, devfn, PCI_VENDOR_ID, 2, &l) && | 27 | if (!raw_pci_read(0, n, devfn, PCI_VENDOR_ID, 2, &l) && |
26 | l != 0x0000 && l != 0xffff) { | 28 | l != 0x0000 && l != 0xffff) { |
27 | DBG("Found device at %02x:%02x [%04x]\n", n, devfn, l); | 29 | DBG("Found device at %02x:%02x [%04x]\n", n, devfn, l); |
28 | printk(KERN_INFO "PCI: Discovered peer bus %02x\n", n); | 30 | printk(KERN_INFO "PCI: Discovered peer bus %02x\n", n); |
29 | pci_scan_bus_with_sysdata(n); | 31 | pci_scan_bus_on_node(n, &pci_root_ops, node); |
30 | break; | 32 | break; |
31 | } | 33 | } |
32 | } | 34 | } |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 8d54df4dfaad..0cfebecf2a8f 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -28,7 +28,7 @@ static int __initdata pci_mmcfg_resources_inserted; | |||
28 | static const char __init *pci_mmcfg_e7520(void) | 28 | static const char __init *pci_mmcfg_e7520(void) |
29 | { | 29 | { |
30 | u32 win; | 30 | u32 win; |
31 | pci_direct_conf1.read(0, 0, PCI_DEVFN(0,0), 0xce, 2, &win); | 31 | raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0xce, 2, &win); |
32 | 32 | ||
33 | win = win & 0xf000; | 33 | win = win & 0xf000; |
34 | if(win == 0x0000 || win == 0xf000) | 34 | if(win == 0x0000 || win == 0xf000) |
@@ -53,7 +53,7 @@ static const char __init *pci_mmcfg_intel_945(void) | |||
53 | 53 | ||
54 | pci_mmcfg_config_num = 1; | 54 | pci_mmcfg_config_num = 1; |
55 | 55 | ||
56 | pci_direct_conf1.read(0, 0, PCI_DEVFN(0,0), 0x48, 4, &pciexbar); | 56 | raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0x48, 4, &pciexbar); |
57 | 57 | ||
58 | /* Enable bit */ | 58 | /* Enable bit */ |
59 | if (!(pciexbar & 1)) | 59 | if (!(pciexbar & 1)) |
@@ -100,33 +100,102 @@ static const char __init *pci_mmcfg_intel_945(void) | |||
100 | return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub"; | 100 | return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub"; |
101 | } | 101 | } |
102 | 102 | ||
103 | static const char __init *pci_mmcfg_amd_fam10h(void) | ||
104 | { | ||
105 | u32 low, high, address; | ||
106 | u64 base, msr; | ||
107 | int i; | ||
108 | unsigned segnbits = 0, busnbits; | ||
109 | |||
110 | if (!(pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF)) | ||
111 | return NULL; | ||
112 | |||
113 | address = MSR_FAM10H_MMIO_CONF_BASE; | ||
114 | if (rdmsr_safe(address, &low, &high)) | ||
115 | return NULL; | ||
116 | |||
117 | msr = high; | ||
118 | msr <<= 32; | ||
119 | msr |= low; | ||
120 | |||
121 | /* mmconfig is not enable */ | ||
122 | if (!(msr & FAM10H_MMIO_CONF_ENABLE)) | ||
123 | return NULL; | ||
124 | |||
125 | base = msr & (FAM10H_MMIO_CONF_BASE_MASK<<FAM10H_MMIO_CONF_BASE_SHIFT); | ||
126 | |||
127 | busnbits = (msr >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) & | ||
128 | FAM10H_MMIO_CONF_BUSRANGE_MASK; | ||
129 | |||
130 | /* | ||
131 | * only handle bus 0 ? | ||
132 | * need to skip it | ||
133 | */ | ||
134 | if (!busnbits) | ||
135 | return NULL; | ||
136 | |||
137 | if (busnbits > 8) { | ||
138 | segnbits = busnbits - 8; | ||
139 | busnbits = 8; | ||
140 | } | ||
141 | |||
142 | pci_mmcfg_config_num = (1 << segnbits); | ||
143 | pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]) * | ||
144 | pci_mmcfg_config_num, GFP_KERNEL); | ||
145 | if (!pci_mmcfg_config) | ||
146 | return NULL; | ||
147 | |||
148 | for (i = 0; i < (1 << segnbits); i++) { | ||
149 | pci_mmcfg_config[i].address = base + (1<<28) * i; | ||
150 | pci_mmcfg_config[i].pci_segment = i; | ||
151 | pci_mmcfg_config[i].start_bus_number = 0; | ||
152 | pci_mmcfg_config[i].end_bus_number = (1 << busnbits) - 1; | ||
153 | } | ||
154 | |||
155 | return "AMD Family 10h NB"; | ||
156 | } | ||
157 | |||
103 | struct pci_mmcfg_hostbridge_probe { | 158 | struct pci_mmcfg_hostbridge_probe { |
159 | u32 bus; | ||
160 | u32 devfn; | ||
104 | u32 vendor; | 161 | u32 vendor; |
105 | u32 device; | 162 | u32 device; |
106 | const char *(*probe)(void); | 163 | const char *(*probe)(void); |
107 | }; | 164 | }; |
108 | 165 | ||
109 | static struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initdata = { | 166 | static struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initdata = { |
110 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, pci_mmcfg_e7520 }, | 167 | { 0, PCI_DEVFN(0, 0), PCI_VENDOR_ID_INTEL, |
111 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82945G_HB, pci_mmcfg_intel_945 }, | 168 | PCI_DEVICE_ID_INTEL_E7520_MCH, pci_mmcfg_e7520 }, |
169 | { 0, PCI_DEVFN(0, 0), PCI_VENDOR_ID_INTEL, | ||
170 | PCI_DEVICE_ID_INTEL_82945G_HB, pci_mmcfg_intel_945 }, | ||
171 | { 0, PCI_DEVFN(0x18, 0), PCI_VENDOR_ID_AMD, | ||
172 | 0x1200, pci_mmcfg_amd_fam10h }, | ||
173 | { 0xff, PCI_DEVFN(0, 0), PCI_VENDOR_ID_AMD, | ||
174 | 0x1200, pci_mmcfg_amd_fam10h }, | ||
112 | }; | 175 | }; |
113 | 176 | ||
114 | static int __init pci_mmcfg_check_hostbridge(void) | 177 | static int __init pci_mmcfg_check_hostbridge(void) |
115 | { | 178 | { |
116 | u32 l; | 179 | u32 l; |
180 | u32 bus, devfn; | ||
117 | u16 vendor, device; | 181 | u16 vendor, device; |
118 | int i; | 182 | int i; |
119 | const char *name; | 183 | const char *name; |
120 | 184 | ||
121 | pci_direct_conf1.read(0, 0, PCI_DEVFN(0,0), 0, 4, &l); | 185 | if (!raw_pci_ops) |
122 | vendor = l & 0xffff; | 186 | return 0; |
123 | device = (l >> 16) & 0xffff; | ||
124 | 187 | ||
125 | pci_mmcfg_config_num = 0; | 188 | pci_mmcfg_config_num = 0; |
126 | pci_mmcfg_config = NULL; | 189 | pci_mmcfg_config = NULL; |
127 | name = NULL; | 190 | name = NULL; |
128 | 191 | ||
129 | for (i = 0; !name && i < ARRAY_SIZE(pci_mmcfg_probes); i++) { | 192 | for (i = 0; !name && i < ARRAY_SIZE(pci_mmcfg_probes); i++) { |
193 | bus = pci_mmcfg_probes[i].bus; | ||
194 | devfn = pci_mmcfg_probes[i].devfn; | ||
195 | raw_pci_ops->read(0, bus, devfn, 0, 4, &l); | ||
196 | vendor = l & 0xffff; | ||
197 | device = (l >> 16) & 0xffff; | ||
198 | |||
130 | if (pci_mmcfg_probes[i].vendor == vendor && | 199 | if (pci_mmcfg_probes[i].vendor == vendor && |
131 | pci_mmcfg_probes[i].device == device) | 200 | pci_mmcfg_probes[i].device == device) |
132 | name = pci_mmcfg_probes[i].probe(); | 201 | name = pci_mmcfg_probes[i].probe(); |
@@ -173,9 +242,78 @@ static void __init pci_mmcfg_insert_resources(unsigned long resource_flags) | |||
173 | pci_mmcfg_resources_inserted = 1; | 242 | pci_mmcfg_resources_inserted = 1; |
174 | } | 243 | } |
175 | 244 | ||
176 | static void __init pci_mmcfg_reject_broken(int type) | 245 | static acpi_status __init check_mcfg_resource(struct acpi_resource *res, |
246 | void *data) | ||
247 | { | ||
248 | struct resource *mcfg_res = data; | ||
249 | struct acpi_resource_address64 address; | ||
250 | acpi_status status; | ||
251 | |||
252 | if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) { | ||
253 | struct acpi_resource_fixed_memory32 *fixmem32 = | ||
254 | &res->data.fixed_memory32; | ||
255 | if (!fixmem32) | ||
256 | return AE_OK; | ||
257 | if ((mcfg_res->start >= fixmem32->address) && | ||
258 | (mcfg_res->end < (fixmem32->address + | ||
259 | fixmem32->address_length))) { | ||
260 | mcfg_res->flags = 1; | ||
261 | return AE_CTRL_TERMINATE; | ||
262 | } | ||
263 | } | ||
264 | if ((res->type != ACPI_RESOURCE_TYPE_ADDRESS32) && | ||
265 | (res->type != ACPI_RESOURCE_TYPE_ADDRESS64)) | ||
266 | return AE_OK; | ||
267 | |||
268 | status = acpi_resource_to_address64(res, &address); | ||
269 | if (ACPI_FAILURE(status) || | ||
270 | (address.address_length <= 0) || | ||
271 | (address.resource_type != ACPI_MEMORY_RANGE)) | ||
272 | return AE_OK; | ||
273 | |||
274 | if ((mcfg_res->start >= address.minimum) && | ||
275 | (mcfg_res->end < (address.minimum + address.address_length))) { | ||
276 | mcfg_res->flags = 1; | ||
277 | return AE_CTRL_TERMINATE; | ||
278 | } | ||
279 | return AE_OK; | ||
280 | } | ||
281 | |||
282 | static acpi_status __init find_mboard_resource(acpi_handle handle, u32 lvl, | ||
283 | void *context, void **rv) | ||
284 | { | ||
285 | struct resource *mcfg_res = context; | ||
286 | |||
287 | acpi_walk_resources(handle, METHOD_NAME__CRS, | ||
288 | check_mcfg_resource, context); | ||
289 | |||
290 | if (mcfg_res->flags) | ||
291 | return AE_CTRL_TERMINATE; | ||
292 | |||
293 | return AE_OK; | ||
294 | } | ||
295 | |||
296 | static int __init is_acpi_reserved(unsigned long start, unsigned long end) | ||
297 | { | ||
298 | struct resource mcfg_res; | ||
299 | |||
300 | mcfg_res.start = start; | ||
301 | mcfg_res.end = end; | ||
302 | mcfg_res.flags = 0; | ||
303 | |||
304 | acpi_get_devices("PNP0C01", find_mboard_resource, &mcfg_res, NULL); | ||
305 | |||
306 | if (!mcfg_res.flags) | ||
307 | acpi_get_devices("PNP0C02", find_mboard_resource, &mcfg_res, | ||
308 | NULL); | ||
309 | |||
310 | return mcfg_res.flags; | ||
311 | } | ||
312 | |||
313 | static void __init pci_mmcfg_reject_broken(int early) | ||
177 | { | 314 | { |
178 | typeof(pci_mmcfg_config[0]) *cfg; | 315 | typeof(pci_mmcfg_config[0]) *cfg; |
316 | int i; | ||
179 | 317 | ||
180 | if ((pci_mmcfg_config_num == 0) || | 318 | if ((pci_mmcfg_config_num == 0) || |
181 | (pci_mmcfg_config == NULL) || | 319 | (pci_mmcfg_config == NULL) || |
@@ -184,51 +322,80 @@ static void __init pci_mmcfg_reject_broken(int type) | |||
184 | 322 | ||
185 | cfg = &pci_mmcfg_config[0]; | 323 | cfg = &pci_mmcfg_config[0]; |
186 | 324 | ||
187 | /* | 325 | for (i = 0; i < pci_mmcfg_config_num; i++) { |
188 | * Handle more broken MCFG tables on Asus etc. | 326 | int valid = 0; |
189 | * They only contain a single entry for bus 0-0. | 327 | u32 size = (cfg->end_bus_number + 1) << 20; |
190 | */ | 328 | cfg = &pci_mmcfg_config[i]; |
191 | if (pci_mmcfg_config_num == 1 && | 329 | printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx " |
192 | cfg->pci_segment == 0 && | 330 | "segment %hu buses %u - %u\n", |
193 | (cfg->start_bus_number | cfg->end_bus_number) == 0) { | 331 | i, (unsigned long)cfg->address, cfg->pci_segment, |
194 | printk(KERN_ERR "PCI: start and end of bus number is 0. " | 332 | (unsigned int)cfg->start_bus_number, |
195 | "Rejected as broken MCFG.\n"); | 333 | (unsigned int)cfg->end_bus_number); |
196 | goto reject; | 334 | |
335 | if (!early && | ||
336 | is_acpi_reserved(cfg->address, cfg->address + size - 1)) { | ||
337 | printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved " | ||
338 | "in ACPI motherboard resources\n", | ||
339 | cfg->address); | ||
340 | valid = 1; | ||
341 | } | ||
342 | |||
343 | if (valid) | ||
344 | continue; | ||
345 | |||
346 | if (!early) | ||
347 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not" | ||
348 | " reserved in ACPI motherboard resources\n", | ||
349 | cfg->address); | ||
350 | /* Don't try to do this check unless configuration | ||
351 | type 1 is available. how about type 2 ?*/ | ||
352 | if (raw_pci_ops && e820_all_mapped(cfg->address, | ||
353 | cfg->address + size - 1, | ||
354 | E820_RESERVED)) { | ||
355 | printk(KERN_NOTICE | ||
356 | "PCI: MCFG area at %Lx reserved in E820\n", | ||
357 | cfg->address); | ||
358 | valid = 1; | ||
359 | } | ||
360 | |||
361 | if (!valid) | ||
362 | goto reject; | ||
197 | } | 363 | } |
198 | 364 | ||
199 | /* | ||
200 | * Only do this check when type 1 works. If it doesn't work | ||
201 | * assume we run on a Mac and always use MCFG | ||
202 | */ | ||
203 | if (type == 1 && !e820_all_mapped(cfg->address, | ||
204 | cfg->address + MMCONFIG_APER_MIN, | ||
205 | E820_RESERVED)) { | ||
206 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not" | ||
207 | " E820-reserved\n", cfg->address); | ||
208 | goto reject; | ||
209 | } | ||
210 | return; | 365 | return; |
211 | 366 | ||
212 | reject: | 367 | reject: |
213 | printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); | 368 | printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); |
369 | pci_mmcfg_arch_free(); | ||
214 | kfree(pci_mmcfg_config); | 370 | kfree(pci_mmcfg_config); |
215 | pci_mmcfg_config = NULL; | 371 | pci_mmcfg_config = NULL; |
216 | pci_mmcfg_config_num = 0; | 372 | pci_mmcfg_config_num = 0; |
217 | } | 373 | } |
218 | 374 | ||
219 | void __init pci_mmcfg_init(int type) | 375 | static int __initdata known_bridge; |
220 | { | ||
221 | int known_bridge = 0; | ||
222 | 376 | ||
377 | void __init __pci_mmcfg_init(int early) | ||
378 | { | ||
379 | /* MMCONFIG disabled */ | ||
223 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) | 380 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) |
224 | return; | 381 | return; |
225 | 382 | ||
226 | if (type == 1 && pci_mmcfg_check_hostbridge()) | 383 | /* MMCONFIG already enabled */ |
227 | known_bridge = 1; | 384 | if (!early && !(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF)) |
385 | return; | ||
386 | |||
387 | /* for late to exit */ | ||
388 | if (known_bridge) | ||
389 | return; | ||
390 | |||
391 | if (early) { | ||
392 | if (pci_mmcfg_check_hostbridge()) | ||
393 | known_bridge = 1; | ||
394 | } | ||
228 | 395 | ||
229 | if (!known_bridge) { | 396 | if (!known_bridge) { |
230 | acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg); | 397 | acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg); |
231 | pci_mmcfg_reject_broken(type); | 398 | pci_mmcfg_reject_broken(early); |
232 | } | 399 | } |
233 | 400 | ||
234 | if ((pci_mmcfg_config_num == 0) || | 401 | if ((pci_mmcfg_config_num == 0) || |
@@ -249,6 +416,16 @@ void __init pci_mmcfg_init(int type) | |||
249 | } | 416 | } |
250 | } | 417 | } |
251 | 418 | ||
419 | void __init pci_mmcfg_early_init(void) | ||
420 | { | ||
421 | __pci_mmcfg_init(1); | ||
422 | } | ||
423 | |||
424 | void __init pci_mmcfg_late_init(void) | ||
425 | { | ||
426 | __pci_mmcfg_init(0); | ||
427 | } | ||
428 | |||
252 | static int __init pci_mmcfg_late_insert_resources(void) | 429 | static int __init pci_mmcfg_late_insert_resources(void) |
253 | { | 430 | { |
254 | /* | 431 | /* |
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c index 081816ada057..f3c761dce695 100644 --- a/arch/x86/pci/mmconfig_32.c +++ b/arch/x86/pci/mmconfig_32.c | |||
@@ -136,3 +136,7 @@ int __init pci_mmcfg_arch_init(void) | |||
136 | raw_pci_ext_ops = &pci_mmcfg; | 136 | raw_pci_ext_ops = &pci_mmcfg; |
137 | return 1; | 137 | return 1; |
138 | } | 138 | } |
139 | |||
140 | void __init pci_mmcfg_arch_free(void) | ||
141 | { | ||
142 | } | ||
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c index 9207fd49233c..a1994163c99d 100644 --- a/arch/x86/pci/mmconfig_64.c +++ b/arch/x86/pci/mmconfig_64.c | |||
@@ -127,7 +127,7 @@ static void __iomem * __init mcfg_ioremap(struct acpi_mcfg_allocation *cfg) | |||
127 | int __init pci_mmcfg_arch_init(void) | 127 | int __init pci_mmcfg_arch_init(void) |
128 | { | 128 | { |
129 | int i; | 129 | int i; |
130 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * | 130 | pci_mmcfg_virt = kzalloc(sizeof(*pci_mmcfg_virt) * |
131 | pci_mmcfg_config_num, GFP_KERNEL); | 131 | pci_mmcfg_config_num, GFP_KERNEL); |
132 | if (pci_mmcfg_virt == NULL) { | 132 | if (pci_mmcfg_virt == NULL) { |
133 | printk(KERN_ERR "PCI: Can not allocate memory for mmconfig structures\n"); | 133 | printk(KERN_ERR "PCI: Can not allocate memory for mmconfig structures\n"); |
@@ -141,9 +141,29 @@ int __init pci_mmcfg_arch_init(void) | |||
141 | printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " | 141 | printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " |
142 | "segment %d\n", | 142 | "segment %d\n", |
143 | pci_mmcfg_config[i].pci_segment); | 143 | pci_mmcfg_config[i].pci_segment); |
144 | pci_mmcfg_arch_free(); | ||
144 | return 0; | 145 | return 0; |
145 | } | 146 | } |
146 | } | 147 | } |
147 | raw_pci_ext_ops = &pci_mmcfg; | 148 | raw_pci_ext_ops = &pci_mmcfg; |
148 | return 1; | 149 | return 1; |
149 | } | 150 | } |
151 | |||
152 | void __init pci_mmcfg_arch_free(void) | ||
153 | { | ||
154 | int i; | ||
155 | |||
156 | if (pci_mmcfg_virt == NULL) | ||
157 | return; | ||
158 | |||
159 | for (i = 0; i < pci_mmcfg_config_num; ++i) { | ||
160 | if (pci_mmcfg_virt[i].virt) { | ||
161 | iounmap(pci_mmcfg_virt[i].virt); | ||
162 | pci_mmcfg_virt[i].virt = NULL; | ||
163 | pci_mmcfg_virt[i].cfg = NULL; | ||
164 | } | ||
165 | } | ||
166 | |||
167 | kfree(pci_mmcfg_virt); | ||
168 | pci_mmcfg_virt = NULL; | ||
169 | } | ||
diff --git a/arch/x86/pci/mp_bus_to_node.c b/arch/x86/pci/mp_bus_to_node.c new file mode 100644 index 000000000000..022943999b84 --- /dev/null +++ b/arch/x86/pci/mp_bus_to_node.c | |||
@@ -0,0 +1,23 @@ | |||
1 | #include <linux/pci.h> | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/topology.h> | ||
4 | |||
5 | #define BUS_NR 256 | ||
6 | |||
7 | static unsigned char mp_bus_to_node[BUS_NR]; | ||
8 | |||
9 | void set_mp_bus_to_node(int busnum, int node) | ||
10 | { | ||
11 | if (busnum >= 0 && busnum < BUS_NR) | ||
12 | mp_bus_to_node[busnum] = (unsigned char) node; | ||
13 | } | ||
14 | |||
15 | int get_mp_bus_to_node(int busnum) | ||
16 | { | ||
17 | int node; | ||
18 | |||
19 | if (busnum < 0 || busnum > (BUS_NR - 1)) | ||
20 | return 0; | ||
21 | node = mp_bus_to_node[busnum]; | ||
22 | return node; | ||
23 | } | ||
diff --git a/arch/x86/pci/olpc.c b/arch/x86/pci/olpc.c new file mode 100644 index 000000000000..5e7636558c02 --- /dev/null +++ b/arch/x86/pci/olpc.c | |||
@@ -0,0 +1,313 @@ | |||
1 | /* | ||
2 | * Low-level PCI config space access for OLPC systems who lack the VSA | ||
3 | * PCI virtualization software. | ||
4 | * | ||
5 | * Copyright © 2006 Advanced Micro Devices, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * The AMD Geode chipset (ie: GX2 processor, cs5536 I/O companion device) | ||
13 | * has some I/O functions (display, southbridge, sound, USB HCIs, etc) | ||
14 | * that more or less behave like PCI devices, but the hardware doesn't | ||
15 | * directly implement the PCI configuration space headers. AMD provides | ||
16 | * "VSA" (Virtual System Architecture) software that emulates PCI config | ||
17 | * space for these devices, by trapping I/O accesses to PCI config register | ||
18 | * (CF8/CFC) and running some code in System Management Mode interrupt state. | ||
19 | * On the OLPC platform, we don't want to use that VSA code because | ||
20 | * (a) it slows down suspend/resume, and (b) recompiling it requires special | ||
21 | * compilers that are hard to get. So instead of letting the complex VSA | ||
22 | * code simulate the PCI config registers for the on-chip devices, we | ||
23 | * just simulate them the easy way, by inserting the code into the | ||
24 | * pci_write_config and pci_read_config path. Most of the config registers | ||
25 | * are read-only anyway, so the bulk of the simulation is just table lookup. | ||
26 | */ | ||
27 | |||
28 | #include <linux/pci.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <asm/olpc.h> | ||
31 | #include <asm/geode.h> | ||
32 | #include "pci.h" | ||
33 | |||
34 | /* | ||
35 | * In the tables below, the first two line (8 longwords) are the | ||
36 | * size masks that are used when the higher level PCI code determines | ||
37 | * the size of the region by writing ~0 to a base address register | ||
38 | * and reading back the result. | ||
39 | * | ||
40 | * The following lines are the values that are read during normal | ||
41 | * PCI config access cycles, i.e. not after just having written | ||
42 | * ~0 to a base address register. | ||
43 | */ | ||
44 | |||
45 | static const uint32_t lxnb_hdr[] = { /* dev 1 function 0 - devfn = 8 */ | ||
46 | 0x0, 0x0, 0x0, 0x0, | ||
47 | 0x0, 0x0, 0x0, 0x0, | ||
48 | |||
49 | 0x281022, 0x2200005, 0x6000021, 0x80f808, /* AMD Vendor ID */ | ||
50 | 0x0, 0x0, 0x0, 0x0, /* No virtual registers, hence no BAR */ | ||
51 | 0x0, 0x0, 0x0, 0x28100b, | ||
52 | 0x0, 0x0, 0x0, 0x0, | ||
53 | 0x0, 0x0, 0x0, 0x0, | ||
54 | 0x0, 0x0, 0x0, 0x0, | ||
55 | 0x0, 0x0, 0x0, 0x0, | ||
56 | }; | ||
57 | |||
58 | static const uint32_t gxnb_hdr[] = { /* dev 1 function 0 - devfn = 8 */ | ||
59 | 0xfffffffd, 0x0, 0x0, 0x0, | ||
60 | 0x0, 0x0, 0x0, 0x0, | ||
61 | |||
62 | 0x28100b, 0x2200005, 0x6000021, 0x80f808, /* NSC Vendor ID */ | ||
63 | 0xac1d, 0x0, 0x0, 0x0, /* I/O BAR - base of virtual registers */ | ||
64 | 0x0, 0x0, 0x0, 0x28100b, | ||
65 | 0x0, 0x0, 0x0, 0x0, | ||
66 | 0x0, 0x0, 0x0, 0x0, | ||
67 | 0x0, 0x0, 0x0, 0x0, | ||
68 | 0x0, 0x0, 0x0, 0x0, | ||
69 | }; | ||
70 | |||
71 | static const uint32_t lxfb_hdr[] = { /* dev 1 function 1 - devfn = 9 */ | ||
72 | 0xff000008, 0xffffc000, 0xffffc000, 0xffffc000, | ||
73 | 0xffffc000, 0x0, 0x0, 0x0, | ||
74 | |||
75 | 0x20811022, 0x2200003, 0x3000000, 0x0, /* AMD Vendor ID */ | ||
76 | 0xfd000000, 0xfe000000, 0xfe004000, 0xfe008000, /* FB, GP, VG, DF */ | ||
77 | 0xfe00c000, 0x0, 0x0, 0x30100b, /* VIP */ | ||
78 | 0x0, 0x0, 0x0, 0x10e, /* INTA, IRQ14 for graphics accel */ | ||
79 | 0x0, 0x0, 0x0, 0x0, | ||
80 | 0x3d0, 0x3c0, 0xa0000, 0x0, /* VG IO, VG IO, EGA FB, MONO FB */ | ||
81 | 0x0, 0x0, 0x0, 0x0, | ||
82 | }; | ||
83 | |||
84 | static const uint32_t gxfb_hdr[] = { /* dev 1 function 1 - devfn = 9 */ | ||
85 | 0xff800008, 0xffffc000, 0xffffc000, 0xffffc000, | ||
86 | 0x0, 0x0, 0x0, 0x0, | ||
87 | |||
88 | 0x30100b, 0x2200003, 0x3000000, 0x0, /* NSC Vendor ID */ | ||
89 | 0xfd000000, 0xfe000000, 0xfe004000, 0xfe008000, /* FB, GP, VG, DF */ | ||
90 | 0x0, 0x0, 0x0, 0x30100b, | ||
91 | 0x0, 0x0, 0x0, 0x0, | ||
92 | 0x0, 0x0, 0x0, 0x0, | ||
93 | 0x3d0, 0x3c0, 0xa0000, 0x0, /* VG IO, VG IO, EGA FB, MONO FB */ | ||
94 | 0x0, 0x0, 0x0, 0x0, | ||
95 | }; | ||
96 | |||
97 | static const uint32_t aes_hdr[] = { /* dev 1 function 2 - devfn = 0xa */ | ||
98 | 0xffffc000, 0x0, 0x0, 0x0, | ||
99 | 0x0, 0x0, 0x0, 0x0, | ||
100 | |||
101 | 0x20821022, 0x2a00006, 0x10100000, 0x8, /* NSC Vendor ID */ | ||
102 | 0xfe010000, 0x0, 0x0, 0x0, /* AES registers */ | ||
103 | 0x0, 0x0, 0x0, 0x20821022, | ||
104 | 0x0, 0x0, 0x0, 0x0, | ||
105 | 0x0, 0x0, 0x0, 0x0, | ||
106 | 0x0, 0x0, 0x0, 0x0, | ||
107 | 0x0, 0x0, 0x0, 0x0, | ||
108 | }; | ||
109 | |||
110 | |||
111 | static const uint32_t isa_hdr[] = { /* dev f function 0 - devfn = 78 */ | ||
112 | 0xfffffff9, 0xffffff01, 0xffffffc1, 0xffffffe1, | ||
113 | 0xffffff81, 0xffffffc1, 0x0, 0x0, | ||
114 | |||
115 | 0x20901022, 0x2a00049, 0x6010003, 0x802000, | ||
116 | 0x18b1, 0x1001, 0x1801, 0x1881, /* SMB-8 GPIO-256 MFGPT-64 IRQ-32 */ | ||
117 | 0x1401, 0x1841, 0x0, 0x20901022, /* PMS-128 ACPI-64 */ | ||
118 | 0x0, 0x0, 0x0, 0x0, | ||
119 | 0x0, 0x0, 0x0, 0x0, | ||
120 | 0x0, 0x0, 0x0, 0xaa5b, /* IRQ steering */ | ||
121 | 0x0, 0x0, 0x0, 0x0, | ||
122 | }; | ||
123 | |||
124 | static const uint32_t ac97_hdr[] = { /* dev f function 3 - devfn = 7b */ | ||
125 | 0xffffff81, 0x0, 0x0, 0x0, | ||
126 | 0x0, 0x0, 0x0, 0x0, | ||
127 | |||
128 | 0x20931022, 0x2a00041, 0x4010001, 0x0, | ||
129 | 0x1481, 0x0, 0x0, 0x0, /* I/O BAR-128 */ | ||
130 | 0x0, 0x0, 0x0, 0x20931022, | ||
131 | 0x0, 0x0, 0x0, 0x205, /* IntB, IRQ5 */ | ||
132 | 0x0, 0x0, 0x0, 0x0, | ||
133 | 0x0, 0x0, 0x0, 0x0, | ||
134 | 0x0, 0x0, 0x0, 0x0, | ||
135 | }; | ||
136 | |||
137 | static const uint32_t ohci_hdr[] = { /* dev f function 4 - devfn = 7c */ | ||
138 | 0xfffff000, 0x0, 0x0, 0x0, | ||
139 | 0x0, 0x0, 0x0, 0x0, | ||
140 | |||
141 | 0x20941022, 0x2300006, 0xc031002, 0x0, | ||
142 | 0xfe01a000, 0x0, 0x0, 0x0, /* MEMBAR-1000 */ | ||
143 | 0x0, 0x0, 0x0, 0x20941022, | ||
144 | 0x0, 0x40, 0x0, 0x40a, /* CapPtr INT-D, IRQA */ | ||
145 | 0xc8020001, 0x0, 0x0, 0x0, /* Capabilities - 40 is R/O, | ||
146 | 44 is mask 8103 (power control) */ | ||
147 | 0x0, 0x0, 0x0, 0x0, | ||
148 | 0x0, 0x0, 0x0, 0x0, | ||
149 | }; | ||
150 | |||
151 | static const uint32_t ehci_hdr[] = { /* dev f function 4 - devfn = 7d */ | ||
152 | 0xfffff000, 0x0, 0x0, 0x0, | ||
153 | 0x0, 0x0, 0x0, 0x0, | ||
154 | |||
155 | 0x20951022, 0x2300006, 0xc032002, 0x0, | ||
156 | 0xfe01b000, 0x0, 0x0, 0x0, /* MEMBAR-1000 */ | ||
157 | 0x0, 0x0, 0x0, 0x20951022, | ||
158 | 0x0, 0x40, 0x0, 0x40a, /* CapPtr INT-D, IRQA */ | ||
159 | 0xc8020001, 0x0, 0x0, 0x0, /* Capabilities - 40 is R/O, 44 is | ||
160 | mask 8103 (power control) */ | ||
161 | #if 0 | ||
162 | 0x1, 0x40080000, 0x0, 0x0, /* EECP - see EHCI spec section 2.1.7 */ | ||
163 | #endif | ||
164 | 0x01000001, 0x0, 0x0, 0x0, /* EECP - see EHCI spec section 2.1.7 */ | ||
165 | 0x2020, 0x0, 0x0, 0x0, /* (EHCI page 8) 60 SBRN (R/O), | ||
166 | 61 FLADJ (R/W), PORTWAKECAP */ | ||
167 | }; | ||
168 | |||
169 | static uint32_t ff_loc = ~0; | ||
170 | static uint32_t zero_loc; | ||
171 | static int bar_probing; /* Set after a write of ~0 to a BAR */ | ||
172 | static int is_lx; | ||
173 | |||
174 | #define NB_SLOT 0x1 /* Northbridge - GX chip - Device 1 */ | ||
175 | #define SB_SLOT 0xf /* Southbridge - CS5536 chip - Device F */ | ||
176 | |||
177 | static int is_simulated(unsigned int bus, unsigned int devfn) | ||
178 | { | ||
179 | return (!bus && ((PCI_SLOT(devfn) == NB_SLOT) || | ||
180 | (PCI_SLOT(devfn) == SB_SLOT))); | ||
181 | } | ||
182 | |||
183 | static uint32_t *hdr_addr(const uint32_t *hdr, int reg) | ||
184 | { | ||
185 | uint32_t addr; | ||
186 | |||
187 | /* | ||
188 | * This is a little bit tricky. The header maps consist of | ||
189 | * 0x20 bytes of size masks, followed by 0x70 bytes of header data. | ||
190 | * In the normal case, when not probing a BAR's size, we want | ||
191 | * to access the header data, so we add 0x20 to the reg offset, | ||
192 | * thus skipping the size mask area. | ||
193 | * In the BAR probing case, we want to access the size mask for | ||
194 | * the BAR, so we subtract 0x10 (the config header offset for | ||
195 | * BAR0), and don't skip the size mask area. | ||
196 | */ | ||
197 | |||
198 | addr = (uint32_t)hdr + reg + (bar_probing ? -0x10 : 0x20); | ||
199 | |||
200 | bar_probing = 0; | ||
201 | return (uint32_t *)addr; | ||
202 | } | ||
203 | |||
204 | static int pci_olpc_read(unsigned int seg, unsigned int bus, | ||
205 | unsigned int devfn, int reg, int len, uint32_t *value) | ||
206 | { | ||
207 | uint32_t *addr; | ||
208 | |||
209 | /* Use the hardware mechanism for non-simulated devices */ | ||
210 | if (!is_simulated(bus, devfn)) | ||
211 | return pci_direct_conf1.read(seg, bus, devfn, reg, len, value); | ||
212 | |||
213 | /* | ||
214 | * No device has config registers past 0x70, so we save table space | ||
215 | * by not storing entries for the nonexistent registers | ||
216 | */ | ||
217 | if (reg >= 0x70) | ||
218 | addr = &zero_loc; | ||
219 | else { | ||
220 | switch (devfn) { | ||
221 | case 0x8: | ||
222 | addr = hdr_addr(is_lx ? lxnb_hdr : gxnb_hdr, reg); | ||
223 | break; | ||
224 | case 0x9: | ||
225 | addr = hdr_addr(is_lx ? lxfb_hdr : gxfb_hdr, reg); | ||
226 | break; | ||
227 | case 0xa: | ||
228 | addr = is_lx ? hdr_addr(aes_hdr, reg) : &ff_loc; | ||
229 | break; | ||
230 | case 0x78: | ||
231 | addr = hdr_addr(isa_hdr, reg); | ||
232 | break; | ||
233 | case 0x7b: | ||
234 | addr = hdr_addr(ac97_hdr, reg); | ||
235 | break; | ||
236 | case 0x7c: | ||
237 | addr = hdr_addr(ohci_hdr, reg); | ||
238 | break; | ||
239 | case 0x7d: | ||
240 | addr = hdr_addr(ehci_hdr, reg); | ||
241 | break; | ||
242 | default: | ||
243 | addr = &ff_loc; | ||
244 | break; | ||
245 | } | ||
246 | } | ||
247 | switch (len) { | ||
248 | case 1: | ||
249 | *value = *(uint8_t *)addr; | ||
250 | break; | ||
251 | case 2: | ||
252 | *value = *(uint16_t *)addr; | ||
253 | break; | ||
254 | case 4: | ||
255 | *value = *addr; | ||
256 | break; | ||
257 | default: | ||
258 | BUG(); | ||
259 | } | ||
260 | |||
261 | return 0; | ||
262 | } | ||
263 | |||
264 | static int pci_olpc_write(unsigned int seg, unsigned int bus, | ||
265 | unsigned int devfn, int reg, int len, uint32_t value) | ||
266 | { | ||
267 | /* Use the hardware mechanism for non-simulated devices */ | ||
268 | if (!is_simulated(bus, devfn)) | ||
269 | return pci_direct_conf1.write(seg, bus, devfn, reg, len, value); | ||
270 | |||
271 | /* XXX we may want to extend this to simulate EHCI power management */ | ||
272 | |||
273 | /* | ||
274 | * Mostly we just discard writes, but if the write is a size probe | ||
275 | * (i.e. writing ~0 to a BAR), we remember it and arrange to return | ||
276 | * the appropriate size mask on the next read. This is cheating | ||
277 | * to some extent, because it depends on the fact that the next | ||
278 | * access after such a write will always be a read to the same BAR. | ||
279 | */ | ||
280 | |||
281 | if ((reg >= 0x10) && (reg < 0x2c)) { | ||
282 | /* write is to a BAR */ | ||
283 | if (value == ~0) | ||
284 | bar_probing = 1; | ||
285 | } else { | ||
286 | /* | ||
287 | * No warning on writes to ROM BAR, CMD, LATENCY_TIMER, | ||
288 | * CACHE_LINE_SIZE, or PM registers. | ||
289 | */ | ||
290 | if ((reg != PCI_ROM_ADDRESS) && (reg != PCI_COMMAND_MASTER) && | ||
291 | (reg != PCI_LATENCY_TIMER) && | ||
292 | (reg != PCI_CACHE_LINE_SIZE) && (reg != 0x44)) | ||
293 | printk(KERN_WARNING "OLPC PCI: Config write to devfn" | ||
294 | " %x reg %x value %x\n", devfn, reg, value); | ||
295 | } | ||
296 | |||
297 | return 0; | ||
298 | } | ||
299 | |||
300 | static struct pci_raw_ops pci_olpc_conf = { | ||
301 | .read = pci_olpc_read, | ||
302 | .write = pci_olpc_write, | ||
303 | }; | ||
304 | |||
305 | void __init pci_olpc_init(void) | ||
306 | { | ||
307 | if (!machine_is_olpc() || olpc_has_vsa()) | ||
308 | return; | ||
309 | |||
310 | printk(KERN_INFO "PCI: Using configuration type OLPC\n"); | ||
311 | raw_pci_ops = &pci_olpc_conf; | ||
312 | is_lx = is_geode_lx(); | ||
313 | } | ||
diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h index c4bddaeff619..c58805a92db5 100644 --- a/arch/x86/pci/pci.h +++ b/arch/x86/pci/pci.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define PCI_ASSIGN_ALL_BUSSES 0x4000 | 26 | #define PCI_ASSIGN_ALL_BUSSES 0x4000 |
27 | #define PCI_CAN_SKIP_ISA_ALIGN 0x8000 | 27 | #define PCI_CAN_SKIP_ISA_ALIGN 0x8000 |
28 | #define PCI_USE__CRS 0x10000 | 28 | #define PCI_USE__CRS 0x10000 |
29 | #define PCI_CHECK_ENABLE_AMD_MMCONF 0x20000 | ||
29 | 30 | ||
30 | extern unsigned int pci_probe; | 31 | extern unsigned int pci_probe; |
31 | extern unsigned long pirq_table_addr; | 32 | extern unsigned long pirq_table_addr; |
@@ -97,11 +98,12 @@ extern struct pci_raw_ops pci_direct_conf1; | |||
97 | extern int pci_direct_probe(void); | 98 | extern int pci_direct_probe(void); |
98 | extern void pci_direct_init(int type); | 99 | extern void pci_direct_init(int type); |
99 | extern void pci_pcbios_init(void); | 100 | extern void pci_pcbios_init(void); |
100 | extern void pci_mmcfg_init(int type); | 101 | extern void pci_olpc_init(void); |
101 | 102 | ||
102 | /* pci-mmconfig.c */ | 103 | /* pci-mmconfig.c */ |
103 | 104 | ||
104 | extern int __init pci_mmcfg_arch_init(void); | 105 | extern int __init pci_mmcfg_arch_init(void); |
106 | extern void __init pci_mmcfg_arch_free(void); | ||
105 | 107 | ||
106 | /* | 108 | /* |
107 | * AMD Fam10h CPUs are buggy, and cannot access MMIO config space | 109 | * AMD Fam10h CPUs are buggy, and cannot access MMIO config space |
diff --git a/arch/x86/vdso/vdso.S b/arch/x86/vdso/vdso.S index 4b1620a1529e..1d3aa6b87181 100644 --- a/arch/x86/vdso/vdso.S +++ b/arch/x86/vdso/vdso.S | |||
@@ -1,2 +1,10 @@ | |||
1 | .section ".vdso","a" | 1 | #include <linux/init.h> |
2 | |||
3 | __INITDATA | ||
4 | |||
5 | .globl vdso_start, vdso_end | ||
6 | vdso_start: | ||
2 | .incbin "arch/x86/vdso/vdso.so" | 7 | .incbin "arch/x86/vdso/vdso.so" |
8 | vdso_end: | ||
9 | |||
10 | __FINIT | ||
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c index e2af8eee80e3..4dceeb1fc5e0 100644 --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c | |||
@@ -303,8 +303,6 @@ int __init sysenter_setup(void) | |||
303 | 303 | ||
304 | #ifdef CONFIG_X86_32 | 304 | #ifdef CONFIG_X86_32 |
305 | gate_vma_init(); | 305 | gate_vma_init(); |
306 | |||
307 | printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO)); | ||
308 | #endif | 306 | #endif |
309 | 307 | ||
310 | if (!vdso32_sysenter()) { | 308 | if (!vdso32_sysenter()) { |
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index ef63adadf7f4..070ff8af3a21 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c | |||
@@ -19,12 +19,11 @@ | |||
19 | #include <linux/thread_info.h> | 19 | #include <linux/thread_info.h> |
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/kbuild.h> | ||
22 | 23 | ||
23 | #include <asm/ptrace.h> | 24 | #include <asm/ptrace.h> |
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | 26 | ||
26 | #define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
27 | |||
28 | int main(void) | 27 | int main(void) |
29 | { | 28 | { |
30 | /* struct pt_regs */ | 29 | /* struct pt_regs */ |