aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/Kconfig4
-rw-r--r--arch/sparc64/Makefile4
-rw-r--r--arch/sparc64/defconfig91
-rw-r--r--arch/sparc64/kernel/Makefile9
-rw-r--r--arch/sparc64/kernel/irq.c85
-rw-r--r--arch/sparc64/kernel/pci.c3
-rw-r--r--arch/sparc64/kernel/pci_msi.c14
-rw-r--r--arch/sparc64/math-emu/Makefile2
8 files changed, 87 insertions, 125 deletions
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index c7a74e376985..03c4e5c1b94a 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -72,6 +72,10 @@ config ARCH_NO_VIRT_TO_BUS
72config OF 72config OF
73 def_bool y 73 def_bool y
74 74
75config GENERIC_HARDIRQS_NO__DO_IRQ
76 bool
77 def_bool y
78
75choice 79choice
76 prompt "Kernel page size" 80 prompt "Kernel page size"
77 default SPARC64_PAGE_SIZE_8KB 81 default SPARC64_PAGE_SIZE_8KB
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index 6c92a42efe76..01159cb5f16d 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -18,8 +18,6 @@ NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow)
18NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) 18NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
19UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) 19UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
20 20
21export NEW_GCC
22
23ifneq ($(NEW_GAS),y) 21ifneq ($(NEW_GAS),y)
24AS = sparc64-linux-as 22AS = sparc64-linux-as
25LD = sparc64-linux-ld 23LD = sparc64-linux-ld
@@ -58,8 +56,6 @@ core-y += arch/sparc64/kernel/ arch/sparc64/mm/
58core-$(CONFIG_SOLARIS_EMUL) += arch/sparc64/solaris/ 56core-$(CONFIG_SOLARIS_EMUL) += arch/sparc64/solaris/
59core-y += arch/sparc64/math-emu/ 57core-y += arch/sparc64/math-emu/
60libs-y += arch/sparc64/prom/ arch/sparc64/lib/ 58libs-y += arch/sparc64/prom/ arch/sparc64/lib/
61
62# FIXME: is drivers- right?
63drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/ 59drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/
64 60
65boot := arch/sparc64/boot 61boot := arch/sparc64/boot
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 1aa2c4048e4b..e023d4b2fef4 100644
--- a/arch/sparc64/defconfig
+++ b/arch/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.23 3# Linux kernel version: 2.6.23
4# Sat Oct 13 21:53:54 2007 4# Sun Oct 21 19:57:44 2007
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -49,6 +49,10 @@ CONFIG_POSIX_MQUEUE=y
49# CONFIG_AUDIT is not set 49# CONFIG_AUDIT is not set
50# CONFIG_IKCONFIG is not set 50# CONFIG_IKCONFIG is not set
51CONFIG_LOG_BUF_SHIFT=18 51CONFIG_LOG_BUF_SHIFT=18
52# CONFIG_CGROUPS is not set
53CONFIG_FAIR_GROUP_SCHED=y
54CONFIG_FAIR_USER_SCHED=y
55# CONFIG_FAIR_CGROUP_SCHED is not set
52CONFIG_SYSFS_DEPRECATED=y 56CONFIG_SYSFS_DEPRECATED=y
53CONFIG_RELAY=y 57CONFIG_RELAY=y
54# CONFIG_BLK_DEV_INITRD is not set 58# CONFIG_BLK_DEV_INITRD is not set
@@ -145,7 +149,10 @@ CONFIG_SELECT_MEMORY_MODEL=y
145CONFIG_SPARSEMEM_MANUAL=y 149CONFIG_SPARSEMEM_MANUAL=y
146CONFIG_SPARSEMEM=y 150CONFIG_SPARSEMEM=y
147CONFIG_HAVE_MEMORY_PRESENT=y 151CONFIG_HAVE_MEMORY_PRESENT=y
148CONFIG_SPARSEMEM_STATIC=y 152# CONFIG_SPARSEMEM_STATIC is not set
153CONFIG_SPARSEMEM_EXTREME=y
154CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
155CONFIG_SPARSEMEM_VMEMMAP=y
149CONFIG_SPLIT_PTLOCK_CPUS=4 156CONFIG_SPLIT_PTLOCK_CPUS=4
150CONFIG_RESOURCES_64BIT=y 157CONFIG_RESOURCES_64BIT=y
151CONFIG_ZONE_DMA_FLAG=0 158CONFIG_ZONE_DMA_FLAG=0
@@ -275,10 +282,6 @@ CONFIG_VLAN_8021Q=m
275# CONFIG_LAPB is not set 282# CONFIG_LAPB is not set
276# CONFIG_ECONET is not set 283# CONFIG_ECONET is not set
277# CONFIG_WAN_ROUTER is not set 284# CONFIG_WAN_ROUTER is not set
278
279#
280# QoS and/or fair queueing
281#
282# CONFIG_NET_SCHED is not set 285# CONFIG_NET_SCHED is not set
283 286
284# 287#
@@ -372,8 +375,6 @@ CONFIG_IDEPCI_PCIBUS_ORDER=y
372# CONFIG_BLK_DEV_GENERIC is not set 375# CONFIG_BLK_DEV_GENERIC is not set
373# CONFIG_BLK_DEV_OPTI621 is not set 376# CONFIG_BLK_DEV_OPTI621 is not set
374CONFIG_BLK_DEV_IDEDMA_PCI=y 377CONFIG_BLK_DEV_IDEDMA_PCI=y
375# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
376CONFIG_IDEDMA_ONLYDISK=y
377# CONFIG_BLK_DEV_AEC62XX is not set 378# CONFIG_BLK_DEV_AEC62XX is not set
378CONFIG_BLK_DEV_ALI15X3=y 379CONFIG_BLK_DEV_ALI15X3=y
379# CONFIG_WDC_ALI15X3 is not set 380# CONFIG_WDC_ALI15X3 is not set
@@ -401,6 +402,7 @@ CONFIG_BLK_DEV_ALI15X3=y
401# CONFIG_BLK_DEV_TC86C001 is not set 402# CONFIG_BLK_DEV_TC86C001 is not set
402# CONFIG_IDE_ARM is not set 403# CONFIG_IDE_ARM is not set
403CONFIG_BLK_DEV_IDEDMA=y 404CONFIG_BLK_DEV_IDEDMA=y
405CONFIG_IDE_ARCH_OBSOLETE_INIT=y
404# CONFIG_BLK_DEV_HD is not set 406# CONFIG_BLK_DEV_HD is not set
405 407
406# 408#
@@ -441,6 +443,7 @@ CONFIG_SCSI_FC_ATTRS=y
441CONFIG_SCSI_ISCSI_ATTRS=m 443CONFIG_SCSI_ISCSI_ATTRS=m
442# CONFIG_SCSI_SAS_ATTRS is not set 444# CONFIG_SCSI_SAS_ATTRS is not set
443# CONFIG_SCSI_SAS_LIBSAS is not set 445# CONFIG_SCSI_SAS_LIBSAS is not set
446# CONFIG_SCSI_SRP_ATTRS is not set
444CONFIG_SCSI_LOWLEVEL=y 447CONFIG_SCSI_LOWLEVEL=y
445CONFIG_ISCSI_TCP=m 448CONFIG_ISCSI_TCP=m
446# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 449# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -492,14 +495,8 @@ CONFIG_DM_MIRROR=m
492CONFIG_DM_ZERO=m 495CONFIG_DM_ZERO=m
493# CONFIG_DM_MULTIPATH is not set 496# CONFIG_DM_MULTIPATH is not set
494# CONFIG_DM_DELAY is not set 497# CONFIG_DM_DELAY is not set
495 498# CONFIG_DM_UEVENT is not set
496#
497# Fusion MPT device support
498#
499# CONFIG_FUSION is not set 499# CONFIG_FUSION is not set
500# CONFIG_FUSION_SPI is not set
501# CONFIG_FUSION_FC is not set
502# CONFIG_FUSION_SAS is not set
503 500
504# 501#
505# IEEE 1394 (FireWire) support 502# IEEE 1394 (FireWire) support
@@ -638,7 +635,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
638CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 635CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
639CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 636CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
640# CONFIG_INPUT_JOYDEV is not set 637# CONFIG_INPUT_JOYDEV is not set
641# CONFIG_INPUT_TSDEV is not set
642CONFIG_INPUT_EVDEV=y 638CONFIG_INPUT_EVDEV=y
643# CONFIG_INPUT_EVBUG is not set 639# CONFIG_INPUT_EVBUG is not set
644 640
@@ -714,11 +710,9 @@ CONFIG_SERIAL_CORE_CONSOLE=y
714CONFIG_UNIX98_PTYS=y 710CONFIG_UNIX98_PTYS=y
715# CONFIG_LEGACY_PTYS is not set 711# CONFIG_LEGACY_PTYS is not set
716# CONFIG_IPMI_HANDLER is not set 712# CONFIG_IPMI_HANDLER is not set
717# CONFIG_WATCHDOG is not set
718# CONFIG_HW_RANDOM is not set 713# CONFIG_HW_RANDOM is not set
719# CONFIG_R3964 is not set 714# CONFIG_R3964 is not set
720# CONFIG_APPLICOM is not set 715# CONFIG_APPLICOM is not set
721# CONFIG_DRM is not set
722# CONFIG_RAW_DRIVER is not set 716# CONFIG_RAW_DRIVER is not set
723# CONFIG_TCG_TPM is not set 717# CONFIG_TCG_TPM is not set
724CONFIG_DEVPORT=y 718CONFIG_DEVPORT=y
@@ -786,8 +780,6 @@ CONFIG_I2C_ALGOBIT=y
786# CONFIG_POWER_SUPPLY is not set 780# CONFIG_POWER_SUPPLY is not set
787CONFIG_HWMON=y 781CONFIG_HWMON=y
788# CONFIG_HWMON_VID is not set 782# CONFIG_HWMON_VID is not set
789# CONFIG_SENSORS_ABITUGURU is not set
790# CONFIG_SENSORS_ABITUGURU3 is not set
791# CONFIG_SENSORS_AD7418 is not set 783# CONFIG_SENSORS_AD7418 is not set
792# CONFIG_SENSORS_ADM1021 is not set 784# CONFIG_SENSORS_ADM1021 is not set
793# CONFIG_SENSORS_ADM1025 is not set 785# CONFIG_SENSORS_ADM1025 is not set
@@ -795,12 +787,12 @@ CONFIG_HWMON=y
795# CONFIG_SENSORS_ADM1029 is not set 787# CONFIG_SENSORS_ADM1029 is not set
796# CONFIG_SENSORS_ADM1031 is not set 788# CONFIG_SENSORS_ADM1031 is not set
797# CONFIG_SENSORS_ADM9240 is not set 789# CONFIG_SENSORS_ADM9240 is not set
798# CONFIG_SENSORS_ASB100 is not set 790# CONFIG_SENSORS_ADT7470 is not set
799# CONFIG_SENSORS_ATXP1 is not set 791# CONFIG_SENSORS_ATXP1 is not set
800# CONFIG_SENSORS_DS1621 is not set 792# CONFIG_SENSORS_DS1621 is not set
801# CONFIG_SENSORS_F71805F is not set 793# CONFIG_SENSORS_F71805F is not set
802# CONFIG_SENSORS_FSCHER is not set 794# CONFIG_SENSORS_F71882FG is not set
803# CONFIG_SENSORS_FSCPOS is not set 795# CONFIG_SENSORS_F75375S is not set
804# CONFIG_SENSORS_GL518SM is not set 796# CONFIG_SENSORS_GL518SM is not set
805# CONFIG_SENSORS_GL520SM is not set 797# CONFIG_SENSORS_GL520SM is not set
806# CONFIG_SENSORS_IT87 is not set 798# CONFIG_SENSORS_IT87 is not set
@@ -836,6 +828,7 @@ CONFIG_HWMON=y
836# CONFIG_SENSORS_W83627HF is not set 828# CONFIG_SENSORS_W83627HF is not set
837# CONFIG_SENSORS_W83627EHF is not set 829# CONFIG_SENSORS_W83627EHF is not set
838# CONFIG_HWMON_DEBUG_CHIP is not set 830# CONFIG_HWMON_DEBUG_CHIP is not set
831# CONFIG_WATCHDOG is not set
839 832
840# 833#
841# Sonics Silicon Backplane 834# Sonics Silicon Backplane
@@ -858,12 +851,7 @@ CONFIG_SSB_POSSIBLE=y
858# 851#
859# Graphics support 852# Graphics support
860# 853#
861# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 854# CONFIG_DRM is not set
862
863#
864# Display device support
865#
866# CONFIG_DISPLAY_SUPPORT is not set
867# CONFIG_VGASTATE is not set 855# CONFIG_VGASTATE is not set
868# CONFIG_VIDEO_OUTPUT_CONTROL is not set 856# CONFIG_VIDEO_OUTPUT_CONTROL is not set
869CONFIG_FB=y 857CONFIG_FB=y
@@ -872,6 +860,7 @@ CONFIG_FB_DDC=y
872CONFIG_FB_CFB_FILLRECT=y 860CONFIG_FB_CFB_FILLRECT=y
873CONFIG_FB_CFB_COPYAREA=y 861CONFIG_FB_CFB_COPYAREA=y
874CONFIG_FB_CFB_IMAGEBLIT=y 862CONFIG_FB_CFB_IMAGEBLIT=y
863# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
875# CONFIG_FB_SYS_FILLRECT is not set 864# CONFIG_FB_SYS_FILLRECT is not set
876# CONFIG_FB_SYS_COPYAREA is not set 865# CONFIG_FB_SYS_COPYAREA is not set
877# CONFIG_FB_SYS_IMAGEBLIT is not set 866# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -890,6 +879,7 @@ CONFIG_FB_TILEBLITTING=y
890# CONFIG_FB_PM2 is not set 879# CONFIG_FB_PM2 is not set
891# CONFIG_FB_ASILIANT is not set 880# CONFIG_FB_ASILIANT is not set
892# CONFIG_FB_IMSTT is not set 881# CONFIG_FB_IMSTT is not set
882# CONFIG_FB_UVESA is not set
893# CONFIG_FB_SBUS is not set 883# CONFIG_FB_SBUS is not set
894# CONFIG_FB_XVR500 is not set 884# CONFIG_FB_XVR500 is not set
895# CONFIG_FB_XVR2500 is not set 885# CONFIG_FB_XVR2500 is not set
@@ -915,6 +905,12 @@ CONFIG_FB_RADEON_I2C=y
915# CONFIG_FB_ARK is not set 905# CONFIG_FB_ARK is not set
916# CONFIG_FB_PM3 is not set 906# CONFIG_FB_PM3 is not set
917# CONFIG_FB_VIRTUAL is not set 907# CONFIG_FB_VIRTUAL is not set
908# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
909
910#
911# Display device support
912#
913# CONFIG_DISPLAY_SUPPORT is not set
918 914
919# 915#
920# Console display driver support 916# Console display driver support
@@ -1066,6 +1062,7 @@ CONFIG_AC97_BUS=m
1066CONFIG_HID_SUPPORT=y 1062CONFIG_HID_SUPPORT=y
1067CONFIG_HID=y 1063CONFIG_HID=y
1068# CONFIG_HID_DEBUG is not set 1064# CONFIG_HID_DEBUG is not set
1065# CONFIG_HIDRAW is not set
1069 1066
1070# 1067#
1071# USB Input Devices 1068# USB Input Devices
@@ -1187,19 +1184,6 @@ CONFIG_USB_STORAGE=m
1187# CONFIG_RTC_CLASS is not set 1184# CONFIG_RTC_CLASS is not set
1188 1185
1189# 1186#
1190# DMA Engine support
1191#
1192# CONFIG_DMA_ENGINE is not set
1193
1194#
1195# DMA Clients
1196#
1197
1198#
1199# DMA Devices
1200#
1201
1202#
1203# Userspace I/O 1187# Userspace I/O
1204# 1188#
1205# CONFIG_UIO is not set 1189# CONFIG_UIO is not set
@@ -1275,7 +1259,6 @@ CONFIG_TMPFS=y
1275# CONFIG_TMPFS_POSIX_ACL is not set 1259# CONFIG_TMPFS_POSIX_ACL is not set
1276CONFIG_HUGETLBFS=y 1260CONFIG_HUGETLBFS=y
1277CONFIG_HUGETLB_PAGE=y 1261CONFIG_HUGETLB_PAGE=y
1278CONFIG_RAMFS=y
1279# CONFIG_CONFIGFS_FS is not set 1262# CONFIG_CONFIGFS_FS is not set
1280 1263
1281# 1264#
@@ -1295,10 +1278,7 @@ CONFIG_RAMFS=y
1295# CONFIG_QNX4FS_FS is not set 1278# CONFIG_QNX4FS_FS is not set
1296# CONFIG_SYSV_FS is not set 1279# CONFIG_SYSV_FS is not set
1297# CONFIG_UFS_FS is not set 1280# CONFIG_UFS_FS is not set
1298 1281CONFIG_NETWORK_FILESYSTEMS=y
1299#
1300# Network File Systems
1301#
1302# CONFIG_NFS_FS is not set 1282# CONFIG_NFS_FS is not set
1303# CONFIG_NFSD is not set 1283# CONFIG_NFSD is not set
1304# CONFIG_SMB_FS is not set 1284# CONFIG_SMB_FS is not set
@@ -1313,10 +1293,6 @@ CONFIG_RAMFS=y
1313# CONFIG_PARTITION_ADVANCED is not set 1293# CONFIG_PARTITION_ADVANCED is not set
1314CONFIG_MSDOS_PARTITION=y 1294CONFIG_MSDOS_PARTITION=y
1315CONFIG_SUN_PARTITION=y 1295CONFIG_SUN_PARTITION=y
1316
1317#
1318# Native Language Support
1319#
1320CONFIG_NLS=m 1296CONFIG_NLS=m
1321CONFIG_NLS_DEFAULT="iso8859-1" 1297CONFIG_NLS_DEFAULT="iso8859-1"
1322# CONFIG_NLS_CODEPAGE_437 is not set 1298# CONFIG_NLS_CODEPAGE_437 is not set
@@ -1357,18 +1333,12 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1357# CONFIG_NLS_KOI8_R is not set 1333# CONFIG_NLS_KOI8_R is not set
1358# CONFIG_NLS_KOI8_U is not set 1334# CONFIG_NLS_KOI8_U is not set
1359# CONFIG_NLS_UTF8 is not set 1335# CONFIG_NLS_UTF8 is not set
1360
1361#
1362# Distributed Lock Manager
1363#
1364# CONFIG_DLM is not set 1336# CONFIG_DLM is not set
1365 1337CONFIG_INSTRUMENTATION=y
1366#
1367# Instrumentation Support
1368#
1369CONFIG_PROFILING=y 1338CONFIG_PROFILING=y
1370CONFIG_OPROFILE=m 1339CONFIG_OPROFILE=m
1371CONFIG_KPROBES=y 1340CONFIG_KPROBES=y
1341# CONFIG_MARKERS is not set
1372 1342
1373# 1343#
1374# Kernel hacking 1344# Kernel hacking
@@ -1402,9 +1372,11 @@ CONFIG_DEBUG_BUGVERBOSE=y
1402# CONFIG_DEBUG_VM is not set 1372# CONFIG_DEBUG_VM is not set
1403# CONFIG_DEBUG_LIST is not set 1373# CONFIG_DEBUG_LIST is not set
1404CONFIG_FORCED_INLINING=y 1374CONFIG_FORCED_INLINING=y
1375# CONFIG_BOOT_PRINTK_DELAY is not set
1405# CONFIG_RCU_TORTURE_TEST is not set 1376# CONFIG_RCU_TORTURE_TEST is not set
1406# CONFIG_LKDTM is not set 1377# CONFIG_LKDTM is not set
1407# CONFIG_FAULT_INJECTION is not set 1378# CONFIG_FAULT_INJECTION is not set
1379# CONFIG_SAMPLES is not set
1408# CONFIG_DEBUG_STACK_USAGE is not set 1380# CONFIG_DEBUG_STACK_USAGE is not set
1409# CONFIG_DEBUG_DCFLUSH is not set 1381# CONFIG_DEBUG_DCFLUSH is not set
1410# CONFIG_STACK_DEBUG is not set 1382# CONFIG_STACK_DEBUG is not set
@@ -1417,6 +1389,7 @@ CONFIG_FORCED_INLINING=y
1417CONFIG_KEYS=y 1389CONFIG_KEYS=y
1418# CONFIG_KEYS_DEBUG_PROC_KEYS is not set 1390# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
1419# CONFIG_SECURITY is not set 1391# CONFIG_SECURITY is not set
1392# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1420CONFIG_XOR_BLOCKS=m 1393CONFIG_XOR_BLOCKS=m
1421CONFIG_ASYNC_CORE=m 1394CONFIG_ASYNC_CORE=m
1422CONFIG_ASYNC_MEMCPY=m 1395CONFIG_ASYNC_MEMCPY=m
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index 112c46e66578..ef50d217432f 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -39,12 +39,3 @@ else
39 obj-y += sys_sunos32.o sunos_ioctl32.o 39 obj-y += sys_sunos32.o sunos_ioctl32.o
40 endif 40 endif
41endif 41endif
42
43ifneq ($(NEW_GCC),y)
44 CMODEL_CFLAG := -mmedlow
45else
46 CMODEL_CFLAG := -m64 -mcmodel=medlow
47endif
48
49head.o: head.S ttable.S itlb_miss.S dtlb_miss.S ktlb.S tsb.S \
50 etrap.S rtrap.S winfixup.S entry.S
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 2c3bea228159..30431bd24e1e 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -257,8 +257,8 @@ struct irq_handler_data {
257 unsigned long imap; 257 unsigned long imap;
258 258
259 void (*pre_handler)(unsigned int, void *, void *); 259 void (*pre_handler)(unsigned int, void *, void *);
260 void *pre_handler_arg1; 260 void *arg1;
261 void *pre_handler_arg2; 261 void *arg2;
262}; 262};
263 263
264#ifdef CONFIG_SMP 264#ifdef CONFIG_SMP
@@ -346,7 +346,7 @@ static void sun4u_irq_disable(unsigned int virt_irq)
346 } 346 }
347} 347}
348 348
349static void sun4u_irq_end(unsigned int virt_irq) 349static void sun4u_irq_eoi(unsigned int virt_irq)
350{ 350{
351 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 351 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
352 struct irq_desc *desc = irq_desc + virt_irq; 352 struct irq_desc *desc = irq_desc + virt_irq;
@@ -401,7 +401,7 @@ static void sun4v_irq_disable(unsigned int virt_irq)
401 "err(%d)\n", ino, err); 401 "err(%d)\n", ino, err);
402} 402}
403 403
404static void sun4v_irq_end(unsigned int virt_irq) 404static void sun4v_irq_eoi(unsigned int virt_irq)
405{ 405{
406 unsigned int ino = virt_irq_table[virt_irq].dev_ino; 406 unsigned int ino = virt_irq_table[virt_irq].dev_ino;
407 struct irq_desc *desc = irq_desc + virt_irq; 407 struct irq_desc *desc = irq_desc + virt_irq;
@@ -478,7 +478,7 @@ static void sun4v_virq_disable(unsigned int virt_irq)
478 dev_handle, dev_ino, err); 478 dev_handle, dev_ino, err);
479} 479}
480 480
481static void sun4v_virq_end(unsigned int virt_irq) 481static void sun4v_virq_eoi(unsigned int virt_irq)
482{ 482{
483 struct irq_desc *desc = irq_desc + virt_irq; 483 struct irq_desc *desc = irq_desc + virt_irq;
484 unsigned long dev_handle, dev_ino; 484 unsigned long dev_handle, dev_ino;
@@ -498,33 +498,11 @@ static void sun4v_virq_end(unsigned int virt_irq)
498 dev_handle, dev_ino, err); 498 dev_handle, dev_ino, err);
499} 499}
500 500
501static void run_pre_handler(unsigned int virt_irq)
502{
503 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
504 unsigned int ino;
505
506 ino = virt_irq_table[virt_irq].dev_ino;
507 if (likely(data->pre_handler)) {
508 data->pre_handler(ino,
509 data->pre_handler_arg1,
510 data->pre_handler_arg2);
511 }
512}
513
514static struct irq_chip sun4u_irq = { 501static struct irq_chip sun4u_irq = {
515 .typename = "sun4u", 502 .typename = "sun4u",
516 .enable = sun4u_irq_enable, 503 .enable = sun4u_irq_enable,
517 .disable = sun4u_irq_disable, 504 .disable = sun4u_irq_disable,
518 .end = sun4u_irq_end, 505 .eoi = sun4u_irq_eoi,
519 .set_affinity = sun4u_set_affinity,
520};
521
522static struct irq_chip sun4u_irq_ack = {
523 .typename = "sun4u+ack",
524 .enable = sun4u_irq_enable,
525 .disable = sun4u_irq_disable,
526 .ack = run_pre_handler,
527 .end = sun4u_irq_end,
528 .set_affinity = sun4u_set_affinity, 506 .set_affinity = sun4u_set_affinity,
529}; 507};
530 508
@@ -532,7 +510,7 @@ static struct irq_chip sun4v_irq = {
532 .typename = "sun4v", 510 .typename = "sun4v",
533 .enable = sun4v_irq_enable, 511 .enable = sun4v_irq_enable,
534 .disable = sun4v_irq_disable, 512 .disable = sun4v_irq_disable,
535 .end = sun4v_irq_end, 513 .eoi = sun4v_irq_eoi,
536 .set_affinity = sun4v_set_affinity, 514 .set_affinity = sun4v_set_affinity,
537}; 515};
538 516
@@ -540,31 +518,33 @@ static struct irq_chip sun4v_virq = {
540 .typename = "vsun4v", 518 .typename = "vsun4v",
541 .enable = sun4v_virq_enable, 519 .enable = sun4v_virq_enable,
542 .disable = sun4v_virq_disable, 520 .disable = sun4v_virq_disable,
543 .end = sun4v_virq_end, 521 .eoi = sun4v_virq_eoi,
544 .set_affinity = sun4v_virt_set_affinity, 522 .set_affinity = sun4v_virt_set_affinity,
545}; 523};
546 524
525static void fastcall pre_flow_handler(unsigned int virt_irq,
526 struct irq_desc *desc)
527{
528 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
529 unsigned int ino = virt_irq_table[virt_irq].dev_ino;
530
531 data->pre_handler(ino, data->arg1, data->arg2);
532
533 handle_fasteoi_irq(virt_irq, desc);
534}
535
547void irq_install_pre_handler(int virt_irq, 536void irq_install_pre_handler(int virt_irq,
548 void (*func)(unsigned int, void *, void *), 537 void (*func)(unsigned int, void *, void *),
549 void *arg1, void *arg2) 538 void *arg1, void *arg2)
550{ 539{
551 struct irq_handler_data *data = get_irq_chip_data(virt_irq); 540 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
552 struct irq_chip *chip = get_irq_chip(virt_irq); 541 struct irq_desc *desc = irq_desc + virt_irq;
553
554 if (WARN_ON(chip == &sun4v_irq || chip == &sun4v_virq)) {
555 printk(KERN_ERR "IRQ: Trying to install pre-handler on "
556 "sun4v irq %u\n", virt_irq);
557 return;
558 }
559 542
560 data->pre_handler = func; 543 data->pre_handler = func;
561 data->pre_handler_arg1 = arg1; 544 data->arg1 = arg1;
562 data->pre_handler_arg2 = arg2; 545 data->arg2 = arg2;
563
564 if (chip == &sun4u_irq_ack)
565 return;
566 546
567 set_irq_chip(virt_irq, &sun4u_irq_ack); 547 desc->handle_irq = pre_flow_handler;
568} 548}
569 549
570unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) 550unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
@@ -582,7 +562,10 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
582 if (!virt_irq) { 562 if (!virt_irq) {
583 virt_irq = virt_irq_alloc(0, ino); 563 virt_irq = virt_irq_alloc(0, ino);
584 bucket_set_virt_irq(__pa(bucket), virt_irq); 564 bucket_set_virt_irq(__pa(bucket), virt_irq);
585 set_irq_chip(virt_irq, &sun4u_irq); 565 set_irq_chip_and_handler_name(virt_irq,
566 &sun4u_irq,
567 handle_fasteoi_irq,
568 "IVEC");
586 } 569 }
587 570
588 data = get_irq_chip_data(virt_irq); 571 data = get_irq_chip_data(virt_irq);
@@ -617,7 +600,9 @@ static unsigned int sun4v_build_common(unsigned long sysino,
617 if (!virt_irq) { 600 if (!virt_irq) {
618 virt_irq = virt_irq_alloc(0, sysino); 601 virt_irq = virt_irq_alloc(0, sysino);
619 bucket_set_virt_irq(__pa(bucket), virt_irq); 602 bucket_set_virt_irq(__pa(bucket), virt_irq);
620 set_irq_chip(virt_irq, chip); 603 set_irq_chip_and_handler_name(virt_irq, chip,
604 handle_fasteoi_irq,
605 "IVEC");
621 } 606 }
622 607
623 data = get_irq_chip_data(virt_irq); 608 data = get_irq_chip_data(virt_irq);
@@ -665,7 +650,10 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino)
665 650
666 virt_irq = virt_irq_alloc(devhandle, devino); 651 virt_irq = virt_irq_alloc(devhandle, devino);
667 bucket_set_virt_irq(__pa(bucket), virt_irq); 652 bucket_set_virt_irq(__pa(bucket), virt_irq);
668 set_irq_chip(virt_irq, &sun4v_virq); 653
654 set_irq_chip_and_handler_name(virt_irq, &sun4v_virq,
655 handle_fasteoi_irq,
656 "IVEC");
669 657
670 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); 658 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
671 if (unlikely(!data)) 659 if (unlikely(!data))
@@ -724,6 +712,7 @@ void handler_irq(int irq, struct pt_regs *regs)
724 : "memory"); 712 : "memory");
725 713
726 while (bucket_pa) { 714 while (bucket_pa) {
715 struct irq_desc *desc;
727 unsigned long next_pa; 716 unsigned long next_pa;
728 unsigned int virt_irq; 717 unsigned int virt_irq;
729 718
@@ -731,7 +720,9 @@ void handler_irq(int irq, struct pt_regs *regs)
731 virt_irq = bucket_get_virt_irq(bucket_pa); 720 virt_irq = bucket_get_virt_irq(bucket_pa);
732 bucket_clear_chain_pa(bucket_pa); 721 bucket_clear_chain_pa(bucket_pa);
733 722
734 __do_IRQ(virt_irq); 723 desc = irq_desc + virt_irq;
724
725 desc->handle_irq(virt_irq, desc);
735 726
736 bucket_pa = next_pa; 727 bucket_pa = next_pa;
737 } 728 }
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 9b808640a193..63b3ebc0c3c2 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -207,8 +207,7 @@ static struct {
207 { "SUNW,sun4v-pci", sun4v_pci_init }, 207 { "SUNW,sun4v-pci", sun4v_pci_init },
208 { "pciex108e,80f0", fire_pci_init }, 208 { "pciex108e,80f0", fire_pci_init },
209}; 209};
210#define PCI_NUM_CONTROLLER_TYPES (sizeof(pci_controller_table) / \ 210#define PCI_NUM_CONTROLLER_TYPES ARRAY_SIZE(pci_controller_table)
211 sizeof(pci_controller_table[0]))
212 211
213static int __init pci_controller_init(const char *model_name, int namelen, struct device_node *dp) 212static int __init pci_controller_init(const char *model_name, int namelen, struct device_node *dp)
214{ 213{
diff --git a/arch/sparc64/kernel/pci_msi.c b/arch/sparc64/kernel/pci_msi.c
index 31a165fd3e48..d6d64b44af63 100644
--- a/arch/sparc64/kernel/pci_msi.c
+++ b/arch/sparc64/kernel/pci_msi.c
@@ -28,8 +28,15 @@ static irqreturn_t sparc64_msiq_interrupt(int irq, void *cookie)
28 unsigned long msi; 28 unsigned long msi;
29 29
30 err = ops->dequeue_msi(pbm, msiqid, &head, &msi); 30 err = ops->dequeue_msi(pbm, msiqid, &head, &msi);
31 if (likely(err > 0)) 31 if (likely(err > 0)) {
32 __do_IRQ(pbm->msi_irq_table[msi - pbm->msi_first]); 32 struct irq_desc *desc;
33 unsigned int virt_irq;
34
35 virt_irq = pbm->msi_irq_table[msi - pbm->msi_first];
36 desc = irq_desc + virt_irq;
37
38 desc->handle_irq(virt_irq, desc);
39 }
33 40
34 if (unlikely(err < 0)) 41 if (unlikely(err < 0))
35 goto err_dequeue; 42 goto err_dequeue;
@@ -128,7 +135,8 @@ int sparc64_setup_msi_irq(unsigned int *virt_irq_p,
128 if (!*virt_irq_p) 135 if (!*virt_irq_p)
129 goto out_err; 136 goto out_err;
130 137
131 set_irq_chip(*virt_irq_p, &msi_irq); 138 set_irq_chip_and_handler_name(*virt_irq_p, &msi_irq,
139 handle_simple_irq, "MSI");
132 140
133 err = alloc_msi(pbm); 141 err = alloc_msi(pbm);
134 if (unlikely(err < 0)) 142 if (unlikely(err < 0))
diff --git a/arch/sparc64/math-emu/Makefile b/arch/sparc64/math-emu/Makefile
index a0b06fd29467..cc5cb9baf6aa 100644
--- a/arch/sparc64/math-emu/Makefile
+++ b/arch/sparc64/math-emu/Makefile
@@ -4,4 +4,4 @@
4 4
5obj-y := math.o 5obj-y := math.o
6 6
7EXTRA_CFLAGS = -I. -Iinclude/math-emu -w 7EXTRA_CFLAGS = -Iinclude/math-emu -w