diff options
author | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
commit | c4366889dda8110247be59ca41fddb82951a8c26 (patch) | |
tree | 705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /arch/sparc64 | |
parent | db2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff) | |
parent | e1036502e5263851259d147771226161e5ccc85a (diff) |
Merge ../linus
Conflicts:
drivers/cpufreq/cpufreq.c
Diffstat (limited to 'arch/sparc64')
40 files changed, 449 insertions, 242 deletions
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index b627f8dbcaad..d41f66ac7fff 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -26,6 +26,14 @@ config MMU | |||
26 | bool | 26 | bool |
27 | default y | 27 | default y |
28 | 28 | ||
29 | config STACKTRACE_SUPPORT | ||
30 | bool | ||
31 | default y | ||
32 | |||
33 | config LOCKDEP_SUPPORT | ||
34 | bool | ||
35 | default y | ||
36 | |||
29 | config TIME_INTERPOLATION | 37 | config TIME_INTERPOLATION |
30 | bool | 38 | bool |
31 | default y | 39 | default y |
@@ -34,6 +42,14 @@ config ARCH_MAY_HAVE_PC_FDC | |||
34 | bool | 42 | bool |
35 | default y | 43 | default y |
36 | 44 | ||
45 | config ARCH_HAS_ILOG2_U32 | ||
46 | bool | ||
47 | default n | ||
48 | |||
49 | config ARCH_HAS_ILOG2_U64 | ||
50 | bool | ||
51 | default n | ||
52 | |||
37 | config AUDIT_ARCH | 53 | config AUDIT_ARCH |
38 | bool | 54 | bool |
39 | default y | 55 | default y |
diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index afe0a7720a26..1f130f3b6c24 100644 --- a/arch/sparc64/Kconfig.debug +++ b/arch/sparc64/Kconfig.debug | |||
@@ -1,5 +1,9 @@ | |||
1 | menu "Kernel hacking" | 1 | menu "Kernel hacking" |
2 | 2 | ||
3 | config TRACE_IRQFLAGS_SUPPORT | ||
4 | bool | ||
5 | default y | ||
6 | |||
3 | source "lib/Kconfig.debug" | 7 | source "lib/Kconfig.debug" |
4 | 8 | ||
5 | config DEBUG_STACK_USAGE | 9 | config DEBUG_STACK_USAGE |
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index dcae559879ae..0f0d38f6197c 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
@@ -1,24 +1,29 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-rc1 | 3 | # Linux kernel version: 2.6.19 |
4 | # Thu Oct 5 02:08:41 2006 | 4 | # Sat Dec 9 15:41:30 2006 |
5 | # | 5 | # |
6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
8 | CONFIG_64BIT=y | 8 | CONFIG_64BIT=y |
9 | CONFIG_MMU=y | 9 | CONFIG_MMU=y |
10 | CONFIG_STACKTRACE_SUPPORT=y | ||
11 | CONFIG_LOCKDEP_SUPPORT=y | ||
10 | CONFIG_TIME_INTERPOLATION=y | 12 | CONFIG_TIME_INTERPOLATION=y |
11 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 13 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
14 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
15 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
12 | CONFIG_AUDIT_ARCH=y | 16 | CONFIG_AUDIT_ARCH=y |
13 | CONFIG_SPARC64_PAGE_SIZE_8KB=y | 17 | CONFIG_SPARC64_PAGE_SIZE_8KB=y |
14 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set | 18 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set |
15 | # CONFIG_SPARC64_PAGE_SIZE_512KB is not set | 19 | # CONFIG_SPARC64_PAGE_SIZE_512KB is not set |
16 | # CONFIG_SPARC64_PAGE_SIZE_4MB is not set | 20 | # CONFIG_SPARC64_PAGE_SIZE_4MB is not set |
17 | CONFIG_SECCOMP=y | 21 | CONFIG_SECCOMP=y |
18 | # CONFIG_HZ_100 is not set | 22 | CONFIG_HZ_100=y |
19 | CONFIG_HZ_250=y | 23 | # CONFIG_HZ_250 is not set |
24 | # CONFIG_HZ_300 is not set | ||
20 | # CONFIG_HZ_1000 is not set | 25 | # CONFIG_HZ_1000 is not set |
21 | CONFIG_HZ=250 | 26 | CONFIG_HZ=100 |
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 28 | ||
24 | # | 29 | # |
@@ -42,13 +47,14 @@ CONFIG_POSIX_MQUEUE=y | |||
42 | # CONFIG_UTS_NS is not set | 47 | # CONFIG_UTS_NS is not set |
43 | # CONFIG_AUDIT is not set | 48 | # CONFIG_AUDIT is not set |
44 | # CONFIG_IKCONFIG is not set | 49 | # CONFIG_IKCONFIG is not set |
50 | CONFIG_SYSFS_DEPRECATED=y | ||
45 | CONFIG_RELAY=y | 51 | CONFIG_RELAY=y |
46 | CONFIG_INITRAMFS_SOURCE="" | 52 | CONFIG_INITRAMFS_SOURCE="" |
47 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 53 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
48 | CONFIG_SYSCTL=y | 54 | CONFIG_SYSCTL=y |
49 | # CONFIG_EMBEDDED is not set | 55 | # CONFIG_EMBEDDED is not set |
50 | CONFIG_UID16=y | 56 | CONFIG_UID16=y |
51 | # CONFIG_SYSCTL_SYSCALL is not set | 57 | CONFIG_SYSCTL_SYSCALL=y |
52 | CONFIG_KALLSYMS=y | 58 | CONFIG_KALLSYMS=y |
53 | # CONFIG_KALLSYMS_ALL is not set | 59 | # CONFIG_KALLSYMS_ALL is not set |
54 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 60 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -203,6 +209,7 @@ CONFIG_INET_TCP_DIAG=y | |||
203 | # CONFIG_TCP_CONG_ADVANCED is not set | 209 | # CONFIG_TCP_CONG_ADVANCED is not set |
204 | CONFIG_TCP_CONG_CUBIC=y | 210 | CONFIG_TCP_CONG_CUBIC=y |
205 | CONFIG_DEFAULT_TCP_CONG="cubic" | 211 | CONFIG_DEFAULT_TCP_CONG="cubic" |
212 | # CONFIG_TCP_MD5SIG is not set | ||
206 | CONFIG_IPV6=m | 213 | CONFIG_IPV6=m |
207 | CONFIG_IPV6_PRIVACY=y | 214 | CONFIG_IPV6_PRIVACY=y |
208 | CONFIG_IPV6_ROUTER_PREF=y | 215 | CONFIG_IPV6_ROUTER_PREF=y |
@@ -217,8 +224,8 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m | |||
217 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | 224 | CONFIG_INET6_XFRM_MODE_TUNNEL=m |
218 | CONFIG_INET6_XFRM_MODE_BEET=m | 225 | CONFIG_INET6_XFRM_MODE_BEET=m |
219 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 226 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
227 | CONFIG_IPV6_SIT=m | ||
220 | CONFIG_IPV6_TUNNEL=m | 228 | CONFIG_IPV6_TUNNEL=m |
221 | # CONFIG_IPV6_SUBTREES is not set | ||
222 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 229 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
223 | # CONFIG_NETWORK_SECMARK is not set | 230 | # CONFIG_NETWORK_SECMARK is not set |
224 | # CONFIG_NETFILTER is not set | 231 | # CONFIG_NETFILTER is not set |
@@ -237,6 +244,8 @@ CONFIG_IP_DCCP_CCID2=m | |||
237 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set | 244 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set |
238 | CONFIG_IP_DCCP_CCID3=m | 245 | CONFIG_IP_DCCP_CCID3=m |
239 | CONFIG_IP_DCCP_TFRC_LIB=m | 246 | CONFIG_IP_DCCP_TFRC_LIB=m |
247 | # CONFIG_IP_DCCP_CCID3_DEBUG is not set | ||
248 | CONFIG_IP_DCCP_CCID3_RTO=100 | ||
240 | 249 | ||
241 | # | 250 | # |
242 | # DCCP Kernel Hacking | 251 | # DCCP Kernel Hacking |
@@ -334,6 +343,12 @@ CONFIG_CDROM_PKTCDVD_WCACHE=y | |||
334 | CONFIG_ATA_OVER_ETH=m | 343 | CONFIG_ATA_OVER_ETH=m |
335 | 344 | ||
336 | # | 345 | # |
346 | # Misc devices | ||
347 | # | ||
348 | # CONFIG_SGI_IOC4 is not set | ||
349 | # CONFIG_TIFM_CORE is not set | ||
350 | |||
351 | # | ||
337 | # ATA/ATAPI/MFM/RLL support | 352 | # ATA/ATAPI/MFM/RLL support |
338 | # | 353 | # |
339 | CONFIG_IDE=y | 354 | CONFIG_IDE=y |
@@ -398,6 +413,7 @@ CONFIG_IDEDMA_AUTO=y | |||
398 | # | 413 | # |
399 | CONFIG_RAID_ATTRS=m | 414 | CONFIG_RAID_ATTRS=m |
400 | CONFIG_SCSI=y | 415 | CONFIG_SCSI=y |
416 | # CONFIG_SCSI_TGT is not set | ||
401 | CONFIG_SCSI_NETLINK=y | 417 | CONFIG_SCSI_NETLINK=y |
402 | CONFIG_SCSI_PROC_FS=y | 418 | CONFIG_SCSI_PROC_FS=y |
403 | 419 | ||
@@ -418,6 +434,7 @@ CONFIG_CHR_DEV_SG=m | |||
418 | CONFIG_SCSI_MULTI_LUN=y | 434 | CONFIG_SCSI_MULTI_LUN=y |
419 | CONFIG_SCSI_CONSTANTS=y | 435 | CONFIG_SCSI_CONSTANTS=y |
420 | # CONFIG_SCSI_LOGGING is not set | 436 | # CONFIG_SCSI_LOGGING is not set |
437 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
421 | 438 | ||
422 | # | 439 | # |
423 | # SCSI Transports | 440 | # SCSI Transports |
@@ -461,6 +478,7 @@ CONFIG_ISCSI_TCP=m | |||
461 | # CONFIG_SCSI_DC390T is not set | 478 | # CONFIG_SCSI_DC390T is not set |
462 | # CONFIG_SCSI_DEBUG is not set | 479 | # CONFIG_SCSI_DEBUG is not set |
463 | # CONFIG_SCSI_SUNESP is not set | 480 | # CONFIG_SCSI_SUNESP is not set |
481 | # CONFIG_SCSI_SRP is not set | ||
464 | 482 | ||
465 | # | 483 | # |
466 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 484 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
@@ -591,6 +609,7 @@ CONFIG_BNX2=m | |||
591 | # CONFIG_IXGB is not set | 609 | # CONFIG_IXGB is not set |
592 | # CONFIG_S2IO is not set | 610 | # CONFIG_S2IO is not set |
593 | # CONFIG_MYRI10GE is not set | 611 | # CONFIG_MYRI10GE is not set |
612 | # CONFIG_NETXEN_NIC is not set | ||
594 | 613 | ||
595 | # | 614 | # |
596 | # Token Ring devices | 615 | # Token Ring devices |
@@ -717,10 +736,6 @@ CONFIG_RTC=y | |||
717 | # CONFIG_DTLK is not set | 736 | # CONFIG_DTLK is not set |
718 | # CONFIG_R3964 is not set | 737 | # CONFIG_R3964 is not set |
719 | # CONFIG_APPLICOM is not set | 738 | # CONFIG_APPLICOM is not set |
720 | |||
721 | # | ||
722 | # Ftape, the floppy tape device driver | ||
723 | # | ||
724 | # CONFIG_DRM is not set | 739 | # CONFIG_DRM is not set |
725 | # CONFIG_RAW_DRIVER is not set | 740 | # CONFIG_RAW_DRIVER is not set |
726 | 741 | ||
@@ -728,7 +743,6 @@ CONFIG_RTC=y | |||
728 | # TPM devices | 743 | # TPM devices |
729 | # | 744 | # |
730 | # CONFIG_TCG_TPM is not set | 745 | # CONFIG_TCG_TPM is not set |
731 | # CONFIG_TELCLOCK is not set | ||
732 | 746 | ||
733 | # | 747 | # |
734 | # I2C support | 748 | # I2C support |
@@ -842,11 +856,6 @@ CONFIG_HWMON=y | |||
842 | # CONFIG_HWMON_DEBUG_CHIP is not set | 856 | # CONFIG_HWMON_DEBUG_CHIP is not set |
843 | 857 | ||
844 | # | 858 | # |
845 | # Misc devices | ||
846 | # | ||
847 | # CONFIG_TIFM_CORE is not set | ||
848 | |||
849 | # | ||
850 | # Multimedia devices | 859 | # Multimedia devices |
851 | # | 860 | # |
852 | # CONFIG_VIDEO_DEV is not set | 861 | # CONFIG_VIDEO_DEV is not set |
@@ -1038,6 +1047,11 @@ CONFIG_SND_SUN_CS4231=m | |||
1038 | # CONFIG_SOUND_PRIME is not set | 1047 | # CONFIG_SOUND_PRIME is not set |
1039 | 1048 | ||
1040 | # | 1049 | # |
1050 | # HID Devices | ||
1051 | # | ||
1052 | CONFIG_HID=y | ||
1053 | |||
1054 | # | ||
1041 | # USB support | 1055 | # USB support |
1042 | # | 1056 | # |
1043 | CONFIG_USB_ARCH_HAS_HCD=y | 1057 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1052,6 +1066,7 @@ CONFIG_USB=y | |||
1052 | CONFIG_USB_DEVICEFS=y | 1066 | CONFIG_USB_DEVICEFS=y |
1053 | # CONFIG_USB_BANDWIDTH is not set | 1067 | # CONFIG_USB_BANDWIDTH is not set |
1054 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1068 | # CONFIG_USB_DYNAMIC_MINORS is not set |
1069 | # CONFIG_USB_MULTITHREAD_PROBE is not set | ||
1055 | # CONFIG_USB_OTG is not set | 1070 | # CONFIG_USB_OTG is not set |
1056 | 1071 | ||
1057 | # | 1072 | # |
@@ -1088,8 +1103,7 @@ CONFIG_USB_UHCI_HCD=m | |||
1088 | # USB Input Devices | 1103 | # USB Input Devices |
1089 | # | 1104 | # |
1090 | CONFIG_USB_HID=y | 1105 | CONFIG_USB_HID=y |
1091 | CONFIG_USB_HIDINPUT=y | 1106 | # CONFIG_USB_HID_POWERBOOK is not set |
1092 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1093 | # CONFIG_HID_FF is not set | 1107 | # CONFIG_HID_FF is not set |
1094 | CONFIG_USB_HIDDEV=y | 1108 | CONFIG_USB_HIDDEV=y |
1095 | # CONFIG_USB_AIPTEK is not set | 1109 | # CONFIG_USB_AIPTEK is not set |
@@ -1104,7 +1118,6 @@ CONFIG_USB_HIDDEV=y | |||
1104 | # CONFIG_USB_ATI_REMOTE2 is not set | 1118 | # CONFIG_USB_ATI_REMOTE2 is not set |
1105 | # CONFIG_USB_KEYSPAN_REMOTE is not set | 1119 | # CONFIG_USB_KEYSPAN_REMOTE is not set |
1106 | # CONFIG_USB_APPLETOUCH is not set | 1120 | # CONFIG_USB_APPLETOUCH is not set |
1107 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1108 | 1121 | ||
1109 | # | 1122 | # |
1110 | # USB Imaging devices | 1123 | # USB Imaging devices |
@@ -1119,6 +1132,7 @@ CONFIG_USB_HIDDEV=y | |||
1119 | # CONFIG_USB_KAWETH is not set | 1132 | # CONFIG_USB_KAWETH is not set |
1120 | # CONFIG_USB_PEGASUS is not set | 1133 | # CONFIG_USB_PEGASUS is not set |
1121 | # CONFIG_USB_RTL8150 is not set | 1134 | # CONFIG_USB_RTL8150 is not set |
1135 | # CONFIG_USB_USBNET_MII is not set | ||
1122 | # CONFIG_USB_USBNET is not set | 1136 | # CONFIG_USB_USBNET is not set |
1123 | # CONFIG_USB_MON is not set | 1137 | # CONFIG_USB_MON is not set |
1124 | 1138 | ||
@@ -1150,6 +1164,7 @@ CONFIG_USB_HIDDEV=y | |||
1150 | # CONFIG_USB_APPLEDISPLAY is not set | 1164 | # CONFIG_USB_APPLEDISPLAY is not set |
1151 | # CONFIG_USB_SISUSBVGA is not set | 1165 | # CONFIG_USB_SISUSBVGA is not set |
1152 | # CONFIG_USB_LD is not set | 1166 | # CONFIG_USB_LD is not set |
1167 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1153 | # CONFIG_USB_TEST is not set | 1168 | # CONFIG_USB_TEST is not set |
1154 | 1169 | ||
1155 | # | 1170 | # |
@@ -1234,6 +1249,7 @@ CONFIG_EXT3_FS=y | |||
1234 | CONFIG_EXT3_FS_XATTR=y | 1249 | CONFIG_EXT3_FS_XATTR=y |
1235 | CONFIG_EXT3_FS_POSIX_ACL=y | 1250 | CONFIG_EXT3_FS_POSIX_ACL=y |
1236 | CONFIG_EXT3_FS_SECURITY=y | 1251 | CONFIG_EXT3_FS_SECURITY=y |
1252 | # CONFIG_EXT4DEV_FS is not set | ||
1237 | CONFIG_JBD=y | 1253 | CONFIG_JBD=y |
1238 | # CONFIG_JBD_DEBUG is not set | 1254 | # CONFIG_JBD_DEBUG is not set |
1239 | CONFIG_FS_MBCACHE=y | 1255 | CONFIG_FS_MBCACHE=y |
@@ -1364,6 +1380,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
1364 | # | 1380 | # |
1365 | # Distributed Lock Manager | 1381 | # Distributed Lock Manager |
1366 | # | 1382 | # |
1383 | # CONFIG_DLM is not set | ||
1367 | 1384 | ||
1368 | # | 1385 | # |
1369 | # Instrumentation Support | 1386 | # Instrumentation Support |
@@ -1375,6 +1392,7 @@ CONFIG_KPROBES=y | |||
1375 | # | 1392 | # |
1376 | # Kernel hacking | 1393 | # Kernel hacking |
1377 | # | 1394 | # |
1395 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1378 | CONFIG_PRINTK_TIME=y | 1396 | CONFIG_PRINTK_TIME=y |
1379 | CONFIG_ENABLE_MUST_CHECK=y | 1397 | CONFIG_ENABLE_MUST_CHECK=y |
1380 | CONFIG_MAGIC_SYSRQ=y | 1398 | CONFIG_MAGIC_SYSRQ=y |
@@ -1389,6 +1407,8 @@ CONFIG_SCHEDSTATS=y | |||
1389 | # CONFIG_DEBUG_SPINLOCK is not set | 1407 | # CONFIG_DEBUG_SPINLOCK is not set |
1390 | # CONFIG_DEBUG_MUTEXES is not set | 1408 | # CONFIG_DEBUG_MUTEXES is not set |
1391 | # CONFIG_DEBUG_RWSEMS is not set | 1409 | # CONFIG_DEBUG_RWSEMS is not set |
1410 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1411 | # CONFIG_PROVE_LOCKING is not set | ||
1392 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1412 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1393 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1413 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1394 | # CONFIG_DEBUG_KOBJECT is not set | 1414 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -1399,6 +1419,7 @@ CONFIG_DEBUG_FS=y | |||
1399 | # CONFIG_DEBUG_LIST is not set | 1419 | # CONFIG_DEBUG_LIST is not set |
1400 | # CONFIG_UNWIND_INFO is not set | 1420 | # CONFIG_UNWIND_INFO is not set |
1401 | CONFIG_FORCED_INLINING=y | 1421 | CONFIG_FORCED_INLINING=y |
1422 | # CONFIG_HEADERS_CHECK is not set | ||
1402 | # CONFIG_RCU_TORTURE_TEST is not set | 1423 | # CONFIG_RCU_TORTURE_TEST is not set |
1403 | # CONFIG_LKDTM is not set | 1424 | # CONFIG_LKDTM is not set |
1404 | # CONFIG_DEBUG_STACK_USAGE is not set | 1425 | # CONFIG_DEBUG_STACK_USAGE is not set |
@@ -1421,8 +1442,9 @@ CONFIG_CRYPTO=y | |||
1421 | CONFIG_CRYPTO_ALGAPI=y | 1442 | CONFIG_CRYPTO_ALGAPI=y |
1422 | CONFIG_CRYPTO_BLKCIPHER=y | 1443 | CONFIG_CRYPTO_BLKCIPHER=y |
1423 | CONFIG_CRYPTO_HASH=y | 1444 | CONFIG_CRYPTO_HASH=y |
1424 | CONFIG_CRYPTO_MANAGER=m | 1445 | CONFIG_CRYPTO_MANAGER=y |
1425 | CONFIG_CRYPTO_HMAC=y | 1446 | CONFIG_CRYPTO_HMAC=y |
1447 | CONFIG_CRYPTO_XCBC=y | ||
1426 | CONFIG_CRYPTO_NULL=m | 1448 | CONFIG_CRYPTO_NULL=m |
1427 | CONFIG_CRYPTO_MD4=y | 1449 | CONFIG_CRYPTO_MD4=y |
1428 | CONFIG_CRYPTO_MD5=y | 1450 | CONFIG_CRYPTO_MD5=y |
@@ -1431,8 +1453,10 @@ CONFIG_CRYPTO_SHA256=m | |||
1431 | CONFIG_CRYPTO_SHA512=m | 1453 | CONFIG_CRYPTO_SHA512=m |
1432 | CONFIG_CRYPTO_WP512=m | 1454 | CONFIG_CRYPTO_WP512=m |
1433 | CONFIG_CRYPTO_TGR192=m | 1455 | CONFIG_CRYPTO_TGR192=m |
1456 | CONFIG_CRYPTO_GF128MUL=m | ||
1434 | CONFIG_CRYPTO_ECB=m | 1457 | CONFIG_CRYPTO_ECB=m |
1435 | CONFIG_CRYPTO_CBC=y | 1458 | CONFIG_CRYPTO_CBC=y |
1459 | CONFIG_CRYPTO_LRW=m | ||
1436 | CONFIG_CRYPTO_DES=y | 1460 | CONFIG_CRYPTO_DES=y |
1437 | CONFIG_CRYPTO_BLOWFISH=m | 1461 | CONFIG_CRYPTO_BLOWFISH=m |
1438 | CONFIG_CRYPTO_TWOFISH=m | 1462 | CONFIG_CRYPTO_TWOFISH=m |
@@ -1457,6 +1481,7 @@ CONFIG_CRYPTO_TEST=m | |||
1457 | # | 1481 | # |
1458 | # Library routines | 1482 | # Library routines |
1459 | # | 1483 | # |
1484 | CONFIG_BITREVERSE=y | ||
1460 | CONFIG_CRC_CCITT=m | 1485 | CONFIG_CRC_CCITT=m |
1461 | CONFIG_CRC16=m | 1486 | CONFIG_CRC16=m |
1462 | CONFIG_CRC32=y | 1487 | CONFIG_CRC32=y |
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index e1eabebaed39..eff0c01d3579 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile | |||
@@ -14,6 +14,7 @@ obj-y := process.o setup.o cpu.o idprom.o \ | |||
14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ | 14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ |
15 | visemul.o prom.o of_device.o | 15 | visemul.o prom.o of_device.o |
16 | 16 | ||
17 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | ||
17 | obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ | 18 | obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ |
18 | pci_psycho.o pci_sabre.o pci_schizo.o \ | 19 | pci_psycho.o pci_sabre.o pci_schizo.o \ |
19 | pci_sun4v.o pci_sun4v_asm.o | 20 | pci_sun4v.o pci_sun4v_asm.o |
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index d7caa60a0074..f205fc7cbcd0 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c | |||
@@ -209,7 +209,7 @@ static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
209 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && | 209 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && |
210 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || | 210 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || |
211 | N_TRSIZE(ex) || N_DRSIZE(ex) || | 211 | N_TRSIZE(ex) || N_DRSIZE(ex) || |
212 | bprm->file->f_dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { | 212 | bprm->file->f_path.dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { |
213 | return -ENOEXEC; | 213 | return -ENOEXEC; |
214 | } | 214 | } |
215 | 215 | ||
@@ -349,7 +349,7 @@ static int load_aout32_library(struct file *file) | |||
349 | int retval; | 349 | int retval; |
350 | struct exec ex; | 350 | struct exec ex; |
351 | 351 | ||
352 | inode = file->f_dentry->d_inode; | 352 | inode = file->f_path.dentry->d_inode; |
353 | 353 | ||
354 | retval = -ENOEXEC; | 354 | retval = -ENOEXEC; |
355 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); | 355 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); |
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c index a98f3ae175a3..9ad84ff10a17 100644 --- a/arch/sparc64/kernel/binfmt_elf32.c +++ b/arch/sparc64/kernel/binfmt_elf32.c | |||
@@ -141,7 +141,6 @@ cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value) | |||
141 | value->tv_sec = jiffies / HZ; | 141 | value->tv_sec = jiffies / HZ; |
142 | } | 142 | } |
143 | 143 | ||
144 | #define elf_addr_t u32 | ||
145 | #undef start_thread | 144 | #undef start_thread |
146 | #define start_thread start_thread32 | 145 | #define start_thread start_thread32 |
147 | #define init_elf_binfmt init_elf32_binfmt | 146 | #define init_elf_binfmt init_elf32_binfmt |
diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c index b66336db00ee..e724c54af029 100644 --- a/arch/sparc64/kernel/central.c +++ b/arch/sparc64/kernel/central.c | |||
@@ -126,6 +126,10 @@ static void probe_other_fhcs(void) | |||
126 | int board; | 126 | int board; |
127 | u32 tmp; | 127 | u32 tmp; |
128 | 128 | ||
129 | if (dp->parent && | ||
130 | dp->parent->parent != NULL) | ||
131 | continue; | ||
132 | |||
129 | fhc = (struct linux_fhc *) | 133 | fhc = (struct linux_fhc *) |
130 | central_alloc_bootmem(sizeof(struct linux_fhc)); | 134 | central_alloc_bootmem(sizeof(struct linux_fhc)); |
131 | if (fhc == NULL) | 135 | if (fhc == NULL) |
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 259f37e516f5..9699abeb9907 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c | |||
@@ -341,7 +341,7 @@ static void fetch_decode_regs(struct mctrl_info *mp) | |||
341 | 341 | ||
342 | static int init_one_mctrl(struct device_node *dp) | 342 | static int init_one_mctrl(struct device_node *dp) |
343 | { | 343 | { |
344 | struct mctrl_info *mp = kmalloc(sizeof(*mp), GFP_KERNEL); | 344 | struct mctrl_info *mp = kzalloc(sizeof(*mp), GFP_KERNEL); |
345 | int portid = of_getintprop_default(dp, "portid", -1); | 345 | int portid = of_getintprop_default(dp, "portid", -1); |
346 | struct linux_prom64_registers *regs; | 346 | struct linux_prom64_registers *regs; |
347 | void *pval; | 347 | void *pval; |
@@ -349,7 +349,6 @@ static int init_one_mctrl(struct device_node *dp) | |||
349 | 349 | ||
350 | if (!mp) | 350 | if (!mp) |
351 | return -1; | 351 | return -1; |
352 | memset(mp, 0, sizeof(*mp)); | ||
353 | if (portid == -1) | 352 | if (portid == -1) |
354 | goto fail; | 353 | goto fail; |
355 | 354 | ||
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index 2df25c2b4071..35bf895fdeee 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -389,12 +389,12 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de | |||
389 | dev->ofdev.node = dp; | 389 | dev->ofdev.node = dp; |
390 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; | 390 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; |
391 | dev->ofdev.dev.bus = &ebus_bus_type; | 391 | dev->ofdev.dev.bus = &ebus_bus_type; |
392 | strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); | 392 | sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node); |
393 | 393 | ||
394 | /* Register with core */ | 394 | /* Register with core */ |
395 | if (of_device_register(&dev->ofdev) != 0) | 395 | if (of_device_register(&dev->ofdev) != 0) |
396 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 396 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
397 | dev->ofdev.dev.bus_id); | 397 | dp->path_component_name); |
398 | 398 | ||
399 | dp = dp->child; | 399 | dp = dp->child; |
400 | if (dp) { | 400 | if (dp) { |
@@ -494,12 +494,12 @@ void __init ebus_init(void) | |||
494 | ebus->ofdev.node = dp; | 494 | ebus->ofdev.node = dp; |
495 | ebus->ofdev.dev.parent = &pdev->dev; | 495 | ebus->ofdev.dev.parent = &pdev->dev; |
496 | ebus->ofdev.dev.bus = &ebus_bus_type; | 496 | ebus->ofdev.dev.bus = &ebus_bus_type; |
497 | strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); | 497 | sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus); |
498 | 498 | ||
499 | /* Register with core */ | 499 | /* Register with core */ |
500 | if (of_device_register(&ebus->ofdev) != 0) | 500 | if (of_device_register(&ebus->ofdev) != 0) |
501 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 501 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
502 | ebus->ofdev.dev.bus_id); | 502 | dp->path_component_name); |
503 | 503 | ||
504 | 504 | ||
505 | child = dp->child; | 505 | child = dp->child; |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 0aaa35fc5a9c..c15a3edcb826 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -22,11 +22,10 @@ | |||
22 | #include <asm/auxio.h> | 22 | #include <asm/auxio.h> |
23 | #include <asm/sfafsr.h> | 23 | #include <asm/sfafsr.h> |
24 | #include <asm/pil.h> | 24 | #include <asm/pil.h> |
25 | #include <asm/unistd.h> | ||
25 | 26 | ||
26 | #define curptr g6 | 27 | #define curptr g6 |
27 | 28 | ||
28 | #define NR_SYSCALLS 300 /* Each OS is different... */ | ||
29 | |||
30 | .text | 29 | .text |
31 | .align 32 | 30 | .align 32 |
32 | 31 | ||
@@ -598,7 +597,12 @@ __spitfire_cee_trap_continue: | |||
598 | 1: ba,pt %xcc, etrap_irq | 597 | 1: ba,pt %xcc, etrap_irq |
599 | rd %pc, %g7 | 598 | rd %pc, %g7 |
600 | 599 | ||
601 | 2: mov %l4, %o1 | 600 | 2: |
601 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
602 | call trace_hardirqs_off | ||
603 | nop | ||
604 | #endif | ||
605 | mov %l4, %o1 | ||
602 | mov %l5, %o2 | 606 | mov %l5, %o2 |
603 | call spitfire_access_error | 607 | call spitfire_access_error |
604 | add %sp, PTREGS_OFF, %o0 | 608 | add %sp, PTREGS_OFF, %o0 |
@@ -825,6 +829,10 @@ do_cheetah_plus_data_parity: | |||
825 | wrpr %g0, 15, %pil | 829 | wrpr %g0, 15, %pil |
826 | ba,pt %xcc, etrap_irq | 830 | ba,pt %xcc, etrap_irq |
827 | rd %pc, %g7 | 831 | rd %pc, %g7 |
832 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
833 | call trace_hardirqs_off | ||
834 | nop | ||
835 | #endif | ||
828 | mov 0x0, %o0 | 836 | mov 0x0, %o0 |
829 | call cheetah_plus_parity_error | 837 | call cheetah_plus_parity_error |
830 | add %sp, PTREGS_OFF, %o1 | 838 | add %sp, PTREGS_OFF, %o1 |
@@ -856,6 +864,10 @@ do_cheetah_plus_insn_parity: | |||
856 | wrpr %g0, 15, %pil | 864 | wrpr %g0, 15, %pil |
857 | ba,pt %xcc, etrap_irq | 865 | ba,pt %xcc, etrap_irq |
858 | rd %pc, %g7 | 866 | rd %pc, %g7 |
867 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
868 | call trace_hardirqs_off | ||
869 | nop | ||
870 | #endif | ||
859 | mov 0x1, %o0 | 871 | mov 0x1, %o0 |
860 | call cheetah_plus_parity_error | 872 | call cheetah_plus_parity_error |
861 | add %sp, PTREGS_OFF, %o1 | 873 | add %sp, PTREGS_OFF, %o1 |
@@ -1184,6 +1196,10 @@ c_fast_ecc: | |||
1184 | wrpr %g0, 15, %pil | 1196 | wrpr %g0, 15, %pil |
1185 | ba,pt %xcc, etrap_irq | 1197 | ba,pt %xcc, etrap_irq |
1186 | rd %pc, %g7 | 1198 | rd %pc, %g7 |
1199 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1200 | call trace_hardirqs_off | ||
1201 | nop | ||
1202 | #endif | ||
1187 | mov %l4, %o1 | 1203 | mov %l4, %o1 |
1188 | mov %l5, %o2 | 1204 | mov %l5, %o2 |
1189 | call cheetah_fecc_handler | 1205 | call cheetah_fecc_handler |
@@ -1212,6 +1228,10 @@ c_cee: | |||
1212 | wrpr %g0, 15, %pil | 1228 | wrpr %g0, 15, %pil |
1213 | ba,pt %xcc, etrap_irq | 1229 | ba,pt %xcc, etrap_irq |
1214 | rd %pc, %g7 | 1230 | rd %pc, %g7 |
1231 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1232 | call trace_hardirqs_off | ||
1233 | nop | ||
1234 | #endif | ||
1215 | mov %l4, %o1 | 1235 | mov %l4, %o1 |
1216 | mov %l5, %o2 | 1236 | mov %l5, %o2 |
1217 | call cheetah_cee_handler | 1237 | call cheetah_cee_handler |
@@ -1240,6 +1260,10 @@ c_deferred: | |||
1240 | wrpr %g0, 15, %pil | 1260 | wrpr %g0, 15, %pil |
1241 | ba,pt %xcc, etrap_irq | 1261 | ba,pt %xcc, etrap_irq |
1242 | rd %pc, %g7 | 1262 | rd %pc, %g7 |
1263 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1264 | call trace_hardirqs_off | ||
1265 | nop | ||
1266 | #endif | ||
1243 | mov %l4, %o1 | 1267 | mov %l4, %o1 |
1244 | mov %l5, %o2 | 1268 | mov %l5, %o2 |
1245 | call cheetah_deferred_handler | 1269 | call cheetah_deferred_handler |
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index c8e9dc9d68a9..03ffaf895a22 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
@@ -489,6 +489,14 @@ tlb_fixup_done: | |||
489 | call __bzero | 489 | call __bzero |
490 | sub %o1, %o0, %o1 | 490 | sub %o1, %o0, %o1 |
491 | 491 | ||
492 | #ifdef CONFIG_LOCKDEP | ||
493 | /* We have this call this super early, as even prom_init can grab | ||
494 | * spinlocks and thus call into the lockdep code. | ||
495 | */ | ||
496 | call lockdep_init | ||
497 | nop | ||
498 | #endif | ||
499 | |||
492 | mov %l6, %o1 ! OpenPROM stack | 500 | mov %l6, %o1 ! OpenPROM stack |
493 | call prom_init | 501 | call prom_init |
494 | mov %l7, %o0 ! OpenPROM cif handler | 502 | mov %l7, %o0 ! OpenPROM cif handler |
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c index 0f3aec72ef5f..ad1c4f55420f 100644 --- a/arch/sparc64/kernel/isa.c +++ b/arch/sparc64/kernel/isa.c | |||
@@ -72,14 +72,12 @@ static void __init isa_fill_children(struct sparc_isa_device *parent_isa_dev) | |||
72 | struct linux_prom_registers *regs; | 72 | struct linux_prom_registers *regs; |
73 | struct sparc_isa_device *isa_dev; | 73 | struct sparc_isa_device *isa_dev; |
74 | 74 | ||
75 | isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); | 75 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); |
76 | if (!isa_dev) { | 76 | if (!isa_dev) { |
77 | fatal_err("cannot allocate child isa_dev"); | 77 | fatal_err("cannot allocate child isa_dev"); |
78 | prom_halt(); | 78 | prom_halt(); |
79 | } | 79 | } |
80 | 80 | ||
81 | memset(isa_dev, 0, sizeof(*isa_dev)); | ||
82 | |||
83 | /* Link it in to parent. */ | 81 | /* Link it in to parent. */ |
84 | isa_dev->next = parent_isa_dev->child; | 82 | isa_dev->next = parent_isa_dev->child; |
85 | parent_isa_dev->child = isa_dev; | 83 | parent_isa_dev->child = isa_dev; |
@@ -104,23 +102,21 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) | |||
104 | struct linux_prom_registers *regs; | 102 | struct linux_prom_registers *regs; |
105 | struct sparc_isa_device *isa_dev; | 103 | struct sparc_isa_device *isa_dev; |
106 | 104 | ||
107 | isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); | 105 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); |
108 | if (!isa_dev) { | 106 | if (!isa_dev) { |
109 | printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); | 107 | printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); |
110 | return; | 108 | return; |
111 | } | 109 | } |
112 | 110 | ||
113 | memset(isa_dev, 0, sizeof(*isa_dev)); | ||
114 | |||
115 | isa_dev->ofdev.node = dp; | 111 | isa_dev->ofdev.node = dp; |
116 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; | 112 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; |
117 | isa_dev->ofdev.dev.bus = &isa_bus_type; | 113 | isa_dev->ofdev.dev.bus = &isa_bus_type; |
118 | strcpy(isa_dev->ofdev.dev.bus_id, dp->path_component_name); | 114 | sprintf(isa_dev->ofdev.dev.bus_id, "isa[%08x]", dp->node); |
119 | 115 | ||
120 | /* Register with core */ | 116 | /* Register with core */ |
121 | if (of_device_register(&isa_dev->ofdev) != 0) { | 117 | if (of_device_register(&isa_dev->ofdev) != 0) { |
122 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | 118 | printk(KERN_DEBUG "isa: device registration error for %s!\n", |
123 | isa_dev->ofdev.dev.bus_id); | 119 | dp->path_component_name); |
124 | kfree(isa_dev); | 120 | kfree(isa_dev); |
125 | goto next_sibling; | 121 | goto next_sibling; |
126 | } | 122 | } |
@@ -180,23 +176,21 @@ void __init isa_init(void) | |||
180 | pbm = pdev_cookie->pbm; | 176 | pbm = pdev_cookie->pbm; |
181 | dp = pdev_cookie->prom_node; | 177 | dp = pdev_cookie->prom_node; |
182 | 178 | ||
183 | isa_br = kmalloc(sizeof(*isa_br), GFP_KERNEL); | 179 | isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL); |
184 | if (!isa_br) { | 180 | if (!isa_br) { |
185 | printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); | 181 | printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); |
186 | return; | 182 | return; |
187 | } | 183 | } |
188 | 184 | ||
189 | memset(isa_br, 0, sizeof(*isa_br)); | ||
190 | |||
191 | isa_br->ofdev.node = dp; | 185 | isa_br->ofdev.node = dp; |
192 | isa_br->ofdev.dev.parent = &pdev->dev; | 186 | isa_br->ofdev.dev.parent = &pdev->dev; |
193 | isa_br->ofdev.dev.bus = &isa_bus_type; | 187 | isa_br->ofdev.dev.bus = &isa_bus_type; |
194 | strcpy(isa_br->ofdev.dev.bus_id, dp->path_component_name); | 188 | sprintf(isa_br->ofdev.dev.bus_id, "isa%d", index); |
195 | 189 | ||
196 | /* Register with core */ | 190 | /* Register with core */ |
197 | if (of_device_register(&isa_br->ofdev) != 0) { | 191 | if (of_device_register(&isa_br->ofdev) != 0) { |
198 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | 192 | printk(KERN_DEBUG "isa: device registration error for %s!\n", |
199 | isa_br->ofdev.dev.bus_id); | 193 | dp->path_component_name); |
200 | kfree(isa_br); | 194 | kfree(isa_br); |
201 | return; | 195 | return; |
202 | } | 196 | } |
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index 8e75ed762fd8..ae221f0d4a6f 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
@@ -45,7 +45,11 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | |||
45 | int __kprobes arch_prepare_kprobe(struct kprobe *p) | 45 | int __kprobes arch_prepare_kprobe(struct kprobe *p) |
46 | { | 46 | { |
47 | p->ainsn.insn[0] = *p->addr; | 47 | p->ainsn.insn[0] = *p->addr; |
48 | flushi(&p->ainsn.insn[0]); | ||
49 | |||
48 | p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; | 50 | p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; |
51 | flushi(&p->ainsn.insn[1]); | ||
52 | |||
49 | p->opcode = *p->addr; | 53 | p->opcode = *p->addr; |
50 | return 0; | 54 | return 0; |
51 | } | 55 | } |
@@ -185,16 +189,19 @@ no_kprobe: | |||
185 | /* If INSN is a relative control transfer instruction, | 189 | /* If INSN is a relative control transfer instruction, |
186 | * return the corrected branch destination value. | 190 | * return the corrected branch destination value. |
187 | * | 191 | * |
188 | * The original INSN location was REAL_PC, it actually | 192 | * regs->tpc and regs->tnpc still hold the values of the |
189 | * executed at PC and produced destination address NPC. | 193 | * program counters at the time of trap due to the execution |
194 | * of the BREAKPOINT_INSTRUCTION_2 at p->ainsn.insn[1] | ||
195 | * | ||
190 | */ | 196 | */ |
191 | static unsigned long __kprobes relbranch_fixup(u32 insn, unsigned long real_pc, | 197 | static unsigned long __kprobes relbranch_fixup(u32 insn, struct kprobe *p, |
192 | unsigned long pc, | 198 | struct pt_regs *regs) |
193 | unsigned long npc) | ||
194 | { | 199 | { |
200 | unsigned long real_pc = (unsigned long) p->addr; | ||
201 | |||
195 | /* Branch not taken, no mods necessary. */ | 202 | /* Branch not taken, no mods necessary. */ |
196 | if (npc == pc + 0x4UL) | 203 | if (regs->tnpc == regs->tpc + 0x4UL) |
197 | return real_pc + 0x4UL; | 204 | return real_pc + 0x8UL; |
198 | 205 | ||
199 | /* The three cases are call, branch w/prediction, | 206 | /* The three cases are call, branch w/prediction, |
200 | * and traditional branch. | 207 | * and traditional branch. |
@@ -202,14 +209,21 @@ static unsigned long __kprobes relbranch_fixup(u32 insn, unsigned long real_pc, | |||
202 | if ((insn & 0xc0000000) == 0x40000000 || | 209 | if ((insn & 0xc0000000) == 0x40000000 || |
203 | (insn & 0xc1c00000) == 0x00400000 || | 210 | (insn & 0xc1c00000) == 0x00400000 || |
204 | (insn & 0xc1c00000) == 0x00800000) { | 211 | (insn & 0xc1c00000) == 0x00800000) { |
212 | unsigned long ainsn_addr; | ||
213 | |||
214 | ainsn_addr = (unsigned long) &p->ainsn.insn[0]; | ||
215 | |||
205 | /* The instruction did all the work for us | 216 | /* The instruction did all the work for us |
206 | * already, just apply the offset to the correct | 217 | * already, just apply the offset to the correct |
207 | * instruction location. | 218 | * instruction location. |
208 | */ | 219 | */ |
209 | return (real_pc + (npc - pc)); | 220 | return (real_pc + (regs->tnpc - ainsn_addr)); |
210 | } | 221 | } |
211 | 222 | ||
212 | return real_pc + 0x4UL; | 223 | /* It is jmpl or some other absolute PC modification instruction, |
224 | * leave NPC as-is. | ||
225 | */ | ||
226 | return regs->tnpc; | ||
213 | } | 227 | } |
214 | 228 | ||
215 | /* If INSN is an instruction which writes it's PC location | 229 | /* If INSN is an instruction which writes it's PC location |
@@ -220,12 +234,12 @@ static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, | |||
220 | { | 234 | { |
221 | unsigned long *slot = NULL; | 235 | unsigned long *slot = NULL; |
222 | 236 | ||
223 | /* Simplest cast is call, which always uses %o7 */ | 237 | /* Simplest case is 'call', which always uses %o7 */ |
224 | if ((insn & 0xc0000000) == 0x40000000) { | 238 | if ((insn & 0xc0000000) == 0x40000000) { |
225 | slot = ®s->u_regs[UREG_I7]; | 239 | slot = ®s->u_regs[UREG_I7]; |
226 | } | 240 | } |
227 | 241 | ||
228 | /* Jmpl encodes the register inside of the opcode */ | 242 | /* 'jmpl' encodes the register inside of the opcode */ |
229 | if ((insn & 0xc1f80000) == 0x81c00000) { | 243 | if ((insn & 0xc1f80000) == 0x81c00000) { |
230 | unsigned long rd = ((insn >> 25) & 0x1f); | 244 | unsigned long rd = ((insn >> 25) & 0x1f); |
231 | 245 | ||
@@ -247,11 +261,11 @@ static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, | |||
247 | 261 | ||
248 | /* | 262 | /* |
249 | * Called after single-stepping. p->addr is the address of the | 263 | * Called after single-stepping. p->addr is the address of the |
250 | * instruction whose first byte has been replaced by the breakpoint | 264 | * instruction which has been replaced by the breakpoint |
251 | * instruction. To avoid the SMP problems that can occur when we | 265 | * instruction. To avoid the SMP problems that can occur when we |
252 | * temporarily put back the original opcode to single-step, we | 266 | * temporarily put back the original opcode to single-step, we |
253 | * single-stepped a copy of the instruction. The address of this | 267 | * single-stepped a copy of the instruction. The address of this |
254 | * copy is p->ainsn.insn. | 268 | * copy is &p->ainsn.insn[0]. |
255 | * | 269 | * |
256 | * This function prepares to return from the post-single-step | 270 | * This function prepares to return from the post-single-step |
257 | * breakpoint trap. | 271 | * breakpoint trap. |
@@ -261,11 +275,11 @@ static void __kprobes resume_execution(struct kprobe *p, | |||
261 | { | 275 | { |
262 | u32 insn = p->ainsn.insn[0]; | 276 | u32 insn = p->ainsn.insn[0]; |
263 | 277 | ||
278 | regs->tnpc = relbranch_fixup(insn, p, regs); | ||
279 | |||
280 | /* This assignment must occur after relbranch_fixup() */ | ||
264 | regs->tpc = kcb->kprobe_orig_tnpc; | 281 | regs->tpc = kcb->kprobe_orig_tnpc; |
265 | regs->tnpc = relbranch_fixup(insn, | 282 | |
266 | (unsigned long) p->addr, | ||
267 | (unsigned long) &p->ainsn.insn[0], | ||
268 | regs->tnpc); | ||
269 | retpc_fixup(regs, insn, (unsigned long) p->addr); | 283 | retpc_fixup(regs, insn, (unsigned long) p->addr); |
270 | 284 | ||
271 | regs->tstate = ((regs->tstate & ~TSTATE_PIL) | | 285 | regs->tstate = ((regs->tstate & ~TSTATE_PIL) | |
@@ -430,17 +444,8 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) | |||
430 | struct jprobe *jp = container_of(p, struct jprobe, kp); | 444 | struct jprobe *jp = container_of(p, struct jprobe, kp); |
431 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 445 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
432 | 446 | ||
433 | kcb->jprobe_saved_regs_location = regs; | ||
434 | memcpy(&(kcb->jprobe_saved_regs), regs, sizeof(*regs)); | 447 | memcpy(&(kcb->jprobe_saved_regs), regs, sizeof(*regs)); |
435 | 448 | ||
436 | /* Save a whole stack frame, this gets arguments | ||
437 | * pushed onto the stack after using up all the | ||
438 | * arg registers. | ||
439 | */ | ||
440 | memcpy(&(kcb->jprobe_saved_stack), | ||
441 | (char *) (regs->u_regs[UREG_FP] + STACK_BIAS), | ||
442 | sizeof(kcb->jprobe_saved_stack)); | ||
443 | |||
444 | regs->tpc = (unsigned long) jp->entry; | 449 | regs->tpc = (unsigned long) jp->entry; |
445 | regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; | 450 | regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; |
446 | regs->tstate |= TSTATE_PIL; | 451 | regs->tstate |= TSTATE_PIL; |
@@ -450,10 +455,19 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) | |||
450 | 455 | ||
451 | void __kprobes jprobe_return(void) | 456 | void __kprobes jprobe_return(void) |
452 | { | 457 | { |
453 | __asm__ __volatile__( | 458 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
454 | ".globl jprobe_return_trap_instruction\n" | 459 | register unsigned long orig_fp asm("g1"); |
460 | |||
461 | orig_fp = kcb->jprobe_saved_regs.u_regs[UREG_FP]; | ||
462 | __asm__ __volatile__("\n" | ||
463 | "1: cmp %%sp, %0\n\t" | ||
464 | "blu,a,pt %%xcc, 1b\n\t" | ||
465 | " restore\n\t" | ||
466 | ".globl jprobe_return_trap_instruction\n" | ||
455 | "jprobe_return_trap_instruction:\n\t" | 467 | "jprobe_return_trap_instruction:\n\t" |
456 | "ta 0x70"); | 468 | "ta 0x70" |
469 | : /* no outputs */ | ||
470 | : "r" (orig_fp)); | ||
457 | } | 471 | } |
458 | 472 | ||
459 | extern void jprobe_return_trap_instruction(void); | 473 | extern void jprobe_return_trap_instruction(void); |
@@ -466,26 +480,7 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
466 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 480 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
467 | 481 | ||
468 | if (addr == (u32 *) jprobe_return_trap_instruction) { | 482 | if (addr == (u32 *) jprobe_return_trap_instruction) { |
469 | if (kcb->jprobe_saved_regs_location != regs) { | ||
470 | printk("JPROBE: Current regs (%p) does not match " | ||
471 | "saved regs (%p).\n", | ||
472 | regs, kcb->jprobe_saved_regs_location); | ||
473 | printk("JPROBE: Saved registers\n"); | ||
474 | __show_regs(kcb->jprobe_saved_regs_location); | ||
475 | printk("JPROBE: Current registers\n"); | ||
476 | __show_regs(regs); | ||
477 | BUG(); | ||
478 | } | ||
479 | /* Restore old register state. Do pt_regs | ||
480 | * first so that UREG_FP is the original one for | ||
481 | * the stack frame restore. | ||
482 | */ | ||
483 | memcpy(regs, &(kcb->jprobe_saved_regs), sizeof(*regs)); | 483 | memcpy(regs, &(kcb->jprobe_saved_regs), sizeof(*regs)); |
484 | |||
485 | memcpy((char *) (regs->u_regs[UREG_FP] + STACK_BIAS), | ||
486 | &(kcb->jprobe_saved_stack), | ||
487 | sizeof(kcb->jprobe_saved_stack)); | ||
488 | |||
489 | preempt_enable_no_resched(); | 484 | preempt_enable_no_resched(); |
490 | return 1; | 485 | return 1; |
491 | } | 486 | } |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index d822c7c18e1f..cec0eceae552 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -131,8 +131,13 @@ static int of_device_resume(struct device * dev) | |||
131 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) | 131 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) |
132 | { | 132 | { |
133 | unsigned long ret = res->start + offset; | 133 | unsigned long ret = res->start + offset; |
134 | struct resource *r; | ||
134 | 135 | ||
135 | if (!request_region(ret, size, name)) | 136 | if (res->flags & IORESOURCE_MEM) |
137 | r = request_mem_region(ret, size, name); | ||
138 | else | ||
139 | r = request_region(ret, size, name); | ||
140 | if (!r) | ||
136 | ret = 0; | 141 | ret = 0; |
137 | 142 | ||
138 | return (void __iomem *) ret; | 143 | return (void __iomem *) ret; |
@@ -397,16 +402,22 @@ static void of_bus_sbus_count_cells(struct device_node *child, | |||
397 | *sizec = 1; | 402 | *sizec = 1; |
398 | } | 403 | } |
399 | 404 | ||
400 | static int of_bus_sbus_map(u32 *addr, const u32 *range, int na, int ns, int pna) | 405 | /* |
401 | { | 406 | * FHC/Central bus specific translator. |
402 | return of_bus_default_map(addr, range, na, ns, pna); | 407 | * |
403 | } | 408 | * This is just needed to hard-code the address and size cell |
404 | 409 | * counts. 'fhc' and 'central' nodes lack the #address-cells and | |
405 | static unsigned int of_bus_sbus_get_flags(u32 *addr) | 410 | * #size-cells properties, and if you walk to the root on such |
411 | * Enterprise boxes all you'll get is a #size-cells of 2 which is | ||
412 | * not what we want to use. | ||
413 | */ | ||
414 | static int of_bus_fhc_match(struct device_node *np) | ||
406 | { | 415 | { |
407 | return IORESOURCE_MEM; | 416 | return !strcmp(np->name, "fhc") || |
417 | !strcmp(np->name, "central"); | ||
408 | } | 418 | } |
409 | 419 | ||
420 | #define of_bus_fhc_count_cells of_bus_sbus_count_cells | ||
410 | 421 | ||
411 | /* | 422 | /* |
412 | * Array of bus specific translators | 423 | * Array of bus specific translators |
@@ -428,8 +439,17 @@ static struct of_bus of_busses[] = { | |||
428 | .addr_prop_name = "reg", | 439 | .addr_prop_name = "reg", |
429 | .match = of_bus_sbus_match, | 440 | .match = of_bus_sbus_match, |
430 | .count_cells = of_bus_sbus_count_cells, | 441 | .count_cells = of_bus_sbus_count_cells, |
431 | .map = of_bus_sbus_map, | 442 | .map = of_bus_default_map, |
432 | .get_flags = of_bus_sbus_get_flags, | 443 | .get_flags = of_bus_default_get_flags, |
444 | }, | ||
445 | /* FHC */ | ||
446 | { | ||
447 | .name = "fhc", | ||
448 | .addr_prop_name = "reg", | ||
449 | .match = of_bus_fhc_match, | ||
450 | .count_cells = of_bus_fhc_count_cells, | ||
451 | .map = of_bus_default_map, | ||
452 | .get_flags = of_bus_default_get_flags, | ||
433 | }, | 453 | }, |
434 | /* Default */ | 454 | /* Default */ |
435 | { | 455 | { |
@@ -841,7 +861,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
841 | if (!parent) | 861 | if (!parent) |
842 | strcpy(op->dev.bus_id, "root"); | 862 | strcpy(op->dev.bus_id, "root"); |
843 | else | 863 | else |
844 | sprintf(op->dev.bus_id, "%s@%08x", dp->name, dp->node); | 864 | sprintf(op->dev.bus_id, "%08x", dp->node); |
845 | 865 | ||
846 | if (of_device_register(op)) { | 866 | if (of_device_register(op)) { |
847 | printk("%s: Could not register of device.\n", | 867 | printk("%s: Could not register of device.\n", |
@@ -987,10 +1007,9 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
987 | { | 1007 | { |
988 | struct of_device *dev; | 1008 | struct of_device *dev; |
989 | 1009 | ||
990 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 1010 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
991 | if (!dev) | 1011 | if (!dev) |
992 | return NULL; | 1012 | return NULL; |
993 | memset(dev, 0, sizeof(*dev)); | ||
994 | 1013 | ||
995 | dev->dev.parent = parent; | 1014 | dev->dev.parent = parent; |
996 | dev->dev.bus = bus; | 1015 | dev->dev.bus = bus; |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index e02f01b644af..dfc41cd4bb5d 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -646,13 +646,4 @@ int pci_domain_nr(struct pci_bus *pbus) | |||
646 | } | 646 | } |
647 | EXPORT_SYMBOL(pci_domain_nr); | 647 | EXPORT_SYMBOL(pci_domain_nr); |
648 | 648 | ||
649 | int pcibios_prep_mwi(struct pci_dev *dev) | ||
650 | { | ||
651 | /* We set correct PCI_CACHE_LINE_SIZE register values for every | ||
652 | * device probed on this platform. So there is nothing to check | ||
653 | * and this always succeeds. | ||
654 | */ | ||
655 | return 0; | ||
656 | } | ||
657 | |||
658 | #endif /* !(CONFIG_PCI) */ | 649 | #endif /* !(CONFIG_PCI) */ |
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index 7a59cc72c844..827ae30aa497 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -330,19 +330,6 @@ __init get_device_resource(struct linux_prom_pci_registers *ap, | |||
330 | return res; | 330 | return res; |
331 | } | 331 | } |
332 | 332 | ||
333 | static int __init pdev_resource_collisions_expected(struct pci_dev *pdev) | ||
334 | { | ||
335 | if (pdev->vendor != PCI_VENDOR_ID_SUN) | ||
336 | return 0; | ||
337 | |||
338 | if (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS || | ||
339 | pdev->device == PCI_DEVICE_ID_SUN_RIO_1394 || | ||
340 | pdev->device == PCI_DEVICE_ID_SUN_RIO_USB) | ||
341 | return 1; | ||
342 | |||
343 | return 0; | ||
344 | } | ||
345 | |||
346 | static void __init pdev_record_assignments(struct pci_pbm_info *pbm, | 333 | static void __init pdev_record_assignments(struct pci_pbm_info *pbm, |
347 | struct pci_dev *pdev) | 334 | struct pci_dev *pdev) |
348 | { | 335 | { |
@@ -400,19 +387,23 @@ static void __init pdev_record_assignments(struct pci_pbm_info *pbm, | |||
400 | pbm->parent->resource_adjust(pdev, res, root); | 387 | pbm->parent->resource_adjust(pdev, res, root); |
401 | 388 | ||
402 | if (request_resource(root, res) < 0) { | 389 | if (request_resource(root, res) < 0) { |
390 | int rnum; | ||
391 | |||
403 | /* OK, there is some conflict. But this is fine | 392 | /* OK, there is some conflict. But this is fine |
404 | * since we'll reassign it in the fixup pass. | 393 | * since we'll reassign it in the fixup pass. |
405 | * | 394 | * |
406 | * We notify the user that OBP made an error if it | 395 | * Do not print the warning for ROM resources |
407 | * is a case we don't expect. | 396 | * as such a conflict is quite common and |
397 | * harmless as the ROM bar is disabled. | ||
408 | */ | 398 | */ |
409 | if (!pdev_resource_collisions_expected(pdev)) { | 399 | rnum = (res - &pdev->resource[0]); |
410 | printk(KERN_ERR "PCI: Address space collision on region %ld " | 400 | if (rnum != PCI_ROM_RESOURCE) |
401 | printk(KERN_ERR "PCI: Resource collision, " | ||
402 | "region %d " | ||
411 | "[%016lx:%016lx] of device %s\n", | 403 | "[%016lx:%016lx] of device %s\n", |
412 | (res - &pdev->resource[0]), | 404 | rnum, |
413 | res->start, res->end, | 405 | res->start, res->end, |
414 | pci_name(pdev)); | 406 | pci_name(pdev)); |
415 | } | ||
416 | } | 407 | } |
417 | } | 408 | } |
418 | } | 409 | } |
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c index 82e5455134c6..2e7f1427088a 100644 --- a/arch/sparc64/kernel/pci_iommu.c +++ b/arch/sparc64/kernel/pci_iommu.c | |||
@@ -281,7 +281,7 @@ static void pci_4u_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, | |||
281 | 281 | ||
282 | spin_lock_irqsave(&iommu->lock, flags); | 282 | spin_lock_irqsave(&iommu->lock, flags); |
283 | 283 | ||
284 | free_npages(iommu, dvma, npages); | 284 | free_npages(iommu, dvma - iommu->page_table_map_base, npages); |
285 | 285 | ||
286 | spin_unlock_irqrestore(&iommu->lock, flags); | 286 | spin_unlock_irqrestore(&iommu->lock, flags); |
287 | 287 | ||
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index 6ec569828c29..94bb681f2323 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
@@ -1196,7 +1196,7 @@ static void pbm_register_toplevel_resources(struct pci_controller_info *p, | |||
1196 | &pbm->mem_space); | 1196 | &pbm->mem_space); |
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 dma_begin) | 1199 | static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 dma_start, u32 dma_end) |
1200 | { | 1200 | { |
1201 | struct pci_pbm_info *pbm; | 1201 | struct pci_pbm_info *pbm; |
1202 | struct device_node *node; | 1202 | struct device_node *node; |
@@ -1261,6 +1261,8 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp | |||
1261 | node = node->sibling; | 1261 | node = node->sibling; |
1262 | } | 1262 | } |
1263 | if (simbas_found == 0) { | 1263 | if (simbas_found == 0) { |
1264 | struct resource *rp; | ||
1265 | |||
1264 | /* No APBs underneath, probably this is a hummingbird | 1266 | /* No APBs underneath, probably this is a hummingbird |
1265 | * system. | 1267 | * system. |
1266 | */ | 1268 | */ |
@@ -1302,8 +1304,10 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp | |||
1302 | pbm->io_space.end = pbm->io_space.start + (1UL << 24) - 1UL; | 1304 | pbm->io_space.end = pbm->io_space.start + (1UL << 24) - 1UL; |
1303 | pbm->io_space.flags = IORESOURCE_IO; | 1305 | pbm->io_space.flags = IORESOURCE_IO; |
1304 | 1306 | ||
1305 | pbm->mem_space.start = p->pbm_A.controller_regs + SABRE_MEMSPACE; | 1307 | pbm->mem_space.start = |
1306 | pbm->mem_space.end = pbm->mem_space.start + (unsigned long)dma_begin - 1UL; | 1308 | (p->pbm_A.controller_regs + SABRE_MEMSPACE); |
1309 | pbm->mem_space.end = | ||
1310 | (pbm->mem_space.start + ((1UL << 32UL) - 1UL)); | ||
1307 | pbm->mem_space.flags = IORESOURCE_MEM; | 1311 | pbm->mem_space.flags = IORESOURCE_MEM; |
1308 | 1312 | ||
1309 | if (request_resource(&ioport_resource, &pbm->io_space) < 0) { | 1313 | if (request_resource(&ioport_resource, &pbm->io_space) < 0) { |
@@ -1315,6 +1319,17 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp | |||
1315 | prom_halt(); | 1319 | prom_halt(); |
1316 | } | 1320 | } |
1317 | 1321 | ||
1322 | rp = kmalloc(sizeof(*rp), GFP_KERNEL); | ||
1323 | if (!rp) { | ||
1324 | prom_printf("Cannot allocate IOMMU resource.\n"); | ||
1325 | prom_halt(); | ||
1326 | } | ||
1327 | rp->name = "IOMMU"; | ||
1328 | rp->start = pbm->mem_space.start + (unsigned long) dma_start; | ||
1329 | rp->end = pbm->mem_space.start + (unsigned long) dma_end - 1UL; | ||
1330 | rp->flags = IORESOURCE_BUSY; | ||
1331 | request_resource(&pbm->mem_space, rp); | ||
1332 | |||
1318 | pci_register_legacy_regions(&pbm->io_space, | 1333 | pci_register_legacy_regions(&pbm->io_space, |
1319 | &pbm->mem_space); | 1334 | &pbm->mem_space); |
1320 | } | 1335 | } |
@@ -1450,5 +1465,5 @@ void sabre_init(struct device_node *dp, char *model_name) | |||
1450 | /* | 1465 | /* |
1451 | * Look for APB underneath. | 1466 | * Look for APB underneath. |
1452 | */ | 1467 | */ |
1453 | sabre_pbm_init(p, dp, vdma[0]); | 1468 | sabre_pbm_init(p, dp, vdma[0], vdma[0] + vdma[1]); |
1454 | } | 1469 | } |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 03ad4c06758e..6b04794b7a97 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -798,7 +798,7 @@ static struct pci_ops pci_sun4v_ops = { | |||
798 | static void pbm_scan_bus(struct pci_controller_info *p, | 798 | static void pbm_scan_bus(struct pci_controller_info *p, |
799 | struct pci_pbm_info *pbm) | 799 | struct pci_pbm_info *pbm) |
800 | { | 800 | { |
801 | struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); | 801 | struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL); |
802 | 802 | ||
803 | if (!cookie) { | 803 | if (!cookie) { |
804 | prom_printf("%s: Critical allocation failure.\n", pbm->name); | 804 | prom_printf("%s: Critical allocation failure.\n", pbm->name); |
@@ -806,7 +806,6 @@ static void pbm_scan_bus(struct pci_controller_info *p, | |||
806 | } | 806 | } |
807 | 807 | ||
808 | /* All we care about is the PBM. */ | 808 | /* All we care about is the PBM. */ |
809 | memset(cookie, 0, sizeof(*cookie)); | ||
810 | cookie->pbm = pbm; | 809 | cookie->pbm = pbm; |
811 | 810 | ||
812 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm); | 811 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm); |
@@ -1048,12 +1047,11 @@ static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm) | |||
1048 | /* Allocate and initialize the free area map. */ | 1047 | /* Allocate and initialize the free area map. */ |
1049 | sz = num_tsb_entries / 8; | 1048 | sz = num_tsb_entries / 8; |
1050 | sz = (sz + 7UL) & ~7UL; | 1049 | sz = (sz + 7UL) & ~7UL; |
1051 | iommu->arena.map = kmalloc(sz, GFP_KERNEL); | 1050 | iommu->arena.map = kzalloc(sz, GFP_KERNEL); |
1052 | if (!iommu->arena.map) { | 1051 | if (!iommu->arena.map) { |
1053 | prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n"); | 1052 | prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n"); |
1054 | prom_halt(); | 1053 | prom_halt(); |
1055 | } | 1054 | } |
1056 | memset(iommu->arena.map, 0, sz); | ||
1057 | iommu->arena.limit = num_tsb_entries; | 1055 | iommu->arena.limit = num_tsb_entries; |
1058 | 1056 | ||
1059 | sz = probe_existing_entries(pbm, iommu); | 1057 | sz = probe_existing_entries(pbm, iommu); |
@@ -1164,24 +1162,20 @@ void sun4v_pci_init(struct device_node *dp, char *model_name) | |||
1164 | per_cpu(pci_iommu_batch, i).pglist = (u64 *) page; | 1162 | per_cpu(pci_iommu_batch, i).pglist = (u64 *) page; |
1165 | } | 1163 | } |
1166 | 1164 | ||
1167 | p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); | 1165 | p = kzalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); |
1168 | if (!p) | 1166 | if (!p) |
1169 | goto fatal_memory_error; | 1167 | goto fatal_memory_error; |
1170 | 1168 | ||
1171 | memset(p, 0, sizeof(*p)); | 1169 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
1172 | |||
1173 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | ||
1174 | if (!iommu) | 1170 | if (!iommu) |
1175 | goto fatal_memory_error; | 1171 | goto fatal_memory_error; |
1176 | 1172 | ||
1177 | memset(iommu, 0, sizeof(*iommu)); | ||
1178 | p->pbm_A.iommu = iommu; | 1173 | p->pbm_A.iommu = iommu; |
1179 | 1174 | ||
1180 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | 1175 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
1181 | if (!iommu) | 1176 | if (!iommu) |
1182 | goto fatal_memory_error; | 1177 | goto fatal_memory_error; |
1183 | 1178 | ||
1184 | memset(iommu, 0, sizeof(*iommu)); | ||
1185 | p->pbm_B.iommu = iommu; | 1179 | p->pbm_B.iommu = iommu; |
1186 | 1180 | ||
1187 | p->next = pci_controller_root; | 1181 | p->next = pci_controller_root; |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index e21cd6afa709..0917c24c4f08 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -793,7 +793,7 @@ static unsigned int schizo_irq_build(struct device_node *dp, | |||
793 | return virt_irq; | 793 | return virt_irq; |
794 | } | 794 | } |
795 | 795 | ||
796 | static void schizo_irq_trans_init(struct device_node *dp) | 796 | static void __schizo_irq_trans_init(struct device_node *dp, int is_tomatillo) |
797 | { | 797 | { |
798 | struct linux_prom64_registers *regs; | 798 | struct linux_prom64_registers *regs; |
799 | struct schizo_irq_data *irq_data; | 799 | struct schizo_irq_data *irq_data; |
@@ -807,11 +807,24 @@ static void schizo_irq_trans_init(struct device_node *dp) | |||
807 | dp->irq_trans->data = irq_data; | 807 | dp->irq_trans->data = irq_data; |
808 | 808 | ||
809 | irq_data->pbm_regs = regs[0].phys_addr; | 809 | irq_data->pbm_regs = regs[0].phys_addr; |
810 | irq_data->sync_reg = regs[3].phys_addr + 0x1a18UL; | 810 | if (is_tomatillo) |
811 | irq_data->sync_reg = regs[3].phys_addr + 0x1a18UL; | ||
812 | else | ||
813 | irq_data->sync_reg = 0UL; | ||
811 | irq_data->portid = of_getintprop_default(dp, "portid", 0); | 814 | irq_data->portid = of_getintprop_default(dp, "portid", 0); |
812 | irq_data->chip_version = of_getintprop_default(dp, "version#", 0); | 815 | irq_data->chip_version = of_getintprop_default(dp, "version#", 0); |
813 | } | 816 | } |
814 | 817 | ||
818 | static void schizo_irq_trans_init(struct device_node *dp) | ||
819 | { | ||
820 | __schizo_irq_trans_init(dp, 0); | ||
821 | } | ||
822 | |||
823 | static void tomatillo_irq_trans_init(struct device_node *dp) | ||
824 | { | ||
825 | __schizo_irq_trans_init(dp, 1); | ||
826 | } | ||
827 | |||
815 | static unsigned int pci_sun4v_irq_build(struct device_node *dp, | 828 | static unsigned int pci_sun4v_irq_build(struct device_node *dp, |
816 | unsigned int devino, | 829 | unsigned int devino, |
817 | void *_data) | 830 | void *_data) |
@@ -1050,8 +1063,8 @@ static struct irq_trans pci_irq_trans_table[] = { | |||
1050 | { "pci108e,8001", schizo_irq_trans_init }, | 1063 | { "pci108e,8001", schizo_irq_trans_init }, |
1051 | { "SUNW,schizo+", schizo_irq_trans_init }, | 1064 | { "SUNW,schizo+", schizo_irq_trans_init }, |
1052 | { "pci108e,8002", schizo_irq_trans_init }, | 1065 | { "pci108e,8002", schizo_irq_trans_init }, |
1053 | { "SUNW,tomatillo", schizo_irq_trans_init }, | 1066 | { "SUNW,tomatillo", tomatillo_irq_trans_init }, |
1054 | { "pci108e,a801", schizo_irq_trans_init }, | 1067 | { "pci108e,a801", tomatillo_irq_trans_init }, |
1055 | { "SUNW,sun4v-pci", pci_sun4v_irq_trans_init }, | 1068 | { "SUNW,sun4v-pci", pci_sun4v_irq_trans_init }, |
1056 | }; | 1069 | }; |
1057 | #endif | 1070 | #endif |
@@ -1079,23 +1092,22 @@ static void sun4v_vdev_irq_trans_init(struct device_node *dp) | |||
1079 | 1092 | ||
1080 | static void irq_trans_init(struct device_node *dp) | 1093 | static void irq_trans_init(struct device_node *dp) |
1081 | { | 1094 | { |
1082 | const char *model; | ||
1083 | #ifdef CONFIG_PCI | 1095 | #ifdef CONFIG_PCI |
1096 | const char *model; | ||
1084 | int i; | 1097 | int i; |
1085 | #endif | 1098 | #endif |
1086 | 1099 | ||
1100 | #ifdef CONFIG_PCI | ||
1087 | model = of_get_property(dp, "model", NULL); | 1101 | model = of_get_property(dp, "model", NULL); |
1088 | if (!model) | 1102 | if (!model) |
1089 | model = of_get_property(dp, "compatible", NULL); | 1103 | model = of_get_property(dp, "compatible", NULL); |
1090 | if (!model) | 1104 | if (model) { |
1091 | return; | 1105 | for (i = 0; i < ARRAY_SIZE(pci_irq_trans_table); i++) { |
1092 | 1106 | struct irq_trans *t = &pci_irq_trans_table[i]; | |
1093 | #ifdef CONFIG_PCI | ||
1094 | for (i = 0; i < ARRAY_SIZE(pci_irq_trans_table); i++) { | ||
1095 | struct irq_trans *t = &pci_irq_trans_table[i]; | ||
1096 | 1107 | ||
1097 | if (!strcmp(model, t->name)) | 1108 | if (!strcmp(model, t->name)) |
1098 | return t->init(dp); | 1109 | return t->init(dp); |
1110 | } | ||
1099 | } | 1111 | } |
1100 | #endif | 1112 | #endif |
1101 | #ifdef CONFIG_SBUS | 1113 | #ifdef CONFIG_SBUS |
@@ -1103,8 +1115,9 @@ static void irq_trans_init(struct device_node *dp) | |||
1103 | !strcmp(dp->name, "sbi")) | 1115 | !strcmp(dp->name, "sbi")) |
1104 | return sbus_irq_trans_init(dp); | 1116 | return sbus_irq_trans_init(dp); |
1105 | #endif | 1117 | #endif |
1106 | if (!strcmp(dp->name, "central")) | 1118 | if (!strcmp(dp->name, "fhc") && |
1107 | return central_irq_trans_init(dp->child); | 1119 | !strcmp(dp->parent->name, "central")) |
1120 | return central_irq_trans_init(dp); | ||
1108 | if (!strcmp(dp->name, "virtual-devices")) | 1121 | if (!strcmp(dp->name, "virtual-devices")) |
1109 | return sun4v_vdev_irq_trans_init(dp); | 1122 | return sun4v_vdev_irq_trans_init(dp); |
1110 | } | 1123 | } |
@@ -1516,7 +1529,7 @@ static char * __init get_one_property(phandle node, const char *name) | |||
1516 | return buf; | 1529 | return buf; |
1517 | } | 1530 | } |
1518 | 1531 | ||
1519 | static struct device_node * __init create_node(phandle node) | 1532 | static struct device_node * __init create_node(phandle node, struct device_node *parent) |
1520 | { | 1533 | { |
1521 | struct device_node *dp; | 1534 | struct device_node *dp; |
1522 | 1535 | ||
@@ -1525,6 +1538,7 @@ static struct device_node * __init create_node(phandle node) | |||
1525 | 1538 | ||
1526 | dp = prom_early_alloc(sizeof(*dp)); | 1539 | dp = prom_early_alloc(sizeof(*dp)); |
1527 | dp->unique_id = unique_id++; | 1540 | dp->unique_id = unique_id++; |
1541 | dp->parent = parent; | ||
1528 | 1542 | ||
1529 | kref_init(&dp->kref); | 1543 | kref_init(&dp->kref); |
1530 | 1544 | ||
@@ -1543,12 +1557,11 @@ static struct device_node * __init build_tree(struct device_node *parent, phandl | |||
1543 | { | 1557 | { |
1544 | struct device_node *dp; | 1558 | struct device_node *dp; |
1545 | 1559 | ||
1546 | dp = create_node(node); | 1560 | dp = create_node(node, parent); |
1547 | if (dp) { | 1561 | if (dp) { |
1548 | *(*nextp) = dp; | 1562 | *(*nextp) = dp; |
1549 | *nextp = &dp->allnext; | 1563 | *nextp = &dp->allnext; |
1550 | 1564 | ||
1551 | dp->parent = parent; | ||
1552 | dp->path_component_name = build_path_component(dp); | 1565 | dp->path_component_name = build_path_component(dp); |
1553 | dp->full_name = build_full_name(dp); | 1566 | dp->full_name = build_full_name(dp); |
1554 | 1567 | ||
@@ -1564,7 +1577,7 @@ void __init prom_build_devicetree(void) | |||
1564 | { | 1577 | { |
1565 | struct device_node **nextp; | 1578 | struct device_node **nextp; |
1566 | 1579 | ||
1567 | allnodes = create_node(prom_root_node); | 1580 | allnodes = create_node(prom_root_node, NULL); |
1568 | allnodes->path_component_name = ""; | 1581 | allnodes->path_component_name = ""; |
1569 | allnodes->full_name = "/"; | 1582 | allnodes->full_name = "/"; |
1570 | 1583 | ||
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index d31975e6d6f6..81111a12f0a8 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -202,7 +202,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
202 | #endif | 202 | #endif |
203 | if (request == PTRACE_TRACEME) { | 203 | if (request == PTRACE_TRACEME) { |
204 | ret = ptrace_traceme(); | 204 | ret = ptrace_traceme(); |
205 | pt_succ_return(regs, 0); | 205 | if (ret < 0) |
206 | pt_error_return(regs, -ret); | ||
207 | else | ||
208 | pt_succ_return(regs, 0); | ||
206 | goto out; | 209 | goto out; |
207 | } | 210 | } |
208 | 211 | ||
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 3522cd66f3bb..079d18a11d24 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -165,14 +165,26 @@ rtrap: | |||
165 | __handle_softirq_continue: | 165 | __handle_softirq_continue: |
166 | rtrap_xcall: | 166 | rtrap_xcall: |
167 | sethi %hi(0xf << 20), %l4 | 167 | sethi %hi(0xf << 20), %l4 |
168 | andcc %l1, TSTATE_PRIV, %l3 | ||
169 | and %l1, %l4, %l4 | 168 | and %l1, %l4, %l4 |
169 | andn %l1, %l4, %l1 | ||
170 | srl %l4, 20, %l4 | ||
171 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
172 | brnz,pn %l4, rtrap_no_irq_enable | ||
173 | nop | ||
174 | call trace_hardirqs_on | ||
175 | nop | ||
176 | wrpr %l4, %pil | ||
177 | rtrap_no_irq_enable: | ||
178 | #endif | ||
179 | andcc %l1, TSTATE_PRIV, %l3 | ||
170 | bne,pn %icc, to_kernel | 180 | bne,pn %icc, to_kernel |
171 | andn %l1, %l4, %l1 | 181 | nop |
172 | 182 | ||
173 | /* We must hold IRQs off and atomically test schedule+signal | 183 | /* We must hold IRQs off and atomically test schedule+signal |
174 | * state, then hold them off all the way back to userspace. | 184 | * state, then hold them off all the way back to userspace. |
175 | * If we are returning to kernel, none of this matters. | 185 | * If we are returning to kernel, none of this matters. Note |
186 | * that we are disabling interrupts via PSTATE_IE, not using | ||
187 | * %pil. | ||
176 | * | 188 | * |
177 | * If we do not do this, there is a window where we would do | 189 | * If we do not do this, there is a window where we would do |
178 | * the tests, later the signal/resched event arrives but we do | 190 | * the tests, later the signal/resched event arrives but we do |
@@ -256,7 +268,6 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 | |||
256 | 268 | ||
257 | ld [%sp + PTREGS_OFF + PT_V9_Y], %o3 | 269 | ld [%sp + PTREGS_OFF + PT_V9_Y], %o3 |
258 | wr %o3, %g0, %y | 270 | wr %o3, %g0, %y |
259 | srl %l4, 20, %l4 | ||
260 | wrpr %l4, 0x0, %pil | 271 | wrpr %l4, 0x0, %pil |
261 | wrpr %g0, 0x1, %tl | 272 | wrpr %g0, 0x1, %tl |
262 | wrpr %l1, %g0, %tstate | 273 | wrpr %l1, %g0, %tstate |
@@ -374,8 +385,8 @@ to_kernel: | |||
374 | ldx [%g6 + TI_FLAGS], %l5 | 385 | ldx [%g6 + TI_FLAGS], %l5 |
375 | andcc %l5, _TIF_NEED_RESCHED, %g0 | 386 | andcc %l5, _TIF_NEED_RESCHED, %g0 |
376 | be,pt %xcc, kern_fpucheck | 387 | be,pt %xcc, kern_fpucheck |
377 | srl %l4, 20, %l5 | 388 | nop |
378 | cmp %l5, 0 | 389 | cmp %l4, 0 |
379 | bne,pn %xcc, kern_fpucheck | 390 | bne,pn %xcc, kern_fpucheck |
380 | sethi %hi(PREEMPT_ACTIVE), %l6 | 391 | sethi %hi(PREEMPT_ACTIVE), %l6 |
381 | stw %l6, [%g6 + TI_PRE_COUNT] | 392 | stw %l6, [%g6 + TI_PRE_COUNT] |
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index cc8ad480a204..bf033b31d437 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -74,7 +74,6 @@ prom_console_write(struct console *con, const char *s, unsigned n) | |||
74 | 74 | ||
75 | unsigned int boot_flags = 0; | 75 | unsigned int boot_flags = 0; |
76 | #define BOOTME_DEBUG 0x1 | 76 | #define BOOTME_DEBUG 0x1 |
77 | #define BOOTME_SINGLE 0x2 | ||
78 | 77 | ||
79 | /* Exported for mm/init.c:paging_init. */ | 78 | /* Exported for mm/init.c:paging_init. */ |
80 | unsigned long cmdline_memory_size = 0; | 79 | unsigned long cmdline_memory_size = 0; |
@@ -102,7 +101,6 @@ static void __init process_switch(char c) | |||
102 | boot_flags |= BOOTME_DEBUG; | 101 | boot_flags |= BOOTME_DEBUG; |
103 | break; | 102 | break; |
104 | case 's': | 103 | case 's': |
105 | boot_flags |= BOOTME_SINGLE; | ||
106 | break; | 104 | break; |
107 | case 'h': | 105 | case 'h': |
108 | prom_printf("boot_flags_init: Halt!\n"); | 106 | prom_printf("boot_flags_init: Halt!\n"); |
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c new file mode 100644 index 000000000000..c4d15f2762b9 --- /dev/null +++ b/arch/sparc64/kernel/stacktrace.c | |||
@@ -0,0 +1,41 @@ | |||
1 | #include <linux/sched.h> | ||
2 | #include <linux/stacktrace.h> | ||
3 | #include <linux/thread_info.h> | ||
4 | #include <asm/ptrace.h> | ||
5 | |||
6 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) | ||
7 | { | ||
8 | unsigned long ksp, fp, thread_base; | ||
9 | struct thread_info *tp; | ||
10 | |||
11 | if (!task) | ||
12 | task = current; | ||
13 | tp = task_thread_info(task); | ||
14 | if (task == current) { | ||
15 | flushw_all(); | ||
16 | __asm__ __volatile__( | ||
17 | "mov %%fp, %0" | ||
18 | : "=r" (ksp) | ||
19 | ); | ||
20 | } else | ||
21 | ksp = tp->ksp; | ||
22 | |||
23 | fp = ksp + STACK_BIAS; | ||
24 | thread_base = (unsigned long) tp; | ||
25 | do { | ||
26 | struct reg_window *rw; | ||
27 | |||
28 | /* Bogus frame pointer? */ | ||
29 | if (fp < (thread_base + sizeof(struct thread_info)) || | ||
30 | fp >= (thread_base + THREAD_SIZE)) | ||
31 | break; | ||
32 | |||
33 | rw = (struct reg_window *) fp; | ||
34 | if (trace->skip > 0) | ||
35 | trace->skip--; | ||
36 | else | ||
37 | trace->entries[trace->nr_entries++] = rw->ins[7]; | ||
38 | |||
39 | fp = rw->ins[6] + STACK_BIAS; | ||
40 | } while (trace->nr_entries < trace->max_entries); | ||
41 | } | ||
diff --git a/arch/sparc64/kernel/sun4v_ivec.S b/arch/sparc64/kernel/sun4v_ivec.S index 49703c3c5769..405855dd886b 100644 --- a/arch/sparc64/kernel/sun4v_ivec.S +++ b/arch/sparc64/kernel/sun4v_ivec.S | |||
@@ -190,7 +190,10 @@ sun4v_res_mondo: | |||
190 | mov %g1, %g4 | 190 | mov %g1, %g4 |
191 | ba,pt %xcc, etrap_irq | 191 | ba,pt %xcc, etrap_irq |
192 | rd %pc, %g7 | 192 | rd %pc, %g7 |
193 | 193 | #ifdef CONFIG_TRACE_IRQFLAGS | |
194 | call trace_hardirqs_off | ||
195 | nop | ||
196 | #endif | ||
194 | /* Log the event. */ | 197 | /* Log the event. */ |
195 | add %sp, PTREGS_OFF, %o0 | 198 | add %sp, PTREGS_OFF, %o0 |
196 | call sun4v_resum_error | 199 | call sun4v_resum_error |
@@ -216,7 +219,10 @@ sun4v_res_mondo_queue_full: | |||
216 | wrpr %g0, 15, %pil | 219 | wrpr %g0, 15, %pil |
217 | ba,pt %xcc, etrap_irq | 220 | ba,pt %xcc, etrap_irq |
218 | rd %pc, %g7 | 221 | rd %pc, %g7 |
219 | 222 | #ifdef CONFIG_TRACE_IRQFLAGS | |
223 | call trace_hardirqs_off | ||
224 | nop | ||
225 | #endif | ||
220 | call sun4v_resum_overflow | 226 | call sun4v_resum_overflow |
221 | add %sp, PTREGS_OFF, %o0 | 227 | add %sp, PTREGS_OFF, %o0 |
222 | 228 | ||
@@ -295,7 +301,10 @@ sun4v_nonres_mondo: | |||
295 | mov %g1, %g4 | 301 | mov %g1, %g4 |
296 | ba,pt %xcc, etrap_irq | 302 | ba,pt %xcc, etrap_irq |
297 | rd %pc, %g7 | 303 | rd %pc, %g7 |
298 | 304 | #ifdef CONFIG_TRACE_IRQFLAGS | |
305 | call trace_hardirqs_off | ||
306 | nop | ||
307 | #endif | ||
299 | /* Log the event. */ | 308 | /* Log the event. */ |
300 | add %sp, PTREGS_OFF, %o0 | 309 | add %sp, PTREGS_OFF, %o0 |
301 | call sun4v_nonresum_error | 310 | call sun4v_nonresum_error |
@@ -321,7 +330,10 @@ sun4v_nonres_mondo_queue_full: | |||
321 | wrpr %g0, 15, %pil | 330 | wrpr %g0, 15, %pil |
322 | ba,pt %xcc, etrap_irq | 331 | ba,pt %xcc, etrap_irq |
323 | rd %pc, %g7 | 332 | rd %pc, %g7 |
324 | 333 | #ifdef CONFIG_TRACE_IRQFLAGS | |
334 | call trace_hardirqs_off | ||
335 | nop | ||
336 | #endif | ||
325 | call sun4v_nonresum_overflow | 337 | call sun4v_nonresum_overflow |
326 | add %sp, PTREGS_OFF, %o0 | 338 | add %sp, PTREGS_OFF, %o0 |
327 | 339 | ||
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 7da72d3b322a..4446f66590fa 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c | |||
@@ -83,7 +83,7 @@ asmlinkage u32 sunos_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u32 of | |||
83 | file = fget(fd); | 83 | file = fget(fd); |
84 | if (!file) | 84 | if (!file) |
85 | goto out; | 85 | goto out; |
86 | inode = file->f_dentry->d_inode; | 86 | inode = file->f_path.dentry->d_inode; |
87 | if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) { | 87 | if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) { |
88 | flags |= MAP_ANONYMOUS; | 88 | flags |= MAP_ANONYMOUS; |
89 | fput(file); | 89 | fput(file); |
@@ -615,7 +615,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) | |||
615 | if (!file) | 615 | if (!file) |
616 | return 0; | 616 | return 0; |
617 | 617 | ||
618 | inode = file->f_dentry->d_inode; | 618 | inode = file->f_path.dentry->d_inode; |
619 | 619 | ||
620 | socket = SOCKET_I(inode); | 620 | socket = SOCKET_I(inode); |
621 | local.sin_family = AF_INET; | 621 | local.sin_family = AF_INET; |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 419a63fca172..9a8026797ac0 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -79,7 +79,7 @@ sys_call_table32: | |||
79 | .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 | 79 | .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 |
80 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 80 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
81 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare | 81 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare |
82 | /*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list | 82 | /*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages |
83 | 83 | ||
84 | #endif /* CONFIG_COMPAT */ | 84 | #endif /* CONFIG_COMPAT */ |
85 | 85 | ||
@@ -149,7 +149,7 @@ sys_call_table: | |||
149 | .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 | 149 | .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 |
150 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 150 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare | 151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare |
152 | /*300*/ .word sys_set_robust_list, sys_get_robust_list | 152 | /*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages |
153 | 153 | ||
154 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ | 154 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ |
155 | defined(CONFIG_SOLARIS_EMUL_MODULE) | 155 | defined(CONFIG_SOLARIS_EMUL_MODULE) |
@@ -262,5 +262,7 @@ sunos_sys_table: | |||
262 | /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys | 262 | /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys |
263 | .word sunos_nosys, sunos_nosys, sunos_nosys | 263 | .word sunos_nosys, sunos_nosys, sunos_nosys |
264 | .word sunos_nosys, sunos_nosys, sunos_nosys | 264 | .word sunos_nosys, sunos_nosys, sunos_nosys |
265 | .word sunos_nosys, sunos_nosys, sunos_nosys | 265 | .word sunos_nosys |
266 | /*300*/ .word sunos_nosys, sunos_nosys, sunos_nosys | ||
267 | |||
266 | #endif | 268 | #endif |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 68420e2dad0e..ad67784292db 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> /* for jiffies */ | 13 | #include <linux/sched.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/kallsyms.h> | 15 | #include <linux/kallsyms.h> |
16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
@@ -87,6 +87,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) | |||
87 | i + 1, | 87 | i + 1, |
88 | p->trapstack[i].tstate, p->trapstack[i].tpc, | 88 | p->trapstack[i].tstate, p->trapstack[i].tpc, |
89 | p->trapstack[i].tnpc, p->trapstack[i].tt); | 89 | p->trapstack[i].tnpc, p->trapstack[i].tt); |
90 | print_symbol("TRAPLOG: TPC<%s>\n", p->trapstack[i].tpc); | ||
90 | } | 91 | } |
91 | } | 92 | } |
92 | 93 | ||
@@ -1134,6 +1135,9 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in | |||
1134 | printk("%s" "ERROR(%d): TPC[%lx] TNPC[%lx] O7[%lx] TSTATE[%lx]\n", | 1135 | printk("%s" "ERROR(%d): TPC[%lx] TNPC[%lx] O7[%lx] TSTATE[%lx]\n", |
1135 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1136 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1136 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); | 1137 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); |
1138 | printk("%s" "ERROR(%d): ", | ||
1139 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); | ||
1140 | print_symbol("TPC<%s>\n", regs->tpc); | ||
1137 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", | 1141 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", |
1138 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1142 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1139 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, | 1143 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, |
@@ -1741,6 +1745,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1741 | smp_processor_id(), | 1745 | smp_processor_id(), |
1742 | (type & 0x1) ? 'I' : 'D', | 1746 | (type & 0x1) ? 'I' : 'D', |
1743 | regs->tpc); | 1747 | regs->tpc); |
1748 | print_symbol(KERN_EMERG "TPC<%s>\n", regs->tpc); | ||
1744 | panic("Irrecoverable Cheetah+ parity error."); | 1749 | panic("Irrecoverable Cheetah+ parity error."); |
1745 | } | 1750 | } |
1746 | 1751 | ||
@@ -1748,6 +1753,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1748 | smp_processor_id(), | 1753 | smp_processor_id(), |
1749 | (type & 0x1) ? 'I' : 'D', | 1754 | (type & 0x1) ? 'I' : 'D', |
1750 | regs->tpc); | 1755 | regs->tpc); |
1756 | print_symbol(KERN_WARNING "TPC<%s>\n", regs->tpc); | ||
1751 | } | 1757 | } |
1752 | 1758 | ||
1753 | struct sun4v_error_entry { | 1759 | struct sun4v_error_entry { |
@@ -1867,6 +1873,16 @@ void sun4v_resum_error(struct pt_regs *regs, unsigned long offset) | |||
1867 | 1873 | ||
1868 | put_cpu(); | 1874 | put_cpu(); |
1869 | 1875 | ||
1876 | if (ent->err_type == SUN4V_ERR_TYPE_WARNING_RES) { | ||
1877 | /* If err_type is 0x4, it's a powerdown request. Do | ||
1878 | * not do the usual resumable error log because that | ||
1879 | * makes it look like some abnormal error. | ||
1880 | */ | ||
1881 | printk(KERN_INFO "Power down request...\n"); | ||
1882 | kill_cad_pid(SIGINT, 1); | ||
1883 | return; | ||
1884 | } | ||
1885 | |||
1870 | sun4v_log_error(regs, &local_copy, cpu, | 1886 | sun4v_log_error(regs, &local_copy, cpu, |
1871 | KERN_ERR "RESUMABLE ERROR", | 1887 | KERN_ERR "RESUMABLE ERROR", |
1872 | &sun4v_resum_oflow_cnt); | 1888 | &sun4v_resum_oflow_cnt); |
@@ -1946,6 +1962,7 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) | |||
1946 | 1962 | ||
1947 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", | 1963 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", |
1948 | regs->tpc, tl); | 1964 | regs->tpc, tl); |
1965 | print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc); | ||
1949 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " | 1966 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " |
1950 | "pte[%lx] error[%lx]\n", | 1967 | "pte[%lx] error[%lx]\n", |
1951 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, | 1968 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, |
@@ -1966,6 +1983,7 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) | |||
1966 | 1983 | ||
1967 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", | 1984 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", |
1968 | regs->tpc, tl); | 1985 | regs->tpc, tl); |
1986 | print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc); | ||
1969 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " | 1987 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " |
1970 | "pte[%lx] error[%lx]\n", | 1988 | "pte[%lx] error[%lx]\n", |
1971 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, | 1989 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, |
@@ -2253,8 +2271,12 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2253 | do_exit(SIGSEGV); | 2271 | do_exit(SIGSEGV); |
2254 | } | 2272 | } |
2255 | 2273 | ||
2274 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) | ||
2275 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) | ||
2276 | |||
2256 | extern int handle_popc(u32 insn, struct pt_regs *regs); | 2277 | extern int handle_popc(u32 insn, struct pt_regs *regs); |
2257 | extern int handle_ldf_stq(u32 insn, struct pt_regs *regs); | 2278 | extern int handle_ldf_stq(u32 insn, struct pt_regs *regs); |
2279 | extern int vis_emul(struct pt_regs *, unsigned int); | ||
2258 | 2280 | ||
2259 | void do_illegal_instruction(struct pt_regs *regs) | 2281 | void do_illegal_instruction(struct pt_regs *regs) |
2260 | { | 2282 | { |
@@ -2279,10 +2301,18 @@ void do_illegal_instruction(struct pt_regs *regs) | |||
2279 | if (handle_ldf_stq(insn, regs)) | 2301 | if (handle_ldf_stq(insn, regs)) |
2280 | return; | 2302 | return; |
2281 | } else if (tlb_type == hypervisor) { | 2303 | } else if (tlb_type == hypervisor) { |
2282 | extern int vis_emul(struct pt_regs *, unsigned int); | 2304 | if ((insn & VIS_OPCODE_MASK) == VIS_OPCODE_VAL) { |
2305 | if (!vis_emul(regs, insn)) | ||
2306 | return; | ||
2307 | } else { | ||
2308 | struct fpustate *f = FPUSTATE; | ||
2283 | 2309 | ||
2284 | if (!vis_emul(regs, insn)) | 2310 | /* XXX maybe verify XFSR bits like |
2285 | return; | 2311 | * XXX do_fpother() does? |
2312 | */ | ||
2313 | if (do_mathemu(regs, f)) | ||
2314 | return; | ||
2315 | } | ||
2286 | } | 2316 | } |
2287 | } | 2317 | } |
2288 | info.si_signo = SIGILL; | 2318 | info.si_signo = SIGILL; |
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index a9b765271b85..bc18d480dd1c 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -243,7 +243,7 @@ static inline int ok_for_kernel(unsigned int insn) | |||
243 | return !floating_point_load_or_store_p(insn); | 243 | return !floating_point_load_or_store_p(insn); |
244 | } | 244 | } |
245 | 245 | ||
246 | static void kernel_mna_trap_fault(void) | 246 | static void kernel_mna_trap_fault(int fixup_tstate_asi) |
247 | { | 247 | { |
248 | struct pt_regs *regs = current_thread_info()->kern_una_regs; | 248 | struct pt_regs *regs = current_thread_info()->kern_una_regs; |
249 | unsigned int insn = current_thread_info()->kern_una_insn; | 249 | unsigned int insn = current_thread_info()->kern_una_insn; |
@@ -274,18 +274,15 @@ static void kernel_mna_trap_fault(void) | |||
274 | regs->tpc = entry->fixup; | 274 | regs->tpc = entry->fixup; |
275 | regs->tnpc = regs->tpc + 4; | 275 | regs->tnpc = regs->tpc + 4; |
276 | 276 | ||
277 | regs->tstate &= ~TSTATE_ASI; | 277 | if (fixup_tstate_asi) { |
278 | regs->tstate |= (ASI_AIUS << 24UL); | 278 | regs->tstate &= ~TSTATE_ASI; |
279 | regs->tstate |= (ASI_AIUS << 24UL); | ||
280 | } | ||
279 | } | 281 | } |
280 | 282 | ||
281 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | 283 | static void log_unaligned(struct pt_regs *regs) |
282 | { | 284 | { |
283 | static unsigned long count, last_time; | 285 | static unsigned long count, last_time; |
284 | enum direction dir = decode_direction(insn); | ||
285 | int size = decode_access_size(insn); | ||
286 | |||
287 | current_thread_info()->kern_una_regs = regs; | ||
288 | current_thread_info()->kern_una_insn = insn; | ||
289 | 286 | ||
290 | if (jiffies - last_time > 5 * HZ) | 287 | if (jiffies - last_time > 5 * HZ) |
291 | count = 0; | 288 | count = 0; |
@@ -295,6 +292,28 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
295 | printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); | 292 | printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); |
296 | print_symbol("%s\n", regs->tpc); | 293 | print_symbol("%s\n", regs->tpc); |
297 | } | 294 | } |
295 | } | ||
296 | |||
297 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | ||
298 | { | ||
299 | enum direction dir = decode_direction(insn); | ||
300 | int size = decode_access_size(insn); | ||
301 | int orig_asi, asi; | ||
302 | |||
303 | current_thread_info()->kern_una_regs = regs; | ||
304 | current_thread_info()->kern_una_insn = insn; | ||
305 | |||
306 | orig_asi = asi = decode_asi(insn, regs); | ||
307 | |||
308 | /* If this is a {get,put}_user() on an unaligned userspace pointer, | ||
309 | * just signal a fault and do not log the event. | ||
310 | */ | ||
311 | if (asi == ASI_AIUS) { | ||
312 | kernel_mna_trap_fault(0); | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | log_unaligned(regs); | ||
298 | 317 | ||
299 | if (!ok_for_kernel(insn) || dir == both) { | 318 | if (!ok_for_kernel(insn) || dir == both) { |
300 | printk("Unsupported unaligned load/store trap for kernel " | 319 | printk("Unsupported unaligned load/store trap for kernel " |
@@ -302,10 +321,10 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
302 | unaligned_panic("Kernel does fpu/atomic " | 321 | unaligned_panic("Kernel does fpu/atomic " |
303 | "unaligned load/store.", regs); | 322 | "unaligned load/store.", regs); |
304 | 323 | ||
305 | kernel_mna_trap_fault(); | 324 | kernel_mna_trap_fault(0); |
306 | } else { | 325 | } else { |
307 | unsigned long addr, *reg_addr; | 326 | unsigned long addr, *reg_addr; |
308 | int orig_asi, asi, err; | 327 | int err; |
309 | 328 | ||
310 | addr = compute_effective_address(regs, insn, | 329 | addr = compute_effective_address(regs, insn, |
311 | ((insn >> 25) & 0x1f)); | 330 | ((insn >> 25) & 0x1f)); |
@@ -315,7 +334,6 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
315 | regs->tpc, dirstrings[dir], addr, size, | 334 | regs->tpc, dirstrings[dir], addr, size, |
316 | regs->u_regs[UREG_RETPC]); | 335 | regs->u_regs[UREG_RETPC]); |
317 | #endif | 336 | #endif |
318 | orig_asi = asi = decode_asi(insn, regs); | ||
319 | switch (asi) { | 337 | switch (asi) { |
320 | case ASI_NL: | 338 | case ASI_NL: |
321 | case ASI_AIUPL: | 339 | case ASI_AIUPL: |
@@ -365,7 +383,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
365 | /* Not reached... */ | 383 | /* Not reached... */ |
366 | } | 384 | } |
367 | if (unlikely(err)) | 385 | if (unlikely(err)) |
368 | kernel_mna_trap_fault(); | 386 | kernel_mna_trap_fault(1); |
369 | else | 387 | else |
370 | advance(regs); | 388 | advance(regs); |
371 | } | 389 | } |
diff --git a/arch/sparc64/kernel/visemul.c b/arch/sparc64/kernel/visemul.c index 84fedaa38aae..c3fd64706b53 100644 --- a/arch/sparc64/kernel/visemul.c +++ b/arch/sparc64/kernel/visemul.c | |||
@@ -128,9 +128,6 @@ | |||
128 | /* 001001100 - Permute bytes as specified by GSR.MASK */ | 128 | /* 001001100 - Permute bytes as specified by GSR.MASK */ |
129 | #define BSHUFFLE_OPF 0x04c | 129 | #define BSHUFFLE_OPF 0x04c |
130 | 130 | ||
131 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) | ||
132 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) | ||
133 | |||
134 | #define VIS_OPF_SHIFT 5 | 131 | #define VIS_OPF_SHIFT 5 |
135 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) | 132 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) |
136 | 133 | ||
@@ -810,9 +807,6 @@ int vis_emul(struct pt_regs *regs, unsigned int insn) | |||
810 | if (get_user(insn, (u32 __user *) pc)) | 807 | if (get_user(insn, (u32 __user *) pc)) |
811 | return -EFAULT; | 808 | return -EFAULT; |
812 | 809 | ||
813 | if ((insn & VIS_OPCODE_MASK) != VIS_OPCODE_VAL) | ||
814 | return -EINVAL; | ||
815 | |||
816 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; | 810 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; |
817 | switch (opf) { | 811 | switch (opf) { |
818 | default: | 812 | default: |
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S index b097379a49a8..4a6063f33e7a 100644 --- a/arch/sparc64/kernel/vmlinux.lds.S +++ b/arch/sparc64/kernel/vmlinux.lds.S | |||
@@ -13,6 +13,7 @@ SECTIONS | |||
13 | . = 0x4000; | 13 | . = 0x4000; |
14 | .text 0x0000000000404000 : | 14 | .text 0x0000000000404000 : |
15 | { | 15 | { |
16 | _text = .; | ||
16 | *(.text) | 17 | *(.text) |
17 | SCHED_TEXT | 18 | SCHED_TEXT |
18 | LOCK_TEXT | 19 | LOCK_TEXT |
@@ -57,13 +58,7 @@ SECTIONS | |||
57 | __setup_end = .; | 58 | __setup_end = .; |
58 | __initcall_start = .; | 59 | __initcall_start = .; |
59 | .initcall.init : { | 60 | .initcall.init : { |
60 | *(.initcall1.init) | 61 | INITCALLS |
61 | *(.initcall2.init) | ||
62 | *(.initcall3.init) | ||
63 | *(.initcall4.init) | ||
64 | *(.initcall5.init) | ||
65 | *(.initcall6.init) | ||
66 | *(.initcall7.init) | ||
67 | } | 62 | } |
68 | __initcall_end = .; | 63 | __initcall_end = .; |
69 | __con_initcall_start = .; | 64 | __con_initcall_start = .; |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index 53b9b1f528e5..33fd0b265e70 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
@@ -235,6 +235,11 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
235 | return pte; | 235 | return pte; |
236 | } | 236 | } |
237 | 237 | ||
238 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | ||
239 | { | ||
240 | return 0; | ||
241 | } | ||
242 | |||
238 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | 243 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, |
239 | pte_t *ptep, pte_t entry) | 244 | pte_t *ptep, pte_t entry) |
240 | { | 245 | { |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 09cb7fccc03a..a8e8802eed4d 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -176,9 +176,9 @@ unsigned long sparc64_kern_sec_context __read_mostly; | |||
176 | 176 | ||
177 | int bigkernel = 0; | 177 | int bigkernel = 0; |
178 | 178 | ||
179 | kmem_cache_t *pgtable_cache __read_mostly; | 179 | struct kmem_cache *pgtable_cache __read_mostly; |
180 | 180 | ||
181 | static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags) | 181 | static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) |
182 | { | 182 | { |
183 | clear_page(addr); | 183 | clear_page(addr); |
184 | } | 184 | } |
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index beaa02810f0e..236d02f41a01 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c | |||
@@ -239,7 +239,7 @@ static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_idx, unsign | |||
239 | } | 239 | } |
240 | } | 240 | } |
241 | 241 | ||
242 | static kmem_cache_t *tsb_caches[8] __read_mostly; | 242 | static struct kmem_cache *tsb_caches[8] __read_mostly; |
243 | 243 | ||
244 | static const char *tsb_cache_names[8] = { | 244 | static const char *tsb_cache_names[8] = { |
245 | "tsb_8KB", | 245 | "tsb_8KB", |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index d70b60a3bbcc..737c26923c09 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -477,6 +477,10 @@ xcall_sync_tick: | |||
477 | sethi %hi(109f), %g7 | 477 | sethi %hi(109f), %g7 |
478 | b,pt %xcc, etrap_irq | 478 | b,pt %xcc, etrap_irq |
479 | 109: or %g7, %lo(109b), %g7 | 479 | 109: or %g7, %lo(109b), %g7 |
480 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
481 | call trace_hardirqs_off | ||
482 | nop | ||
483 | #endif | ||
480 | call smp_synchronize_tick_client | 484 | call smp_synchronize_tick_client |
481 | nop | 485 | nop |
482 | clr %l6 | 486 | clr %l6 |
@@ -508,6 +512,10 @@ xcall_report_regs: | |||
508 | sethi %hi(109f), %g7 | 512 | sethi %hi(109f), %g7 |
509 | b,pt %xcc, etrap_irq | 513 | b,pt %xcc, etrap_irq |
510 | 109: or %g7, %lo(109b), %g7 | 514 | 109: or %g7, %lo(109b), %g7 |
515 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
516 | call trace_hardirqs_off | ||
517 | nop | ||
518 | #endif | ||
511 | call __show_regs | 519 | call __show_regs |
512 | add %sp, PTREGS_OFF, %o0 | 520 | add %sp, PTREGS_OFF, %o0 |
513 | clr %l6 | 521 | clr %l6 |
diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c index 12a940cc791f..61be597bf430 100644 --- a/arch/sparc64/solaris/fs.c +++ b/arch/sparc64/solaris/fs.c | |||
@@ -449,7 +449,7 @@ asmlinkage int solaris_fstatvfs(unsigned int fd, u32 buf) | |||
449 | error = -EBADF; | 449 | error = -EBADF; |
450 | file = fget(fd); | 450 | file = fget(fd); |
451 | if (file) { | 451 | if (file) { |
452 | error = report_statvfs(file->f_vfsmnt, file->f_dentry->d_inode, buf); | 452 | error = report_statvfs(file->f_path.mnt, file->f_path.dentry->d_inode, buf); |
453 | fput(file); | 453 | fput(file); |
454 | } | 454 | } |
455 | 455 | ||
@@ -481,7 +481,7 @@ asmlinkage int solaris_fstatvfs64(unsigned int fd, u32 buf) | |||
481 | file = fget(fd); | 481 | file = fget(fd); |
482 | if (file) { | 482 | if (file) { |
483 | lock_kernel(); | 483 | lock_kernel(); |
484 | error = report_statvfs64(file->f_vfsmnt, file->f_dentry->d_inode, buf); | 484 | error = report_statvfs64(file->f_path.mnt, file->f_path.dentry->d_inode, buf); |
485 | unlock_kernel(); | 485 | unlock_kernel(); |
486 | fput(file); | 486 | fput(file); |
487 | } | 487 | } |
diff --git a/arch/sparc64/solaris/ioctl.c b/arch/sparc64/solaris/ioctl.c index be0a054e3ed6..330743c5b3d8 100644 --- a/arch/sparc64/solaris/ioctl.c +++ b/arch/sparc64/solaris/ioctl.c | |||
@@ -299,8 +299,8 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) | |||
299 | rcu_read_lock(); | 299 | rcu_read_lock(); |
300 | fdt = files_fdtable(current->files); | 300 | fdt = files_fdtable(current->files); |
301 | if (! fdt->fd[fd] || | 301 | if (! fdt->fd[fd] || |
302 | ! fdt->fd[fd]->f_dentry || | 302 | ! fdt->fd[fd]->f_path.dentry || |
303 | ! (ino = fdt->fd[fd]->f_dentry->d_inode) || | 303 | ! (ino = fdt->fd[fd]->f_path.dentry->d_inode) || |
304 | ! S_ISSOCK(ino->i_mode)) { | 304 | ! S_ISSOCK(ino->i_mode)) { |
305 | rcu_read_unlock(); | 305 | rcu_read_unlock(); |
306 | return TBADF; | 306 | return TBADF; |
@@ -480,7 +480,7 @@ static inline int solaris_S(struct file *filp, unsigned int fd, unsigned int cmd | |||
480 | struct sol_socket_struct *sock; | 480 | struct sol_socket_struct *sock; |
481 | struct module_info *mi; | 481 | struct module_info *mi; |
482 | 482 | ||
483 | ino = filp->f_dentry->d_inode; | 483 | ino = filp->f_path.dentry->d_inode; |
484 | if (!S_ISSOCK(ino->i_mode)) | 484 | if (!S_ISSOCK(ino->i_mode)) |
485 | return -EBADF; | 485 | return -EBADF; |
486 | sock = filp->private_data; | 486 | sock = filp->private_data; |
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 9ed997982f8d..bca16e8c95c3 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c | |||
@@ -77,7 +77,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o | |||
77 | if (!file) | 77 | if (!file) |
78 | goto out; | 78 | goto out; |
79 | else { | 79 | else { |
80 | struct inode * inode = file->f_dentry->d_inode; | 80 | struct inode * inode = file->f_path.dentry->d_inode; |
81 | if(imajor(inode) == MEM_MAJOR && | 81 | if(imajor(inode) == MEM_MAJOR && |
82 | iminor(inode) == 5) { | 82 | iminor(inode) == 5) { |
83 | flags |= MAP_ANONYMOUS; | 83 | flags |= MAP_ANONYMOUS; |
@@ -423,9 +423,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) | |||
423 | Solaris setpgrp and setsid? */ | 423 | Solaris setpgrp and setsid? */ |
424 | ret = sys_setpgid(0, 0); | 424 | ret = sys_setpgid(0, 0); |
425 | if (ret) return ret; | 425 | if (ret) return ret; |
426 | mutex_lock(&tty_mutex); | 426 | proc_clear_tty(current); |
427 | current->signal->tty = NULL; | ||
428 | mutex_unlock(&tty_mutex); | ||
429 | return process_group(current); | 427 | return process_group(current); |
430 | } | 428 | } |
431 | case 2: /* getsid */ | 429 | case 2: /* getsid */ |
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c index 7c90e41fd3be..89a4757f192f 100644 --- a/arch/sparc64/solaris/socksys.c +++ b/arch/sparc64/solaris/socksys.c | |||
@@ -96,13 +96,13 @@ static int socksys_open(struct inode * inode, struct file * filp) | |||
96 | * No shit. WTF is it supposed to do, anyway? | 96 | * No shit. WTF is it supposed to do, anyway? |
97 | * | 97 | * |
98 | * Try instead: | 98 | * Try instead: |
99 | * d_delete(filp->f_dentry), then d_instantiate with sock inode | 99 | * d_delete(filp->f_path.dentry), then d_instantiate with sock inode |
100 | */ | 100 | */ |
101 | dentry = filp->f_dentry; | 101 | dentry = filp->f_path.dentry; |
102 | filp->f_dentry = dget(fcheck(fd)->f_dentry); | 102 | filp->f_path.dentry = dget(fcheck(fd)->f_path.dentry); |
103 | filp->f_dentry->d_inode->i_rdev = inode->i_rdev; | 103 | filp->f_path.dentry->d_inode->i_rdev = inode->i_rdev; |
104 | filp->f_dentry->d_inode->i_flock = inode->i_flock; | 104 | filp->f_path.dentry->d_inode->i_flock = inode->i_flock; |
105 | SOCKET_I(filp->f_dentry->d_inode)->file = filp; | 105 | SOCKET_I(filp->f_path.dentry->d_inode)->file = filp; |
106 | filp->f_op = &socksys_file_ops; | 106 | filp->f_op = &socksys_file_ops; |
107 | sock = (struct sol_socket_struct*) | 107 | sock = (struct sol_socket_struct*) |
108 | mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); | 108 | mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); |
@@ -148,7 +148,7 @@ static unsigned int socksys_poll(struct file * filp, poll_table * wait) | |||
148 | struct inode *ino; | 148 | struct inode *ino; |
149 | unsigned int mask = 0; | 149 | unsigned int mask = 0; |
150 | 150 | ||
151 | ino=filp->f_dentry->d_inode; | 151 | ino=filp->f_path.dentry->d_inode; |
152 | if (ino && S_ISSOCK(ino->i_mode)) { | 152 | if (ino && S_ISSOCK(ino->i_mode)) { |
153 | struct sol_socket_struct *sock; | 153 | struct sol_socket_struct *sock; |
154 | sock = (struct sol_socket_struct*)filp->private_data; | 154 | sock = (struct sol_socket_struct*)filp->private_data; |
diff --git a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c index b84e5456b025..a9d32ceabf26 100644 --- a/arch/sparc64/solaris/timod.c +++ b/arch/sparc64/solaris/timod.c | |||
@@ -147,7 +147,7 @@ static void timod_wake_socket(unsigned int fd) | |||
147 | 147 | ||
148 | SOLD("wakeing socket"); | 148 | SOLD("wakeing socket"); |
149 | fdt = files_fdtable(current->files); | 149 | fdt = files_fdtable(current->files); |
150 | sock = SOCKET_I(fdt->fd[fd]->f_dentry->d_inode); | 150 | sock = SOCKET_I(fdt->fd[fd]->f_path.dentry->d_inode); |
151 | wake_up_interruptible(&sock->wait); | 151 | wake_up_interruptible(&sock->wait); |
152 | read_lock(&sock->sk->sk_callback_lock); | 152 | read_lock(&sock->sk->sk_callback_lock); |
153 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) | 153 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) |
@@ -361,7 +361,7 @@ int timod_putmsg(unsigned int fd, char __user *ctl_buf, int ctl_len, | |||
361 | 361 | ||
362 | fdt = files_fdtable(current->files); | 362 | fdt = files_fdtable(current->files); |
363 | filp = fdt->fd[fd]; | 363 | filp = fdt->fd[fd]; |
364 | ino = filp->f_dentry->d_inode; | 364 | ino = filp->f_path.dentry->d_inode; |
365 | sock = (struct sol_socket_struct *)filp->private_data; | 365 | sock = (struct sol_socket_struct *)filp->private_data; |
366 | SOLD("entry"); | 366 | SOLD("entry"); |
367 | if (get_user(ret, (int __user *)A(ctl_buf))) | 367 | if (get_user(ret, (int __user *)A(ctl_buf))) |
@@ -644,7 +644,7 @@ int timod_getmsg(unsigned int fd, char __user *ctl_buf, int ctl_maxlen, s32 __us | |||
644 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); | 644 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); |
645 | fdt = files_fdtable(current->files); | 645 | fdt = files_fdtable(current->files); |
646 | filp = fdt->fd[fd]; | 646 | filp = fdt->fd[fd]; |
647 | ino = filp->f_dentry->d_inode; | 647 | ino = filp->f_path.dentry->d_inode; |
648 | sock = (struct sol_socket_struct *)filp->private_data; | 648 | sock = (struct sol_socket_struct *)filp->private_data; |
649 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); | 649 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); |
650 | if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM | 650 | if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM |
@@ -865,7 +865,7 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
865 | filp = fdt->fd[fd]; | 865 | filp = fdt->fd[fd]; |
866 | if(!filp) goto out; | 866 | if(!filp) goto out; |
867 | 867 | ||
868 | ino = filp->f_dentry->d_inode; | 868 | ino = filp->f_path.dentry->d_inode; |
869 | if (!ino || !S_ISSOCK(ino->i_mode)) | 869 | if (!ino || !S_ISSOCK(ino->i_mode)) |
870 | goto out; | 870 | goto out; |
871 | 871 | ||
@@ -933,7 +933,7 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
933 | filp = fdt->fd[fd]; | 933 | filp = fdt->fd[fd]; |
934 | if(!filp) goto out; | 934 | if(!filp) goto out; |
935 | 935 | ||
936 | ino = filp->f_dentry->d_inode; | 936 | ino = filp->f_path.dentry->d_inode; |
937 | if (!ino) goto out; | 937 | if (!ino) goto out; |
938 | 938 | ||
939 | if (!S_ISSOCK(ino->i_mode) && | 939 | if (!S_ISSOCK(ino->i_mode) && |