diff options
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/Kconfig | 1 | ||||
-rw-r--r-- | arch/microblaze/configs/mmu_defconfig | 112 | ||||
-rw-r--r-- | arch/microblaze/configs/nommu_defconfig | 101 | ||||
-rw-r--r-- | arch/microblaze/include/asm/io.h | 2 | ||||
-rw-r--r-- | arch/microblaze/include/asm/prom.h | 20 | ||||
-rw-r--r-- | arch/microblaze/include/asm/tlbflush.h | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/cpu/cache.c | 27 | ||||
-rw-r--r-- | arch/microblaze/kernel/entry-nommu.S | 10 | ||||
-rw-r--r-- | arch/microblaze/kernel/of_platform.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/prom.c | 990 | ||||
-rw-r--r-- | arch/microblaze/kernel/setup.c | 1 |
11 files changed, 201 insertions, 1067 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index cd5837e298b2..b008168ae946 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -130,6 +130,7 @@ config CMDLINE_FORCE | |||
130 | 130 | ||
131 | config OF | 131 | config OF |
132 | def_bool y | 132 | def_bool y |
133 | select OF_FLATTREE | ||
133 | 134 | ||
134 | config PROC_DEVICETREE | 135 | config PROC_DEVICETREE |
135 | bool "Support for device tree in /proc" | 136 | bool "Support for device tree in /proc" |
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig index bb7c374713ad..6fced1fe3bf0 100644 --- a/arch/microblaze/configs/mmu_defconfig +++ b/arch/microblaze/configs/mmu_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.31 | 3 | # Linux kernel version: 2.6.33-rc6 |
4 | # Thu Sep 24 10:28:50 2009 | 4 | # Wed Feb 3 10:02:59 2010 |
5 | # | 5 | # |
6 | CONFIG_MICROBLAZE=y | 6 | CONFIG_MICROBLAZE=y |
7 | # CONFIG_SWAP is not set | 7 | # CONFIG_SWAP is not set |
@@ -19,8 +19,12 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
20 | CONFIG_GENERIC_GPIO=y | 20 | CONFIG_GENERIC_GPIO=y |
21 | CONFIG_GENERIC_CSUM=y | 21 | CONFIG_GENERIC_CSUM=y |
22 | CONFIG_STACKTRACE_SUPPORT=y | ||
23 | CONFIG_LOCKDEP_SUPPORT=y | ||
24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
22 | # CONFIG_PCI is not set | 25 | # CONFIG_PCI is not set |
23 | CONFIG_NO_DMA=y | 26 | CONFIG_NO_DMA=y |
27 | CONFIG_DTC=y | ||
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
25 | CONFIG_CONSTRUCTORS=y | 29 | CONFIG_CONSTRUCTORS=y |
26 | 30 | ||
@@ -44,6 +48,7 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
44 | # | 48 | # |
45 | CONFIG_TREE_RCU=y | 49 | CONFIG_TREE_RCU=y |
46 | # CONFIG_TREE_PREEMPT_RCU is not set | 50 | # CONFIG_TREE_PREEMPT_RCU is not set |
51 | # CONFIG_TINY_RCU is not set | ||
47 | # CONFIG_RCU_TRACE is not set | 52 | # CONFIG_RCU_TRACE is not set |
48 | CONFIG_RCU_FANOUT=32 | 53 | CONFIG_RCU_FANOUT=32 |
49 | # CONFIG_RCU_FANOUT_EXACT is not set | 54 | # CONFIG_RCU_FANOUT_EXACT is not set |
@@ -64,10 +69,12 @@ CONFIG_INITRAMFS_ROOT_GID=0 | |||
64 | CONFIG_RD_GZIP=y | 69 | CONFIG_RD_GZIP=y |
65 | # CONFIG_RD_BZIP2 is not set | 70 | # CONFIG_RD_BZIP2 is not set |
66 | # CONFIG_RD_LZMA is not set | 71 | # CONFIG_RD_LZMA is not set |
72 | # CONFIG_RD_LZO is not set | ||
67 | # CONFIG_INITRAMFS_COMPRESSION_NONE is not set | 73 | # CONFIG_INITRAMFS_COMPRESSION_NONE is not set |
68 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y | 74 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y |
69 | # CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set | 75 | # CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set |
70 | # CONFIG_INITRAMFS_COMPRESSION_LZMA is not set | 76 | # CONFIG_INITRAMFS_COMPRESSION_LZMA is not set |
77 | # CONFIG_INITRAMFS_COMPRESSION_LZO is not set | ||
71 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 78 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
72 | CONFIG_SYSCTL=y | 79 | CONFIG_SYSCTL=y |
73 | CONFIG_ANON_INODES=y | 80 | CONFIG_ANON_INODES=y |
@@ -90,21 +97,20 @@ CONFIG_EVENTFD=y | |||
90 | CONFIG_AIO=y | 97 | CONFIG_AIO=y |
91 | 98 | ||
92 | # | 99 | # |
93 | # Performance Counters | 100 | # Kernel Performance Events And Counters |
94 | # | 101 | # |
95 | CONFIG_VM_EVENT_COUNTERS=y | 102 | CONFIG_VM_EVENT_COUNTERS=y |
96 | # CONFIG_STRIP_ASM_SYMS is not set | ||
97 | CONFIG_COMPAT_BRK=y | 103 | CONFIG_COMPAT_BRK=y |
98 | CONFIG_SLAB=y | 104 | CONFIG_SLAB=y |
99 | # CONFIG_SLUB is not set | 105 | # CONFIG_SLUB is not set |
100 | # CONFIG_SLOB is not set | 106 | # CONFIG_SLOB is not set |
101 | # CONFIG_PROFILING is not set | 107 | # CONFIG_PROFILING is not set |
102 | # CONFIG_MARKERS is not set | 108 | CONFIG_HAVE_OPROFILE=y |
103 | 109 | ||
104 | # | 110 | # |
105 | # GCOV-based kernel profiling | 111 | # GCOV-based kernel profiling |
106 | # | 112 | # |
107 | # CONFIG_SLOW_WORK is not set | 113 | CONFIG_SLOW_WORK=y |
108 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 114 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
109 | CONFIG_SLABINFO=y | 115 | CONFIG_SLABINFO=y |
110 | CONFIG_BASE_SMALL=1 | 116 | CONFIG_BASE_SMALL=1 |
@@ -123,14 +129,41 @@ CONFIG_LBDAF=y | |||
123 | # IO Schedulers | 129 | # IO Schedulers |
124 | # | 130 | # |
125 | CONFIG_IOSCHED_NOOP=y | 131 | CONFIG_IOSCHED_NOOP=y |
126 | CONFIG_IOSCHED_AS=y | ||
127 | CONFIG_IOSCHED_DEADLINE=y | 132 | CONFIG_IOSCHED_DEADLINE=y |
128 | CONFIG_IOSCHED_CFQ=y | 133 | CONFIG_IOSCHED_CFQ=y |
129 | # CONFIG_DEFAULT_AS is not set | ||
130 | # CONFIG_DEFAULT_DEADLINE is not set | 134 | # CONFIG_DEFAULT_DEADLINE is not set |
131 | CONFIG_DEFAULT_CFQ=y | 135 | CONFIG_DEFAULT_CFQ=y |
132 | # CONFIG_DEFAULT_NOOP is not set | 136 | # CONFIG_DEFAULT_NOOP is not set |
133 | CONFIG_DEFAULT_IOSCHED="cfq" | 137 | CONFIG_DEFAULT_IOSCHED="cfq" |
138 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
139 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
140 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
141 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
142 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
143 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
144 | # CONFIG_INLINE_SPIN_UNLOCK is not set | ||
145 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
146 | # CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set | ||
147 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
148 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
149 | # CONFIG_INLINE_READ_LOCK is not set | ||
150 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
151 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
152 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
153 | # CONFIG_INLINE_READ_UNLOCK is not set | ||
154 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
155 | # CONFIG_INLINE_READ_UNLOCK_IRQ is not set | ||
156 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
157 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
158 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
159 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
160 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
161 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
162 | # CONFIG_INLINE_WRITE_UNLOCK is not set | ||
163 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
164 | # CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set | ||
165 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
166 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
134 | # CONFIG_FREEZER is not set | 167 | # CONFIG_FREEZER is not set |
135 | 168 | ||
136 | # | 169 | # |
@@ -139,11 +172,6 @@ CONFIG_DEFAULT_IOSCHED="cfq" | |||
139 | CONFIG_PLATFORM_GENERIC=y | 172 | CONFIG_PLATFORM_GENERIC=y |
140 | CONFIG_OPT_LIB_FUNCTION=y | 173 | CONFIG_OPT_LIB_FUNCTION=y |
141 | CONFIG_OPT_LIB_ASM=y | 174 | CONFIG_OPT_LIB_ASM=y |
142 | CONFIG_ALLOW_EDIT_AUTO=y | ||
143 | |||
144 | # | ||
145 | # Automatic platform settings from Kconfig.auto | ||
146 | # | ||
147 | 175 | ||
148 | # | 176 | # |
149 | # Definitions for MICROBLAZE0 | 177 | # Definitions for MICROBLAZE0 |
@@ -203,12 +231,11 @@ CONFIG_FLATMEM_MANUAL=y | |||
203 | CONFIG_FLATMEM=y | 231 | CONFIG_FLATMEM=y |
204 | CONFIG_FLAT_NODE_MEM_MAP=y | 232 | CONFIG_FLAT_NODE_MEM_MAP=y |
205 | CONFIG_PAGEFLAGS_EXTENDED=y | 233 | CONFIG_PAGEFLAGS_EXTENDED=y |
206 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 234 | CONFIG_SPLIT_PTLOCK_CPUS=999999 |
207 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 235 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
208 | CONFIG_ZONE_DMA_FLAG=0 | 236 | CONFIG_ZONE_DMA_FLAG=0 |
209 | CONFIG_VIRT_TO_BUS=y | 237 | CONFIG_VIRT_TO_BUS=y |
210 | CONFIG_HAVE_MLOCK=y | 238 | # CONFIG_KSM is not set |
211 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
212 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | 239 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 |
213 | 240 | ||
214 | # | 241 | # |
@@ -289,7 +316,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
289 | # CONFIG_IRDA is not set | 316 | # CONFIG_IRDA is not set |
290 | # CONFIG_BT is not set | 317 | # CONFIG_BT is not set |
291 | # CONFIG_AF_RXRPC is not set | 318 | # CONFIG_AF_RXRPC is not set |
292 | # CONFIG_WIRELESS is not set | 319 | CONFIG_WIRELESS=y |
320 | # CONFIG_CFG80211 is not set | ||
321 | # CONFIG_LIB80211 is not set | ||
322 | |||
323 | # | ||
324 | # CFG80211 needs to be enabled for MAC80211 | ||
325 | # | ||
293 | # CONFIG_WIMAX is not set | 326 | # CONFIG_WIMAX is not set |
294 | # CONFIG_RFKILL is not set | 327 | # CONFIG_RFKILL is not set |
295 | # CONFIG_NET_9P is not set | 328 | # CONFIG_NET_9P is not set |
@@ -313,6 +346,10 @@ CONFIG_OF_DEVICE=y | |||
313 | CONFIG_BLK_DEV=y | 346 | CONFIG_BLK_DEV=y |
314 | # CONFIG_BLK_DEV_COW_COMMON is not set | 347 | # CONFIG_BLK_DEV_COW_COMMON is not set |
315 | # CONFIG_BLK_DEV_LOOP is not set | 348 | # CONFIG_BLK_DEV_LOOP is not set |
349 | |||
350 | # | ||
351 | # DRBD disabled because PROC_FS, INET or CONNECTOR not selected | ||
352 | # | ||
316 | # CONFIG_BLK_DEV_NBD is not set | 353 | # CONFIG_BLK_DEV_NBD is not set |
317 | CONFIG_BLK_DEV_RAM=y | 354 | CONFIG_BLK_DEV_RAM=y |
318 | CONFIG_BLK_DEV_RAM_COUNT=16 | 355 | CONFIG_BLK_DEV_RAM_COUNT=16 |
@@ -349,7 +386,6 @@ CONFIG_NETDEVICES=y | |||
349 | # CONFIG_PHYLIB is not set | 386 | # CONFIG_PHYLIB is not set |
350 | CONFIG_NET_ETHERNET=y | 387 | CONFIG_NET_ETHERNET=y |
351 | # CONFIG_MII is not set | 388 | # CONFIG_MII is not set |
352 | # CONFIG_ETHOC is not set | ||
353 | # CONFIG_DNET is not set | 389 | # CONFIG_DNET is not set |
354 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 390 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
355 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 391 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
@@ -359,12 +395,12 @@ CONFIG_NET_ETHERNET=y | |||
359 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 395 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
360 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 396 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
361 | # CONFIG_KS8842 is not set | 397 | # CONFIG_KS8842 is not set |
398 | # CONFIG_KS8851_MLL is not set | ||
362 | CONFIG_XILINX_EMACLITE=y | 399 | CONFIG_XILINX_EMACLITE=y |
363 | CONFIG_NETDEV_1000=y | 400 | CONFIG_NETDEV_1000=y |
364 | CONFIG_NETDEV_10000=y | 401 | CONFIG_NETDEV_10000=y |
365 | CONFIG_WLAN=y | 402 | CONFIG_WLAN=y |
366 | # CONFIG_WLAN_PRE80211 is not set | 403 | # CONFIG_HOSTAP is not set |
367 | # CONFIG_WLAN_80211 is not set | ||
368 | 404 | ||
369 | # | 405 | # |
370 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 406 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -408,6 +444,7 @@ CONFIG_SERIAL_UARTLITE=y | |||
408 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 444 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
409 | CONFIG_SERIAL_CORE=y | 445 | CONFIG_SERIAL_CORE=y |
410 | CONFIG_SERIAL_CORE_CONSOLE=y | 446 | CONFIG_SERIAL_CORE_CONSOLE=y |
447 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | ||
411 | CONFIG_UNIX98_PTYS=y | 448 | CONFIG_UNIX98_PTYS=y |
412 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 449 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
413 | CONFIG_LEGACY_PTYS=y | 450 | CONFIG_LEGACY_PTYS=y |
@@ -433,7 +470,6 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | |||
433 | # CONFIG_POWER_SUPPLY is not set | 470 | # CONFIG_POWER_SUPPLY is not set |
434 | # CONFIG_HWMON is not set | 471 | # CONFIG_HWMON is not set |
435 | # CONFIG_THERMAL is not set | 472 | # CONFIG_THERMAL is not set |
436 | # CONFIG_THERMAL_HWMON is not set | ||
437 | # CONFIG_WATCHDOG is not set | 473 | # CONFIG_WATCHDOG is not set |
438 | 474 | ||
439 | # | 475 | # |
@@ -526,8 +562,6 @@ CONFIG_PROC_FS=y | |||
526 | CONFIG_PROC_SYSCTL=y | 562 | CONFIG_PROC_SYSCTL=y |
527 | CONFIG_PROC_PAGE_MONITOR=y | 563 | CONFIG_PROC_PAGE_MONITOR=y |
528 | CONFIG_SYSFS=y | 564 | CONFIG_SYSFS=y |
529 | CONFIG_TMPFS=y | ||
530 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
531 | # CONFIG_HUGETLB_PAGE is not set | 565 | # CONFIG_HUGETLB_PAGE is not set |
532 | # CONFIG_CONFIGFS_FS is not set | 566 | # CONFIG_CONFIGFS_FS is not set |
533 | CONFIG_MISC_FILESYSTEMS=y | 567 | CONFIG_MISC_FILESYSTEMS=y |
@@ -638,11 +672,13 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
638 | # | 672 | # |
639 | # Kernel hacking | 673 | # Kernel hacking |
640 | # | 674 | # |
675 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
641 | # CONFIG_PRINTK_TIME is not set | 676 | # CONFIG_PRINTK_TIME is not set |
642 | CONFIG_ENABLE_WARN_DEPRECATED=y | 677 | CONFIG_ENABLE_WARN_DEPRECATED=y |
643 | CONFIG_ENABLE_MUST_CHECK=y | 678 | CONFIG_ENABLE_MUST_CHECK=y |
644 | CONFIG_FRAME_WARN=1024 | 679 | CONFIG_FRAME_WARN=1024 |
645 | # CONFIG_MAGIC_SYSRQ is not set | 680 | # CONFIG_MAGIC_SYSRQ is not set |
681 | # CONFIG_STRIP_ASM_SYMS is not set | ||
646 | # CONFIG_UNUSED_SYMBOLS is not set | 682 | # CONFIG_UNUSED_SYMBOLS is not set |
647 | # CONFIG_DEBUG_FS is not set | 683 | # CONFIG_DEBUG_FS is not set |
648 | # CONFIG_HEADERS_CHECK is not set | 684 | # CONFIG_HEADERS_CHECK is not set |
@@ -662,6 +698,9 @@ CONFIG_DEBUG_SLAB=y | |||
662 | # CONFIG_DEBUG_SLAB_LEAK is not set | 698 | # CONFIG_DEBUG_SLAB_LEAK is not set |
663 | CONFIG_DEBUG_SPINLOCK=y | 699 | CONFIG_DEBUG_SPINLOCK=y |
664 | # CONFIG_DEBUG_MUTEXES is not set | 700 | # CONFIG_DEBUG_MUTEXES is not set |
701 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
702 | # CONFIG_PROVE_LOCKING is not set | ||
703 | # CONFIG_LOCK_STAT is not set | ||
665 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 704 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
666 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 705 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
667 | # CONFIG_DEBUG_KOBJECT is not set | 706 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -680,10 +719,29 @@ CONFIG_DEBUG_INFO=y | |||
680 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | 719 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set |
681 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | 720 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
682 | # CONFIG_FAULT_INJECTION is not set | 721 | # CONFIG_FAULT_INJECTION is not set |
722 | # CONFIG_LATENCYTOP is not set | ||
683 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | 723 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set |
684 | # CONFIG_PAGE_POISONING is not set | 724 | # CONFIG_PAGE_POISONING is not set |
725 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
726 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
727 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
728 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
729 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
730 | CONFIG_TRACING_SUPPORT=y | ||
731 | CONFIG_FTRACE=y | ||
732 | # CONFIG_FUNCTION_TRACER is not set | ||
733 | # CONFIG_IRQSOFF_TRACER is not set | ||
734 | # CONFIG_SCHED_TRACER is not set | ||
735 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
736 | # CONFIG_BOOT_TRACER is not set | ||
737 | CONFIG_BRANCH_PROFILE_NONE=y | ||
738 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
739 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
740 | # CONFIG_STACK_TRACER is not set | ||
741 | # CONFIG_KMEMTRACE is not set | ||
742 | # CONFIG_WORKQUEUE_TRACER is not set | ||
743 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
685 | # CONFIG_SAMPLES is not set | 744 | # CONFIG_SAMPLES is not set |
686 | # CONFIG_KMEMCHECK is not set | ||
687 | CONFIG_EARLY_PRINTK=y | 745 | CONFIG_EARLY_PRINTK=y |
688 | # CONFIG_HEART_BEAT is not set | 746 | # CONFIG_HEART_BEAT is not set |
689 | CONFIG_DEBUG_BOOTMEM=y | 747 | CONFIG_DEBUG_BOOTMEM=y |
@@ -694,7 +752,11 @@ CONFIG_DEBUG_BOOTMEM=y | |||
694 | # CONFIG_KEYS is not set | 752 | # CONFIG_KEYS is not set |
695 | # CONFIG_SECURITY is not set | 753 | # CONFIG_SECURITY is not set |
696 | # CONFIG_SECURITYFS is not set | 754 | # CONFIG_SECURITYFS is not set |
697 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 755 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set |
756 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
757 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
758 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
759 | CONFIG_DEFAULT_SECURITY="" | ||
698 | CONFIG_CRYPTO=y | 760 | CONFIG_CRYPTO=y |
699 | 761 | ||
700 | # | 762 | # |
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig index adb839bab704..ce2da535246a 100644 --- a/arch/microblaze/configs/nommu_defconfig +++ b/arch/microblaze/configs/nommu_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.31 | 3 | # Linux kernel version: 2.6.33-rc6 |
4 | # Thu Sep 24 10:29:43 2009 | 4 | # Wed Feb 3 10:03:21 2010 |
5 | # | 5 | # |
6 | CONFIG_MICROBLAZE=y | 6 | CONFIG_MICROBLAZE=y |
7 | # CONFIG_SWAP is not set | 7 | # CONFIG_SWAP is not set |
@@ -19,8 +19,12 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
20 | CONFIG_GENERIC_GPIO=y | 20 | CONFIG_GENERIC_GPIO=y |
21 | CONFIG_GENERIC_CSUM=y | 21 | CONFIG_GENERIC_CSUM=y |
22 | CONFIG_STACKTRACE_SUPPORT=y | ||
23 | CONFIG_LOCKDEP_SUPPORT=y | ||
24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
22 | # CONFIG_PCI is not set | 25 | # CONFIG_PCI is not set |
23 | CONFIG_NO_DMA=y | 26 | CONFIG_NO_DMA=y |
27 | CONFIG_DTC=y | ||
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
25 | CONFIG_CONSTRUCTORS=y | 29 | CONFIG_CONSTRUCTORS=y |
26 | 30 | ||
@@ -46,6 +50,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
46 | # | 50 | # |
47 | CONFIG_TREE_RCU=y | 51 | CONFIG_TREE_RCU=y |
48 | # CONFIG_TREE_PREEMPT_RCU is not set | 52 | # CONFIG_TREE_PREEMPT_RCU is not set |
53 | # CONFIG_TINY_RCU is not set | ||
49 | # CONFIG_RCU_TRACE is not set | 54 | # CONFIG_RCU_TRACE is not set |
50 | CONFIG_RCU_FANOUT=32 | 55 | CONFIG_RCU_FANOUT=32 |
51 | # CONFIG_RCU_FANOUT_EXACT is not set | 56 | # CONFIG_RCU_FANOUT_EXACT is not set |
@@ -81,16 +86,16 @@ CONFIG_EVENTFD=y | |||
81 | CONFIG_AIO=y | 86 | CONFIG_AIO=y |
82 | 87 | ||
83 | # | 88 | # |
84 | # Performance Counters | 89 | # Kernel Performance Events And Counters |
85 | # | 90 | # |
86 | CONFIG_VM_EVENT_COUNTERS=y | 91 | CONFIG_VM_EVENT_COUNTERS=y |
87 | # CONFIG_STRIP_ASM_SYMS is not set | ||
88 | CONFIG_COMPAT_BRK=y | 92 | CONFIG_COMPAT_BRK=y |
89 | CONFIG_SLAB=y | 93 | CONFIG_SLAB=y |
90 | # CONFIG_SLUB is not set | 94 | # CONFIG_SLUB is not set |
91 | # CONFIG_SLOB is not set | 95 | # CONFIG_SLOB is not set |
96 | # CONFIG_MMAP_ALLOW_UNINITIALIZED is not set | ||
92 | # CONFIG_PROFILING is not set | 97 | # CONFIG_PROFILING is not set |
93 | # CONFIG_MARKERS is not set | 98 | CONFIG_HAVE_OPROFILE=y |
94 | 99 | ||
95 | # | 100 | # |
96 | # GCOV-based kernel profiling | 101 | # GCOV-based kernel profiling |
@@ -116,14 +121,41 @@ CONFIG_LBDAF=y | |||
116 | # IO Schedulers | 121 | # IO Schedulers |
117 | # | 122 | # |
118 | CONFIG_IOSCHED_NOOP=y | 123 | CONFIG_IOSCHED_NOOP=y |
119 | CONFIG_IOSCHED_AS=y | ||
120 | CONFIG_IOSCHED_DEADLINE=y | 124 | CONFIG_IOSCHED_DEADLINE=y |
121 | CONFIG_IOSCHED_CFQ=y | 125 | CONFIG_IOSCHED_CFQ=y |
122 | # CONFIG_DEFAULT_AS is not set | ||
123 | # CONFIG_DEFAULT_DEADLINE is not set | 126 | # CONFIG_DEFAULT_DEADLINE is not set |
124 | CONFIG_DEFAULT_CFQ=y | 127 | CONFIG_DEFAULT_CFQ=y |
125 | # CONFIG_DEFAULT_NOOP is not set | 128 | # CONFIG_DEFAULT_NOOP is not set |
126 | CONFIG_DEFAULT_IOSCHED="cfq" | 129 | CONFIG_DEFAULT_IOSCHED="cfq" |
130 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
131 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
132 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
133 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
134 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
135 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
136 | CONFIG_INLINE_SPIN_UNLOCK=y | ||
137 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
138 | CONFIG_INLINE_SPIN_UNLOCK_IRQ=y | ||
139 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
140 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
141 | # CONFIG_INLINE_READ_LOCK is not set | ||
142 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
143 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
144 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
145 | CONFIG_INLINE_READ_UNLOCK=y | ||
146 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
147 | CONFIG_INLINE_READ_UNLOCK_IRQ=y | ||
148 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
149 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
150 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
151 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
152 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
153 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
154 | CONFIG_INLINE_WRITE_UNLOCK=y | ||
155 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
156 | CONFIG_INLINE_WRITE_UNLOCK_IRQ=y | ||
157 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
158 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
127 | # CONFIG_FREEZER is not set | 159 | # CONFIG_FREEZER is not set |
128 | 160 | ||
129 | # | 161 | # |
@@ -132,7 +164,10 @@ CONFIG_DEFAULT_IOSCHED="cfq" | |||
132 | CONFIG_PLATFORM_GENERIC=y | 164 | CONFIG_PLATFORM_GENERIC=y |
133 | # CONFIG_SELFMOD is not set | 165 | # CONFIG_SELFMOD is not set |
134 | # CONFIG_OPT_LIB_FUNCTION is not set | 166 | # CONFIG_OPT_LIB_FUNCTION is not set |
135 | # CONFIG_ALLOW_EDIT_AUTO is not set | 167 | |
168 | # | ||
169 | # Definitions for MICROBLAZE0 | ||
170 | # | ||
136 | CONFIG_KERNEL_BASE_ADDR=0x90000000 | 171 | CONFIG_KERNEL_BASE_ADDR=0x90000000 |
137 | CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex5" | 172 | CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex5" |
138 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 | 173 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 |
@@ -190,7 +225,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
190 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 225 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
191 | CONFIG_ZONE_DMA_FLAG=0 | 226 | CONFIG_ZONE_DMA_FLAG=0 |
192 | CONFIG_VIRT_TO_BUS=y | 227 | CONFIG_VIRT_TO_BUS=y |
193 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
194 | CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1 | 228 | CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1 |
195 | 229 | ||
196 | # | 230 | # |
@@ -274,9 +308,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
274 | # CONFIG_AF_RXRPC is not set | 308 | # CONFIG_AF_RXRPC is not set |
275 | CONFIG_WIRELESS=y | 309 | CONFIG_WIRELESS=y |
276 | # CONFIG_CFG80211 is not set | 310 | # CONFIG_CFG80211 is not set |
277 | CONFIG_CFG80211_DEFAULT_PS_VALUE=0 | ||
278 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
279 | # CONFIG_WIRELESS_EXT is not set | ||
280 | # CONFIG_LIB80211 is not set | 311 | # CONFIG_LIB80211 is not set |
281 | 312 | ||
282 | # | 313 | # |
@@ -301,9 +332,9 @@ CONFIG_STANDALONE=y | |||
301 | # CONFIG_CONNECTOR is not set | 332 | # CONFIG_CONNECTOR is not set |
302 | CONFIG_MTD=y | 333 | CONFIG_MTD=y |
303 | # CONFIG_MTD_DEBUG is not set | 334 | # CONFIG_MTD_DEBUG is not set |
335 | # CONFIG_MTD_TESTS is not set | ||
304 | CONFIG_MTD_CONCAT=y | 336 | CONFIG_MTD_CONCAT=y |
305 | CONFIG_MTD_PARTITIONS=y | 337 | CONFIG_MTD_PARTITIONS=y |
306 | # CONFIG_MTD_TESTS is not set | ||
307 | # CONFIG_MTD_REDBOOT_PARTS is not set | 338 | # CONFIG_MTD_REDBOOT_PARTS is not set |
308 | CONFIG_MTD_CMDLINE_PARTS=y | 339 | CONFIG_MTD_CMDLINE_PARTS=y |
309 | # CONFIG_MTD_OF_PARTS is not set | 340 | # CONFIG_MTD_OF_PARTS is not set |
@@ -387,6 +418,10 @@ CONFIG_OF_DEVICE=y | |||
387 | CONFIG_BLK_DEV=y | 418 | CONFIG_BLK_DEV=y |
388 | # CONFIG_BLK_DEV_COW_COMMON is not set | 419 | # CONFIG_BLK_DEV_COW_COMMON is not set |
389 | # CONFIG_BLK_DEV_LOOP is not set | 420 | # CONFIG_BLK_DEV_LOOP is not set |
421 | |||
422 | # | ||
423 | # DRBD disabled because PROC_FS, INET or CONNECTOR not selected | ||
424 | # | ||
390 | CONFIG_BLK_DEV_NBD=y | 425 | CONFIG_BLK_DEV_NBD=y |
391 | CONFIG_BLK_DEV_RAM=y | 426 | CONFIG_BLK_DEV_RAM=y |
392 | CONFIG_BLK_DEV_RAM_COUNT=16 | 427 | CONFIG_BLK_DEV_RAM_COUNT=16 |
@@ -423,7 +458,6 @@ CONFIG_NETDEVICES=y | |||
423 | # CONFIG_PHYLIB is not set | 458 | # CONFIG_PHYLIB is not set |
424 | CONFIG_NET_ETHERNET=y | 459 | CONFIG_NET_ETHERNET=y |
425 | # CONFIG_MII is not set | 460 | # CONFIG_MII is not set |
426 | # CONFIG_ETHOC is not set | ||
427 | # CONFIG_DNET is not set | 461 | # CONFIG_DNET is not set |
428 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 462 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
429 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 463 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
@@ -433,12 +467,12 @@ CONFIG_NET_ETHERNET=y | |||
433 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 467 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
434 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 468 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
435 | # CONFIG_KS8842 is not set | 469 | # CONFIG_KS8842 is not set |
470 | # CONFIG_KS8851_MLL is not set | ||
436 | # CONFIG_XILINX_EMACLITE is not set | 471 | # CONFIG_XILINX_EMACLITE is not set |
437 | CONFIG_NETDEV_1000=y | 472 | CONFIG_NETDEV_1000=y |
438 | CONFIG_NETDEV_10000=y | 473 | CONFIG_NETDEV_10000=y |
439 | CONFIG_WLAN=y | 474 | CONFIG_WLAN=y |
440 | # CONFIG_WLAN_PRE80211 is not set | 475 | # CONFIG_HOSTAP is not set |
441 | # CONFIG_WLAN_80211 is not set | ||
442 | 476 | ||
443 | # | 477 | # |
444 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 478 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -482,6 +516,7 @@ CONFIG_SERIAL_UARTLITE=y | |||
482 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 516 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
483 | CONFIG_SERIAL_CORE=y | 517 | CONFIG_SERIAL_CORE=y |
484 | CONFIG_SERIAL_CORE_CONSOLE=y | 518 | CONFIG_SERIAL_CORE_CONSOLE=y |
519 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | ||
485 | CONFIG_UNIX98_PTYS=y | 520 | CONFIG_UNIX98_PTYS=y |
486 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 521 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
487 | CONFIG_LEGACY_PTYS=y | 522 | CONFIG_LEGACY_PTYS=y |
@@ -508,7 +543,6 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | |||
508 | # CONFIG_POWER_SUPPLY is not set | 543 | # CONFIG_POWER_SUPPLY is not set |
509 | # CONFIG_HWMON is not set | 544 | # CONFIG_HWMON is not set |
510 | # CONFIG_THERMAL is not set | 545 | # CONFIG_THERMAL is not set |
511 | # CONFIG_THERMAL_HWMON is not set | ||
512 | # CONFIG_WATCHDOG is not set | 546 | # CONFIG_WATCHDOG is not set |
513 | 547 | ||
514 | # | 548 | # |
@@ -616,7 +650,6 @@ CONFIG_INOTIFY_USER=y | |||
616 | CONFIG_PROC_FS=y | 650 | CONFIG_PROC_FS=y |
617 | CONFIG_PROC_SYSCTL=y | 651 | CONFIG_PROC_SYSCTL=y |
618 | CONFIG_SYSFS=y | 652 | CONFIG_SYSFS=y |
619 | # CONFIG_TMPFS is not set | ||
620 | # CONFIG_HUGETLB_PAGE is not set | 653 | # CONFIG_HUGETLB_PAGE is not set |
621 | # CONFIG_CONFIGFS_FS is not set | 654 | # CONFIG_CONFIGFS_FS is not set |
622 | CONFIG_MISC_FILESYSTEMS=y | 655 | CONFIG_MISC_FILESYSTEMS=y |
@@ -672,11 +705,13 @@ CONFIG_MSDOS_PARTITION=y | |||
672 | # | 705 | # |
673 | # Kernel hacking | 706 | # Kernel hacking |
674 | # | 707 | # |
708 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
675 | # CONFIG_PRINTK_TIME is not set | 709 | # CONFIG_PRINTK_TIME is not set |
676 | CONFIG_ENABLE_WARN_DEPRECATED=y | 710 | CONFIG_ENABLE_WARN_DEPRECATED=y |
677 | CONFIG_ENABLE_MUST_CHECK=y | 711 | CONFIG_ENABLE_MUST_CHECK=y |
678 | CONFIG_FRAME_WARN=1024 | 712 | CONFIG_FRAME_WARN=1024 |
679 | # CONFIG_MAGIC_SYSRQ is not set | 713 | # CONFIG_MAGIC_SYSRQ is not set |
714 | # CONFIG_STRIP_ASM_SYMS is not set | ||
680 | CONFIG_UNUSED_SYMBOLS=y | 715 | CONFIG_UNUSED_SYMBOLS=y |
681 | CONFIG_DEBUG_FS=y | 716 | CONFIG_DEBUG_FS=y |
682 | # CONFIG_HEADERS_CHECK is not set | 717 | # CONFIG_HEADERS_CHECK is not set |
@@ -695,12 +730,16 @@ CONFIG_DEBUG_OBJECTS=y | |||
695 | CONFIG_DEBUG_OBJECTS_SELFTEST=y | 730 | CONFIG_DEBUG_OBJECTS_SELFTEST=y |
696 | CONFIG_DEBUG_OBJECTS_FREE=y | 731 | CONFIG_DEBUG_OBJECTS_FREE=y |
697 | CONFIG_DEBUG_OBJECTS_TIMERS=y | 732 | CONFIG_DEBUG_OBJECTS_TIMERS=y |
733 | # CONFIG_DEBUG_OBJECTS_WORK is not set | ||
698 | CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 | 734 | CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 |
699 | # CONFIG_DEBUG_SLAB is not set | 735 | # CONFIG_DEBUG_SLAB is not set |
700 | # CONFIG_DEBUG_RT_MUTEXES is not set | 736 | # CONFIG_DEBUG_RT_MUTEXES is not set |
701 | # CONFIG_RT_MUTEX_TESTER is not set | 737 | # CONFIG_RT_MUTEX_TESTER is not set |
702 | # CONFIG_DEBUG_SPINLOCK is not set | 738 | # CONFIG_DEBUG_SPINLOCK is not set |
703 | # CONFIG_DEBUG_MUTEXES is not set | 739 | # CONFIG_DEBUG_MUTEXES is not set |
740 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
741 | # CONFIG_PROVE_LOCKING is not set | ||
742 | # CONFIG_LOCK_STAT is not set | ||
704 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 743 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
705 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 744 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
706 | # CONFIG_DEBUG_KOBJECT is not set | 745 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -720,8 +759,28 @@ CONFIG_DEBUG_SG=y | |||
720 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | 759 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set |
721 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | 760 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
722 | # CONFIG_FAULT_INJECTION is not set | 761 | # CONFIG_FAULT_INJECTION is not set |
762 | # CONFIG_LATENCYTOP is not set | ||
723 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 763 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
724 | # CONFIG_PAGE_POISONING is not set | 764 | # CONFIG_PAGE_POISONING is not set |
765 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
766 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
767 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
768 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
769 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
770 | CONFIG_TRACING_SUPPORT=y | ||
771 | CONFIG_FTRACE=y | ||
772 | # CONFIG_FUNCTION_TRACER is not set | ||
773 | # CONFIG_IRQSOFF_TRACER is not set | ||
774 | # CONFIG_SCHED_TRACER is not set | ||
775 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
776 | # CONFIG_BOOT_TRACER is not set | ||
777 | CONFIG_BRANCH_PROFILE_NONE=y | ||
778 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
779 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
780 | # CONFIG_STACK_TRACER is not set | ||
781 | # CONFIG_KMEMTRACE is not set | ||
782 | # CONFIG_WORKQUEUE_TRACER is not set | ||
783 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
725 | # CONFIG_DYNAMIC_DEBUG is not set | 784 | # CONFIG_DYNAMIC_DEBUG is not set |
726 | # CONFIG_SAMPLES is not set | 785 | # CONFIG_SAMPLES is not set |
727 | CONFIG_EARLY_PRINTK=y | 786 | CONFIG_EARLY_PRINTK=y |
@@ -734,7 +793,11 @@ CONFIG_EARLY_PRINTK=y | |||
734 | # CONFIG_KEYS is not set | 793 | # CONFIG_KEYS is not set |
735 | # CONFIG_SECURITY is not set | 794 | # CONFIG_SECURITY is not set |
736 | # CONFIG_SECURITYFS is not set | 795 | # CONFIG_SECURITYFS is not set |
737 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 796 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set |
797 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
798 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
799 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
800 | CONFIG_DEFAULT_SECURITY="" | ||
738 | CONFIG_CRYPTO=y | 801 | CONFIG_CRYPTO=y |
739 | 802 | ||
740 | # | 803 | # |
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index fc9997b73c09..267c7c779e53 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
@@ -217,7 +217,7 @@ static inline void __iomem *__ioremap(phys_addr_t address, unsigned long size, | |||
217 | * Little endian | 217 | * Little endian |
218 | */ | 218 | */ |
219 | 219 | ||
220 | #define out_le32(a, v) __raw_writel(__cpu_to_le32(v), (a)); | 220 | #define out_le32(a, v) __raw_writel(__cpu_to_le32(v), (a)) |
221 | #define out_le16(a, v) __raw_writew(__cpu_to_le16(v), (a)) | 221 | #define out_le16(a, v) __raw_writew(__cpu_to_le16(v), (a)) |
222 | 222 | ||
223 | #define in_le32(a) __le32_to_cpu(__raw_readl(a)) | 223 | #define in_le32(a) __le32_to_cpu(__raw_readl(a)) |
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index ef3ec1d6ceb3..03f45a963204 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h | |||
@@ -26,31 +26,11 @@ | |||
26 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
27 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
28 | 28 | ||
29 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1 | ||
30 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 | ||
31 | |||
32 | #define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l)) | ||
33 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) | ||
34 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) | ||
35 | |||
36 | extern struct device_node *of_chosen; | ||
37 | |||
38 | #define HAVE_ARCH_DEVTREE_FIXUPS | 29 | #define HAVE_ARCH_DEVTREE_FIXUPS |
39 | 30 | ||
40 | extern struct device_node *allnodes; /* temporary while merging */ | ||
41 | extern rwlock_t devtree_lock; /* temporary while merging */ | ||
42 | |||
43 | /* For updating the device tree at runtime */ | ||
44 | extern void of_attach_node(struct device_node *); | ||
45 | extern void of_detach_node(struct device_node *); | ||
46 | |||
47 | /* Other Prototypes */ | 31 | /* Other Prototypes */ |
48 | extern int early_uartlite_console(void); | 32 | extern int early_uartlite_console(void); |
49 | 33 | ||
50 | extern struct resource *request_OF_resource(struct device_node *node, | ||
51 | int index, const char *name_postfix); | ||
52 | extern int release_OF_resource(struct device_node *node, int index); | ||
53 | |||
54 | /* | 34 | /* |
55 | * OF address retreival & translation | 35 | * OF address retreival & translation |
56 | */ | 36 | */ |
diff --git a/arch/microblaze/include/asm/tlbflush.h b/arch/microblaze/include/asm/tlbflush.h index eb31a0e8a772..10ec70cd8735 100644 --- a/arch/microblaze/include/asm/tlbflush.h +++ b/arch/microblaze/include/asm/tlbflush.h | |||
@@ -38,7 +38,7 @@ static inline void local_flush_tlb_range(struct vm_area_struct *vma, | |||
38 | 38 | ||
39 | #define flush_tlb_kernel_range(start, end) do { } while (0) | 39 | #define flush_tlb_kernel_range(start, end) do { } while (0) |
40 | 40 | ||
41 | #define update_mmu_cache(vma, addr, pte) do { } while (0) | 41 | #define update_mmu_cache(vma, addr, ptep) do { } while (0) |
42 | 42 | ||
43 | #define flush_tlb_all local_flush_tlb_all | 43 | #define flush_tlb_all local_flush_tlb_all |
44 | #define flush_tlb_mm local_flush_tlb_mm | 44 | #define flush_tlb_mm local_flush_tlb_mm |
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c index d9d63831cc2f..2a56bccce4e0 100644 --- a/arch/microblaze/kernel/cpu/cache.c +++ b/arch/microblaze/kernel/cpu/cache.c | |||
@@ -172,16 +172,15 @@ do { \ | |||
172 | /* It is used only first parameter for OP - for wic, wdc */ | 172 | /* It is used only first parameter for OP - for wic, wdc */ |
173 | #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ | 173 | #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ |
174 | do { \ | 174 | do { \ |
175 | int step = -line_length; \ | 175 | int volatile temp; \ |
176 | int count = end - start; \ | 176 | BUG_ON(end - start <= 0); \ |
177 | BUG_ON(count <= 0); \ | ||
178 | \ | 177 | \ |
179 | __asm__ __volatile__ (" 1: addk %0, %0, %1; \ | 178 | __asm__ __volatile__ (" 1: " #op " %1, r0; \ |
180 | " #op " %0, r0; \ | 179 | cmpu %0, %1, %2; \ |
181 | bgtid %1, 1b; \ | 180 | bgtid %0, 1b; \ |
182 | addk %1, %1, %2; \ | 181 | addk %1, %1, %3; \ |
183 | " : : "r" (start), "r" (count), \ | 182 | " : : "r" (temp), "r" (start), "r" (end),\ |
184 | "r" (step) : "memory"); \ | 183 | "r" (line_length) : "memory"); \ |
185 | } while (0); | 184 | } while (0); |
186 | 185 | ||
187 | static void __flush_icache_range_msr_irq(unsigned long start, unsigned long end) | 186 | static void __flush_icache_range_msr_irq(unsigned long start, unsigned long end) |
@@ -313,16 +312,6 @@ static void __invalidate_dcache_all_wb(void) | |||
313 | pr_debug("%s\n", __func__); | 312 | pr_debug("%s\n", __func__); |
314 | CACHE_ALL_LOOP2(cpuinfo.dcache_size, cpuinfo.dcache_line_length, | 313 | CACHE_ALL_LOOP2(cpuinfo.dcache_size, cpuinfo.dcache_line_length, |
315 | wdc.clear) | 314 | wdc.clear) |
316 | |||
317 | #if 0 | ||
318 | unsigned int i; | ||
319 | |||
320 | pr_debug("%s\n", __func__); | ||
321 | |||
322 | /* Just loop through cache size and invalidate it */ | ||
323 | for (i = 0; i < cpuinfo.dcache_size; i += cpuinfo.dcache_line_length) | ||
324 | __invalidate_dcache(0, i); | ||
325 | #endif | ||
326 | } | 315 | } |
327 | 316 | ||
328 | static void __invalidate_dcache_range_wb(unsigned long start, | 317 | static void __invalidate_dcache_range_wb(unsigned long start, |
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S index 95b0855802df..391d6197fc3b 100644 --- a/arch/microblaze/kernel/entry-nommu.S +++ b/arch/microblaze/kernel/entry-nommu.S | |||
@@ -122,7 +122,7 @@ ENTRY(_interrupt) | |||
122 | 122 | ||
123 | ret_from_intr: | 123 | ret_from_intr: |
124 | lwi r11, r1, PT_MODE | 124 | lwi r11, r1, PT_MODE |
125 | bneid r11, 3f | 125 | bneid r11, no_intr_resched |
126 | 126 | ||
127 | lwi r6, r31, TS_THREAD_INFO /* get thread info */ | 127 | lwi r6, r31, TS_THREAD_INFO /* get thread info */ |
128 | lwi r19, r6, TI_FLAGS /* get flags in thread info */ | 128 | lwi r19, r6, TI_FLAGS /* get flags in thread info */ |
@@ -133,16 +133,18 @@ ret_from_intr: | |||
133 | bralid r15, schedule | 133 | bralid r15, schedule |
134 | nop | 134 | nop |
135 | 1: andi r11, r19, _TIF_SIGPENDING | 135 | 1: andi r11, r19, _TIF_SIGPENDING |
136 | beqid r11, no_intr_reshed | 136 | beqid r11, no_intr_resched |
137 | addk r5, r1, r0 | 137 | addk r5, r1, r0 |
138 | addk r7, r0, r0 | 138 | addk r7, r0, r0 |
139 | bralid r15, do_signal | 139 | bralid r15, do_signal |
140 | addk r6, r0, r0 | 140 | addk r6, r0, r0 |
141 | 141 | ||
142 | no_intr_reshed: | 142 | no_intr_resched: |
143 | /* Disable interrupts, we are now committed to the state restore */ | ||
144 | disable_irq | ||
145 | |||
143 | /* save mode indicator */ | 146 | /* save mode indicator */ |
144 | lwi r11, r1, PT_MODE | 147 | lwi r11, r1, PT_MODE |
145 | 3: | ||
146 | swi r11, r0, PER_CPU(KM) | 148 | swi r11, r0, PER_CPU(KM) |
147 | 149 | ||
148 | /* save r31 */ | 150 | /* save r31 */ |
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index acf4574d0f18..1c6d684996d7 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c | |||
@@ -185,7 +185,7 @@ EXPORT_SYMBOL(of_find_device_by_node); | |||
185 | static int of_dev_phandle_match(struct device *dev, void *data) | 185 | static int of_dev_phandle_match(struct device *dev, void *data) |
186 | { | 186 | { |
187 | phandle *ph = data; | 187 | phandle *ph = data; |
188 | return to_of_device(dev)->node->linux_phandle == *ph; | 188 | return to_of_device(dev)->node->phandle == *ph; |
189 | } | 189 | } |
190 | 190 | ||
191 | struct of_device *of_find_device_by_phandle(phandle ph) | 191 | struct of_device *of_find_device_by_phandle(phandle ph) |
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index b817df172aa9..a15ef6d67ca9 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -42,698 +42,21 @@ | |||
42 | #include <asm/sections.h> | 42 | #include <asm/sections.h> |
43 | #include <asm/pci-bridge.h> | 43 | #include <asm/pci-bridge.h> |
44 | 44 | ||
45 | static int __initdata dt_root_addr_cells; | 45 | void __init early_init_dt_scan_chosen_arch(unsigned long node) |
46 | static int __initdata dt_root_size_cells; | ||
47 | |||
48 | typedef u32 cell_t; | ||
49 | |||
50 | static struct boot_param_header *initial_boot_params; | ||
51 | |||
52 | /* export that to outside world */ | ||
53 | struct device_node *of_chosen; | ||
54 | |||
55 | static inline char *find_flat_dt_string(u32 offset) | ||
56 | { | ||
57 | return ((char *)initial_boot_params) + | ||
58 | initial_boot_params->off_dt_strings + offset; | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * This function is used to scan the flattened device-tree, it is | ||
63 | * used to extract the memory informations at boot before we can | ||
64 | * unflatten the tree | ||
65 | */ | ||
66 | int __init of_scan_flat_dt(int (*it)(unsigned long node, | ||
67 | const char *uname, int depth, | ||
68 | void *data), | ||
69 | void *data) | ||
70 | { | ||
71 | unsigned long p = ((unsigned long)initial_boot_params) + | ||
72 | initial_boot_params->off_dt_struct; | ||
73 | int rc = 0; | ||
74 | int depth = -1; | ||
75 | |||
76 | do { | ||
77 | u32 tag = *((u32 *)p); | ||
78 | char *pathp; | ||
79 | |||
80 | p += 4; | ||
81 | if (tag == OF_DT_END_NODE) { | ||
82 | depth--; | ||
83 | continue; | ||
84 | } | ||
85 | if (tag == OF_DT_NOP) | ||
86 | continue; | ||
87 | if (tag == OF_DT_END) | ||
88 | break; | ||
89 | if (tag == OF_DT_PROP) { | ||
90 | u32 sz = *((u32 *)p); | ||
91 | p += 8; | ||
92 | if (initial_boot_params->version < 0x10) | ||
93 | p = _ALIGN(p, sz >= 8 ? 8 : 4); | ||
94 | p += sz; | ||
95 | p = _ALIGN(p, 4); | ||
96 | continue; | ||
97 | } | ||
98 | if (tag != OF_DT_BEGIN_NODE) { | ||
99 | printk(KERN_WARNING "Invalid tag %x scanning flattened" | ||
100 | " device tree !\n", tag); | ||
101 | return -EINVAL; | ||
102 | } | ||
103 | depth++; | ||
104 | pathp = (char *)p; | ||
105 | p = _ALIGN(p + strlen(pathp) + 1, 4); | ||
106 | if ((*pathp) == '/') { | ||
107 | char *lp, *np; | ||
108 | for (lp = NULL, np = pathp; *np; np++) | ||
109 | if ((*np) == '/') | ||
110 | lp = np+1; | ||
111 | if (lp != NULL) | ||
112 | pathp = lp; | ||
113 | } | ||
114 | rc = it(p, pathp, depth, data); | ||
115 | if (rc != 0) | ||
116 | break; | ||
117 | } while (1); | ||
118 | |||
119 | return rc; | ||
120 | } | ||
121 | |||
122 | unsigned long __init of_get_flat_dt_root(void) | ||
123 | { | ||
124 | unsigned long p = ((unsigned long)initial_boot_params) + | ||
125 | initial_boot_params->off_dt_struct; | ||
126 | |||
127 | while (*((u32 *)p) == OF_DT_NOP) | ||
128 | p += 4; | ||
129 | BUG_ON(*((u32 *)p) != OF_DT_BEGIN_NODE); | ||
130 | p += 4; | ||
131 | return _ALIGN(p + strlen((char *)p) + 1, 4); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * This function can be used within scan_flattened_dt callback to get | ||
136 | * access to properties | ||
137 | */ | ||
138 | void *__init of_get_flat_dt_prop(unsigned long node, const char *name, | ||
139 | unsigned long *size) | ||
140 | { | ||
141 | unsigned long p = node; | ||
142 | |||
143 | do { | ||
144 | u32 tag = *((u32 *)p); | ||
145 | u32 sz, noff; | ||
146 | const char *nstr; | ||
147 | |||
148 | p += 4; | ||
149 | if (tag == OF_DT_NOP) | ||
150 | continue; | ||
151 | if (tag != OF_DT_PROP) | ||
152 | return NULL; | ||
153 | |||
154 | sz = *((u32 *)p); | ||
155 | noff = *((u32 *)(p + 4)); | ||
156 | p += 8; | ||
157 | if (initial_boot_params->version < 0x10) | ||
158 | p = _ALIGN(p, sz >= 8 ? 8 : 4); | ||
159 | |||
160 | nstr = find_flat_dt_string(noff); | ||
161 | if (nstr == NULL) { | ||
162 | printk(KERN_WARNING "Can't find property index" | ||
163 | " name !\n"); | ||
164 | return NULL; | ||
165 | } | ||
166 | if (strcmp(name, nstr) == 0) { | ||
167 | if (size) | ||
168 | *size = sz; | ||
169 | return (void *)p; | ||
170 | } | ||
171 | p += sz; | ||
172 | p = _ALIGN(p, 4); | ||
173 | } while (1); | ||
174 | } | ||
175 | |||
176 | int __init of_flat_dt_is_compatible(unsigned long node, const char *compat) | ||
177 | { | ||
178 | const char *cp; | ||
179 | unsigned long cplen, l; | ||
180 | |||
181 | cp = of_get_flat_dt_prop(node, "compatible", &cplen); | ||
182 | if (cp == NULL) | ||
183 | return 0; | ||
184 | while (cplen > 0) { | ||
185 | if (strncasecmp(cp, compat, strlen(compat)) == 0) | ||
186 | return 1; | ||
187 | l = strlen(cp) + 1; | ||
188 | cp += l; | ||
189 | cplen -= l; | ||
190 | } | ||
191 | |||
192 | return 0; | ||
193 | } | ||
194 | |||
195 | static void *__init unflatten_dt_alloc(unsigned long *mem, unsigned long size, | ||
196 | unsigned long align) | ||
197 | { | ||
198 | void *res; | ||
199 | |||
200 | *mem = _ALIGN(*mem, align); | ||
201 | res = (void *)*mem; | ||
202 | *mem += size; | ||
203 | |||
204 | return res; | ||
205 | } | ||
206 | |||
207 | static unsigned long __init unflatten_dt_node(unsigned long mem, | ||
208 | unsigned long *p, | ||
209 | struct device_node *dad, | ||
210 | struct device_node ***allnextpp, | ||
211 | unsigned long fpsize) | ||
212 | { | ||
213 | struct device_node *np; | ||
214 | struct property *pp, **prev_pp = NULL; | ||
215 | char *pathp; | ||
216 | u32 tag; | ||
217 | unsigned int l, allocl; | ||
218 | int has_name = 0; | ||
219 | int new_format = 0; | ||
220 | |||
221 | tag = *((u32 *)(*p)); | ||
222 | if (tag != OF_DT_BEGIN_NODE) { | ||
223 | printk("Weird tag at start of node: %x\n", tag); | ||
224 | return mem; | ||
225 | } | ||
226 | *p += 4; | ||
227 | pathp = (char *)*p; | ||
228 | l = allocl = strlen(pathp) + 1; | ||
229 | *p = _ALIGN(*p + l, 4); | ||
230 | |||
231 | /* version 0x10 has a more compact unit name here instead of the full | ||
232 | * path. we accumulate the full path size using "fpsize", we'll rebuild | ||
233 | * it later. We detect this because the first character of the name is | ||
234 | * not '/'. | ||
235 | */ | ||
236 | if ((*pathp) != '/') { | ||
237 | new_format = 1; | ||
238 | if (fpsize == 0) { | ||
239 | /* root node: special case. fpsize accounts for path | ||
240 | * plus terminating zero. root node only has '/', so | ||
241 | * fpsize should be 2, but we want to avoid the first | ||
242 | * level nodes to have two '/' so we use fpsize 1 here | ||
243 | */ | ||
244 | fpsize = 1; | ||
245 | allocl = 2; | ||
246 | } else { | ||
247 | /* account for '/' and path size minus terminal 0 | ||
248 | * already in 'l' | ||
249 | */ | ||
250 | fpsize += l; | ||
251 | allocl = fpsize; | ||
252 | } | ||
253 | } | ||
254 | |||
255 | np = unflatten_dt_alloc(&mem, sizeof(struct device_node) + allocl, | ||
256 | __alignof__(struct device_node)); | ||
257 | if (allnextpp) { | ||
258 | memset(np, 0, sizeof(*np)); | ||
259 | np->full_name = ((char *)np) + sizeof(struct device_node); | ||
260 | if (new_format) { | ||
261 | char *p2 = np->full_name; | ||
262 | /* rebuild full path for new format */ | ||
263 | if (dad && dad->parent) { | ||
264 | strcpy(p2, dad->full_name); | ||
265 | #ifdef DEBUG | ||
266 | if ((strlen(p2) + l + 1) != allocl) { | ||
267 | pr_debug("%s: p: %d, l: %d, a: %d\n", | ||
268 | pathp, (int)strlen(p2), | ||
269 | l, allocl); | ||
270 | } | ||
271 | #endif | ||
272 | p2 += strlen(p2); | ||
273 | } | ||
274 | *(p2++) = '/'; | ||
275 | memcpy(p2, pathp, l); | ||
276 | } else | ||
277 | memcpy(np->full_name, pathp, l); | ||
278 | prev_pp = &np->properties; | ||
279 | **allnextpp = np; | ||
280 | *allnextpp = &np->allnext; | ||
281 | if (dad != NULL) { | ||
282 | np->parent = dad; | ||
283 | /* we temporarily use the next field as `last_child'*/ | ||
284 | if (dad->next == NULL) | ||
285 | dad->child = np; | ||
286 | else | ||
287 | dad->next->sibling = np; | ||
288 | dad->next = np; | ||
289 | } | ||
290 | kref_init(&np->kref); | ||
291 | } | ||
292 | while (1) { | ||
293 | u32 sz, noff; | ||
294 | char *pname; | ||
295 | |||
296 | tag = *((u32 *)(*p)); | ||
297 | if (tag == OF_DT_NOP) { | ||
298 | *p += 4; | ||
299 | continue; | ||
300 | } | ||
301 | if (tag != OF_DT_PROP) | ||
302 | break; | ||
303 | *p += 4; | ||
304 | sz = *((u32 *)(*p)); | ||
305 | noff = *((u32 *)((*p) + 4)); | ||
306 | *p += 8; | ||
307 | if (initial_boot_params->version < 0x10) | ||
308 | *p = _ALIGN(*p, sz >= 8 ? 8 : 4); | ||
309 | |||
310 | pname = find_flat_dt_string(noff); | ||
311 | if (pname == NULL) { | ||
312 | printk(KERN_INFO | ||
313 | "Can't find property name in list !\n"); | ||
314 | break; | ||
315 | } | ||
316 | if (strcmp(pname, "name") == 0) | ||
317 | has_name = 1; | ||
318 | l = strlen(pname) + 1; | ||
319 | pp = unflatten_dt_alloc(&mem, sizeof(struct property), | ||
320 | __alignof__(struct property)); | ||
321 | if (allnextpp) { | ||
322 | if (strcmp(pname, "linux,phandle") == 0) { | ||
323 | np->node = *((u32 *)*p); | ||
324 | if (np->linux_phandle == 0) | ||
325 | np->linux_phandle = np->node; | ||
326 | } | ||
327 | if (strcmp(pname, "ibm,phandle") == 0) | ||
328 | np->linux_phandle = *((u32 *)*p); | ||
329 | pp->name = pname; | ||
330 | pp->length = sz; | ||
331 | pp->value = (void *)*p; | ||
332 | *prev_pp = pp; | ||
333 | prev_pp = &pp->next; | ||
334 | } | ||
335 | *p = _ALIGN((*p) + sz, 4); | ||
336 | } | ||
337 | /* with version 0x10 we may not have the name property, recreate | ||
338 | * it here from the unit name if absent | ||
339 | */ | ||
340 | if (!has_name) { | ||
341 | char *p1 = pathp, *ps = pathp, *pa = NULL; | ||
342 | int sz; | ||
343 | |||
344 | while (*p1) { | ||
345 | if ((*p1) == '@') | ||
346 | pa = p1; | ||
347 | if ((*p1) == '/') | ||
348 | ps = p1 + 1; | ||
349 | p1++; | ||
350 | } | ||
351 | if (pa < ps) | ||
352 | pa = p1; | ||
353 | sz = (pa - ps) + 1; | ||
354 | pp = unflatten_dt_alloc(&mem, sizeof(struct property) + sz, | ||
355 | __alignof__(struct property)); | ||
356 | if (allnextpp) { | ||
357 | pp->name = "name"; | ||
358 | pp->length = sz; | ||
359 | pp->value = pp + 1; | ||
360 | *prev_pp = pp; | ||
361 | prev_pp = &pp->next; | ||
362 | memcpy(pp->value, ps, sz - 1); | ||
363 | ((char *)pp->value)[sz - 1] = 0; | ||
364 | pr_debug("fixed up name for %s -> %s\n", pathp, | ||
365 | (char *)pp->value); | ||
366 | } | ||
367 | } | ||
368 | if (allnextpp) { | ||
369 | *prev_pp = NULL; | ||
370 | np->name = of_get_property(np, "name", NULL); | ||
371 | np->type = of_get_property(np, "device_type", NULL); | ||
372 | |||
373 | if (!np->name) | ||
374 | np->name = "<NULL>"; | ||
375 | if (!np->type) | ||
376 | np->type = "<NULL>"; | ||
377 | } | ||
378 | while (tag == OF_DT_BEGIN_NODE) { | ||
379 | mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize); | ||
380 | tag = *((u32 *)(*p)); | ||
381 | } | ||
382 | if (tag != OF_DT_END_NODE) { | ||
383 | printk(KERN_INFO "Weird tag at end of node: %x\n", tag); | ||
384 | return mem; | ||
385 | } | ||
386 | *p += 4; | ||
387 | return mem; | ||
388 | } | ||
389 | |||
390 | /** | ||
391 | * unflattens the device-tree passed by the firmware, creating the | ||
392 | * tree of struct device_node. It also fills the "name" and "type" | ||
393 | * pointers of the nodes so the normal device-tree walking functions | ||
394 | * can be used (this used to be done by finish_device_tree) | ||
395 | */ | ||
396 | void __init unflatten_device_tree(void) | ||
397 | { | ||
398 | unsigned long start, mem, size; | ||
399 | struct device_node **allnextp = &allnodes; | ||
400 | |||
401 | pr_debug(" -> unflatten_device_tree()\n"); | ||
402 | |||
403 | /* First pass, scan for size */ | ||
404 | start = ((unsigned long)initial_boot_params) + | ||
405 | initial_boot_params->off_dt_struct; | ||
406 | size = unflatten_dt_node(0, &start, NULL, NULL, 0); | ||
407 | size = (size | 3) + 1; | ||
408 | |||
409 | pr_debug(" size is %lx, allocating...\n", size); | ||
410 | |||
411 | /* Allocate memory for the expanded device tree */ | ||
412 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); | ||
413 | mem = (unsigned long) __va(mem); | ||
414 | |||
415 | ((u32 *)mem)[size / 4] = 0xdeadbeef; | ||
416 | |||
417 | pr_debug(" unflattening %lx...\n", mem); | ||
418 | |||
419 | /* Second pass, do actual unflattening */ | ||
420 | start = ((unsigned long)initial_boot_params) + | ||
421 | initial_boot_params->off_dt_struct; | ||
422 | unflatten_dt_node(mem, &start, NULL, &allnextp, 0); | ||
423 | if (*((u32 *)start) != OF_DT_END) | ||
424 | printk(KERN_WARNING "Weird tag at end of tree: %08x\n", | ||
425 | *((u32 *)start)); | ||
426 | if (((u32 *)mem)[size / 4] != 0xdeadbeef) | ||
427 | printk(KERN_WARNING "End of tree marker overwritten: %08x\n", | ||
428 | ((u32 *)mem)[size / 4]); | ||
429 | *allnextp = NULL; | ||
430 | |||
431 | /* Get pointer to OF "/chosen" node for use everywhere */ | ||
432 | of_chosen = of_find_node_by_path("/chosen"); | ||
433 | if (of_chosen == NULL) | ||
434 | of_chosen = of_find_node_by_path("/chosen@0"); | ||
435 | |||
436 | pr_debug(" <- unflatten_device_tree()\n"); | ||
437 | } | ||
438 | |||
439 | #define early_init_dt_scan_drconf_memory(node) 0 | ||
440 | |||
441 | static int __init early_init_dt_scan_cpus(unsigned long node, | ||
442 | const char *uname, int depth, | ||
443 | void *data) | ||
444 | { | ||
445 | static int logical_cpuid; | ||
446 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | ||
447 | const u32 *intserv; | ||
448 | int i, nthreads; | ||
449 | int found = 0; | ||
450 | |||
451 | /* We are scanning "cpu" nodes only */ | ||
452 | if (type == NULL || strcmp(type, "cpu") != 0) | ||
453 | return 0; | ||
454 | |||
455 | /* Get physical cpuid */ | ||
456 | intserv = of_get_flat_dt_prop(node, "reg", NULL); | ||
457 | nthreads = 1; | ||
458 | |||
459 | /* | ||
460 | * Now see if any of these threads match our boot cpu. | ||
461 | * NOTE: This must match the parsing done in smp_setup_cpu_maps. | ||
462 | */ | ||
463 | for (i = 0; i < nthreads; i++) { | ||
464 | /* | ||
465 | * version 2 of the kexec param format adds the phys cpuid of | ||
466 | * booted proc. | ||
467 | */ | ||
468 | if (initial_boot_params && initial_boot_params->version >= 2) { | ||
469 | if (intserv[i] == | ||
470 | initial_boot_params->boot_cpuid_phys) { | ||
471 | found = 1; | ||
472 | break; | ||
473 | } | ||
474 | } else { | ||
475 | /* | ||
476 | * Check if it's the boot-cpu, set it's hw index now, | ||
477 | * unfortunately this format did not support booting | ||
478 | * off secondary threads. | ||
479 | */ | ||
480 | if (of_get_flat_dt_prop(node, | ||
481 | "linux,boot-cpu", NULL) != NULL) { | ||
482 | found = 1; | ||
483 | break; | ||
484 | } | ||
485 | } | ||
486 | |||
487 | #ifdef CONFIG_SMP | ||
488 | /* logical cpu id is always 0 on UP kernels */ | ||
489 | logical_cpuid++; | ||
490 | #endif | ||
491 | } | ||
492 | |||
493 | if (found) { | ||
494 | pr_debug("boot cpu: logical %d physical %d\n", logical_cpuid, | ||
495 | intserv[i]); | ||
496 | boot_cpuid = logical_cpuid; | ||
497 | } | ||
498 | |||
499 | return 0; | ||
500 | } | ||
501 | |||
502 | #ifdef CONFIG_BLK_DEV_INITRD | ||
503 | static void __init early_init_dt_check_for_initrd(unsigned long node) | ||
504 | { | ||
505 | unsigned long l; | ||
506 | u32 *prop; | ||
507 | |||
508 | pr_debug("Looking for initrd properties... "); | ||
509 | |||
510 | prop = of_get_flat_dt_prop(node, "linux,initrd-start", &l); | ||
511 | if (prop) { | ||
512 | initrd_start = (unsigned long) | ||
513 | __va((u32)of_read_ulong(prop, l/4)); | ||
514 | |||
515 | prop = of_get_flat_dt_prop(node, "linux,initrd-end", &l); | ||
516 | if (prop) { | ||
517 | initrd_end = (unsigned long) | ||
518 | __va((u32)of_read_ulong(prop, 1/4)); | ||
519 | initrd_below_start_ok = 1; | ||
520 | } else { | ||
521 | initrd_start = 0; | ||
522 | } | ||
523 | } | ||
524 | |||
525 | pr_debug("initrd_start=0x%lx initrd_end=0x%lx\n", | ||
526 | initrd_start, initrd_end); | ||
527 | } | ||
528 | #else | ||
529 | static inline void early_init_dt_check_for_initrd(unsigned long node) | ||
530 | { | ||
531 | } | ||
532 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
533 | |||
534 | static int __init early_init_dt_scan_chosen(unsigned long node, | ||
535 | const char *uname, int depth, void *data) | ||
536 | { | ||
537 | unsigned long l; | ||
538 | char *p; | ||
539 | |||
540 | pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname); | ||
541 | |||
542 | if (depth != 1 || | ||
543 | (strcmp(uname, "chosen") != 0 && | ||
544 | strcmp(uname, "chosen@0") != 0)) | ||
545 | return 0; | ||
546 | |||
547 | #ifdef CONFIG_KEXEC | ||
548 | lprop = (u64 *)of_get_flat_dt_prop(node, | ||
549 | "linux,crashkernel-base", NULL); | ||
550 | if (lprop) | ||
551 | crashk_res.start = *lprop; | ||
552 | |||
553 | lprop = (u64 *)of_get_flat_dt_prop(node, | ||
554 | "linux,crashkernel-size", NULL); | ||
555 | if (lprop) | ||
556 | crashk_res.end = crashk_res.start + *lprop - 1; | ||
557 | #endif | ||
558 | |||
559 | early_init_dt_check_for_initrd(node); | ||
560 | |||
561 | /* Retreive command line */ | ||
562 | p = of_get_flat_dt_prop(node, "bootargs", &l); | ||
563 | if (p != NULL && l > 0) | ||
564 | strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); | ||
565 | |||
566 | #ifdef CONFIG_CMDLINE | ||
567 | #ifndef CONFIG_CMDLINE_FORCE | ||
568 | if (p == NULL || l == 0 || (l == 1 && (*p) == 0)) | ||
569 | #endif | ||
570 | strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); | ||
571 | #endif /* CONFIG_CMDLINE */ | ||
572 | |||
573 | pr_debug("Command line is: %s\n", cmd_line); | ||
574 | |||
575 | /* break now */ | ||
576 | return 1; | ||
577 | } | ||
578 | |||
579 | static int __init early_init_dt_scan_root(unsigned long node, | ||
580 | const char *uname, int depth, void *data) | ||
581 | { | ||
582 | u32 *prop; | ||
583 | |||
584 | if (depth != 0) | ||
585 | return 0; | ||
586 | |||
587 | prop = of_get_flat_dt_prop(node, "#size-cells", NULL); | ||
588 | dt_root_size_cells = (prop == NULL) ? 1 : *prop; | ||
589 | pr_debug("dt_root_size_cells = %x\n", dt_root_size_cells); | ||
590 | |||
591 | prop = of_get_flat_dt_prop(node, "#address-cells", NULL); | ||
592 | dt_root_addr_cells = (prop == NULL) ? 2 : *prop; | ||
593 | pr_debug("dt_root_addr_cells = %x\n", dt_root_addr_cells); | ||
594 | |||
595 | /* break now */ | ||
596 | return 1; | ||
597 | } | ||
598 | |||
599 | static u64 __init dt_mem_next_cell(int s, cell_t **cellp) | ||
600 | { | 46 | { |
601 | cell_t *p = *cellp; | 47 | /* No Microblaze specific code here */ |
602 | |||
603 | *cellp = p + s; | ||
604 | return of_read_number(p, s); | ||
605 | } | 48 | } |
606 | 49 | ||
607 | static int __init early_init_dt_scan_memory(unsigned long node, | 50 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) |
608 | const char *uname, int depth, void *data) | ||
609 | { | 51 | { |
610 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | 52 | lmb_add(base, size); |
611 | cell_t *reg, *endp; | ||
612 | unsigned long l; | ||
613 | |||
614 | /* Look for the ibm,dynamic-reconfiguration-memory node */ | ||
615 | /* if (depth == 1 && | ||
616 | strcmp(uname, "ibm,dynamic-reconfiguration-memory") == 0) | ||
617 | return early_init_dt_scan_drconf_memory(node); | ||
618 | */ | ||
619 | /* We are scanning "memory" nodes only */ | ||
620 | if (type == NULL) { | ||
621 | /* | ||
622 | * The longtrail doesn't have a device_type on the | ||
623 | * /memory node, so look for the node called /memory@0. | ||
624 | */ | ||
625 | if (depth != 1 || strcmp(uname, "memory@0") != 0) | ||
626 | return 0; | ||
627 | } else if (strcmp(type, "memory") != 0) | ||
628 | return 0; | ||
629 | |||
630 | reg = (cell_t *)of_get_flat_dt_prop(node, "linux,usable-memory", &l); | ||
631 | if (reg == NULL) | ||
632 | reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l); | ||
633 | if (reg == NULL) | ||
634 | return 0; | ||
635 | |||
636 | endp = reg + (l / sizeof(cell_t)); | ||
637 | |||
638 | pr_debug("memory scan node %s, reg size %ld, data: %x %x %x %x,\n", | ||
639 | uname, l, reg[0], reg[1], reg[2], reg[3]); | ||
640 | |||
641 | while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { | ||
642 | u64 base, size; | ||
643 | |||
644 | base = dt_mem_next_cell(dt_root_addr_cells, ®); | ||
645 | size = dt_mem_next_cell(dt_root_size_cells, ®); | ||
646 | |||
647 | if (size == 0) | ||
648 | continue; | ||
649 | pr_debug(" - %llx , %llx\n", (unsigned long long)base, | ||
650 | (unsigned long long)size); | ||
651 | |||
652 | lmb_add(base, size); | ||
653 | } | ||
654 | return 0; | ||
655 | } | 53 | } |
656 | 54 | ||
657 | #ifdef CONFIG_PHYP_DUMP | 55 | u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) |
658 | /** | ||
659 | * phyp_dump_calculate_reserve_size() - reserve variable boot area 5% or arg | ||
660 | * | ||
661 | * Function to find the largest size we need to reserve | ||
662 | * during early boot process. | ||
663 | * | ||
664 | * It either looks for boot param and returns that OR | ||
665 | * returns larger of 256 or 5% rounded down to multiples of 256MB. | ||
666 | * | ||
667 | */ | ||
668 | static inline unsigned long phyp_dump_calculate_reserve_size(void) | ||
669 | { | 56 | { |
670 | unsigned long tmp; | 57 | return lmb_alloc(size, align); |
671 | |||
672 | if (phyp_dump_info->reserve_bootvar) | ||
673 | return phyp_dump_info->reserve_bootvar; | ||
674 | |||
675 | /* divide by 20 to get 5% of value */ | ||
676 | tmp = lmb_end_of_DRAM(); | ||
677 | do_div(tmp, 20); | ||
678 | |||
679 | /* round it down in multiples of 256 */ | ||
680 | tmp = tmp & ~0x0FFFFFFFUL; | ||
681 | |||
682 | return (tmp > PHYP_DUMP_RMR_END ? tmp : PHYP_DUMP_RMR_END); | ||
683 | } | 58 | } |
684 | 59 | ||
685 | /** | ||
686 | * phyp_dump_reserve_mem() - reserve all not-yet-dumped mmemory | ||
687 | * | ||
688 | * This routine may reserve memory regions in the kernel only | ||
689 | * if the system is supported and a dump was taken in last | ||
690 | * boot instance or if the hardware is supported and the | ||
691 | * scratch area needs to be setup. In other instances it returns | ||
692 | * without reserving anything. The memory in case of dump being | ||
693 | * active is freed when the dump is collected (by userland tools). | ||
694 | */ | ||
695 | static void __init phyp_dump_reserve_mem(void) | ||
696 | { | ||
697 | unsigned long base, size; | ||
698 | unsigned long variable_reserve_size; | ||
699 | |||
700 | if (!phyp_dump_info->phyp_dump_configured) { | ||
701 | printk(KERN_ERR "Phyp-dump not supported on this hardware\n"); | ||
702 | return; | ||
703 | } | ||
704 | |||
705 | if (!phyp_dump_info->phyp_dump_at_boot) { | ||
706 | printk(KERN_INFO "Phyp-dump disabled at boot time\n"); | ||
707 | return; | ||
708 | } | ||
709 | |||
710 | variable_reserve_size = phyp_dump_calculate_reserve_size(); | ||
711 | |||
712 | if (phyp_dump_info->phyp_dump_is_active) { | ||
713 | /* Reserve *everything* above RMR.Area freed by userland tools*/ | ||
714 | base = variable_reserve_size; | ||
715 | size = lmb_end_of_DRAM() - base; | ||
716 | |||
717 | /* XXX crashed_ram_end is wrong, since it may be beyond | ||
718 | * the memory_limit, it will need to be adjusted. */ | ||
719 | lmb_reserve(base, size); | ||
720 | |||
721 | phyp_dump_info->init_reserve_start = base; | ||
722 | phyp_dump_info->init_reserve_size = size; | ||
723 | } else { | ||
724 | size = phyp_dump_info->cpu_state_size + | ||
725 | phyp_dump_info->hpte_region_size + | ||
726 | variable_reserve_size; | ||
727 | base = lmb_end_of_DRAM() - size; | ||
728 | lmb_reserve(base, size); | ||
729 | phyp_dump_info->init_reserve_start = base; | ||
730 | phyp_dump_info->init_reserve_size = size; | ||
731 | } | ||
732 | } | ||
733 | #else | ||
734 | static inline void __init phyp_dump_reserve_mem(void) {} | ||
735 | #endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */ | ||
736 | |||
737 | #ifdef CONFIG_EARLY_PRINTK | 60 | #ifdef CONFIG_EARLY_PRINTK |
738 | /* MS this is Microblaze specifig function */ | 61 | /* MS this is Microblaze specifig function */ |
739 | static int __init early_init_dt_scan_serial(unsigned long node, | 62 | static int __init early_init_dt_scan_serial(unsigned long node, |
@@ -775,11 +98,6 @@ void __init early_init_devtree(void *params) | |||
775 | /* Setup flat device-tree pointer */ | 98 | /* Setup flat device-tree pointer */ |
776 | initial_boot_params = params; | 99 | initial_boot_params = params; |
777 | 100 | ||
778 | #ifdef CONFIG_PHYP_DUMP | ||
779 | /* scan tree to see if dump occured during last boot */ | ||
780 | of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL); | ||
781 | #endif | ||
782 | |||
783 | /* Retrieve various informations from the /chosen node of the | 101 | /* Retrieve various informations from the /chosen node of the |
784 | * device-tree, including the platform type, initrd location and | 102 | * device-tree, including the platform type, initrd location and |
785 | * size, TCE reserve, and more ... | 103 | * size, TCE reserve, and more ... |
@@ -799,33 +117,18 @@ void __init early_init_devtree(void *params) | |||
799 | 117 | ||
800 | pr_debug("Phys. mem: %lx\n", (unsigned long) lmb_phys_mem_size()); | 118 | pr_debug("Phys. mem: %lx\n", (unsigned long) lmb_phys_mem_size()); |
801 | 119 | ||
802 | pr_debug("Scanning CPUs ...\n"); | ||
803 | |||
804 | /* Retreive CPU related informations from the flat tree | ||
805 | * (altivec support, boot CPU ID, ...) | ||
806 | */ | ||
807 | of_scan_flat_dt(early_init_dt_scan_cpus, NULL); | ||
808 | |||
809 | pr_debug(" <- early_init_devtree()\n"); | 120 | pr_debug(" <- early_init_devtree()\n"); |
810 | } | 121 | } |
811 | 122 | ||
812 | /** | 123 | #ifdef CONFIG_BLK_DEV_INITRD |
813 | * Indicates whether the root node has a given value in its | 124 | void __init early_init_dt_setup_initrd_arch(unsigned long start, |
814 | * compatible property. | 125 | unsigned long end) |
815 | */ | ||
816 | int machine_is_compatible(const char *compat) | ||
817 | { | 126 | { |
818 | struct device_node *root; | 127 | initrd_start = (unsigned long)__va(start); |
819 | int rc = 0; | 128 | initrd_end = (unsigned long)__va(end); |
820 | 129 | initrd_below_start_ok = 1; | |
821 | root = of_find_node_by_path("/"); | ||
822 | if (root) { | ||
823 | rc = of_device_is_compatible(root, compat); | ||
824 | of_node_put(root); | ||
825 | } | ||
826 | return rc; | ||
827 | } | 130 | } |
828 | EXPORT_SYMBOL(machine_is_compatible); | 131 | #endif |
829 | 132 | ||
830 | /******* | 133 | /******* |
831 | * | 134 | * |
@@ -838,273 +141,6 @@ EXPORT_SYMBOL(machine_is_compatible); | |||
838 | * | 141 | * |
839 | *******/ | 142 | *******/ |
840 | 143 | ||
841 | /** | ||
842 | * of_find_node_by_phandle - Find a node given a phandle | ||
843 | * @handle: phandle of the node to find | ||
844 | * | ||
845 | * Returns a node pointer with refcount incremented, use | ||
846 | * of_node_put() on it when done. | ||
847 | */ | ||
848 | struct device_node *of_find_node_by_phandle(phandle handle) | ||
849 | { | ||
850 | struct device_node *np; | ||
851 | |||
852 | read_lock(&devtree_lock); | ||
853 | for (np = allnodes; np != NULL; np = np->allnext) | ||
854 | if (np->linux_phandle == handle) | ||
855 | break; | ||
856 | of_node_get(np); | ||
857 | read_unlock(&devtree_lock); | ||
858 | return np; | ||
859 | } | ||
860 | EXPORT_SYMBOL(of_find_node_by_phandle); | ||
861 | |||
862 | /** | ||
863 | * of_node_get - Increment refcount of a node | ||
864 | * @node: Node to inc refcount, NULL is supported to | ||
865 | * simplify writing of callers | ||
866 | * | ||
867 | * Returns node. | ||
868 | */ | ||
869 | struct device_node *of_node_get(struct device_node *node) | ||
870 | { | ||
871 | if (node) | ||
872 | kref_get(&node->kref); | ||
873 | return node; | ||
874 | } | ||
875 | EXPORT_SYMBOL(of_node_get); | ||
876 | |||
877 | static inline struct device_node *kref_to_device_node(struct kref *kref) | ||
878 | { | ||
879 | return container_of(kref, struct device_node, kref); | ||
880 | } | ||
881 | |||
882 | /** | ||
883 | * of_node_release - release a dynamically allocated node | ||
884 | * @kref: kref element of the node to be released | ||
885 | * | ||
886 | * In of_node_put() this function is passed to kref_put() | ||
887 | * as the destructor. | ||
888 | */ | ||
889 | static void of_node_release(struct kref *kref) | ||
890 | { | ||
891 | struct device_node *node = kref_to_device_node(kref); | ||
892 | struct property *prop = node->properties; | ||
893 | |||
894 | /* We should never be releasing nodes that haven't been detached. */ | ||
895 | if (!of_node_check_flag(node, OF_DETACHED)) { | ||
896 | printk(KERN_INFO "WARNING: Bad of_node_put() on %s\n", | ||
897 | node->full_name); | ||
898 | dump_stack(); | ||
899 | kref_init(&node->kref); | ||
900 | return; | ||
901 | } | ||
902 | |||
903 | if (!of_node_check_flag(node, OF_DYNAMIC)) | ||
904 | return; | ||
905 | |||
906 | while (prop) { | ||
907 | struct property *next = prop->next; | ||
908 | kfree(prop->name); | ||
909 | kfree(prop->value); | ||
910 | kfree(prop); | ||
911 | prop = next; | ||
912 | |||
913 | if (!prop) { | ||
914 | prop = node->deadprops; | ||
915 | node->deadprops = NULL; | ||
916 | } | ||
917 | } | ||
918 | kfree(node->full_name); | ||
919 | kfree(node->data); | ||
920 | kfree(node); | ||
921 | } | ||
922 | |||
923 | /** | ||
924 | * of_node_put - Decrement refcount of a node | ||
925 | * @node: Node to dec refcount, NULL is supported to | ||
926 | * simplify writing of callers | ||
927 | * | ||
928 | */ | ||
929 | void of_node_put(struct device_node *node) | ||
930 | { | ||
931 | if (node) | ||
932 | kref_put(&node->kref, of_node_release); | ||
933 | } | ||
934 | EXPORT_SYMBOL(of_node_put); | ||
935 | |||
936 | /* | ||
937 | * Plug a device node into the tree and global list. | ||
938 | */ | ||
939 | void of_attach_node(struct device_node *np) | ||
940 | { | ||
941 | unsigned long flags; | ||
942 | |||
943 | write_lock_irqsave(&devtree_lock, flags); | ||
944 | np->sibling = np->parent->child; | ||
945 | np->allnext = allnodes; | ||
946 | np->parent->child = np; | ||
947 | allnodes = np; | ||
948 | write_unlock_irqrestore(&devtree_lock, flags); | ||
949 | } | ||
950 | |||
951 | /* | ||
952 | * "Unplug" a node from the device tree. The caller must hold | ||
953 | * a reference to the node. The memory associated with the node | ||
954 | * is not freed until its refcount goes to zero. | ||
955 | */ | ||
956 | void of_detach_node(struct device_node *np) | ||
957 | { | ||
958 | struct device_node *parent; | ||
959 | unsigned long flags; | ||
960 | |||
961 | write_lock_irqsave(&devtree_lock, flags); | ||
962 | |||
963 | parent = np->parent; | ||
964 | if (!parent) | ||
965 | goto out_unlock; | ||
966 | |||
967 | if (allnodes == np) | ||
968 | allnodes = np->allnext; | ||
969 | else { | ||
970 | struct device_node *prev; | ||
971 | for (prev = allnodes; | ||
972 | prev->allnext != np; | ||
973 | prev = prev->allnext) | ||
974 | ; | ||
975 | prev->allnext = np->allnext; | ||
976 | } | ||
977 | |||
978 | if (parent->child == np) | ||
979 | parent->child = np->sibling; | ||
980 | else { | ||
981 | struct device_node *prevsib; | ||
982 | for (prevsib = np->parent->child; | ||
983 | prevsib->sibling != np; | ||
984 | prevsib = prevsib->sibling) | ||
985 | ; | ||
986 | prevsib->sibling = np->sibling; | ||
987 | } | ||
988 | |||
989 | of_node_set_flag(np, OF_DETACHED); | ||
990 | |||
991 | out_unlock: | ||
992 | write_unlock_irqrestore(&devtree_lock, flags); | ||
993 | } | ||
994 | |||
995 | /* | ||
996 | * Add a property to a node | ||
997 | */ | ||
998 | int prom_add_property(struct device_node *np, struct property *prop) | ||
999 | { | ||
1000 | struct property **next; | ||
1001 | unsigned long flags; | ||
1002 | |||
1003 | prop->next = NULL; | ||
1004 | write_lock_irqsave(&devtree_lock, flags); | ||
1005 | next = &np->properties; | ||
1006 | while (*next) { | ||
1007 | if (strcmp(prop->name, (*next)->name) == 0) { | ||
1008 | /* duplicate ! don't insert it */ | ||
1009 | write_unlock_irqrestore(&devtree_lock, flags); | ||
1010 | return -1; | ||
1011 | } | ||
1012 | next = &(*next)->next; | ||
1013 | } | ||
1014 | *next = prop; | ||
1015 | write_unlock_irqrestore(&devtree_lock, flags); | ||
1016 | |||
1017 | #ifdef CONFIG_PROC_DEVICETREE | ||
1018 | /* try to add to proc as well if it was initialized */ | ||
1019 | if (np->pde) | ||
1020 | proc_device_tree_add_prop(np->pde, prop); | ||
1021 | #endif /* CONFIG_PROC_DEVICETREE */ | ||
1022 | |||
1023 | return 0; | ||
1024 | } | ||
1025 | |||
1026 | /* | ||
1027 | * Remove a property from a node. Note that we don't actually | ||
1028 | * remove it, since we have given out who-knows-how-many pointers | ||
1029 | * to the data using get-property. Instead we just move the property | ||
1030 | * to the "dead properties" list, so it won't be found any more. | ||
1031 | */ | ||
1032 | int prom_remove_property(struct device_node *np, struct property *prop) | ||
1033 | { | ||
1034 | struct property **next; | ||
1035 | unsigned long flags; | ||
1036 | int found = 0; | ||
1037 | |||
1038 | write_lock_irqsave(&devtree_lock, flags); | ||
1039 | next = &np->properties; | ||
1040 | while (*next) { | ||
1041 | if (*next == prop) { | ||
1042 | /* found the node */ | ||
1043 | *next = prop->next; | ||
1044 | prop->next = np->deadprops; | ||
1045 | np->deadprops = prop; | ||
1046 | found = 1; | ||
1047 | break; | ||
1048 | } | ||
1049 | next = &(*next)->next; | ||
1050 | } | ||
1051 | write_unlock_irqrestore(&devtree_lock, flags); | ||
1052 | |||
1053 | if (!found) | ||
1054 | return -ENODEV; | ||
1055 | |||
1056 | #ifdef CONFIG_PROC_DEVICETREE | ||
1057 | /* try to remove the proc node as well */ | ||
1058 | if (np->pde) | ||
1059 | proc_device_tree_remove_prop(np->pde, prop); | ||
1060 | #endif /* CONFIG_PROC_DEVICETREE */ | ||
1061 | |||
1062 | return 0; | ||
1063 | } | ||
1064 | |||
1065 | /* | ||
1066 | * Update a property in a node. Note that we don't actually | ||
1067 | * remove it, since we have given out who-knows-how-many pointers | ||
1068 | * to the data using get-property. Instead we just move the property | ||
1069 | * to the "dead properties" list, and add the new property to the | ||
1070 | * property list | ||
1071 | */ | ||
1072 | int prom_update_property(struct device_node *np, | ||
1073 | struct property *newprop, | ||
1074 | struct property *oldprop) | ||
1075 | { | ||
1076 | struct property **next; | ||
1077 | unsigned long flags; | ||
1078 | int found = 0; | ||
1079 | |||
1080 | write_lock_irqsave(&devtree_lock, flags); | ||
1081 | next = &np->properties; | ||
1082 | while (*next) { | ||
1083 | if (*next == oldprop) { | ||
1084 | /* found the node */ | ||
1085 | newprop->next = oldprop->next; | ||
1086 | *next = newprop; | ||
1087 | oldprop->next = np->deadprops; | ||
1088 | np->deadprops = oldprop; | ||
1089 | found = 1; | ||
1090 | break; | ||
1091 | } | ||
1092 | next = &(*next)->next; | ||
1093 | } | ||
1094 | write_unlock_irqrestore(&devtree_lock, flags); | ||
1095 | |||
1096 | if (!found) | ||
1097 | return -ENODEV; | ||
1098 | |||
1099 | #ifdef CONFIG_PROC_DEVICETREE | ||
1100 | /* try to add to proc as well if it was initialized */ | ||
1101 | if (np->pde) | ||
1102 | proc_device_tree_update_prop(np->pde, newprop, oldprop); | ||
1103 | #endif /* CONFIG_PROC_DEVICETREE */ | ||
1104 | |||
1105 | return 0; | ||
1106 | } | ||
1107 | |||
1108 | #if defined(CONFIG_DEBUG_FS) && defined(DEBUG) | 144 | #if defined(CONFIG_DEBUG_FS) && defined(DEBUG) |
1109 | static struct debugfs_blob_wrapper flat_dt_blob; | 145 | static struct debugfs_blob_wrapper flat_dt_blob; |
1110 | 146 | ||
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 5372b24ad049..bb8c4b9ccb80 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
@@ -54,6 +54,7 @@ void __init setup_arch(char **cmdline_p) | |||
54 | 54 | ||
55 | microblaze_cache_init(); | 55 | microblaze_cache_init(); |
56 | 56 | ||
57 | invalidate_dcache(); | ||
57 | enable_dcache(); | 58 | enable_dcache(); |
58 | 59 | ||
59 | invalidate_icache(); | 60 | invalidate_icache(); |