diff options
Diffstat (limited to 'arch/sparc')
34 files changed, 363 insertions, 786 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 3f8b6a92eabd..233cff53a623 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -25,6 +25,8 @@ config SPARC | |||
25 | select ARCH_WANT_OPTIONAL_GPIOLIB | 25 | select ARCH_WANT_OPTIONAL_GPIOLIB |
26 | select RTC_CLASS | 26 | select RTC_CLASS |
27 | select RTC_DRV_M48T59 | 27 | select RTC_DRV_M48T59 |
28 | select HAVE_DMA_ATTRS | ||
29 | select HAVE_DMA_API_DEBUG | ||
28 | 30 | ||
29 | config SPARC32 | 31 | config SPARC32 |
30 | def_bool !64BIT | 32 | def_bool !64BIT |
diff --git a/arch/sparc/configs/sparc32_defconfig b/arch/sparc/configs/sparc32_defconfig index 8bcd27af724b..a0f62a808edb 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.30-rc2 | 3 | # Linux kernel version: 2.6.31-rc1 |
4 | # Fri Apr 17 04:04:46 2009 | 4 | # Tue Aug 18 23:45:52 2009 |
5 | # | 5 | # |
6 | # CONFIG_64BIT is not set | 6 | # CONFIG_64BIT is not set |
7 | CONFIG_SPARC=y | 7 | CONFIG_SPARC=y |
@@ -17,6 +17,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
17 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 17 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
18 | CONFIG_OF=y | 18 | CONFIG_OF=y |
19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
20 | CONFIG_CONSTRUCTORS=y | ||
20 | 21 | ||
21 | # | 22 | # |
22 | # General setup | 23 | # General setup |
@@ -74,7 +75,6 @@ CONFIG_SYSCTL_SYSCALL=y | |||
74 | CONFIG_KALLSYMS=y | 75 | CONFIG_KALLSYMS=y |
75 | # CONFIG_KALLSYMS_ALL is not set | 76 | # CONFIG_KALLSYMS_ALL is not set |
76 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 77 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
77 | # CONFIG_STRIP_ASM_SYMS is not set | ||
78 | CONFIG_HOTPLUG=y | 78 | CONFIG_HOTPLUG=y |
79 | CONFIG_PRINTK=y | 79 | CONFIG_PRINTK=y |
80 | CONFIG_BUG=y | 80 | CONFIG_BUG=y |
@@ -87,8 +87,13 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_AIO=y | 89 | CONFIG_AIO=y |
90 | |||
91 | # | ||
92 | # Performance Counters | ||
93 | # | ||
90 | CONFIG_VM_EVENT_COUNTERS=y | 94 | CONFIG_VM_EVENT_COUNTERS=y |
91 | CONFIG_PCI_QUIRKS=y | 95 | CONFIG_PCI_QUIRKS=y |
96 | # CONFIG_STRIP_ASM_SYMS is not set | ||
92 | CONFIG_COMPAT_BRK=y | 97 | CONFIG_COMPAT_BRK=y |
93 | CONFIG_SLAB=y | 98 | CONFIG_SLAB=y |
94 | # CONFIG_SLUB is not set | 99 | # CONFIG_SLUB is not set |
@@ -97,6 +102,10 @@ CONFIG_SLAB=y | |||
97 | # CONFIG_MARKERS is not set | 102 | # CONFIG_MARKERS is not set |
98 | CONFIG_HAVE_OPROFILE=y | 103 | CONFIG_HAVE_OPROFILE=y |
99 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 104 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
105 | |||
106 | # | ||
107 | # GCOV-based kernel profiling | ||
108 | # | ||
100 | # CONFIG_SLOW_WORK is not set | 109 | # CONFIG_SLOW_WORK is not set |
101 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 110 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
102 | CONFIG_SLABINFO=y | 111 | CONFIG_SLABINFO=y |
@@ -109,7 +118,7 @@ CONFIG_MODULE_UNLOAD=y | |||
109 | # CONFIG_MODVERSIONS is not set | 118 | # CONFIG_MODVERSIONS is not set |
110 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 119 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
111 | CONFIG_BLOCK=y | 120 | CONFIG_BLOCK=y |
112 | # CONFIG_LBD is not set | 121 | CONFIG_LBDAF=y |
113 | # CONFIG_BLK_DEV_BSG is not set | 122 | # CONFIG_BLK_DEV_BSG is not set |
114 | # CONFIG_BLK_DEV_INTEGRITY is not set | 123 | # CONFIG_BLK_DEV_INTEGRITY is not set |
115 | 124 | ||
@@ -154,9 +163,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
154 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 163 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
155 | CONFIG_ZONE_DMA_FLAG=1 | 164 | CONFIG_ZONE_DMA_FLAG=1 |
156 | CONFIG_BOUNCE=y | 165 | CONFIG_BOUNCE=y |
157 | CONFIG_UNEVICTABLE_LRU=y | ||
158 | CONFIG_HAVE_MLOCK=y | 166 | CONFIG_HAVE_MLOCK=y |
159 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | 167 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y |
168 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
160 | CONFIG_SUN_PM=y | 169 | CONFIG_SUN_PM=y |
161 | # CONFIG_SPARC_LED is not set | 170 | # CONFIG_SPARC_LED is not set |
162 | CONFIG_SERIAL_CONSOLE=y | 171 | CONFIG_SERIAL_CONSOLE=y |
@@ -264,6 +273,7 @@ CONFIG_IPV6_TUNNEL=m | |||
264 | # CONFIG_ECONET is not set | 273 | # CONFIG_ECONET is not set |
265 | # CONFIG_WAN_ROUTER is not set | 274 | # CONFIG_WAN_ROUTER is not set |
266 | # CONFIG_PHONET is not set | 275 | # CONFIG_PHONET is not set |
276 | # CONFIG_IEEE802154 is not set | ||
267 | # CONFIG_NET_SCHED is not set | 277 | # CONFIG_NET_SCHED is not set |
268 | # CONFIG_DCB is not set | 278 | # CONFIG_DCB is not set |
269 | 279 | ||
@@ -281,7 +291,11 @@ CONFIG_WIRELESS=y | |||
281 | CONFIG_WIRELESS_OLD_REGULATORY=y | 291 | CONFIG_WIRELESS_OLD_REGULATORY=y |
282 | # CONFIG_WIRELESS_EXT is not set | 292 | # CONFIG_WIRELESS_EXT is not set |
283 | # CONFIG_LIB80211 is not set | 293 | # CONFIG_LIB80211 is not set |
284 | # CONFIG_MAC80211 is not set | 294 | |
295 | # | ||
296 | # CFG80211 needs to be enabled for MAC80211 | ||
297 | # | ||
298 | CONFIG_MAC80211_DEFAULT_PS_VALUE=0 | ||
285 | # CONFIG_WIMAX is not set | 299 | # CONFIG_WIMAX is not set |
286 | # CONFIG_RFKILL is not set | 300 | # CONFIG_RFKILL is not set |
287 | # CONFIG_NET_9P is not set | 301 | # CONFIG_NET_9P is not set |
@@ -335,6 +349,7 @@ CONFIG_MISC_DEVICES=y | |||
335 | # EEPROM support | 349 | # EEPROM support |
336 | # | 350 | # |
337 | # CONFIG_EEPROM_93CX6 is not set | 351 | # CONFIG_EEPROM_93CX6 is not set |
352 | # CONFIG_CB710_CORE is not set | ||
338 | CONFIG_HAVE_IDE=y | 353 | CONFIG_HAVE_IDE=y |
339 | # CONFIG_IDE is not set | 354 | # CONFIG_IDE is not set |
340 | 355 | ||
@@ -358,10 +373,6 @@ CONFIG_BLK_DEV_SR=m | |||
358 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 373 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
359 | CONFIG_CHR_DEV_SG=m | 374 | CONFIG_CHR_DEV_SG=m |
360 | # CONFIG_CHR_DEV_SCH is not set | 375 | # CONFIG_CHR_DEV_SCH is not set |
361 | |||
362 | # | ||
363 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
364 | # | ||
365 | # CONFIG_SCSI_MULTI_LUN is not set | 376 | # CONFIG_SCSI_MULTI_LUN is not set |
366 | # CONFIG_SCSI_CONSTANTS is not set | 377 | # CONFIG_SCSI_CONSTANTS is not set |
367 | # CONFIG_SCSI_LOGGING is not set | 378 | # CONFIG_SCSI_LOGGING is not set |
@@ -379,6 +390,7 @@ CONFIG_SCSI_SPI_ATTRS=y | |||
379 | CONFIG_SCSI_LOWLEVEL=y | 390 | CONFIG_SCSI_LOWLEVEL=y |
380 | # CONFIG_ISCSI_TCP is not set | 391 | # CONFIG_ISCSI_TCP is not set |
381 | # CONFIG_SCSI_CXGB3_ISCSI is not set | 392 | # CONFIG_SCSI_CXGB3_ISCSI is not set |
393 | # CONFIG_SCSI_BNX2_ISCSI is not set | ||
382 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 394 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
383 | # CONFIG_SCSI_3W_9XXX is not set | 395 | # CONFIG_SCSI_3W_9XXX is not set |
384 | # CONFIG_SCSI_ACARD is not set | 396 | # CONFIG_SCSI_ACARD is not set |
@@ -387,6 +399,7 @@ CONFIG_SCSI_LOWLEVEL=y | |||
387 | # CONFIG_SCSI_AIC7XXX_OLD is not set | 399 | # CONFIG_SCSI_AIC7XXX_OLD is not set |
388 | # CONFIG_SCSI_AIC79XX is not set | 400 | # CONFIG_SCSI_AIC79XX is not set |
389 | # CONFIG_SCSI_AIC94XX is not set | 401 | # CONFIG_SCSI_AIC94XX is not set |
402 | # CONFIG_SCSI_MVSAS is not set | ||
390 | # CONFIG_SCSI_ARCMSR is not set | 403 | # CONFIG_SCSI_ARCMSR is not set |
391 | # CONFIG_MEGARAID_NEWGEN is not set | 404 | # CONFIG_MEGARAID_NEWGEN is not set |
392 | # CONFIG_MEGARAID_LEGACY is not set | 405 | # CONFIG_MEGARAID_LEGACY is not set |
@@ -401,7 +414,6 @@ CONFIG_SCSI_LOWLEVEL=y | |||
401 | # CONFIG_SCSI_IPS is not set | 414 | # CONFIG_SCSI_IPS is not set |
402 | # CONFIG_SCSI_INITIO is not set | 415 | # CONFIG_SCSI_INITIO is not set |
403 | # CONFIG_SCSI_INIA100 is not set | 416 | # CONFIG_SCSI_INIA100 is not set |
404 | # CONFIG_SCSI_MVSAS is not set | ||
405 | # CONFIG_SCSI_STEX is not set | 417 | # CONFIG_SCSI_STEX is not set |
406 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 418 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
407 | # CONFIG_SCSI_QLOGIC_1280 is not set | 419 | # CONFIG_SCSI_QLOGIC_1280 is not set |
@@ -426,13 +438,16 @@ CONFIG_SCSI_SUNESP=y | |||
426 | # | 438 | # |
427 | 439 | ||
428 | # | 440 | # |
429 | # Enable only one of the two stacks, unless you know what you are doing | 441 | # You can enable one or both FireWire driver stacks. |
442 | # | ||
443 | |||
444 | # | ||
445 | # See the help texts for more information. | ||
430 | # | 446 | # |
431 | # CONFIG_FIREWIRE is not set | 447 | # CONFIG_FIREWIRE is not set |
432 | # CONFIG_IEEE1394 is not set | 448 | # CONFIG_IEEE1394 is not set |
433 | # CONFIG_I2O is not set | 449 | # CONFIG_I2O is not set |
434 | CONFIG_NETDEVICES=y | 450 | CONFIG_NETDEVICES=y |
435 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
436 | CONFIG_DUMMY=m | 451 | CONFIG_DUMMY=m |
437 | # CONFIG_BONDING is not set | 452 | # CONFIG_BONDING is not set |
438 | # CONFIG_MACVLAN is not set | 453 | # CONFIG_MACVLAN is not set |
@@ -463,6 +478,7 @@ CONFIG_SUNQE=m | |||
463 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 478 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
464 | # CONFIG_NET_PCI is not set | 479 | # CONFIG_NET_PCI is not set |
465 | # CONFIG_B44 is not set | 480 | # CONFIG_B44 is not set |
481 | # CONFIG_KS8842 is not set | ||
466 | # CONFIG_ATL2 is not set | 482 | # CONFIG_ATL2 is not set |
467 | CONFIG_NETDEV_1000=y | 483 | CONFIG_NETDEV_1000=y |
468 | # CONFIG_ACENIC is not set | 484 | # CONFIG_ACENIC is not set |
@@ -482,6 +498,7 @@ CONFIG_NETDEV_1000=y | |||
482 | # CONFIG_VIA_VELOCITY is not set | 498 | # CONFIG_VIA_VELOCITY is not set |
483 | # CONFIG_TIGON3 is not set | 499 | # CONFIG_TIGON3 is not set |
484 | # CONFIG_BNX2 is not set | 500 | # CONFIG_BNX2 is not set |
501 | # CONFIG_CNIC is not set | ||
485 | # CONFIG_QLA3XXX is not set | 502 | # CONFIG_QLA3XXX is not set |
486 | # CONFIG_ATL1 is not set | 503 | # CONFIG_ATL1 is not set |
487 | # CONFIG_ATL1E is not set | 504 | # CONFIG_ATL1E is not set |
@@ -629,6 +646,11 @@ CONFIG_HW_RANDOM=m | |||
629 | CONFIG_DEVPORT=y | 646 | CONFIG_DEVPORT=y |
630 | # CONFIG_I2C is not set | 647 | # CONFIG_I2C is not set |
631 | # CONFIG_SPI is not set | 648 | # CONFIG_SPI is not set |
649 | |||
650 | # | ||
651 | # PPS support | ||
652 | # | ||
653 | # CONFIG_PPS is not set | ||
632 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 654 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
633 | # CONFIG_GPIOLIB is not set | 655 | # CONFIG_GPIOLIB is not set |
634 | # CONFIG_W1 is not set | 656 | # CONFIG_W1 is not set |
@@ -668,22 +690,7 @@ CONFIG_SSB_POSSIBLE=y | |||
668 | # CONFIG_HTC_PASIC3 is not set | 690 | # CONFIG_HTC_PASIC3 is not set |
669 | # CONFIG_MFD_TMIO is not set | 691 | # CONFIG_MFD_TMIO is not set |
670 | # CONFIG_REGULATOR is not set | 692 | # CONFIG_REGULATOR is not set |
671 | 693 | # CONFIG_MEDIA_SUPPORT is not set | |
672 | # | ||
673 | # Multimedia devices | ||
674 | # | ||
675 | |||
676 | # | ||
677 | # Multimedia core support | ||
678 | # | ||
679 | # CONFIG_VIDEO_DEV is not set | ||
680 | # CONFIG_DVB_CORE is not set | ||
681 | # CONFIG_VIDEO_MEDIA is not set | ||
682 | |||
683 | # | ||
684 | # Multimedia drivers | ||
685 | # | ||
686 | # CONFIG_DAB is not set | ||
687 | 694 | ||
688 | # | 695 | # |
689 | # Graphics support | 696 | # Graphics support |
@@ -776,6 +783,10 @@ CONFIG_RTC_DRV_M48T59=y | |||
776 | # CONFIG_DMADEVICES is not set | 783 | # CONFIG_DMADEVICES is not set |
777 | # CONFIG_AUXDISPLAY is not set | 784 | # CONFIG_AUXDISPLAY is not set |
778 | # CONFIG_UIO is not set | 785 | # CONFIG_UIO is not set |
786 | |||
787 | # | ||
788 | # TI VLYNQ | ||
789 | # | ||
779 | # CONFIG_STAGING is not set | 790 | # CONFIG_STAGING is not set |
780 | 791 | ||
781 | # | 792 | # |
@@ -799,10 +810,12 @@ CONFIG_FS_MBCACHE=y | |||
799 | # CONFIG_REISERFS_FS is not set | 810 | # CONFIG_REISERFS_FS is not set |
800 | # CONFIG_JFS_FS is not set | 811 | # CONFIG_JFS_FS is not set |
801 | CONFIG_FS_POSIX_ACL=y | 812 | CONFIG_FS_POSIX_ACL=y |
802 | CONFIG_FILE_LOCKING=y | ||
803 | # CONFIG_XFS_FS is not set | 813 | # CONFIG_XFS_FS is not set |
814 | # CONFIG_GFS2_FS is not set | ||
804 | # CONFIG_OCFS2_FS is not set | 815 | # CONFIG_OCFS2_FS is not set |
805 | # CONFIG_BTRFS_FS is not set | 816 | # CONFIG_BTRFS_FS is not set |
817 | CONFIG_FILE_LOCKING=y | ||
818 | CONFIG_FSNOTIFY=y | ||
806 | CONFIG_DNOTIFY=y | 819 | CONFIG_DNOTIFY=y |
807 | CONFIG_INOTIFY=y | 820 | CONFIG_INOTIFY=y |
808 | CONFIG_INOTIFY_USER=y | 821 | CONFIG_INOTIFY_USER=y |
@@ -985,6 +998,7 @@ CONFIG_KGDB=y | |||
985 | CONFIG_KGDB_SERIAL_CONSOLE=y | 998 | CONFIG_KGDB_SERIAL_CONSOLE=y |
986 | CONFIG_KGDB_TESTS=y | 999 | CONFIG_KGDB_TESTS=y |
987 | # CONFIG_KGDB_TESTS_ON_BOOT is not set | 1000 | # CONFIG_KGDB_TESTS_ON_BOOT is not set |
1001 | # CONFIG_KMEMCHECK is not set | ||
988 | # CONFIG_DEBUG_STACK_USAGE is not set | 1002 | # CONFIG_DEBUG_STACK_USAGE is not set |
989 | # CONFIG_STACK_DEBUG is not set | 1003 | # CONFIG_STACK_DEBUG is not set |
990 | 1004 | ||
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig index 0123a4c596ce..fdddf7a6f725 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.30 | 3 | # Linux kernel version: 2.6.31-rc1 |
4 | # Tue Jun 16 04:59:36 2009 | 4 | # Tue Aug 18 23:56:02 2009 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_SPARC=y | 7 | CONFIG_SPARC=y |
@@ -26,6 +26,7 @@ CONFIG_ARCH_NO_VIRT_TO_BUS=y | |||
26 | CONFIG_OF=y | 26 | CONFIG_OF=y |
27 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | 27 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
29 | CONFIG_CONSTRUCTORS=y | ||
29 | 30 | ||
30 | # | 31 | # |
31 | # General setup | 32 | # General setup |
@@ -119,6 +120,11 @@ CONFIG_HAVE_KPROBES=y | |||
119 | CONFIG_HAVE_KRETPROBES=y | 120 | CONFIG_HAVE_KRETPROBES=y |
120 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 121 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
121 | CONFIG_USE_GENERIC_SMP_HELPERS=y | 122 | CONFIG_USE_GENERIC_SMP_HELPERS=y |
123 | |||
124 | # | ||
125 | # GCOV-based kernel profiling | ||
126 | # | ||
127 | # CONFIG_GCOV_KERNEL is not set | ||
122 | # CONFIG_SLOW_WORK is not set | 128 | # CONFIG_SLOW_WORK is not set |
123 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 129 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
124 | CONFIG_SLABINFO=y | 130 | CONFIG_SLABINFO=y |
@@ -204,7 +210,6 @@ CONFIG_MIGRATION=y | |||
204 | CONFIG_PHYS_ADDR_T_64BIT=y | 210 | CONFIG_PHYS_ADDR_T_64BIT=y |
205 | CONFIG_ZONE_DMA_FLAG=0 | 211 | CONFIG_ZONE_DMA_FLAG=0 |
206 | CONFIG_NR_QUICK=1 | 212 | CONFIG_NR_QUICK=1 |
207 | CONFIG_UNEVICTABLE_LRU=y | ||
208 | CONFIG_HAVE_MLOCK=y | 213 | CONFIG_HAVE_MLOCK=y |
209 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | 214 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y |
210 | CONFIG_DEFAULT_MMAP_MIN_ADDR=8192 | 215 | CONFIG_DEFAULT_MMAP_MIN_ADDR=8192 |
@@ -410,6 +415,7 @@ CONFIG_MISC_DEVICES=y | |||
410 | # | 415 | # |
411 | # CONFIG_EEPROM_AT24 is not set | 416 | # CONFIG_EEPROM_AT24 is not set |
412 | # CONFIG_EEPROM_LEGACY is not set | 417 | # CONFIG_EEPROM_LEGACY is not set |
418 | # CONFIG_EEPROM_MAX6875 is not set | ||
413 | # CONFIG_EEPROM_93CX6 is not set | 419 | # CONFIG_EEPROM_93CX6 is not set |
414 | # CONFIG_CB710_CORE is not set | 420 | # CONFIG_CB710_CORE is not set |
415 | CONFIG_HAVE_IDE=y | 421 | CONFIG_HAVE_IDE=y |
@@ -562,6 +568,7 @@ CONFIG_BLK_DEV_DM=m | |||
562 | CONFIG_DM_CRYPT=m | 568 | CONFIG_DM_CRYPT=m |
563 | CONFIG_DM_SNAPSHOT=m | 569 | CONFIG_DM_SNAPSHOT=m |
564 | CONFIG_DM_MIRROR=m | 570 | CONFIG_DM_MIRROR=m |
571 | # CONFIG_DM_LOG_USERSPACE is not set | ||
565 | CONFIG_DM_ZERO=m | 572 | CONFIG_DM_ZERO=m |
566 | # CONFIG_DM_MULTIPATH is not set | 573 | # CONFIG_DM_MULTIPATH is not set |
567 | # CONFIG_DM_DELAY is not set | 574 | # CONFIG_DM_DELAY is not set |
@@ -573,7 +580,11 @@ CONFIG_DM_ZERO=m | |||
573 | # | 580 | # |
574 | 581 | ||
575 | # | 582 | # |
576 | # Enable only one of the two stacks, unless you know what you are doing | 583 | # You can enable one or both FireWire driver stacks. |
584 | # | ||
585 | |||
586 | # | ||
587 | # See the help texts for more information. | ||
577 | # | 588 | # |
578 | # CONFIG_FIREWIRE is not set | 589 | # CONFIG_FIREWIRE is not set |
579 | # CONFIG_IEEE1394 is not set | 590 | # CONFIG_IEEE1394 is not set |
@@ -667,6 +678,7 @@ CONFIG_E1000E=m | |||
667 | # CONFIG_VIA_VELOCITY is not set | 678 | # CONFIG_VIA_VELOCITY is not set |
668 | CONFIG_TIGON3=m | 679 | CONFIG_TIGON3=m |
669 | CONFIG_BNX2=m | 680 | CONFIG_BNX2=m |
681 | # CONFIG_CNIC is not set | ||
670 | # CONFIG_QLA3XXX is not set | 682 | # CONFIG_QLA3XXX is not set |
671 | # CONFIG_ATL1 is not set | 683 | # CONFIG_ATL1 is not set |
672 | # CONFIG_ATL1E is not set | 684 | # CONFIG_ATL1E is not set |
@@ -773,6 +785,7 @@ CONFIG_MOUSE_SERIAL=y | |||
773 | # CONFIG_MOUSE_APPLETOUCH is not set | 785 | # CONFIG_MOUSE_APPLETOUCH is not set |
774 | # CONFIG_MOUSE_BCM5974 is not set | 786 | # CONFIG_MOUSE_BCM5974 is not set |
775 | # CONFIG_MOUSE_VSXXXAA is not set | 787 | # CONFIG_MOUSE_VSXXXAA is not set |
788 | # CONFIG_MOUSE_SYNAPTICS_I2C is not set | ||
776 | # CONFIG_INPUT_JOYSTICK is not set | 789 | # CONFIG_INPUT_JOYSTICK is not set |
777 | # CONFIG_INPUT_TABLET is not set | 790 | # CONFIG_INPUT_TABLET is not set |
778 | # CONFIG_INPUT_TOUCHSCREEN is not set | 791 | # CONFIG_INPUT_TOUCHSCREEN is not set |
@@ -870,6 +883,7 @@ CONFIG_I2C_ALGOBIT=y | |||
870 | # | 883 | # |
871 | # I2C system bus drivers (mostly embedded / system-on-chip) | 884 | # I2C system bus drivers (mostly embedded / system-on-chip) |
872 | # | 885 | # |
886 | # CONFIG_I2C_DESIGNWARE is not set | ||
873 | # CONFIG_I2C_OCORES is not set | 887 | # CONFIG_I2C_OCORES is not set |
874 | # CONFIG_I2C_SIMTEC is not set | 888 | # CONFIG_I2C_SIMTEC is not set |
875 | 889 | ||
@@ -898,13 +912,17 @@ CONFIG_I2C_ALGOBIT=y | |||
898 | # CONFIG_SENSORS_PCF8574 is not set | 912 | # CONFIG_SENSORS_PCF8574 is not set |
899 | # CONFIG_PCF8575 is not set | 913 | # CONFIG_PCF8575 is not set |
900 | # CONFIG_SENSORS_PCA9539 is not set | 914 | # CONFIG_SENSORS_PCA9539 is not set |
901 | # CONFIG_SENSORS_MAX6875 is not set | ||
902 | # CONFIG_SENSORS_TSL2550 is not set | 915 | # CONFIG_SENSORS_TSL2550 is not set |
903 | # CONFIG_I2C_DEBUG_CORE is not set | 916 | # CONFIG_I2C_DEBUG_CORE is not set |
904 | # CONFIG_I2C_DEBUG_ALGO is not set | 917 | # CONFIG_I2C_DEBUG_ALGO is not set |
905 | # CONFIG_I2C_DEBUG_BUS is not set | 918 | # CONFIG_I2C_DEBUG_BUS is not set |
906 | # CONFIG_I2C_DEBUG_CHIP is not set | 919 | # CONFIG_I2C_DEBUG_CHIP is not set |
907 | # CONFIG_SPI is not set | 920 | # CONFIG_SPI is not set |
921 | |||
922 | # | ||
923 | # PPS support | ||
924 | # | ||
925 | # CONFIG_PPS is not set | ||
908 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 926 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
909 | # CONFIG_GPIOLIB is not set | 927 | # CONFIG_GPIOLIB is not set |
910 | # CONFIG_W1 is not set | 928 | # CONFIG_W1 is not set |
@@ -959,6 +977,7 @@ CONFIG_HWMON=y | |||
959 | # CONFIG_SENSORS_SMSC47B397 is not set | 977 | # CONFIG_SENSORS_SMSC47B397 is not set |
960 | # CONFIG_SENSORS_ADS7828 is not set | 978 | # CONFIG_SENSORS_ADS7828 is not set |
961 | # CONFIG_SENSORS_THMC50 is not set | 979 | # CONFIG_SENSORS_THMC50 is not set |
980 | # CONFIG_SENSORS_TMP401 is not set | ||
962 | # CONFIG_SENSORS_VIA686A is not set | 981 | # CONFIG_SENSORS_VIA686A is not set |
963 | # CONFIG_SENSORS_VT1211 is not set | 982 | # CONFIG_SENSORS_VT1211 is not set |
964 | # CONFIG_SENSORS_VT8231 is not set | 983 | # CONFIG_SENSORS_VT8231 is not set |
@@ -994,23 +1013,9 @@ CONFIG_SSB_POSSIBLE=y | |||
994 | # CONFIG_MFD_WM8400 is not set | 1013 | # CONFIG_MFD_WM8400 is not set |
995 | # CONFIG_MFD_WM8350_I2C is not set | 1014 | # CONFIG_MFD_WM8350_I2C is not set |
996 | # CONFIG_MFD_PCF50633 is not set | 1015 | # CONFIG_MFD_PCF50633 is not set |
1016 | # CONFIG_AB3100_CORE is not set | ||
997 | # CONFIG_REGULATOR is not set | 1017 | # CONFIG_REGULATOR is not set |
998 | 1018 | # CONFIG_MEDIA_SUPPORT is not set | |
999 | # | ||
1000 | # Multimedia devices | ||
1001 | # | ||
1002 | |||
1003 | # | ||
1004 | # Multimedia core support | ||
1005 | # | ||
1006 | # CONFIG_VIDEO_DEV is not set | ||
1007 | # CONFIG_DVB_CORE is not set | ||
1008 | # CONFIG_VIDEO_MEDIA is not set | ||
1009 | |||
1010 | # | ||
1011 | # Multimedia drivers | ||
1012 | # | ||
1013 | # CONFIG_DAB is not set | ||
1014 | 1019 | ||
1015 | # | 1020 | # |
1016 | # Graphics support | 1021 | # Graphics support |
@@ -1284,7 +1289,6 @@ CONFIG_USB=y | |||
1284 | # | 1289 | # |
1285 | # Miscellaneous USB options | 1290 | # Miscellaneous USB options |
1286 | # | 1291 | # |
1287 | CONFIG_USB_DEVICEFS=y | ||
1288 | # CONFIG_USB_DEVICE_CLASS is not set | 1292 | # CONFIG_USB_DEVICE_CLASS is not set |
1289 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1293 | # CONFIG_USB_DYNAMIC_MINORS is not set |
1290 | # CONFIG_USB_OTG is not set | 1294 | # CONFIG_USB_OTG is not set |
@@ -1296,6 +1300,7 @@ CONFIG_USB_DEVICEFS=y | |||
1296 | # USB Host Controller Drivers | 1300 | # USB Host Controller Drivers |
1297 | # | 1301 | # |
1298 | # CONFIG_USB_C67X00_HCD is not set | 1302 | # CONFIG_USB_C67X00_HCD is not set |
1303 | # CONFIG_USB_XHCI_HCD is not set | ||
1299 | CONFIG_USB_EHCI_HCD=m | 1304 | CONFIG_USB_EHCI_HCD=m |
1300 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1305 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1301 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1306 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
@@ -1374,7 +1379,6 @@ CONFIG_USB_STORAGE=m | |||
1374 | # CONFIG_USB_LD is not set | 1379 | # CONFIG_USB_LD is not set |
1375 | # CONFIG_USB_TRANCEVIBRATOR is not set | 1380 | # CONFIG_USB_TRANCEVIBRATOR is not set |
1376 | # CONFIG_USB_IOWARRIOR is not set | 1381 | # CONFIG_USB_IOWARRIOR is not set |
1377 | # CONFIG_USB_TEST is not set | ||
1378 | # CONFIG_USB_ISIGHTFW is not set | 1382 | # CONFIG_USB_ISIGHTFW is not set |
1379 | # CONFIG_USB_VST is not set | 1383 | # CONFIG_USB_VST is not set |
1380 | # CONFIG_USB_GADGET is not set | 1384 | # CONFIG_USB_GADGET is not set |
@@ -1420,6 +1424,7 @@ CONFIG_RTC_INTF_DEV=y | |||
1420 | # CONFIG_RTC_DRV_S35390A is not set | 1424 | # CONFIG_RTC_DRV_S35390A is not set |
1421 | # CONFIG_RTC_DRV_FM3130 is not set | 1425 | # CONFIG_RTC_DRV_FM3130 is not set |
1422 | # CONFIG_RTC_DRV_RX8581 is not set | 1426 | # CONFIG_RTC_DRV_RX8581 is not set |
1427 | # CONFIG_RTC_DRV_RX8025 is not set | ||
1423 | 1428 | ||
1424 | # | 1429 | # |
1425 | # SPI RTC drivers | 1430 | # SPI RTC drivers |
@@ -1448,6 +1453,10 @@ CONFIG_RTC_DRV_STARFIRE=y | |||
1448 | # CONFIG_DMADEVICES is not set | 1453 | # CONFIG_DMADEVICES is not set |
1449 | # CONFIG_AUXDISPLAY is not set | 1454 | # CONFIG_AUXDISPLAY is not set |
1450 | # CONFIG_UIO is not set | 1455 | # CONFIG_UIO is not set |
1456 | |||
1457 | # | ||
1458 | # TI VLYNQ | ||
1459 | # | ||
1451 | # CONFIG_STAGING is not set | 1460 | # CONFIG_STAGING is not set |
1452 | 1461 | ||
1453 | # | 1462 | # |
@@ -1480,11 +1489,11 @@ CONFIG_FS_MBCACHE=y | |||
1480 | # CONFIG_REISERFS_FS is not set | 1489 | # CONFIG_REISERFS_FS is not set |
1481 | # CONFIG_JFS_FS is not set | 1490 | # CONFIG_JFS_FS is not set |
1482 | CONFIG_FS_POSIX_ACL=y | 1491 | CONFIG_FS_POSIX_ACL=y |
1483 | CONFIG_FILE_LOCKING=y | ||
1484 | # CONFIG_XFS_FS is not set | 1492 | # CONFIG_XFS_FS is not set |
1485 | # CONFIG_GFS2_FS is not set | 1493 | # CONFIG_GFS2_FS is not set |
1486 | # CONFIG_OCFS2_FS is not set | 1494 | # CONFIG_OCFS2_FS is not set |
1487 | # CONFIG_BTRFS_FS is not set | 1495 | # CONFIG_BTRFS_FS is not set |
1496 | CONFIG_FILE_LOCKING=y | ||
1488 | CONFIG_FSNOTIFY=y | 1497 | CONFIG_FSNOTIFY=y |
1489 | CONFIG_DNOTIFY=y | 1498 | CONFIG_DNOTIFY=y |
1490 | CONFIG_INOTIFY=y | 1499 | CONFIG_INOTIFY=y |
@@ -1560,7 +1569,7 @@ CONFIG_NETWORK_FILESYSTEMS=y | |||
1560 | # CONFIG_PARTITION_ADVANCED is not set | 1569 | # CONFIG_PARTITION_ADVANCED is not set |
1561 | CONFIG_MSDOS_PARTITION=y | 1570 | CONFIG_MSDOS_PARTITION=y |
1562 | CONFIG_SUN_PARTITION=y | 1571 | CONFIG_SUN_PARTITION=y |
1563 | CONFIG_NLS=m | 1572 | CONFIG_NLS=y |
1564 | CONFIG_NLS_DEFAULT="iso8859-1" | 1573 | CONFIG_NLS_DEFAULT="iso8859-1" |
1565 | # CONFIG_NLS_CODEPAGE_437 is not set | 1574 | # CONFIG_NLS_CODEPAGE_437 is not set |
1566 | # CONFIG_NLS_CODEPAGE_737 is not set | 1575 | # CONFIG_NLS_CODEPAGE_737 is not set |
diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index 204e4bf64438..5a8c308e2b5c 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/scatterlist.h> | 4 | #include <linux/scatterlist.h> |
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/dma-debug.h> | ||
6 | 7 | ||
7 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | 8 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) |
8 | 9 | ||
@@ -13,142 +14,40 @@ extern int dma_set_mask(struct device *dev, u64 dma_mask); | |||
13 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 14 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
14 | #define dma_is_consistent(d, h) (1) | 15 | #define dma_is_consistent(d, h) (1) |
15 | 16 | ||
16 | struct dma_ops { | 17 | extern struct dma_map_ops *dma_ops, pci32_dma_ops; |
17 | void *(*alloc_coherent)(struct device *dev, size_t size, | 18 | extern struct bus_type pci_bus_type; |
18 | dma_addr_t *dma_handle, gfp_t flag); | ||
19 | void (*free_coherent)(struct device *dev, size_t size, | ||
20 | void *cpu_addr, dma_addr_t dma_handle); | ||
21 | dma_addr_t (*map_page)(struct device *dev, struct page *page, | ||
22 | unsigned long offset, size_t size, | ||
23 | enum dma_data_direction direction); | ||
24 | void (*unmap_page)(struct device *dev, dma_addr_t dma_addr, | ||
25 | size_t size, | ||
26 | enum dma_data_direction direction); | ||
27 | int (*map_sg)(struct device *dev, struct scatterlist *sg, int nents, | ||
28 | enum dma_data_direction direction); | ||
29 | void (*unmap_sg)(struct device *dev, struct scatterlist *sg, | ||
30 | int nhwentries, | ||
31 | enum dma_data_direction direction); | ||
32 | void (*sync_single_for_cpu)(struct device *dev, | ||
33 | dma_addr_t dma_handle, size_t size, | ||
34 | enum dma_data_direction direction); | ||
35 | void (*sync_single_for_device)(struct device *dev, | ||
36 | dma_addr_t dma_handle, size_t size, | ||
37 | enum dma_data_direction direction); | ||
38 | void (*sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg, | ||
39 | int nelems, | ||
40 | enum dma_data_direction direction); | ||
41 | void (*sync_sg_for_device)(struct device *dev, | ||
42 | struct scatterlist *sg, int nents, | ||
43 | enum dma_data_direction dir); | ||
44 | }; | ||
45 | extern const struct dma_ops *dma_ops; | ||
46 | 19 | ||
47 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 20 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) |
48 | dma_addr_t *dma_handle, gfp_t flag) | ||
49 | { | ||
50 | return dma_ops->alloc_coherent(dev, size, dma_handle, flag); | ||
51 | } | ||
52 | |||
53 | static inline void dma_free_coherent(struct device *dev, size_t size, | ||
54 | void *cpu_addr, dma_addr_t dma_handle) | ||
55 | { | ||
56 | dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); | ||
57 | } | ||
58 | |||
59 | static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, | ||
60 | size_t size, | ||
61 | enum dma_data_direction direction) | ||
62 | { | ||
63 | return dma_ops->map_page(dev, virt_to_page(cpu_addr), | ||
64 | (unsigned long)cpu_addr & ~PAGE_MASK, size, | ||
65 | direction); | ||
66 | } | ||
67 | |||
68 | static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, | ||
69 | size_t size, | ||
70 | enum dma_data_direction direction) | ||
71 | { | ||
72 | dma_ops->unmap_page(dev, dma_addr, size, direction); | ||
73 | } | ||
74 | |||
75 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | ||
76 | unsigned long offset, size_t size, | ||
77 | enum dma_data_direction direction) | ||
78 | { | ||
79 | return dma_ops->map_page(dev, page, offset, size, direction); | ||
80 | } | ||
81 | |||
82 | static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, | ||
83 | size_t size, | ||
84 | enum dma_data_direction direction) | ||
85 | { | ||
86 | dma_ops->unmap_page(dev, dma_address, size, direction); | ||
87 | } | ||
88 | |||
89 | static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, | ||
90 | int nents, enum dma_data_direction direction) | ||
91 | { | ||
92 | return dma_ops->map_sg(dev, sg, nents, direction); | ||
93 | } | ||
94 | |||
95 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
96 | int nents, enum dma_data_direction direction) | ||
97 | { | 21 | { |
98 | dma_ops->unmap_sg(dev, sg, nents, direction); | 22 | #if defined(CONFIG_SPARC32) && defined(CONFIG_PCI) |
99 | } | 23 | if (dev->bus == &pci_bus_type) |
100 | 24 | return &pci32_dma_ops; | |
101 | static inline void dma_sync_single_for_cpu(struct device *dev, | 25 | #endif |
102 | dma_addr_t dma_handle, size_t size, | 26 | return dma_ops; |
103 | enum dma_data_direction direction) | ||
104 | { | ||
105 | dma_ops->sync_single_for_cpu(dev, dma_handle, size, direction); | ||
106 | } | 27 | } |
107 | 28 | ||
108 | static inline void dma_sync_single_for_device(struct device *dev, | 29 | #include <asm-generic/dma-mapping-common.h> |
109 | dma_addr_t dma_handle, | ||
110 | size_t size, | ||
111 | enum dma_data_direction direction) | ||
112 | { | ||
113 | if (dma_ops->sync_single_for_device) | ||
114 | dma_ops->sync_single_for_device(dev, dma_handle, size, | ||
115 | direction); | ||
116 | } | ||
117 | 30 | ||
118 | static inline void dma_sync_sg_for_cpu(struct device *dev, | 31 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
119 | struct scatterlist *sg, int nelems, | 32 | dma_addr_t *dma_handle, gfp_t flag) |
120 | enum dma_data_direction direction) | ||
121 | { | 33 | { |
122 | dma_ops->sync_sg_for_cpu(dev, sg, nelems, direction); | 34 | struct dma_map_ops *ops = get_dma_ops(dev); |
123 | } | 35 | void *cpu_addr; |
124 | 36 | ||
125 | static inline void dma_sync_sg_for_device(struct device *dev, | 37 | cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag); |
126 | struct scatterlist *sg, int nelems, | 38 | debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); |
127 | enum dma_data_direction direction) | 39 | return cpu_addr; |
128 | { | ||
129 | if (dma_ops->sync_sg_for_device) | ||
130 | dma_ops->sync_sg_for_device(dev, sg, nelems, direction); | ||
131 | } | 40 | } |
132 | 41 | ||
133 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | 42 | static inline void dma_free_coherent(struct device *dev, size_t size, |
134 | dma_addr_t dma_handle, | 43 | void *cpu_addr, dma_addr_t dma_handle) |
135 | unsigned long offset, | ||
136 | size_t size, | ||
137 | enum dma_data_direction dir) | ||
138 | { | 44 | { |
139 | dma_sync_single_for_cpu(dev, dma_handle+offset, size, dir); | 45 | struct dma_map_ops *ops = get_dma_ops(dev); |
140 | } | ||
141 | 46 | ||
142 | static inline void dma_sync_single_range_for_device(struct device *dev, | 47 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); |
143 | dma_addr_t dma_handle, | 48 | ops->free_coherent(dev, size, cpu_addr, dma_handle); |
144 | unsigned long offset, | ||
145 | size_t size, | ||
146 | enum dma_data_direction dir) | ||
147 | { | ||
148 | dma_sync_single_for_device(dev, dma_handle+offset, size, dir); | ||
149 | } | 49 | } |
150 | 50 | ||
151 | |||
152 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 51 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
153 | { | 52 | { |
154 | return (dma_addr == DMA_ERROR_CODE); | 53 | return (dma_addr == DMA_ERROR_CODE); |
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index 1934f2cbf513..a0b443cb3c1f 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h | |||
@@ -89,8 +89,8 @@ static inline unsigned long get_softint(void) | |||
89 | return retval; | 89 | return retval; |
90 | } | 90 | } |
91 | 91 | ||
92 | void __trigger_all_cpu_backtrace(void); | 92 | void arch_trigger_all_cpu_backtrace(void); |
93 | #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() | 93 | #define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace |
94 | 94 | ||
95 | extern void *hardirq_stack[NR_CPUS]; | 95 | extern void *hardirq_stack[NR_CPUS]; |
96 | extern void *softirq_stack[NR_CPUS]; | 96 | extern void *softirq_stack[NR_CPUS]; |
diff --git a/arch/sparc/include/asm/pci.h b/arch/sparc/include/asm/pci.h index 6e14fd179335..d9c031f9910f 100644 --- a/arch/sparc/include/asm/pci.h +++ b/arch/sparc/include/asm/pci.h | |||
@@ -5,4 +5,7 @@ | |||
5 | #else | 5 | #else |
6 | #include <asm/pci_32.h> | 6 | #include <asm/pci_32.h> |
7 | #endif | 7 | #endif |
8 | |||
9 | #include <asm-generic/pci-dma-compat.h> | ||
10 | |||
8 | #endif | 11 | #endif |
diff --git a/arch/sparc/include/asm/pci_32.h b/arch/sparc/include/asm/pci_32.h index b41c4c198159..ac0e8369fd97 100644 --- a/arch/sparc/include/asm/pci_32.h +++ b/arch/sparc/include/asm/pci_32.h | |||
@@ -31,42 +31,8 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
31 | */ | 31 | */ |
32 | #define PCI_DMA_BUS_IS_PHYS (0) | 32 | #define PCI_DMA_BUS_IS_PHYS (0) |
33 | 33 | ||
34 | #include <asm/scatterlist.h> | ||
35 | |||
36 | struct pci_dev; | 34 | struct pci_dev; |
37 | 35 | ||
38 | /* Allocate and map kernel buffer using consistent mode DMA for a device. | ||
39 | * hwdev should be valid struct pci_dev pointer for PCI devices. | ||
40 | */ | ||
41 | extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle); | ||
42 | |||
43 | /* Free and unmap a consistent DMA buffer. | ||
44 | * cpu_addr is what was returned from pci_alloc_consistent, | ||
45 | * size must be the same as what as passed into pci_alloc_consistent, | ||
46 | * and likewise dma_addr must be the same as what *dma_addrp was set to. | ||
47 | * | ||
48 | * References to the memory and mappings assosciated with cpu_addr/dma_addr | ||
49 | * past this call are illegal. | ||
50 | */ | ||
51 | extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle); | ||
52 | |||
53 | /* Map a single buffer of the indicated size for DMA in streaming mode. | ||
54 | * The 32-bit bus address to use is returned. | ||
55 | * | ||
56 | * Once the device is given the dma address, the device owns this memory | ||
57 | * until either pci_unmap_single or pci_dma_sync_single_for_cpu is performed. | ||
58 | */ | ||
59 | extern dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction); | ||
60 | |||
61 | /* Unmap a single streaming mode DMA translation. The dma_addr and size | ||
62 | * must match what was provided for in a previous pci_map_single call. All | ||
63 | * other usages are undefined. | ||
64 | * | ||
65 | * After this call, reads by the cpu to the buffer are guaranteed to see | ||
66 | * whatever the device wrote there. | ||
67 | */ | ||
68 | extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction); | ||
69 | |||
70 | /* pci_unmap_{single,page} is not a nop, thus... */ | 36 | /* pci_unmap_{single,page} is not a nop, thus... */ |
71 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | 37 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
72 | dma_addr_t ADDR_NAME; | 38 | dma_addr_t ADDR_NAME; |
@@ -81,69 +47,6 @@ extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t | |||
81 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | 47 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ |
82 | (((PTR)->LEN_NAME) = (VAL)) | 48 | (((PTR)->LEN_NAME) = (VAL)) |
83 | 49 | ||
84 | /* | ||
85 | * Same as above, only with pages instead of mapped addresses. | ||
86 | */ | ||
87 | extern dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page, | ||
88 | unsigned long offset, size_t size, int direction); | ||
89 | extern void pci_unmap_page(struct pci_dev *hwdev, | ||
90 | dma_addr_t dma_address, size_t size, int direction); | ||
91 | |||
92 | /* Map a set of buffers described by scatterlist in streaming | ||
93 | * mode for DMA. This is the scather-gather version of the | ||
94 | * above pci_map_single interface. Here the scatter gather list | ||
95 | * elements are each tagged with the appropriate dma address | ||
96 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
97 | * | ||
98 | * NOTE: An implementation may be able to use a smaller number of | ||
99 | * DMA address/length pairs than there are SG table elements. | ||
100 | * (for example via virtual mapping capabilities) | ||
101 | * The routine returns the number of addr/length pairs actually | ||
102 | * used, at most nents. | ||
103 | * | ||
104 | * Device ownership issues as mentioned above for pci_map_single are | ||
105 | * the same here. | ||
106 | */ | ||
107 | extern int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction); | ||
108 | |||
109 | /* Unmap a set of streaming mode DMA translations. | ||
110 | * Again, cpu read rules concerning calls here are the same as for | ||
111 | * pci_unmap_single() above. | ||
112 | */ | ||
113 | extern void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nhwents, int direction); | ||
114 | |||
115 | /* Make physical memory consistent for a single | ||
116 | * streaming mode DMA translation after a transfer. | ||
117 | * | ||
118 | * If you perform a pci_map_single() but wish to interrogate the | ||
119 | * buffer using the cpu, yet do not wish to teardown the PCI dma | ||
120 | * mapping, you must call this function before doing so. At the | ||
121 | * next point you give the PCI dma address back to the card, you | ||
122 | * must first perform a pci_dma_sync_for_device, and then the device | ||
123 | * again owns the buffer. | ||
124 | */ | ||
125 | extern void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction); | ||
126 | extern void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction); | ||
127 | |||
128 | /* Make physical memory consistent for a set of streaming | ||
129 | * mode DMA translations after a transfer. | ||
130 | * | ||
131 | * The same as pci_dma_sync_single_* but for a scatter-gather list, | ||
132 | * same rules and usage. | ||
133 | */ | ||
134 | extern void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction); | ||
135 | extern void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction); | ||
136 | |||
137 | /* Return whether the given PCI device DMA address mask can | ||
138 | * be supported properly. For example, if your device can | ||
139 | * only drive the low 24-bits during PCI bus mastering, then | ||
140 | * you would pass 0x00ffffff as the mask to this function. | ||
141 | */ | ||
142 | static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) | ||
143 | { | ||
144 | return 1; | ||
145 | } | ||
146 | |||
147 | #ifdef CONFIG_PCI | 50 | #ifdef CONFIG_PCI |
148 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 51 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
149 | enum pci_dma_burst_strategy *strat, | 52 | enum pci_dma_burst_strategy *strat, |
@@ -154,14 +57,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
154 | } | 57 | } |
155 | #endif | 58 | #endif |
156 | 59 | ||
157 | #define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0) | ||
158 | |||
159 | static inline int pci_dma_mapping_error(struct pci_dev *pdev, | ||
160 | dma_addr_t dma_addr) | ||
161 | { | ||
162 | return (dma_addr == PCI_DMA_ERROR_CODE); | ||
163 | } | ||
164 | |||
165 | struct device_node; | 60 | struct device_node; |
166 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | 61 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); |
167 | 62 | ||
diff --git a/arch/sparc/include/asm/pci_64.h b/arch/sparc/include/asm/pci_64.h index 7a1e3566e59c..5cc9f6aa5494 100644 --- a/arch/sparc/include/asm/pci_64.h +++ b/arch/sparc/include/asm/pci_64.h | |||
@@ -35,37 +35,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
35 | */ | 35 | */ |
36 | #define PCI_DMA_BUS_IS_PHYS (0) | 36 | #define PCI_DMA_BUS_IS_PHYS (0) |
37 | 37 | ||
38 | static inline void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, | ||
39 | dma_addr_t *dma_handle) | ||
40 | { | ||
41 | return dma_alloc_coherent(&pdev->dev, size, dma_handle, GFP_ATOMIC); | ||
42 | } | ||
43 | |||
44 | static inline void pci_free_consistent(struct pci_dev *pdev, size_t size, | ||
45 | void *vaddr, dma_addr_t dma_handle) | ||
46 | { | ||
47 | return dma_free_coherent(&pdev->dev, size, vaddr, dma_handle); | ||
48 | } | ||
49 | |||
50 | static inline dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, | ||
51 | size_t size, int direction) | ||
52 | { | ||
53 | return dma_map_single(&pdev->dev, ptr, size, | ||
54 | (enum dma_data_direction) direction); | ||
55 | } | ||
56 | |||
57 | static inline void pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, | ||
58 | size_t size, int direction) | ||
59 | { | ||
60 | dma_unmap_single(&pdev->dev, dma_addr, size, | ||
61 | (enum dma_data_direction) direction); | ||
62 | } | ||
63 | |||
64 | #define pci_map_page(dev, page, off, size, dir) \ | ||
65 | pci_map_single(dev, (page_address(page) + (off)), size, dir) | ||
66 | #define pci_unmap_page(dev,addr,sz,dir) \ | ||
67 | pci_unmap_single(dev,addr,sz,dir) | ||
68 | |||
69 | /* pci_unmap_{single,page} is not a nop, thus... */ | 38 | /* pci_unmap_{single,page} is not a nop, thus... */ |
70 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | 39 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
71 | dma_addr_t ADDR_NAME; | 40 | dma_addr_t ADDR_NAME; |
@@ -80,57 +49,6 @@ static inline void pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, | |||
80 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | 49 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ |
81 | (((PTR)->LEN_NAME) = (VAL)) | 50 | (((PTR)->LEN_NAME) = (VAL)) |
82 | 51 | ||
83 | static inline int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, | ||
84 | int nents, int direction) | ||
85 | { | ||
86 | return dma_map_sg(&pdev->dev, sg, nents, | ||
87 | (enum dma_data_direction) direction); | ||
88 | } | ||
89 | |||
90 | static inline void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, | ||
91 | int nents, int direction) | ||
92 | { | ||
93 | dma_unmap_sg(&pdev->dev, sg, nents, | ||
94 | (enum dma_data_direction) direction); | ||
95 | } | ||
96 | |||
97 | static inline void pci_dma_sync_single_for_cpu(struct pci_dev *pdev, | ||
98 | dma_addr_t dma_handle, | ||
99 | size_t size, int direction) | ||
100 | { | ||
101 | dma_sync_single_for_cpu(&pdev->dev, dma_handle, size, | ||
102 | (enum dma_data_direction) direction); | ||
103 | } | ||
104 | |||
105 | static inline void pci_dma_sync_single_for_device(struct pci_dev *pdev, | ||
106 | dma_addr_t dma_handle, | ||
107 | size_t size, int direction) | ||
108 | { | ||
109 | /* No flushing needed to sync cpu writes to the device. */ | ||
110 | } | ||
111 | |||
112 | static inline void pci_dma_sync_sg_for_cpu(struct pci_dev *pdev, | ||
113 | struct scatterlist *sg, | ||
114 | int nents, int direction) | ||
115 | { | ||
116 | dma_sync_sg_for_cpu(&pdev->dev, sg, nents, | ||
117 | (enum dma_data_direction) direction); | ||
118 | } | ||
119 | |||
120 | static inline void pci_dma_sync_sg_for_device(struct pci_dev *pdev, | ||
121 | struct scatterlist *sg, | ||
122 | int nelems, int direction) | ||
123 | { | ||
124 | /* No flushing needed to sync cpu writes to the device. */ | ||
125 | } | ||
126 | |||
127 | /* Return whether the given PCI device DMA address mask can | ||
128 | * be supported properly. For example, if your device can | ||
129 | * only drive the low 24-bits during PCI bus mastering, then | ||
130 | * you would pass 0x00ffffff as the mask to this function. | ||
131 | */ | ||
132 | extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask); | ||
133 | |||
134 | /* PCI IOMMU mapping bypass support. */ | 52 | /* PCI IOMMU mapping bypass support. */ |
135 | 53 | ||
136 | /* PCI 64-bit addressing works for all slots on all controller | 54 | /* PCI 64-bit addressing works for all slots on all controller |
@@ -140,12 +58,6 @@ extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask); | |||
140 | #define PCI64_REQUIRED_MASK (~(dma64_addr_t)0) | 58 | #define PCI64_REQUIRED_MASK (~(dma64_addr_t)0) |
141 | #define PCI64_ADDR_BASE 0xfffc000000000000UL | 59 | #define PCI64_ADDR_BASE 0xfffc000000000000UL |
142 | 60 | ||
143 | static inline int pci_dma_mapping_error(struct pci_dev *pdev, | ||
144 | dma_addr_t dma_addr) | ||
145 | { | ||
146 | return dma_mapping_error(&pdev->dev, dma_addr); | ||
147 | } | ||
148 | |||
149 | #ifdef CONFIG_PCI | 61 | #ifdef CONFIG_PCI |
150 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 62 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
151 | enum pci_dma_burst_strategy *strat, | 63 | enum pci_dma_burst_strategy *strat, |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index b049abf9902f..0ff92fa22064 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -726,11 +726,17 @@ extern unsigned long pte_file(pte_t); | |||
726 | extern pte_t pgoff_to_pte(unsigned long); | 726 | extern pte_t pgoff_to_pte(unsigned long); |
727 | #define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) | 727 | #define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) |
728 | 728 | ||
729 | extern unsigned long *sparc64_valid_addr_bitmap; | 729 | extern unsigned long sparc64_valid_addr_bitmap[]; |
730 | 730 | ||
731 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | 731 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ |
732 | #define kern_addr_valid(addr) \ | 732 | static inline bool kern_addr_valid(unsigned long addr) |
733 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) | 733 | { |
734 | unsigned long paddr = __pa(addr); | ||
735 | |||
736 | if ((paddr >> 41UL) != 0UL) | ||
737 | return false; | ||
738 | return test_bit(paddr >> 22, sparc64_valid_addr_bitmap); | ||
739 | } | ||
734 | 740 | ||
735 | extern int page_in_phys_avail(unsigned long paddr); | 741 | extern int page_in_phys_avail(unsigned long paddr); |
736 | 742 | ||
diff --git a/arch/sparc/include/asm/spinlock_32.h b/arch/sparc/include/asm/spinlock_32.h index 46f91ab66a50..857630cff636 100644 --- a/arch/sparc/include/asm/spinlock_32.h +++ b/arch/sparc/include/asm/spinlock_32.h | |||
@@ -76,7 +76,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
76 | * | 76 | * |
77 | * Unfortunately this scheme limits us to ~16,000,000 cpus. | 77 | * Unfortunately this scheme limits us to ~16,000,000 cpus. |
78 | */ | 78 | */ |
79 | static inline void __read_lock(raw_rwlock_t *rw) | 79 | static inline void arch_read_lock(raw_rwlock_t *rw) |
80 | { | 80 | { |
81 | register raw_rwlock_t *lp asm("g1"); | 81 | register raw_rwlock_t *lp asm("g1"); |
82 | lp = rw; | 82 | lp = rw; |
@@ -92,11 +92,11 @@ static inline void __read_lock(raw_rwlock_t *rw) | |||
92 | #define __raw_read_lock(lock) \ | 92 | #define __raw_read_lock(lock) \ |
93 | do { unsigned long flags; \ | 93 | do { unsigned long flags; \ |
94 | local_irq_save(flags); \ | 94 | local_irq_save(flags); \ |
95 | __read_lock(lock); \ | 95 | arch_read_lock(lock); \ |
96 | local_irq_restore(flags); \ | 96 | local_irq_restore(flags); \ |
97 | } while(0) | 97 | } while(0) |
98 | 98 | ||
99 | static inline void __read_unlock(raw_rwlock_t *rw) | 99 | static inline void arch_read_unlock(raw_rwlock_t *rw) |
100 | { | 100 | { |
101 | register raw_rwlock_t *lp asm("g1"); | 101 | register raw_rwlock_t *lp asm("g1"); |
102 | lp = rw; | 102 | lp = rw; |
@@ -112,7 +112,7 @@ static inline void __read_unlock(raw_rwlock_t *rw) | |||
112 | #define __raw_read_unlock(lock) \ | 112 | #define __raw_read_unlock(lock) \ |
113 | do { unsigned long flags; \ | 113 | do { unsigned long flags; \ |
114 | local_irq_save(flags); \ | 114 | local_irq_save(flags); \ |
115 | __read_unlock(lock); \ | 115 | arch_read_unlock(lock); \ |
116 | local_irq_restore(flags); \ | 116 | local_irq_restore(flags); \ |
117 | } while(0) | 117 | } while(0) |
118 | 118 | ||
@@ -150,7 +150,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
150 | return (val == 0); | 150 | return (val == 0); |
151 | } | 151 | } |
152 | 152 | ||
153 | static inline int __read_trylock(raw_rwlock_t *rw) | 153 | static inline int arch_read_trylock(raw_rwlock_t *rw) |
154 | { | 154 | { |
155 | register raw_rwlock_t *lp asm("g1"); | 155 | register raw_rwlock_t *lp asm("g1"); |
156 | register int res asm("o0"); | 156 | register int res asm("o0"); |
@@ -169,7 +169,7 @@ static inline int __read_trylock(raw_rwlock_t *rw) | |||
169 | ({ unsigned long flags; \ | 169 | ({ unsigned long flags; \ |
170 | int res; \ | 170 | int res; \ |
171 | local_irq_save(flags); \ | 171 | local_irq_save(flags); \ |
172 | res = __read_trylock(lock); \ | 172 | res = arch_read_trylock(lock); \ |
173 | local_irq_restore(flags); \ | 173 | local_irq_restore(flags); \ |
174 | res; \ | 174 | res; \ |
175 | }) | 175 | }) |
diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h index f6b2b92ad8d2..43e514783582 100644 --- a/arch/sparc/include/asm/spinlock_64.h +++ b/arch/sparc/include/asm/spinlock_64.h | |||
@@ -92,7 +92,7 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla | |||
92 | 92 | ||
93 | /* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */ | 93 | /* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */ |
94 | 94 | ||
95 | static void inline __read_lock(raw_rwlock_t *lock) | 95 | static void inline arch_read_lock(raw_rwlock_t *lock) |
96 | { | 96 | { |
97 | unsigned long tmp1, tmp2; | 97 | unsigned long tmp1, tmp2; |
98 | 98 | ||
@@ -115,7 +115,7 @@ static void inline __read_lock(raw_rwlock_t *lock) | |||
115 | : "memory"); | 115 | : "memory"); |
116 | } | 116 | } |
117 | 117 | ||
118 | static int inline __read_trylock(raw_rwlock_t *lock) | 118 | static int inline arch_read_trylock(raw_rwlock_t *lock) |
119 | { | 119 | { |
120 | int tmp1, tmp2; | 120 | int tmp1, tmp2; |
121 | 121 | ||
@@ -136,7 +136,7 @@ static int inline __read_trylock(raw_rwlock_t *lock) | |||
136 | return tmp1; | 136 | return tmp1; |
137 | } | 137 | } |
138 | 138 | ||
139 | static void inline __read_unlock(raw_rwlock_t *lock) | 139 | static void inline arch_read_unlock(raw_rwlock_t *lock) |
140 | { | 140 | { |
141 | unsigned long tmp1, tmp2; | 141 | unsigned long tmp1, tmp2; |
142 | 142 | ||
@@ -152,7 +152,7 @@ static void inline __read_unlock(raw_rwlock_t *lock) | |||
152 | : "memory"); | 152 | : "memory"); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void inline __write_lock(raw_rwlock_t *lock) | 155 | static void inline arch_write_lock(raw_rwlock_t *lock) |
156 | { | 156 | { |
157 | unsigned long mask, tmp1, tmp2; | 157 | unsigned long mask, tmp1, tmp2; |
158 | 158 | ||
@@ -177,7 +177,7 @@ static void inline __write_lock(raw_rwlock_t *lock) | |||
177 | : "memory"); | 177 | : "memory"); |
178 | } | 178 | } |
179 | 179 | ||
180 | static void inline __write_unlock(raw_rwlock_t *lock) | 180 | static void inline arch_write_unlock(raw_rwlock_t *lock) |
181 | { | 181 | { |
182 | __asm__ __volatile__( | 182 | __asm__ __volatile__( |
183 | " stw %%g0, [%0]" | 183 | " stw %%g0, [%0]" |
@@ -186,7 +186,7 @@ static void inline __write_unlock(raw_rwlock_t *lock) | |||
186 | : "memory"); | 186 | : "memory"); |
187 | } | 187 | } |
188 | 188 | ||
189 | static int inline __write_trylock(raw_rwlock_t *lock) | 189 | static int inline arch_write_trylock(raw_rwlock_t *lock) |
190 | { | 190 | { |
191 | unsigned long mask, tmp1, tmp2, result; | 191 | unsigned long mask, tmp1, tmp2, result; |
192 | 192 | ||
@@ -210,14 +210,14 @@ static int inline __write_trylock(raw_rwlock_t *lock) | |||
210 | return result; | 210 | return result; |
211 | } | 211 | } |
212 | 212 | ||
213 | #define __raw_read_lock(p) __read_lock(p) | 213 | #define __raw_read_lock(p) arch_read_lock(p) |
214 | #define __raw_read_lock_flags(p, f) __read_lock(p) | 214 | #define __raw_read_lock_flags(p, f) arch_read_lock(p) |
215 | #define __raw_read_trylock(p) __read_trylock(p) | 215 | #define __raw_read_trylock(p) arch_read_trylock(p) |
216 | #define __raw_read_unlock(p) __read_unlock(p) | 216 | #define __raw_read_unlock(p) arch_read_unlock(p) |
217 | #define __raw_write_lock(p) __write_lock(p) | 217 | #define __raw_write_lock(p) arch_write_lock(p) |
218 | #define __raw_write_lock_flags(p, f) __write_lock(p) | 218 | #define __raw_write_lock_flags(p, f) arch_write_lock(p) |
219 | #define __raw_write_unlock(p) __write_unlock(p) | 219 | #define __raw_write_unlock(p) arch_write_unlock(p) |
220 | #define __raw_write_trylock(p) __write_trylock(p) | 220 | #define __raw_write_trylock(p) arch_write_trylock(p) |
221 | 221 | ||
222 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) | 222 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) |
223 | #define __raw_write_can_lock(rw) (!(rw)->lock) | 223 | #define __raw_write_can_lock(rw) (!(rw)->lock) |
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 475ce4696acd..29b88a580661 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -61,7 +61,7 @@ obj-$(CONFIG_SPARC64_SMP) += cpumap.o | |||
61 | obj-$(CONFIG_SPARC32) += devres.o | 61 | obj-$(CONFIG_SPARC32) += devres.o |
62 | devres-y := ../../../kernel/irq/devres.o | 62 | devres-y := ../../../kernel/irq/devres.o |
63 | 63 | ||
64 | obj-$(CONFIG_SPARC32) += dma.o | 64 | obj-y += dma.o |
65 | 65 | ||
66 | obj-$(CONFIG_SPARC32_PCI) += pcic.o | 66 | obj-$(CONFIG_SPARC32_PCI) += pcic.o |
67 | 67 | ||
diff --git a/arch/sparc/kernel/dma.c b/arch/sparc/kernel/dma.c index 524c32f97c55..e1ba8ee21b9a 100644 --- a/arch/sparc/kernel/dma.c +++ b/arch/sparc/kernel/dma.c | |||
@@ -1,178 +1,13 @@ | |||
1 | /* dma.c: PCI and SBUS DMA accessors for 32-bit sparc. | ||
2 | * | ||
3 | * Copyright (C) 2008 David S. Miller <davem@davemloft.net> | ||
4 | */ | ||
5 | |||
6 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
7 | #include <linux/module.h> | 2 | #include <linux/module.h> |
8 | #include <linux/dma-mapping.h> | 3 | #include <linux/dma-mapping.h> |
9 | #include <linux/scatterlist.h> | 4 | #include <linux/dma-debug.h> |
10 | #include <linux/mm.h> | ||
11 | |||
12 | #ifdef CONFIG_PCI | ||
13 | #include <linux/pci.h> | ||
14 | #endif | ||
15 | 5 | ||
16 | #include "dma.h" | 6 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 15) |
17 | 7 | ||
18 | int dma_supported(struct device *dev, u64 mask) | 8 | static int __init dma_init(void) |
19 | { | 9 | { |
20 | #ifdef CONFIG_PCI | 10 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); |
21 | if (dev->bus == &pci_bus_type) | ||
22 | return pci_dma_supported(to_pci_dev(dev), mask); | ||
23 | #endif | ||
24 | return 0; | 11 | return 0; |
25 | } | 12 | } |
26 | EXPORT_SYMBOL(dma_supported); | 13 | fs_initcall(dma_init); |
27 | |||
28 | int dma_set_mask(struct device *dev, u64 dma_mask) | ||
29 | { | ||
30 | #ifdef CONFIG_PCI | ||
31 | if (dev->bus == &pci_bus_type) | ||
32 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
33 | #endif | ||
34 | return -EOPNOTSUPP; | ||
35 | } | ||
36 | EXPORT_SYMBOL(dma_set_mask); | ||
37 | |||
38 | static void *dma32_alloc_coherent(struct device *dev, size_t size, | ||
39 | dma_addr_t *dma_handle, gfp_t flag) | ||
40 | { | ||
41 | #ifdef CONFIG_PCI | ||
42 | if (dev->bus == &pci_bus_type) | ||
43 | return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle); | ||
44 | #endif | ||
45 | return sbus_alloc_consistent(dev, size, dma_handle); | ||
46 | } | ||
47 | |||
48 | static void dma32_free_coherent(struct device *dev, size_t size, | ||
49 | void *cpu_addr, dma_addr_t dma_handle) | ||
50 | { | ||
51 | #ifdef CONFIG_PCI | ||
52 | if (dev->bus == &pci_bus_type) { | ||
53 | pci_free_consistent(to_pci_dev(dev), size, | ||
54 | cpu_addr, dma_handle); | ||
55 | return; | ||
56 | } | ||
57 | #endif | ||
58 | sbus_free_consistent(dev, size, cpu_addr, dma_handle); | ||
59 | } | ||
60 | |||
61 | static dma_addr_t dma32_map_page(struct device *dev, struct page *page, | ||
62 | unsigned long offset, size_t size, | ||
63 | enum dma_data_direction direction) | ||
64 | { | ||
65 | #ifdef CONFIG_PCI | ||
66 | if (dev->bus == &pci_bus_type) | ||
67 | return pci_map_page(to_pci_dev(dev), page, offset, | ||
68 | size, (int)direction); | ||
69 | #endif | ||
70 | return sbus_map_single(dev, page_address(page) + offset, | ||
71 | size, (int)direction); | ||
72 | } | ||
73 | |||
74 | static void dma32_unmap_page(struct device *dev, dma_addr_t dma_address, | ||
75 | size_t size, enum dma_data_direction direction) | ||
76 | { | ||
77 | #ifdef CONFIG_PCI | ||
78 | if (dev->bus == &pci_bus_type) { | ||
79 | pci_unmap_page(to_pci_dev(dev), dma_address, | ||
80 | size, (int)direction); | ||
81 | return; | ||
82 | } | ||
83 | #endif | ||
84 | sbus_unmap_single(dev, dma_address, size, (int)direction); | ||
85 | } | ||
86 | |||
87 | static int dma32_map_sg(struct device *dev, struct scatterlist *sg, | ||
88 | int nents, enum dma_data_direction direction) | ||
89 | { | ||
90 | #ifdef CONFIG_PCI | ||
91 | if (dev->bus == &pci_bus_type) | ||
92 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); | ||
93 | #endif | ||
94 | return sbus_map_sg(dev, sg, nents, direction); | ||
95 | } | ||
96 | |||
97 | void dma32_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
98 | int nents, enum dma_data_direction direction) | ||
99 | { | ||
100 | #ifdef CONFIG_PCI | ||
101 | if (dev->bus == &pci_bus_type) { | ||
102 | pci_unmap_sg(to_pci_dev(dev), sg, nents, (int)direction); | ||
103 | return; | ||
104 | } | ||
105 | #endif | ||
106 | sbus_unmap_sg(dev, sg, nents, (int)direction); | ||
107 | } | ||
108 | |||
109 | static void dma32_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, | ||
110 | size_t size, | ||
111 | enum dma_data_direction direction) | ||
112 | { | ||
113 | #ifdef CONFIG_PCI | ||
114 | if (dev->bus == &pci_bus_type) { | ||
115 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, | ||
116 | size, (int)direction); | ||
117 | return; | ||
118 | } | ||
119 | #endif | ||
120 | sbus_dma_sync_single_for_cpu(dev, dma_handle, size, (int) direction); | ||
121 | } | ||
122 | |||
123 | static void dma32_sync_single_for_device(struct device *dev, | ||
124 | dma_addr_t dma_handle, size_t size, | ||
125 | enum dma_data_direction direction) | ||
126 | { | ||
127 | #ifdef CONFIG_PCI | ||
128 | if (dev->bus == &pci_bus_type) { | ||
129 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, | ||
130 | size, (int)direction); | ||
131 | return; | ||
132 | } | ||
133 | #endif | ||
134 | sbus_dma_sync_single_for_device(dev, dma_handle, size, (int) direction); | ||
135 | } | ||
136 | |||
137 | static void dma32_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | ||
138 | int nelems, enum dma_data_direction direction) | ||
139 | { | ||
140 | #ifdef CONFIG_PCI | ||
141 | if (dev->bus == &pci_bus_type) { | ||
142 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, | ||
143 | nelems, (int)direction); | ||
144 | return; | ||
145 | } | ||
146 | #endif | ||
147 | BUG(); | ||
148 | } | ||
149 | |||
150 | static void dma32_sync_sg_for_device(struct device *dev, | ||
151 | struct scatterlist *sg, int nelems, | ||
152 | enum dma_data_direction direction) | ||
153 | { | ||
154 | #ifdef CONFIG_PCI | ||
155 | if (dev->bus == &pci_bus_type) { | ||
156 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, | ||
157 | nelems, (int)direction); | ||
158 | return; | ||
159 | } | ||
160 | #endif | ||
161 | BUG(); | ||
162 | } | ||
163 | |||
164 | static const struct dma_ops dma32_dma_ops = { | ||
165 | .alloc_coherent = dma32_alloc_coherent, | ||
166 | .free_coherent = dma32_free_coherent, | ||
167 | .map_page = dma32_map_page, | ||
168 | .unmap_page = dma32_unmap_page, | ||
169 | .map_sg = dma32_map_sg, | ||
170 | .unmap_sg = dma32_unmap_sg, | ||
171 | .sync_single_for_cpu = dma32_sync_single_for_cpu, | ||
172 | .sync_single_for_device = dma32_sync_single_for_device, | ||
173 | .sync_sg_for_cpu = dma32_sync_sg_for_cpu, | ||
174 | .sync_sg_for_device = dma32_sync_sg_for_device, | ||
175 | }; | ||
176 | |||
177 | const struct dma_ops *dma_ops = &dma32_dma_ops; | ||
178 | EXPORT_SYMBOL(dma_ops); | ||
diff --git a/arch/sparc/kernel/dma.h b/arch/sparc/kernel/dma.h deleted file mode 100644 index f8d8951adb53..000000000000 --- a/arch/sparc/kernel/dma.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | void *sbus_alloc_consistent(struct device *dev, long len, u32 *dma_addrp); | ||
2 | void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba); | ||
3 | dma_addr_t sbus_map_single(struct device *dev, void *va, | ||
4 | size_t len, int direction); | ||
5 | void sbus_unmap_single(struct device *dev, dma_addr_t ba, | ||
6 | size_t n, int direction); | ||
7 | int sbus_map_sg(struct device *dev, struct scatterlist *sg, | ||
8 | int n, int direction); | ||
9 | void sbus_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
10 | int n, int direction); | ||
11 | void sbus_dma_sync_single_for_cpu(struct device *dev, dma_addr_t ba, | ||
12 | size_t size, int direction); | ||
13 | void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, | ||
14 | size_t size, int direction); | ||
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 0aeaefe696b9..7690cc219ecc 100644 --- a/arch/sparc/kernel/iommu.c +++ b/arch/sparc/kernel/iommu.c | |||
@@ -353,7 +353,8 @@ static void dma_4u_free_coherent(struct device *dev, size_t size, | |||
353 | 353 | ||
354 | static dma_addr_t dma_4u_map_page(struct device *dev, struct page *page, | 354 | static dma_addr_t dma_4u_map_page(struct device *dev, struct page *page, |
355 | unsigned long offset, size_t sz, | 355 | unsigned long offset, size_t sz, |
356 | enum dma_data_direction direction) | 356 | enum dma_data_direction direction, |
357 | struct dma_attrs *attrs) | ||
357 | { | 358 | { |
358 | struct iommu *iommu; | 359 | struct iommu *iommu; |
359 | struct strbuf *strbuf; | 360 | struct strbuf *strbuf; |
@@ -474,7 +475,8 @@ do_flush_sync: | |||
474 | } | 475 | } |
475 | 476 | ||
476 | static void dma_4u_unmap_page(struct device *dev, dma_addr_t bus_addr, | 477 | static void dma_4u_unmap_page(struct device *dev, dma_addr_t bus_addr, |
477 | size_t sz, enum dma_data_direction direction) | 478 | size_t sz, enum dma_data_direction direction, |
479 | struct dma_attrs *attrs) | ||
478 | { | 480 | { |
479 | struct iommu *iommu; | 481 | struct iommu *iommu; |
480 | struct strbuf *strbuf; | 482 | struct strbuf *strbuf; |
@@ -520,7 +522,8 @@ static void dma_4u_unmap_page(struct device *dev, dma_addr_t bus_addr, | |||
520 | } | 522 | } |
521 | 523 | ||
522 | static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist, | 524 | static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist, |
523 | int nelems, enum dma_data_direction direction) | 525 | int nelems, enum dma_data_direction direction, |
526 | struct dma_attrs *attrs) | ||
524 | { | 527 | { |
525 | struct scatterlist *s, *outs, *segstart; | 528 | struct scatterlist *s, *outs, *segstart; |
526 | unsigned long flags, handle, prot, ctx; | 529 | unsigned long flags, handle, prot, ctx; |
@@ -691,7 +694,8 @@ static unsigned long fetch_sg_ctx(struct iommu *iommu, struct scatterlist *sg) | |||
691 | } | 694 | } |
692 | 695 | ||
693 | static void dma_4u_unmap_sg(struct device *dev, struct scatterlist *sglist, | 696 | static void dma_4u_unmap_sg(struct device *dev, struct scatterlist *sglist, |
694 | int nelems, enum dma_data_direction direction) | 697 | int nelems, enum dma_data_direction direction, |
698 | struct dma_attrs *attrs) | ||
695 | { | 699 | { |
696 | unsigned long flags, ctx; | 700 | unsigned long flags, ctx; |
697 | struct scatterlist *sg; | 701 | struct scatterlist *sg; |
@@ -822,7 +826,7 @@ static void dma_4u_sync_sg_for_cpu(struct device *dev, | |||
822 | spin_unlock_irqrestore(&iommu->lock, flags); | 826 | spin_unlock_irqrestore(&iommu->lock, flags); |
823 | } | 827 | } |
824 | 828 | ||
825 | static const struct dma_ops sun4u_dma_ops = { | 829 | static struct dma_map_ops sun4u_dma_ops = { |
826 | .alloc_coherent = dma_4u_alloc_coherent, | 830 | .alloc_coherent = dma_4u_alloc_coherent, |
827 | .free_coherent = dma_4u_free_coherent, | 831 | .free_coherent = dma_4u_free_coherent, |
828 | .map_page = dma_4u_map_page, | 832 | .map_page = dma_4u_map_page, |
@@ -833,9 +837,11 @@ static const struct dma_ops sun4u_dma_ops = { | |||
833 | .sync_sg_for_cpu = dma_4u_sync_sg_for_cpu, | 837 | .sync_sg_for_cpu = dma_4u_sync_sg_for_cpu, |
834 | }; | 838 | }; |
835 | 839 | ||
836 | const struct dma_ops *dma_ops = &sun4u_dma_ops; | 840 | struct dma_map_ops *dma_ops = &sun4u_dma_ops; |
837 | EXPORT_SYMBOL(dma_ops); | 841 | EXPORT_SYMBOL(dma_ops); |
838 | 842 | ||
843 | extern int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask); | ||
844 | |||
839 | int dma_supported(struct device *dev, u64 device_mask) | 845 | int dma_supported(struct device *dev, u64 device_mask) |
840 | { | 846 | { |
841 | struct iommu *iommu = dev->archdata.iommu; | 847 | struct iommu *iommu = dev->archdata.iommu; |
@@ -849,7 +855,7 @@ int dma_supported(struct device *dev, u64 device_mask) | |||
849 | 855 | ||
850 | #ifdef CONFIG_PCI | 856 | #ifdef CONFIG_PCI |
851 | if (dev->bus == &pci_bus_type) | 857 | if (dev->bus == &pci_bus_type) |
852 | return pci_dma_supported(to_pci_dev(dev), device_mask); | 858 | return pci64_dma_supported(to_pci_dev(dev), device_mask); |
853 | #endif | 859 | #endif |
854 | 860 | ||
855 | return 0; | 861 | return 0; |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 87ea0d03d975..edbea232c617 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -48,8 +48,6 @@ | |||
48 | #include <asm/iommu.h> | 48 | #include <asm/iommu.h> |
49 | #include <asm/io-unit.h> | 49 | #include <asm/io-unit.h> |
50 | 50 | ||
51 | #include "dma.h" | ||
52 | |||
53 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ | 51 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ |
54 | 52 | ||
55 | static struct resource *_sparc_find_resource(struct resource *r, | 53 | static struct resource *_sparc_find_resource(struct resource *r, |
@@ -246,7 +244,8 @@ EXPORT_SYMBOL(sbus_set_sbus64); | |||
246 | * Typically devices use them for control blocks. | 244 | * Typically devices use them for control blocks. |
247 | * CPU may access them without any explicit flushing. | 245 | * CPU may access them without any explicit flushing. |
248 | */ | 246 | */ |
249 | void *sbus_alloc_consistent(struct device *dev, long len, u32 *dma_addrp) | 247 | static void *sbus_alloc_coherent(struct device *dev, size_t len, |
248 | dma_addr_t *dma_addrp, gfp_t gfp) | ||
250 | { | 249 | { |
251 | struct of_device *op = to_of_device(dev); | 250 | struct of_device *op = to_of_device(dev); |
252 | unsigned long len_total = (len + PAGE_SIZE-1) & PAGE_MASK; | 251 | unsigned long len_total = (len + PAGE_SIZE-1) & PAGE_MASK; |
@@ -299,7 +298,8 @@ err_nopages: | |||
299 | return NULL; | 298 | return NULL; |
300 | } | 299 | } |
301 | 300 | ||
302 | void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba) | 301 | static void sbus_free_coherent(struct device *dev, size_t n, void *p, |
302 | dma_addr_t ba) | ||
303 | { | 303 | { |
304 | struct resource *res; | 304 | struct resource *res; |
305 | struct page *pgv; | 305 | struct page *pgv; |
@@ -317,7 +317,7 @@ void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba) | |||
317 | 317 | ||
318 | n = (n + PAGE_SIZE-1) & PAGE_MASK; | 318 | n = (n + PAGE_SIZE-1) & PAGE_MASK; |
319 | if ((res->end-res->start)+1 != n) { | 319 | if ((res->end-res->start)+1 != n) { |
320 | printk("sbus_free_consistent: region 0x%lx asked 0x%lx\n", | 320 | printk("sbus_free_consistent: region 0x%lx asked 0x%zx\n", |
321 | (long)((res->end-res->start)+1), n); | 321 | (long)((res->end-res->start)+1), n); |
322 | return; | 322 | return; |
323 | } | 323 | } |
@@ -337,8 +337,13 @@ void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba) | |||
337 | * CPU view of this memory may be inconsistent with | 337 | * CPU view of this memory may be inconsistent with |
338 | * a device view and explicit flushing is necessary. | 338 | * a device view and explicit flushing is necessary. |
339 | */ | 339 | */ |
340 | dma_addr_t sbus_map_single(struct device *dev, void *va, size_t len, int direction) | 340 | static dma_addr_t sbus_map_page(struct device *dev, struct page *page, |
341 | unsigned long offset, size_t len, | ||
342 | enum dma_data_direction dir, | ||
343 | struct dma_attrs *attrs) | ||
341 | { | 344 | { |
345 | void *va = page_address(page) + offset; | ||
346 | |||
342 | /* XXX why are some lengths signed, others unsigned? */ | 347 | /* XXX why are some lengths signed, others unsigned? */ |
343 | if (len <= 0) { | 348 | if (len <= 0) { |
344 | return 0; | 349 | return 0; |
@@ -350,12 +355,14 @@ dma_addr_t sbus_map_single(struct device *dev, void *va, size_t len, int directi | |||
350 | return mmu_get_scsi_one(dev, va, len); | 355 | return mmu_get_scsi_one(dev, va, len); |
351 | } | 356 | } |
352 | 357 | ||
353 | void sbus_unmap_single(struct device *dev, dma_addr_t ba, size_t n, int direction) | 358 | static void sbus_unmap_page(struct device *dev, dma_addr_t ba, size_t n, |
359 | enum dma_data_direction dir, struct dma_attrs *attrs) | ||
354 | { | 360 | { |
355 | mmu_release_scsi_one(dev, ba, n); | 361 | mmu_release_scsi_one(dev, ba, n); |
356 | } | 362 | } |
357 | 363 | ||
358 | int sbus_map_sg(struct device *dev, struct scatterlist *sg, int n, int direction) | 364 | static int sbus_map_sg(struct device *dev, struct scatterlist *sg, int n, |
365 | enum dma_data_direction dir, struct dma_attrs *attrs) | ||
359 | { | 366 | { |
360 | mmu_get_scsi_sgl(dev, sg, n); | 367 | mmu_get_scsi_sgl(dev, sg, n); |
361 | 368 | ||
@@ -366,19 +373,38 @@ int sbus_map_sg(struct device *dev, struct scatterlist *sg, int n, int direction | |||
366 | return n; | 373 | return n; |
367 | } | 374 | } |
368 | 375 | ||
369 | void sbus_unmap_sg(struct device *dev, struct scatterlist *sg, int n, int direction) | 376 | static void sbus_unmap_sg(struct device *dev, struct scatterlist *sg, int n, |
377 | enum dma_data_direction dir, struct dma_attrs *attrs) | ||
370 | { | 378 | { |
371 | mmu_release_scsi_sgl(dev, sg, n); | 379 | mmu_release_scsi_sgl(dev, sg, n); |
372 | } | 380 | } |
373 | 381 | ||
374 | void sbus_dma_sync_single_for_cpu(struct device *dev, dma_addr_t ba, size_t size, int direction) | 382 | static void sbus_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, |
383 | int n, enum dma_data_direction dir) | ||
375 | { | 384 | { |
385 | BUG(); | ||
376 | } | 386 | } |
377 | 387 | ||
378 | void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, size_t size, int direction) | 388 | static void sbus_sync_sg_for_device(struct device *dev, struct scatterlist *sg, |
389 | int n, enum dma_data_direction dir) | ||
379 | { | 390 | { |
391 | BUG(); | ||
380 | } | 392 | } |
381 | 393 | ||
394 | struct dma_map_ops sbus_dma_ops = { | ||
395 | .alloc_coherent = sbus_alloc_coherent, | ||
396 | .free_coherent = sbus_free_coherent, | ||
397 | .map_page = sbus_map_page, | ||
398 | .unmap_page = sbus_unmap_page, | ||
399 | .map_sg = sbus_map_sg, | ||
400 | .unmap_sg = sbus_unmap_sg, | ||
401 | .sync_sg_for_cpu = sbus_sync_sg_for_cpu, | ||
402 | .sync_sg_for_device = sbus_sync_sg_for_device, | ||
403 | }; | ||
404 | |||
405 | struct dma_map_ops *dma_ops = &sbus_dma_ops; | ||
406 | EXPORT_SYMBOL(dma_ops); | ||
407 | |||
382 | static int __init sparc_register_ioport(void) | 408 | static int __init sparc_register_ioport(void) |
383 | { | 409 | { |
384 | register_proc_sparc_ioport(); | 410 | register_proc_sparc_ioport(); |
@@ -395,7 +421,8 @@ arch_initcall(sparc_register_ioport); | |||
395 | /* Allocate and map kernel buffer using consistent mode DMA for a device. | 421 | /* Allocate and map kernel buffer using consistent mode DMA for a device. |
396 | * hwdev should be valid struct pci_dev pointer for PCI devices. | 422 | * hwdev should be valid struct pci_dev pointer for PCI devices. |
397 | */ | 423 | */ |
398 | void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba) | 424 | static void *pci32_alloc_coherent(struct device *dev, size_t len, |
425 | dma_addr_t *pba, gfp_t gfp) | ||
399 | { | 426 | { |
400 | unsigned long len_total = (len + PAGE_SIZE-1) & PAGE_MASK; | 427 | unsigned long len_total = (len + PAGE_SIZE-1) & PAGE_MASK; |
401 | unsigned long va; | 428 | unsigned long va; |
@@ -439,7 +466,6 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba) | |||
439 | *pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */ | 466 | *pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */ |
440 | return (void *) res->start; | 467 | return (void *) res->start; |
441 | } | 468 | } |
442 | EXPORT_SYMBOL(pci_alloc_consistent); | ||
443 | 469 | ||
444 | /* Free and unmap a consistent DMA buffer. | 470 | /* Free and unmap a consistent DMA buffer. |
445 | * cpu_addr is what was returned from pci_alloc_consistent, | 471 | * cpu_addr is what was returned from pci_alloc_consistent, |
@@ -449,7 +475,8 @@ EXPORT_SYMBOL(pci_alloc_consistent); | |||
449 | * References to the memory and mappings associated with cpu_addr/dma_addr | 475 | * References to the memory and mappings associated with cpu_addr/dma_addr |
450 | * past this call are illegal. | 476 | * past this call are illegal. |
451 | */ | 477 | */ |
452 | void pci_free_consistent(struct pci_dev *pdev, size_t n, void *p, dma_addr_t ba) | 478 | static void pci32_free_coherent(struct device *dev, size_t n, void *p, |
479 | dma_addr_t ba) | ||
453 | { | 480 | { |
454 | struct resource *res; | 481 | struct resource *res; |
455 | unsigned long pgp; | 482 | unsigned long pgp; |
@@ -481,60 +508,18 @@ void pci_free_consistent(struct pci_dev *pdev, size_t n, void *p, dma_addr_t ba) | |||
481 | 508 | ||
482 | free_pages(pgp, get_order(n)); | 509 | free_pages(pgp, get_order(n)); |
483 | } | 510 | } |
484 | EXPORT_SYMBOL(pci_free_consistent); | ||
485 | |||
486 | /* Map a single buffer of the indicated size for DMA in streaming mode. | ||
487 | * The 32-bit bus address to use is returned. | ||
488 | * | ||
489 | * Once the device is given the dma address, the device owns this memory | ||
490 | * until either pci_unmap_single or pci_dma_sync_single_* is performed. | ||
491 | */ | ||
492 | dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, | ||
493 | int direction) | ||
494 | { | ||
495 | BUG_ON(direction == PCI_DMA_NONE); | ||
496 | /* IIep is write-through, not flushing. */ | ||
497 | return virt_to_phys(ptr); | ||
498 | } | ||
499 | EXPORT_SYMBOL(pci_map_single); | ||
500 | |||
501 | /* Unmap a single streaming mode DMA translation. The dma_addr and size | ||
502 | * must match what was provided for in a previous pci_map_single call. All | ||
503 | * other usages are undefined. | ||
504 | * | ||
505 | * After this call, reads by the cpu to the buffer are guaranteed to see | ||
506 | * whatever the device wrote there. | ||
507 | */ | ||
508 | void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t ba, size_t size, | ||
509 | int direction) | ||
510 | { | ||
511 | BUG_ON(direction == PCI_DMA_NONE); | ||
512 | if (direction != PCI_DMA_TODEVICE) { | ||
513 | mmu_inval_dma_area((unsigned long)phys_to_virt(ba), | ||
514 | (size + PAGE_SIZE-1) & PAGE_MASK); | ||
515 | } | ||
516 | } | ||
517 | EXPORT_SYMBOL(pci_unmap_single); | ||
518 | 511 | ||
519 | /* | 512 | /* |
520 | * Same as pci_map_single, but with pages. | 513 | * Same as pci_map_single, but with pages. |
521 | */ | 514 | */ |
522 | dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page, | 515 | static dma_addr_t pci32_map_page(struct device *dev, struct page *page, |
523 | unsigned long offset, size_t size, int direction) | 516 | unsigned long offset, size_t size, |
517 | enum dma_data_direction dir, | ||
518 | struct dma_attrs *attrs) | ||
524 | { | 519 | { |
525 | BUG_ON(direction == PCI_DMA_NONE); | ||
526 | /* IIep is write-through, not flushing. */ | 520 | /* IIep is write-through, not flushing. */ |
527 | return page_to_phys(page) + offset; | 521 | return page_to_phys(page) + offset; |
528 | } | 522 | } |
529 | EXPORT_SYMBOL(pci_map_page); | ||
530 | |||
531 | void pci_unmap_page(struct pci_dev *hwdev, | ||
532 | dma_addr_t dma_address, size_t size, int direction) | ||
533 | { | ||
534 | BUG_ON(direction == PCI_DMA_NONE); | ||
535 | /* mmu_inval_dma_area XXX */ | ||
536 | } | ||
537 | EXPORT_SYMBOL(pci_unmap_page); | ||
538 | 523 | ||
539 | /* Map a set of buffers described by scatterlist in streaming | 524 | /* Map a set of buffers described by scatterlist in streaming |
540 | * mode for DMA. This is the scather-gather version of the | 525 | * mode for DMA. This is the scather-gather version of the |
@@ -551,13 +536,13 @@ EXPORT_SYMBOL(pci_unmap_page); | |||
551 | * Device ownership issues as mentioned above for pci_map_single are | 536 | * Device ownership issues as mentioned above for pci_map_single are |
552 | * the same here. | 537 | * the same here. |
553 | */ | 538 | */ |
554 | int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, | 539 | static int pci32_map_sg(struct device *device, struct scatterlist *sgl, |
555 | int direction) | 540 | int nents, enum dma_data_direction dir, |
541 | struct dma_attrs *attrs) | ||
556 | { | 542 | { |
557 | struct scatterlist *sg; | 543 | struct scatterlist *sg; |
558 | int n; | 544 | int n; |
559 | 545 | ||
560 | BUG_ON(direction == PCI_DMA_NONE); | ||
561 | /* IIep is write-through, not flushing. */ | 546 | /* IIep is write-through, not flushing. */ |
562 | for_each_sg(sgl, sg, nents, n) { | 547 | for_each_sg(sgl, sg, nents, n) { |
563 | BUG_ON(page_address(sg_page(sg)) == NULL); | 548 | BUG_ON(page_address(sg_page(sg)) == NULL); |
@@ -566,20 +551,19 @@ int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, | |||
566 | } | 551 | } |
567 | return nents; | 552 | return nents; |
568 | } | 553 | } |
569 | EXPORT_SYMBOL(pci_map_sg); | ||
570 | 554 | ||
571 | /* Unmap a set of streaming mode DMA translations. | 555 | /* Unmap a set of streaming mode DMA translations. |
572 | * Again, cpu read rules concerning calls here are the same as for | 556 | * Again, cpu read rules concerning calls here are the same as for |
573 | * pci_unmap_single() above. | 557 | * pci_unmap_single() above. |
574 | */ | 558 | */ |
575 | void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, | 559 | static void pci32_unmap_sg(struct device *dev, struct scatterlist *sgl, |
576 | int direction) | 560 | int nents, enum dma_data_direction dir, |
561 | struct dma_attrs *attrs) | ||
577 | { | 562 | { |
578 | struct scatterlist *sg; | 563 | struct scatterlist *sg; |
579 | int n; | 564 | int n; |
580 | 565 | ||
581 | BUG_ON(direction == PCI_DMA_NONE); | 566 | if (dir != PCI_DMA_TODEVICE) { |
582 | if (direction != PCI_DMA_TODEVICE) { | ||
583 | for_each_sg(sgl, sg, nents, n) { | 567 | for_each_sg(sgl, sg, nents, n) { |
584 | BUG_ON(page_address(sg_page(sg)) == NULL); | 568 | BUG_ON(page_address(sg_page(sg)) == NULL); |
585 | mmu_inval_dma_area( | 569 | mmu_inval_dma_area( |
@@ -588,7 +572,6 @@ void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, | |||
588 | } | 572 | } |
589 | } | 573 | } |
590 | } | 574 | } |
591 | EXPORT_SYMBOL(pci_unmap_sg); | ||
592 | 575 | ||
593 | /* Make physical memory consistent for a single | 576 | /* Make physical memory consistent for a single |
594 | * streaming mode DMA translation before or after a transfer. | 577 | * streaming mode DMA translation before or after a transfer. |
@@ -600,25 +583,23 @@ EXPORT_SYMBOL(pci_unmap_sg); | |||
600 | * must first perform a pci_dma_sync_for_device, and then the | 583 | * must first perform a pci_dma_sync_for_device, and then the |
601 | * device again owns the buffer. | 584 | * device again owns the buffer. |
602 | */ | 585 | */ |
603 | void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, dma_addr_t ba, size_t size, int direction) | 586 | static void pci32_sync_single_for_cpu(struct device *dev, dma_addr_t ba, |
587 | size_t size, enum dma_data_direction dir) | ||
604 | { | 588 | { |
605 | BUG_ON(direction == PCI_DMA_NONE); | 589 | if (dir != PCI_DMA_TODEVICE) { |
606 | if (direction != PCI_DMA_TODEVICE) { | ||
607 | mmu_inval_dma_area((unsigned long)phys_to_virt(ba), | 590 | mmu_inval_dma_area((unsigned long)phys_to_virt(ba), |
608 | (size + PAGE_SIZE-1) & PAGE_MASK); | 591 | (size + PAGE_SIZE-1) & PAGE_MASK); |
609 | } | 592 | } |
610 | } | 593 | } |
611 | EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); | ||
612 | 594 | ||
613 | void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t ba, size_t size, int direction) | 595 | static void pci32_sync_single_for_device(struct device *dev, dma_addr_t ba, |
596 | size_t size, enum dma_data_direction dir) | ||
614 | { | 597 | { |
615 | BUG_ON(direction == PCI_DMA_NONE); | 598 | if (dir != PCI_DMA_TODEVICE) { |
616 | if (direction != PCI_DMA_TODEVICE) { | ||
617 | mmu_inval_dma_area((unsigned long)phys_to_virt(ba), | 599 | mmu_inval_dma_area((unsigned long)phys_to_virt(ba), |
618 | (size + PAGE_SIZE-1) & PAGE_MASK); | 600 | (size + PAGE_SIZE-1) & PAGE_MASK); |
619 | } | 601 | } |
620 | } | 602 | } |
621 | EXPORT_SYMBOL(pci_dma_sync_single_for_device); | ||
622 | 603 | ||
623 | /* Make physical memory consistent for a set of streaming | 604 | /* Make physical memory consistent for a set of streaming |
624 | * mode DMA translations after a transfer. | 605 | * mode DMA translations after a transfer. |
@@ -626,13 +607,13 @@ EXPORT_SYMBOL(pci_dma_sync_single_for_device); | |||
626 | * The same as pci_dma_sync_single_* but for a scatter-gather list, | 607 | * The same as pci_dma_sync_single_* but for a scatter-gather list, |
627 | * same rules and usage. | 608 | * same rules and usage. |
628 | */ | 609 | */ |
629 | void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) | 610 | static void pci32_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, |
611 | int nents, enum dma_data_direction dir) | ||
630 | { | 612 | { |
631 | struct scatterlist *sg; | 613 | struct scatterlist *sg; |
632 | int n; | 614 | int n; |
633 | 615 | ||
634 | BUG_ON(direction == PCI_DMA_NONE); | 616 | if (dir != PCI_DMA_TODEVICE) { |
635 | if (direction != PCI_DMA_TODEVICE) { | ||
636 | for_each_sg(sgl, sg, nents, n) { | 617 | for_each_sg(sgl, sg, nents, n) { |
637 | BUG_ON(page_address(sg_page(sg)) == NULL); | 618 | BUG_ON(page_address(sg_page(sg)) == NULL); |
638 | mmu_inval_dma_area( | 619 | mmu_inval_dma_area( |
@@ -641,15 +622,14 @@ void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sgl, int | |||
641 | } | 622 | } |
642 | } | 623 | } |
643 | } | 624 | } |
644 | EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); | ||
645 | 625 | ||
646 | void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) | 626 | static void pci32_sync_sg_for_device(struct device *device, struct scatterlist *sgl, |
627 | int nents, enum dma_data_direction dir) | ||
647 | { | 628 | { |
648 | struct scatterlist *sg; | 629 | struct scatterlist *sg; |
649 | int n; | 630 | int n; |
650 | 631 | ||
651 | BUG_ON(direction == PCI_DMA_NONE); | 632 | if (dir != PCI_DMA_TODEVICE) { |
652 | if (direction != PCI_DMA_TODEVICE) { | ||
653 | for_each_sg(sgl, sg, nents, n) { | 633 | for_each_sg(sgl, sg, nents, n) { |
654 | BUG_ON(page_address(sg_page(sg)) == NULL); | 634 | BUG_ON(page_address(sg_page(sg)) == NULL); |
655 | mmu_inval_dma_area( | 635 | mmu_inval_dma_area( |
@@ -658,9 +638,49 @@ void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl, | |||
658 | } | 638 | } |
659 | } | 639 | } |
660 | } | 640 | } |
661 | EXPORT_SYMBOL(pci_dma_sync_sg_for_device); | 641 | |
642 | struct dma_map_ops pci32_dma_ops = { | ||
643 | .alloc_coherent = pci32_alloc_coherent, | ||
644 | .free_coherent = pci32_free_coherent, | ||
645 | .map_page = pci32_map_page, | ||
646 | .map_sg = pci32_map_sg, | ||
647 | .unmap_sg = pci32_unmap_sg, | ||
648 | .sync_single_for_cpu = pci32_sync_single_for_cpu, | ||
649 | .sync_single_for_device = pci32_sync_single_for_device, | ||
650 | .sync_sg_for_cpu = pci32_sync_sg_for_cpu, | ||
651 | .sync_sg_for_device = pci32_sync_sg_for_device, | ||
652 | }; | ||
653 | EXPORT_SYMBOL(pci32_dma_ops); | ||
654 | |||
662 | #endif /* CONFIG_PCI */ | 655 | #endif /* CONFIG_PCI */ |
663 | 656 | ||
657 | /* | ||
658 | * Return whether the given PCI device DMA address mask can be | ||
659 | * supported properly. For example, if your device can only drive the | ||
660 | * low 24-bits during PCI bus mastering, then you would pass | ||
661 | * 0x00ffffff as the mask to this function. | ||
662 | */ | ||
663 | int dma_supported(struct device *dev, u64 mask) | ||
664 | { | ||
665 | #ifdef CONFIG_PCI | ||
666 | if (dev->bus == &pci_bus_type) | ||
667 | return 1; | ||
668 | #endif | ||
669 | return 0; | ||
670 | } | ||
671 | EXPORT_SYMBOL(dma_supported); | ||
672 | |||
673 | int dma_set_mask(struct device *dev, u64 dma_mask) | ||
674 | { | ||
675 | #ifdef CONFIG_PCI | ||
676 | if (dev->bus == &pci_bus_type) | ||
677 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
678 | #endif | ||
679 | return -EOPNOTSUPP; | ||
680 | } | ||
681 | EXPORT_SYMBOL(dma_set_mask); | ||
682 | |||
683 | |||
664 | #ifdef CONFIG_PROC_FS | 684 | #ifdef CONFIG_PROC_FS |
665 | 685 | ||
666 | static int | 686 | static int |
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index f0ee79055409..8daab33fc17d 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -886,7 +886,7 @@ void notrace init_irqwork_curcpu(void) | |||
886 | * Therefore you cannot make any OBP calls, not even prom_printf, | 886 | * Therefore you cannot make any OBP calls, not even prom_printf, |
887 | * from these two routines. | 887 | * from these two routines. |
888 | */ | 888 | */ |
889 | static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask) | 889 | static void __cpuinit notrace register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask) |
890 | { | 890 | { |
891 | unsigned long num_entries = (qmask + 1) / 64; | 891 | unsigned long num_entries = (qmask + 1) / 64; |
892 | unsigned long status; | 892 | unsigned long status; |
diff --git a/arch/sparc/kernel/ktlb.S b/arch/sparc/kernel/ktlb.S index cef8defcd7a9..3ea6e8cde8c5 100644 --- a/arch/sparc/kernel/ktlb.S +++ b/arch/sparc/kernel/ktlb.S | |||
@@ -151,12 +151,46 @@ kvmap_dtlb_4v: | |||
151 | * Must preserve %g1 and %g6 (TAG). | 151 | * Must preserve %g1 and %g6 (TAG). |
152 | */ | 152 | */ |
153 | kvmap_dtlb_tsb4m_miss: | 153 | kvmap_dtlb_tsb4m_miss: |
154 | sethi %hi(kpte_linear_bitmap), %g2 | 154 | /* Clear the PAGE_OFFSET top virtual bits, shift |
155 | or %g2, %lo(kpte_linear_bitmap), %g2 | 155 | * down to get PFN, and make sure PFN is in range. |
156 | */ | ||
157 | sllx %g4, 21, %g5 | ||
156 | 158 | ||
157 | /* Clear the PAGE_OFFSET top virtual bits, then shift | 159 | /* Check to see if we know about valid memory at the 4MB |
158 | * down to get a 256MB physical address index. | 160 | * chunk this physical address will reside within. |
159 | */ | 161 | */ |
162 | srlx %g5, 21 + 41, %g2 | ||
163 | brnz,pn %g2, kvmap_dtlb_longpath | ||
164 | nop | ||
165 | |||
166 | /* This unconditional branch and delay-slot nop gets patched | ||
167 | * by the sethi sequence once the bitmap is properly setup. | ||
168 | */ | ||
169 | .globl valid_addr_bitmap_insn | ||
170 | valid_addr_bitmap_insn: | ||
171 | ba,pt %xcc, 2f | ||
172 | nop | ||
173 | .subsection 2 | ||
174 | .globl valid_addr_bitmap_patch | ||
175 | valid_addr_bitmap_patch: | ||
176 | sethi %hi(sparc64_valid_addr_bitmap), %g7 | ||
177 | or %g7, %lo(sparc64_valid_addr_bitmap), %g7 | ||
178 | .previous | ||
179 | |||
180 | srlx %g5, 21 + 22, %g2 | ||
181 | srlx %g2, 6, %g5 | ||
182 | and %g2, 63, %g2 | ||
183 | sllx %g5, 3, %g5 | ||
184 | ldx [%g7 + %g5], %g5 | ||
185 | mov 1, %g7 | ||
186 | sllx %g7, %g2, %g7 | ||
187 | andcc %g5, %g7, %g0 | ||
188 | be,pn %xcc, kvmap_dtlb_longpath | ||
189 | |||
190 | 2: sethi %hi(kpte_linear_bitmap), %g2 | ||
191 | or %g2, %lo(kpte_linear_bitmap), %g2 | ||
192 | |||
193 | /* Get the 256MB physical address index. */ | ||
160 | sllx %g4, 21, %g5 | 194 | sllx %g4, 21, %g5 |
161 | mov 1, %g7 | 195 | mov 1, %g7 |
162 | srlx %g5, 21 + 28, %g5 | 196 | srlx %g5, 21 + 28, %g5 |
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index 2c0cc72d295b..b75bf502cd42 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c | |||
@@ -103,7 +103,7 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | |||
103 | } | 103 | } |
104 | if (!touched && __get_cpu_var(last_irq_sum) == sum) { | 104 | if (!touched && __get_cpu_var(last_irq_sum) == sum) { |
105 | local_inc(&__get_cpu_var(alert_counter)); | 105 | local_inc(&__get_cpu_var(alert_counter)); |
106 | if (local_read(&__get_cpu_var(alert_counter)) == 5 * nmi_hz) | 106 | if (local_read(&__get_cpu_var(alert_counter)) == 30 * nmi_hz) |
107 | die_nmi("BUG: NMI Watchdog detected LOCKUP", | 107 | die_nmi("BUG: NMI Watchdog detected LOCKUP", |
108 | regs, panic_on_timeout); | 108 | regs, panic_on_timeout); |
109 | } else { | 109 | } else { |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 57859ad23547..c68648662802 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -1039,7 +1039,7 @@ static void ali_sound_dma_hack(struct pci_dev *pdev, int set_bit) | |||
1039 | pci_dev_put(ali_isa_bridge); | 1039 | pci_dev_put(ali_isa_bridge); |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | int pci_dma_supported(struct pci_dev *pdev, u64 device_mask) | 1042 | int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask) |
1043 | { | 1043 | { |
1044 | u64 dma_addr_mask; | 1044 | u64 dma_addr_mask; |
1045 | 1045 | ||
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 2485eaa23101..23c33ff9c31e 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -232,7 +232,8 @@ static void dma_4v_free_coherent(struct device *dev, size_t size, void *cpu, | |||
232 | 232 | ||
233 | static dma_addr_t dma_4v_map_page(struct device *dev, struct page *page, | 233 | static dma_addr_t dma_4v_map_page(struct device *dev, struct page *page, |
234 | unsigned long offset, size_t sz, | 234 | unsigned long offset, size_t sz, |
235 | enum dma_data_direction direction) | 235 | enum dma_data_direction direction, |
236 | struct dma_attrs *attrs) | ||
236 | { | 237 | { |
237 | struct iommu *iommu; | 238 | struct iommu *iommu; |
238 | unsigned long flags, npages, oaddr; | 239 | unsigned long flags, npages, oaddr; |
@@ -296,7 +297,8 @@ iommu_map_fail: | |||
296 | } | 297 | } |
297 | 298 | ||
298 | static void dma_4v_unmap_page(struct device *dev, dma_addr_t bus_addr, | 299 | static void dma_4v_unmap_page(struct device *dev, dma_addr_t bus_addr, |
299 | size_t sz, enum dma_data_direction direction) | 300 | size_t sz, enum dma_data_direction direction, |
301 | struct dma_attrs *attrs) | ||
300 | { | 302 | { |
301 | struct pci_pbm_info *pbm; | 303 | struct pci_pbm_info *pbm; |
302 | struct iommu *iommu; | 304 | struct iommu *iommu; |
@@ -336,7 +338,8 @@ static void dma_4v_unmap_page(struct device *dev, dma_addr_t bus_addr, | |||
336 | } | 338 | } |
337 | 339 | ||
338 | static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist, | 340 | static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist, |
339 | int nelems, enum dma_data_direction direction) | 341 | int nelems, enum dma_data_direction direction, |
342 | struct dma_attrs *attrs) | ||
340 | { | 343 | { |
341 | struct scatterlist *s, *outs, *segstart; | 344 | struct scatterlist *s, *outs, *segstart; |
342 | unsigned long flags, handle, prot; | 345 | unsigned long flags, handle, prot; |
@@ -478,7 +481,8 @@ iommu_map_failed: | |||
478 | } | 481 | } |
479 | 482 | ||
480 | static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist, | 483 | static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist, |
481 | int nelems, enum dma_data_direction direction) | 484 | int nelems, enum dma_data_direction direction, |
485 | struct dma_attrs *attrs) | ||
482 | { | 486 | { |
483 | struct pci_pbm_info *pbm; | 487 | struct pci_pbm_info *pbm; |
484 | struct scatterlist *sg; | 488 | struct scatterlist *sg; |
@@ -521,29 +525,13 @@ static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist, | |||
521 | spin_unlock_irqrestore(&iommu->lock, flags); | 525 | spin_unlock_irqrestore(&iommu->lock, flags); |
522 | } | 526 | } |
523 | 527 | ||
524 | static void dma_4v_sync_single_for_cpu(struct device *dev, | 528 | static struct dma_map_ops sun4v_dma_ops = { |
525 | dma_addr_t bus_addr, size_t sz, | ||
526 | enum dma_data_direction direction) | ||
527 | { | ||
528 | /* Nothing to do... */ | ||
529 | } | ||
530 | |||
531 | static void dma_4v_sync_sg_for_cpu(struct device *dev, | ||
532 | struct scatterlist *sglist, int nelems, | ||
533 | enum dma_data_direction direction) | ||
534 | { | ||
535 | /* Nothing to do... */ | ||
536 | } | ||
537 | |||
538 | static const struct dma_ops sun4v_dma_ops = { | ||
539 | .alloc_coherent = dma_4v_alloc_coherent, | 529 | .alloc_coherent = dma_4v_alloc_coherent, |
540 | .free_coherent = dma_4v_free_coherent, | 530 | .free_coherent = dma_4v_free_coherent, |
541 | .map_page = dma_4v_map_page, | 531 | .map_page = dma_4v_map_page, |
542 | .unmap_page = dma_4v_unmap_page, | 532 | .unmap_page = dma_4v_unmap_page, |
543 | .map_sg = dma_4v_map_sg, | 533 | .map_sg = dma_4v_map_sg, |
544 | .unmap_sg = dma_4v_unmap_sg, | 534 | .unmap_sg = dma_4v_unmap_sg, |
545 | .sync_single_for_cpu = dma_4v_sync_single_for_cpu, | ||
546 | .sync_sg_for_cpu = dma_4v_sync_sg_for_cpu, | ||
547 | }; | 535 | }; |
548 | 536 | ||
549 | static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, | 537 | static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index 4041f94e7724..18d67854a1b8 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -251,7 +251,7 @@ static void __global_reg_poll(struct global_reg_snapshot *gp) | |||
251 | } | 251 | } |
252 | } | 252 | } |
253 | 253 | ||
254 | void __trigger_all_cpu_backtrace(void) | 254 | void arch_trigger_all_cpu_backtrace(void) |
255 | { | 255 | { |
256 | struct thread_info *tp = current_thread_info(); | 256 | struct thread_info *tp = current_thread_info(); |
257 | struct pt_regs *regs = get_irq_regs(); | 257 | struct pt_regs *regs = get_irq_regs(); |
@@ -304,7 +304,7 @@ void __trigger_all_cpu_backtrace(void) | |||
304 | 304 | ||
305 | static void sysrq_handle_globreg(int key, struct tty_struct *tty) | 305 | static void sysrq_handle_globreg(int key, struct tty_struct *tty) |
306 | { | 306 | { |
307 | __trigger_all_cpu_backtrace(); | 307 | arch_trigger_all_cpu_backtrace(); |
308 | } | 308 | } |
309 | 309 | ||
310 | static struct sysrq_key_op sparc_globalreg_op = { | 310 | static struct sysrq_key_op sparc_globalreg_op = { |
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index 181d069a2d44..7ce1a1005b1d 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -590,6 +590,8 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, | |||
590 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 590 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
591 | clear_thread_flag(TIF_NOTIFY_RESUME); | 591 | clear_thread_flag(TIF_NOTIFY_RESUME); |
592 | tracehook_notify_resume(regs); | 592 | tracehook_notify_resume(regs); |
593 | if (current->replacement_session_keyring) | ||
594 | key_replace_session_keyring(); | ||
593 | } | 595 | } |
594 | } | 596 | } |
595 | 597 | ||
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c index ec82d76dc6f2..647afbda7ae1 100644 --- a/arch/sparc/kernel/signal_64.c +++ b/arch/sparc/kernel/signal_64.c | |||
@@ -613,5 +613,8 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long | |||
613 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 613 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
614 | clear_thread_flag(TIF_NOTIFY_RESUME); | 614 | clear_thread_flag(TIF_NOTIFY_RESUME); |
615 | tracehook_notify_resume(regs); | 615 | tracehook_notify_resume(regs); |
616 | if (current->replacement_session_keyring) | ||
617 | key_replace_session_keyring(); | ||
616 | } | 618 | } |
617 | } | 619 | } |
620 | |||
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 54fb02468f0d..68791cad7b74 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -162,9 +162,6 @@ extern void cpu_panic(void); | |||
162 | */ | 162 | */ |
163 | 163 | ||
164 | extern struct linux_prom_registers smp_penguin_ctable; | 164 | extern struct linux_prom_registers smp_penguin_ctable; |
165 | extern unsigned long trapbase_cpu1[]; | ||
166 | extern unsigned long trapbase_cpu2[]; | ||
167 | extern unsigned long trapbase_cpu3[]; | ||
168 | 165 | ||
169 | void __init smp4d_boot_cpus(void) | 166 | void __init smp4d_boot_cpus(void) |
170 | { | 167 | { |
@@ -235,25 +232,6 @@ void __init smp4d_smp_done(void) | |||
235 | *prev = first; | 232 | *prev = first; |
236 | local_flush_cache_all(); | 233 | local_flush_cache_all(); |
237 | 234 | ||
238 | /* Free unneeded trap tables */ | ||
239 | ClearPageReserved(virt_to_page(trapbase_cpu1)); | ||
240 | init_page_count(virt_to_page(trapbase_cpu1)); | ||
241 | free_page((unsigned long)trapbase_cpu1); | ||
242 | totalram_pages++; | ||
243 | num_physpages++; | ||
244 | |||
245 | ClearPageReserved(virt_to_page(trapbase_cpu2)); | ||
246 | init_page_count(virt_to_page(trapbase_cpu2)); | ||
247 | free_page((unsigned long)trapbase_cpu2); | ||
248 | totalram_pages++; | ||
249 | num_physpages++; | ||
250 | |||
251 | ClearPageReserved(virt_to_page(trapbase_cpu3)); | ||
252 | init_page_count(virt_to_page(trapbase_cpu3)); | ||
253 | free_page((unsigned long)trapbase_cpu3); | ||
254 | totalram_pages++; | ||
255 | num_physpages++; | ||
256 | |||
257 | /* Ok, they are spinning and ready to go. */ | 235 | /* Ok, they are spinning and ready to go. */ |
258 | smp_processors_ready = 1; | 236 | smp_processors_ready = 1; |
259 | sun4d_distribute_irqs(); | 237 | sun4d_distribute_irqs(); |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 960b113d0006..762d6eedd944 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -121,9 +121,6 @@ void __cpuinit smp4m_callin(void) | |||
121 | */ | 121 | */ |
122 | 122 | ||
123 | extern struct linux_prom_registers smp_penguin_ctable; | 123 | extern struct linux_prom_registers smp_penguin_ctable; |
124 | extern unsigned long trapbase_cpu1[]; | ||
125 | extern unsigned long trapbase_cpu2[]; | ||
126 | extern unsigned long trapbase_cpu3[]; | ||
127 | 124 | ||
128 | void __init smp4m_boot_cpus(void) | 125 | void __init smp4m_boot_cpus(void) |
129 | { | 126 | { |
@@ -193,29 +190,6 @@ void __init smp4m_smp_done(void) | |||
193 | *prev = first; | 190 | *prev = first; |
194 | local_flush_cache_all(); | 191 | local_flush_cache_all(); |
195 | 192 | ||
196 | /* Free unneeded trap tables */ | ||
197 | if (!cpu_isset(1, cpu_present_map)) { | ||
198 | ClearPageReserved(virt_to_page(trapbase_cpu1)); | ||
199 | init_page_count(virt_to_page(trapbase_cpu1)); | ||
200 | free_page((unsigned long)trapbase_cpu1); | ||
201 | totalram_pages++; | ||
202 | num_physpages++; | ||
203 | } | ||
204 | if (!cpu_isset(2, cpu_present_map)) { | ||
205 | ClearPageReserved(virt_to_page(trapbase_cpu2)); | ||
206 | init_page_count(virt_to_page(trapbase_cpu2)); | ||
207 | free_page((unsigned long)trapbase_cpu2); | ||
208 | totalram_pages++; | ||
209 | num_physpages++; | ||
210 | } | ||
211 | if (!cpu_isset(3, cpu_present_map)) { | ||
212 | ClearPageReserved(virt_to_page(trapbase_cpu3)); | ||
213 | init_page_count(virt_to_page(trapbase_cpu3)); | ||
214 | free_page((unsigned long)trapbase_cpu3); | ||
215 | totalram_pages++; | ||
216 | num_physpages++; | ||
217 | } | ||
218 | |||
219 | /* Ok, they are spinning and ready to go. */ | 193 | /* Ok, they are spinning and ready to go. */ |
220 | } | 194 | } |
221 | 195 | ||
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S index f061c4dda9ef..aed94869ad6a 100644 --- a/arch/sparc/kernel/sys32.S +++ b/arch/sparc/kernel/sys32.S | |||
@@ -134,10 +134,12 @@ SIGN1(sys32_getpeername, sys_getpeername, %o0) | |||
134 | SIGN1(sys32_getsockname, sys_getsockname, %o0) | 134 | SIGN1(sys32_getsockname, sys_getsockname, %o0) |
135 | SIGN2(sys32_ioprio_get, sys_ioprio_get, %o0, %o1) | 135 | SIGN2(sys32_ioprio_get, sys_ioprio_get, %o0, %o1) |
136 | SIGN3(sys32_ioprio_set, sys_ioprio_set, %o0, %o1, %o2) | 136 | SIGN3(sys32_ioprio_set, sys_ioprio_set, %o0, %o1, %o2) |
137 | SIGN2(sys32_splice, sys_splice, %o0, %o1) | 137 | SIGN2(sys32_splice, sys_splice, %o0, %o2) |
138 | SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5) | 138 | SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5) |
139 | SIGN2(sys32_tee, sys_tee, %o0, %o1) | 139 | SIGN2(sys32_tee, sys_tee, %o0, %o1) |
140 | SIGN1(sys32_vmsplice, compat_sys_vmsplice, %o0) | 140 | SIGN1(sys32_vmsplice, compat_sys_vmsplice, %o0) |
141 | SIGN1(sys32_truncate, sys_truncate, %o1) | ||
142 | SIGN1(sys32_ftruncate, sys_ftruncate, %o1) | ||
141 | 143 | ||
142 | .globl sys32_mmap2 | 144 | .globl sys32_mmap2 |
143 | sys32_mmap2: | 145 | sys32_mmap2: |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 6b3ee88e253c..2ee7250ba7ae 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -43,8 +43,8 @@ sys_call_table32: | |||
43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall | 43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall |
44 | .word sys32_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd | 44 | .word sys32_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd |
45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod | 45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod |
46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate | 46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys32_truncate |
47 | /*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall | 47 | /*130*/ .word sys32_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall |
48 | .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 | 48 | .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 |
49 | /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit | 49 | /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit |
50 | .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write | 50 | .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write |
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index a5e30c642ee3..b99f81c4906f 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c | |||
@@ -319,9 +319,10 @@ no_context: | |||
319 | */ | 319 | */ |
320 | out_of_memory: | 320 | out_of_memory: |
321 | up_read(&mm->mmap_sem); | 321 | up_read(&mm->mmap_sem); |
322 | printk("VM: killing process %s\n", tsk->comm); | 322 | if (from_user) { |
323 | if (from_user) | 323 | pagefault_out_of_memory(); |
324 | do_group_exit(SIGKILL); | 324 | return; |
325 | } | ||
325 | goto no_context; | 326 | goto no_context; |
326 | 327 | ||
327 | do_sigbus: | 328 | do_sigbus: |
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index e5620b27c8bf..43b0da96a4fb 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c | |||
@@ -447,9 +447,10 @@ handle_kernel_fault: | |||
447 | out_of_memory: | 447 | out_of_memory: |
448 | insn = get_fault_insn(regs, insn); | 448 | insn = get_fault_insn(regs, insn); |
449 | up_read(&mm->mmap_sem); | 449 | up_read(&mm->mmap_sem); |
450 | printk("VM: killing process %s\n", current->comm); | 450 | if (!(regs->tstate & TSTATE_PRIV)) { |
451 | if (!(regs->tstate & TSTATE_PRIV)) | 451 | pagefault_out_of_memory(); |
452 | do_group_exit(SIGKILL); | 452 | return; |
453 | } | ||
453 | goto handle_kernel_fault; | 454 | goto handle_kernel_fault; |
454 | 455 | ||
455 | intr_or_no_mm: | 456 | intr_or_no_mm: |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index ed6be6ba2f4e..a70a5e1904d9 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -145,7 +145,8 @@ static void __init read_obp_memory(const char *property, | |||
145 | cmp_p64, NULL); | 145 | cmp_p64, NULL); |
146 | } | 146 | } |
147 | 147 | ||
148 | unsigned long *sparc64_valid_addr_bitmap __read_mostly; | 148 | unsigned long sparc64_valid_addr_bitmap[VALID_ADDR_BITMAP_BYTES / |
149 | sizeof(unsigned long)]; | ||
149 | EXPORT_SYMBOL(sparc64_valid_addr_bitmap); | 150 | EXPORT_SYMBOL(sparc64_valid_addr_bitmap); |
150 | 151 | ||
151 | /* Kernel physical address base and size in bytes. */ | 152 | /* Kernel physical address base and size in bytes. */ |
@@ -1874,7 +1875,7 @@ static int pavail_rescan_ents __initdata; | |||
1874 | * memory list again, and make sure it provides at least as much | 1875 | * memory list again, and make sure it provides at least as much |
1875 | * memory as 'pavail' does. | 1876 | * memory as 'pavail' does. |
1876 | */ | 1877 | */ |
1877 | static void __init setup_valid_addr_bitmap_from_pavail(void) | 1878 | static void __init setup_valid_addr_bitmap_from_pavail(unsigned long *bitmap) |
1878 | { | 1879 | { |
1879 | int i; | 1880 | int i; |
1880 | 1881 | ||
@@ -1897,8 +1898,7 @@ static void __init setup_valid_addr_bitmap_from_pavail(void) | |||
1897 | 1898 | ||
1898 | if (new_start <= old_start && | 1899 | if (new_start <= old_start && |
1899 | new_end >= (old_start + PAGE_SIZE)) { | 1900 | new_end >= (old_start + PAGE_SIZE)) { |
1900 | set_bit(old_start >> 22, | 1901 | set_bit(old_start >> 22, bitmap); |
1901 | sparc64_valid_addr_bitmap); | ||
1902 | goto do_next_page; | 1902 | goto do_next_page; |
1903 | } | 1903 | } |
1904 | } | 1904 | } |
@@ -1919,20 +1919,21 @@ static void __init setup_valid_addr_bitmap_from_pavail(void) | |||
1919 | } | 1919 | } |
1920 | } | 1920 | } |
1921 | 1921 | ||
1922 | static void __init patch_tlb_miss_handler_bitmap(void) | ||
1923 | { | ||
1924 | extern unsigned int valid_addr_bitmap_insn[]; | ||
1925 | extern unsigned int valid_addr_bitmap_patch[]; | ||
1926 | |||
1927 | valid_addr_bitmap_insn[1] = valid_addr_bitmap_patch[1]; | ||
1928 | mb(); | ||
1929 | valid_addr_bitmap_insn[0] = valid_addr_bitmap_patch[0]; | ||
1930 | flushi(&valid_addr_bitmap_insn[0]); | ||
1931 | } | ||
1932 | |||
1922 | void __init mem_init(void) | 1933 | void __init mem_init(void) |
1923 | { | 1934 | { |
1924 | unsigned long codepages, datapages, initpages; | 1935 | unsigned long codepages, datapages, initpages; |
1925 | unsigned long addr, last; | 1936 | unsigned long addr, last; |
1926 | int i; | ||
1927 | |||
1928 | i = last_valid_pfn >> ((22 - PAGE_SHIFT) + 6); | ||
1929 | i += 1; | ||
1930 | sparc64_valid_addr_bitmap = (unsigned long *) alloc_bootmem(i << 3); | ||
1931 | if (sparc64_valid_addr_bitmap == NULL) { | ||
1932 | prom_printf("mem_init: Cannot alloc valid_addr_bitmap.\n"); | ||
1933 | prom_halt(); | ||
1934 | } | ||
1935 | memset(sparc64_valid_addr_bitmap, 0, i << 3); | ||
1936 | 1937 | ||
1937 | addr = PAGE_OFFSET + kern_base; | 1938 | addr = PAGE_OFFSET + kern_base; |
1938 | last = PAGE_ALIGN(kern_size) + addr; | 1939 | last = PAGE_ALIGN(kern_size) + addr; |
@@ -1941,15 +1942,19 @@ void __init mem_init(void) | |||
1941 | addr += PAGE_SIZE; | 1942 | addr += PAGE_SIZE; |
1942 | } | 1943 | } |
1943 | 1944 | ||
1944 | setup_valid_addr_bitmap_from_pavail(); | 1945 | setup_valid_addr_bitmap_from_pavail(sparc64_valid_addr_bitmap); |
1946 | patch_tlb_miss_handler_bitmap(); | ||
1945 | 1947 | ||
1946 | high_memory = __va(last_valid_pfn << PAGE_SHIFT); | 1948 | high_memory = __va(last_valid_pfn << PAGE_SHIFT); |
1947 | 1949 | ||
1948 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 1950 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
1949 | for_each_online_node(i) { | 1951 | { |
1950 | if (NODE_DATA(i)->node_spanned_pages != 0) { | 1952 | int i; |
1951 | totalram_pages += | 1953 | for_each_online_node(i) { |
1952 | free_all_bootmem_node(NODE_DATA(i)); | 1954 | if (NODE_DATA(i)->node_spanned_pages != 0) { |
1955 | totalram_pages += | ||
1956 | free_all_bootmem_node(NODE_DATA(i)); | ||
1957 | } | ||
1953 | } | 1958 | } |
1954 | } | 1959 | } |
1955 | #else | 1960 | #else |
diff --git a/arch/sparc/mm/init_64.h b/arch/sparc/mm/init_64.h index 16063870a489..c2f772dbd556 100644 --- a/arch/sparc/mm/init_64.h +++ b/arch/sparc/mm/init_64.h | |||
@@ -5,10 +5,13 @@ | |||
5 | * marked non-static so that assembler code can get at them. | 5 | * marked non-static so that assembler code can get at them. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #define MAX_PHYS_ADDRESS (1UL << 42UL) | 8 | #define MAX_PHYS_ADDRESS (1UL << 41UL) |
9 | #define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL) | 9 | #define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL) |
10 | #define KPTE_BITMAP_BYTES \ | 10 | #define KPTE_BITMAP_BYTES \ |
11 | ((MAX_PHYS_ADDRESS / KPTE_BITMAP_CHUNK_SZ) / 8) | 11 | ((MAX_PHYS_ADDRESS / KPTE_BITMAP_CHUNK_SZ) / 8) |
12 | #define VALID_ADDR_BITMAP_CHUNK_SZ (4UL * 1024UL * 1024UL) | ||
13 | #define VALID_ADDR_BITMAP_BYTES \ | ||
14 | ((MAX_PHYS_ADDRESS / VALID_ADDR_BITMAP_CHUNK_SZ) / 8) | ||
12 | 15 | ||
13 | extern unsigned long kern_linear_pte_xor[2]; | 16 | extern unsigned long kern_linear_pte_xor[2]; |
14 | extern unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)]; | 17 | extern unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)]; |
diff --git a/arch/sparc/prom/misc_64.c b/arch/sparc/prom/misc_64.c index eedffb4fec2d..39fc6af21b7c 100644 --- a/arch/sparc/prom/misc_64.c +++ b/arch/sparc/prom/misc_64.c | |||
@@ -88,7 +88,7 @@ void prom_cmdline(void) | |||
88 | /* Drop into the prom, but completely terminate the program. | 88 | /* Drop into the prom, but completely terminate the program. |
89 | * No chance of continuing. | 89 | * No chance of continuing. |
90 | */ | 90 | */ |
91 | void prom_halt(void) | 91 | void notrace prom_halt(void) |
92 | { | 92 | { |
93 | #ifdef CONFIG_SUN_LDOMS | 93 | #ifdef CONFIG_SUN_LDOMS |
94 | if (ldom_domaining_enabled) | 94 | if (ldom_domaining_enabled) |
diff --git a/arch/sparc/prom/printf.c b/arch/sparc/prom/printf.c index 660943ee4c2a..ca869266b9f3 100644 --- a/arch/sparc/prom/printf.c +++ b/arch/sparc/prom/printf.c | |||
@@ -14,14 +14,14 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/compiler.h> | ||
17 | 18 | ||
18 | #include <asm/openprom.h> | 19 | #include <asm/openprom.h> |
19 | #include <asm/oplib.h> | 20 | #include <asm/oplib.h> |
20 | 21 | ||
21 | static char ppbuf[1024]; | 22 | static char ppbuf[1024]; |
22 | 23 | ||
23 | void | 24 | void notrace prom_write(const char *buf, unsigned int n) |
24 | prom_write(const char *buf, unsigned int n) | ||
25 | { | 25 | { |
26 | char ch; | 26 | char ch; |
27 | 27 | ||
@@ -33,8 +33,7 @@ prom_write(const char *buf, unsigned int n) | |||
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
36 | void | 36 | void notrace prom_printf(const char *fmt, ...) |
37 | prom_printf(const char *fmt, ...) | ||
38 | { | 37 | { |
39 | va_list args; | 38 | va_list args; |
40 | int i; | 39 | int i; |