aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/configs/sparc32_defconfig56
-rw-r--r--arch/sparc/configs/sparc64_defconfig34
-rw-r--r--arch/sparc/include/asm/io_32.h4
-rw-r--r--arch/sparc/include/asm/io_64.h4
-rw-r--r--arch/sparc/include/asm/perfctr.h4
-rw-r--r--arch/sparc/include/asm/system_64.h15
-rw-r--r--arch/sparc/include/asm/thread_info_64.h25
-rw-r--r--arch/sparc/kernel/entry.h1
-rw-r--r--arch/sparc/kernel/process_64.c23
-rw-r--r--arch/sparc/kernel/rtrap_64.S54
-rw-r--r--arch/sparc/kernel/sys32.S1
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c104
-rw-r--r--arch/sparc/kernel/syscalls.S23
-rw-r--r--arch/sparc/kernel/systbls.h2
-rw-r--r--arch/sparc/kernel/systbls_64.S4
-rw-r--r--arch/sparc/kernel/traps_64.c9
-rw-r--r--arch/sparc/prom/p1275.c12
17 files changed, 99 insertions, 276 deletions
diff --git a/arch/sparc/configs/sparc32_defconfig b/arch/sparc/configs/sparc32_defconfig
index 99a1f191497b..6a8d078070ca 100644
--- a/arch/sparc/configs/sparc32_defconfig
+++ b/arch/sparc/configs/sparc32_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.33-rc2 3# Linux kernel version: 2.6.33
4# Mon Jan 11 23:20:31 2010 4# Wed Mar 3 02:52:23 2010
5# 5#
6# CONFIG_64BIT is not set 6# CONFIG_64BIT is not set
7CONFIG_SPARC=y 7CONFIG_SPARC=y
@@ -9,6 +9,8 @@ CONFIG_SPARC32=y
9# CONFIG_SPARC64 is not set 9# CONFIG_SPARC64 is not set
10CONFIG_ARCH_DEFCONFIG="arch/sparc/configs/sparc32_defconfig" 10CONFIG_ARCH_DEFCONFIG="arch/sparc/configs/sparc32_defconfig"
11CONFIG_BITS=32 11CONFIG_BITS=32
12CONFIG_GENERIC_TIME=y
13CONFIG_ARCH_USES_GETTIMEOFFSET=y
12CONFIG_AUDIT_ARCH=y 14CONFIG_AUDIT_ARCH=y
13CONFIG_MMU=y 15CONFIG_MMU=y
14CONFIG_HIGHMEM=y 16CONFIG_HIGHMEM=y
@@ -48,11 +50,6 @@ CONFIG_RCU_FANOUT=32
48# CONFIG_TREE_RCU_TRACE is not set 50# CONFIG_TREE_RCU_TRACE is not set
49# CONFIG_IKCONFIG is not set 51# CONFIG_IKCONFIG is not set
50CONFIG_LOG_BUF_SHIFT=14 52CONFIG_LOG_BUF_SHIFT=14
51CONFIG_GROUP_SCHED=y
52CONFIG_FAIR_GROUP_SCHED=y
53CONFIG_RT_GROUP_SCHED=y
54CONFIG_USER_SCHED=y
55# CONFIG_CGROUP_SCHED is not set
56# CONFIG_CGROUPS is not set 53# CONFIG_CGROUPS is not set
57CONFIG_SYSFS_DEPRECATED=y 54CONFIG_SYSFS_DEPRECATED=y
58CONFIG_SYSFS_DEPRECATED_V2=y 55CONFIG_SYSFS_DEPRECATED_V2=y
@@ -68,6 +65,7 @@ CONFIG_INITRAMFS_SOURCE=""
68CONFIG_RD_GZIP=y 65CONFIG_RD_GZIP=y
69CONFIG_RD_BZIP2=y 66CONFIG_RD_BZIP2=y
70CONFIG_RD_LZMA=y 67CONFIG_RD_LZMA=y
68CONFIG_RD_LZO=y
71# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
72CONFIG_SYSCTL=y 70CONFIG_SYSCTL=y
73CONFIG_ANON_INODES=y 71CONFIG_ANON_INODES=y
@@ -211,7 +209,6 @@ CONFIG_SBUSCHAR=y
211CONFIG_PCI=y 209CONFIG_PCI=y
212CONFIG_PCI_SYSCALL=y 210CONFIG_PCI_SYSCALL=y
213# CONFIG_ARCH_SUPPORTS_MSI is not set 211# CONFIG_ARCH_SUPPORTS_MSI is not set
214CONFIG_PCI_LEGACY=y
215# CONFIG_PCI_DEBUG is not set 212# CONFIG_PCI_DEBUG is not set
216# CONFIG_PCI_STUB is not set 213# CONFIG_PCI_STUB is not set
217# CONFIG_PCI_IOV is not set 214# CONFIG_PCI_IOV is not set
@@ -232,7 +229,6 @@ CONFIG_NET=y
232# Networking options 229# Networking options
233# 230#
234CONFIG_PACKET=y 231CONFIG_PACKET=y
235# CONFIG_PACKET_MMAP is not set
236CONFIG_UNIX=y 232CONFIG_UNIX=y
237CONFIG_XFRM=y 233CONFIG_XFRM=y
238CONFIG_XFRM_USER=m 234CONFIG_XFRM_USER=m
@@ -379,11 +375,13 @@ CONFIG_MISC_DEVICES=y
379# CONFIG_TIFM_CORE is not set 375# CONFIG_TIFM_CORE is not set
380# CONFIG_ENCLOSURE_SERVICES is not set 376# CONFIG_ENCLOSURE_SERVICES is not set
381# CONFIG_HP_ILO is not set 377# CONFIG_HP_ILO is not set
378# CONFIG_TI_DAC7512 is not set
382# CONFIG_C2PORT is not set 379# CONFIG_C2PORT is not set
383 380
384# 381#
385# EEPROM support 382# EEPROM support
386# 383#
384# CONFIG_EEPROM_AT25 is not set
387# CONFIG_EEPROM_93CX6 is not set 385# CONFIG_EEPROM_93CX6 is not set
388# CONFIG_CB710_CORE is not set 386# CONFIG_CB710_CORE is not set
389CONFIG_HAVE_IDE=y 387CONFIG_HAVE_IDE=y
@@ -507,7 +505,9 @@ CONFIG_SUNQE=m
507# CONFIG_SUNGEM is not set 505# CONFIG_SUNGEM is not set
508# CONFIG_CASSINI is not set 506# CONFIG_CASSINI is not set
509# CONFIG_NET_VENDOR_3COM is not set 507# CONFIG_NET_VENDOR_3COM is not set
508# CONFIG_ENC28J60 is not set
510# CONFIG_ETHOC is not set 509# CONFIG_ETHOC is not set
510# CONFIG_GRETH is not set
511# CONFIG_DNET is not set 511# CONFIG_DNET is not set
512# CONFIG_NET_TULIP is not set 512# CONFIG_NET_TULIP is not set
513# CONFIG_HP100 is not set 513# CONFIG_HP100 is not set
@@ -521,6 +521,7 @@ CONFIG_SUNQE=m
521# CONFIG_NET_PCI is not set 521# CONFIG_NET_PCI is not set
522# CONFIG_B44 is not set 522# CONFIG_B44 is not set
523# CONFIG_KS8842 is not set 523# CONFIG_KS8842 is not set
524# CONFIG_KS8851 is not set
524# CONFIG_KS8851_MLL is not set 525# CONFIG_KS8851_MLL is not set
525# CONFIG_ATL2 is not set 526# CONFIG_ATL2 is not set
526CONFIG_NETDEV_1000=y 527CONFIG_NETDEV_1000=y
@@ -563,6 +564,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
563# CONFIG_MLX4_CORE is not set 564# CONFIG_MLX4_CORE is not set
564# CONFIG_TEHUTI is not set 565# CONFIG_TEHUTI is not set
565# CONFIG_BNX2X is not set 566# CONFIG_BNX2X is not set
567# CONFIG_QLCNIC is not set
566# CONFIG_QLGE is not set 568# CONFIG_QLGE is not set
567# CONFIG_SFC is not set 569# CONFIG_SFC is not set
568# CONFIG_BE2NET is not set 570# CONFIG_BE2NET is not set
@@ -665,6 +667,7 @@ CONFIG_DEVKMEM=y
665# 667#
666# Non-8250 serial port support 668# Non-8250 serial port support
667# 669#
670# CONFIG_SERIAL_MAX3100 is not set
668CONFIG_SERIAL_SUNCORE=y 671CONFIG_SERIAL_SUNCORE=y
669CONFIG_SERIAL_SUNZILOG=y 672CONFIG_SERIAL_SUNZILOG=y
670CONFIG_SERIAL_SUNZILOG_CONSOLE=y 673CONFIG_SERIAL_SUNZILOG_CONSOLE=y
@@ -689,7 +692,23 @@ CONFIG_HW_RANDOM=m
689# CONFIG_TCG_TPM is not set 692# CONFIG_TCG_TPM is not set
690CONFIG_DEVPORT=y 693CONFIG_DEVPORT=y
691# CONFIG_I2C is not set 694# CONFIG_I2C is not set
692# CONFIG_SPI is not set 695CONFIG_SPI=y
696# CONFIG_SPI_DEBUG is not set
697CONFIG_SPI_MASTER=y
698
699#
700# SPI Master Controller Drivers
701#
702CONFIG_SPI_BITBANG=m
703CONFIG_SPI_XILINX=m
704CONFIG_SPI_XILINX_PLTFM=m
705# CONFIG_SPI_DESIGNWARE is not set
706
707#
708# SPI Protocol Masters
709#
710# CONFIG_SPI_SPIDEV is not set
711# CONFIG_SPI_TLE62X0 is not set
693 712
694# 713#
695# PPS support 714# PPS support
@@ -706,10 +725,13 @@ CONFIG_HWMON=y
706# 725#
707# Native drivers 726# Native drivers
708# 727#
728# CONFIG_SENSORS_ADCXX is not set
709# CONFIG_SENSORS_I5K_AMB is not set 729# CONFIG_SENSORS_I5K_AMB is not set
710# CONFIG_SENSORS_F71805F is not set 730# CONFIG_SENSORS_F71805F is not set
711# CONFIG_SENSORS_F71882FG is not set 731# CONFIG_SENSORS_F71882FG is not set
712# CONFIG_SENSORS_IT87 is not set 732# CONFIG_SENSORS_IT87 is not set
733# CONFIG_SENSORS_LM70 is not set
734# CONFIG_SENSORS_MAX1111 is not set
713# CONFIG_SENSORS_PC87360 is not set 735# CONFIG_SENSORS_PC87360 is not set
714# CONFIG_SENSORS_PC87427 is not set 736# CONFIG_SENSORS_PC87427 is not set
715# CONFIG_SENSORS_SIS5595 is not set 737# CONFIG_SENSORS_SIS5595 is not set
@@ -720,6 +742,7 @@ CONFIG_HWMON=y
720# CONFIG_SENSORS_VT8231 is not set 742# CONFIG_SENSORS_VT8231 is not set
721# CONFIG_SENSORS_W83627HF is not set 743# CONFIG_SENSORS_W83627HF is not set
722# CONFIG_SENSORS_W83627EHF is not set 744# CONFIG_SENSORS_W83627EHF is not set
745# CONFIG_SENSORS_LIS3_SPI is not set
723# CONFIG_THERMAL is not set 746# CONFIG_THERMAL is not set
724# CONFIG_WATCHDOG is not set 747# CONFIG_WATCHDOG is not set
725CONFIG_SSB_POSSIBLE=y 748CONFIG_SSB_POSSIBLE=y
@@ -736,6 +759,8 @@ CONFIG_SSB_POSSIBLE=y
736# CONFIG_MFD_SM501 is not set 759# CONFIG_MFD_SM501 is not set
737# CONFIG_HTC_PASIC3 is not set 760# CONFIG_HTC_PASIC3 is not set
738# CONFIG_MFD_TMIO is not set 761# CONFIG_MFD_TMIO is not set
762# CONFIG_MFD_MC13783 is not set
763# CONFIG_AB4500_CORE is not set
739# CONFIG_REGULATOR is not set 764# CONFIG_REGULATOR is not set
740# CONFIG_MEDIA_SUPPORT is not set 765# CONFIG_MEDIA_SUPPORT is not set
741 766
@@ -743,6 +768,7 @@ CONFIG_SSB_POSSIBLE=y
743# Graphics support 768# Graphics support
744# 769#
745CONFIG_VGA_ARB=y 770CONFIG_VGA_ARB=y
771CONFIG_VGA_ARB_MAX_GPUS=16
746# CONFIG_VGASTATE is not set 772# CONFIG_VGASTATE is not set
747# CONFIG_VIDEO_OUTPUT_CONTROL is not set 773# CONFIG_VIDEO_OUTPUT_CONTROL is not set
748# CONFIG_FB is not set 774# CONFIG_FB is not set
@@ -808,6 +834,14 @@ CONFIG_RTC_INTF_DEV=y
808# 834#
809# SPI RTC drivers 835# SPI RTC drivers
810# 836#
837# CONFIG_RTC_DRV_M41T94 is not set
838# CONFIG_RTC_DRV_DS1305 is not set
839# CONFIG_RTC_DRV_DS1390 is not set
840# CONFIG_RTC_DRV_MAX6902 is not set
841# CONFIG_RTC_DRV_R9701 is not set
842# CONFIG_RTC_DRV_RS5C348 is not set
843# CONFIG_RTC_DRV_DS3234 is not set
844# CONFIG_RTC_DRV_PCF2123 is not set
811 845
812# 846#
813# Platform RTC drivers 847# Platform RTC drivers
@@ -1180,9 +1214,11 @@ CONFIG_CRC32=y
1180CONFIG_LIBCRC32C=m 1214CONFIG_LIBCRC32C=m
1181CONFIG_ZLIB_INFLATE=y 1215CONFIG_ZLIB_INFLATE=y
1182CONFIG_ZLIB_DEFLATE=y 1216CONFIG_ZLIB_DEFLATE=y
1217CONFIG_LZO_DECOMPRESS=y
1183CONFIG_DECOMPRESS_GZIP=y 1218CONFIG_DECOMPRESS_GZIP=y
1184CONFIG_DECOMPRESS_BZIP2=y 1219CONFIG_DECOMPRESS_BZIP2=y
1185CONFIG_DECOMPRESS_LZMA=y 1220CONFIG_DECOMPRESS_LZMA=y
1221CONFIG_DECOMPRESS_LZO=y
1186CONFIG_HAS_IOMEM=y 1222CONFIG_HAS_IOMEM=y
1187CONFIG_HAS_IOPORT=y 1223CONFIG_HAS_IOPORT=y
1188CONFIG_HAS_DMA=y 1224CONFIG_HAS_DMA=y
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
index 41c5a56aa6f2..56e3163673e3 100644
--- a/arch/sparc/configs/sparc64_defconfig
+++ b/arch/sparc/configs/sparc64_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.33-rc2 3# Linux kernel version: 2.6.33
4# Wed Jan 20 16:31:47 2010 4# Wed Mar 3 02:54:29 2010
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_SPARC=y 7CONFIG_SPARC=y
@@ -55,14 +55,10 @@ CONFIG_TREE_RCU=y
55# CONFIG_RCU_TRACE is not set 55# CONFIG_RCU_TRACE is not set
56CONFIG_RCU_FANOUT=64 56CONFIG_RCU_FANOUT=64
57# CONFIG_RCU_FANOUT_EXACT is not set 57# CONFIG_RCU_FANOUT_EXACT is not set
58# CONFIG_RCU_FAST_NO_HZ is not set
58# CONFIG_TREE_RCU_TRACE is not set 59# CONFIG_TREE_RCU_TRACE is not set
59# CONFIG_IKCONFIG is not set 60# CONFIG_IKCONFIG is not set
60CONFIG_LOG_BUF_SHIFT=18 61CONFIG_LOG_BUF_SHIFT=18
61CONFIG_GROUP_SCHED=y
62CONFIG_FAIR_GROUP_SCHED=y
63CONFIG_RT_GROUP_SCHED=y
64CONFIG_USER_SCHED=y
65# CONFIG_CGROUP_SCHED is not set
66# CONFIG_CGROUPS is not set 62# CONFIG_CGROUPS is not set
67# CONFIG_SYSFS_DEPRECATED_V2 is not set 63# CONFIG_SYSFS_DEPRECATED_V2 is not set
68CONFIG_RELAY=y 64CONFIG_RELAY=y
@@ -77,6 +73,7 @@ CONFIG_INITRAMFS_SOURCE=""
77CONFIG_RD_GZIP=y 73CONFIG_RD_GZIP=y
78CONFIG_RD_BZIP2=y 74CONFIG_RD_BZIP2=y
79CONFIG_RD_LZMA=y 75CONFIG_RD_LZMA=y
76CONFIG_RD_LZO=y
80CONFIG_CC_OPTIMIZE_FOR_SIZE=y 77CONFIG_CC_OPTIMIZE_FOR_SIZE=y
81CONFIG_SYSCTL=y 78CONFIG_SYSCTL=y
82CONFIG_ANON_INODES=y 79CONFIG_ANON_INODES=y
@@ -105,7 +102,6 @@ CONFIG_PERF_USE_VMALLOC=y
105# Kernel Performance Events And Counters 102# Kernel Performance Events And Counters
106# 103#
107CONFIG_PERF_EVENTS=y 104CONFIG_PERF_EVENTS=y
108CONFIG_EVENT_PROFILE=y
109CONFIG_PERF_COUNTERS=y 105CONFIG_PERF_COUNTERS=y
110# CONFIG_DEBUG_PERF_USE_VMALLOC is not set 106# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
111CONFIG_VM_EVENT_COUNTERS=y 107CONFIG_VM_EVENT_COUNTERS=y
@@ -266,7 +262,6 @@ CONFIG_PCI_DOMAINS=y
266CONFIG_PCI_SYSCALL=y 262CONFIG_PCI_SYSCALL=y
267CONFIG_ARCH_SUPPORTS_MSI=y 263CONFIG_ARCH_SUPPORTS_MSI=y
268CONFIG_PCI_MSI=y 264CONFIG_PCI_MSI=y
269# CONFIG_PCI_LEGACY is not set
270# CONFIG_PCI_DEBUG is not set 265# CONFIG_PCI_DEBUG is not set
271# CONFIG_PCI_STUB is not set 266# CONFIG_PCI_STUB is not set
272# CONFIG_PCI_IOV is not set 267# CONFIG_PCI_IOV is not set
@@ -290,7 +285,6 @@ CONFIG_NET=y
290# Networking options 285# Networking options
291# 286#
292CONFIG_PACKET=y 287CONFIG_PACKET=y
293CONFIG_PACKET_MMAP=y
294CONFIG_UNIX=y 288CONFIG_UNIX=y
295CONFIG_XFRM=y 289CONFIG_XFRM=y
296CONFIG_XFRM_USER=m 290CONFIG_XFRM_USER=m
@@ -425,10 +419,6 @@ CONFIG_BLK_DEV=y
425# CONFIG_BLK_DEV_COW_COMMON is not set 419# CONFIG_BLK_DEV_COW_COMMON is not set
426CONFIG_BLK_DEV_LOOP=m 420CONFIG_BLK_DEV_LOOP=m
427CONFIG_BLK_DEV_CRYPTOLOOP=m 421CONFIG_BLK_DEV_CRYPTOLOOP=m
428
429#
430# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
431#
432# CONFIG_BLK_DEV_DRBD is not set 422# CONFIG_BLK_DEV_DRBD is not set
433CONFIG_BLK_DEV_NBD=m 423CONFIG_BLK_DEV_NBD=m
434# CONFIG_BLK_DEV_SX8 is not set 424# CONFIG_BLK_DEV_SX8 is not set
@@ -677,6 +667,7 @@ CONFIG_SUNGEM=m
677CONFIG_SUNVNET=m 667CONFIG_SUNVNET=m
678# CONFIG_NET_VENDOR_3COM is not set 668# CONFIG_NET_VENDOR_3COM is not set
679# CONFIG_ETHOC is not set 669# CONFIG_ETHOC is not set
670# CONFIG_GRETH is not set
680# CONFIG_DNET is not set 671# CONFIG_DNET is not set
681# CONFIG_NET_TULIP is not set 672# CONFIG_NET_TULIP is not set
682# CONFIG_HP100 is not set 673# CONFIG_HP100 is not set
@@ -691,6 +682,7 @@ CONFIG_NET_PCI=y
691# CONFIG_PCNET32 is not set 682# CONFIG_PCNET32 is not set
692# CONFIG_AMD8111_ETH is not set 683# CONFIG_AMD8111_ETH is not set
693# CONFIG_ADAPTEC_STARFIRE is not set 684# CONFIG_ADAPTEC_STARFIRE is not set
685# CONFIG_KSZ884X_PCI is not set
694# CONFIG_B44 is not set 686# CONFIG_B44 is not set
695# CONFIG_FORCEDETH is not set 687# CONFIG_FORCEDETH is not set
696# CONFIG_E100 is not set 688# CONFIG_E100 is not set
@@ -741,6 +733,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
741# CONFIG_CHELSIO_T3 is not set 733# CONFIG_CHELSIO_T3 is not set
742# CONFIG_ENIC is not set 734# CONFIG_ENIC is not set
743# CONFIG_IXGBE is not set 735# CONFIG_IXGBE is not set
736# CONFIG_IXGBEVF is not set
744# CONFIG_IXGB is not set 737# CONFIG_IXGB is not set
745# CONFIG_S2IO is not set 738# CONFIG_S2IO is not set
746# CONFIG_VXGE is not set 739# CONFIG_VXGE is not set
@@ -751,6 +744,7 @@ CONFIG_NIU=m
751# CONFIG_MLX4_CORE is not set 744# CONFIG_MLX4_CORE is not set
752# CONFIG_TEHUTI is not set 745# CONFIG_TEHUTI is not set
753# CONFIG_BNX2X is not set 746# CONFIG_BNX2X is not set
747# CONFIG_QLCNIC is not set
754# CONFIG_QLGE is not set 748# CONFIG_QLGE is not set
755# CONFIG_SFC is not set 749# CONFIG_SFC is not set
756# CONFIG_BE2NET is not set 750# CONFIG_BE2NET is not set
@@ -1028,6 +1022,7 @@ CONFIG_HWMON=y
1028# CONFIG_SENSORS_SMSC47M192 is not set 1022# CONFIG_SENSORS_SMSC47M192 is not set
1029# CONFIG_SENSORS_SMSC47B397 is not set 1023# CONFIG_SENSORS_SMSC47B397 is not set
1030# CONFIG_SENSORS_ADS7828 is not set 1024# CONFIG_SENSORS_ADS7828 is not set
1025# CONFIG_SENSORS_AMC6821 is not set
1031# CONFIG_SENSORS_THMC50 is not set 1026# CONFIG_SENSORS_THMC50 is not set
1032# CONFIG_SENSORS_TMP401 is not set 1027# CONFIG_SENSORS_TMP401 is not set
1033# CONFIG_SENSORS_TMP421 is not set 1028# CONFIG_SENSORS_TMP421 is not set
@@ -1076,6 +1071,7 @@ CONFIG_SSB_POSSIBLE=y
1076# Graphics support 1071# Graphics support
1077# 1072#
1078CONFIG_VGA_ARB=y 1073CONFIG_VGA_ARB=y
1074CONFIG_VGA_ARB_MAX_GPUS=16
1079# CONFIG_DRM is not set 1075# CONFIG_DRM is not set
1080# CONFIG_VGASTATE is not set 1076# CONFIG_VGASTATE is not set
1081# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1077# CONFIG_VIDEO_OUTPUT_CONTROL is not set
@@ -1279,6 +1275,7 @@ CONFIG_SND_ALI5451=m
1279# CONFIG_SND_YMFPCI is not set 1275# CONFIG_SND_YMFPCI is not set
1280CONFIG_SND_USB=y 1276CONFIG_SND_USB=y
1281# CONFIG_SND_USB_AUDIO is not set 1277# CONFIG_SND_USB_AUDIO is not set
1278# CONFIG_SND_USB_UA101 is not set
1282# CONFIG_SND_USB_CAIAQ is not set 1279# CONFIG_SND_USB_CAIAQ is not set
1283CONFIG_SND_SPARC=y 1280CONFIG_SND_SPARC=y
1284# CONFIG_SND_SUN_AMD7930 is not set 1281# CONFIG_SND_SUN_AMD7930 is not set
@@ -1301,6 +1298,7 @@ CONFIG_USB_HIDDEV=y
1301# 1298#
1302# Special HID drivers 1299# Special HID drivers
1303# 1300#
1301# CONFIG_HID_3M_PCT is not set
1304CONFIG_HID_A4TECH=y 1302CONFIG_HID_A4TECH=y
1305CONFIG_HID_APPLE=y 1303CONFIG_HID_APPLE=y
1306CONFIG_HID_BELKIN=y 1304CONFIG_HID_BELKIN=y
@@ -1317,14 +1315,19 @@ CONFIG_HID_KENSINGTON=y
1317CONFIG_HID_LOGITECH=y 1315CONFIG_HID_LOGITECH=y
1318# CONFIG_LOGITECH_FF is not set 1316# CONFIG_LOGITECH_FF is not set
1319# CONFIG_LOGIRUMBLEPAD2_FF is not set 1317# CONFIG_LOGIRUMBLEPAD2_FF is not set
1318# CONFIG_LOGIG940_FF is not set
1320CONFIG_HID_MICROSOFT=y 1319CONFIG_HID_MICROSOFT=y
1320# CONFIG_HID_MOSART is not set
1321CONFIG_HID_MONTEREY=y 1321CONFIG_HID_MONTEREY=y
1322CONFIG_HID_NTRIG=y 1322CONFIG_HID_NTRIG=y
1323CONFIG_HID_ORTEK=y
1323CONFIG_HID_PANTHERLORD=y 1324CONFIG_HID_PANTHERLORD=y
1324# CONFIG_PANTHERLORD_FF is not set 1325# CONFIG_PANTHERLORD_FF is not set
1325CONFIG_HID_PETALYNX=y 1326CONFIG_HID_PETALYNX=y
1327# CONFIG_HID_QUANTA is not set
1326CONFIG_HID_SAMSUNG=y 1328CONFIG_HID_SAMSUNG=y
1327CONFIG_HID_SONY=y 1329CONFIG_HID_SONY=y
1330# CONFIG_HID_STANTUM is not set
1328CONFIG_HID_SUNPLUS=y 1331CONFIG_HID_SUNPLUS=y
1329CONFIG_HID_GREENASIA=y 1332CONFIG_HID_GREENASIA=y
1330# CONFIG_GREENASIA_FF is not set 1333# CONFIG_GREENASIA_FF is not set
@@ -1807,6 +1810,7 @@ CONFIG_CRYPTO_MANAGER=y
1807CONFIG_CRYPTO_MANAGER2=y 1810CONFIG_CRYPTO_MANAGER2=y
1808CONFIG_CRYPTO_GF128MUL=m 1811CONFIG_CRYPTO_GF128MUL=m
1809CONFIG_CRYPTO_NULL=m 1812CONFIG_CRYPTO_NULL=m
1813# CONFIG_CRYPTO_PCRYPT is not set
1810CONFIG_CRYPTO_WORKQUEUE=y 1814CONFIG_CRYPTO_WORKQUEUE=y
1811# CONFIG_CRYPTO_CRYPTD is not set 1815# CONFIG_CRYPTO_CRYPTD is not set
1812CONFIG_CRYPTO_AUTHENC=y 1816CONFIG_CRYPTO_AUTHENC=y
@@ -1904,9 +1908,11 @@ CONFIG_CRC32=y
1904CONFIG_LIBCRC32C=m 1908CONFIG_LIBCRC32C=m
1905CONFIG_ZLIB_INFLATE=y 1909CONFIG_ZLIB_INFLATE=y
1906CONFIG_ZLIB_DEFLATE=y 1910CONFIG_ZLIB_DEFLATE=y
1911CONFIG_LZO_DECOMPRESS=y
1907CONFIG_DECOMPRESS_GZIP=y 1912CONFIG_DECOMPRESS_GZIP=y
1908CONFIG_DECOMPRESS_BZIP2=y 1913CONFIG_DECOMPRESS_BZIP2=y
1909CONFIG_DECOMPRESS_LZMA=y 1914CONFIG_DECOMPRESS_LZMA=y
1915CONFIG_DECOMPRESS_LZO=y
1910CONFIG_HAS_IOMEM=y 1916CONFIG_HAS_IOMEM=y
1911CONFIG_HAS_IOPORT=y 1917CONFIG_HAS_IOPORT=y
1912CONFIG_HAS_DMA=y 1918CONFIG_HAS_DMA=y
diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
index 679c7504625a..2889574608db 100644
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -249,10 +249,14 @@ extern void iounmap(volatile void __iomem *addr);
249 249
250#define ioread8(X) readb(X) 250#define ioread8(X) readb(X)
251#define ioread16(X) readw(X) 251#define ioread16(X) readw(X)
252#define ioread16be(X) __raw_readw(X)
252#define ioread32(X) readl(X) 253#define ioread32(X) readl(X)
254#define ioread32be(X) __raw_readl(X)
253#define iowrite8(val,X) writeb(val,X) 255#define iowrite8(val,X) writeb(val,X)
254#define iowrite16(val,X) writew(val,X) 256#define iowrite16(val,X) writew(val,X)
257#define iowrite16be(val,X) __raw_writew(val,X)
255#define iowrite32(val,X) writel(val,X) 258#define iowrite32(val,X) writel(val,X)
259#define iowrite32be(val,X) __raw_writel(val,X)
256 260
257static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) 261static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count)
258{ 262{
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index 4aee21dc9c6f..9517d063c79c 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -468,10 +468,14 @@ static inline void iounmap(volatile void __iomem *addr)
468 468
469#define ioread8(X) readb(X) 469#define ioread8(X) readb(X)
470#define ioread16(X) readw(X) 470#define ioread16(X) readw(X)
471#define ioread16be(X) __raw_readw(X)
471#define ioread32(X) readl(X) 472#define ioread32(X) readl(X)
473#define ioread32be(X) __raw_readl(X)
472#define iowrite8(val,X) writeb(val,X) 474#define iowrite8(val,X) writeb(val,X)
473#define iowrite16(val,X) writew(val,X) 475#define iowrite16(val,X) writew(val,X)
476#define iowrite16be(val,X) __raw_writew(val,X)
474#define iowrite32(val,X) writel(val,X) 477#define iowrite32(val,X) writel(val,X)
478#define iowrite32be(val,X) __raw_writel(val,X)
475 479
476/* Create a virtual mapping cookie for an IO port range */ 480/* Create a virtual mapping cookie for an IO port range */
477extern void __iomem *ioport_map(unsigned long port, unsigned int nr); 481extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
diff --git a/arch/sparc/include/asm/perfctr.h b/arch/sparc/include/asm/perfctr.h
index 836873002b75..8d8720a8770d 100644
--- a/arch/sparc/include/asm/perfctr.h
+++ b/arch/sparc/include/asm/perfctr.h
@@ -10,8 +10,8 @@
10 * from enumeration below. The meaning of further arguments 10 * from enumeration below. The meaning of further arguments
11 * are determined by the operation code. 11 * are determined by the operation code.
12 * 12 *
13 * int sys_perfctr(int opcode, unsigned long arg0, 13 * NOTE: This system call is no longer provided, use the perf_events
14 * unsigned long arg1, unsigned long arg2) 14 * infrastructure.
15 * 15 *
16 * Pointers which are passed by the user are pointers to 64-bit 16 * Pointers which are passed by the user are pointers to 64-bit
17 * integers. 17 * integers.
diff --git a/arch/sparc/include/asm/system_64.h b/arch/sparc/include/asm/system_64.h
index d47a98e66972..d24cfe16afc1 100644
--- a/arch/sparc/include/asm/system_64.h
+++ b/arch/sparc/include/asm/system_64.h
@@ -143,15 +143,7 @@ do { \
143 * and 2 stores in this critical code path. -DaveM 143 * and 2 stores in this critical code path. -DaveM
144 */ 144 */
145#define switch_to(prev, next, last) \ 145#define switch_to(prev, next, last) \
146do { if (test_thread_flag(TIF_PERFCTR)) { \ 146do { flush_tlb_pending(); \
147 unsigned long __tmp; \
148 read_pcr(__tmp); \
149 current_thread_info()->pcr_reg = __tmp; \
150 read_pic(__tmp); \
151 current_thread_info()->kernel_cntd0 += (unsigned int)(__tmp);\
152 current_thread_info()->kernel_cntd1 += ((__tmp) >> 32); \
153 } \
154 flush_tlb_pending(); \
155 save_and_clear_fpu(); \ 147 save_and_clear_fpu(); \
156 /* If you are tempted to conditionalize the following */ \ 148 /* If you are tempted to conditionalize the following */ \
157 /* so that ASI is only written if it changes, think again. */ \ 149 /* so that ASI is only written if it changes, think again. */ \
@@ -197,11 +189,6 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \
197 "l1", "l2", "l3", "l4", "l5", "l6", "l7", \ 189 "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
198 "i0", "i1", "i2", "i3", "i4", "i5", \ 190 "i0", "i1", "i2", "i3", "i4", "i5", \
199 "o0", "o1", "o2", "o3", "o4", "o5", "o7"); \ 191 "o0", "o1", "o2", "o3", "o4", "o5", "o7"); \
200 /* If you fuck with this, update ret_from_syscall code too. */ \
201 if (test_thread_flag(TIF_PERFCTR)) { \
202 write_pcr(current_thread_info()->pcr_reg); \
203 reset_pic(); \
204 } \
205} while(0) 192} while(0)
206 193
207static inline unsigned long xchg32(__volatile__ unsigned int *m, unsigned int val) 194static inline unsigned long xchg32(__volatile__ unsigned int *m, unsigned int val)
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
index 39be9f256e5a..9e2d9447f2ad 100644
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -58,11 +58,6 @@ struct thread_info {
58 unsigned long gsr[7]; 58 unsigned long gsr[7];
59 unsigned long xfsr[7]; 59 unsigned long xfsr[7];
60 60
61 __u64 __user *user_cntd0;
62 __u64 __user *user_cntd1;
63 __u64 kernel_cntd0, kernel_cntd1;
64 __u64 pcr_reg;
65
66 struct restart_block restart_block; 61 struct restart_block restart_block;
67 62
68 struct pt_regs *kern_una_regs; 63 struct pt_regs *kern_una_regs;
@@ -96,15 +91,10 @@ struct thread_info {
96#define TI_RWIN_SPTRS 0x000003c8 91#define TI_RWIN_SPTRS 0x000003c8
97#define TI_GSR 0x00000400 92#define TI_GSR 0x00000400
98#define TI_XFSR 0x00000438 93#define TI_XFSR 0x00000438
99#define TI_USER_CNTD0 0x00000470 94#define TI_RESTART_BLOCK 0x00000470
100#define TI_USER_CNTD1 0x00000478 95#define TI_KUNA_REGS 0x000004a0
101#define TI_KERN_CNTD0 0x00000480 96#define TI_KUNA_INSN 0x000004a8
102#define TI_KERN_CNTD1 0x00000488 97#define TI_FPREGS 0x000004c0
103#define TI_PCR 0x00000490
104#define TI_RESTART_BLOCK 0x00000498
105#define TI_KUNA_REGS 0x000004c8
106#define TI_KUNA_INSN 0x000004d0
107#define TI_FPREGS 0x00000500
108 98
109/* We embed this in the uppermost byte of thread_info->flags */ 99/* We embed this in the uppermost byte of thread_info->flags */
110#define FAULT_CODE_WRITE 0x01 /* Write access, implies D-TLB */ 100#define FAULT_CODE_WRITE 0x01 /* Write access, implies D-TLB */
@@ -199,7 +189,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
199 * 189 *
200 * On trap return we need to test several values: 190 * On trap return we need to test several values:
201 * 191 *
202 * user: need_resched, notify_resume, sigpending, wsaved, perfctr 192 * user: need_resched, notify_resume, sigpending, wsaved
203 * kernel: fpdepth 193 * kernel: fpdepth
204 * 194 *
205 * So to check for work in the kernel case we simply load the fpdepth 195 * So to check for work in the kernel case we simply load the fpdepth
@@ -220,7 +210,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
220#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ 210#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
221#define TIF_SIGPENDING 2 /* signal pending */ 211#define TIF_SIGPENDING 2 /* signal pending */
222#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 212#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
223#define TIF_PERFCTR 4 /* performance counters active */ 213/* flag bit 4 is available */
224#define TIF_UNALIGNED 5 /* allowed to do unaligned accesses */ 214#define TIF_UNALIGNED 5 /* allowed to do unaligned accesses */
225/* flag bit 6 is available */ 215/* flag bit 6 is available */
226#define TIF_32BIT 7 /* 32-bit binary */ 216#define TIF_32BIT 7 /* 32-bit binary */
@@ -241,7 +231,6 @@ register struct thread_info *current_thread_info_reg asm("g6");
241#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 231#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
242#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 232#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
243#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 233#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
244#define _TIF_PERFCTR (1<<TIF_PERFCTR)
245#define _TIF_UNALIGNED (1<<TIF_UNALIGNED) 234#define _TIF_UNALIGNED (1<<TIF_UNALIGNED)
246#define _TIF_32BIT (1<<TIF_32BIT) 235#define _TIF_32BIT (1<<TIF_32BIT)
247#define _TIF_SECCOMP (1<<TIF_SECCOMP) 236#define _TIF_SECCOMP (1<<TIF_SECCOMP)
@@ -252,7 +241,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
252 241
253#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ 242#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
254 _TIF_DO_NOTIFY_RESUME_MASK | \ 243 _TIF_DO_NOTIFY_RESUME_MASK | \
255 _TIF_NEED_RESCHED | _TIF_PERFCTR) 244 _TIF_NEED_RESCHED)
256#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING) 245#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING)
257 246
258/* 247/*
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h
index 4f53a2395ac6..c011b932bb17 100644
--- a/arch/sparc/kernel/entry.h
+++ b/arch/sparc/kernel/entry.h
@@ -48,7 +48,6 @@ extern void __init boot_cpu_id_too_large(int cpu);
48extern unsigned int dcache_parity_tl1_occurred; 48extern unsigned int dcache_parity_tl1_occurred;
49extern unsigned int icache_parity_tl1_occurred; 49extern unsigned int icache_parity_tl1_occurred;
50 50
51extern asmlinkage void update_perfctrs(void);
52extern asmlinkage void sparc_breakpoint(struct pt_regs *regs); 51extern asmlinkage void sparc_breakpoint(struct pt_regs *regs);
53extern void timer_interrupt(int irq, struct pt_regs *regs); 52extern void timer_interrupt(int irq, struct pt_regs *regs);
54 53
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index cb70476bd8f5..a5cf3864b31f 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -352,12 +352,6 @@ void exit_thread(void)
352 else 352 else
353 t->utraps[0]--; 353 t->utraps[0]--;
354 } 354 }
355
356 if (test_and_clear_thread_flag(TIF_PERFCTR)) {
357 t->user_cntd0 = t->user_cntd1 = NULL;
358 t->pcr_reg = 0;
359 write_pcr(0);
360 }
361} 355}
362 356
363void flush_thread(void) 357void flush_thread(void)
@@ -371,13 +365,6 @@ void flush_thread(void)
371 365
372 set_thread_wsaved(0); 366 set_thread_wsaved(0);
373 367
374 /* Turn off performance counters if on. */
375 if (test_and_clear_thread_flag(TIF_PERFCTR)) {
376 t->user_cntd0 = t->user_cntd1 = NULL;
377 t->pcr_reg = 0;
378 write_pcr(0);
379 }
380
381 /* Clear FPU register state. */ 368 /* Clear FPU register state. */
382 t->fpsaved[0] = 0; 369 t->fpsaved[0] = 0;
383 370
@@ -591,16 +578,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
591 t->kregs->u_regs[UREG_FP] = 578 t->kregs->u_regs[UREG_FP] =
592 ((unsigned long) child_sf) - STACK_BIAS; 579 ((unsigned long) child_sf) - STACK_BIAS;
593 580
594 /* Special case, if we are spawning a kernel thread from
595 * a userspace task (usermode helper, NFS or similar), we
596 * must disable performance counters in the child because
597 * the address space and protection realm are changing.
598 */
599 if (t->flags & _TIF_PERFCTR) {
600 t->user_cntd0 = t->user_cntd1 = NULL;
601 t->pcr_reg = 0;
602 t->flags &= ~_TIF_PERFCTR;
603 }
604 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); 581 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
605 t->kregs->u_regs[UREG_G6] = (unsigned long) t; 582 t->kregs->u_regs[UREG_G6] = (unsigned long) t;
606 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; 583 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S
index 1ddec403f512..83f1873c6c13 100644
--- a/arch/sparc/kernel/rtrap_64.S
+++ b/arch/sparc/kernel/rtrap_64.S
@@ -65,48 +65,6 @@ __handle_user_windows:
65 ba,pt %xcc, __handle_user_windows_continue 65 ba,pt %xcc, __handle_user_windows_continue
66 66
67 andn %l1, %l4, %l1 67 andn %l1, %l4, %l1
68__handle_perfctrs:
69 call update_perfctrs
70 wrpr %g0, RTRAP_PSTATE, %pstate
71 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
72 ldub [%g6 + TI_WSAVED], %o2
73 brz,pt %o2, 1f
74 nop
75 /* Redo userwin+sched+sig checks */
76 call fault_in_user_windows
77
78 wrpr %g0, RTRAP_PSTATE, %pstate
79 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
80 ldx [%g6 + TI_FLAGS], %l0
81 andcc %l0, _TIF_NEED_RESCHED, %g0
82 be,pt %xcc, 1f
83
84 nop
85 call schedule
86 wrpr %g0, RTRAP_PSTATE, %pstate
87 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
88 ldx [%g6 + TI_FLAGS], %l0
891: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0
90
91 be,pt %xcc, __handle_perfctrs_continue
92 sethi %hi(TSTATE_PEF), %o0
93 mov %l5, %o1
94 add %sp, PTREGS_OFF, %o0
95 mov %l0, %o2
96 call do_notify_resume
97
98 wrpr %g0, RTRAP_PSTATE, %pstate
99 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
100 /* Signal delivery can modify pt_regs tstate, so we must
101 * reload it.
102 */
103 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
104 sethi %hi(0xf << 20), %l4
105 and %l1, %l4, %l4
106 andn %l1, %l4, %l1
107 ba,pt %xcc, __handle_perfctrs_continue
108
109 sethi %hi(TSTATE_PEF), %o0
110__handle_userfpu: 68__handle_userfpu:
111 rd %fprs, %l5 69 rd %fprs, %l5
112 andcc %l5, FPRS_FEF, %g0 70 andcc %l5, FPRS_FEF, %g0
@@ -191,9 +149,9 @@ rtrap_no_irq_enable:
191 * take until the next local IRQ before the signal/resched 149 * take until the next local IRQ before the signal/resched
192 * event would be handled. 150 * event would be handled.
193 * 151 *
194 * This also means that if we have to deal with performance 152 * This also means that if we have to deal with user
195 * counters or user windows, we have to redo all of these 153 * windows, we have to redo all of these sched+signal checks
196 * sched+signal checks with IRQs disabled. 154 * with IRQs disabled.
197 */ 155 */
198to_user: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate 156to_user: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
199 wrpr 0, %pil 157 wrpr 0, %pil
@@ -214,12 +172,8 @@ __handle_signal_continue:
214 brnz,pn %o2, __handle_user_windows 172 brnz,pn %o2, __handle_user_windows
215 nop 173 nop
216__handle_user_windows_continue: 174__handle_user_windows_continue:
217 ldx [%g6 + TI_FLAGS], %l5
218 andcc %l5, _TIF_PERFCTR, %g0
219 sethi %hi(TSTATE_PEF), %o0 175 sethi %hi(TSTATE_PEF), %o0
220 bne,pn %xcc, __handle_perfctrs 176 andcc %l1, %o0, %g0
221__handle_perfctrs_continue:
222 andcc %l1, %o0, %g0
223 177
224 /* This fpdepth clear is necessary for non-syscall rtraps only */ 178 /* This fpdepth clear is necessary for non-syscall rtraps only */
225user_nowork: 179user_nowork:
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S
index e7061138c98a..46a76ba3fb4b 100644
--- a/arch/sparc/kernel/sys32.S
+++ b/arch/sparc/kernel/sys32.S
@@ -51,7 +51,6 @@ SIGN1(sys32_exit_group, sys_exit_group, %o0)
51SIGN1(sys32_wait4, compat_sys_wait4, %o2) 51SIGN1(sys32_wait4, compat_sys_wait4, %o2)
52SIGN1(sys32_creat, sys_creat, %o1) 52SIGN1(sys32_creat, sys_creat, %o1)
53SIGN1(sys32_mknod, sys_mknod, %o1) 53SIGN1(sys32_mknod, sys_mknod, %o1)
54SIGN1(sys32_perfctr, sys_perfctr, %o0)
55SIGN1(sys32_umount, sys_umount, %o1) 54SIGN1(sys32_umount, sys_umount, %o1)
56SIGN1(sys32_signal, sys_signal, %o0) 55SIGN1(sys32_signal, sys_signal, %o0)
57SIGN1(sys32_access, sys_access, %o1) 56SIGN1(sys32_access, sys_access, %o1)
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index d77f54316948..cb1bef6f14b7 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -27,7 +27,6 @@
27 27
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/utrap.h> 29#include <asm/utrap.h>
30#include <asm/perfctr.h>
31#include <asm/unistd.h> 30#include <asm/unistd.h>
32 31
33#include "entry.h" 32#include "entry.h"
@@ -766,109 +765,6 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
766 return ret; 765 return ret;
767} 766}
768 767
769/* Invoked by rtrap code to update performance counters in
770 * user space.
771 */
772asmlinkage void update_perfctrs(void)
773{
774 unsigned long pic, tmp;
775
776 read_pic(pic);
777 tmp = (current_thread_info()->kernel_cntd0 += (unsigned int)pic);
778 __put_user(tmp, current_thread_info()->user_cntd0);
779 tmp = (current_thread_info()->kernel_cntd1 += (pic >> 32));
780 __put_user(tmp, current_thread_info()->user_cntd1);
781 reset_pic();
782}
783
784SYSCALL_DEFINE4(perfctr, int, opcode, unsigned long, arg0,
785 unsigned long, arg1, unsigned long, arg2)
786{
787 int err = 0;
788
789 switch(opcode) {
790 case PERFCTR_ON:
791 current_thread_info()->pcr_reg = arg2;
792 current_thread_info()->user_cntd0 = (u64 __user *) arg0;
793 current_thread_info()->user_cntd1 = (u64 __user *) arg1;
794 current_thread_info()->kernel_cntd0 =
795 current_thread_info()->kernel_cntd1 = 0;
796 write_pcr(arg2);
797 reset_pic();
798 set_thread_flag(TIF_PERFCTR);
799 break;
800
801 case PERFCTR_OFF:
802 err = -EINVAL;
803 if (test_thread_flag(TIF_PERFCTR)) {
804 current_thread_info()->user_cntd0 =
805 current_thread_info()->user_cntd1 = NULL;
806 current_thread_info()->pcr_reg = 0;
807 write_pcr(0);
808 clear_thread_flag(TIF_PERFCTR);
809 err = 0;
810 }
811 break;
812
813 case PERFCTR_READ: {
814 unsigned long pic, tmp;
815
816 if (!test_thread_flag(TIF_PERFCTR)) {
817 err = -EINVAL;
818 break;
819 }
820 read_pic(pic);
821 tmp = (current_thread_info()->kernel_cntd0 += (unsigned int)pic);
822 err |= __put_user(tmp, current_thread_info()->user_cntd0);
823 tmp = (current_thread_info()->kernel_cntd1 += (pic >> 32));
824 err |= __put_user(tmp, current_thread_info()->user_cntd1);
825 reset_pic();
826 break;
827 }
828
829 case PERFCTR_CLRPIC:
830 if (!test_thread_flag(TIF_PERFCTR)) {
831 err = -EINVAL;
832 break;
833 }
834 current_thread_info()->kernel_cntd0 =
835 current_thread_info()->kernel_cntd1 = 0;
836 reset_pic();
837 break;
838
839 case PERFCTR_SETPCR: {
840 u64 __user *user_pcr = (u64 __user *)arg0;
841
842 if (!test_thread_flag(TIF_PERFCTR)) {
843 err = -EINVAL;
844 break;
845 }
846 err |= __get_user(current_thread_info()->pcr_reg, user_pcr);
847 write_pcr(current_thread_info()->pcr_reg);
848 current_thread_info()->kernel_cntd0 =
849 current_thread_info()->kernel_cntd1 = 0;
850 reset_pic();
851 break;
852 }
853
854 case PERFCTR_GETPCR: {
855 u64 __user *user_pcr = (u64 __user *)arg0;
856
857 if (!test_thread_flag(TIF_PERFCTR)) {
858 err = -EINVAL;
859 break;
860 }
861 err |= __put_user(current_thread_info()->pcr_reg, user_pcr);
862 break;
863 }
864
865 default:
866 err = -EINVAL;
867 break;
868 };
869 return err;
870}
871
872/* 768/*
873 * Do a system call from kernel instead of calling sys_execve so we 769 * Do a system call from kernel instead of calling sys_execve so we
874 * end up with proper pt_regs. 770 * end up with proper pt_regs.
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
index dc4a458f74dc..1d7e274f3f2b 100644
--- a/arch/sparc/kernel/syscalls.S
+++ b/arch/sparc/kernel/syscalls.S
@@ -110,31 +110,12 @@ sys_clone:
110 110
111 .globl ret_from_syscall 111 .globl ret_from_syscall
112ret_from_syscall: 112ret_from_syscall:
113 /* Clear current_thread_info()->new_child, and 113 /* Clear current_thread_info()->new_child. */
114 * check performance counter stuff too.
115 */
116 stb %g0, [%g6 + TI_NEW_CHILD] 114 stb %g0, [%g6 + TI_NEW_CHILD]
117 ldx [%g6 + TI_FLAGS], %l0 115 ldx [%g6 + TI_FLAGS], %l0
118 call schedule_tail 116 call schedule_tail
119 mov %g7, %o0 117 mov %g7, %o0
120 andcc %l0, _TIF_PERFCTR, %g0 118 ba,pt %xcc, ret_sys_call
121 be,pt %icc, 1f
122 nop
123 ldx [%g6 + TI_PCR], %o7
124 wr %g0, %o7, %pcr
125
126 /* Blackbird errata workaround. See commentary in
127 * smp.c:smp_percpu_timer_interrupt() for more
128 * information.
129 */
130 ba,pt %xcc, 99f
131 nop
132
133 .align 64
13499: wr %g0, %g0, %pic
135 rd %pic, %g0
136
1371: ba,pt %xcc, ret_sys_call
138 ldx [%sp + PTREGS_OFF + PT_V9_I0], %o0 119 ldx [%sp + PTREGS_OFF + PT_V9_I0], %o0
139 120
140 .globl sparc_exit 121 .globl sparc_exit
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h
index d2f999ae2b85..68312fe8da74 100644
--- a/arch/sparc/kernel/systbls.h
+++ b/arch/sparc/kernel/systbls.h
@@ -36,8 +36,6 @@ extern asmlinkage long sys_rt_sigaction(int sig,
36 struct sigaction __user *oact, 36 struct sigaction __user *oact,
37 void __user *restorer, 37 void __user *restorer,
38 size_t sigsetsize); 38 size_t sigsetsize);
39extern asmlinkage long sys_perfctr(int opcode, unsigned long arg0,
40 unsigned long arg1, unsigned long arg2);
41 39
42extern asmlinkage void sparc64_set_context(struct pt_regs *regs); 40extern asmlinkage void sparc64_set_context(struct pt_regs *regs);
43extern asmlinkage void sparc64_get_context(struct pt_regs *regs); 41extern asmlinkage void sparc64_get_context(struct pt_regs *regs);
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index e575b46bd7a9..17614251fb6d 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -21,7 +21,7 @@ sys_call_table32:
21/*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write 21/*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write
22/*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link 22/*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link
23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod 23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod
24/*15*/ .word sys_chmod, sys_lchown16, sys_brk, sys32_perfctr, sys32_lseek 24/*15*/ .word sys_chmod, sys_lchown16, sys_brk, sys_nis_syscall, sys32_lseek
25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
26/*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause 26/*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause
27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice 27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
@@ -96,7 +96,7 @@ sys_call_table:
96/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write 96/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write
97/*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link 97/*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link
98/*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod 98/*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod
99/*15*/ .word sys_chmod, sys_lchown, sys_brk, sys_perfctr, sys_lseek 99/*15*/ .word sys_chmod, sys_lchown, sys_brk, sys_nis_syscall, sys_lseek
100/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid 100/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid
101/*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall 101/*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall
102/*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice 102/*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index 10f7bb9fc140..bdc05a21908b 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -2548,15 +2548,6 @@ void __init trap_init(void)
2548 rwbuf_stkptrs) || 2548 rwbuf_stkptrs) ||
2549 TI_GSR != offsetof(struct thread_info, gsr) || 2549 TI_GSR != offsetof(struct thread_info, gsr) ||
2550 TI_XFSR != offsetof(struct thread_info, xfsr) || 2550 TI_XFSR != offsetof(struct thread_info, xfsr) ||
2551 TI_USER_CNTD0 != offsetof(struct thread_info,
2552 user_cntd0) ||
2553 TI_USER_CNTD1 != offsetof(struct thread_info,
2554 user_cntd1) ||
2555 TI_KERN_CNTD0 != offsetof(struct thread_info,
2556 kernel_cntd0) ||
2557 TI_KERN_CNTD1 != offsetof(struct thread_info,
2558 kernel_cntd1) ||
2559 TI_PCR != offsetof(struct thread_info, pcr_reg) ||
2560 TI_PRE_COUNT != offsetof(struct thread_info, 2551 TI_PRE_COUNT != offsetof(struct thread_info,
2561 preempt_count) || 2552 preempt_count) ||
2562 TI_NEW_CHILD != offsetof(struct thread_info, new_child) || 2553 TI_NEW_CHILD != offsetof(struct thread_info, new_child) ||
diff --git a/arch/sparc/prom/p1275.c b/arch/sparc/prom/p1275.c
index 4b7c937bba61..2d8b70d397f1 100644
--- a/arch/sparc/prom/p1275.c
+++ b/arch/sparc/prom/p1275.c
@@ -32,10 +32,9 @@ extern void prom_cif_interface(void);
32extern void prom_cif_callback(void); 32extern void prom_cif_callback(void);
33 33
34/* 34/*
35 * This provides SMP safety on the p1275buf. prom_callback() drops this lock 35 * This provides SMP safety on the p1275buf.
36 * to allow recursuve acquisition.
37 */ 36 */
38DEFINE_SPINLOCK(prom_entry_lock); 37DEFINE_RAW_SPINLOCK(prom_entry_lock);
39 38
40long p1275_cmd(const char *service, long fmt, ...) 39long p1275_cmd(const char *service, long fmt, ...)
41{ 40{
@@ -47,7 +46,9 @@ long p1275_cmd(const char *service, long fmt, ...)
47 46
48 p = p1275buf.prom_buffer; 47 p = p1275buf.prom_buffer;
49 48
50 spin_lock_irqsave(&prom_entry_lock, flags); 49 raw_local_save_flags(flags);
50 raw_local_irq_restore(PIL_NMI);
51 raw_spin_lock(&prom_entry_lock);
51 52
52 p1275buf.prom_args[0] = (unsigned long)p; /* service */ 53 p1275buf.prom_args[0] = (unsigned long)p; /* service */
53 strcpy (p, service); 54 strcpy (p, service);
@@ -139,7 +140,8 @@ long p1275_cmd(const char *service, long fmt, ...)
139 va_end(list); 140 va_end(list);
140 x = p1275buf.prom_args [nargs + 3]; 141 x = p1275buf.prom_args [nargs + 3];
141 142
142 spin_unlock_irqrestore(&prom_entry_lock, flags); 143 raw_spin_unlock(&prom_entry_lock);
144 raw_local_irq_restore(flags);
143 145
144 return x; 146 return x;
145} 147}